[Q] Help first deodex - Android Q&A, Help & Troubleshooting

Hi guys, i am trying to make my first deodex of android.policy but somehow after deodex and reboot, my samsung i8582 (Grand Quattro) never reboots.
Disassembling android.policy.odex ...
java -Xmx512m -jar baksmali.jar -a 16 -d ../framework -x android.policy.odex
Assembling into classes.dex ...
java -Xmx512m -jar smali.jar -a 16 -o classes.dex out
Found android.policy.jar
Removing android.policy.odex ...
Put classes.dex into android.policy.jar ...
My question is: Do i have to deodex ALL files in /system/framework and /system/apps to make it work ? Or can i have a few files odexed and others deodexed ?

Related

[DEV] Reassembling classes.dex using smali

Guys, I'm editing some files in services.jar. So I extract the classes.dex, which is about 1mb. Using baksmali, I disassemble all the files to the com folder, which ends up being 8-9mb uncompressed. After making my changes, I try reassembling the classes.dex, but my file ends up being 9mb. Even if I insert it into the services.jar, that file is still 4.5mb. Obviously I am unable to boot. Can anyone let me know how to get this to work?
These are the commands I am using.
disassembling:
java -Xmx512m -jar baksmali-1.2.1.jar -o c:\smali classes.dex
and reassembled later:
java -Xmx512m -jar smali-1.2.1.jar -o classes.dex c:\smali
Maybe this should be in development......
eViL D: said:
Guys, I'm editing some files in services.jar. So I extract the classes.dex, which is about 1mb. Using baksmali, I disassemble all the files to the com folder, which ends up being 8-9mb uncompressed. After making my changes, I try reassembling the classes.dex, but my file ends up being 9mb. Even if I insert it into the services.jar, that file is still 4.5mb. Obviously I am unable to boot. Can anyone let me know how to get this to work?
These are the commands I am using.
disassembling:
java -Xmx512m -jar baksmali-1.2.1.jar -o c:\smali classes.dex
and reassembled later:
java -Xmx512m -jar smali-1.2.1.jar -o classes.dex c:\smali
Click to expand...
Click to collapse
The commands I use I got from this post.
Thanks for you answer, I got it figured out.
hmmm how did you get this working? Cause that post just has what you did here...
I'm having the same problem, I just get boot loops after pushing my custom jar file :-/
oops I spoke too soon.. managed to get it working after like 10th or so try lol

[Q] Deodex-ing SystemUI

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

[Q] HELP: android.policy.jar and Smali on LGP880 @V10H

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.

need help deodex secphone.odex

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.

[Q] Decompiled my classes.dex from services.jar, no StatusBarIcon.smali

I pulled /system/framework/services.jar three times now, and extracted the classes.dex. Then decompiled the classes.dex with "java -jar baksmali.jar -o classout/ classes.dex" and navigated to classout/com/android/server. The problem is the dir is missing the "status" folder. I did this with VTS 10, colorchange.jar, and manually .. same result. Thoughts?

Categories

Resources