Editing framework-res.apk | Discuss ways to edit system resources.



Rep: (351)
Editing framework-res.apk
Discuss ways to edit system resources


Rules of conduct in the subject. Read a must!

  • The topic is only a discussion of ways to edit system resources!
  • draw your attention to That, to quickly find information in the topic (on the forum), use the "find in this topic" button (top right of the page). How to use search
    If the content that you want to publish in this topic was posted earlier on the forum, it is enough to give a link to the original message with a short description. In the case of a replay, the files will be deleted without warning.
  • Orders for editing leave inOrder table for compiling and editing system resources and applications
    In this thread, orders will be deleted without warning!
  • Manuals, lessons, etc. publish in the appropriate topicInstructions for editing system resources in this topic, if necessary, give only a link.
    Messages from users who ignored this requirementwill be deleted without warning!
  • Flood and offtopic prohibited and punishable!
  • Links to paid and requiring mandatory registration of file hosting services are not allowed and will be deleted! Files up to 128MB are recommended to upload to the forum, over 128MB - to free file sharing services (Yandex.Disk; Mail.ru Cloud, etc.).
  • All images are hidden underspoiler ! It is not necessary to post images captured on modern cameras, without significantly reducing them. Do not forget that many browse the forum from mobile devices, traffic on which is significantly higher. If it is necessary to place the original, large image, place only a link to it. Using BMP format for screenshots is prohibited!
  • In the subject fully apply all the rules of the forum.Their compliance is not negotiable!


Posting messages. Read a must!
  • When writing messages that contain a description of the problems, use a template (see below).
  • If you have problems with decompiling / compiling applications in the applet, then be sure to post a decompilation / compilation log!
  • If the application is going to, but does not work, then be sure to lay out logkat!

Logcat
Logcat can be created through the terminal using the following commands:
su
logcat>/ sdcard / logcat .txt

The logcat.txt file will be in the sdcard root.
You can also use this program:
CatLog - Logcat Reader


Message Design Template

[b] Android: [/ b] Here we write the version of android
[b] Version ApkTool: [/ b] Here we write the version ApkTool
[b] Description: [/ b]
Here we write a description of your problem.
[spoiler = Screenshots] If necessary, add screenshots [/ spoiler]
[spoiler = Log] Here, if necessary, leave the log (either files or code) [/ spoiler]

If you do not follow the rules for writing messages, the post will be deleted!


Instructions, useful links



Remember: all that you do - you do at your own peril and risk!
The authors of modifications and the Administration of the forum are not responsible for the performance of your devices!


Important announcement


Topics Curator sasha9182 : profile | QMS


Post has been editedsasha9182 - 12.05.20, 18:00



Rep: (351)
I am currently stuck on the graph. The transition in the gradient is not smooth. Help solve the problem ...
Attached Image

Decision:
And what exactly is getting worse? Gradients (smooth transitions from dark to light) look like a "step"? Ie, there is no most smooth transition - all some sort of torn. So?
If so, then the problem is solved in Photoshop. Open your favorite wallpaper - filter - noise - add noise (values ​​from 0.5 to 1 will be quite enough)

Well, I need your help. I lowered my hands and resigned myself to the fact that our phones are not good friends with gradients. More service.jar needs to be parsed, and classes.dex can be edited there, which I do not know.


Post has been editedDimar - 01.02.16, 10:36
Reason for editing: spoiler + problem solving



Rep: (4404)
Aboutservices.jar and classes.dex look how i did *
And about the gradient itself did not achieve anything sensible.

Attached fileyud-ph4.rar(3.12 MB)


Post has been editedsk0t - 20.08.14, 17:56



Rep: (351)
sk0t,
Thanks, I found it already, and it seems to me that not everything is there. I want to replace the text color on the button, and it is apparently stored in the framework, in the btn_default.xml file. .
The framework does not want to unpack ....

Post has been edited12enie - 28.10.10, 22:35



Rep: (4404)
About xml-files:
in apk they inbinary format.
The easiest way to edit these xml is to decompose apk in the program.apk-tool (translate xml to normal view),
well, and after editing, it will also be compiled (it will translate xml files into a binary form)
or it can be converted to normal format using AXMLPrinter.jar but it does not translate back to binary.



Rep: (351)
sk0t,
Well, for translating applications, this method is relevant, and the framework cannot be disassembled in this way.



Rep: (4404)
I analyzed
as far as I remember with the key-d need to disassemble
(debug mode)
Key Correction-s
Here are the contents of myframework-res.apk \ res \ drawable \btn_default.xml processed by the program apk-tool

xmlns: android = "http://schemas.android.com/apk/res/android">










Post has been editedsk0t - 29.10.10, 00:12



Rep: (367)
sk0t @ 10.29.2010, 01:45*
Key Correction -s

Sorry for not much on the topic, I’m editing LauncherProPlus, everything would be fine here, just the reassembled launcher.xml file in the / res / layout-port / folder doesn’t let the launcher start flying to FC, can you have a solution? I would be very grateful!

Post has been editedDimar - 15.01.16, 20:25
Reason for editing: corrected link



Rep: (4404)
Simple questions:
apk signed?
What has changed in the file?
reassembled means - disassembled using apk-tool, edited, and assembled using apk-tool?

still the default file is infolder where apk / dist was unpackedand is calledout.apk

Post has been editedsk0t - 29.10.10, 16:50



Rep: (367)
sk0t @ 10.29.2010, 16:49*
reassembled means - disassembled with apk-tool, edited, and assembled with apk-tool

Yes
sk0t @ 10.29.2010, 16:49*
What has changed in the file?

I will repeat launcher.xml, it is after editing it and rebuilding the APK with it (maybe a couple more xml-ok, I don’t know) LauncherPro just doesn’t work. The default settings I need are stored there, I would like to change them, but I can’t = (even smali files are being edited.



Rep: (351)
Rang3r
Maybe it's in the encoding? I used to translate one of the first versions, so half of the menu didn’t respond and gave me a fc.
And thanks to the key account, I’m sure I’ve got all the chips in it. I'll check it later. Can you find the line responsible for the color on the button at the same time? :)



Rep: (367)
12enie @ 10.29.2010, 18:20*
Maybe it's in the encoding?

And I also tried it.



Rep: (351)
sk0t @ 10.29.2010, 13:28*
Key Correction -s

I have something all the same one folder smali it turns out. Can you write a complete command?



Rep: (4404)
java -jar apktool.jar d -s file.apk foldername


Attached filetools.zip(1.13 KB)
there are three files in the archive
apktool-d.cmd - transfer to it an apk-file containing classes (classes.dex): parses it into a folder with the same name (phone.apk ->phone)
apktool-d-s.cmd - transfer apk-file to it not containing classes: parses it into a folder with the same name (framework-res.apk ->framework-res)
apktool-b.cmd - you transfer a folder with edited files to it: it collects it in apk with the name out.apk (framework-res ->framework-res / dist / out.apk)
Respectively, apktool.jar should be in the same folder.

2 rangr
Throw off initial apk and that which FK causes

PS2 12enie
open fileframework-res \ res \ values ​​\ styles.xml
looking for something like this there (btn_default)
<style name = "Widget.Button" parent = "@ style / Widget">
<item name = "textAppearance">? textAppearanceSmallInverse</ item>
<item name = "textColor">@ color /primary_text_light </ item>
<item name = "gravity">center</ item>
<item name = "background">@ drawable /btn_default </ item>
<item name = "focusable">true</ item>
<item name = "clickable">true</ item>
</ style>

here you can change to primary_text_dark
then open the fileframework-res \ res \ color \ primary_text_light.xml
<? xml version = "1.0" encoding = "UTF-8"?>
<selector
xmlns: android = "http://schemas.android.com/apk/res/android ">
<item android: state_enabled = "false" android: color = "@ color /bright_foreground_light_disabled " />
 <item android: state_window_focused = "false" android: color = "@ color /bright_foreground_light " />
<item android: state_pressed = "true" android: color = "@ color /bright_foreground_light " />
<item android: state_selected = "true" android: color = "@ color /bright_foreground_light " />
<item android: color = "@ color / bright_foreground_light" />
</ selector>

here you can change to bright_foreground_dark
then open the fileframework-res \ res \ values ​​\ colors.xml
<color name = "bright_foreground_light"># ff000000 </ color>
<color name = "bright_foreground_light_inverse">#ffffffff </ color>
<color name = "bright_foreground_light_disabled">#80000000 </ color>

and here the color is already set
The first two characters - transparency, the remaining six - color in RGB
# ff000000 - ff - opaque, 000000 - black
can be changed in any of the files

Post has been editedsk0t - 29.10.10, 20:35



Rep: (351)
soooo, business went, it remains to pack, I only have a build folder being created. I had it that way when I saved the xml file in the wrong encoding.
I edit the notepad ++, I set the encoding to utf8 (without BOM). But most likely I’m drowning again



Rep: (367)
sk0t , threw in the BOS. You can answer here, maybe someone else will also need an answer: happy:

Post has been editedRang3r - 29.10.10, 20:59



Rep: (4404)
2 rangr
Screenshot
Attached Image

left before right after
red shows different lines and differences
namely backslash - "\" before @
that's why FC
Heredescription of this bugapktool in English
there is also a fixed versionapktool.jar below she too
Attached fileapktool.jar(1.28 MB)


2 12enie
Try to updateapktool

Post has been editedDimar - 15.01.16, 20:45
Reason for editing: Removed the screenshot under the spoiler



Rep: (351)
Apktool.jar collected everything in the apk, but the weight became almost two times smaller. and, accordingly, we are hanging on the bootscreen ....



Rep: (4404)
and dealt with the sameapktool.jar ?



Rep: (351)
sk0t,
I did everything with your file, I reassembled it and reassembled. Somewhere I heard about the fact that this method makes the file weight less. I have the same file weight, but the ones that are slightly smaller before the res folder, but obviously not 3 meters. ? when packing ...



Rep: (4404)
Try to pull out the file that you edited from the new apk
and stuff it into the source one, and this correct source one
Throw on the device


Full version    

Help     rules

Time is now: 11/08/20, 3:50