zyq8709 / DexHunter

General Automatic Unpacking Tool for Android Dex Files
Apache License 2.0
1.32k stars 533 forks source link

Missing initial steps #3

Closed cryptax closed 8 years ago

cryptax commented 8 years ago

Hi, I am missing the first few steps to get DexHunter work. Could you please explain what I am doing wrong?

I cloned the repository + I have the Android SDK tools etc. Then, I uncompressed the 7z image, and used it to launch an emulator:

emulator -system system.img -ramdisk ramdisk.img -kernel kernel-qemu-armv7 -initdata userdata-qemu.img -avd New442 &

Is this correct? (NB. I also tried with an Android 5.1.1)

Then, I installed the packed application on the emulator:

adb install mysample.apk

As it is packed with Ijiami, I edited the file dexname to contain:

/data/data/com.mysample/cache/.
/data/data/com.mysample

Is this correct? or am I meant to put something after "cache/. "? I transfered the file to the emulator:

adb push dexname /data

Then, I started reading the logs keeping an eye on "GOT IT" messages.

adb logcat

and I started the packed application in the emulator. I did get GOT IT messages:

Finally, I retrieved the app in /data/data/com.mysample:

 adb pull /data/data/com.mysample/com.mysample-1.apk .

But something obviously did not work because that APK is very small (5536 bytes only) and not valid (trying to open with JEB)

 Opening file com.mysample-1.dex
 Invalid file
 Error, no DEX file
zyq8709 commented 8 years ago

What you did was proper. It is worth noting that the packers of new versions has upgraded hugely. You may improve DexHunter to adapt to the changes. After all, what I released was source code for your reference, not purely a tool. Thanks!