[Q] manually deodexed and compressed apk's make bootloop - Galaxy S I9000 Q&A, Help & Troubleshooting

Hello,
I tried manually deodexing my /system/framework and /system/app with xUltimate according to this:
http://forum.androidcentral.com/mot...cks/30539-how-manually-deodex-your-phone.html
Now this has worked fine and I can also boot my phone fine with the deodexed files. But there is also on option in xUltimate to compress/optimize the apk files. If I do that and flash my phone with the compressed files, I get into a bootloop.
The compression seems to save a total of 20MB of space (from 103MB to 84MB) and I hope this could give the device a small speed improvement, but I just can't seem to get it to work.
I also know that there are ROMs out there that have all the files deodexed, but in 90% of cases these files are also modified (custom themes and whatnot) and I don't like that, I would just want a vanilla deodexed ROM so that I can make changes myself if I want to.
I have also searched the forum for 'xultimate' but couldn't find any hit. What are other people using to deodex/optimize/zipalign their ROMs? Are there any better utilities out there?
I'd be very thankful for any tips/tricks.
Thank you!

Related

[DEV] 99% deodexed GRI40 XXKB1 for Nexus S framwork and app dirs only

Hi,
My first deodexing, wasn't as simple as expected, I was surprised no one did it before me...
Deodexed: entire framework dir, and most of the app directory (all but 2 apks which refused to deodex...), as long as the framework is deodexed thats ok.
Needed it to patch the framework.jar for bidi language and it works, seems a bit of a lag after each boot before showing the widgets and apps but after that it runs smooth,
can someone explaing that maybe? something to do with unzipping delay maybe?
here is the file, enjoy.
http://www.multiupload.com/FRE906144I
EDIT1: this zip is not flashable nor is it full rom, just deodexed framework and app directories, use adb to push to device, it is working for me with no problems (except the delay at boot), no fc (forced.closed) at all.
flashable zip?
FaithCry said:
flashable zip?
Click to expand...
Click to collapse
its in a .zip so i would assume so. thats the only way to put new ROMs within Nexus S... unless you want to go to Odin which would be .tar
@OP
Was it bluetooth.apk & networklocation.apk? If so, I finally got those deodexed, but I couldn't get the framework.jar to deodex correctly xD
If you need/want them, I can send them to you.
#EDIT
Testing my build with your framework.jar to see if it works right..
#EDIT 2
I am still getting that da** framework fc lol. Let me logcat it..
#Edit 3
I think I might know what my issue is.. Trying a few things now
#Edit 4
I went back to my framework.jar and fixed some files & now it works.. Go figure! lol. I will upload in a bit
#Edit 5
The issues on my build were the messed up NetworkLocation.apk & Bluetooth.apk.. I fixed those, and we now have a fully deodexed 2.3.3
http://forum.xda-developers.com/showthread.php?t=971690
@OP You should change the thread title to [ROM] Stock 2.3.3 DEODEXED. I'll give it a flash in the morning and add it to my Roms, themes, and kernels thread You could even give it a flashy name hehe
The zip I supplied is not flashable as far as I know, I used adb in recovery mode to push the files to the phone,
my deodexed framework.jar works, I use it for a day now and also used a patching script on it to make it bidi enabled, and it still works, I get no fc's at all with it, just a delay on boot before I see all my widgets/icons, after that all ok.
I have a clean working nandroid deodexed backup which also has the bidi patch at:
http://www.multiupload.com/UQ364AHDWT

[Q] 2.1's Framework

Can someone with original 2.1 please post the whole of the /system/framework so I can use the framework to port apps to 2.3.5 (it needs to odex'd). Then I can post some of the stock apps and widgets (not fm or hidden menu etc though). I cannot unyaffs the recovery of 2.1 as it gives a stack error
Thanks in advance!
You can use this backup of 2.1
Or, I've got a packed /framework here - if that's any use... V20A
fishears said:
Or, I've got a packed /framework here - if that's any use... V20A
Click to expand...
Click to collapse
thanks fishears.I'm on such a slow internet connection (i'm on holiday), so if I download a whole rom it would take about an hour. I'll use the backup at home, and the framework for now. When I first updated I had an "oh no what if it goes wrong " moment and backed up the /system folder but not the /system/framework folder (ran out of space) so I have a good amount of stock apks to port

without odex

I am using the GT540 with 2.1 rom
i want delete in the system/app-> odex files
but when i delete any odex files
app does not work
examples
delete system/app-> music.odex... music does not work
There are some applications run with odex
some applications run without odex (example lgecamera.apk)
I would like in working without odex every app on 2.1
how do I
please help
Thank you for answers
I'm sorry for my English
I think first you need to understand the concept of ODEXing. In stock LG roms the system applications are Odexed. "ODEX" stands for Optimized DEX - Classes.dex is usually a file that stands inside the apk file of any application. When a program is odexed the file is extracted from the apk, optimized, and saved alongside the application in the odex format. However, since the apk no longer contains its (albeit optimized) classes, deleting the odex file leaves the application broken and unusable, until you reinstall it again. Now, I can think of only one way to deodex right now, but I really don't think it's a good idea(The rom i'm using was deodexed, yet I odexed it intentionally). What you need to do is:
1. Make a backup of your phone using clockworkmod recovery
2. From that backup take system.img and boot.img
3. You will need to download and run Android Kitchen. Since it's a Linux program, you'll need that as well. Look into it.
4. Insert the 'boot' and 'system' img files into the kitchen, and use the deodex option, then export the rom as update.zip
5. Put the file in your sdcard, boot into recovery, and format system
6. Choose 'install update.zip', and install the one you've created
7. From 'Advanced' menu clean Dalvik-Cache, and see if the phone works now.
While this *should* work *in theory*, as far as I know using a backup to modify it in the kitchen doesn't always work. Also, since I imagine some of your system apps are now broken, what I told you to do should be done after first reinstalling the rom in some way, in order to get your apps straight.
Well, I hope I've been helpful. Good luck.
if I'm not wrong there should be a script somewhere i the forum
bs828 said:
if I'm not wrong there should be a script somewhere i the forum
Click to expand...
Click to collapse
For deodexing? There's one for odexing, but I'm not sure about the opposite one. I'll do a search. Besides, some of his system apps are already screwed up, so I doubt that will help.
This kitchen can run on Cygwin (author mentioned it)
nutterbg said:
I think first you need to understand the concept of ODEXing. In stock LG roms the system applications are Odexed. "ODEX" stands for Optimized DEX - Classes.dex is usually a file that stands inside the apk file of any application. When a program is odexed the file is extracted from the apk, optimized, and saved alongside the application in the odex format. However, since the apk no longer contains its (albeit optimized) classes, deleting the odex file leaves the application broken and unusable, until you reinstall it again. Now, I can think of only one way to deodex right now, but I really don't think it's a good idea(The rom i'm using was deodexed, yet I odexed it intentionally). What you need to do is:
1. Make a backup of your phone using clockworkmod recovery
2. From that backup take system.img and boot.img
3. You will need to download and run Android Kitchen. Since it's a Linux program, you'll need that as well. Look into it.
4. Insert the 'boot' and 'system' img files into the kitchen, and use the deodex option, then export the rom as update.zip
5. Put the file in your sdcard, boot into recovery, and format system
6. Choose 'install update.zip', and install the one you've created
7. From 'Advanced' menu clean Dalvik-Cache, and see if the phone works now.
While this *should* work *in theory*, as far as I know using a backup to modify it in the kitchen doesn't always work. Also, since I imagine some of your system apps are now broken, what I told you to do should be done after first reinstalling the rom in some way, in order to get your apps straight.
Well, I hope I've been helpful. Good luck.
Click to expand...
Click to collapse
Thank you for your excellent explanation
definitely going to try them
but where do I find Android kitchen for the GT540
and the running xp or win7?
Can you give the web address?
thanks a lot.
Here you are
http://forum.xda-developers.com/showthread.php?t=633246
You can use kitchen on Windows thanks to Cygwin .
Wystukane z mojego Swifta przy użyciu Tapatalk.

[Q] How to make Custom Rom ?

Did anyone has tried the dsixda Android Kitchen to make a custom rom for OB ? Is it working ?
http://forum.xda-developers.com/showthread.php?t=633246
or just give me a link to very helpful site about how to make custom rom for OB
For starters, yes it works. but nothing compares as to compiling and building from source (Linux).
What you need is a mere system dump or backup from CWM.
That backup will be saved in your CWM folder in SD
Grab the boot.img & system.ext3.tar
unpack the .tar with a zip/RAR propgram
grab a base upater script from the many ROMs around here
Now for a start:
your base ROM like Zeus etc.
Delete the system folder and boot.img from that zip.
Replace files.
Use dsixda kitchen via cygwin (windows)
Now do as you please... it can unpack boot.img and add features like init.d etc.
Adding apps:
Apps can be added together with som libs (system/lib). Example: Terminal Emulator. the lib is some "jackpal" or something. .
When you download an app, apk will be saved in data/app in your phone. The lib or added files will be saved in data/data/(app name folder)/lib. Grab the apk and insert in system/app (kitchen's working folder). Grab the lib and insert it in system/lib (kitchen's working folder).
gabwerkz said:
For starters, yes it works. but nothing compares as to compiling and building from source (Linux).
What you need is a mere system dump or backup from CWM.
That backup will be saved in your CWM folder in SD
Grab the boot.img & system.ext3.tar
unpack the .tar with a zip/RAR propgram
grab a base upater script from the many ROMs around here
Now for a start:
your base ROM like Zeus etc.
Delete the system folder and boot.img from that zip.
Replace files.
Use dsixda kitchen via cygwin (windows)
Now do as you please... it can unpack boot.img and add features like init.d etc.
Adding apps:
Apps can be added together with som libs (system/lib). Example: Terminal Emulator. the lib is some "jackpal" or something. .
When you download an app, apk will be saved in data/app in your phone. The lib or added files will be saved in data/data/(app name folder)/lib. Grab the apk and insert in system/app (kitchen's working folder). Grab the lib and insert it in system/lib (kitchen's working folder).
Click to expand...
Click to collapse
many thanks gabwerkz. I had been searching ebook The Complete Idiot's Guides to custom rom, but I think the book has not published yet.
I only once tried to cook with kitchen, but that's waaaaay back and there I simply had no clue, of what I am doing and those days, the cust ROM I made, didnt work, but I simply randomly applied mods/tweaks and also had no clue of how things like updater-script work, but now I do and maybe as soon as I got some time again (in about 2 months ) I'll give it another shot and also read a lot about deving on my own and all the stuff related to it. Then maybe I'll be able to help all the cookers here out in a better way, cause until now, I only got the basics
You can start with simply things, like extracting the files with a packer, remove LG bloatware, add files/patches, you can find in dev section, add apps you like and think others might like as well, change lockscreen, launcher, keyboard,...
Remember to always do this step by step and make a changelog for yourself, so you know, where you might have made a mistake (also important for others to be able to help you). Then repack your ROM, sign and test it, if it works properly, use kitchen, to zipaligne, deodex, change filesystem,... And as soon as you are satisfied, post it/PM the good ones in here, to test it and ask for opinions, what you might change next. Custom kernels are always cool, cause you can change way more, like governors, iosched,... But that will take more time to dev and a lot more time to test for errors
Hope this helps you out a bit
N00BY0815 said:
I only once tried to cook with kitchen, but that's waaaaay back and there I simply had no clue, of what I am doing and those days, the cust ROM I made, didnt work, but I simply randomly applied mods/tweaks and also had no clue of how things like updater-script work, but now I do and maybe as soon as I got some time again (in about 2 months ) I'll give it another shot and also read a lot about deving on my own and all the stuff related to it. Then maybe I'll be able to help all the cookers here out in a better way, cause until now, I only got the basics
You can start with simply things, like extracting the files with a packer, remove LG bloatware, add files/patches, you can find in dev section, add apps you like and think others might like as well, change lockscreen, launcher, keyboard,...
Remember to always do this step by step and make a changelog for yourself, so you know, where you might have made a mistake (also important for others to be able to help you). Then repack your ROM, sign and test it, if it works properly, use kitchen, to zipaligne, deodex, change filesystem,... And as soon as you are satisfied, post it/PM the good ones in here, to test it and ask for opinions, what you might change next. Custom kernels are always cool, cause you can change way more, like governors, iosched,... But that will take more time to dev and a lot more time to test for errors
Hope this helps you out a bit
Click to expand...
Click to collapse
Your post help me a lot... thanks... I will try what you told me todo...
And If your rom need a bootanimation just PM me right...

[Complete Guide] What Is Odex And Deodex In Android !

As an Android newbie, what bothered me most was coming across terminology beyond my comprehension. Not coming from a Linux background it became hard to keep up with the oh-so-commonly-used words spread all across the development community. Likewise, since I didn’t understand the terms, consequently I was unable to determine is something was of any use to me or not. From what I have seen, this problem extends to many novice and even average users.
One commonly occurring word when playing with custom ROMs and firmware, and even themes is deodexed and odexed. Most users fail to understand what these terms actually imply, and while developers would boast again and again about their themes and ROMs being deodexed, the average user is left clueless as to what is going on.
WHAT IS 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. These ‘odex’ files are actually collections of parts of an application that are optimized before booting. Doing so speeds up the boot process, as it preloads part of an application. 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.
THEN COMES DEODEX
Deodexing is basically repackaging of these APKs in a certain way, such that they are reassembled into classes.dex files. 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.
HOW THIS WORKS
For the more geeky amongst us, Android OS uses a Java-based virtual machine for running applications, called the Dalvik Virtual Machine. A deodexed, or .dex file contains the cache used by this virtual machine (referred to as Dalvik-cache) for a program, and it is stored inside the APK. An .odex file, on the other hand, is an optimized version of this same .dex file that is stored next to the APK as opposed to inside it. Android applies this technique by default to all the system applications.
Now, when an Android-based system is booting, the davlik cache for the Davlik VM is built using these .odex files, allowing the OS to learn in advance what applications will be loaded, and thus speeds up the booting process.
By deodexing these APKs, a developer actually puts the .odex files back inside their respective APK packages. Since all code is now contained within the APK itself, it becomes possible to modify any application package without conflicting with the operating system’s execution environment.
ADVANTAGES & DISADVANTAGES
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, since that would not only allow him to modify various APKs, but also leave room for post-install theming.
On the other hand, since the .odex files 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.
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.
Was this article helpful? If you are confused with some other terms and want us to help explain them, please let us know in the comments.
Screen Shots
Reserved 2.
Help for getting the deodexed files onto Galaxy Tab S 8.4
I have deodexed the 'app', 'priv-app', and 'framework' folders and the build.prop file using the JoelDroid batch deodexer tool (as outlined in this thread). I am looking for help for getting the deodexed files onto my Samsung Galaxy Tab S 8.4 (running Lollipop 5.0.2). My ROM is currently rooted with Knox 0x0 and I used FlashFire to get my device rooted and updated to lollipop (as outlined in this thread) - and as a result - I don't have a custom recovery such as TWRP installed. I read this guide that calls for deleting the old 'app', 'priv-app', and 'framework' folders and (via recovery) copying the new folders (with the deodexed files) to /system.
Since I don't have a custom recovery installed - what's the best way to get the deodexed files onto my device so that I can have a deodexed ROM (& still retain my Knox 0x0 status)?
Thanks for the help!
I think the only way is by installing Custom Recovery,
but, i will look for a way.
UPDATE: use your deodexer tool while following this steps without using the tool given there, the only downside is you need TWRP installed.
link : http://forum.xda-developers.com/galaxy-tab-s/themes-apps/how-to-deodex-stock-rom-t3254734
rob.allen78 said:
I have deodexed the 'app', 'priv-app', and 'framework' folders and the build.prop file using the JoelDroid batch deodexer tool (as outlined in this thread). I am looking for help for getting the deodexed files onto my Samsung Galaxy Tab S 8.4 (running Lollipop 5.0.2). My ROM is currently rooted with Knox 0x0 and I used FlashFire to get my device rooted and updated to lollipop (as outlined in this thread) - and as a result - I don't have a custom recovery such as TWRP installed. I read this guide that calls for deleting the old 'app', 'priv-app', and 'framework' folders and (via recovery) copying the new folders (with the deodexed files) to /system.
Since I don't have a custom recovery installed - what's the best way to get the deodexed files onto my device so that I can have a deodexed ROM (& still retain my Knox 0x0 status)?
Thanks for the help!
Click to expand...
Click to collapse
Thank you so much! I recently started to explore things like custom ROMs on my SM-T800. I can definitely use a crash course in things like this. Especially since I have not (yet) been able to get Xposed on CM 12.1, pacman-ROM and Phoenix-ROM.
Thanks!
rob.allen78 said:
Since I don't have a custom recovery installed - what's the best way to get the deodexed files onto my device so that I can have a deodexed ROM (& still retain my Knox 0x0 status)?
Thanks for the help!
Click to expand...
Click to collapse
Either create a flashable zip with those files or unpack the whole system image and replace those files/folders and create a flashable zip from that. Flash with flashfire.
You will need to set the correct permissions so best to use something like archi kitchen to automate it.
However considering there are a plethora of deodex roms currently available why bother?
DUHAlgerianSkills said:
I think the only way is by installing Custom Recovery,
but, i will look for a way.
UPDATE: use your deodexer tool while following this steps without using the tool given there, the only downside is you need TWRP installed.
link : http://forum.xda-developers.com/galaxy-tab-s/themes-apps/how-to-deodex-stock-rom-t3254734
Click to expand...
Click to collapse
Thank you for the reply. I was hoping that there was a way to do it without having a custom recovery. If I am not mistaken, flashing a custom recovery will trip Knox correct?
---------- Post added at 10:45 AM ---------- Previous post was at 10:34 AM ----------
ashyx said:
Either create a flashable zip with those files or unpack the whole system image and replace those files/folders and create a flashable zip from that. Flash with flashfire.
You will need to set the correct permissions so best to use something like archi kitchen to automate it.
However considering there are a plethora of deodex roms currently available why bother?
Click to expand...
Click to collapse
I may explore creating a flashable zip (any links for newbie to creating flashable zips?) The reason being is that there aren't any deodexed ROMS (stock tw) running the latest official build for my tablet (I am running bulld LRX22G. T700XXU1BOI1)
Thanks for these explanations
Create a flashable zip for your tab using this
https://play.google.com/store/apps/details?id=zip.me
i donno how it works but seems legit, check it out.
rob.allen78 said:
Thank you for the reply. I was hoping that there was a way to do it without having a custom recovery. If I am not mistaken, flashing a custom recovery will trip Knox correct?
---------- Post added at 10:45 AM ---------- Previous post was at 10:34 AM ----------
I may explore creating a flashable zip (any links for newbie to creating flashable zips?) The reason being is that there aren't any deodexed ROMS (stock tw) running the latest official build for my tablet (I am running bulld LRX22G. T700XXU1BOI1)
Click to expand...
Click to collapse

Categories

Resources