Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOTO: Additional configuration qualifiers. #1420

Closed
kaneawk opened this issue Jan 27, 2017 · 4 comments
Closed

MOTO: Additional configuration qualifiers. #1420

kaneawk opened this issue Jan 27, 2017 · 4 comments

Comments

@kaneawk
Copy link

kaneawk commented Jan 27, 2017

Information

  1. Apktool Version (apktool -version) -2.2.3-6cc251-SNAPSHOT
  2. Operating System (Mac, Linux, Windows) -Windows 10
  3. APK From? (Playstore, ROM, Other) - Moto Z android 7.0 framework-res.apk (CN Retail Stock firmware)

Stacktrace/Logcat

I: Loading resource table...
W: Config flags size > 56. Size = 64. Exceeding bytes: 0x1666221400000000.
W: Invalid config flags detected. Dropping resources: string-mcc204-mnc4-ERR0
W: Config flags size > 56. Size = 64. Exceeding bytes: 0x1666221400000000.
W: Invalid config flags detected. Dropping resources: array-mcc204-mnc4-ERR1
W: Config flags size > 56. Size = 64. Exceeding bytes: 0x1666221400000000.
W: Invalid config flags detected. Dropping resources: bool-mcc204-mnc4-ERR2
I: Decoding AndroidManifest.xml with resources...
I: Regular manifest package...
I: Decoding file-resources...

Include stacktrace here

Steps to Reproduce

  1. apktool

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.
lenovo-res.zip.txt
framework-res.zip.txt

Questions to ask before submission

  1. Have you tried apktool d, apktool b without changing anything?yes
  2. If you are trying to install a modified apk, did you resign it?no
  3. Are you using the latest apktool version?yes

I'm tried recompile framework-res.apk, but it show this error, I did not change anything, then I replaced the original file, the phone will be in black, did not show anything, it can't enter the launcher. 😢

@iBotPeaches
Copy link
Owner

Sorry for the delay. Cleaning up tickets that have no response/activity. Dropped the ball on getting to this.

This issue is because there is a new qualifier known as spn with an insane value range. The value I see now is 895679974. It seems connected to mcc/mnc. I'll do some research, but this issue much like other OEMs who break AOSP qualifiers tend to cause problems with apktool.

@iBotPeaches iBotPeaches added the Bug label May 1, 2017
@iBotPeaches
Copy link
Owner

I can't patch this safely. This is another qualifier and future AOSP updates may use the same space this "3rd party" qualifier is using and thus if I pack this qualifier into apktool, then AOSP update comes out everything will be decoded incorrectly.

I do not know the best way to patch this. One way is a patch/plugin/parameter system that allows you to specify different qualifiers. That works great for apktool, but adding that functionality into aapt is another story.

@iBotPeaches iBotPeaches added Feature and removed Bug labels Jun 14, 2017
@iBotPeaches iBotPeaches changed the title Config flags size > 56 with Moto Z android 7.0 MOTO: Additional configuration qualifiers. Jun 14, 2017
@Magendanz
Copy link

Magendanz commented Jan 14, 2018

Can you recommend a workaround? This is affecting a lot of Motorola custom ROM development.

@iBotPeaches
Copy link
Owner

Years later. This is being added into backlog of ROADMAP. My guess is newer OEMs aren't doing this because its insane and clashes with CTS and AOSP merges.

d61e330

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants