New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error unpacking 9.png #170

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

Comments

Projects
None yet
1 participant
@iBotPeaches
Owner

iBotPeaches commented Mar 18, 2015

Original issue 59 created by arkadym on 2010-06-18T03:22:53.000Z:

What steps will reproduce the problem?

  1. Download http://www.villainrom.co.uk/kendon/stuff/vr10.3-mylegend1.3-signed.zip
  2. Install framework files in apktool
  3. Try to unpack : HTCCamera, HtcRosie, PCSCII, some other

What is the expected output? What do you see instead?
apktool shows error - can't unpack 9.png image.

What version of the product are you using? On what operating system?
ubuntu 10.04, apktool 1.3.1

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #1 originally posted by arkadym on 2010-06-18T03:24:01.000Z:

Оh, sorry, it similar to # 58 one.

Owner

iBotPeaches commented Mar 18, 2015

Comment #1 originally posted by arkadym on 2010-06-18T03:24:01.000Z:

Оh, sorry, it similar to # 58 one.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #2 originally posted by arkadym on 2010-06-18T03:27:00.000Z:

PS. framework-res.apk from specified url also can't be packed back after unpack.

Owner

iBotPeaches commented Mar 18, 2015

Comment #2 originally posted by arkadym on 2010-06-18T03:27:00.000Z:

PS. framework-res.apk from specified url also can't be packed back after unpack.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #3 originally posted by arkadym on 2010-07-13T09:30:23.000Z:

Hey, Brut, did u checked on this issue ?

Owner

iBotPeaches commented Mar 18, 2015

Comment #3 originally posted by arkadym on 2010-07-13T09:30:23.000Z:

Hey, Brut, did u checked on this issue ?

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #4 originally posted by Brut.alll on 2010-07-15T10:57:43.000Z:

More samples:

http://github.com/downloads/AMS-Serv...s/BurstLeo.zip
http://www.ti-x.com/files/roms/TIX/o...UEFIYA_TIX.zip

Owner

iBotPeaches commented Mar 18, 2015

Comment #4 originally posted by Brut.alll on 2010-07-15T10:57:43.000Z:

More samples:

http://github.com/downloads/AMS-Serv...s/BurstLeo.zip
http://www.ti-x.com/files/roms/TIX/o...UEFIYA_TIX.zip

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #5 originally posted by arkadym on 2010-07-15T11:14:10.000Z:

So, can issue be marked as Confirmed ? Does it has a change to be fixed ?

Owner

iBotPeaches commented Mar 18, 2015

Comment #5 originally posted by arkadym on 2010-07-15T11:14:10.000Z:

So, can issue be marked as Confirmed ? Does it has a change to be fixed ?

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #6 originally posted by Brut.alll on 2010-07-15T22:14:36.000Z:

I didn't even reproduced it by myself, but many people report it, so it's confirmed, I guess ;-)

I wasn't too responsive recently, because I have changed my house, so I didn't have much time. I will be back on apktool in a few days :-)

Owner

iBotPeaches commented Mar 18, 2015

Comment #6 originally posted by Brut.alll on 2010-07-15T22:14:36.000Z:

I didn't even reproduced it by myself, but many people report it, so it's confirmed, I guess ;-)

I wasn't too responsive recently, because I have changed my house, so I didn't have much time. I will be back on apktool in a few days :-)

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #7 originally posted by Brut.alll on 2010-07-24T14:25:55.000Z:

I just wanna look into this issue, but all 3 links are invalid right now ;-) It's better to upload files to code.google.com .

I will try with files from http://code.google.com/p/android-apktool/issues/detail?id=58 - it's probably the same issue.

Owner

iBotPeaches commented Mar 18, 2015

Comment #7 originally posted by Brut.alll on 2010-07-24T14:25:55.000Z:

I just wanna look into this issue, but all 3 links are invalid right now ;-) It's better to upload files to code.google.com .

I will try with files from http://code.google.com/p/android-apktool/issues/detail?id=58 - it's probably the same issue.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #8 originally posted by arkadym on 2010-08-11T06:51:59.000Z:

I uploaded file to new place - http://www.mediafire.com/?197v49f3by1qsi3

Owner

iBotPeaches commented Mar 18, 2015

Comment #8 originally posted by arkadym on 2010-08-11T06:51:59.000Z:

I uploaded file to new place - http://www.mediafire.com/?197v49f3by1qsi3

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #9 originally posted by Brut.alll on 2010-08-27T19:23:59.000Z:

Issue 58 has been merged into this issue.

Owner

iBotPeaches commented Mar 18, 2015

Comment #9 originally posted by Brut.alll on 2010-08-27T19:23:59.000Z:

Issue 58 has been merged into this issue.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #10 originally posted by Brut.alll on 2010-08-27T19:31:37.000Z:

You could test attached file. I have successfully decoded HTCCamera.apk, Rosie.apk, PCSCII.apk files from above ROM and 2 frameworks from issue 58. There were warnings for each of these files, but this is ok. This means: there really were errors, but they're caused by an issue which was just fixed :-)

Owner

iBotPeaches commented Mar 18, 2015

Comment #10 originally posted by Brut.alll on 2010-08-27T19:31:37.000Z:

You could test attached file. I have successfully decoded HTCCamera.apk, Rosie.apk, PCSCII.apk files from above ROM and 2 frameworks from issue 58. There were warnings for each of these files, but this is ok. This means: there really were errors, but they're caused by an issue which was just fixed :-)

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #11 originally posted by Brut.alll on 2010-08-27T19:35:10.000Z:

Hmmm...

Owner

iBotPeaches commented Mar 18, 2015

Comment #11 originally posted by Brut.alll on 2010-08-27T19:35:10.000Z:

Hmmm...

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #12 originally posted by arkadym on 2010-08-30T09:27:33.000Z:

It seems now it unpack incorrect 9.png files w/o error (showed warning). But, are you sure that there will be no error after packing it back ?

PS. Will test it more carefully later

Owner

iBotPeaches commented Mar 18, 2015

Comment #12 originally posted by arkadym on 2010-08-30T09:27:33.000Z:

It seems now it unpack incorrect 9.png files w/o error (showed warning). But, are you sure that there will be no error after packing it back ?

PS. Will test it more carefully later

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #13 originally posted by arkadym on 2010-08-30T09:29:13.000Z:

Hm... can u help me ? Is apktool unpack/pack will be equal to replace incorrent 9.png file with .png one in .apk ?

Owner

iBotPeaches commented Mar 18, 2015

Comment #13 originally posted by arkadym on 2010-08-30T09:29:13.000Z:

Hm... can u help me ? Is apktool unpack/pack will be equal to replace incorrent 9.png file with .png one in .apk ?

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #14 originally posted by Brut.alll on 2010-08-30T09:43:42.000Z:

I don't understand your question, sorry :-/

Problem is: sometimes in apks there are some 9.png files which don't have binary 9patch data included. This is ok for Android OS, because it doesn't look at names, but always check existence of this binary 9patch chunk, so you could have 9.png which isn't really 9patch image or *.png file which is :-)

But building mechanisms (aapt tool) identifies 9patch images by names, so it will require names are ok. I don't know how it's possible, that there are some *.9.png files without 9patch chunk - I think someone modified these apk files, replaced images in them.

Anyway, apks rebuilt by apktool should have identical functionality to original ones. Of course renamed *.9.png will lose their 9patch feature, but they didn't have it in original apk as well.

Owner

iBotPeaches commented Mar 18, 2015

Comment #14 originally posted by Brut.alll on 2010-08-30T09:43:42.000Z:

I don't understand your question, sorry :-/

Problem is: sometimes in apks there are some 9.png files which don't have binary 9patch data included. This is ok for Android OS, because it doesn't look at names, but always check existence of this binary 9patch chunk, so you could have 9.png which isn't really 9patch image or *.png file which is :-)

But building mechanisms (aapt tool) identifies 9patch images by names, so it will require names are ok. I don't know how it's possible, that there are some *.9.png files without 9patch chunk - I think someone modified these apk files, replaced images in them.

Anyway, apks rebuilt by apktool should have identical functionality to original ones. Of course renamed *.9.png will lose their 9patch feature, but they didn't have it in original apk as well.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #15 originally posted by mrozdoba on 2010-08-31T08:25:38.000Z:

Do you have a planned fix? I'm just curious as to what approach you intend to take. Maybe prescan all pngs & rename extension correctly based on existence of the 9patch chunk?

Owner

iBotPeaches commented Mar 18, 2015

Comment #15 originally posted by mrozdoba on 2010-08-31T08:25:38.000Z:

Do you have a planned fix? I'm just curious as to what approach you intend to take. Maybe prescan all pngs & rename extension correctly based on existence of the 9patch chunk?

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #16 originally posted by Brut.alll on 2010-08-31T08:55:39.000Z:

Fix included in above apktool.jar file is final one - it'll be included in next version. So yeah, I scan files for 9patch chunk and rename them, but actually I do this with *.9.png files only. This isn't 100% compatible with decoding on Android OS, cause I ignore *.png with 9patch chunk case, but I hope this won't be a problem.

Owner

iBotPeaches commented Mar 18, 2015

Comment #16 originally posted by Brut.alll on 2010-08-31T08:55:39.000Z:

Fix included in above apktool.jar file is final one - it'll be included in next version. So yeah, I scan files for 9patch chunk and rename them, but actually I do this with *.9.png files only. This isn't 100% compatible with decoding on Android OS, cause I ignore *.png with 9patch chunk case, but I hope this won't be a problem.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #17 originally posted by arkadym on 2010-08-31T15:11:20.000Z:

Small observation - even show warning about incorrect 9.png and generating plain .png instead of 9.png, apktool still produce 0-size 9.png with original name, this is prevent apktool to correctly build .apk file. Can you please dont generate original 9.png in case of incorrectness ?

Owner

iBotPeaches commented Mar 18, 2015

Comment #17 originally posted by arkadym on 2010-08-31T15:11:20.000Z:

Small observation - even show warning about incorrect 9.png and generating plain .png instead of 9.png, apktool still produce 0-size 9.png with original name, this is prevent apktool to correctly build .apk file. Can you please dont generate original 9.png in case of incorrectness ?

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #18 originally posted by Brut.alll on 2010-08-31T18:56:17.000Z:

I had this problem, but fixed it some time ago. I think I have uploaded version prior to this fix, but will ensure about that. Thanks for info.

Owner

iBotPeaches commented Mar 18, 2015

Comment #18 originally posted by Brut.alll on 2010-08-31T18:56:17.000Z:

I had this problem, but fixed it some time ago. I think I have uploaded version prior to this fix, but will ensure about that. Thanks for info.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #19 originally posted by Brut.alll on 2010-09-03T15:52:50.000Z:

Fixed in v1.3.2 .

Owner

iBotPeaches commented Mar 18, 2015

Comment #19 originally posted by Brut.alll on 2010-09-03T15:52:50.000Z:

Fixed in v1.3.2 .

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