apktool invalid resource directory name: res navigation

反编译:

apktool d yanxishenew.apk

回编译:

apktool b yanxishenew

报错:

W: invalid resource directory name: E:decodeapktoolyanxishenew1res navigation

解决方法:

使用aapt2 

apktool b --use-aapt2 yanxishenew

执行结果:

E:decodeapktool>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:decodeapktoolyanxishenew1resvaluespublic.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:decodeapktoolyanxishenew1resvaluespublic.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:decodeapktoolyanxishenew1resvaluespublic.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:decodeapktoolyanxishenew1resvaluespublic.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:decodeapktoolyanxishenew1resvaluespublic.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:decodeapktoolyanxishenew1resvaluespublic.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:UsersAdamAppDataLocalapktoolframework1.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:decodeapktool>

dist 目录下成功编译apk

Leave a Comment