[Help]Deodexing system/framework - General Questions and Answers

I am using
Android lolipop 5.1
I am new to deodexing .and i have successfully have deodexer my system/app and system/priv-app
But when I tried to deodex my framework
I could only deodex some jar files because only some of them have odes in framework/arm
From my research I found out that test of odex are located in framework/arm/boot.oat
My question is then how will I extract these odex
And even if I extract and recompile these odex
The system will still contain boot.oat so it would neglect
The jars and still will use the odex files contained in boot.oat
So what I want
I want to deodex my framework
I want system to use classes.Dec from jar and not fromboot.oat
I want to modify android.policy.jar but the classes.dex of android.policy.jar is struct I. Boot.oat
Sory for long post
Thanks in advance! !

Related

Odex and repacking

Hi there,
I has disassembled an odex file and changed something. As I understand I can't make it an odex again but I must make a dex file and put this with the filename classes.dex in the apk file.
Can I just put it in the apk file and just sign the package again or do I need first to convert the binary xml files from the apk to normal files and then pack the apk file back?
Thanks

[Q] Modifying .odex file

Is it possible to modify code in a system .odex file without de-odexing?
Here is what I've been trying, without success (Windows computer, Samsung Epic 4G Touch phone, stock ROM with 2.3.6):
On my computer, using Android Commander, I pull a .odex from /system/app to my computer. There is a corresponding .apk, but I leave that alone. I also pull the entire /system/framework folder.
On my computer, from the location containing the framework folder and the .odex file, I run "java -jar baksmali.jar --api-level 10 -d framework -x <FILE_NAME>.odex". This creates an "out" folder, with the com/android/<FILE_NAME> folder structure and the code.
I modify the code (.smali files).
I rename the original .odex file and run "java -jar smali.jar --api-level 10 out/ -o <FILE_NAME>.odex". This creates a new .odex file that, as far as I can tell, should have the updated code in it.
Using Android Commander, I push the new .odex to /system/app on my phone, change the permissions to 644, and reboot the phone.​
The changes aren't having an effect. In fact, the status bar is completely gone (the example I'm working on is a mod to the status bar in SystemUI.odex).
Any idea what I'm doing wrong?
So I'm getting the feeling that it's not possible to edit odexed apks. Is there anyway to de-odex just a single apk rather than the whole rom?
Brent212 said:
So I'm getting the feeling that it's not possible to edit odexed apks. Is there anyway to de-odex just a single apk rather than the whole rom?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=1208320
Basically, no odex can be edited and put back that easy. Wrapping and Signing ODEX style is required.
Awesome! That thread's perfect. I'm hoping I can deodex, mod the code, create a classes.dex file and put it in with the .apk, zipalign it, and just replace the existing .apk and .odex with the new .apk.
That thread (http://forum.xda-developers.com/showthread.php?t=1208320) had the answers I was looking for.
The trick was to either rename the new .odex to classes.dex and put it into the .apk, and zipalign the .apk (although I have a feeling that wasn't actually necessary), or to copy the signature from the old .odex file to the new one.
Brent212 said:
That thread (http://forum.xda-developers.com/showthread.php?t=1208320) had the answers I was looking for.
The trick was to either rename the new .odex to classes.dex and put it into the .apk, and zipalign the .apk (although I have a feeling that wasn't actually necessary), or to copy the signature from the old .odex file to the new one.
Click to expand...
Click to collapse
Odex is not dex. And vice versa. Remember that. When compiling, the result is always dex. To have odex, you need to wrap it with dexopt-wrapper within your phone.
sent from my white ray using XDA App

Proper way to modify framework.jar and android.policy.jar

Hello - I am trying to add 'Reboot' option to Power Menu by modifying the following files - framework-res.apk, framework.jar, and android.policy.jar file. I was successfully able to add additional values to the xml file inside framework-res.apk and was able to merge my changes into the original .apk file and update in /system/framework without any issues. However, the smallest changes I make in framework.jar or android.policy.jar file breaks my system. It does not go into a Reboot Loop, but rather gives a message... Unfortunately, the <app name> has stopped working... or something like that... for almost all the apps and repeatedly.
I am on a Stock ROM of Micromax A110 (Mobistel T2). Do I need to DEODEX these .jar files first or do something else? I can't find the .odex files for these two jar files. I am not sure what I am doing wrong. Please help.
I can see some .odex files in my /system/app folder, but none in /system/framework. Is this normal? I am sure I didn't do any deodexing.

Odex files.

I have a question...
Can i delete odex files manually in /system/app and /system/framework without consequencies ?
Enzo.
No you can't, they form part of the app. You'd have to deodex the ROM or replace the apps with their deodexed versions to remove the odex files without issues
Thanks !
Deodexed rom stock founded, i replace the odex files by the deodex versions.

[Q] stock deodexed help

can somebody point me into the right direction on how I can deodexed stock 4.4.4 on x1039.
thank you.
try Android Kitchen 0.224 - by dsixda (xda-developers.com)
When installed, update baksmali and smali to latest versions. Also priv-app will not be expected. After deodexgin /system/app rename folder to apps2 and rename priv-app to app - then run deodexing again. Afterwards rename folders back to original.

Categories

Resources