So i started to look around for a new ROM when i saw that stock defaults are odexed, Which means i cannot apply the standard RTL framework fixes i usually did before on other phones. These are critical for me.
I looked around and found no stock deodexed ROMs, only modified ones with a lot of modifications i didn't need. So i decided to try and deodex the stock one myself.
I took the same version i have on the device (XWKE7) and tried deodexing the framework folder odex files with baksmali.
However, I cannot get a couple of them to work no matter what. They keep complaining about a missing TestCase superclass.
I've googled around and found that that resides in android.jar from the SDK, so i took that, But i can't get baksmali to recognize it. If i include it in the boot class path that it looks for, It always says it cannot locate the path i give it, even if its in the same directory.
Can anyone who deodexed this version before offer some help?
Was missing core-junit.jar in the boot classes path. I was pretty sure i included it before (thought it was part of the default path), but oh well.
I'll leave the thread be for now, might help others.
Related
If we have a base rom even from a backup.
Couldn't we edit simple things in the rom. Like host files for blocking adds. Add the changes that the super charger script makes. Disable/remove alot of blur like we do now with titanium backup. Longer wifi scan times. ect.
How would you get the base rom and how do you edit the files contained in the rom. I'm used to linux I run it at the house. If its like editing cfg files and what not. I might be able to make my own rom for myself.
Figured out you can open apk files easily with winrar.
And if all else fails sbf here i come
infinity8x3 said:
If we have a base rom even from a backup.
Couldn't we edit simple things in the rom. Like host files for blocking adds. Add the changes that the super charger script makes. Disable/remove alot of blur like we do now with titanium backup. Longer wifi scan times. ect.
How would you get the base rom and how do you edit the files contained in the rom. I'm used to linux I run it at the house. If its like editing cfg files and what not. I might be able to make my own rom for myself.
And if all else fails sbf here i come
Click to expand...
Click to collapse
Can't wait to see what you come up with... I'll test it.
You don't need a custom rom in order to block ads. There its a hosts file floating around that does that in one of the X2's subforum.
Sent from my DROID X2 using XDA App
or get ad free from the market...and guess what? it's free! >.>
It's true that those small changes don't require a custom rom but I think tinkering with the idea and trying to put something together would be a great learning experience and could lead to the first "custom rom".
Questions should be posted in the general forum. I will recommend you visit the chef central forums where they have all the tools and possible many answers for rom building.
Cheers and thread moved.
Ive Noticed that the DX2 Has number of atrix ports and a couple of roms.. Any how i would love some more support than CM7 for the photon. I know we only have a handful of wonderful devs for the photon and they can only concentrate on so much at once.
I am wanting really bad to contribute..Can some one show me where to brush up on my skills I am wanting to attempt to Dev. I know IT HAS BEEN ASKED i just want to go to the right places...Just seems like there is not enough interest in the photon in general.. I have all the free time in the world right now...
Id like to thank all the wonderful Devs in the photon forum and for making CM7 boot!! Some good ISH!! i cant wait!!
If you want to make a custom, stock-based ROM, it is fairly easy. A number of us on the forums just think that it is not very necessary to have so many ROMs when there is little-to-no changes between them.
Anyhow, the basic gist is like this:
Find some app/theme you want to include into a ROM. Extract the ROM (.zip), and then place those files into their respective folders. Generally, themes are in framework-res.apk files and go in /system/framework. Apps usually go into /system/app. Keep in mind if you want to port a theme, you will have to resize the images and rename them (usually), which involved extracting the .apk, modifying the necessary files, and then pushing them back into an unextracted copy of the .apk (to deal with signing issues). When you are done with your modifications to the ROM, highlight/select all of the folders and files (usually META-INF, system, boot.img), and compress them into a zip archive. Bam, new ROM made.
mrinehart93 said:
If you want to make a custom, stock-based ROM, it is fairly easy. A number of us on the forums just think that it is not very necessary to have so many ROMs when there is little-to-no changes between them.
Anyhow, the basic gist is like this:
Find some app/theme you want to include into a ROM. Extract the ROM (.zip), and then place those files into their respective folders. Generally, themes are in framework-res.apk files and go in /system/framework. Apps usually go into /system/app. Keep in mind if you want to port a theme, you will have to resize the images and rename them (usually), which involved extracting the .apk, modifying the necessary files, and then pushing them back into an unextracted copy of the .apk (to deal with signing issues). When you are done with your modifications to the ROM, highlight/select all of the folders and files (usually META-INF, system, boot.img), and compress them into a zip archive. Bam, new ROM made.
Click to expand...
Click to collapse
Thanks BRO!!!! And Thank you for all your hours and dedication you have put fourth with school and all!! I would not of held on to my Photon If it weren't for you!! Honestly!!!
If you guys want I could upload my recent creation.
Its yays deodexed rom with the alien theme embedded in. I can't seem to get the blur launcher to work though and I could slim it down. Remove ringtones notifications and apps if ya'll want...its nothing special just themed no special tweaks.
Don't think you can add tweeks without unlocking the BL...
AJC9000 said:
If you guys want I could upload my recent creation.
Its yays deodexed rom with the alien theme embedded in. I can't seem to get the blur launcher to work though and I could slim it down. Remove ringtones notifications and apps if ya'll want...its nothing special just themed no special tweaks.
Don't think you can add tweeks without unlocking the BL...
Click to expand...
Click to collapse
That would be awesome!!!! Im working on something NOw!! I would like to use what u created!!
Its pretty much yays rom + kenneths theme and a working settings apk lol
You want it stripped down as possible? I suck at making update zips for gapps and such but I can strip it and you can command mount the things you want.
and applications? not everything is shareable I try to make a build did not work well but gets stuck on the logo of motorola
what are you adding and taking away?
Love the write up here: http://forum.xda-developers.com/showthread.php?t=1208320
Trying to follow it and I keep getting the device to boot, however, the Settings icon (Settings.apk and Settings.odex) are what I modified on an Asus Transformer Prime. I do believe it has to do with signature check. I compared the HEX of the files using Beyond Compare and the signature, which I believe is in the first few lines, is completely different than original. Also, I had to add a few .jar's from the /system/framework of the Transformer Prime's system in order to get it to deodex and odex properly.
Am I missing something? Could the signature be copied via a hex editor instead of using the dd command. If so, which HEX is start and end position? Isn't there a trailer as well that needs removed??
Please help if you have any idea about ODEX vs DEODEX. I prefer ODEX which is why I am trying to modify manually and put back. Plus, I learn more this way, which is +1....even though, it's alot more work, I don't mind.
Has anyone ever used this method? I don't want a completely DEODEXED ROM, in fact, I would prefer if NONE of it was DEODEXED which is why I am doing it the hard way Any help is much appreciated.
bump....need an answer please guys...
older thread but I'm bumping this because I'm running into a similar issue. I prefer most of my rom to be odex apart from settings, systemui, framework-res, and my services.jar.
I've seen previously that you can modify 'more_keys_for_smiley' in LatinIME.apk to modify the predefined smilies in the keyboard ( http://forum.xda-developers.com/showthread.php?p=23362533 ).
I'm trying to do this for LatinImeGoogle.apk.
I've got it decompiled with apktool, but I can't seem to find where 'more_keys_for_smiley' is defined to change it. The only reference to it inside of that apk is in key_styles_common.xml where it has:
<key-style latin:moreKeys="!text/more_keys_for_smiley" latin:backgroundType="functional" latin:keyOutputText=" " latin:keyLabel="" latin:keyLabelFlags="hasPopupHint" latin:styleName="enterKeyStyle" />
Can anyone help me locate more_keys_for_smiley so I can modify it? Does the "!text" refer to a different package?
Thanks in advance for any help.
Ok, thanks to someone's help I was able to figure out that the string is now located in the odex file for the keyboard. I was able to deodex LatinImeGoogle.odex using baksmali and edited the file com/android/inputmethod/keyboard/internal/KeyboardTextsSet.smali. I then used smali to recreate the odex file, but pushing it to my device and rebooting causes the keyboard to not load. Do I need to do anything special with this new odex file?
I tried following tutorials ( http://forum.xda-developers.com/showthread.php?t=1208320 ) and using automatic batch scripts ( http://forum.xda-developers.com/showthread.php?p=31360029 ) for recreating the new odex file and copying the signature from the old one, but I could not get it to work. At best I got the keyboard to load and instantly crash, at worst it wouldn't even load the keyboard upon boot.
Anyone want to offer some advice or take a stab at this?
Seems like your doing exactly what i'm trying to accomplish, and had success, so i'm gonna ask a couple questions, but first some background info.
I'm using a (Verizon) Galaxy Nexus, CM10.1 Clockwork Recovery, GAPPS. (no custom Kernels, etc)
I'm a windows guy, definitely a noob to linux, i'm comfortable following the more complicated instructionals, but traveling off the beaten path is difficult for me.
I was able to use apktool tool to decompile Latinime.apk, and i found KeyboardTextsSet.smali, and the smileys i want modified.
Is it as simple as recompiling and installing it? (remove/uninstall keyboard via TitaniumBackup first?)
You refer to a LatinImeGoogle.odex, is this only relevant to someone using an odexed rom?
I appreciate greatly any assistance you are able to provide!:good:
PrettyPistol555 said:
Seems like your doing exactly what i'm trying to accomplish, and had success, so i'm gonna ask a couple questions, but first some background info.
I'm using a (Verizon) Galaxy Nexus, CM10.1 Clockwork Recovery, GAPPS. (no custom Kernels, etc)
I'm a windows guy, definitely a noob to linux, i'm comfortable following the more complicated instructionals, but traveling off the beaten path is difficult for me.
I was able to use apktool tool to decompile Latinime.apk, and i found KeyboardTextsSet.smali, and the smileys i want modified.
Is it as simple as recompiling and installing it? (remove/uninstall keyboard via TitaniumBackup first?)
You refer to a LatinImeGoogle.odex, is this only relevant to someone using an odexed rom?
I appreciate greatly any assistance you are able to provide!:good:
Click to expand...
Click to collapse
Yes, you should be able to modify KeyboardTextsSet.smali and then recompile and install the keyboard. I never achieved any success because I'm on an odexed ROM and couldn't get reodexing to work properly.
Tried but no joy, then realized it could be because the apk was from a previous nightly (couple days) than the one currently installed. Crossing my fingers that it's the reason it didn't work.
I'll try again.
sent from my vzw Galaxy Nexus / CM10.1 (nightlies)
What is the difference between deodex and odex roms? Sorry for the noob question but ive always been curious
Sent from my SCH-I605 using XDA Free mobile app
WHAT IS EXACTLY AN ODEX FILE ?
In Android file system, applications come in packages with the extension .apk. These application packages, or APKs contain certain .odex files whose supposed function is to save space The odexed file structure works well as an optimization tool. Since these .odex files contain preliminary load information about each system app, the OS knows what to expect when it’s booting up, and consequently, loads all these apps faster.
On the other hand, it also makes hacking those applications difficult because a part of the coding has already been extracted to another location before execution.
For instance, on a non-rooted device you’ll find
system/app/Phone.apk ===> as well as ===> system/app/Phone.odex
AND NOW THE DEODEX FILE ?
It’s the process to take all the packages out from .odex file and reassemble them all together in classes.dex file which is kept inside the APK file. By doing that, all pieces of an application package are put together back in one place, thus eliminating the worry of a modified APK conflicting with some separate odexed parts.
In summary, Deodexed ROMs (or APKs) have all their application packages put back together in one place, allowing for easy modification such as theming. Since no pieces of code are coming from any external location, custom ROMs or APKs are always deodexed to ensure integrity.
on the same device but rooted now, you’ll find this:
system/app/Phone.apk ===> but no longer the corresponding .odex file. The reassembled files become classes.dex
CONCLUSION: ADVANTAGES & DISADVANTAGES FOR BOTH SYSTEM FILES
The advantage of deodexing is in modification possibilities. This is most widely used in custom ROMs and themes. A developer building a custom ROM would almost always choose to deodex the ROM package first, that’s why developers prefer it and most, if not all, of the custom ROMs come pre-deodexed.
The advantage of .odex file is the faster load time of the app and were supposed to quickly build the dalvik cache, removing them would mean longer initial boot times. However, this is true only for the first ever boot after deodexing, since the cache would still get built over time as applications are used. Longer boot times may only be seen again if the dalvik cache is wiped for some reason.
And finally rooting need not necessarily mean your device is deodexed, rather that almost all stock ROMs are odexed to some extent, and usually most custom ROMs are deodexed for easy theming.
For a casual user, the main implication is in theming possibilities. Themes for android come in APKs too, and if you want to modify any of those, you should always choose a dedoexed custom ROM.