jadx重新打包_APK反编译、修改、重打包、签名

本文介绍了如何使用jadx工具对APK进行反编译,详细步骤包括:1)使用java -jar apktool_2.0.0.jar d命令进行反编译;2)修改AndroidManifest.xml;3)使用java -jar apktool_2.0.0.jar b命令重新打包;4)通过jarsigner进行签名操作,包括生成keystore和签名apk。最后,文中提到经过此流程处理后的APK在aiqiyi客户端上能够正常运行。

更新

反编译还是这个比较好用啊

1、反编译:

java -jar apktool_2.0.0.jar d TestSMSDemo.apk

默认反编译到TestSMSDemo文件夹下,apktool下载请点击这里

2、修改AndroidManifest.xml

android:label="@string/app_name"

android:name=".VideoApplication"

android:theme="@android:style/Theme.NoTitleBar.Fullscreen"

android:uiOptions="splitActionBarWhenNarrow"

android:debuggable="true">

3、重新打包:

java -jar apktool_2.0.0.jar b TestSMSDemo(之前反编译生成的文件夹名,如果是out请写out)

默认会将文件重新打包到TestSMSDemo/dist目录下

4、签名:

1)生成keystore。可以使用命令行生成keystore,也可以使用Eclipse签名一个demo生成keystore,记住保存位置就好了。

使用命令行生成:

keytool -genkey -v -keystore mykeystore(可以任意名字) -alias linlin(别名,可以任意,但是在后面会用到这个别名,所以要记清楚) -keyalg RSA -validity 20000

然后根据提示输入需要的内容。

使用Eclipse生成就不用说了,签名apk的时候都用到,记住生成keystore保存位置。简单易行。

2)签名apk

jarsigner -verbose -keystore mykeystore -signedjar android_signed.apk(目标名字) TestSMSDemo.apk(要签名的apk)linlin(这个地方就是上面说要记住的别名 -alias,看有些例子上面这个地方字符串用‘ ’号引起来是错误的,直接写字符串就好了)

附:

()     里面是说明文字,在使用命令时请忽视

为了方便记忆可以将-alias和keystore的名字一致。如果-alias跟keystore名字不一致,又忘记了写的什么,可以使用Eclipse查看。具体方法就是打包程序,然后选择该keystore,输入密码后会自动显示alias的名字。如下图所示:

usage:apktool

-advance,--advanced prints advance information.

-version,--version prints the version then exits

usage: apktool if|install-framework [options]

-p,--frame-path

-t,--tag Tag frameworks using .

usage: apktool d[ecode] [options]

-f,--force Force delete destination directory.

-o,--output

-p,--frame-path

-r,--no-res Do not decode resources.

-s,--no-src Do not decode sources.

-t,--frame-tag Uses framework files tagged by .

usage: apktool b[uild] [options]

-f,--force-all Skip changes detection and build all files.

-o,--output

-p,--frame-path

For additional info, see:http://code.google.com/p/android-apktool/

For smali/baksmali info, see:http://code.google.com/p/smali/用于Odex-dex后面说这个的使用

error:

jarsigner: 找不到xxx的证书链。xxx必须引用包含私有密钥和相应的公共 密钥证书链的有效密钥库密钥条目。

出现类型提示是因为alias没有填写正确。

使用aiqiyi客户端测试,重新打包签名后正常运行没问题。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值