How to re-odex? - Motorola Atrix 2

Normally to decompile my dex files I use smali and baksmali, how can I re-odex them?
Id like to get my service.jar re-odexed so I can try and push it to my phone via a zip update.
Sent from my MB865 using xda premium

[mini HOW-TO] Re-Odex (or create a new .odex file)
Fall of Enosis said:
Normally to decompile my dex files I use smali and baksmali, how can I re-odex them?
Id like to get my service.jar re-odexed so I can try and push it to my phone via a zip update.
Sent from my MB865 using xda premium
Click to expand...
Click to collapse
It all needs to be done on your phone, live.. with adb.
Here's how I accomplished it - I will use the services.jar in this example. Just change the file name and path to existing .odex accordingly for other files (not sure if all steps are required exactly, but it has worked for me multiple times with different jars and SysUI apk):
Requirements:
Odexed system
adb
dexopt-wrapper
Put this dexopt-wrapper file (unzip first) in /system/bin with 775 permissions:
X X X
X....X
X....X
Probably a good idea to reboot after pushing that file, if you use root explorer (like I did).
Put the deodexed services.jar (or other jar/apk file you want to make an new odex of) on your sd card.
Go to /system folder (with root explorer or equal) and mount it R/W (not sure if this is necessary - but won't hurt)
Put your USB connection to "Charge only" mode.
Go here (big props and credit to jhotmann for this) and follow steps 8-12 (I've recreated the steps with the A2's bootclasspath below).
The bootclass path is located in the /init.rc file at the root of your phone.
Connect with adb (do a adb devices check to make sure you're all good).
To create the new odex:
Code:
adb shell
su
cd /sdcard/
dexopt-wrapper services.jar new.odex /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar:/system/framework/com.motorola.android.frameworks.jar:/system/framework/com.motorola.android.widget.jar
I know it's a long entry for those who don't work with command lines often (like me), but double check your entry before hitting enter.
To copy the signature from the existing odex (change path to /system/app/.. if necessary):
Code:
busybox dd if=/system/framework/services.odex of=new.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
Done! Rename new.odex (created on your /sdcard) to services.odex since that is your new signed odex file...
You can then get that on your odexed system by your choice of method (adb push, update.zip, root explorer push, etc.. - note: please know what you are doing before trying to push files with root explorer! - you cannot simply copy and paste!)
Or, if you want to deodex it right away again for some odd reason like I did (personal issues )... Take the services.jar and the new services.odex from your sdcard and put them on your computer - and open the services.jar with 7-zip (maybe winzip) and delete the classes.dex file from the 7-zip window. Now you have a fresh new set of .jar/.odex files ready for deodexing (I did this all with the SystemUI.apk last night, that's why I elaborated and re-typed this whole thing today..).

Frigging brilliant man.
Much appreciated. I'm super sick and my USB cable is at work.
Once i get it back on Wednesday, I'll work all this out. If I could thank you twice I would.
Thanks man!
Sent from my MB865 using xda premium

Fall of Enosis said:
Frigging brilliant man.
Much appreciated. I'm super sick and my USB cable is at work.
Once i get it back on Wednesday, I'll work all this out. If I could thank you twice I would.
Thanks man!
Sent from my MB865 using xda premium
Click to expand...
Click to collapse
Not a prob.
And, I updated the dexopt-wrapper link so it's easier to download - just unzip it first..
Good luck on your quest.. let me know if you catch any snags along the way - and i'll try and help you out.
Sent from my mind using XDA

Ok sooo, I think we (or most likely me) are confused on what I wanted to do. I don't want to make a NEW odex file. I need to recombine my modded classes.dex BACK with the service.jar.
Since I needed to modify some script in the services.jar I had to de-odex it so I had a classes.dex file to use baksmali with so I could modify it. Once I modded it I used smali to create the NEW MODDED classes.dex. And now I need to re-odex(bad terminology?) them to re-combine the services.jar with the classes.dex so the modded services.jar could be used on a odexed ROM.
I'm working on a de-odexed version also, but I'd like to be able to offer both

Fall of Enosis said:
Ok sooo, I think we (or most likely me) are confused on what I wanted to do. I don't want to make a NEW odex file. I need to recombine my modded classes.dex BACK with the service.jar.
Since I needed to modify some script in the services.jar I had to de-odex it so I had a classes.dex file to use baksmali with so I could modify it. Once I modded it I used smali to create the NEW MODDED classes.dex. And now I need to re-odex(bad terminology?) them to re-combine the services.jar with the classes.dex so the modded services.jar could be used on a odexed ROM.
I'm working on a de-odexed version also, but I'd like to be able to offer both
Click to expand...
Click to collapse
So, you have a deodexed services.jar (with an unedited classes.dex inside)? And, you also have an edited classes.dex (the new modded one). Just drag and drop the new modded classes.dex into the services.jar file with 7-zip to overwrite the old one.
Then I would check out the mods on a deodexed system, and provided they work, then go through the re-odexing process (separating that classes.dex from the apk and creating a new odex file) as described above to get it working on odexed systems.
Hope that helps.. Good luck!

Yes sir, you are correct. That was the first thing I tried to do was just drag and drop the modded classes.dex with 7zip, save it, however when i tried to flash the "modded" ROM it can't install the system folder because (according to Jim), when I modded copied the new classes.dex, I changed the size, and so the signature needed to be changed as well. They mismatched.

Fall of Enosis said:
Yes sir, you are correct. That was the first thing I tried to do was just drag and drop the modded classes.dex with 7zip, save it, however when i tried to flash the "modded" ROM it can't install the system folder because (according to Jim), when I modded copied the new classes.dex, I changed the size, and so the signature needed to be changed as well. They mismatched.
Click to expand...
Click to collapse
Not sure about the details of that.. I know the signatures can be tricky, but I've modded a few apks/jars similarly with no problems... when you say "can't install.." is that it wouldn't flash in recovery, or you bootlooped?

Just wouldn't flash at all.
And thanks for all your help man.
Sent from my MB865 using xda premium

I've updated the 2nd post with more detail on creating a new odex file...
Not to be a "rooster" (replace with your word of choice) or anything, but maybe this info has a place somewhere besides the general threads..?:angel: (and what is up with these new Smilies and posting reply layout?) - it just seems so hard to come by good literature on this process (which, I suppose, is a process so rarely needed though...)

So I need to perform the processes above while running in an odexed environment correct? Does this process change the deodexed APK we are running the script on to an odexed one as well as create a new .odex file for that APK? I am just confused about what the result is after running the script. For my situation I want to take 2 deodexed files (systemui and sec settings.apk) and odex them. Then push them into an odexed rom. Once I run the script above what am I left with?

Didact74 said:
So I need to perform the processes above while running in an odexed environment correct?
YES.
Does this process change the deodexed APK we are running the script on to an odexed one as well as create a new .odex file for that APK?
(Yes, it will create a new odex file that you will need to rename, but..)NO. You will need to take the classes.dex out of the deodexed apk/jar - use something like 7-zip. Unless you only edited smali, then you really only need the new odex file.
I am just confused about what the result is after running the script. For my situation I want to take 2 deodexed files (systemui and sec settings.apk) and odex them. Then push them into an odexed rom. Once I run the script above what am I left with?
Click to expand...
Click to collapse
I broke up your quote with my best answers...
As for what your're left with is a new.odex file, properly signed, if all goes well. You are going to need to do it for each of your deodexed files.
Rename them, remove the classes.dex from the deodexed files you used, and get them on your phone however you choose (I prefer zip packages and a restore.zip in case something goes wrong).
Also note that the bootclass path is different from GB to ICS.. and among different devices of course. Check init.rc file if need be. I posted the one to use for A2 ICS (think it may be the same for razr too) here: http://forum.xda-developers.com/showthread.php?t=1753659
I can't garuntee you won't have problems, but good luck... if you do you could try the dexopt-wrapper from here: http://forum.xda-developers.com/showthread.php?t=1645950 - just unzip it first obviously (but I think it's the exact same file though..)
Btw, it's all done with adb, one line at a time.. not really a script, but thank you for the idea - maybe a batch file?
Sent from my phone's mind

Great, thank you for the detailed response. Last question.
What if I have the original SystenUI.odex and SecSettings.odex files that used to be attributed to them before i deodexed them? Can I simply reuse those without having to run through the adb process?
Thanks,

Didact74 said:
Great, thank you for the detailed response. Last question.
What if I have the original SystenUI.odex and SecSettings.odex files that used to be attributed to them before i deodexed them? Can I simply reuse those without having to run through the adb process?
Thanks,
Click to expand...
Click to collapse
But, you deodexed them to edit the smali files in the classes.dex right? So, no, you will need to use the new odex files that are created from the modded deodexed files you used..
If you never edited any of the smali files, then you didn't need to deodex in the first place... you only need to deodex in order to mod the smali files - everything else in the apk can be modded as is on odexed systems.
Sent from my phone's mind

Thank you very much. Can you repost the wrapper file? Its not downloading correctly.

Didact74 said:
Thank you very much. Can you repost the wrapper file? Its not downloading correctly.
Click to expand...
Click to collapse
Updated the link in Post #2 with a zip file - you need to unzip it first then move it.

Thank you.
So I am getting an error trying to re-odex. See the attached image of the error.
Weird thing is that even though I get an error it still creates the new.odex file. I triedto go through the entire process even though I was getting errors and it just got stuck on the boot screen and never loaded. Anything in my error attached raise any flags?
Thanks,

Didact74 said:
Thank you.
So I am getting an error trying to re-odex. See the attached image of the error.
Weird thing is that even though I get an error it still creates the new.odex file. I triedto go through the entire process even though I was getting errors and it just got stuck on the boot screen and never loaded. Anything in my error attached raise any flags?
Thanks,
Click to expand...
Click to collapse
Hmmm... First thing I can think of is: are all of those framework files in the bootclass path that you used actually in your /framework folder? With our A2, in ICS there are a few extra .jar files listed that were not actually on our phone, so I had to remove those from the path...
I will try to make a new odex myself and make sure that's not a standard error message... @Fall of Enosis, you recall what it spits out?
EDIT: Shoot - forgot I'm deodexed right now... will attempt later or hear back from Fall by then..

alteredlikeness said:
Hmmm... First thing I can think of is: are all of those framework files in the bootclass path that you used actually in your /framework folder? With our A2, in ICS there are a few extra .jar files listed that were not actually on our phone, so I had to remove those from the path...
I will try to make a new odex myself and make sure that's not a standard error message... @Fall of Enosis, you recall what it spits out?
EDIT: Shoot - forgot I'm deodexed right now... will attempt later or hear back from Fall by then..
Click to expand...
Click to collapse
Yes, all .jar files listed in my bootclass were located in the framework directory.

Nevermind...my mistake. I had an issue with my files not being deodexed correctly from the start. I went back and deodexed, made the edits to res and smali then odexed using the method above again and all went well!
Thanks!

Related

Creating a new theme, but how to create a usable update.zip (or other easy methods)

I started a theme the other day, and I'm moving through the files pretty quickly but without context it's hard to know which graphic is which. So I want to flash or apply the current work I'm doing so I can see where things are and how they look.
Right now I'm working through a deodexed version of Froyo so all the files should be in order. Assuming that I strip out all files but the graphics, how do I create a update.zip for it or use any other method? I'm new to Android so any help would be appreciated.
I'm guessing you already have the sdk installed?
chocmatic said:
I'm guessing you already have the sdk installed?
Click to expand...
Click to collapse
Yup. SDK + Eclipse.
Emulator? no?
you can either figure out how to make them Metamorph compatible (sorry, can't give you advice on that, never done it)
Or you can put the images in the correct folder of whatever .apk they go in and make a flashable update.zip, basically replacing the existing .apk's with the full complete modded ones.
You'll need to put all the modded .apk's into a file structure that mimicks where they would be on the phone and zip that structure up with an update_script and sign the update.zip.
I would highly recommend you unzip some small flashable .zip and poke around in it to see the structure and look at the update_script.
This is a download link to a transparent tray mod I did. It replaces ONE .png but because I chose to make it a flashable .zip it requires replacing the framework-res.apk. Except for the actual .apk's you'll need to put in it, this .zip would be perfectly suitable to use as a base for your mods (and you're welcome to use it). If you did use it you would put your .apk's in the system/framework folder, delete the 3 cert files in the META folder, zip the system and META folders into "update.zip" and sign it using an autosign script.
fire away with any questions
ps, you don't need eclipse or the sdk for any of this but you will need an auto-sign script which is one of the tools in Avabox
AFAIK you couldnt use the emulator in the SDK to preview this stuff anyways because you can't get Sense running on the emulator, not to mention the emulator runs SOOOOO SLOOOOWWWWW. Even if you could get Sense running on the em I would bet you would spend less time making a nand, flashing your mods, checking them out and restoring your nand if you didn't like them than using an emulator to preview this stuff.
Award Tour said:
Yup. SDK + Eclipse.
Click to expand...
Click to collapse
Download the attached file and save folder in your tools directory. Then look at sign.txt to sign files
chocmatic said:
Download the attached file and save folder in your tools directory. Then look at sign.txt to sign files
Click to expand...
Click to collapse
Nothings attached.
nebenezer said:
you can either figure out how to make them Metamorph compatible (sorry, can't give you advice on that, never done it)
Or you can put the images in the correct folder of whatever .apk they go in and make a flashable update.zip, basically replacing the existing .apk's with the full complete modded ones.
You'll need to put all the modded .apk's into a file structure that mimicks where they would be on the phone and zip that structure up with an update_script and sign the update.zip.
I would highly recommend you unzip some small flashable .zip and poke around in it to see the structure and look at the update_script.
This is a download link to a transparent tray mod I did. It replaces ONE .png but because I chose to make it a flashable .zip it requires replacing the framework-res.apk. Except for the actual .apk's you'll need to put in it, this .zip would be perfectly suitable to use as a base for your mods (and you're welcome to use it). If you did use it you would put your .apk's in the system/framework folder, delete the 3 cert files in the META folder, zip the system and META folders into "update.zip" and sign it using an autosign script.
fire away with any questions
ps, you don't need eclipse or the sdk for any of this but you will need an auto-sign script which is one of the tools in Avabox
AFAIK you couldnt use the emulator in the SDK to preview this stuff anyways because you can't get Sense running on the emulator, not to mention the emulator runs SOOOOO SLOOOOWWWWW. Even if you could get Sense running on the em I would bet you would spend less time making a nand, flashing your mods, checking them out and restoring your nand if you didn't like them than using an emulator to preview this stuff.
Click to expand...
Click to collapse
Thanks a lot. Seeing the file, it makes sense. In your simple example you modded the framework res APK -- did you have to sign that single APK or was it taken care of when you signed the update.zip? I've modded some apps already and I know that with single APKs you have to sign them so it can be installable again. Don't know if that is needed once you sign the update.zip.
BTW, I can't wait to release this theme. It makes Sense look substantially better.
Award Tour said:
Thanks a lot. Seeing the file, it makes sense. In your simple example you modded the framework res APK -- did you have to sign that single APK or was it taken care of when you signed the update.zip? I've modded some apps already and I know that with single APKs you have to sign them so it can be installable again. Don't know if that is needed once you sign the update.zip.
BTW, I can't wait to release this theme. It makes Sense look substantially better.
Click to expand...
Click to collapse
Actually signing the .apk's is not necessary. If all you're doing is swapping out images just open the .apk's archinve with 7zip (or similar program) and drop the new .png's into the correct folder (almost always res/drawable-hdpi)
Signing the .zip makes it flashable, the .apk is usable whether you sign it into a .zip or not. Actually when you're testing stuff out I find it's much quicker to just push the modified .apk to the phone via usb, I don't make a flashable .zip until it's ready for sharing
If you push a framework file to the phone ADB REBOOT immediately.
Also, don't be surprised if some of your wallpaper gets reset to stock and your google account gets wiped out after reboot, comes with the territory
nebenezer said:
Actually signing the .apk's is not necessary. If all you're doing is swapping out images just open the .apk's archinve with 7zip (or similar program) and drop the new .png's into the correct folder (almost always res/drawable-hdpi)
Signing the .zip makes it flashable, the .apk is usable whether you sign it into a .zip or not. Actually when you're testing stuff out I find it's much quicker to just push the modified .apk to the phone via usb, I don't make a flashable .zip until it's ready for sharing
If you push a framework file to the phone ADB REBOOT immediately.
Also, don't be surprised if some of your wallpaper gets reset to stock and your google account gets wiped out after reboot, comes with the territory
Click to expand...
Click to collapse
Oh okay, I think I'd prefer using ADB too. What command would I use to push the files?
Award Tour said:
Oh okay, I think I'd prefer using ADB too. What command would I use to push the files?
Click to expand...
Click to collapse
this:
Code:
adb remount
adb pull /system/framework/framework-res.apk c:\
then I make my changes to the .apk and:
Code:
adb push c:\framework-res.apk /system/framework
adb reboot
nebenezer said:
this:
Code:
adb remount
adb pull /system/framework/framework-res.apk c:\
then I make my changes to the .apk and:
Code:
adb push c:\framework-res.apk /system/framework
adb reboot
Click to expand...
Click to collapse
Cool, just so it's clear, and I'm sorry to bug, but I'd have to pull (remove I guess)
the file before pushing the new one in?
Award Tour said:
Cool, just so it's clear, and I'm sorry to bug, but I'd have to pull (remove I guess)
the file before pushing the new one in?
Click to expand...
Click to collapse
meh, you can use another compatable copy. I always just pull it first for 2 reasons: 1) I know its the one I'm using at the moment and 2) if you're gonna be using adb it's just convenient to have it right on c:\, less typing
Award Tour said:
Oh okay, I think I'd prefer using ADB too. What command would I use to push the files?
Click to expand...
Click to collapse
adb push <filename> </target dir/targetfilename>
Read this guide, very informative on ADB
SteelH said:
Nothings attached.
Click to expand...
Click to collapse
oops my bad...it's attached now
nebenezer said:
you can either figure out how to make them Metamorph compatible (sorry, can't give you advice on that, never done it)
Or you can put the images in the correct folder of whatever .apk they go in and make a flashable update.zip, basically replacing the existing .apk's with the full complete modded ones.
You'll need to put all the modded .apk's into a file structure that mimicks where they would be on the phone and zip that structure up with an update_script and sign the update.zip.
I would highly recommend you unzip some small flashable .zip and poke around in it to see the structure and look at the update_script.
This is a download link to a transparent tray mod I did. It replaces ONE .png but because I chose to make it a flashable .zip it requires replacing the framework-res.apk. Except for the actual .apk's you'll need to put in it, this .zip would be perfectly suitable to use as a base for your mods (and you're welcome to use it). If you did use it you would put your .apk's in the system/framework folder, delete the 3 cert files in the META folder, zip the system and META folders into "update.zip" and sign it using an autosign script.
fire away with any questions
ps, you don't need eclipse or the sdk for any of this but you will need an auto-sign script which is one of the tools in Avabox
AFAIK you couldnt use the emulator in the SDK to preview this stuff anyways because you can't get Sense running on the emulator, not to mention the emulator runs SOOOOO SLOOOOWWWWW. Even if you could get Sense running on the em I would bet you would spend less time making a nand, flashing your mods, checking them out and restoring your nand if you didn't like them than using an emulator to preview this stuff.
Click to expand...
Click to collapse
This was very helpful to me as well; thanks!
Actually I just thought of a question. After you sign the file and it becomes update_signed.zip can you rename it to something else like BlahBlah.zip and have it still flash properly?
Tried twice and it failed. It would create to Meta files and not find the update script. Followed the directions but that still happened; any advice?

[Q] I want to make a theme...

But I don't exactly know how to get there.
I'm runing Wolfbreak's CM ROM V055, afraid to go to V06 because it might break my kernel install(still getting info on just what to do)
What I'm wanting is:
The status/pulldown bars(all icons except Wifi, and I want to keep Cyanogen 6's default slidey bar[the thing that ends up at the bottom]), and the animations from the theme used in SEMPITERNAL's Eternity 2 Build 0003a ROM. That will have to be ported to FroYo, I'm afraid(unless my theory at the bottom of this post will work).
I want the menu from LUCID-X10 by SicNside, with the black BG and white elements, but the png forthat i guess I'll have to negative a white hdpi one.
That's about it, the rest i want from arc theme which is default on my current ROM, including tickboxes, those arrows inside circles, the menu icons, etc.
My theory to sort of make this is to get the two involved APK's(default in CM and default in Eternity) onto my computer, and make them ZIP's. Then i can extract the drawable-hdpi folders from each and paste what I want from Eternity into Arc. Then I can replace the drawable-hdpi folder in the Arc framework file, and zip it at store.
That's where I stop knowing what I'm doing. Searching has not found me a guide on just how to make a framework-res.apk, nor even really making a theme altogether. All i can find is about xml files, resources, never anything about actually making the apk correctly.
Help, please?
I am stuck at the same point as you, I have no idea where to go from here :S
Anyone? I'm sure the two of us aren't the only ones...
Here's a zip of what I want. All I did was:
Took the framework-res.apk from the ETERNITY Rom and from the CM ROM, and pasted the png's i wanted from Eternity into drawable-hdpi-v4 in CM framework. Now, can someone make this work, please?
Its quite easy.
Just select the images you want to change.
Then open the framework-res.apk of your ROM with winrar or 7zip your choice.
Without extracting the files drag and drop the files to the winrar window in the right place. If you want to change images in drawable-hdpi migrate to res/drawable-hdpi and drag and drop images there.
Now close the archive and type this:
Code:
adb push <path to modified framework> /sdcard/framework-res.apk
adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
adb shell dd if=/sdcard/framework-res.apk of=/system/framework/framework-res.apk
Make sure you take a backup with xrecovery before doing this. If you do something wrong you may end up in a bootloop. In that case just restore from backup and try again!
realunited123 said:
Its quite easy.
Just select the images you want to change.
Then open the framework-res.apk of your ROM with winrar or 7zip your choice.
Without extracting the files drag and drop the files to the winrar window in the right place. If you want to change images in drawable-hdpi migrate to res/drawable-hdpi and drag and drop images there.
Now close the archive and type this:
Code:
adb push <path to modified framework> /sdcard/framework-res.apk
adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
adb shell dd if=/sdcard/framework-res.apk of=/system/framework/framework-res.apk
Make sure you take a backup with xrecovery before doing this. If you do something wrong you may end up in a bootloop. In that case just restore from backup and try again!
Click to expand...
Click to collapse
Grr, sorry but right now all my failure is just making that less clear. Type that where? Drag the files to the winrar/7zip window? Isn't that where i dont want them?
Ive followed all the different sets of instructions including yours on this forum as closely as i can make sense of them and always end up with a stream of FC's and reboot loops.
EDIT: does it only work on the stock kernel? I'm running Trip's kernel. I just pulled the framework apk then pushed that same apk back and it's still doing it.
EDIT 2: ok no stock kernel and its still doing it WHY THE HELL IS IT DOING THIS?!?!? I FLASHED THE SAME DAMN STOCK FRAMEWORK!
ok if i got the modded framework apk to my sdcard and used root explorer to paste it in, should that work? This laptop might be what's causing it
I have posted few tips here n there when ever people ask about it.
Check this for overall requirements
For your requirement, skip the optimization part out and just do image swap.
Like realunited123 said, dont extract, just open from 7zip, I use Win RAR and drag and drop the new image to the correct folder.
You need to remember few things here, check images name matches against old to new. Other important thing is resolution. you might get in to trouble if you take mpdi and put it to hdpi.
after updating the framwork I made a small template for you guys to play with.
Download attaches zip file open and go to
Framewrok-SJ.zip\system\framework folder and drag and drop the modified framework-res.apk
Dont try to install the attached file. its only a template for you guys to start working on....
After drag and drop you will see zip file size increased.
Simply copy to SD card and install via Xrecovery
You can try any framework to install like this without adb stuff
Remember to make a backup... because you will definitely screwup... we all have...... LOL
Realorasz said:
ok if i got the modded framework apk to my sdcard and used root explorer to paste it in, should that work? This laptop might be what's causing it
Click to expand...
Click to collapse
Well my friend if you have already did this. it will be your first screwup
Dont use root explorer or titanium for this work. Read this post I mention yesterday.......
Shiwantha said:
I have posted few tips here n there when ever people ask about it.
Check this for overall requirements
For your requirement, skip the optimization part out and just do image swap.
Like realunited123 said, dont extract, just open from 7zip, I use Win RAR and drag and drop the new image to the correct folder.
You need to remember few things here, check images name matches against old to new. Other impotent thing is resolution. you might get in to trouble if you take mpdi and put it to hdpi.
after updating the framwork I made a small template for you guys to play with.
Download attaches zip file open and go to
Framewrok-SJ.zip\system\framework folder and drag and drop the modified framework-res.apk
Dont try to install the attached file. its only a template for you guys to start working on....
After drag and drop you will see zip file size increased.
Simply copy to SD card and install via Xrecovery
You can try any framework to install like this without adb stuff
Remember to make a backup... because you will definitely screwup... we all have...... LOL
Well my friend if you have already did this. it will be your first screwup
Dont use root explorer or titanium for this work. Read this post I mention yesterday.......
Click to expand...
Click to collapse
Well i did try swapping mine with the framework apk in the froshed zip. I'll try it with yours though.
Shiwantha said:
I have posted few tips here n there when ever people ask about it.
Check this for overall requirements
For your requirement, skip the optimization part out and just do image swap.
Like realunited123 said, dont extract, just open from 7zip, I use Win RAR and drag and drop the new image to the correct folder.
You need to remember few things here, check images name matches against old to new. Other impotent thing is resolution. you might get in to trouble if you take mpdi and put it to hdpi.
after updating the framwork I made a small template for you guys to play with.
Download attaches zip file open and go to
Framewrok-SJ.zip\system\framework folder and drag and drop the modified framework-res.apk
Dont try to install the attached file. its only a template for you guys to start working on....
After drag and drop you will see zip file size increased.
Simply copy to SD card and install via Xrecovery
You can try any framework to install like this without adb stuff
Remember to make a backup... because you will definitely screwup... we all have...... LOL
Well my friend if you have already did this. it will be your first screwup
Dont use root explorer or titanium for this work. Read this post I mention yesterday.......
Click to expand...
Click to collapse
Is it just me is are you a savior!! Thanks, it's working now!!!!
Hey, by the way, can you teach me how i can make an xrec zip of a dialer mod I made? I want to post it on the CM 6 thread so people can like actualy install it but the only way i currently have for that is adb(which works on apps, but not themes...)
And one more thing, Is any sort of file transfer possible with ADB, or will i have to stick with WiFi File Explorer?
Realorasz said:
Is it just me is are you a savior!! Thanks, it's working now!!!!
Hey, by the way, can you teach me how i can make an xrec zip of a dialer mod I made? I want to post it on the CM 6 thread so people can like actualy install it but the only way i currently have for that is adb(which works on apps, but not themes...)
And one more thing, Is any sort of file transfer possible with ADB, or will i have to stick with WiFi File Explorer?
Click to expand...
Click to collapse
Thats good news.. one less problem to deal with....
create a folder call app on your pc and drag it to system folder in the zip file.
So you should have framework and app folders inside of it.
then copy Phone.apk & Contacts.apk and try to install via xrecovery.
there is a chance you might not be able to install as my initial signing of Zip file dosent included app folder and so MANIFEST.MF & CERT.SF dont have reference. on the other hand during installation Xrecovery dont check
key signature.
I didnt test this way so try, no harm will come to your phone.
Dont know about wifi explorer much. Im testing with adb generally. only final version im publishing in xrec.
Can you teach me how to make that meta inf stuff?
Sent from my X10a using XDA Premium App
Realorasz said:
Can you teach me how to make that meta inf stuff?
Sent from my X10a using XDA Premium App
Click to expand...
Click to collapse
You cannot, after putting stuff, need to sign by app sign tool or there are alternative called APK manager... search its on XDA i think........
I'm not getting it. The update script ange all that forxrecovery...?
Sent from my X10a using XDA Premium App
Realorasz said:
Can you teach me how to make that meta inf stuff?
Sent from my X10a using XDA Premium App
Click to expand...
Click to collapse
In META-INF create \com\google\android folders for update-script file.
Make update-script a text file containing the following
Code:
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.1 10
Be sure to add an extra blank line after "show_progress 0.1 10"
Compress META-INF and system folders to a zip, then move to your sd and sign with signAPKtic which is a free app in the market. Use "test keys" to sign. (signAPKtic is easiest to me,or you can use 1 of the methods Shiwantha suggested to sign)
I would also suggest zipaligning your apks before adding them to optimize your phone's performance when accessing them. Search zipalign on XDA and you'll find what you need...
*Edit- Also, X10 Mod Tool is great for pushing/pulling apks via adb without all the typing. I use it a LOT when testing different pieces of themes.
AyDee said:
In META-INF create \com\google\android folders for update-script file.
Make update-script a text file containing the following
Code:
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.1 10
Be sure to add an extra blank line after "show_progress 0.1 10"
Compress META-INF and system folders to a zip, then move to your sd and sign with signAPKtic which is a free app in the market. Use "test keys" to sign. (signAPKtic is easiest to me,or you can use 1 of the methods Shiwantha suggested to sign)
I would also suggest zipaligning your apks before adding them to optimize your phone's performance when accessing them. Search zipalign on XDA and you'll find what you need...
*Edit- Also, X10 Mod Tool is great for pushing/pulling apks via adb without all the typing. I use it a LOT when testing different pieces of themes.
Click to expand...
Click to collapse
I think adb mask controller can do it in the zipalign tab> zipalign /system/app button.
And what format does the text file need to be in?
Signapktic is either telling me the zip doesnt exist or gives me an unzp error... and I supposed to me signing the apk's or the zip?
EDIT: I think I got it. Zip signer instead of signapktic. Let's see what my phone does.
Ok it looks like it worked.
Make sure there are no spaces in the zip's name. Looks like you got it!
Sent from my X10a using XDA App
AyDee said:
Make sure there are no spaces in the zip's name. Looks like you got it!
Sent from my X10a using XDA App
Click to expand...
Click to collapse
So does that mean it worked for you?
EDIT: Oh, I'm stupid, I didn't even post it. Can you test it please?
It looks like it's signed already. Are you asking me to test the app or signature?
Sent from my X10a using XDA App

Themeing and CWM FLashable File

Hey guys/girls. I'm creating a theme for Andromeda 3 and one thing I cannot fifure out is how to make my theme CWM flashable to test it.
I opened the zip from a different flashable theme, replaced the framework-res.apk and twframework-res.apk with the modified ones from Andromeda and repackaged them using Winrar. I have followed the guides to resign the APK's and ZIP but no mater what I do, after a reboot I get a solid black screen and the phone vibrates.
Im not sure what I am doing wrong because I thought that was all that went into creating a CWM file.
Thanks in advance......
7 posts under this one
http://forum.xda-developers.com/showthread.php?t=1037842
the meta info is alot more specific than just swap any other files...
Thanks, I found that one about 5 mins ago but couldn't seem to find it when I searched the forum before posting. Must have missed it
Should also point out that if you're decompiling the framework apks with apktool, modifying any of the xml's or code, and recompiling, you'll need to sign the resulting apk or you'll end up with a boot loop.
modest_mandroid said:
Should also point out that if you're decompiling the framework apks with apktool, modifying any of the xml's or code, and recompiling, you'll need to sign the resulting apk or you'll end up with a boot loop.
Click to expand...
Click to collapse
Actually, I'm just opening the apk's with winrar. I make the changes to the folders/files and rezip them with Winrar with Store mode (no compression?) Then I resign them with testsign.jar.
I have read the themeing guides but they are really lacking in the small details dept.
modest_mandroid said:
Should also point out that if you're decompiling the framework apks with apktool, modifying any of the xml's or code, and recompiling, you'll need to sign the resulting apk or you'll end up with a boot loop.
Click to expand...
Click to collapse
Wrong.
Never resign system apks such as framework-res or twframework-res. His problem has nothing to do with the signature.
If you are simply copying over files inside the apk and getting this error, then you are adding more files than was originally inside the apk. I repeat, DO NOT ADD FILES THAT ARE NOT ALREADY INSIDE UNLESS YOU KNOW HOW TO RE-COMPILE THE RESOURCES.ASRC!
Also, use 7-zip to edit apks when you just want to overwrite files. Never unzip, or re-zip. Just right-click > 7-zip > Open Archive > Drag and drop files > close the window > you're done
Edit: Also, this goes in Q&A not General.
ryude said:
Wrong.
Never resign system apks such as framework-res or twframework-res. His problem has nothing to do with the signature.
If you are simply copying over files inside the apk and getting this error, then you are adding more files than was originally inside the apk. I repeat, DO NOT ADD FILES THAT ARE NOT ALREADY INSIDE UNLESS YOU KNOW HOW TO RE-COMPILE THE RESOURCES.ASRC!
Also, use 7-zip to edit apks when you just want to overwrite files. Never unzip, or re-zip. Just right-click > 7-zip > Open Archive > Drag and drop files > close the window > you're done
Edit: Also, this goes in Q&A not General.
Click to expand...
Click to collapse
Ok, thanks man.
Will I need to resign the final theme.zip before flashing it?
Also, can't I just grab the updater-script from another theme.zip and us it in my mine?
ryude said:
Wrong.
Never resign system apks such as framework-res or twframework-res. His problem has nothing to do with the signature.
Click to expand...
Click to collapse
I didn't say anything about resigning? Apktool creates an entirely new, unsigned apk, which unless I'm extremely mistaken you'll need to use if you intend to modify certain resources.
modest_mandroid said:
I didn't say anything about resigning? Apktool creates an entirely new, unsigned apk, which unless I'm extremely mistaken you'll need to use if you intend to modify certain resources.
Click to expand...
Click to collapse
He doesn't need to use apktool, because he isn't edited any code.
timbrendelaz said:
Ok, thanks man.
Will I need to resign the final theme.zip before flashing it?
Also, can't I just grab the updater-script from another theme.zip and us it in my mine?
Click to expand...
Click to collapse
No, you don't have to sign CWM zips because Clockwork doesn't check for a signature.
You could use another updater-script, but the problem with that is if it tries to perform an action on a file or folder that isn't inside your zip it will crash while flashing. You'll be left with a bricked phone and have to ODIN back to restore.
ryude said:
He doesn't need to use apktool, because he isn't edited any code.
Click to expand...
Click to collapse
But what if he is lol? Cause that's what im trying to do and having some issues. Know of a good thread on this? Editing xml that is
Sent from my SGH-T959 using XDA Premium App
TXLunchbox said:
But what if he is lol? Cause that's what im trying to do and having some issues. Know of a good thread on this? Editing xml that is
Sent from my SGH-T959 using XDA Premium App
Click to expand...
Click to collapse
If you're editing code, I recommend using apk manager since it will automatically recompile the resources.asrc for you. Just make sure to downgrade the apktool that comes with it to 1.3.1, 1.3.2 is known to cause problems with xml edits.
1. Set new project apk.
2. Decompile apk, if it's a system apk use the option for dependency apk and use twframework-res.apk as the dependency apk.
3. Edit your xml files.
4. Recompile, when asked use yes twice. It will tell you to delete files in the Keep folder.
5. Delete the resources.asrc if you edited any xml/added new files. Delete the files that you added/edited.
6. Once you're done it will automatically copy over the signature and use the compression that you set (default level 9, I recommend level 0).
Don't worry that it says "unsignedFramework-res.apk", it will work since it's a system apk because system apk signatures get copied over to the new file. Just rename it to Framework-res.apk or whatever you need it to be called.
ryude said:
He doesn't need to use apktool, because he isn't edited any code.
Click to expand...
Click to collapse
Hence the 'if' in my original statement, you know, 'if' he ever chose to in the future.

[Q] Services.jar changes, even simply deodexing the file prevents phone from booting

I am trying to make a minor change to my services.jar and so far have no been successful.
I deodexed the file with xultimate2.3.3 , extracted the classes.dex with 7zip 9.2, I used apktool 1.4.3 to "expand" the contents, made the change, repacked the dex file and put it back into services.jar and the phone cannot compelete boot. I made sure to change the permissions, owner a group to match the previous file.
I then tried using Xultimate to deodex the file and put it back on the phone and this also keeps it from booting.
I then tried using the already deodexed file from another rom (2.2.1 vs 2.2.2) and it had the same issue.
So far I have to reflash my phone with Odin every time and I am getting tired of making the same mistake over and over.
edit: Maybe I should ask - what is the appropraite way to move the file over? I am doing it by going into root explorer, deleting /system/framework/services.jar+services.odex, using adb push to put the file on the sdcard, using root explorer to move it from sdcard to /system/framework then changing the permissions in root explorer to match the previous file before finally running "chown root.root /system/framework/services.jar" from adb shell
Either my method for copying the file is bad or xultimate 2.3.3 is messing up the deodex. Any advice on another tool to use to deodex this file?
You should be using baksmali/smali to decompile/recompile classes.dex, not apktool :/
Apktool can decompile .jars too
I use it and works fine
@OP
After deodexing decompile the jar using Virtuous Ten Studio by Diamondback(Google it)
Burned from my laser torch using pencil cells
Thank you for the replies. I will try these suggestions.
As a side note I also tried to use Xultimate to deodex the file, then ran dexopt-wrapper on the output to reodex the unchanged file and the phone is stuck in a boot loop.
You can read about re-odexing files here http://themikmik.com/showthread.php...w-About-adb-odex-themes-etc&p=75225#post75225
Can you give suggestions on another tool to de-odex the services.jar file? I think xultimate is the problem. It is the only common denominator.
I forgot to add that the original services.odex is a different size and has different contents from the new services.odex created by xultimate+dexopt-wrapper
I didn't expect it to work but I took the modified/deodex services.jar from a 2.2.1 rom and put it into my 2.2.2 rom and it had the same non boot issue.
The newest version of xUltimate i could find.
Enjoy
http://www.xeudoxus.com/android/xUltimate-v2.4.2.zip

[HowTo] Odex FRAMEWORK, all Android versions may apply.

Here in this tutorial, I will show some facts about Deodex and Odex, then explain how to odex the framework of a ROM(which is pretty annoying, you'll find out). Credits goes to myself
This method should work on all Android devices.
------------------------------------------------------------------------------------------------------------
First of all, what is odex? Something you should know about classes.dex.
Odex stands for Optimized dex. I'm not gonna explain a lot because I'm not sure if I'm right. First of all, in typical apk files, when you open it with WinRAR or something like that, you can find a file called "classes.dex"(this type of apk is deodexed). This file is the key. It contains the core codes of the apk. However the other type of apk comes with an *.odex file and doesn't have classes.dex inside the apk file. This is odexed apk. There are 2 types of ROMs here, odexed and deodexed. Odexed ROMs' classes.dex are already out of the apk files, while deodexed ROMs' classes.dex are still in the apks. When Android executes an apk, it has to extract the classes.dex out and execute it. So when you flash an deodexed ROM, the first boot takes a long long time since the Android system needs to extract all the classes.dex into dalvik-cache(it shows "Optimizing apks" on the screen for 4.0 ROMs, shows boot animation on screen for 2.3 or below ROMs). However for the odexed ROMs, because the classes.dex are already out there, the system just grabs them and use them, without wasting time and storage space extracting classes.dex out.
Why odex framework?
It can boost your device a little by odexing your framework. Your phone can run more efficiently. Although it's a complicated process, but trust me, it's worth it.
What is so special about odexing framework files? What's the difference?
Odexing an app is very easy, and I believe everyone knows how to do it. But odexing framework is really annoying. Why? Because apps and more like stand-alone things, they are not a part of system. You delete it, nothing bad happens, your phone still boots, you just get endless FC if you delete the wrong one, or missing status bar, that's all. But framework files you cannot mess around. They are parts of the system. They have to match the system's codes precisely, without any error, even the order of files(keep this in mind, very important). So for every ROM, the framework initialize codes are different(same RUU or other ROM based ROMs count as its base ROM), and you must modify the odexing binary to make it odex for you properly, or you can sit and watch the beautiful bootloop.
What's the relationship between odexing apps and odexing framework?
Simple, but important. If you odexed apps, you cannot touch the framework. Framework always goes in the first place. If you wanna odex both, you must odex framework first. Or... "The Tragedy of App and Framework"...
So what do we have to keep in mind before we start?
Keep your mind clear, prepare a bag of ice in case you feel dizzy with the codes, and MAKE ENOUGH SPACE FOR FRAMEWORK ODEXING. I would prefer you remove a few useless apks in /system/app first to make more room in system partition. Failing odexing may brick your device forever! Nah just kidding it will only cause you to bootloop. No big deal. Also, it won't odex your framework-res.apk and always will not, so don't feel bad and do it again and again till your phone burn . Make sure your device is ROOTED and enable USB debug. You need Java Runtime Environment.
What tools do you need?
Notepad++ and a magical rar that contains all you need to success.
Let's get started.
------------------------------------------------------------------------------------------------------------
1. Use your file manager to find init.rc at the very root directory of your phone and copy it to SDCard for later code editing, or you simply adb pull it out and skip the coping step. (If you know how to compile boot.img it is even easier, just unpack boot in Android Kitchen, look for line "export BOOTClassPATH". I'm not gonna introduce that method since most people can't. Silly me, didn't I just intoduced that? XD)
2. Connect USB, set mode as disk drive so you can access your SDCard. Copy init.rc into your computer. Open it with notepad, and find where it says "export BOOTClassPATH", create a new file and copy line "export BOOTClassPATH" into the new file. For example:
Code:
export BOOTCLASSPATH/system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar:/system/framework/HTCExtension.jar:/system/framework/com.htc.framework.jar:/system/framework/com.htc.android.pimlib.jar:/system/framework/com.htc.android.easopen.jar:/system/framework/com.scalado.util.ScaladoUtil.jar:/system/framework/com.orange.authentication.simcard.jar:/system/framework/android.supl.jar:/system/framework/com.ecrio.sip.jar
3. Open dexopter in the rar you downloaded with Notepad++. Find the lines that show the similar contents to the things after "export BOOTClassPATH". It is Line 21 to Line 35 on my laptop. Edit them according to the things you just copied out of init.rc. For example, if the first file is "X.jar", then you will have to edit the line into "dexopt-wrapper/system/framework/X.jar /system/framework/X.odex". Then repeat until you finish with all the files that are listed in the long list you copied out of init.rc. File order DOES MATTER. Use the bag of ice I told you to prepare eariler to make you sober if you feel dizzy with the codes. The lines may be more or less after you edited them, doesn't matter.
4. Copy "dexopter" and "dexopt-wrapper" into /system/bin and set the correct permissions. Make sure they have enough permission to change your system files. Restart your phone.
5. Go to CMD and lead it to where adb.exe is(included in the rar). Type these in order:
Code:
adb shell
su
cd system/framework
dexopter fr
Then the codes will run crazy in your cmd window... The odex process has begun!
6. If the odex process completed without error, you are half way there! Well it doesn't mean you have to stare at your screen during the process. It's about time we figure it out! The phone will automatically reboot once it's finished. If it doesn't and you are sure all are done, reboot manually.
7. If you can't boot properly, go back and check everything carefully. If you can, then open your file manager and copy the entire framework directory into your SDCard. You can still adb pull and skip the next coping step.
8. Mount SDCard. Go into framework directory on your computer. Open every file that has an odex file with it, delete the classes.dex inside. WinRAR is okay. The files may seem ridiculously small after you delete the classes.dex, but don't worry since classes.dex are already pulled out and turned into odex files.
9. Copy the whole framework folder into the folder where adb is at. Use adb to push all the files back into /system/framework.
Code:
adb root
adb remount
adb push framework /system/framework
adb shell
su
chmod /system/framework xxx (xxx is a permission code, depends on your ROM. They should be the same as the old deodexed framework files. Use Google to find out how to use the permission codes.)
10. After all the files are pushed in, reboot your phone.
11. If it still boots into the system, congratulations! You've successfully odexed your framework! If it doesn't, then go back and read everything carefully. The most common error occurs when you are editing the dexopter code. You will have to redo everything again.
Done! Everything is ready to go!
You can directly grab the files you've odexed and put it in your custom ROM(must be the same base), just don't forget the odex files.
------------------------------------------------------------------------------------------------------------
Okay, hmm, what to say now? Still, I would be glad if you donated me, but if you don't it's okay, just reply and hit thanks .
Oh almost forgot, the magical rar: http://d-h.st/tYi
------------------------------------------------------------------------------------------------------------
Big thanks to Scott, see him in #3. He explained why some files aren't odexed and provided a easier method(but they all get you dizzy )
Big thanks to JSLEnterprises, see him in #4. He provided a newer busybox for Scott's method.
If you can, send me a PM on how to odex apps.
Sent from my HTC One X using Tapatalk 2
BreatheHT said:
Here in this tutorial, I will show some facts about Deodex and Odex, then explain how to odex the framework of a ROM(which is pretty annoying, you'll find out). Credits goes to myself
Also, it won't odex your framework-res.apk and always will not, so don't feel bad and do it again and again till your phone burn . Make sure your device is ROOTED and enable USB debug. You need Java Runtime Environment.
Click to expand...
Click to collapse
Good write up. Other files that wont "re-odex" are com.htc.resources.apk, com.htc.videowidget.res.apk, com.htc.weather.res.apk and framework-htc-res.apk.
The reason? The files dont have .dex files because there is no code in them. These files just carrier resources like images (for those that didint know).
The .dex files are the actual smali code that devs mod to make the ROM do crazy things
Also, an easier method can be found here: http://themikmik.com/showthread.php?12988-Tool-App-Dexo-the-Universal-Odex-Utility
It does it all and pulls the bootclass for you. And it also does /system/app/ in one simple shot.
Also, one last thing... You can just as easily pull the files back to the PC using the ADB Pull command...
Code:
adb pull /system/app ./app
adb pull /system/framework/ ./framework
EDIT: And another simple method to get your bootclass is do another ADB Pull
Code:
add pull init.rc
I find the adb pull method quicker and more simple...
theking_13 said:
If you can, send me a PM on how to odex apps.
Sent from my HTC One X using Tapatalk 2
Click to expand...
Click to collapse
You can use the method I just explained or if you want to try the framework manually then do apps seperately then you can use this: http://forum.xda-developers.com/showthread.php?t=1514576
I use that app to re-odex updated files in the ROM. For example... If Gmail updates (which it just did) I would remove the old gmail files from system/app/ and put the new one in and run that program then pull the files.
-Scott
If anyone finds this to be too much work... dont worry... it only unpacks the classes.dex once. It will only need to unpack a dex if original file has changed (changed entries need to propogate). That's why all the consecutive boots are back to a 'normal' span of time.
re-odexing your roms IS recommended if either A) you're anal-retentive/have OCD or B) propogation ("Android is Upgrading...") happens every time you reboot your device (it happens sometimes)
If you're going to use the tool scrosler linked to, replace the busybox binary with the one inside the attatched zip (this is busybox 1.20.1). The one that come with the tool is pretty dated.
:good:
Update: Busybox 1.20.2 has been released (though not compiled for android use yet)
Great stuff guys.
scrosler said:
Good write up. Other files that wont "re-odex" are com.htc.resources.apk, com.htc.videowidget.res.apk, com.htc.weather.res.apk and framework-htc-res.apk.
The reason? The files dont have .dex files because there is no code in them. These files just carrier resources like images (for those that didint know).
The .dex files are the actual smali code that devs mod to make the ROM do crazy things
Also, an easier method can be found here: http://themikmik.com/showthread.php?12988-Tool-App-Dexo-the-Universal-Odex-Utility
It does it all and pulls the bootclass for you. And it also does /system/app/ in one simple shot.
Also, one last thing... You can just as easily pull the files back to the PC using the ADB Pull command...
Code:
adb pull /system/app ./app
adb pull /system/framework/ ./framework
EDIT: And another simple method to get your bootclass is do another ADB Pull
Code:
add pull init.rc
I find the adb pull method quicker and more simple...
You can use the method I just explained or if you want to try the framework manually then do apps seperately then you can use this: http://forum.xda-developers.com/showthread.php?t=1514576
I use that app to re-odex updated files in the ROM. For example... If Gmail updates (which it just did) I would remove the old gmail files from system/app/ and put the new one in and run that program then pull the files.
-Scott
Click to expand...
Click to collapse
hehe yep I know the adb pull command, I thought about it and I didn't put it in...
theking_13 said:
If you can, send me a PM on how to odex apps.
Sent from my HTC One X using Tapatalk 2
Click to expand...
Click to collapse
You confused bro?
Thanks. Even though I won't ever be doing this, it's good to know what's going on.
This is awesome. Thanks so much for this. I wanted to know how to odex and deodex roms.
Sent from my HTC One XL using xda app-developers app
scrosler said:
Good write up. Other files that wont "re-odex" are com.htc.resources.apk, com.htc.videowidget.res.apk, com.htc.weather.res.apk and framework-htc-res.apk.
The reason? The files dont have .dex files because there is no code in them. These files just carrier resources like images (for those that didint know).
The .dex files are the actual smali code that devs mod to make the ROM do crazy things
Also, an easier method can be found here: http://themikmik.com/showthread.php?12988-Tool-App-Dexo-the-Universal-Odex-Utility
It does it all and pulls the bootclass for you. And it also does /system/app/ in one simple shot.
Also, one last thing... You can just as easily pull the files back to the PC using the ADB Pull command...
Code:
adb pull /system/app ./app
adb pull /system/framework/ ./framework
EDIT: And another simple method to get your bootclass is do another ADB Pull
Code:
add pull init.rc
I find the adb pull method quicker and more simple...
You can use the method I just explained or if you want to try the framework manually then do apps seperately then you can use this: http://forum.xda-developers.com/showthread.php?t=1514576
I use that app to re-odex updated files in the ROM. For example... If Gmail updates (which it just did) I would remove the old gmail files from system/app/ and put the new one in and run that program then pull the files.
-Scott
Click to expand...
Click to collapse
Is there also a tool to deodex roms?
Sent from my HTC One XL using xda app-developers app
SkizzMcNizz said:
Is there also a tool to deodex roms?
Sent from my HTC One XL using xda app-developers app
Click to expand...
Click to collapse
Like Scott posted?
Basically that is the steps right there..you are doing the apk in the system/app and framework.
That link provides a tool which when done properly will run on the de-odexed stock Rom and odex it...
Good luck with that...it's a nightmare...haha..
SkizzMcNizz said:
Is there also a tool to deodex roms?
Sent from my HTC One XL using xda app-developers app
Click to expand...
Click to collapse
Yep Android Kitchen can do it.
Hopefully this will help to see more odex ROMs
This is the first phone I've had where developers strive to odex their roms
Something to get used to
Sent from my HTC One X using Tapatalk 2
superchilpil said:
This is the first phone I've had where developers strive to odex their roms
Something to get used to
Sent from my HTC One X using Tapatalk 2
Click to expand...
Click to collapse
Most official ROMs are odexed.
BreatheHT said:
Most official ROMs are odexed.
Click to expand...
Click to collapse
Quite the opposite where I come from
Although I came from a different carrier so this side of the forums is different
Sent from my HTC One X using Tapatalk 2
superchilpil said:
Quite the opposite where I come from
Although I came from a different carrier so this side of the forums is different
Sent from my HTC One X using Tapatalk 2
Click to expand...
Click to collapse
Nah carrier doesn't matter.
SkizzMcNizz said:
Is there also a tool to deodex roms?
Sent from my HTC One XL using xda app-developers app
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=1208320
(you'll have to update the versions included in the zip as this thread is dated - 2011)
Note: the API level for 4.0.3/4.0.4 (what our HOX's run) is '15'.
you can also use DSIXDA's kitchen which can be used to batch deodex apk's after you set the api level
(it's defaulted to '10'... which was Gingerbread -> 2.3.3-2.3.7)
Full list of API levels for their specific Android versions
BreatheHT said:
hehe yep I know the adb pull command, I thought about it and I didn't put it in...
Click to expand...
Click to collapse
Yeah, I like to do it better that way. Dont have to move my hands from the keyboard and mouse. Makes you more efficient :good:
BreatheHT said:
Most official ROMs are odexed.
Click to expand...
Click to collapse
I think all?
superchilpil said:
Quite the opposite where I come from
Although I came from a different carrier so this side of the forums is different
Sent from my HTC One X using Tapatalk 2
Click to expand...
Click to collapse
Carrier is irrelevant. Most people dont know how to work with ODEX files so they go with de-odex. Its mroe challanging but provides a better experience.
techlogik said:
Like Scott posted?
Basically that is the steps right there..you are doing the apk in the system/app and framework.
That link provides a tool which when done properly will run on the de-odexed stock Rom and odex it...
Good luck with that...it's a nightmare...haha..
Click to expand...
Click to collapse
No he is asking to go the other way from odex to de-odex.
BreatheHT said:
Yep Android Kitchen can do it.
Click to expand...
Click to collapse
JSLEnterprises said:
http://forum.xda-developers.com/showthread.php?t=1208320
(you'll have to update the versions included in the zip as this thread is dated - 2011)
Note: the API level for 4.0.3/4.0.4 (what our HOX's run) is '15'.
you can also use DSIXDA's kitchen which can be used to batch deodex apk's after you set the api level
(it's defaulted to '10'... which was Gingerbread -> 2.3.3-2.3.7)
Full list of API levels for their specific Android versions
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Yep, I love that script. I was the one that sent him the mnt point file for the HOX :highfive:
I am going to talk to him about bringing in "official" support for the Asus TF300T. I got the boot.img fiugred out this morning! Woot. **** is about to get real with the Asus!
superchilpil said:
This is the first phone I've had where developers strive to odex their roms
Something to get used to
Sent from my HTC One X using Tapatalk 2
Click to expand...
Click to collapse
its a good final touch when cook done with smali tweaks.
another benefit is sorta kang-protection

Categories

Resources