Dexopt Wrapper - G1 Q&A, Help & Troubleshooting

I'm sure most of you know that optimization using dexopt wrapper creates an odex file but removes the classes.dex file in the apk. My question is, how do you remove that .odex file and change it back to a classes.dex file? I'm wondering because once I have a classes.dex file I'm going to disassemble it with baksmali see what I can do and figure out. Any help is appreciated, thanks.

alritewhadeva said:
I'm sure most of you know that optimization using dexopt wrapper creates an odex file but removes the classes.dex file in the apk. My question is, how do you remove that .odex file and change it back to a classes.dex file? I'm wondering because once I have a classes.dex file I'm going to disassemble it with baksmali see what I can do and figure out. Any help is appreciated, thanks.
Click to expand...
Click to collapse
dexopt-wrapper does not remove the dex file from the apk, unless we do it different ways, i run dexopt-wrapper ***.apk ***.odex from adb. how do you do it? and anyway, if you used dexopt-wrapper, just get the rom you flashed before doing dexopt-wrapper and you should have the full apks already in there

I'm trying to get a classes.dex file from the Phone.apk from hero builds .As you can see in my signature I'm working on porting the HTC Dialer to cupcake builds. The Phone.apk included in JaCHero2.63 just doesn't have the .dex file ,but it has the .odex file. All apks in that build that are optimized with odex do NOT have a classes.dex file in the original apk file. I'm wondering if it's possible to merge the .odex and the .apk so i can get a workable classes.dex file.

Related

File ARSC

anyone know what the resources.arsc file in APKS do? I'm wondering if i need to edit it

Deodexed?

What does deodex mean?
What is a deodexed rom/kernel?
Sent from my SAMSUNG-SGH-I897 using Tapatalk
Well since no one answered the question
from what i understand its like unzipping it so you can add stuff. Or fix things. But i may be way off here as im still a noob.
Http://lmgtfy.com/?q=What+is+a+deodexed+rom%
Sent from my SAMSUNG-SGH-I897
http://code.google.com/p/smali/wiki/DeodexInstructions
This tells you how to deodex a odex file. Basically an odex file is an optimized file that has device specific information regarding the dependencies of the BOOTCLASSPATH .jar files. They're primarily core.jar, ext.jar, framework.jar, android.policy.jar and services.jar. The process of deodexing is to extract all of that information for the odex file and create a classes.dex to put into the apk associated with the odex file. You have to basically tell the program, baksmali, what .jar files to look at but it takes a bit of research and trial and error to get a classes.dex file generated. You then need to add it to the apk and resign it, which requires yet another program autosign.
This process is not for the impatient or the faint of heart. You can actually do this on your PC with the correct files. Feel free to correct me if I'm wrong, I've just started messing around with deodexing.
Thanks!!!!

[Q] Framework Jar File

I am trying to create a reboot option for my galaxy tablet. I am in the proccess of using smali/baksmali to edit some files...the problem is when I adb pull the framework jar there is no classes file in the zip. The only thing in there is the META-INF obviously and a file called preloaded classes...this is considered just a file, not a class file. Should I not have a .class file?
EDIT-------------------------------------------------
I looked, what I mean is that there is no classes.dex file
Thanks
Found the problem. I am using a stock rom that hasn't been deodexed. I had to use baksmali to deodex the framework.odex file. Of course if you do this you have to have the right bootclasses in the folder or the file will not decompile right, and from what I have read you need that to happen in order to compile it back into a odex file. I should deodex the whole rom, but I am still new at this and don't want to create a boot loop
-Peace

[Q] resources.arsc not include

hi,
well i try it on systemui and framework-res.
With stock apk, i have no prob. decompiling and recompiling.
But if i change for example, an xml file for crt off in framework-res, and then recompile, (with suppressing of resources.arsc in keep folder of course), in the new apk i don't have the resource.arsc file.
i try on smali file too. I don't touch xml (so i let the resource.arsc in keep folder) but i modify a smali file. In the new apk, i have te resource.arcs but not the class.dex.
Anyone know why ? and how to resolve it ?
it happens as soon as i change a file. I am fed up with all of these. Help me please.
Thanks.

[INFO]Editing system files (smali,dex,apks)

NOTE: If you want to edit framework-res.apk or systemui.apk, follow this guide, it's the best available:good:
http://forum.xda-developers.com/showthread.php?t=2086771
Now, lets start
smali, dex....whaaat?
It's simple our odexed ROMs have .apk which use .odex files which contain cache. When the ROM is deodexed the .apk contains classes.dex which now contains information present in the .odex files!:good:
Smali is nothing but disassembled .dex file! The .dex file is disassembled into java code which can be edited via Notepad ++( simple notepad works too)
WHY?
Why do you need to edit classes.dex !
For me, i was trying to make CRT on/off animation which required editing classes.dex in service.jar!
More edits where classes.dex inside services.jar is needed
- Changing status bar clock color
- Changing text color in notification bar
- More? Tell Me!:highfive:
HOW?
Requirements: Java SDK!
I have APK Multi Tool, although it decompiles .apk and .dex files inside the apk, it doesn't provide option to decompile a separate classes.dex!
Still it's best software for decompiling apks and more!
Smali-Me 1.0
Download and Instructions:
http://www.wrapcode.com/android/baksmali-smali-dex-files/
ROM Tools by iamareebjamal - More noob friendly
http://forum.xda-developers.com/showthread.php?t=2163286
Once you have decompiled classes.dex, you'll get various folder with various files. Edit the files required and then recompile!
So after generating new classes.dex, put it back to services.jar by opening the file in winzip!:good:
ONE MORE THING
Make your own flashable zip
The recompiled systemui.apk or framework-res.apk, when pushed via root explorer give lot of force closes. This is normal, however if u wish to avoid it u can create a cwm flashable zip for the same!:good:
I'm attaching the sample.zip here and u can add your files in the specified folders. For more details read the source forum:
http://forum.xda-developers.com/showthread.php?t=1721680
Reserved- for more stuff!
Subscribed.. will see what it is later
Hey, add this to your guide, i far more easier and nice to look at too than smali me
http://forum.xda-developers.com/showthread.php?p=40435351#post40435351

Categories

Resources