Modifying framework.jar file only in Stock ROM. - Android Q&A, Help & Troubleshooting

Good evening folks,
I just grabbed the stock ROM of my phone (Lenovo A6000plus lollipop) and started tweaking in it. Now I have to change the files located inside framework.jar which is in the system folder. I tried dex decompiler and apk tool for grabbing the source from the jar. But I failed to repack them again into a framework.jar file. I found the same source code in the source.google.com's git repo and I downloaded it. Now how can I create the framework.jar file from the source code itself?
The documentation of AOSP is little hard to understand for a newbie like me. Can anyone properly guide me for the same?

Related

[Q] Modify java code in framework.jar

Hey everyone,
My stock rom on my phone has issues with MVNO's (mobile virtual network operator). Basically this means that my data connection only works when Roaming. This is a know issue that has already been fixed on several roms (but not on mine).
To fix this I would like to modify the source of the framework.jar file (`/system/framework/framework.jar`), more specific the file : `/com/android/internal/telephony/gsm/GsmServiceStateTracker.java`
To start I will list the steps I have take to show you where I'm stuck at the momoment:
- I have fully deodexed my stock rom, both the JAR files and the APK files in both /system/framework/ and /system/app
- I have downloaded the deodexed framework.jar file and extracted the classes.dex file from it
- I have decompiled the classes.dex file using baksmali to end up with several *.class files
- I have converted these *.class files to a .jar file using dex2jar
- I have unpacked opened this jar file using jdqui to end up with several *.java files
This is where I'm stuck, I need to figure out how to edit the java file I want and end up with a working framework.jar again that I can upload to my phone.
Am I doing this the wrong way? Any other way to resolve my issue? I hope to get some help from people who have experience in doing this...
Any help would be appreciated!
Bump, anyone?

[Q] decompiling the apk file and extracting all source files

i built an app from online site appyet.com.they only provided me the apk file..can anyone help me to get the source files..i.e menifest.xml and all other related files.
i got the files by opening it in zip format but those files are encrypted..i want the source code in proper format to edit in the sdk tool...if any one can..then do help...

SystemUI.apk compiling error - solved

SystemUI compiling error on stock Android 4.3 roms
This is not actually a fix just a work around to allow the compiling of the SystemUI.apk
The problem is that apktool isn’t decompiling the SystemUI.apk resources.arsc values correctly, download the attached zip and copy the enclosed values-sw720dp folder to your res folder.
This should solve the compiling error but do not replace the newly compiled resources.arsc to you phone as it could cause the SystemUI.apk to crash.
Changes to other xml or png files should work as normal if you are flashing via vrthemeing or similar methods but would suggest that after compiling your SystemUI.apk you extract the files you changed and only flash those files to your phone not the full apk
Thanks for this, it solved my compiling issues instantly.
Thank you very much

[Q] Why people use smali instead of java decompiler to reverse apk files ?

Hi,
I spent 1 month coding an android app, and then I lost the source code in an hdd crash. Well, those things sux, but hopefully I managed to find an old apk build of this app. I was able to recover part of the source code by extracting the classes.dex file, decrypting it with dex2jar, and then opening the decrypted file with java decompiler (jd-gui.exe)... I remained amazed when I saw that my source code was so easy to found...
Now I wonder, why people use smali to reverse apk files instead of dex2jar+jd-gui ??
No one ??

Edit compiled source to create own custom ROM

After a week i finally managed to build a ROM from source. I have in my /out/target/product/angler folder several files incl. the system.img, boot.img etc. etc (see attachments)
But from i have heard i could edit some of those files to build a new ROM from the files which are in that directory. In the early days you had a file there with a tree format of which apps are installed. Editing that file by removing the apps you didn't want anymore resulted in a ROM without those apps. But with the new structure i cant figure out where i need to do that.
Also if someone knows how i can compile from the source in that directory, that would be great. If i would do it with lunch && make it start over again from the original source.
Nobody can help me with this? or am i in the wrong section?

Categories

Resources