Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file #1131

Closed
HOumoumen opened this Issue Jan 9, 2016 · 19 comments

Comments

Projects
None yet
10 participants
@HOumoumen
Hamids-MBP:apk Hamid$ ./apktool d roqya.apk
I: Using Apktool 2.0.0 on roqya.apk
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file
    at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:52)
    at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:538)
    at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:63)
    at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:55)
    at brut.androlib.Androlib.getResTable(Androlib.java:64)
    at brut.androlib.ApkDecoder.setTargetSdkVersion(ApkDecoder.java:209)
    at brut.androlib.ApkDecoder.decode(ApkDecoder.java:92)
    at brut.apktool.Main.cmdDecode(Main.java:165)
    at brut.apktool.Main.main(Main.java:81)
Caused by: java.io.IOException: Expected: 0x00000008, got: 0x00000001
    at brut.util.ExtDataInput.skipCheckShort(ExtDataInput.java:56)
    at brut.androlib.res.decoder.ARSCDecoder.readValue(ARSCDecoder.java:238)
    at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:201)
    at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:189)
    at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:157)
    at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:114)
    at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:78)
    at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:47)
    ... 8 more
@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Jan 14, 2016

Owner

Looks like duplicate of #1121 , but I haven't got an APK for either.

Owner

iBotPeaches commented Jan 14, 2016

Looks like duplicate of #1121 , but I haven't got an APK for either.

@wanam

This comment has been minimized.

Show comment
Hide comment
@wanam

wanam Jan 14, 2016

I'm getting the same issue on the new TW M builds with the latest apktool release and master branch:

I: Using Apktool 2.1.0-a64a03-SNAPSHOT on framework-res.apk
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:52)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:544)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:63)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:55)
at brut.androlib.Androlib.getResTable(Androlib.java:67)
at brut.androlib.ApkDecoder.setTargetSdkVersion(ApkDecoder.java:198)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:96)
at brut.apktool.Main.cmdDecode(Main.java:165)
at brut.apktool.Main.main(Main.java:81)
Caused by: java.io.IOException: Expected: 0x00000008, got: 0x00000000
at brut.util.ExtDataInput.skipCheckShort(ExtDataInput.java:56)
at brut.androlib.res.decoder.ARSCDecoder.readValue(ARSCDecoder.java:282)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:224)
at brut.androlib.res.decoder.ARSCDecoder.readTableType(ARSCDecoder.java:212)
at brut.androlib.res.decoder.ARSCDecoder.readTableTypeSpec(ARSCDecoder.java:154)
at brut.androlib.res.decoder.ARSCDecoder.readTablePackage(ARSCDecoder.java:116)
at brut.androlib.res.decoder.ARSCDecoder.readTableHeader(ARSCDecoder.java:78)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:47)
... 8 more

Apk: https://www.dropbox.com/s/i80xi2uyjlfttji/framework-res.apk?dl=0

wanam commented Jan 14, 2016

I'm getting the same issue on the new TW M builds with the latest apktool release and master branch:

I: Using Apktool 2.1.0-a64a03-SNAPSHOT on framework-res.apk
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:52)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:544)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:63)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:55)
at brut.androlib.Androlib.getResTable(Androlib.java:67)
at brut.androlib.ApkDecoder.setTargetSdkVersion(ApkDecoder.java:198)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:96)
at brut.apktool.Main.cmdDecode(Main.java:165)
at brut.apktool.Main.main(Main.java:81)
Caused by: java.io.IOException: Expected: 0x00000008, got: 0x00000000
at brut.util.ExtDataInput.skipCheckShort(ExtDataInput.java:56)
at brut.androlib.res.decoder.ARSCDecoder.readValue(ARSCDecoder.java:282)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:224)
at brut.androlib.res.decoder.ARSCDecoder.readTableType(ARSCDecoder.java:212)
at brut.androlib.res.decoder.ARSCDecoder.readTableTypeSpec(ARSCDecoder.java:154)
at brut.androlib.res.decoder.ARSCDecoder.readTablePackage(ARSCDecoder.java:116)
at brut.androlib.res.decoder.ARSCDecoder.readTableHeader(ARSCDecoder.java:78)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:47)
... 8 more

Apk: https://www.dropbox.com/s/i80xi2uyjlfttji/framework-res.apk?dl=0

@mythtrandyr

This comment has been minimized.

Show comment
Hide comment
@mythtrandyr

mythtrandyr Jan 14, 2016

@wanam
Use Apktool v2.0.0 for TW M framework-res & other file

@wanam
Use Apktool v2.0.0 for TW M framework-res & other file

@wanam

This comment has been minimized.

Show comment
Hide comment
@wanam

wanam Jan 15, 2016

@mythtrandyr Nice catch, 2.0.0 is working fine.
@iBotPeaches Is this a regression?

wanam commented Jan 15, 2016

@mythtrandyr Nice catch, 2.0.0 is working fine.
@iBotPeaches Is this a regression?

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Jan 15, 2016

Owner

Confirmed.

Owner

iBotPeaches commented Jan 15, 2016

Confirmed.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Jan 22, 2016

Owner

Yeah this is strange and regression. I thought the problem occurred during my massive changes in 2.0.3, but this is isolated to changes between 2.0.0 and 2.0.1. More importantly during the read of ConfigFlags.

Working on a fix.

Owner

iBotPeaches commented Jan 22, 2016

Yeah this is strange and regression. I thought the problem occurred during my massive changes in 2.0.3, but this is isolated to changes between 2.0.0 and 2.0.1. More importantly during the read of ConfigFlags.

Working on a fix.

@omervk

This comment has been minimized.

Show comment
Hide comment
@omervk

omervk Feb 21, 2016

I have a similar issue. Would an additional APK sample help?

omervk commented Feb 21, 2016

I have a similar issue. Would an additional APK sample help?

@ShinySide

This comment has been minimized.

Show comment
Hide comment
@ShinySide

ShinySide Mar 12, 2016

@iBotPeaches Having the same issue with the Galaxy S7. I can install and decompile frameworks and secsettings with 2.0.0, other apks get the same error as above. If I switch to 2.0.3 or build form source, after installing frameworks, I receive a non stop entire apk of the following error (SecContacts was used in screenshot. Terminal wouldnt let me copy)

screenshot- https://drive.google.com/file/d/0B3FpYTXXDE_ARTlVYWtsM2o2R3M/view?usp=sharing

apks- https://drive.google.com/file/d/0B3FpYTXXDE_AbjF0NEpqNEQ2a1E/view?usp=sharing

@iBotPeaches Having the same issue with the Galaxy S7. I can install and decompile frameworks and secsettings with 2.0.0, other apks get the same error as above. If I switch to 2.0.3 or build form source, after installing frameworks, I receive a non stop entire apk of the following error (SecContacts was used in screenshot. Terminal wouldnt let me copy)

screenshot- https://drive.google.com/file/d/0B3FpYTXXDE_ARTlVYWtsM2o2R3M/view?usp=sharing

apks- https://drive.google.com/file/d/0B3FpYTXXDE_AbjF0NEpqNEQ2a1E/view?usp=sharing

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 30, 2016

Owner

This broke because of this commit - 6ee029d

If we revert this commit we break #924

On this bug.

76 bytes read (reverted) = good.
72 bytes read (not reverted) = bad

On #924
72 bytes read (not reverted) = good
68 bytes read (reverted) = bad

So patch or not something gets broken. I need to figure out why this is, but I now know the problem. Sorry for the delay.

Owner

iBotPeaches commented Mar 30, 2016

This broke because of this commit - 6ee029d

If we revert this commit we break #924

On this bug.

76 bytes read (reverted) = good.
72 bytes read (not reverted) = bad

On #924
72 bytes read (not reverted) = good
68 bytes read (reverted) = bad

So patch or not something gets broken. I need to figure out why this is, but I now know the problem. Sorry for the delay.

@jerdog

This comment has been minimized.

Show comment
Hide comment
@jerdog

jerdog Apr 8, 2016

Any update on this @iBotPeaches ?

jerdog commented Apr 8, 2016

Any update on this @iBotPeaches ?

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Apr 8, 2016

Owner

Unfortunately nothing easy. Like I had expected, simply reverting the commit that caused the problem this far down the commit line doesn't work. Trying to make this work with the current codebase I don't think is the best method of attack as tons of refactoring has occurred around it.

We just have big problem in which some APKs rely on reading the remaining bytes in a ResConfig while others rely on skipping the reading of these extra bytes. This is a combination of KNOWN_BYTESand this fix. I'm thinking of a command line parameter for advanced users that sets KNOWN_BYTES so if these edge cases present themselves they can be solved with some googling and a different parameter.

Owner

iBotPeaches commented Apr 8, 2016

Unfortunately nothing easy. Like I had expected, simply reverting the commit that caused the problem this far down the commit line doesn't work. Trying to make this work with the current codebase I don't think is the best method of attack as tons of refactoring has occurred around it.

We just have big problem in which some APKs rely on reading the remaining bytes in a ResConfig while others rely on skipping the reading of these extra bytes. This is a combination of KNOWN_BYTESand this fix. I'm thinking of a command line parameter for advanced users that sets KNOWN_BYTES so if these edge cases present themselves they can be solved with some googling and a different parameter.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Apr 11, 2016

Owner

Okay spent a good deal of time this weekend on this. While I don't have a fix, I have good news. I've isolated the problem down to this struct - https://github.com/android/platform_frameworks_base/blob/master/include/androidfw/ResourceTypes.h#L897

Before that function runs we are position 20 (byte) of the reader, at the end of it. We are at 72. 72 - 20 = 52 bytes.

    private static final int KNOWN_CONFIG_BYTES = 52;

That is exactly whats expected, so the problem doesn't make much sense. Before this function runs we have -

Or entriesStart variable. This allows us to skip the entire block if needed since we know where the next "block" begins. For this instance we see the entriesStart at 5140 (0x1414), but our actual value is 5136 or (0x1410). As you can see, there is the 4 missing bytes.

The entire time I spent looking for the missing 4 bytes I failed. Skipping these bytes might prove to cause a problem, but we know the mistake happens at this struct - https://github.com/android/platform_frameworks_base/blob/master/include/androidfw/ResourceTypes.h#L897

You can compare that struct to our reading here -

After multiple multiple checks, there is no error there.

So the fix. Currently our DataInput has no counter. I need to add a decorator or wrap it in a counting stream so I can get current position. If after key points in apktool's execution if the next position doesn't match whats expected we either have a bug, problem or a place to simply skip bytes and hope for the best.

Couple notes

  1. No I can't just raise KNOWN_CONFIG_BYTES. That matches the size variable of the ResConfig which is still 52.
  2. Yes the 52 is right. The read starts at position 20 and ends at 72. 72 - 20 = 52.
  3. Does the size (4 bytes) count towards that? As of now yes, but that would explain the missing 4 bytes. However simply skipping those 4 bytes break apks everywhere.
Owner

iBotPeaches commented Apr 11, 2016

Okay spent a good deal of time this weekend on this. While I don't have a fix, I have good news. I've isolated the problem down to this struct - https://github.com/android/platform_frameworks_base/blob/master/include/androidfw/ResourceTypes.h#L897

Before that function runs we are position 20 (byte) of the reader, at the end of it. We are at 72. 72 - 20 = 52 bytes.

    private static final int KNOWN_CONFIG_BYTES = 52;

That is exactly whats expected, so the problem doesn't make much sense. Before this function runs we have -

Or entriesStart variable. This allows us to skip the entire block if needed since we know where the next "block" begins. For this instance we see the entriesStart at 5140 (0x1414), but our actual value is 5136 or (0x1410). As you can see, there is the 4 missing bytes.

The entire time I spent looking for the missing 4 bytes I failed. Skipping these bytes might prove to cause a problem, but we know the mistake happens at this struct - https://github.com/android/platform_frameworks_base/blob/master/include/androidfw/ResourceTypes.h#L897

You can compare that struct to our reading here -

After multiple multiple checks, there is no error there.

So the fix. Currently our DataInput has no counter. I need to add a decorator or wrap it in a counting stream so I can get current position. If after key points in apktool's execution if the next position doesn't match whats expected we either have a bug, problem or a place to simply skip bytes and hope for the best.

Couple notes

  1. No I can't just raise KNOWN_CONFIG_BYTES. That matches the size variable of the ResConfig which is still 52.
  2. Yes the 52 is right. The read starts at position 20 and ends at 72. 72 - 20 = 52.
  3. Does the size (4 bytes) count towards that? As of now yes, but that would explain the missing 4 bytes. However simply skipping those 4 bytes break apks everywhere.
@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Apr 29, 2016

Owner
➜  Bug1131 apktool d framework-res.apk -f
I: Using Apktool 2.1.1-032a3e-SNAPSHOT on framework-res.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
➜  Bug1131 

Due to the complexity of this change. I'll need to test this a lot more, but it is working for the test suite and the original apk here. So thats good news.

Owner

iBotPeaches commented Apr 29, 2016

➜  Bug1131 apktool d framework-res.apk -f
I: Using Apktool 2.1.1-032a3e-SNAPSHOT on framework-res.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
➜  Bug1131 

Due to the complexity of this change. I'll need to test this a lot more, but it is working for the test suite and the original apk here. So thats good news.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Apr 29, 2016

Owner
➜  G930F_Galaxy_S7 apktool if framework-res.apk -t 1131
I: Framework installed to: /home/ibotpeaches/apktool/framework/1-1131.apk
➜  G930F_Galaxy_S7 apktool if twframework-res.apk -t 1131
I: Framework installed to: /home/ibotpeaches/apktool/framework/2-1131.apk
➜  G930F_Galaxy_S7 apktool d SecContacts_M.apk -t 1131
I: Using Apktool 2.1.1-032a3e-SNAPSHOT on SecContacts_M.apk
I: Loading resource table...
I: Decoding Shared Library (touchwiz), pkgId: 2
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/ibotpeaches/apktool/framework/1-1131.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...
➜  G930F_Galaxy_S7 apktool d SystemUI.apk -t 1131
I: Using Apktool 2.1.1-032a3e-SNAPSHOT on SystemUI.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/ibotpeaches/apktool/framework/1-1131.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...
➜  G930F_Galaxy_S7 

The other application in this thread. Proving both work with this patch. I'll clean it up and merge it in over the weekend / tonight.

Owner

iBotPeaches commented Apr 29, 2016

➜  G930F_Galaxy_S7 apktool if framework-res.apk -t 1131
I: Framework installed to: /home/ibotpeaches/apktool/framework/1-1131.apk
➜  G930F_Galaxy_S7 apktool if twframework-res.apk -t 1131
I: Framework installed to: /home/ibotpeaches/apktool/framework/2-1131.apk
➜  G930F_Galaxy_S7 apktool d SecContacts_M.apk -t 1131
I: Using Apktool 2.1.1-032a3e-SNAPSHOT on SecContacts_M.apk
I: Loading resource table...
I: Decoding Shared Library (touchwiz), pkgId: 2
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/ibotpeaches/apktool/framework/1-1131.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...
➜  G930F_Galaxy_S7 apktool d SystemUI.apk -t 1131
I: Using Apktool 2.1.1-032a3e-SNAPSHOT on SystemUI.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/ibotpeaches/apktool/framework/1-1131.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...
➜  G930F_Galaxy_S7 

The other application in this thread. Proving both work with this patch. I'll clean it up and merge it in over the weekend / tonight.

@hoshsadiq

This comment has been minimized.

Show comment
Hide comment
@hoshsadiq

hoshsadiq Dec 18, 2016

Sorry to be a pain and open an old bug report, I'm having the same issue with the Sony Select APK.

~/bin/apktool d ~/Downloads/apk/Sony\ Select_5.0.7.zip --output ~/Downloads/apk/SonySelect.out
I: Using Apktool 2.2.1 on Sony Select_5.0.7.zip
I: Decoding AndroidManifest.xml with only framework resources...
Exception in thread "main" brut.androlib.AndrolibException: Could not decode XML
	at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:147)
	at brut.androlib.res.decoder.XmlPullStreamDecoder.decodeManifest(XmlPullStreamDecoder.java:153)
	at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecoder.java:140)
	at brut.androlib.res.AndrolibResources.decodeManifest(AndrolibResources.java:162)
	at brut.androlib.Androlib.decodeManifestFull(Androlib.java:117)
	at brut.androlib.ApkDecoder.decode(ApkDecoder.java:120)
	at brut.apktool.Main.cmdDecode(Main.java:166)
	at brut.apktool.Main.main(Main.java:81)
Caused by: java.io.IOException: Expected: 0x00080003, got: 0x6d783f3c
	at brut.util.ExtDataInput.skipCheckInt(ExtDataInput.java:48)
	at brut.androlib.res.decoder.AXmlResourceParser.doNext(AXmlResourceParser.java:843)
	at brut.androlib.res.decoder.AXmlResourceParser.next(AXmlResourceParser.java:100)
	at brut.androlib.res.decoder.AXmlResourceParser.nextToken(AXmlResourceParser.java:110)
	at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.nextToken(XmlPullParserDelegate.java:105)
	at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:140)
	... 7 more

EDIT: scrap that, remove the --output option prevents this from happening

hoshsadiq commented Dec 18, 2016

Sorry to be a pain and open an old bug report, I'm having the same issue with the Sony Select APK.

~/bin/apktool d ~/Downloads/apk/Sony\ Select_5.0.7.zip --output ~/Downloads/apk/SonySelect.out
I: Using Apktool 2.2.1 on Sony Select_5.0.7.zip
I: Decoding AndroidManifest.xml with only framework resources...
Exception in thread "main" brut.androlib.AndrolibException: Could not decode XML
	at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:147)
	at brut.androlib.res.decoder.XmlPullStreamDecoder.decodeManifest(XmlPullStreamDecoder.java:153)
	at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecoder.java:140)
	at brut.androlib.res.AndrolibResources.decodeManifest(AndrolibResources.java:162)
	at brut.androlib.Androlib.decodeManifestFull(Androlib.java:117)
	at brut.androlib.ApkDecoder.decode(ApkDecoder.java:120)
	at brut.apktool.Main.cmdDecode(Main.java:166)
	at brut.apktool.Main.main(Main.java:81)
Caused by: java.io.IOException: Expected: 0x00080003, got: 0x6d783f3c
	at brut.util.ExtDataInput.skipCheckInt(ExtDataInput.java:48)
	at brut.androlib.res.decoder.AXmlResourceParser.doNext(AXmlResourceParser.java:843)
	at brut.androlib.res.decoder.AXmlResourceParser.next(AXmlResourceParser.java:100)
	at brut.androlib.res.decoder.AXmlResourceParser.nextToken(AXmlResourceParser.java:110)
	at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.nextToken(XmlPullParserDelegate.java:105)
	at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:140)
	... 7 more

EDIT: scrap that, remove the --output option prevents this from happening

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Dec 19, 2016

Owner
➜  Bug1131 apktool d Sony\ Select_5.0.7.apk 
I: Using Apktool 2.2.2-7c6c7a-SNAPSHOT on Sony Select_5.0.7.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: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
➜  Bug1131 apktool d Sony\ Select_5.0.7.apk --output foo
I: Using Apktool 2.2.2-7c6c7a-SNAPSHOT on Sony Select_5.0.7.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: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
➜  Bug1131 

Not sure @hoshsadiq , couldn't duplicate with --output or not.

Owner

iBotPeaches commented Dec 19, 2016

➜  Bug1131 apktool d Sony\ Select_5.0.7.apk 
I: Using Apktool 2.2.2-7c6c7a-SNAPSHOT on Sony Select_5.0.7.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: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
➜  Bug1131 apktool d Sony\ Select_5.0.7.apk --output foo
I: Using Apktool 2.2.2-7c6c7a-SNAPSHOT on Sony Select_5.0.7.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: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
➜  Bug1131 

Not sure @hoshsadiq , couldn't duplicate with --output or not.

@hoshsadiq

This comment has been minimized.

Show comment
Hide comment
@hoshsadiq

hoshsadiq Dec 19, 2016

Very odd hm. I'll try and replicate it again and tie down the causes if you'd like! Will report back. I think it may be because I was giving it a path as a value for --output where --output actually just requires a dir name (correct me if I'm wrong).

Very odd hm. I'll try and replicate it again and tie down the causes if you'd like! Will report back. I think it may be because I was giving it a path as a value for --output where --output actually just requires a dir name (correct me if I'm wrong).

@GYDHA

This comment has been minimized.

Show comment
Hide comment
@GYDHA

GYDHA Dec 14, 2017

I have a similar issue. After i deleted resources.arsc, it passed.

GYDHA commented Dec 14, 2017

I have a similar issue. After i deleted resources.arsc, it passed.

@ouihamdaoui

This comment has been minimized.

Show comment
Hide comment
@ouihamdaoui

ouihamdaoui Jan 12, 2018

Log For : app.apk

Log Type : Recompiling

Log Recorded At : 12 2018-01- 2:02:12,15

Log Recorded By : Advanced ApkTool v4.2.0 By BDFreak


W: C:\Users\pc\Desktop\AdvancedApkTool\3-Out\app.apk\AndroidManifest.xml:17: error: No resource identifier found for attribute 'roundIcon' in package 'android'
W:
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\pc\AppData\Local\Temp\brut_util_Jar_5011332091424466575.tmp, p, --forced-package-id, 127, --min-sdk-version, 15, --target-sdk-version, 26, --version-code, 10, --version-name, 10.0, -F, C:\Users\pc\AppData\Local\Temp\APKTOOL277819359608319825.tmp, -0, arsc, -0, arsc, -I, C:\Users\pc\Desktop\AdvancedApkTool\1-BDFreak\Frameworks\1.apk, -S, C:\Users\pc\Desktop\AdvancedApkTool\3-Out\app.apk\res, -M, C:\Users\pc\Desktop\AdvancedApkTool\3-Out\app.apk\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:478)
at brut.androlib.Androlib.buildResources(Androlib.java:412)
at brut.androlib.Androlib.build(Androlib.java:311)
at brut.androlib.Androlib.build(Androlib.java:264)
at brut.apktool.Main.cmdBuild(Main.java:227)
at brut.apktool.Main.main(Main.java:84)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\pc\AppData\Local\Temp\brut_util_Jar_5011332091424466575.tmp, p, --forced-package-id, 127, --min-sdk-version, 15, --target-sdk-version, 26, --version-code, 10, --version-name, 10.0, -F, C:\Users\pc\AppData\Local\Temp\APKTOOL277819359608319825.tmp, -0, arsc, -0, arsc, -I, C:\Users\pc\Desktop\AdvancedApkTool\1-BDFreak\Frameworks\1.apk, -S, C:\Users\pc\Desktop\AdvancedApkTool\3-Out\app.apk\res, -M, C:\Users\pc\Desktop\AdvancedApkTool\3-Out\app.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:439)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:464)
... 5 more
Caused by: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\pc\AppData\Local\Temp\brut_util_Jar_5011332091424466575.tmp, p, --forced-package-id, 127, --min-sdk-version, 15, --target-sdk-version, 26, --version-code, 10, --version-name, 10.0, -F, C:\Users\pc\AppData\Local\Temp\APKTOOL277819359608319825.tmp, -0, arsc, -0, arsc, -I, C:\Users\pc\Desktop\AdvancedApkTool\1-BDFreak\Frameworks\1.apk, -S, C:\Users\pc\Desktop\AdvancedApkTool\3-Out\app.apk\res, -M, C:\Users\pc\Desktop\AdvancedApkTool\3-Out\app.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:95)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:433)
... 6 more


Log For : app.apk

Log Type : Recompiling

Log Recorded At : 12 2018-01- 2:02:12,15

Log Recorded By : Advanced ApkTool v4.2.0 By BDFreak


W: C:\Users\pc\Desktop\AdvancedApkTool\3-Out\app.apk\AndroidManifest.xml:17: error: No resource identifier found for attribute 'roundIcon' in package 'android'
W:
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\pc\AppData\Local\Temp\brut_util_Jar_5011332091424466575.tmp, p, --forced-package-id, 127, --min-sdk-version, 15, --target-sdk-version, 26, --version-code, 10, --version-name, 10.0, -F, C:\Users\pc\AppData\Local\Temp\APKTOOL277819359608319825.tmp, -0, arsc, -0, arsc, -I, C:\Users\pc\Desktop\AdvancedApkTool\1-BDFreak\Frameworks\1.apk, -S, C:\Users\pc\Desktop\AdvancedApkTool\3-Out\app.apk\res, -M, C:\Users\pc\Desktop\AdvancedApkTool\3-Out\app.apk\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:478)
at brut.androlib.Androlib.buildResources(Androlib.java:412)
at brut.androlib.Androlib.build(Androlib.java:311)
at brut.androlib.Androlib.build(Androlib.java:264)
at brut.apktool.Main.cmdBuild(Main.java:227)
at brut.apktool.Main.main(Main.java:84)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\pc\AppData\Local\Temp\brut_util_Jar_5011332091424466575.tmp, p, --forced-package-id, 127, --min-sdk-version, 15, --target-sdk-version, 26, --version-code, 10, --version-name, 10.0, -F, C:\Users\pc\AppData\Local\Temp\APKTOOL277819359608319825.tmp, -0, arsc, -0, arsc, -I, C:\Users\pc\Desktop\AdvancedApkTool\1-BDFreak\Frameworks\1.apk, -S, C:\Users\pc\Desktop\AdvancedApkTool\3-Out\app.apk\res, -M, C:\Users\pc\Desktop\AdvancedApkTool\3-Out\app.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:439)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:464)
... 5 more
Caused by: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\pc\AppData\Local\Temp\brut_util_Jar_5011332091424466575.tmp, p, --forced-package-id, 127, --min-sdk-version, 15, --target-sdk-version, 26, --version-code, 10, --version-name, 10.0, -F, C:\Users\pc\AppData\Local\Temp\APKTOOL277819359608319825.tmp, -0, arsc, -0, arsc, -I, C:\Users\pc\Desktop\AdvancedApkTool\1-BDFreak\Frameworks\1.apk, -S, C:\Users\pc\Desktop\AdvancedApkTool\3-Out\app.apk\res, -M, C:\Users\pc\Desktop\AdvancedApkTool\3-Out\app.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:95)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:433)
... 6 more


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