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

Breaks on decoding Google+ APKs #745

Closed
iBotPeaches opened this Issue Mar 18, 2015 · 20 comments

Comments

Projects
None yet
1 participant
@iBotPeaches
Owner

iBotPeaches commented Mar 18, 2015

Original issue 635 created by archon810 on 2014-05-20T15:08:46.000Z:

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-with-a-new-ui-auto-awesome-stories-improved-support-for-large-photo-libraries-and-more-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

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #1 originally posted by connor.tumbleson on 2014-05-20T15:26:52.000Z:

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.

Owner

iBotPeaches commented Mar 18, 2015

Comment #1 originally posted by connor.tumbleson on 2014-05-20T15:26:52.000Z:

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.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #2 originally posted by connor.tumbleson on 2014-05-23T00:05:15.000Z:

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.

Owner

iBotPeaches commented Mar 18, 2015

Comment #2 originally posted by connor.tumbleson on 2014-05-23T00:05:15.000Z:

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.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #3 originally posted by archon810 on 2014-05-23T00:06:59.000Z:

Yay, progress!

Owner

iBotPeaches commented Mar 18, 2015

Comment #3 originally posted by archon810 on 2014-05-23T00:06:59.000Z:

Yay, progress!

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #4 originally posted by connor.tumbleson on 2014-05-25T16:28:52.000Z:

0ece6cf

new aapt commit. Still need to fix mipmaps

Owner

iBotPeaches commented Mar 18, 2015

Comment #4 originally posted by connor.tumbleson on 2014-05-25T16:28:52.000Z:

0ece6cf

new aapt commit. Still need to fix mipmaps

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #5 originally posted by connor.tumbleson on 2014-10-02T19:14:29.000Z:

<empty>

Owner

iBotPeaches commented Mar 18, 2015

Comment #5 originally posted by connor.tumbleson on 2014-10-02T19:14:29.000Z:

<empty>

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #6 originally posted by connor.tumbleson on 2014-10-06T11:50:21.000Z:

Playstand also has this issue: http://www.apkmirror.com/apk/google-inc/google-play-newsstand/google-play-newsstand-3-3-2-apk/

Owner

iBotPeaches commented Mar 18, 2015

Comment #6 originally posted by connor.tumbleson on 2014-10-06T11:50:21.000Z:

Playstand also has this issue: http://www.apkmirror.com/apk/google-inc/google-play-newsstand/google-play-newsstand-3-3-2-apk/

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #7 originally posted by connor.tumbleson on 2014-10-06T12:24:09.000Z:

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.

Owner

iBotPeaches commented Mar 18, 2015

Comment #7 originally posted by connor.tumbleson on 2014-10-06T12:24:09.000Z:

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.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #8 originally posted by archon810 on 2014-10-06T20:20:02.000Z:

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?

Owner

iBotPeaches commented Mar 18, 2015

Comment #8 originally posted by archon810 on 2014-10-06T20:20:02.000Z:

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?

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #9 originally posted by connor.tumbleson on 2014-10-07T00:22:43.000Z:

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.

Owner

iBotPeaches commented Mar 18, 2015

Comment #9 originally posted by connor.tumbleson on 2014-10-07T00:22:43.000Z:

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.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #10 originally posted by cskarthik on 2014-12-06T12:58:21.000Z:

Same problem on the following APK using latest RC build
apktool_2.0.0rc3.jar d org.ligi.passandroid.apk

Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x0101048f
    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.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:36)
    at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlResourceParser.java:369)
    at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(XmlPullParserDelegate.java:69)
    at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(StaticXmlSerializerWrapper.java:267)
    at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(StaticXmlSerializerWrapper.java:211)
    at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamDecoder.java:83)
    at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:141)
    at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:33)
    at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:114)
    at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:99)
    at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:323)
    at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)
    at brut.androlib.ApkDecoder.decode(ApkDecoder.java:101)
    at brut.apktool.Main.cmdDecode(Main.java:165)
    at brut.apktool.Main.main(Main.java:81)
Owner

iBotPeaches commented Mar 18, 2015

Comment #10 originally posted by cskarthik on 2014-12-06T12:58:21.000Z:

Same problem on the following APK using latest RC build
apktool_2.0.0rc3.jar d org.ligi.passandroid.apk

Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x0101048f
    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.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:36)
    at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlResourceParser.java:369)
    at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(XmlPullParserDelegate.java:69)
    at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(StaticXmlSerializerWrapper.java:267)
    at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(StaticXmlSerializerWrapper.java:211)
    at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamDecoder.java:83)
    at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:141)
    at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:33)
    at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:114)
    at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:99)
    at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:323)
    at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)
    at brut.androlib.ApkDecoder.decode(ApkDecoder.java:101)
    at brut.apktool.Main.cmdDecode(Main.java:165)
    at brut.apktool.Main.main(Main.java:81)
@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #11 originally posted by tech.alexl on 2014-12-23T08:08:27.000Z:

Same exception thrown for every application that was bundled with com.android.support:appcompat-v7:21.0.0

Owner

iBotPeaches commented Mar 18, 2015

Comment #11 originally posted by tech.alexl on 2014-12-23T08:08:27.000Z:

Same exception thrown for every application that was bundled with com.android.support:appcompat-v7:21.0.0

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #12 originally posted by kmark937 on 2014-12-25T04:53:11.000Z:

Can confirm that this is still an issue with RC3.

Owner

iBotPeaches commented Mar 18, 2015

Comment #12 originally posted by kmark937 on 2014-12-25T04:53:11.000Z:

Can confirm that this is still an issue with RC3.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #13 originally posted by kmark937 on 2014-12-28T02:43:35.000Z:

Using the supplied google-frameworks.apk in this issue (which I failed to notice beforehand somehow) I've successfully decoded the latest release of Hangouts on RC3.

Thanks, Connor.

Owner

iBotPeaches commented Mar 18, 2015

Comment #13 originally posted by kmark937 on 2014-12-28T02:43:35.000Z:

Using the supplied google-frameworks.apk in this issue (which I failed to notice beforehand somehow) I've successfully decoded the latest release of Hangouts on RC3.

Thanks, Connor.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #14 originally posted by lohith on 2015-01-02T19:51:33.000Z:

Same issue when the apk has dependency on appcompat-v7.

Could not decode attr value, using undecoded value instead: ns=android, name=touchscreenBlocksFocus, value=0xffffffff
I: Decoding values */* XMLs...
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x01010479
    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:60)
    at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResReferenceValue.java:47)
    at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlValue(ResScalarValue.java:57)
    at brut.androlib.res.data.value.ResStyleValue.serializeToResValuesXml(ResStyleValue.java:71)
    at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResources.java:565)
    at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:328)
    at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)
    at brut.androlib.ApkDecoder.decode(ApkDecoder.java:101)
    at brut.apktool.Main.cmdDecode(Main.java:165)
    at brut.apktool.Main.main(Main.java:81)

Any idea when this issue will be fixed or any other suggestion to get around this?

Thanks.

Owner

iBotPeaches commented Mar 18, 2015

Comment #14 originally posted by lohith on 2015-01-02T19:51:33.000Z:

Same issue when the apk has dependency on appcompat-v7.

Could not decode attr value, using undecoded value instead: ns=android, name=touchscreenBlocksFocus, value=0xffffffff
I: Decoding values */* XMLs...
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x01010479
    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:60)
    at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResReferenceValue.java:47)
    at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlValue(ResScalarValue.java:57)
    at brut.androlib.res.data.value.ResStyleValue.serializeToResValuesXml(ResStyleValue.java:71)
    at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResources.java:565)
    at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:328)
    at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)
    at brut.androlib.ApkDecoder.decode(ApkDecoder.java:101)
    at brut.apktool.Main.cmdDecode(Main.java:165)
    at brut.apktool.Main.main(Main.java:81)

Any idea when this issue will be fixed or any other suggestion to get around this?

Thanks.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #15 originally posted by connor.tumbleson on 2015-01-03T04:12:15.000Z:

@ Comment 14.

Assuming you are using the latest of the 2.0 release, then removing the outdated framework at $HOME/apktool/framework/1.apk will fix this.

Owner

iBotPeaches commented Mar 18, 2015

Comment #15 originally posted by connor.tumbleson on 2015-01-03T04:12:15.000Z:

@ Comment 14.

Assuming you are using the latest of the 2.0 release, then removing the outdated framework at $HOME/apktool/framework/1.apk will fix this.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #16 originally posted by heath.borders on 2015-01-19T15:07:58.000Z:

On a mac, the framework file is located in ~/Library/apktool/framework/1.apk

Owner

iBotPeaches commented Mar 18, 2015

Comment #16 originally posted by heath.borders on 2015-01-19T15:07:58.000Z:

On a mac, the framework file is located in ~/Library/apktool/framework/1.apk

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #17 originally posted by hemanth.br20 on 2015-01-20T17:55:27.000Z:

Same problem while decompiling the "Settings.apk" using latest Apktool 2.0.0-RC3
I'm getting the same error even after removing the outdated framework at $HOME/apktool/framework/1.apk

I: Using Apktool 2.0.0-RC3 on Settings.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Jarvis\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=summary, value=0x0104070e
I: Decoding values */* XMLs...
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x0104070e
    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: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.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:41)
    at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlResourceParser.java:369)
    at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(XmlPullParserDelegate.java:69)
    at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(StaticXmlSerializerWrapper.java:267)
    at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(StaticXmlSerializerWrapper.java:211)
    at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamDecoder.java:83)
    at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:141)
    at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:33)
    at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:114)
    at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:99)
    at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:323)
    at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)
    at brut.androlib.ApkDecoder.decode(ApkDecoder.java:101)
    at brut.apktool.Main.cmdDecode(Main.java:165)
    at brut.apktool.Main.main(Main.java:81)
Owner

iBotPeaches commented Mar 18, 2015

Comment #17 originally posted by hemanth.br20 on 2015-01-20T17:55:27.000Z:

Same problem while decompiling the "Settings.apk" using latest Apktool 2.0.0-RC3
I'm getting the same error even after removing the outdated framework at $HOME/apktool/framework/1.apk

I: Using Apktool 2.0.0-RC3 on Settings.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Jarvis\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=summary, value=0x0104070e
I: Decoding values */* XMLs...
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x0104070e
    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: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.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:41)
    at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlResourceParser.java:369)
    at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(XmlPullParserDelegate.java:69)
    at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(StaticXmlSerializerWrapper.java:267)
    at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(StaticXmlSerializerWrapper.java:211)
    at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamDecoder.java:83)
    at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:141)
    at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:33)
    at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:114)
    at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:99)
    at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:323)
    at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)
    at brut.androlib.ApkDecoder.decode(ApkDecoder.java:101)
    at brut.apktool.Main.cmdDecode(Main.java:165)
    at brut.apktool.Main.main(Main.java:81)
@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

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.

Owner

iBotPeaches commented Mar 18, 2015

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.

@iBotPeaches iBotPeaches added Bug and removed Milestone-v2.0 labels Mar 18, 2015

@iBotPeaches iBotPeaches added this to the v2.0.0 Gold milestone Mar 18, 2015

@iBotPeaches iBotPeaches self-assigned this Mar 18, 2015

@iBotPeaches iBotPeaches removed this from the v2.0.0 Gold milestone Apr 4, 2015

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Dec 17, 2015

Owner

While investigating #1103 , it had the same issue of this. A reference that points to a resource that doesn't exist. Not quite sure why this is happening yet, whether its an improper decode of a different type of resource.

Maybe we need to check if a resource exists in the private package (0x7f), if it doesn't then set to @null. Something is weird.

Owner

iBotPeaches commented Dec 17, 2015

While investigating #1103 , it had the same issue of this. A reference that points to a resource that doesn't exist. Not quite sure why this is happening yet, whether its an improper decode of a different type of resource.

Maybe we need to check if a resource exists in the private package (0x7f), if it doesn't then set to @null. Something is weird.

@iBotPeaches iBotPeaches added this to the 2.2.0 milestone Aug 6, 2016

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Aug 6, 2016

Owner

Very old bug. I found in the instances that this happened, they were parent tags in the styles.xml file pointing to a local resource that doesn't exist.

So then I thought the decode was missing some resources, but the failing ID didn't exist in the apk nor were then any errors -

➜  Bug635 aapt d resources com.google.android.apps.plus_4.4.0.67576161.apk | grep 'CONFIG'

So if the parent of a style doesn't exist, we just don't write out the parent tag. This may lead to errors, but worked in this case and allows decode to succeed.

➜  Bug635 apktool d com.google.android.apps.plus_4.4.0.67576161.apk -f
I: Using Apktool 2.2.0-e1dd43-SNAPSHOT on com.google.android.apps.plus_4.4.0.67576161.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...
➜  Bug635 apktool b com.google.android.apps.plus_4.4.0.67576161
I: Using Apktool 2.2.0-e1dd43-SNAPSHOT
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
W: warning: string 'auth_client_needs_enabling_title' has no default translation.
W: warning: string 'auth_client_needs_installation_title' has no default translation.
W: warning: string 'auth_client_needs_update_title' has no default translation.
W: warning: string 'auth_client_play_services_err_notification_msg' has no default translation.
W: warning: string 'auth_client_requested_by_msg' has no default translation.
W: warning: string 'auth_client_using_bad_version_title' has no default translation.
I: Copying libs... (/lib)
I: Building apk file...
I: Copying unknown files/dir...
➜  Bug635 
Owner

iBotPeaches commented Aug 6, 2016

Very old bug. I found in the instances that this happened, they were parent tags in the styles.xml file pointing to a local resource that doesn't exist.

So then I thought the decode was missing some resources, but the failing ID didn't exist in the apk nor were then any errors -

➜  Bug635 aapt d resources com.google.android.apps.plus_4.4.0.67576161.apk | grep 'CONFIG'

So if the parent of a style doesn't exist, we just don't write out the parent tag. This may lead to errors, but worked in this case and allows decode to succeed.

➜  Bug635 apktool d com.google.android.apps.plus_4.4.0.67576161.apk -f
I: Using Apktool 2.2.0-e1dd43-SNAPSHOT on com.google.android.apps.plus_4.4.0.67576161.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...
➜  Bug635 apktool b com.google.android.apps.plus_4.4.0.67576161
I: Using Apktool 2.2.0-e1dd43-SNAPSHOT
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
W: warning: string 'auth_client_needs_enabling_title' has no default translation.
W: warning: string 'auth_client_needs_installation_title' has no default translation.
W: warning: string 'auth_client_needs_update_title' has no default translation.
W: warning: string 'auth_client_play_services_err_notification_msg' has no default translation.
W: warning: string 'auth_client_requested_by_msg' has no default translation.
W: warning: string 'auth_client_using_bad_version_title' has no default translation.
I: Copying libs... (/lib)
I: Building apk file...
I: Copying unknown files/dir...
➜  Bug635 

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

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