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

Android P Developer Preview 1 - framework-res & SystemUI build issues #1742

Open
BakaSai opened this Issue Mar 8, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@BakaSai

BakaSai commented Mar 8, 2018

Information

  1. Apktool Version (apktool -version) - 2.3.1
  2. Operating System (Mac, Linux, Windows) - Windows 10 64-bit
  3. APK From? (Playstore, ROM, Other) - Android P - Developer Preview 1

Stacktrace/Logcat

Exception in thread "main" java.lang.NumberFormatException: For input string: "P"
        at java.lang.NumberFormatException.forInputString(Unknown Source)
        at java.lang.Integer.parseInt(Unknown Source)
        at java.lang.Integer.parseInt(Unknown Source)
        at brut.androlib.res.AndrolibResources.mapSdkShorthandToVersion(AndrolibResources.java:478)
        at brut.androlib.res.AndrolibResources.getMinSdkVersionFromAndroidCodename(AndrolibResources.java:461)
        at brut.androlib.Androlib.build(Androlib.java:290)
        at brut.androlib.Androlib.build(Androlib.java:270)
        at brut.apktool.Main.cmdBuild(Main.java:227)
        at brut.apktool.Main.main(Main.java:75)

Steps to Reproduce

  1. apktool d framework-res.apk
  2. apktool b framework-res.apk
  3. Same issue occurs with the Android P SystemUIGoogle.apk as well. Can be reproduced with the following:
    apktool d SystemUIGoogle.apk
    apktool b SystemUIGoogle.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)

/system/framework/ - framework-res.zip
/system/priv-app/SystemUIGoogle/ - SystemUIGoogle.zip

APK

If this APK can be freely shared, please upload/attach a link to it.

Questions to ask before submission

  1. Have you tried apktool d, apktool b without changing anything?
  • Yes. It decompiles successfully but fails to build.
  1. If you are trying to install a modified apk, did you resign it?
  • Not trying to install it for now.
  1. Are you using the latest apktool version?
  • Yes, 2.3.1.
@iBotPeaches

This comment has been minimized.

Owner

iBotPeaches commented Mar 12, 2018

Well usually they keep numeric API levels - https://source.android.com/setup/build-numbers

We saw in M,N,O shorthand but the underlying system API was always a numeric number, IE 25. This time the underlying numeric level is "P". I am just going to guess that it will be API 28. If this turns out to be wrong, I'll need to rewrite some portions of Apktool to take non-numeric.

iBotPeaches added a commit that referenced this issue Mar 12, 2018

iBotPeaches added a commit that referenced this issue Mar 13, 2018

@iBotPeaches

This comment has been minimized.

Owner

iBotPeaches commented Mar 13, 2018

Okay in master is a fix for the numeric error and added in the Android P Preview internal framework.

@BakaSai

This comment has been minimized.

BakaSai commented Mar 29, 2018

Interesting thing I came across btw. The VERSION_CODE value for P in build tools is currently set to 10000 instead of 28. It's still incomplete however, as PDP1 still uses SDK 27, as the APIs haven't been finalised yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment