Closed kolbi077 closed 3 years ago
@ingbrzy Do you have these errors with MIUI 7 apks?
@iBotPeaches we are not using your aapt....
Thanks @ingbrzy
Yep, not supporting MIUI. Sorry @kolbi077
I made some investigation about this problem and I hope my information will be useful. It is related to MIUI (both 7 and 8) based on Android 5.*. There are several related things:
Latest version of apktool (starting from https://github.com/iBotPeaches/Apktool/commit/c1cb9425d5f217beb273dee5a7cea7b0c9aa9b28) just ignores such references. And maybe the next version will show messages about them (using https://github.com/iBotPeaches/Apktool/pull/1413).
Also for my needs I made a patch to aapt from Android 5 which allows to build apps with ID != 1 and != 127: http://pastebin.com/iUbDCExN @iBotPeaches, is it useful if I'll make more clean solution? For example add option to aapt like "--allow-packages-with-any-id". And add the same option to apktool, which will just translate it to aapt.
If someone can read in Russian then you can also see my posts on 4pda.ru/forum/: http://4pda.ru/forum/index.php?showtopic=557858&view=findpost&p=51479597 http://4pda.ru/forum/index.php?showtopic=557858&view=findpost&p=51491728 http://4pda.ru/forum/index.php?showtopic=557858&view=findpost&p=51497921
In addition I checked xiaomi.eu firmwares for Redmi 3S (Android 6) and Mi5 (Android 7):
Also:
if
s like this: if (packageId != APP_PACKAGE_ID && packageId != SYS_PACKAGE_ID && packageId != FORCED_PACKAGE_ID)
Closing because MIUI and aapt2 is out really changing the entire resource game. 3+ years without a response. This isn't going anywhere.
The mistake generally it, how are you the decompile does not succeed. I tried apktool 2.0.3 and .2.1.0 snapsot the result same thing.
Installed apk's for framework:
apk decompile examle:
Settings.apk
MiuiCamera.apk decompile ok but the recompile fail:
[> Please Help.