Home > Android > Deodexing com.htc.framework

Deodexing com.htc.framework

January 27th, 2010 Leave a comment Go to comments

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!

Share
  1. March 10th, 2010 at 17:10 | #1

    @ htc tattoo the framework odex and jar are placed inside /system/framework/

  2. Mohi
    August 17th, 2010 at 20:41 | #2

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

  3. Mohi
    August 17th, 2010 at 20:43 | #3

    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

  4. Dev
    May 18th, 2011 at 08:59 | #4

    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.

  5. rajaspidey
    October 16th, 2011 at 23:25 | #5

    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 !!

  6. admin
    October 24th, 2011 at 04:14 | #6

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

  1. No trackbacks yet.