I'm having some problems with deodexing SystemUI
I have honestly no idea what these bootclasspath-things are.
So I need some help to find the right bootclasspath
When I try:
Code:
baksmali -x SystemUI.odex
it comes that "Error occured while loading boot class path files."
Code:
baksmali -c <what-shall-i-write-here?> -x SystemUI.odex
Bump?
Sent from my GT-I9100 using XDA Premium App
Buuuuuuuuuuuuuuuuuuuuuuump..
specifically I don't know what bootclasspath files are used, but it doesn't matter.
it doesn't matter if you put all the contents from the framework folder into your working directory and then baksmali will "find" them...if they are in the working directory.
all you need to do is
Code:
baksmali -x SystemUI.odex
Related
I'm using official MIUI ROM right now and it's odexed. I want to deodex the framework files so I can add something. Yesterday I tried to deodex all the files in /system/framework/ folder by using command like "baksmali -c my-bootclasspath -x blabla.odex" on all of the .odex files in the folder. After finish deodexing all of them, I adb push to my system/framework/ chmod to 644 and rm all .odex files. After that I rebooted my phone and ended stuck in boot logo.
My questions:
1. Do I have to deodex the entire folder or just deodex the .jar related to bootclasspath?
2. Do I have to use "-c bootclasspath" command to deodex .jar that doesn't depends on bootclasspath like com.android.location.provider.jar?
3. Can I just deodex only my framework.jar and android.policy.jar because I only want to edit those two files?
4. Or I need to deodex the entire ROM included my apps??
Please someone help me, I'm a newbie
Sent from my Galaxy Nexus using Tapatalk 2
For some reason I need to deodex a framework.odex, that is the /system/framework/framework.odex.
Look at this, there are 2 files list in /system/framework/:
[email protected]:~/experiement# adb -d shell ls /system/framework/frame*
/system/framework/framework.odex
/system/framework/framework.jar
using baksmali, I need to specify -d <Dir>, where <DIR> is a dir containing framework.jar etc.
Obviously this is a recursive loop.
So Is it possible to deodex framework.odex?
BTW, below are my commands to deodex a framework.odex, and its output.
[email protected]:~/experiement# baksmali -a 15 -x framework.odex -d .
#make some changes to some file in out dir and smali it
[email protected]:~/experiement# smali -a 15 -x -o framework.odex.m out/
[email protected]:~/experiement# file framework.odex*
framework.odex: Dalvik dex file (optimized for host) version 036
framework.odex.m: Dalvik dex file version 036
It sound that framework.odex is an odex file while framework.odx.m is not an odex file.
So If I push framework.odex.m to /system/framework/framework.odex, the phone will not boot, I believe.
Is there a way to turn out dir to a new framework.odex file and push it to /system/framework/framework.odex, and the phone will boot OK?
whogiawho said:
It sound that framework.odex is an odex file while framework.odx.m is not an odex file.
So If I push framework.odex.m to /system/framework/framework.odex, the phone will not boot, I believe.
Click to expand...
Click to collapse
I bricked my phone that way.
The smali will not create an odex file, its a dex file.
(Yet, the baksmali will actually read an odex, strange enough.)
You should copy the dex as classes.dex one into the original jar (with 7zip).
If you want the odex you need to "dexopt-wrapper" this new jar (with the classes.dex inside).
I dont think you need the odex for your new jar to work, the classes.dex inside the new framework.jar should suffice. As long as you replace the original framework.jar with with your new jar and delete the original framework.odex. (which no longer fits your new framework.jar anyhow)
Creating the new ODEX on top is optional.
In fact I did all that and it still bricked my phone
Hi,
I got myself the android.policy.jar (313bytes) and android.policy.odex (350.584bytes) from the /system/framework.
I then copied the whole /system/framework folder from my P880 for baksmali, also.
I then baksmalied the android.policy.odex with:
java -Xmx512m -jar baksmali.jar -x android.policy.odex -d framework -o output
and resmalied it (this is a test) with:
java -Xmx512m -jar smali.jar output/ -o classes.dex
This all works without an error message.
I end up with the classes.dex (314.716bytes).
Here my trouble begins. I put classes.dex with 7zip and normal compression into the original android.policy.jar (now 143.886bytes)
I removed the ORIGINAL android.policy.odex and android.policy.jar from my phone and copied the new android.policy.jar (143.886bytes) into the their place (/system/framework).
After reboot I am stuck with a bricked phone
To investigate, I then reodexed android.policy.jar with
dexopt-wrapper android.policy.jar new.android.policy.odex /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework2.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/filterfw.jar:/system/framework/com.lge.bluetooth.jar:/system/framework/com.lge.core.jar
which works fine, but my NEW android.policy.odex is not the original 350.584bytes, but 322.368bytes
I added the file signature from the old odex, but the size remains the same.
My questions:
Why did my android.policy.jar (143.886bytes) not work, although I changed none of the coding?
Why did my android.policy.odex (322.368bytes) not have the same size as the original odex in the rom?
I attach these two files for you. Please help me. :crying:
Thank you!
PS: I had to rename the odex to txt, because it cant be attached otherwise.
Hello
I am trying to Deodex my SG4 stoke rom secphone.odex
I read almost all threads here before posting this but still have some errors..
that's the steps I did
1-Pull framework folder from my phone and put it under c:\framework
2-run this command
java -jar baksmali.jar -d C:\framework -x secphone.odex
and it generate the "out" folder..
3- run this command
java -Xmx512m -jar smali.jar out -o classes.dex
and it generates the classes.dex file
4-Open the secphone.apk with 7zip and add the classes.dex on the root..
now when i put the secphone.apk on my phone and set permissions, the phone app always gives error that it stopped and keep poping this error until i restore the original apk..
whats missing me here to have it work?
regards
Hi Romeo,
Did you found a solution? I have the same problem.
Thanks
Me too, same problem.
So I have the latest smali and baksmali jar files from google. I have everything setup correctly. Baksmali and smali are in a folder named smali on my C: directory. SystemUI.odex is also in that file. I also have my entire framework directory from my ROM on the root of my c drive. I'm trying to deodex SystemUI.odex. when I run this command in command prompt : "java -jar baksmali.jar -d C:\framework -x SystemUI.odex" I get an error stating that systemUI.odex is not an apk, dex or odex file....... Any idea what the issue is?
Sent from my Nexus 5 using xda premium