apktool d Photos.apk (1.19.0.120877342; OpenGApps; arm + arm64) fails #1243

Closed
MarkusML opened this Issue May 9, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@MarkusML

MarkusML commented May 9, 2016

Dear apktool team,

when trying to de-compile the following apk,
a stack trace is thrown.

Unfortunately removing
~/apktool/framework/1.apk
did not solve the problem this time.
The stack trace remains.

Information

Apktool 2.1.1 (2.0.3 fails as well)

Linux 3.16.7-35 (x86_64)
gcc-4.8-7.1.2.x86_64 (4.8.3)
glibc-2.19-16.22.2.x86_64
Java 1.8.0_72-b15 (64 bit)

OpenGApps (== Playstore)

Stacktrace/Logcat

I: Using Apktool 2.1.1 on Photos.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/HOME/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values / XMLs...
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x010104f9
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:59)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:66)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:62)
at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferenceValue.java:57)
at brut.androlib.res.data.value.ResStyleValue.serializeToResValuesXml(ResStyleValue.java:54)
at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResources.java:513)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:264)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:128)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:108)
at brut.apktool.Main.cmdDecode(Main.java:163)
at brut.apktool.Main.main(Main.java:81)

Steps to Reproduce

arm 32bit version:

wget https://github.com/opengapps/arm/releases/download/20160508/open_gapps-arm-6.0-super-20160508.zip

unzip open_gapps-arm-6.0-super-20160508.zip

tar -Jxvf GApps/photos-arm.tar.xz

apktool d photos-arm/400-420-480/app/Photos/Photos.apk

arm 64bit version:

wget https://github.com/opengapps/arm64/releases/download/20160508/open_gapps-arm64-6.0-super-20160508.zip

unzip open_gapps-arm64-6.0-super-20160508.zip

tar -Jxvf GApps/photos-arm64.tar.xz

apktool d photos-arm64/400-420-480/app/Photos/Photos.apk

Both cases result in same stack trace.
Would be wonderful if you could fix this.
Many thanks for your great apktool.

Best regards,

Markus

@iBotPeaches iBotPeaches added the Bug label May 9, 2016

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches May 9, 2016

Owner

Hm, that apk is looking for resources in a framework that I don't have yet. I believe this will be fixed when we get Android N frameworks, so slightly duplicate of #1223

Owner

iBotPeaches commented May 9, 2016

Hm, that apk is looking for resources in a framework that I don't have yet. I believe this will be fixed when we get Android N frameworks, so slightly duplicate of #1223

@iBotPeaches iBotPeaches added this to the 2.2.1 - Android Nougat milestone Aug 19, 2016

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Aug 19, 2016

Owner
➜  Bug1243 apktool b Photos
I: Using Apktool 2.2.1-76eb39-SNAPSHOT
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes2 folder into classes2.dex...
I: Checking whether resources has changed...
I: Building resources...
W: warning: string 'apply' has no default translation.
W: warning: string 'clear' has no default translation.
W: warning: string 'copy' has no default translation.
W: warning: string 'dismiss' has no default translation.
W: warning: string 'no' has no default translation.
W: warning: string 'not_now' has no default translation.
I: Copying libs... (/lib)
I: Building apk file...
I: Copying unknown files/dir...

Fixed with 64644a1

Requires framework update. Since apktool stores them in hidden directories, I'll work on adding a command to manually update frameworks. Locations of existing framework paths listed here - https://ibotpeaches.github.io/Apktool/documentation/#faq

Owner

iBotPeaches commented Aug 19, 2016

➜  Bug1243 apktool b Photos
I: Using Apktool 2.2.1-76eb39-SNAPSHOT
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes2 folder into classes2.dex...
I: Checking whether resources has changed...
I: Building resources...
W: warning: string 'apply' has no default translation.
W: warning: string 'clear' has no default translation.
W: warning: string 'copy' has no default translation.
W: warning: string 'dismiss' has no default translation.
W: warning: string 'no' has no default translation.
W: warning: string 'not_now' has no default translation.
I: Copying libs... (/lib)
I: Building apk file...
I: Copying unknown files/dir...

Fixed with 64644a1

Requires framework update. Since apktool stores them in hidden directories, I'll work on adding a command to manually update frameworks. Locations of existing framework paths listed here - https://ibotpeaches.github.io/Apktool/documentation/#faq

iBotPeaches added a commit that referenced this issue Aug 19, 2016

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