Cannot decompile LGSystemUI #822

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

Comments

Projects
None yet
1 participant
@iBotPeaches
Owner

iBotPeaches commented Mar 18, 2015

Original issue 713 created by szecslasz on 2014-11-28T16:17:38.000Z:

Windows 8.1, VTS, framework properly installed. Framework-res.apk and lge-res.apk can be decompiled. But all other system apps not.

17:14:59.154: [Error] - ApkTool.DecompileApk: 'ApkTool: I: Using Apktool 2.0.0-RC3 on CB5212.apk'
17:14:59.154: [Error] - ApkTool.DecompileApk: 'ApkTool: I: Loading resource table...'
17:14:59.154: [Error] - ApkTool.DecompileApk: 'ApkTool: I: Decoding AndroidManifest.xml with resources...'
17:14:59.154: [Error] - ApkTool.DecompileApk: 'ApkTool: I: Loading resource table from file: C:\Users\László\apktool\framework\1-GWR.apk'
17:14:59.154: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=android, name=label, value=0x7f09025a'
17:14:59.154: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=android, name=icon, value=0x7f0201b0'
17:14:59.154: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=androidprv, name=primaryUserOnly, value=0xffffffff'
17:14:59.154: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=androidprv, name=primaryUserOnly, value=0xffffffff'
17:14:59.154: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x01030594'
17:14:59.154: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x7f0a0015'
17:14:59.154: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=android, name=label, value=0x7f0902e6'
17:14:59.154: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=android, name=resumeWhilePausing, value=0xffffffff'
17:14:59.154: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x7f0a0014'
17:14:59.154: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=android, name=label, value=0x7f0902e6'
17:14:59.154: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=android, name=resumeWhilePausing, value=0xffffffff'
17:14:59.154: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010305ab'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010305ab'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010305ab'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010305ab'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010305ab'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010305ab'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=android, name=label, value=0x7f090321'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=android, name=label, value=0x7f090259'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=android, name=label, value=0x7f090321'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=android, name=enabled, value=0x7f0f0040'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=android, name=label, value=0x7f090322'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=android, name=icon, value=0x7f030001'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=android, name=label, value=0x7f090347'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=androidprv, name=primaryUserOnly, value=0xffffffff'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=androidprv, name=primaryUserOnly, value=0xffffffff'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=android, name=icon, value=0x7f0200bf'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=android, name=label, value=0x7f0900ba'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=android, name=label, value=0x7f0900ba'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=android, name=icon, value=0x7f0200bf'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=android, name=label, value=0x7f0901ef'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x020a01cb'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: Exception in thread "main" java.lang.NullPointerException'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: at java.io.Writer.write(Writer.java:157)'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: at brut.androlib.res.util.ExtMXSerializer.writeAttributeValue(ExtMXSerializer.java:38)'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: at org.xmlpull.mxp1_serializer.MXSerializer.attribute(MXSerializer.java:673)'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: at org.xmlpull.v1.wrapper.classic.XmlSerializerDelegate.attribute(XmlSerializerDelegate.java:106)'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(StaticXmlSerializerWrapper.java:267)'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(StaticXmlSerializerWrapper.java:211)'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamDecoder.java:83)'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:141)'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: at brut.androlib.res.decoder.XmlPullStreamDecoder.decodeManifest(XmlPullStreamDecoder.java:153)'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecoder.java:134)'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:296)'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: at brut.androlib.ApkDecoder.decode(ApkDecoder.java:101)'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: at brut.apktool.Main.cmdDecode(Main.java:165)'
17:14:59.155: [Error] - ApkTool.DecompileApk: 'ApkTool: at brut.apktool.Main.main(Main.java:81)'
17:14:59.155: [Debug] - ApkTool.DecompileApk: 'ApkTool failed, see log for further details'
17:14:59.155: [Debug] - ApkTool.DecompileApk: 'Exitcode: 1'
17:14:59.159: [Error] - ApkToolDecompileModule.ExecuteInternal: 'LGSystemUI -> Decompile resources : Decompiling resource files failed!'
17:14:59.159: [Error] - Script.ExecuteScript: 'Executing LGSystemUI -> Decompile resources failed!'
17:14:59.159: [Error] - Script.ExecuteScript: 'Failed module is essential, aborting script execution!'
17:14:59.169: [Debug] - TenProjectViewModel.LoadBackups: 'Found 0 backups for project 'LGSystemUI''
17:14:59.313: [Debug] - ApkProjectViewModel.AnalyzeAdditionalData: 'Project 'LGSystemUI' doesn't have any contents, aborting load of additional data.'

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #1 originally posted by jaroslav@dronsky.ru on 2014-11-28T18:59:32.000Z:

Same here. LG G3 running official Lolipop. I was trying to decompile QRemote (IR blaster app), both lge_res.apk and framework_res.apk were installed.

Log: http://pastebin.com/SfJcjdvw

Owner

iBotPeaches commented Mar 18, 2015

Comment #1 originally posted by jaroslav@dronsky.ru on 2014-11-28T18:59:32.000Z:

Same here. LG G3 running official Lolipop. I was trying to decompile QRemote (IR blaster app), both lge_res.apk and framework_res.apk were installed.

Log: http://pastebin.com/SfJcjdvw

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #2 originally posted by jaroslav@dronsky.ru on 2014-11-28T19:21:11.000Z:

You can grab all mentioned APK's here. I tried to decompile "base.apk".

https://drive.google.com/folderview?id=0B2t3Ypff6A6dX3VCY3U3R2JIRzg&usp=sharing

Owner

iBotPeaches commented Mar 18, 2015

Comment #2 originally posted by jaroslav@dronsky.ru on 2014-11-28T19:21:11.000Z:

You can grab all mentioned APK's here. I tried to decompile "base.apk".

https://drive.google.com/folderview?id=0B2t3Ypff6A6dX3VCY3U3R2JIRzg&usp=sharing

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #3 originally posted by connor.tumbleson on 2014-11-30T13:03:57.000Z:

I duplicate. Multiple issues here.

lge-res.apk is being installed as 0.apk when its package id is 2.

base.apk & target apk both are package id of 127, but share resources

This causes the attributes to be undefined, hint "could not decode attr errors". Will investigate.

Owner

iBotPeaches commented Mar 18, 2015

Comment #3 originally posted by connor.tumbleson on 2014-11-30T13:03:57.000Z:

I duplicate. Multiple issues here.

lge-res.apk is being installed as 0.apk when its package id is 2.

base.apk & target apk both are package id of 127, but share resources

This causes the attributes to be undefined, hint "could not decode attr errors". Will investigate.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #4 originally posted by hidingfromhidden on 2014-12-18T11:40:02.000Z:

I get similar errors while trying to decompile a Play Store APK.

I: Using Apktool 2.0.0-2bd1e5-SNAPSHOT on sg_gov_lta_taxitaxisg-4.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\angelsl\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=, name=class, value=0x00000004
Exception in thread "main" java.lang.NullPointerException
at java.io.Writer.write(Unknown Source)
at brut.androlib.res.util.ExtMXSerializer.writeAttributeValue(ExtMXSerializer.java:38)
at org.xmlpull.mxp1_serializer.MXSerializer.attribute(MXSerializer.java:673)
at org.xmlpull.v1.wrapper.classic.XmlSerializerDelegate.attribute(XmlSerializerDelegate.java:106)
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 #4 originally posted by hidingfromhidden on 2014-12-18T11:40:02.000Z:

I get similar errors while trying to decompile a Play Store APK.

I: Using Apktool 2.0.0-2bd1e5-SNAPSHOT on sg_gov_lta_taxitaxisg-4.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\angelsl\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=, name=class, value=0x00000004
Exception in thread "main" java.lang.NullPointerException
at java.io.Writer.write(Unknown Source)
at brut.androlib.res.util.ExtMXSerializer.writeAttributeValue(ExtMXSerializer.java:38)
at org.xmlpull.mxp1_serializer.MXSerializer.attribute(MXSerializer.java:673)
at org.xmlpull.v1.wrapper.classic.XmlSerializerDelegate.attribute(XmlSerializerDelegate.java:106)
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 #5 originally posted by connor.tumbleson on 2014-12-22T12:24:45.000Z:

Assigning lge-res.apk being installed improperly as # 713-1 and base & target sharing same package id as # 713-2.

# 713-1 makes no sense. Apktool is doing nothing wrong, the APK has shown in a hex output (http://i.imgur.com/o2oRkgK.png) has the package ID (which is right before package name) as 00.

So I took a look at AOSP documentation. https://github.com/android/platform_frameworks_base/blob/master/include/androidfw/ResourceTypes.h#L833

// If this is a base package, its ID. Package IDs start
// at 1 (corresponding to the value of the package bits in a
// resource identifier). 0 means this is not a base package.
uint32_t id;

So maybe lge-res.apk is not a base package or maybe its some new fancy method of obfuscation / fancy OEM tricks. Since the error message of # 713-2 doesn't have a package ID of 0x00 or 0x02, then its probably safe to say this isn't the problem.

Investigation of # 713-2 is as follows. Using the pattern of installing the frameworks. The APKs included from comment # 2 showed.

i) com.lge.qremote.apk - no issue decoding
ii) com.lge.app.floating.res.apk - no issue decoding
iii) com.lge.sui.widget.apk - failed (ResBoolValue cannot be cast to ResAttr)
iv) LGFormManager.apk - no issue decoding
v) LGSettings.apk - failed (Undefined 0x7f attributes)
vi) LGSystemServer.apk - no issue decoding
vii) LGSystemUI.apk - failed (Same as v)
viii) QuicksetSDK.apk - no issue decoding
ix) UnifiedEULA.apk - failed (Same as v)

So basically (iii) is a completely non-related bug. The apks of interest are (v), (vii) and (ix).

Owner

iBotPeaches commented Mar 18, 2015

Comment #5 originally posted by connor.tumbleson on 2014-12-22T12:24:45.000Z:

Assigning lge-res.apk being installed improperly as # 713-1 and base & target sharing same package id as # 713-2.

# 713-1 makes no sense. Apktool is doing nothing wrong, the APK has shown in a hex output (http://i.imgur.com/o2oRkgK.png) has the package ID (which is right before package name) as 00.

So I took a look at AOSP documentation. https://github.com/android/platform_frameworks_base/blob/master/include/androidfw/ResourceTypes.h#L833

// If this is a base package, its ID. Package IDs start
// at 1 (corresponding to the value of the package bits in a
// resource identifier). 0 means this is not a base package.
uint32_t id;

So maybe lge-res.apk is not a base package or maybe its some new fancy method of obfuscation / fancy OEM tricks. Since the error message of # 713-2 doesn't have a package ID of 0x00 or 0x02, then its probably safe to say this isn't the problem.

Investigation of # 713-2 is as follows. Using the pattern of installing the frameworks. The APKs included from comment # 2 showed.

i) com.lge.qremote.apk - no issue decoding
ii) com.lge.app.floating.res.apk - no issue decoding
iii) com.lge.sui.widget.apk - failed (ResBoolValue cannot be cast to ResAttr)
iv) LGFormManager.apk - no issue decoding
v) LGSettings.apk - failed (Undefined 0x7f attributes)
vi) LGSystemServer.apk - no issue decoding
vii) LGSystemUI.apk - failed (Same as v)
viii) QuicksetSDK.apk - no issue decoding
ix) UnifiedEULA.apk - failed (Same as v)

So basically (iii) is a completely non-related bug. The apks of interest are (v), (vii) and (ix).

@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-12-22T12:28:24.000Z:

As a quick follow-up. All the missing resources in (ix) are found in the apk.

ibotpeaches@raganok:/Downloads/Apktool/Bug713$ aapt d resources UnifiedEULA.apk | grep '0x7f080000'
... 40 lines
ibotpeaches@raganok:
/Downloads/Apktool/Bug713$ aapt d resources UnifiedEULA.apk | grep '0x7f02000c'
... 9 lines
ibotpeaches@raganok:~/Downloads/Apktool/Bug713$ aapt d resources UnifiedEULA.apk | grep '0x7f08001e'
... 30 lines

All return results. This points towards an improper decoding and assigning of resources on Apktool's side. This is better than having to attempt a merge of a resource pool between alike package ids. The culprit seems to be apktool's resource decoding.

Owner

iBotPeaches commented Mar 18, 2015

Comment #6 originally posted by connor.tumbleson on 2014-12-22T12:28:24.000Z:

As a quick follow-up. All the missing resources in (ix) are found in the apk.

ibotpeaches@raganok:/Downloads/Apktool/Bug713$ aapt d resources UnifiedEULA.apk | grep '0x7f080000'
... 40 lines
ibotpeaches@raganok:
/Downloads/Apktool/Bug713$ aapt d resources UnifiedEULA.apk | grep '0x7f02000c'
... 9 lines
ibotpeaches@raganok:~/Downloads/Apktool/Bug713$ aapt d resources UnifiedEULA.apk | grep '0x7f08001e'
... 30 lines

All return results. This points towards an improper decoding and assigning of resources on Apktool's side. This is better than having to attempt a merge of a resource pool between alike package ids. The culprit seems to be apktool's resource decoding.

@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-12-22T13:22:45.000Z:

So the problem has been found, the solution has not been started.

We have attributes that have references to internal resources (0x7F), so ie you have attr="@0x7F080000" etc. We try to follow this reference, but it hasn't been decoded yet so we encounter an UndefinedRes error.

I need to add support for delayed loading of attributes. These attributes are present after the APK is fully loaded, but since we decode as we load we encounter errors. We should decode all resources, but tag the attrs that need to be decoded later.

Usually this hasn't been a problem since attrs are first or the attr is from a shared public framework.

Owner

iBotPeaches commented Mar 18, 2015

Comment #7 originally posted by connor.tumbleson on 2014-12-22T13:22:45.000Z:

So the problem has been found, the solution has not been started.

We have attributes that have references to internal resources (0x7F), so ie you have attr="@0x7F080000" etc. We try to follow this reference, but it hasn't been decoded yet so we encounter an UndefinedRes error.

I need to add support for delayed loading of attributes. These attributes are present after the APK is fully loaded, but since we decode as we load we encounter errors. We should decode all resources, but tag the attrs that need to be decoded later.

Usually this hasn't been a problem since attrs are first or the attr is from a shared public framework.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #8 originally posted by connor.tumbleson on 2014-12-22T22:04:01.000Z:

Yeah this is a problem in the current design of Apktool. Say we write the files using the unresolved name (ie @0x7F08000), then we have that in the file and stored in an array saying it needs to be resolved.

Unfortunately re-locating this reference in the file is quite difficult. We would have to reparse the XML files and then crawl them looking for our reference to change. This is damn slow, especially if we need to do it for 100+ files. I need to adapt apktool to delay writing of files if it has unresolved resources.

However, apktool isn't multi-threaded so things go in turns and simply cannot be paused as that will prevent the next file from being decoded and thus a deadlock since we have a circle of waiting.

This is a big undertaking. I'm going to take a few days and talk to some people and try and figure out a good plan of attack for this, as I fear more apks/oems will be affected soon.


This exact problem happened before with missing name/value pairs in the manifest. Except these missing attrs were public (0x01), so I could simply reference the framework for the resource. This I believe was bug # 512.

Owner

iBotPeaches commented Mar 18, 2015

Comment #8 originally posted by connor.tumbleson on 2014-12-22T22:04:01.000Z:

Yeah this is a problem in the current design of Apktool. Say we write the files using the unresolved name (ie @0x7F08000), then we have that in the file and stored in an array saying it needs to be resolved.

Unfortunately re-locating this reference in the file is quite difficult. We would have to reparse the XML files and then crawl them looking for our reference to change. This is damn slow, especially if we need to do it for 100+ files. I need to adapt apktool to delay writing of files if it has unresolved resources.

However, apktool isn't multi-threaded so things go in turns and simply cannot be paused as that will prevent the next file from being decoded and thus a deadlock since we have a circle of waiting.

This is a big undertaking. I'm going to take a few days and talk to some people and try and figure out a good plan of attack for this, as I fear more apks/oems will be affected soon.


This exact problem happened before with missing name/value pairs in the manifest. Except these missing attrs were public (0x01), so I could simply reference the framework for the resource. This I believe was bug # 512.

@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-12-24T14:25:08.000Z:

Okay back to # 713-1. A packageId of 0 indicates a shared library resource. This means the packageId is assigned at runtime. However, the resources internally are still assigned a packageId that is not zero so mapping can occur.

/**

  • A shared library package-id to package name entry.
    */
    struct ResTable_lib_entry
    {
    // The package-id this shared library was assigned at build time.
    // We use a uint32 to keep the structure aligned on a uint32 boundary.
    uint32_t packageId;

    // The package name of the shared library. \0 terminated.
    char16_t packageName[128];
    

    };

This block of code shows the mapping of the package name to ID. However, this struct is found no-where in the offending resources.arsc. You can find the first package name of "com lge" for the ResTable_package struct, but none other so finding the true packageId is unknown to me still.

I've been looking at the related commits which introduced shared packages

aosp-mirror/platform_frameworks_base@de898ff
aosp-mirror/platform_frameworks_base@6022deb

Though no luck. Enjoy the holidays. Will research more soon.

Owner

iBotPeaches commented Mar 18, 2015

Comment #9 originally posted by connor.tumbleson on 2014-12-24T14:25:08.000Z:

Okay back to # 713-1. A packageId of 0 indicates a shared library resource. This means the packageId is assigned at runtime. However, the resources internally are still assigned a packageId that is not zero so mapping can occur.

/**

  • A shared library package-id to package name entry.
    */
    struct ResTable_lib_entry
    {
    // The package-id this shared library was assigned at build time.
    // We use a uint32 to keep the structure aligned on a uint32 boundary.
    uint32_t packageId;

    // The package name of the shared library. \0 terminated.
    char16_t packageName[128];
    

    };

This block of code shows the mapping of the package name to ID. However, this struct is found no-where in the offending resources.arsc. You can find the first package name of "com lge" for the ResTable_package struct, but none other so finding the true packageId is unknown to me still.

I've been looking at the related commits which introduced shared packages

aosp-mirror/platform_frameworks_base@de898ff
aosp-mirror/platform_frameworks_base@6022deb

Though no luck. Enjoy the holidays. Will research more soon.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #10 originally posted by connor.tumbleson on 2014-12-25T20:31:21.000Z:

e9d21f8

RC4 / 2.0 Gold will contain fix.

Owner

iBotPeaches commented Mar 18, 2015

Comment #10 originally posted by connor.tumbleson on 2014-12-25T20:31:21.000Z:

e9d21f8

RC4 / 2.0 Gold will contain fix.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #11 originally posted by yoav.goop on 2014-12-26T07:32:55.000Z:

I still cannot decompile it.
My code:

apktool if framework-res.apk
apktool if lge-res.apk

now in java based on the github repo:

ApkDecoder decoder = new ApkDecoder();
decoder.setApkFile(new File("C:\Users\Yoav\Downloads\android\LGSystemUI.apk"));
decoder.setApi(21);
decoder.setOutDir(new File("C:\Users\Yoav\Downloads\android\lgsystemui"));
decoder.decode();

Log:
דצמ 26, 2014 9:31:02 AM brut.androlib.ApkDecoder decode
INFO: Using Apktool 2.0.0-dirty on LGSystemUI.apk
דצמ 26, 2014 9:31:02 AM brut.androlib.res.AndrolibResources loadMainPkg
INFO: Loading resource table...
דצמ 26, 2014 9:31:02 AM brut.androlib.res.decoder.ARSCDecoder readLibraryType
INFO: Decoding Shared Library (com.lge), pkgId: 2
דצמ 26, 2014 9:31:04 AM brut.androlib.res.AndrolibResources decode
INFO: Decoding AndroidManifest.xml with resources...
דצמ 26, 2014 9:31:04 AM brut.androlib.res.AndrolibResources loadFrameworkPkg
INFO: Loading resource table from file: C:\Users\Yoav\apktool\framework\1.apk
דצמ 26, 2014 9:31:05 AM brut.androlib.res.decoder.AXmlResourceParser getAttributeValue
WARNING: Could not decode attr value, using undecoded value instead: ns=android, name=versionCode, value=0x00000015
brut.androlib.AndrolibException: Expected pkg of id: 1, got: 2
at brut.androlib.res.AndrolibResources.loadFrameworkPkg(AndrolibResources.java:139)
at brut.androlib.res.data.ResTable.getPackage(ResTable.java:74)
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 brut.androlib.res.decoder.XmlPullStreamDecoder$1.parseManifest(XmlPullStreamDecoder.java:97)
at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamDecoder.java:65)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:141)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decodeManifest(XmlPullStreamDecoder.java:153)
at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecoder.java:134)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:296)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:101)
at com.company.Main.main(Main.java:18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

דצמ 26, 2014 9:31:05 AM brut.androlib.res.AndrolibResources loadFrameworkPkg
INFO: Loading resource table from file: C:\Users\Yoav\apktool\framework\1.apk
דצמ 26, 2014 9:31:06 AM brut.androlib.res.decoder.AXmlResourceParser getAttributeValue
WARNING: Could not decode attr value, using undecoded value instead: ns=android, name=versionName, value=0x00000030
brut.androlib.AndrolibException: Expected pkg of id: 1, got: 2
at brut.androlib.res.AndrolibResources.loadFrameworkPkg(AndrolibResources.java:139)
at brut.androlib.res.data.ResTable.getPackage(ResTable.java:74)
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 brut.androlib.res.decoder.XmlPullStreamDecoder$1.parseManifest(XmlPullStreamDecoder.java:99)
at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamDecoder.java:65)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:141)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decodeManifest(XmlPullStreamDecoder.java:153)
at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecoder.java:134)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:296)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:101)
at com.company.Main.main(Main.java:18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

דצמ 26, 2014 9:31:06 AM brut.androlib.res.AndrolibResources loadFrameworkPkg
INFO: Loading resource table from file: C:\Users\Yoav\apktool\framework\1.apk
דצמ 26, 2014 9:31:08 AM brut.androlib.res.decoder.AXmlResourceParser getAttributeValue
WARNING: Could not decode attr value, using undecoded value instead: ns=android, name=sharedUserId, value=0x0000002e
brut.androlib.AndrolibException: Expected pkg of id: 1, got: 2
at brut.androlib.res.AndrolibResources.loadFrameworkPkg(AndrolibResources.java:139)
at brut.androlib.res.data.ResTable.getPackage(ResTable.java:74)
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.XmlPullStreamDecoder.decodeManifest(XmlPullStreamDecoder.java:153)
at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecoder.java:134)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:296)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:101)
at com.company.Main.main(Main.java:18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

Exception in thread "main" java.lang.NullPointerException
at java.io.Writer.write(Writer.java:157)
at brut.androlib.res.util.ExtMXSerializer.writeAttributeValue(ExtMXSerializer.java:38)
at org.xmlpull.mxp1_serializer.MXSerializer.attribute(MXSerializer.java:696)
at org.xmlpull.v1.wrapper.classic.XmlSerializerDelegate.attribute(XmlSerializerDelegate.java:106)
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.XmlPullStreamDecoder.decodeManifest(XmlPullStreamDecoder.java:153)
at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecoder.java:134)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:296)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:101)
at com.company.Main.main(Main.java:18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

Process finished with exit code 1

Owner

iBotPeaches commented Mar 18, 2015

Comment #11 originally posted by yoav.goop on 2014-12-26T07:32:55.000Z:

I still cannot decompile it.
My code:

apktool if framework-res.apk
apktool if lge-res.apk

now in java based on the github repo:

ApkDecoder decoder = new ApkDecoder();
decoder.setApkFile(new File("C:\Users\Yoav\Downloads\android\LGSystemUI.apk"));
decoder.setApi(21);
decoder.setOutDir(new File("C:\Users\Yoav\Downloads\android\lgsystemui"));
decoder.decode();

Log:
דצמ 26, 2014 9:31:02 AM brut.androlib.ApkDecoder decode
INFO: Using Apktool 2.0.0-dirty on LGSystemUI.apk
דצמ 26, 2014 9:31:02 AM brut.androlib.res.AndrolibResources loadMainPkg
INFO: Loading resource table...
דצמ 26, 2014 9:31:02 AM brut.androlib.res.decoder.ARSCDecoder readLibraryType
INFO: Decoding Shared Library (com.lge), pkgId: 2
דצמ 26, 2014 9:31:04 AM brut.androlib.res.AndrolibResources decode
INFO: Decoding AndroidManifest.xml with resources...
דצמ 26, 2014 9:31:04 AM brut.androlib.res.AndrolibResources loadFrameworkPkg
INFO: Loading resource table from file: C:\Users\Yoav\apktool\framework\1.apk
דצמ 26, 2014 9:31:05 AM brut.androlib.res.decoder.AXmlResourceParser getAttributeValue
WARNING: Could not decode attr value, using undecoded value instead: ns=android, name=versionCode, value=0x00000015
brut.androlib.AndrolibException: Expected pkg of id: 1, got: 2
at brut.androlib.res.AndrolibResources.loadFrameworkPkg(AndrolibResources.java:139)
at brut.androlib.res.data.ResTable.getPackage(ResTable.java:74)
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 brut.androlib.res.decoder.XmlPullStreamDecoder$1.parseManifest(XmlPullStreamDecoder.java:97)
at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamDecoder.java:65)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:141)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decodeManifest(XmlPullStreamDecoder.java:153)
at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecoder.java:134)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:296)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:101)
at com.company.Main.main(Main.java:18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

דצמ 26, 2014 9:31:05 AM brut.androlib.res.AndrolibResources loadFrameworkPkg
INFO: Loading resource table from file: C:\Users\Yoav\apktool\framework\1.apk
דצמ 26, 2014 9:31:06 AM brut.androlib.res.decoder.AXmlResourceParser getAttributeValue
WARNING: Could not decode attr value, using undecoded value instead: ns=android, name=versionName, value=0x00000030
brut.androlib.AndrolibException: Expected pkg of id: 1, got: 2
at brut.androlib.res.AndrolibResources.loadFrameworkPkg(AndrolibResources.java:139)
at brut.androlib.res.data.ResTable.getPackage(ResTable.java:74)
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 brut.androlib.res.decoder.XmlPullStreamDecoder$1.parseManifest(XmlPullStreamDecoder.java:99)
at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamDecoder.java:65)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:141)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decodeManifest(XmlPullStreamDecoder.java:153)
at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecoder.java:134)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:296)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:101)
at com.company.Main.main(Main.java:18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

דצמ 26, 2014 9:31:06 AM brut.androlib.res.AndrolibResources loadFrameworkPkg
INFO: Loading resource table from file: C:\Users\Yoav\apktool\framework\1.apk
דצמ 26, 2014 9:31:08 AM brut.androlib.res.decoder.AXmlResourceParser getAttributeValue
WARNING: Could not decode attr value, using undecoded value instead: ns=android, name=sharedUserId, value=0x0000002e
brut.androlib.AndrolibException: Expected pkg of id: 1, got: 2
at brut.androlib.res.AndrolibResources.loadFrameworkPkg(AndrolibResources.java:139)
at brut.androlib.res.data.ResTable.getPackage(ResTable.java:74)
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.XmlPullStreamDecoder.decodeManifest(XmlPullStreamDecoder.java:153)
at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecoder.java:134)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:296)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:101)
at com.company.Main.main(Main.java:18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

Exception in thread "main" java.lang.NullPointerException
at java.io.Writer.write(Writer.java:157)
at brut.androlib.res.util.ExtMXSerializer.writeAttributeValue(ExtMXSerializer.java:38)
at org.xmlpull.mxp1_serializer.MXSerializer.attribute(MXSerializer.java:696)
at org.xmlpull.v1.wrapper.classic.XmlSerializerDelegate.attribute(XmlSerializerDelegate.java:106)
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.XmlPullStreamDecoder.decodeManifest(XmlPullStreamDecoder.java:153)
at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecoder.java:134)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:296)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:101)
at com.company.Main.main(Main.java:18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

Process finished with exit code 1

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #12 originally posted by yoav.goop on 2014-12-26T07:35:35.000Z:

Update:
I had to play with the naming of 0.apk and 1.apk in order to make it work. it should be 1 and 2 (don't remember which is which).

Owner

iBotPeaches commented Mar 18, 2015

Comment #12 originally posted by yoav.goop on 2014-12-26T07:35:35.000Z:

Update:
I had to play with the naming of 0.apk and 1.apk in order to make it work. it should be 1 and 2 (don't remember which is which).

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