Apktool: decompiling latest Facebook APK - unsupported res type name for bags. Found: style2
Information
- Apktool Version: 2.3.1
- Operating System: Linux
- APK From: APKMirror (https://www.apkmirror.com/apk/facebook-2/facebook/facebook-157-0-0-38-97-release/facebook-157-0-0-38-97-android-apk-download/)
Stacktrace/Logcat
Very long sequence of "Could not decode file" lines:
https://pastebin.com/edit/rHKMqygQ
Steps to Reproduce
- Any attempt to decompile the official Facebook apk (versions 157 and later)
- ./apktool d _in/Facebook_157.0.0.38.97.apk -o _working/Facebook_157.0.0.38.97.apk
Frameworks
If this APK is from an OEM ROM (Samsung, HTC, LG): Nope
APK
If this APK can be freely shared, please upload/attach a link to it: https://www.apkmirror.com/apk/facebook-2/facebook/facebook-157-0-0-38-97-release/facebook-157-0-0-38-97-android-apk-download/
Questions to ask before submission
- Have you tried
apktool d
,apktool b
without changing anything? yes - If you are trying to install a modified apk, did you resign it? issues during decompile/recompile
- Are you using the latest apktool version? yes
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 9
- Comments: 24 (10 by maintainers)
Commits related to this issue
- docs: update changelog for #1719 — committed to iBotPeaches/Apktool by iBotPeaches 2 years ago
Version 2.4.0 still have problems with the facebook apk. But now it crashes with an exception.
Hi @iBotPeaches, Is there any update about this issue? I am facing the same problem that it couldn’t decode the resources.
Thanks!
I was able to get around the crash by adding the resource type “style2”.
https://github.com/thejunkjon/Apktool/commit/5f3fc54fd5541926bef9a6af797464997e64fde9
That type doesn’t seem to be documented though so I am not sure the change is correct.
https://android.googlesource.com/platform/frameworks/base/+/master/tools/aapt2/Resource.h#66
This site is able to decompile Facebook App http://apk-deguard.com/. But I didn’t find the file AndroidManifest
Note to self. Look into skipping resource decoding (-r) and look into why that is not working. Context: #1739
If you need only decode apk than quick solution:
brut.androlib.res.data.value.ResValueFactory#ResScalarValue
For me it decodes Facebok apk without errors with resources.
@iBotPeaches it sounds great. Thank you for that. Can you explain to me why some resource folders after decompilation named like
drawable2
,drawable4-xxhdpi
,raw2
and etc.