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

Error when Compiling apk Magisk #1532

Closed
ghost opened this Issue Jun 15, 2017 · 3 comments

Comments

Projects
None yet
1 participant
@ghost

ghost commented Jun 15, 2017

Information

  1. Apktool Version (apktool -2.2.3) -
  2. Operating System (Linux) -
  3. APK From? (XDA Dev) -

Lien apk
https://mega.nz/#!cwIUXCjL!uANprWAnNIVQq1bbD68WHktvwTWOSJh_Z86u7xuXJOs

Stacktrace/Logcat

java -jar apktool-2.2.3.jar b Magisk-5.0.2
I: Using Apktool 2.2.3-ea16f3-SNAPSHOT
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
W: res/drawable/$avd_hide_password__0.xml: Invalid file name: must contain only [a-zA-Z0-9_.]. Ignoring...
W: res/drawable/$avd_hide_password__1.xml: Invalid file name: must contain only [a-zA-Z0-9_.]. Ignoring...
W: res/drawable/$avd_hide_password__2.xml: Invalid file name: must contain only [a-zA-Z0-9_.]. Ignoring...
W: res/drawable/$avd_show_password__0.xml: Invalid file name: must contain only [a-zA-Z0-9_.]. Ignoring...
W: res/drawable/$avd_show_password__1.xml: Invalid file name: must contain only [a-zA-Z0-9_.]. Ignoring...
W: res/drawable/$avd_show_password__2.xml: Invalid file name: must contain only [a-zA-Z0-9_.]. Ignoring...
W: A/        ( 2176): First type is not attr!
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 134): [/tmp/brut_util_Jar_3024565972388081494.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 26, --version-code, 42, --version-name, 5.0.2, --no-version-vectors, -F, /tmp/APKTOOL3219031163723745442.tmp, -0, arsc, -0, assets/private.key.pk8, -0, arsc, -I, /home/fayz/.local/share/apktool/framework/1.apk, -S, /home/fayz/APKS TRAD/Magisk-5.0.2/res, -M, /home/fayz/APKS TRAD/Magisk-5.0.2/AndroidManifest.xml]
	at brut.androlib.Androlib.buildResourcesFull(Androlib.java:477)
	at brut.androlib.Androlib.buildResources(Androlib.java:411)
	at brut.androlib.Androlib.build(Androlib.java:310)
	at brut.androlib.Androlib.build(Androlib.java:263)
	at brut.apktool.Main.cmdBuild(Main.java:231)
	at brut.apktool.Main.main(Main.java:84)
@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Jun 15, 2017

Owner
  1. Invalid filenames, not sure why Magisk is using $. That is not valid. Guess I need to rip out the validation of file names as well.

  2. The warning about W: A/ ( 2176): First type is not attr! is a duplicate of #1520, so I'll work on 1 and close this after that linking 2) as a duplicate.

Owner

iBotPeaches commented Jun 15, 2017

  1. Invalid filenames, not sure why Magisk is using $. That is not valid. Guess I need to rip out the validation of file names as well.

  2. The warning about W: A/ ( 2176): First type is not attr! is a duplicate of #1520, so I'll work on 1 and close this after that linking 2) as a duplicate.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Jun 30, 2017

Owner

I believe 1 is actually a supported feature in aapt2. See the recent comment here for details - #1520 (comment)

Owner

iBotPeaches commented Jun 30, 2017

I believe 1 is actually a supported feature in aapt2. See the recent comment here for details - #1520 (comment)

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Jul 5, 2017

Owner
➜  Bug1532 apktool d com.topjohnwu.magisk_5.0.2-42_minAPI21\(armeabi-v7a,x86\)\(nodpi\)_apkmirror.com.apk 
I: Using Apktool 2.2.4-988fd1-SNAPSHOT on com.topjohnwu.magisk_5.0.2-42_minAPI21(armeabi-v7a,x86)(nodpi)_apkmirror.com.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/ibotpeaches/.local/share/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
➜  Bug1532 apktool b com.topjohnwu.magisk_5.0.2-42_minAPI21\(armeabi-v7a,x86\)\(nodpi\)_apkmirror.com
I: Using Apktool 2.2.4-988fd1-SNAPSHOT
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
I: Copying libs... (/lib)
I: Building apk file...
I: Copying unknown files/dir...
➜  Bug1532 

This was fixed with the commit here: iBotPeaches/platform_frameworks_base@3fe1781 which was merged into apktool here: 6ce02e1

The other problems in this ticket were fixed with #1520

Owner

iBotPeaches commented Jul 5, 2017

➜  Bug1532 apktool d com.topjohnwu.magisk_5.0.2-42_minAPI21\(armeabi-v7a,x86\)\(nodpi\)_apkmirror.com.apk 
I: Using Apktool 2.2.4-988fd1-SNAPSHOT on com.topjohnwu.magisk_5.0.2-42_minAPI21(armeabi-v7a,x86)(nodpi)_apkmirror.com.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/ibotpeaches/.local/share/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
➜  Bug1532 apktool b com.topjohnwu.magisk_5.0.2-42_minAPI21\(armeabi-v7a,x86\)\(nodpi\)_apkmirror.com
I: Using Apktool 2.2.4-988fd1-SNAPSHOT
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
I: Copying libs... (/lib)
I: Building apk file...
I: Copying unknown files/dir...
➜  Bug1532 

This was fixed with the commit here: iBotPeaches/platform_frameworks_base@3fe1781 which was merged into apktool here: 6ce02e1

The other problems in this ticket were fixed with #1520

@iBotPeaches iBotPeaches closed this Jul 5, 2017

@iBotPeaches iBotPeaches added this to the 2.2.4 milestone Jul 5, 2017

alebcay added a commit to alebcay/opengapps that referenced this issue Jul 31, 2017

Update APKtool to 2.2.3
- Android O Final Dev Preview support (iBotPeaches/Apktool#1520)
- SnakeYAML 1.1.8 Android Support (iBotPeaches/Apktool#591)
- Fix issue with APKs taking longer than usual to parse resources (iBotPeaches/Apktool#1489)
- Fix issue with internal binaries not accessible in a Spring boot environment. (iBotPeaches/Apktool#1543)
- Fix issues with rebuilding applications originally built with aapt2. (iBotPeaches/Apktool#1520)
- Patch aapt to support the $ character in resource filenames. (iBotPeaches/Apktool#1532)
- Fix issue where apktool was holding locks onto files during execution. (iBotPeaches/Apktool#1561)
- Fix issue with APKs that last resource in pool is INVALID_TYPE_CONFIG. (iBotPeaches/Apktool#1534)
- Fix issue with APKs that are including malformed characters to break parser. (iBotPeaches/Apktool#1564)
- Only exit with 0 error code during version commands.
- Enforce license header on all source files.
- [Security] Prevent malicous directory traversal with unknown files.
- [Security] Prevent XXE vulnerability when given a malicious AndroidManifest.xml
- Upgrade to gradle 4.0.

alebcay added a commit to alebcay/opengapps that referenced this issue Jul 31, 2017

Update APKtool to 2.2.4
- Android O Final Dev Preview support (iBotPeaches/Apktool#1520)
- SnakeYAML 1.1.8 Android Support (iBotPeaches/Apktool#591)
- Fix issue with APKs taking longer than usual to parse resources (iBotPeaches/Apktool#1489)
- Fix issue with internal binaries not accessible in a Spring boot environment. (iBotPeaches/Apktool#1543)
- Fix issues with rebuilding applications originally built with aapt2. (iBotPeaches/Apktool#1520)
- Patch aapt to support the $ character in resource filenames. (iBotPeaches/Apktool#1532)
- Fix issue where apktool was holding locks onto files during execution. (iBotPeaches/Apktool#1561)
- Fix issue with APKs that last resource in pool is INVALID_TYPE_CONFIG. (iBotPeaches/Apktool#1534)
- Fix issue with APKs that are including malformed characters to break parser. (iBotPeaches/Apktool#1564)
- Only exit with 0 error code during version commands.
- Enforce license header on all source files.
- [Security] Prevent malicous directory traversal with unknown files.
- [Security] Prevent XXE vulnerability when given a malicious AndroidManifest.xml
- Upgrade to gradle 4.0.

mfonville added a commit to opengapps/opengapps that referenced this issue Jul 31, 2017

Update APKtool to 2.2.4
- Android O Final Dev Preview support (iBotPeaches/Apktool#1520)
- SnakeYAML 1.1.8 Android Support (iBotPeaches/Apktool#591)
- Fix issue with APKs taking longer than usual to parse resources (iBotPeaches/Apktool#1489)
- Fix issue with internal binaries not accessible in a Spring boot environment. (iBotPeaches/Apktool#1543)
- Fix issues with rebuilding applications originally built with aapt2. (iBotPeaches/Apktool#1520)
- Patch aapt to support the $ character in resource filenames. (iBotPeaches/Apktool#1532)
- Fix issue where apktool was holding locks onto files during execution. (iBotPeaches/Apktool#1561)
- Fix issue with APKs that last resource in pool is INVALID_TYPE_CONFIG. (iBotPeaches/Apktool#1534)
- Fix issue with APKs that are including malformed characters to break parser. (iBotPeaches/Apktool#1564)
- Only exit with 0 error code during version commands.
- Enforce license header on all source files.
- [Security] Prevent malicous directory traversal with unknown files.
- [Security] Prevent XXE vulnerability when given a malicious AndroidManifest.xml
- Upgrade to gradle 4.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment