java.lang.StringIndexOutOfBoundsException #280

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

Comments

Projects
None yet
1 participant
@iBotPeaches
Owner

iBotPeaches commented Mar 18, 2015

Original issue 169 created by godsarmycy on 2011-05-22T07:49:28.000Z:

What steps will reproduce the problem?

  1. Grab Settings.apk from Leaked Incredible 2.3.3 Sense Build (http://forum.xda-developers.com/showthread.php?t=1087077)
  2. use apktool 4.1 to install framework-res.apk and com.htc.resources.apk in this rom first
    $ apktool if framework-res.apk
    $ apktool if framework-res.apk
  3. Use same apktool to decode Settings.apk
    $ apktool d Settings.apk

What is the expected output? What do you see instead?
apktool failed to decode and output:
$ apktool d Settings.apk
I: Baksmaling...
I: Loading resource table...
W: Skipping "android" package group
I: Loaded.
I: Loading resource table from file: /home/yueche/apktool/framework/1.apk
I: Loaded.
I: Loading resource table from file: /home/yueche/apktool/framework/2.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values_/_ XMLs...
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 21
at java.lang.String.charAt(String.java:686)
at brut.androlib.res.xml.ResXmlEncoders.findNonPositionalSubstitutions(ResXmlEncoders.java:165)
at brut.androlib.res.xml.ResXmlEncoders.enumerateNonPositionalSubstitutions(ResXmlEncoders.java:142)
at brut.androlib.res.data.value.ResStringValue.encodeAsResXmlValue(ResStringValue.java:45)
at brut.androlib.res.data.value.ResArrayValue.serializeToResValuesXml(ResArrayValue.java:55)
at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResources.java:264)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:137)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:120)
at brut.apktool.Main.main(Main.java:57)

What version of the product are you using? On what operating system?
apktool 4.1, ubuntu10.0.4
$ uname -a
Linux yueche-desktop 2.6.32-24-generic # 43-Ubuntu SMP Thu Sep 16 14:58:24 UTC 2010 x86_64 GNU/Linux

Please provide any additional information below.
You can contact me (godsarmycy@gmail.com) for details if necessary

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #1 originally posted by Brut.alll on 2011-05-22T15:41:35.000Z:

I have fixed this some time ago. http://www.multiupload.com/BPJW0WGTBG - should be ok.

Owner

iBotPeaches commented Mar 18, 2015

Comment #1 originally posted by Brut.alll on 2011-05-22T15:41:35.000Z:

I have fixed this some time ago. http://www.multiupload.com/BPJW0WGTBG - should be ok.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #2 originally posted by Brut.alll on 2011-05-24T10:27:05.000Z:

Issue 171 has been merged into this issue.

Owner

iBotPeaches commented Mar 18, 2015

Comment #2 originally posted by Brut.alll on 2011-05-24T10:27:05.000Z:

Issue 171 has been merged into this issue.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #3 originally posted by gaochunhui on 2011-05-24T12:30:14.000Z:

how date to release new version?

Owner

iBotPeaches commented Mar 18, 2015

Comment #3 originally posted by gaochunhui on 2011-05-24T12:30:14.000Z:

how date to release new version?

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #4 originally posted by godsarmycy on 2011-05-25T02:12:27.000Z:

Hi Brut

Thanks for the update. I have tried your prebuilt 1.4.2 version. It works perfectly.

Owner

iBotPeaches commented Mar 18, 2015

Comment #4 originally posted by godsarmycy on 2011-05-25T02:12:27.000Z:

Hi Brut

Thanks for the update. I have tried your prebuilt 1.4.2 version. It works perfectly.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #5 originally posted by Brut.alll on 2011-05-25T04:34:45.000Z:

"how date to release new version?"

I don't rush, there are just 2 bug fixes for v1.4.1 for now. I'll release v1.4.2 when there will be something more or if many people will get above problems.

Owner

iBotPeaches commented Mar 18, 2015

Comment #5 originally posted by Brut.alll on 2011-05-25T04:34:45.000Z:

"how date to release new version?"

I don't rush, there are just 2 bug fixes for v1.4.1 for now. I'll release v1.4.2 when there will be something more or if many people will get above problems.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #6 originally posted by Brut.alll on 2011-05-26T18:59:33.000Z:

Issue 172 has been merged into this issue.

Owner

iBotPeaches commented Mar 18, 2015

Comment #6 originally posted by Brut.alll on 2011-05-26T18:59:33.000Z:

Issue 172 has been merged into this issue.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #7 originally posted by gaochunhui on 2011-05-27T08:27:50.000Z:

same issue again, plz release new version. ;-)

Owner

iBotPeaches commented Mar 18, 2015

Comment #7 originally posted by gaochunhui on 2011-05-27T08:27:50.000Z:

same issue again, plz release new version. ;-)

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #8 originally posted by Brut.alll on 2011-05-27T09:33:57.000Z:

Yeah, I think you're right ;-)

Owner

iBotPeaches commented Mar 18, 2015

Comment #8 originally posted by Brut.alll on 2011-05-27T09:33:57.000Z:

Yeah, I think you're right ;-)

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #9 originally posted by sagui.gvsu on 2011-05-27T14:00:44.000Z:

Hi Brut,

godsarmy references a prebuilt v1.4.2, but I can't seem to find this? Could you please link me? I'm receiving the same error.

thx

Owner

iBotPeaches commented Mar 18, 2015

Comment #9 originally posted by sagui.gvsu on 2011-05-27T14:00:44.000Z:

Hi Brut,

godsarmy references a prebuilt v1.4.2, but I can't seem to find this? Could you please link me? I'm receiving the same error.

thx

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #10 originally posted by Brut.alll on 2011-05-27T15:31:59.000Z:

http://code.google.com/p/android-apktool/issues/detail?id=169#c1

Owner

iBotPeaches commented Mar 18, 2015

Comment #10 originally posted by Brut.alll on 2011-05-27T15:31:59.000Z:

http://code.google.com/p/android-apktool/issues/detail?id=169#c1

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #11 originally posted by gaochunhui on 2011-05-31T03:51:52.000Z:

why release new version not yet?

Comment 7 by gaochun...@gmail.com, May 27 (3 days ago)
same issue again, plz release new version. ;-)
Comment 8 by project member Brut.alll, May 27 (3 days ago)
Yeah, I think you're right ;-)

Owner

iBotPeaches commented Mar 18, 2015

Comment #11 originally posted by gaochunhui on 2011-05-31T03:51:52.000Z:

why release new version not yet?

Comment 7 by gaochun...@gmail.com, May 27 (3 days ago)
same issue again, plz release new version. ;-)
Comment 8 by project member Brut.alll, May 27 (3 days ago)
Yeah, I think you're right ;-)

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #12 originally posted by ninniuz on 2011-06-27T14:12:17.000Z:

Same error here. Please release a fix :)

Owner

iBotPeaches commented Mar 18, 2015

Comment #12 originally posted by ninniuz on 2011-06-27T14:12:17.000Z:

Same error here. Please release a fix :)

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #13 originally posted by Yk.handler on 2011-06-29T01:47:57.000Z:

Try to download the url from Comment 1 by Brut.All, it fix my problem...

Owner

iBotPeaches commented Mar 18, 2015

Comment #13 originally posted by Yk.handler on 2011-06-29T01:47:57.000Z:

Try to download the url from Comment 1 by Brut.All, it fix my problem...

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #14 originally posted by redballpoint on 2011-06-29T23:25:16.000Z:

got the same error but updated apktool.jar to the one linked to in comment # 1--worked like a charm. thanks brut.alll!

Owner

iBotPeaches commented Mar 18, 2015

Comment #14 originally posted by redballpoint on 2011-06-29T23:25:16.000Z:

got the same error but updated apktool.jar to the one linked to in comment # 1--worked like a charm. thanks brut.alll!

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #15 originally posted by c.a.loper01 on 2011-07-22T04:35:05.000Z:

Same error here. Got the file from first post. BAM fixed!

Owner

iBotPeaches commented Mar 18, 2015

Comment #15 originally posted by c.a.loper01 on 2011-07-22T04:35:05.000Z:

Same error here. Got the file from first post. BAM fixed!

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #16 originally posted by nvrsummerboards on 2011-09-06T04:54:40.000Z:

Brut.all this is experienced in alot of decompile's this could be an excellent reason to release this

Owner

iBotPeaches commented Mar 18, 2015

Comment #16 originally posted by nvrsummerboards on 2011-09-06T04:54:40.000Z:

Brut.all this is experienced in alot of decompile's this could be an excellent reason to release this

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #17 originally posted by ismet.ertekin on 2011-09-09T18:18:23.000Z:


[*] Phone.apk

Decompiling Phone.apk...
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Ismet\apktool\framework\1.apk
I: Loaded.
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300e7
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300e7
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300e7
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300e7
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300e7
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300e7
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=android, name=textColor, value=0x01060080
W: Could not decode attr value, using undecoded value instead: ns=android, name=textColor, value=0x01060081
W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x010300b2
W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x010300b2
W: Could not decode attr value, using undecoded value instead: ns=android, name=title, value=0x010403c1
W: Could not decode attr value, using undecoded value instead: ns=android, name=layout_width, value=0x01050019
W: Could not decode attr value, using undecoded value instead: ns=android, name=layout_height, value=0x01050019
W: Could not decode attr value, using undecoded value instead: ns=android, name=id, value=0x01020232
W: Could not decode attr value, using undecoded value instead: ns=android, name=textColor, value=0x01060080
I: Decoding values_/_ XMLs...
I: Done.
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x010300e7
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:61)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:55)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:51)
at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferenceValue.java:59)
at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResReferenceValue.java:46)
at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlAttr(ResScalarValue.java:43)
at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:40)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlResourceParser.java:315)
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.decode(XmlPullStreamDecoder.java:46)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:34)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:100)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:114)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:120)
at brut.apktool.Main.main(Main.java:57)
Done!

Owner

iBotPeaches commented Mar 18, 2015

Comment #17 originally posted by ismet.ertekin on 2011-09-09T18:18:23.000Z:


[*] Phone.apk

Decompiling Phone.apk...
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Ismet\apktool\framework\1.apk
I: Loaded.
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300e7
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300e7
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300e7
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300e7
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300e7
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300e7
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=android, name=textColor, value=0x01060080
W: Could not decode attr value, using undecoded value instead: ns=android, name=textColor, value=0x01060081
W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x010300b2
W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x010300b2
W: Could not decode attr value, using undecoded value instead: ns=android, name=title, value=0x010403c1
W: Could not decode attr value, using undecoded value instead: ns=android, name=layout_width, value=0x01050019
W: Could not decode attr value, using undecoded value instead: ns=android, name=layout_height, value=0x01050019
W: Could not decode attr value, using undecoded value instead: ns=android, name=id, value=0x01020232
W: Could not decode attr value, using undecoded value instead: ns=android, name=textColor, value=0x01060080
I: Decoding values_/_ XMLs...
I: Done.
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x010300e7
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:61)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:55)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:51)
at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferenceValue.java:59)
at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResReferenceValue.java:46)
at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlAttr(ResScalarValue.java:43)
at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:40)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlResourceParser.java:315)
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.decode(XmlPullStreamDecoder.java:46)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:34)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:100)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:114)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:120)
at brut.apktool.Main.main(Main.java:57)
Done!

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #18 originally posted by stari4ek on 2011-09-18T18:23:20.000Z:

Just want to add for history (cause 1.4.2 fix it too)

$ apktool d -f miui.glacier.1.9.9.en/system/app/Mms.apk mms.unpacked
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: /home/astar/apktool/framework/1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values_/_ XMLs...
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 3
at java.lang.String.charAt(String.java:694)
at brut.androlib.res.xml.ResXmlEncoders.findNonPositionalSubstitutions(ResXmlEncoders.java:165)
at brut.androlib.res.xml.ResXmlEncoders.enumerateNonPositionalSubstitutions(ResXmlEncoders.java:142)
at brut.androlib.res.data.value.ResStringValue.encodeAsResXmlValue(ResStringValue.java:45)
at brut.androlib.res.data.value.ResArrayValue.serializeToResValuesXml(ResArrayValue.java:55)
at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResources.java:264)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:137)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:120)
at brut.apktool.Main.main(Main.java:57)

Owner

iBotPeaches commented Mar 18, 2015

Comment #18 originally posted by stari4ek on 2011-09-18T18:23:20.000Z:

Just want to add for history (cause 1.4.2 fix it too)

$ apktool d -f miui.glacier.1.9.9.en/system/app/Mms.apk mms.unpacked
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: /home/astar/apktool/framework/1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values_/_ XMLs...
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 3
at java.lang.String.charAt(String.java:694)
at brut.androlib.res.xml.ResXmlEncoders.findNonPositionalSubstitutions(ResXmlEncoders.java:165)
at brut.androlib.res.xml.ResXmlEncoders.enumerateNonPositionalSubstitutions(ResXmlEncoders.java:142)
at brut.androlib.res.data.value.ResStringValue.encodeAsResXmlValue(ResStringValue.java:45)
at brut.androlib.res.data.value.ResArrayValue.serializeToResValuesXml(ResArrayValue.java:55)
at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResources.java:264)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:137)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:120)
at brut.apktool.Main.main(Main.java:57)

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #19 originally posted by primetechv2 on 2011-09-21T18:26:16.000Z:

For heaven's sake, please release this as apktool 1.4.2! I almost didn't see this because it doesn't officially exist anywhere. And it just happens to fix all the issues I've been having recompiling themed framework-res.apk's!

Owner

iBotPeaches commented Mar 18, 2015

Comment #19 originally posted by primetechv2 on 2011-09-21T18:26:16.000Z:

For heaven's sake, please release this as apktool 1.4.2! I almost didn't see this because it doesn't officially exist anywhere. And it just happens to fix all the issues I've been having recompiling themed framework-res.apk's!

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #20 originally posted by adriennefelt on 2011-10-07T04:00:43.000Z:

You should upgrade the main project to 1.4.2! I also had this problem, when working on a patch of the com.android.vending update. The first link fixed it (glad I googled the exception!).

For the record here is the exception I saw

I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: /Users/apf/apktool/framework/1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values_/_ XMLs...
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 3
at java.lang.String.charAt(String.java:686)
at brut.androlib.res.xml.ResXmlEncoders.findNonPositionalSubstitutions(ResXmlEncoders.java:165)
at brut.androlib.res.xml.ResXmlEncoders.hasMultipleNonPositionalSubstitutions(ResXmlEncoders.java:138)
at brut.androlib.res.data.value.ResStringValue.serializeExtraXmlAttrs(ResStringValue.java:63)
at brut.androlib.res.data.value.ResScalarValue.serializeToResValuesXml(ResScalarValue.java:65)
at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResources.java:264)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:137)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:120)
at brut.apktool.Main.main(Main.java:57)

Owner

iBotPeaches commented Mar 18, 2015

Comment #20 originally posted by adriennefelt on 2011-10-07T04:00:43.000Z:

You should upgrade the main project to 1.4.2! I also had this problem, when working on a patch of the com.android.vending update. The first link fixed it (glad I googled the exception!).

For the record here is the exception I saw

I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: /Users/apf/apktool/framework/1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values_/_ XMLs...
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 3
at java.lang.String.charAt(String.java:686)
at brut.androlib.res.xml.ResXmlEncoders.findNonPositionalSubstitutions(ResXmlEncoders.java:165)
at brut.androlib.res.xml.ResXmlEncoders.hasMultipleNonPositionalSubstitutions(ResXmlEncoders.java:138)
at brut.androlib.res.data.value.ResStringValue.serializeExtraXmlAttrs(ResStringValue.java:63)
at brut.androlib.res.data.value.ResScalarValue.serializeToResValuesXml(ResScalarValue.java:65)
at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResources.java:264)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:137)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:120)
at brut.apktool.Main.main(Main.java:57)

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #21 originally posted by cweight on 2011-10-20T01:18:48.000Z:

FWIW, 1.4.2 did NOT fix it for me:

Oct 19, 2011 6:13:14 PM brut.androlib.Androlib decodeSourcesSmali
INFO: Baksmaling...
Oct 19, 2011 6:13:15 PM brut.androlib.res.AndrolibResources loadMainPkg
INFO: Loading resource table...
Oct 19, 2011 6:13:15 PM brut.androlib.res.AndrolibResources loadMainPkg
WARNING: Skipping "android" package group
Oct 19, 2011 6:13:15 PM brut.androlib.res.AndrolibResources loadMainPkg
INFO: Loaded.
Oct 19, 2011 6:13:15 PM brut.androlib.res.AndrolibResources loadFrameworkPkg
INFO: Loading resource table from file: /home/cweight/apktool/framework/1.apk
Oct 19, 2011 6:13:16 PM brut.androlib.res.AndrolibResources loadFrameworkPkg
INFO: Loaded.
Oct 19, 2011 6:13:16 PM brut.androlib.res.AndrolibResources decode
INFO: Decoding file-resources...
Oct 19, 2011 6:13:16 PM brut.androlib.res.AndrolibResources decode
INFO: Decoding values_/_ XMLs...
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x7f010079
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:61)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:55)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:51)
at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferenceValue.java:59)
at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResReferenceValue.java:46)
at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlAttr(ResScalarValue.java:43)
at brut.androlib.res.data.value.ResStyleValue.serializeToResValuesXml(ResStyleValue.java:48)
at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResources.java:264)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:137)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:120)
at brut.apktool.Main.main(Main.java:57)

Owner

iBotPeaches commented Mar 18, 2015

Comment #21 originally posted by cweight on 2011-10-20T01:18:48.000Z:

FWIW, 1.4.2 did NOT fix it for me:

Oct 19, 2011 6:13:14 PM brut.androlib.Androlib decodeSourcesSmali
INFO: Baksmaling...
Oct 19, 2011 6:13:15 PM brut.androlib.res.AndrolibResources loadMainPkg
INFO: Loading resource table...
Oct 19, 2011 6:13:15 PM brut.androlib.res.AndrolibResources loadMainPkg
WARNING: Skipping "android" package group
Oct 19, 2011 6:13:15 PM brut.androlib.res.AndrolibResources loadMainPkg
INFO: Loaded.
Oct 19, 2011 6:13:15 PM brut.androlib.res.AndrolibResources loadFrameworkPkg
INFO: Loading resource table from file: /home/cweight/apktool/framework/1.apk
Oct 19, 2011 6:13:16 PM brut.androlib.res.AndrolibResources loadFrameworkPkg
INFO: Loaded.
Oct 19, 2011 6:13:16 PM brut.androlib.res.AndrolibResources decode
INFO: Decoding file-resources...
Oct 19, 2011 6:13:16 PM brut.androlib.res.AndrolibResources decode
INFO: Decoding values_/_ XMLs...
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x7f010079
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:61)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:55)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:51)
at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferenceValue.java:59)
at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResReferenceValue.java:46)
at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlAttr(ResScalarValue.java:43)
at brut.androlib.res.data.value.ResStyleValue.serializeToResValuesXml(ResStyleValue.java:48)
at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResources.java:264)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:137)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:120)
at brut.apktool.Main.main(Main.java:57)

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #22 originally posted by r4mses on 2011-11-04T08:59:59.000Z:

Hi, when will 1.4.2 be released officially?

Owner

iBotPeaches commented Mar 18, 2015

Comment #22 originally posted by r4mses on 2011-11-04T08:59:59.000Z:

Hi, when will 1.4.2 be released officially?

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #23 originally posted by martin.nuc on 2011-11-05T11:46:58.000Z:

1.4.2 did not fix it for me too:

I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\mist\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values_/_ XMLs...
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String ind
ex out of range: 37
at java.lang.String.charAt(Unknown Source)
at brut.androlib.res.xml.ResXmlEncoders.findNonPositionalSubstitutions(ResXmlEncoders.java:165)
at brut.androlib.res.xml.ResXmlEncoders.hasMultipleNonPositionalSubstitutions(ResXmlEncoders.java:138)
at brut.androlib.res.data.value.ResStringValue.serializeExtraXmlAttrs(ResStringValue.java:63)
at brut.androlib.res.data.value.ResScalarValue.serializeToResValuesXml(ResScalarValue.java:65)
at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResources.java:264)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:137)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:120)
at brut.apktool.Main.main(Main.java:57)

Owner

iBotPeaches commented Mar 18, 2015

Comment #23 originally posted by martin.nuc on 2011-11-05T11:46:58.000Z:

1.4.2 did not fix it for me too:

I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\mist\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values_/_ XMLs...
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String ind
ex out of range: 37
at java.lang.String.charAt(Unknown Source)
at brut.androlib.res.xml.ResXmlEncoders.findNonPositionalSubstitutions(ResXmlEncoders.java:165)
at brut.androlib.res.xml.ResXmlEncoders.hasMultipleNonPositionalSubstitutions(ResXmlEncoders.java:138)
at brut.androlib.res.data.value.ResStringValue.serializeExtraXmlAttrs(ResStringValue.java:63)
at brut.androlib.res.data.value.ResScalarValue.serializeToResValuesXml(ResScalarValue.java:65)
at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResources.java:264)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:137)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:120)
at brut.apktool.Main.main(Main.java:57)

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #24 originally posted by Brut.alll on 2011-11-05T18:58:22.000Z:

Sorry all for waiting.

@cweight
Your issue isn't a StringIndexOutOfBoundsException.

@martin.nuc
Could you upload this apk?

Owner

iBotPeaches commented Mar 18, 2015

Comment #24 originally posted by Brut.alll on 2011-11-05T18:58:22.000Z:

Sorry all for waiting.

@cweight
Your issue isn't a StringIndexOutOfBoundsException.

@martin.nuc
Could you upload this apk?

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #25 originally posted by Brut.alll on 2011-11-05T18:58:47.000Z:

<empty>

Owner

iBotPeaches commented Mar 18, 2015

Comment #25 originally posted by Brut.alll on 2011-11-05T18:58:47.000Z:

<empty>

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #26 originally posted by martin.nuc on 2011-11-05T19:02:15.000Z:

@Brut.alll: sure. Attached.

Owner

iBotPeaches commented Mar 18, 2015

Comment #26 originally posted by martin.nuc on 2011-11-05T19:02:15.000Z:

@Brut.alll: sure. Attached.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #27 originally posted by Brut.alll on 2011-11-05T20:31:50.000Z:

@martin.nuc
Works for me - are you sure you are using apktool from first comment? Run apktool command and look for version at the top of usage help.

Owner

iBotPeaches commented Mar 18, 2015

Comment #27 originally posted by Brut.alll on 2011-11-05T20:31:50.000Z:

@martin.nuc
Works for me - are you sure you are using apktool from first comment? Run apktool command and look for version at the top of usage help.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #28 originally posted by martin.nuc on 2011-11-05T20:35:57.000Z:

Oh damn. My bad. Sorry... You are of course right. I have copy of old apktool somewhere in path because it says version 1.4.1. Dumb mistake. Sorry again.

Owner

iBotPeaches commented Mar 18, 2015

Comment #28 originally posted by martin.nuc on 2011-11-05T20:35:57.000Z:

Oh damn. My bad. Sorry... You are of course right. I have copy of old apktool somewhere in path because it says version 1.4.1. Dumb mistake. Sorry again.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #29 originally posted by Brut.alll on 2011-11-05T20:55:07.000Z:

Issue 196 has been merged into this issue.

Owner

iBotPeaches commented Mar 18, 2015

Comment #29 originally posted by Brut.alll on 2011-11-05T20:55:07.000Z:

Issue 196 has been merged into this issue.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #30 originally posted by Brut.alll on 2011-11-05T21:13:31.000Z:

Issue 203 has been merged into this issue.

Owner

iBotPeaches commented Mar 18, 2015

Comment #30 originally posted by Brut.alll on 2011-11-05T21:13:31.000Z:

Issue 203 has been merged into this issue.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #31 originally posted by Brut.alll on 2011-11-05T21:13:52.000Z:

Issue 208 has been merged into this issue.

Owner

iBotPeaches commented Mar 18, 2015

Comment #31 originally posted by Brut.alll on 2011-11-05T21:13:52.000Z:

Issue 208 has been merged into this issue.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #32 originally posted by Brut.alll on 2011-11-05T21:14:10.000Z:

Issue 221 has been merged into this issue.

Owner

iBotPeaches commented Mar 18, 2015

Comment #32 originally posted by Brut.alll on 2011-11-05T21:14:10.000Z:

Issue 221 has been merged into this issue.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #33 originally posted by Brut.alll on 2011-11-05T21:37:42.000Z:

It's ok :-)

Owner

iBotPeaches commented Mar 18, 2015

Comment #33 originally posted by Brut.alll on 2011-11-05T21:37:42.000Z:

It's ok :-)

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #34 originally posted by Brut.alll on 2011-11-28T23:18:52.000Z:

Issue 238 has been merged into this issue.

Owner

iBotPeaches commented Mar 18, 2015

Comment #34 originally posted by Brut.alll on 2011-11-28T23:18:52.000Z:

Issue 238 has been merged into this issue.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #35 originally posted by Brut.alll on 2011-11-28T23:22:48.000Z:

Issue 239 has been merged into this issue.

Owner

iBotPeaches commented Mar 18, 2015

Comment #35 originally posted by Brut.alll on 2011-11-28T23:22:48.000Z:

Issue 239 has been merged into this issue.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #36 originally posted by Brut.alll on 2011-11-28T23:25:56.000Z:

Issue 241 has been merged into this issue.

Owner

iBotPeaches commented Mar 18, 2015

Comment #36 originally posted by Brut.alll on 2011-11-28T23:25:56.000Z:

Issue 241 has been merged into this issue.

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