Open gilhartman opened 5 years ago
Interesting find. Will have just debug and see what is going on with that resource. I've seen strange cases where an asset exists in the structure, but has no mapping in the resource tree. Thus it isn't decoded and instead the suspected resource is found with an ID, but no corresponding resource (thus dummy resource)
Hi, we debugged it a bit and managed to unpack and repack the apk correctly when inserting a small change.
We found that some resources that are supposed to be strings, are assigned the wrong type (e.g. drawable).
We found that when we change files (on the open apk dir) that their names were only comprised of digits without an extension (e.g. 9, 55, etc), to a name that has at least one letter (we renamed all files and references to these files to apktool_9, apktool_55, etc), apktool managed to build the apk correctly.
It did not make any difference to the reported condition above (files move into the res/fonts dir), but it did fix the app, it stopped crashing when loading resources, even that specific font.
Hope this helps
There is a scenario that causes a similar error.
When the App you want to disassemble consists of multiple APKs the resources might be split between them.
If you only install the base.apk after reassembly it will not work with this single apk. This is because the App has been deployed as app bundle. I assume. You need to fetch all of the applications apks and install them again with adb install-multiple *.apk
after proper signing.
https://play.google.com/store/apps/details?id=com.frzinapps.smsforward&hl=en&gl=US I got the following error when changing the package name,
`android.view.InflateException: Binary XML file line #2 in com.frzinapps.smsforward:layout/preference_widget_switch_compat: Binary XML file line #2 in com.frzinapps.smsforward:layout/preference_widget_switch_compat: Error inflating class androidx.appcompat.widget.SwitchCompat
Caused by: android.view.InflateException: Binary XML file line #2 in com.frzinapps.smsforward:layout/preference_widget_switch_compat: Error inflating class androidx.appcompat.widget.SwitchCompat
Information
apktool -version
) - 2.3.4Stacktrace/Logcat
Steps to Reproduce
apktool d orginal.apk
apktool b original -o apktooled.apk
Frameworks
If this APK is from an OEM ROM (Samsung, HTC, LG). Please attach framework files (
.apks
that live in/system/framework
or/system/priv-app
)APK
If this APK can be freely shared, please upload/attach a link to it.
https://www.dropbox.com/s/1tx2uph1nenzkpx/playstoreCityVelocity.apk?dl=0
Questions to ask before submission
apktool d
,apktool b
without changing anything? yes