arshidkv12 / android-apktool

Automatically exported from code.google.com/p/android-apktool
0 stars 1 forks source link

Decompile-> Recompile error. #743

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.apktool d LGSettings.apk
2.apktool b LGSettings
3.

What is the expected output? What do you see instead?
I see an error which's screenshot attached.

What version of the product are you using? On what operating system?
2.0.0-RC3 Windows 8.1 Command prompt running in administrator mode.

Please provide any additional information below.

The APK is my ROM's settings.apk, which I tried to modify. The error shows up 
with and without the modification too. 

Original issue reported on code.google.com by misimar...@gmail.com on 13 Jan 2015 at 9:18

Attachments:

GoogleCodeExporter commented 9 years ago
Can't do much with a screenshot. Do you have the frameworks and apk to test? 

Original comment by connor.tumbleson on 13 Jan 2015 at 9:43

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Yes! Here you go:

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

https://www.dropbox.com/s/v0xiwwlh5a0d24v/LGSettings.apk?dl=0

https://www.dropbox.com/s/mgqs7z9iu13mer9/lge-res.apk?dl=0

Original comment by misimar...@gmail.com on 13 Jan 2015 at 9:53

GoogleCodeExporter commented 9 years ago
I believe this is an OEM bug, that the newer Apktoool aapt is making 
apparently. 

Note the offending line in the file that is causing the recompile to fail.

style="@*com.lge.internal:style/DialogWindowTitle.Holo.Light"

 > res/layout/dialog_title_secondlines.xml

I examined the styles.xml for com.lge.internal and could not find this 
resource. However, in the com.lge framework. They had this resource. 

So I changed the line to

style="@com.lge:style/DialogWindowTitle.Holo.Light" and it worked fine. 

This APK was just built incorrectly with a non-restrictive aapt which didn't 
catch this bug. Apktool newer aapt made it apparent. As you can see it it 
utilized the "@*" pattern which refers to a private system resource. Its 
entirely possible that resource doesn't exist anymore, thus these errors.

Original comment by connor.tumbleson on 14 Jan 2015 at 12:44

GoogleCodeExporter commented 9 years ago
Thank you! Gotta try it. 
It's from a ported ROM,maybe that's the causing of the error.
Thank you again!

Original comment by misimar...@gmail.com on 14 Jan 2015 at 2:07