notishell / android-apktool

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

Breaks on decoding Google+ APKs #635

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download Google+ APK 4.3+ from 
http://www.androidpolice.com/2014/05/20/google-app-gets-a-big-update-to-v4-4-wit
h-a-new-ui-auto-awesome-stories-improved-support-for-large-photo-libraries-and-m
ore-apk-download/
2. Attempt to decode it.
3. Receive crash midway through decoding resources.

What is the expected output? What do you see instead?
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 
0x7f030010
    at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:59)
    at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:58)
    at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:54)
    at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferenceValue.java:60)
    at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResReferenceValue.java:47)
    at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlAttr(ResScalarValue.java:45)
    at brut.androlib.res.data.value.ResStyleValue.serializeToResValuesXml(ResStyleValue.java:49)
    at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResources.java:553)
    at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:309)
    at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:119)
    at brut.androlib.ApkDecoder.decode(ApkDecoder.java:115)
    at brut.apktool.Main.cmdDecode(Main.java:169)
    at brut.apktool.Main.main(Main.java:85)

What version of the product are you using? On what operating system?
Using Apktool 2.0.0-Beta9-1e3b66f9be on 
com.google.android.apps.plus-4.4.0.67576161.apk

Original issue reported on code.google.com by archon810 on 20 May 2014 at 3:08

GoogleCodeExporter commented 9 years ago
hmmm.

mError=0xffffffed (Unknown error -19)
Package Groups (0)

aapt can't even handle this. I will update to latest bleeding edge aapt from 
AOSP, but we must be near a new SDK drop because current public tools can't 
handle this apk.

Original comment by connor.tumbleson on 20 May 2014 at 3:26

GoogleCodeExporter commented 9 years ago
New AOSP bleeding aapt handles the apk without error.

The naughty resource doesn't exist. (hint UndefinedResObject). The dump of 
resources prior to failures are mipmaps.

Look like we need to update something in our mipmap decoding and update the 
internal aapts. 

Original comment by connor.tumbleson on 23 May 2014 at 12:05

GoogleCodeExporter commented 9 years ago
Yay, progress!

Original comment by archon810 on 23 May 2014 at 12:06

GoogleCodeExporter commented 9 years ago
https://github.com/iBotPeaches/Apktool/commit/0ece6cf1b309979afaf6e55ee4c6720d26
e20b3b

new aapt commit. Still need to fix mipmaps

Original comment by connor.tumbleson on 25 May 2014 at 4:28

GoogleCodeExporter commented 9 years ago

Original comment by connor.tumbleson on 2 Oct 2014 at 7:14

GoogleCodeExporter commented 9 years ago
Playstand also has this issue: 
http://www.apkmirror.com/apk/google-inc/google-play-newsstand/google-play-newsst
and-3-3-2-apk/

Original comment by connor.tumbleson on 6 Oct 2014 at 11:50

GoogleCodeExporter commented 9 years ago
In the issue log provided for Play Newsstand 
(https://gist.github.com/a5a2c68b8a722dd5f7c8) , I noticed a line about 
undefined attributes (W: Could not decode attr value, using undecoded value 
instead: ns=android, name=touchscreenBlocksFocus, value=0xffffffff). 

I have a new framework file for Google apps here: 
http://connortumbleson.com/apktool/frameworks/google-frameworks.apk

apktool if google-frameworks.apk -t google
apktool d com.google.android.apps.magazines-3.3-2014092802-minAPI14.apk -t 
google

should work without issue. So Newsstand is not the same problem as Google+ / 
GoogleNow. Still investigating.

Original comment by connor.tumbleson on 6 Oct 2014 at 12:24

GoogleCodeExporter commented 9 years ago
So the 1.apk framework that apktool generates usually isn't enough going 
forward? Or can we expect the new version of apktool to correctly handle this 
case in the future?

Original comment by archon810 on 6 Oct 2014 at 8:20

GoogleCodeExporter commented 9 years ago
It'll be merged into mainline more than likely. I just held off initially since 
the resources were from that preview SDK of L and were unaware if using those 
would be dangerous.

Original comment by connor.tumbleson on 7 Oct 2014 at 12:22

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Now using apkmirror. I pulled version 4.9.0-84567213-413607930 of GooglePlus. I 
did this mainly to help identify broken resources among the versions to help 
isolate the problem.

However, this version (4.9.0) has no error. I then try the OPs version (4.4.0) 
and the problem exists. So yes there is a problem, but the latest GooglePlus 
does not experience this. I still think this bug is closely related to others, 
so will keep this open.

I deleted all comments that had nothing to do with this issue.

Original comment by connor.tumbleson on 27 Jan 2015 at 9:35