[ deodex script] deodexerious: all your base are belong to us!

Search This thread

illdroid

Senior Member
Aug 23, 2008
70
34
Here's a script I've built for my own ROM cooking purpose
another purpose was to create a very easy to read script, so everyone can understand the magic of deodex

had some hard time figuring all the BOOTCLASSPATH and all the signing magic (if you want to do it manually, the secret is: don't pack and sign!, just add the classes.odex to the original jar or apk...whatever...
or use my script to automagically do all that)

after one brick and jtag reincarnation and a few bootloops
I present to you:
DEODEXERIOUS !! (the only spartan deodex script)

requirements:
Linux
zip
* tested on my Ubuntu 10.10

instructions:
1. extract the included script
2. put the content of system(including the system folder) inside the rom folder
actually you can create a folder named system inside the rom folder and copy framwork and app folder there, it does not require any other files from the rom
3. while in the console inside the extracted script directory execute from the console
Code:
./deodexrom.sh
4. wait and watch the console for errors (there shouldn't be any)
5. when it is done, you should find the deodexed files inside the deodexed folder

* if you want to start over just execute from the same place in the console
Code:
./cleanall.sh

tested and successfully deodexed:
I897 UCKB1
I9088 KP2
I9088 ZNKP5
I9000 XXJPY
I9000 XWJS3
I9000 XWJS5
I9000 ZSJPG
I9000 XWJV1 2.3.2, except email.apk


it does not support already deodexed rom's!!! (why should it?)
if you test other raw versions (even captivate ones) please inform the result, or problems found, I'll do my best to help

careful
the script is a very initial version
it does inform errors human readable so watch the console for them

oh! almost forgot , here's the script:
http://dl.dropbox.com/u/3595341/deodexerious/deodexerious_03.zip

change log:
04/03/2011 - deodexerius_03
added gingerbread XWJV1 2.3.2 - custom classpaths
smali and baksmali 1.2.6
case insensitive classpath helpers
note:
deodexerius can deodex all XWJV1 2.3.2, except email.apk

27/02/2011 - deodexerius_02
better support for the additional files in kp5 and kp2


good luck!!
 
Last edited:

ytt3r

Retired Recognized Developer
Dec 7, 2010
557
321
GA
omg

You saved my life man... thanks a billion! And add a donate link, I know I'd like to send a few bucks your way
 
  • Like
Reactions: LastStarlight

nakedninja42

Senior Member
Oct 28, 2009
1,998
692
Bay Area, CA
I keep seeing this while the script is running


Compiling classes.dex from rom/system/framework/framework-tests

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.raiseBoundsError(libgcj.so.11)
at java.util.ArrayList.checkBoundExclusive(libgcj.so.11)
at java.util.ArrayList.get(libgcj.so.11)
at org.jf.dexlib.DexFile$2.placeAt(DexFile.java:783)
at org.jf.dexlib.DexFile.place(DexFile.java:659)
at org.jf.smali.main.fixInstructions(main.java:255)
at org.jf.smali.main.main(main.java:203)
Packing
Cleaning up
Done.
Cleaning up

Do I have to worry? I am going to try it again when it all completes, just want to make sure I am not missing anything
 

nakedninja42

Senior Member
Oct 28, 2009
1,998
692
Bay Area, CA
How can I verify that the Deodex worked? I ran the script a couple times last night just to see what happens and then dropped the files in on my phone. Everything is working fine, just wanted to know how I can verify its deodexed.
 

illdroid

Senior Member
Aug 23, 2008
70
34
How can I verify that the Deodex worked? I ran the script a couple times last night just to see what happens and then dropped the files in on my phone. Everything is working fine, just wanted to know how I can verify its deodexed.
if you don't see errors like the one quoted bellow, then you should be fine.

I keep seeing this while the script is running

Compiling classes.dex from rom/system/framework/framework-tests

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.raiseBoundsError(libgcj.so.11)
at java.util.ArrayList.checkBoundExclusive(libgcj.so.11)
at java.util.ArrayList.get(libgcj.so.11)
at org.jf.dexlib.DexFile$2.placeAt(DexFile.java:783)
at org.jf.dexlib.DexFile.place(DexFile.java:659)
at org.jf.smali.main.fixInstructions(main.java:255)
at org.jf.smali.main.main(main.java:203)
Packing
Cleaning up
Done.
Cleaning up

Do I have to worry? I am going to try it again when it all completes, just want to make sure I am not missing anything
actually this is an error, it means it failed to deodex this file
please provide more information, the reason can be many things:
java version
base rom
did you provide the full rom or only the file you mentioned?
provide more information and ill see what can be done.

This is great. Works on the new KB1.
awesome.
 

nakedninja42

Senior Member
Oct 28, 2009
1,998
692
Bay Area, CA
if you don't see errors like the one quoted bellow, then you should be fine.

actually this is an error, it means it failed to deodex this file
please provide more information, the reason can be many things:
java version
base rom
did you provide the full rom or only the file you mentioned?
provide more information and ill see what can be done.

awesome.

I am use the same KB1 that hit the forums yesterday that i4ackback stated that works for him. I installed Ubuntu 10.10 and installed Java from the software manager, not sure if its the right one. I started copying the full system folder but ended up only extracting just app and framework just like the OP states. That message appears throughout the process but I end up with everything in the deodexed folder.

Sent from my SAMSUNG-SGH-I897 using XDA App
 

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    Here's a script I've built for my own ROM cooking purpose
    another purpose was to create a very easy to read script, so everyone can understand the magic of deodex

    had some hard time figuring all the BOOTCLASSPATH and all the signing magic (if you want to do it manually, the secret is: don't pack and sign!, just add the classes.odex to the original jar or apk...whatever...
    or use my script to automagically do all that)

    after one brick and jtag reincarnation and a few bootloops
    I present to you:
    DEODEXERIOUS !! (the only spartan deodex script)

    requirements:
    Linux
    zip
    * tested on my Ubuntu 10.10

    instructions:
    1. extract the included script
    2. put the content of system(including the system folder) inside the rom folder
    actually you can create a folder named system inside the rom folder and copy framwork and app folder there, it does not require any other files from the rom
    3. while in the console inside the extracted script directory execute from the console
    Code:
    ./deodexrom.sh
    4. wait and watch the console for errors (there shouldn't be any)
    5. when it is done, you should find the deodexed files inside the deodexed folder

    * if you want to start over just execute from the same place in the console
    Code:
    ./cleanall.sh

    tested and successfully deodexed:
    I897 UCKB1
    I9088 KP2
    I9088 ZNKP5
    I9000 XXJPY
    I9000 XWJS3
    I9000 XWJS5
    I9000 ZSJPG
    I9000 XWJV1 2.3.2, except email.apk


    it does not support already deodexed rom's!!! (why should it?)
    if you test other raw versions (even captivate ones) please inform the result, or problems found, I'll do my best to help

    careful
    the script is a very initial version
    it does inform errors human readable so watch the console for them

    oh! almost forgot , here's the script:
    http://dl.dropbox.com/u/3595341/deodexerious/deodexerious_03.zip

    change log:
    04/03/2011 - deodexerius_03
    added gingerbread XWJV1 2.3.2 - custom classpaths
    smali and baksmali 1.2.6
    case insensitive classpath helpers
    note:
    deodexerius can deodex all XWJV1 2.3.2, except email.apk

    27/02/2011 - deodexerius_02
    better support for the additional files in kp5 and kp2


    good luck!!
    1
    If someone could come up with one of these for windows they would be my hero

    Sent from my GT-I9000 using XDA App

    kind of like this one?
    http://xdaforums.com/showthread.php?t=700904
    1
    omg

    You saved my life man... thanks a billion! And add a donate link, I know I'd like to send a few bucks your way