Current location - Quotes Website - Signature design - Exe installation package, how to decompile and view the code?
Exe installation package, how to decompile and view the code?
1. First, create a new android project with only one mainactivity, and only one string: Hello will be displayed in the main interface.

2. Next, switch to the directory where the apk file generated by this project is located, and you can see that there is a hellodemo.apk.

3. Enter: apktool at the command line.

d

-r

Hellodemo.apk. You can see that a hellodemo folder has been generated in the current directory.

4. Go to hello demo \ smali \ com \ example \ hello and open mainactivity.smali to find:

Constant string

v 1,

" \u4f60\u597d ",

Revised as:

Constant string

v 1,

"hello",

5. Then enter: apktool at the command line.

b

hellodemo

Hellodemo 1.apk. This time repackage it as hellodemo 1.apk.

6. Then sign the newly generated apk. Copy this apk to the directory of autosign, then switch to it and enter: java at the command line.

-jar

signapk.jar

testkey.x509.pem

testkey.pk8

hellodemo 1.apk

hellodemo.apk .

7. Install the generated hellodemo.apk into the mobile phone, and you can see that hello has been displayed on the main interface instead of Hello. Explain that decompilation and repackaging succeeded!