反编译:
apktool d yanxishenew.apk
回编译:
apktool b yanxishenew
报错:
W: invalid resource directory name: E:\decode\apktool\yanxishenew1\res navigation
解决方法:
使用aapt2
apktool b --use-aapt2 yanxishenew
执行结果:
E:\decode\apktool>apktool b --use-aapt2 yanxishenew1 I: Using Apktool 2.4.1 I: Checking whether sources has changed... I: Checking whether sources has changed... I: Checking whether sources has changed... I: Checking whether sources has changed... I: Checking whether resources has changed... I: Building resources... W: E:\decode\apktool\yanxishenew1\res\values\public.xml:2756: error: resource 'drawable/$avd_hide_password__0' has invalid entry name '$avd_hide_password__0'. Invalid character '$avd_hide_password__0'. W: E:\decode\apktool\yanxishenew1\res\values\public.xml:2757: error: resource 'drawable/$avd_hide_password__1' has invalid entry name '$avd_hide_password__1'. Invalid character '$avd_hide_password__1'. W: E:\decode\apktool\yanxishenew1\res\values\public.xml:2758: error: resource 'drawable/$avd_hide_password__2' has invalid entry name '$avd_hide_password__2'. Invalid character '$avd_hide_password__2'. W: E:\decode\apktool\yanxishenew1\res\values\public.xml:2759: error: resource 'drawable/$avd_show_password__0' has invalid entry name '$avd_show_password__0'. Invalid character '$avd_show_password__0'. W: E:\decode\apktool\yanxishenew1\res\values\public.xml:2760: error: resource 'drawable/$avd_show_password__1' has invalid entry name '$avd_show_password__1'. Invalid character '$avd_show_password__1'. W: E:\decode\apktool\yanxishenew1\res\values\public.xml:2761: error: resource 'drawable/$avd_show_password__2' has invalid entry name '$avd_show_password__2'. Invalid character '$avd_show_password__2'. W: brut_util_Jar_185611557998604586.tmp W 09-27 23:02:05 18748 21244 ApkAssets.cpp:137] resources.arsc in APK 'C:\Users\Adam\AppData\Local\apktool\framework\1.apk' is compressed. I: Copying libs... (/lib) I: Copying libs... (/kotlin) I: Copying libs... (/META-INF/services) I: Building apk file... I: Copying unknown files/dir... I: Built apk... E:\decode\apktool>
dist 目录下成功编译apk
本文为Adamin90原创文章,转载无需和我联系,但请注明来自http://www.lixiaopeng.top