Android
  • Introduction
  • Android Studio
    • AS的项目结构
    • adb
    • aapt
    • dx
    • Gradle
    • Kotlin on android
  • Smaller
  • decompiler
  • MISC
  • 框架 framework
  • 设计模式
  • dex
  • reinforce加固
  • code
    • Java Tips
      • 负数 negative
      • The Java Tutorials
        • 原始数据类型 Primitive Data Types
      • 运算符
        • 一元运算符
        • 算术运算符
        • 移位运算符
        • 关系运算符
      • 逻辑运算符
        • 逻辑 非 ! 关系值表
        • 逻辑 与 && 关系值表
        • 逻辑 或 || 关系值表
        • 与 & And
        • 或 | Or
        • 非 ~ Nor
        • 异或 ^ Xor
        • 赋值运算符
        • tips
      • == equals
      • Try Catch finally
        • 有意思的东西
      • String、StringBuilder、StringBuffer区别
      • inner classes、nested static classes
    • runtime_memory
    • javaStackTrace
    • Guava
    • FFMPEG
    • GoogleSamples
    • Full Kotlin Reference
    • release屏蔽Log代码
    • Thread
  • ANR
  • 注解改进代码检查
Powered by GitBook
On this page
  • 反编译APP,并重编译安装
  • Reinforcement加固
  • Apktool
  • JEB
  • dex2jar
  • JD-gui
  • Bitbucket
  • Fiddler
  • Charles

Was this helpful?

decompiler

PreviousSmallerNextMISC

Last updated 5 years ago

Was this helpful?

反编译

反编译APP,并重编译安装

  1. 找来一个apk: test.apk

  2. 使用apktool进行反编译

    $ apktool d test.apk   #会在同目录下生成一个test的目录,所有反编译文件都在里边

    这时可以在其里用vi,编辑一个文件如res/values/strings.xml、smali的smali文件、AndroidManifest.xml配置 的一些可编辑的值;

  3. 使用apktool再打包

    $ apktool b test    #这里的test是刚才反编译生成的目录

    如果此时一切正常,会生成test/build、test/dist

  4. 此时生成的test/dist/test.apk还需要重签名,可不用原证书签名。

    $ jarsigner -verbose -certs -keystore ./android_sign.keystore -storepass {pwd} -keypass {pwd} -digestalg SHA1 -sigalg MD5withRSA -signedjar {sign_test}.apk {test}.apk {pwd}
    $
    //# {pwd}:为证书的相关密码
    //# {sign_test): 目标apk名
    //# {test}: 源apk名
    $ adb install test.apk   #把此程序一道安装到手机上进行验证!

    此时生成的sign_test.apk就是一个反编译后再重编译的apk。可以安装的。

特别注意: 本反编译与再打包,只适用于第一次打包,如果该程序被加固过。当前的apktool@2.2.2 反编译与打包未加固的程序都成功!(20170302)

Reinforcement加固

Apktool

apktool d {test}.apk  # d-decoding 解码
apktool b {test}.apk  # b-build  编译

JEB

dex2jar

d2j-dex2jar.sh -f ~/path/to/apk_to_decompile.apk

JD-gui

Bitbucket

Fiddler

Charles

网络抓包

download:

jar

Android网络捉包

腾讯
百度加固
360加固保
梆梆
通付盾
爱加密
娜迦
https://ibotpeaches.github.io/Apktool/documentation/
http://jebbuilds2.s3.amazonaws.com/jeb2demo/jeb-demo-2.2.10.201610102203.zip
https://www.pnfsoftware.com/jeb2/downloads
https://github.com/pxb1988/dex2jar
https://github.com/java-decompiler/jd-gui
https://bitbucket.org/mstrobel/procyon
https://www.telerik.com/download/fiddler
http://www.androidtcpdump.com/android-tcpdump/downloads
https://github.com/iBotPeaches/Apktool
https://github.com/google/android-classyshark