Deodexing com.htc.framework

This is just an small tutorial that shows how deodexing works.

First of all you need these three tools, deodexerant , baksmali and smali

Connect your phone with USB and make sure you can acces adb and then do the following:

adb push deodexerant /data/local
adb shell chmod 755 /data/local/deodexerant
adb forward tcp:1234 tcp:1234
adb pull /system/app/com.htc.framework.odex .
adb shell /data/local/deodexerant /system/app/com.htc.framework.odex 1234 &
java -jar baksmali.jar -x :1234 com.htc.framework.odex

Now that you have a deodexd files in the out folder you need to create the classes.dex file again.

java -jar smali-1.1.jar -d classes.dex out

It’s time to put the classes.dex in to the empty com.htc.framework.jar.

adb pull  com.htc.framework.jar
zip com.htc.framework.jar classes.dex

You have an deodexd com.htc.framework.jar, if you wish to use it you need to sign it:

java -jar ~/myandroid/out/host/linux-x86/framework/signapk.jar ~/myandroid/build/target/product/security/testkey.x509.pem ~/myandroid/build/target/product/security/testkey.pk8 com.htc.framework.jar signed.jar

You are done!

6 thoughts on “Deodexing com.htc.framework

  1. Mohi

    Hi there,
    i can find /system/app/com.htc.framework.odex on my htc hero :(
    I’m running VILLAIN FROYO custom ROM.
    any ideas?

  2. Mohi

    Mohi :
    Hi there,
    i can find /system/app/com.htc.framework.odex on my htc hero
    I’m running VILLAIN FROYO custom ROM.
    any ideas?

    I mean I CAN’T

    @Mohi

  3. Dev

    UNEXPECTED TOP-LEVEL EXCEPTION:
    java.lang.RuntimeException: bad magic value: 64 65 79 0a 30 33 36 00
    at org.jf.dexlib.DexFile.(DexFile.java:359)
    at org.jf.baksmali.main.main(main.java:176)
    Exception am getting wen am trying to decompile the .odex file.
    Can anyone help me.

  4. rajaspidey

    Can you explain it to me fully !! i have to move deodexerant mannually or via adb push to /data/local in phone (adb push not working for me !!

    where to keep smali & baksmali !!

    sorry for noobish question !!

  5. admin Post author

    @rajaspidey
    deodexerant needs to be on your phone in “/data/local”.
    baksmali and smali are java programs that you run from your own PC.

Comments are closed.