kuter007 / android-apktool

Automatically exported from code.google.com/p/android-apktool
Other
0 stars 0 forks source link

Decoding resources of gmail #779

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download apk from 
https://onedrive.live.com/redir?resid=A81B51F05D7E3C2F!7549&authkey=!AMSuPzuxPYE
Pnxs&ithint=file%2capk
2. apktool d ../Downloads/com.google.android.gm.apk 

What is the expected output? What do you see instead?

I: Using Apktool 2.0.0-RC4 on com.google.android.gm.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/marc/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=touchscreenBlocksFocus, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=android, 
name=touchscreenBlocksFocus, value=0xffffffff
W: Could not decode attr value, using undecoded value instead: ns=internal, 
name=layout_maxHeight, value=0x00004001
W: Could not decode attr value, using undecoded value instead: ns=internal, 
name=layout_minHeight, value=0x00004001
I: Decoding values */* XMLs...
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 
0x0101048c
    at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:59)
    at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:57)
    at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:53)
    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:581)
    at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:344)
    at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:133)
    at brut.androlib.ApkDecoder.decode(ApkDecoder.java:104)
    at brut.apktool.Main.cmdDecode(Main.java:165)
    at brut.apktool.Main.main(Main.java:81)

What version of the product are you using? On what operating system?
2.0.0-RC4 on Linux

Please provide any additional information below.
The app has been downloaded via apkdownloader, so there is no device it has 
been pulled off directly.

Original issue reported on code.google.com by CodeFrea...@gmail.com on 11 Mar 2015 at 12:06

GoogleCodeExporter commented 9 years ago
I am unsure whether it's because of the missing framework files. In this case, 
shouldn't apktool display a bit more user-friendly error message telling this?

Original comment by CodeFrea...@gmail.com on 11 Mar 2015 at 12:16

GoogleCodeExporter commented 9 years ago
You are correct you are missing a framework, or rather have an outdated one. 
Remove the file at $HOME/apktool/framework/1.apk

See FrameworkFiles

ibotpeaches@raganok:~/Downloads/Apktool/Bug779$ apktool d 
com.google.android.gm.apk
I: Using Apktool 2.0.0-bbc602-SNAPSHOT on com.google.android.gm.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/ibotpeaches/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...
ibotpeaches@raganok:~/Downloads/Apktool/Bug779$ 

Apktool does have error messages for missing frameworks, but undefined 
attributes are difficult to pinpoint a proper message because it doesn't always 
mean your frameworks are out of date.

Original comment by connor.tumbleson on 11 Mar 2015 at 12:18