desword / android-apktool

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

ReBuilding latest Viber 4.0.0.1707 fails #548

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Decode
2. Build without modifications fails!
3.

What is the expected output? What do you see instead?

VB\res\drawable\btn_accept_call.xml:4: error: Error: Resource is not public. 
(at 'drawable' with value '@android:drawable/btn_default_pressed_holo_light').
VB\res\drawable\btn_accept_call.xml:5: error: Error: Resource is not public. 
(at 'drawable' with value 
'@android:drawable/btn_default_small_normal_disable_focused').
VB\res\drawable\call_background.xml:5: error: Error: Resource is not public. 
(at 'drawable' with value 
'@android:drawable/keyboard_key_feedback_more_background').

What version of the product are you using? On what operating system?
ApkTool v2.0b8 GitHub-f649f80026

Please provide any additional information below.
ReBuilding with apktool v1.5.3 GitHub-11210a0896 WORKS

Original issue reported on code.google.com by zoky1...@gmail.com on 12 Nov 2013 at 12:57

Attachments:

GoogleCodeExporter commented 9 years ago
After ReBuilding with 1.5.3 I get same error again with 2.0b8 so it's v2 bug!

Original comment by zoky1...@gmail.com on 12 Nov 2013 at 1:14

GoogleCodeExporter commented 9 years ago
OS: Win7x64

Original comment by zoky1...@gmail.com on 12 Nov 2013 at 1:14

GoogleCodeExporter commented 9 years ago
Well, not really.

v2 contains its own updated aapt. The error is coming from aapt (due to its 
upgraded and more restrictive nature).

Whatever aapt you have in $PATH for apktool 1.5.3 is not as restrictive. Pull 
the aapt from the 2.0.x binary and put in $PATH, and you'll get same error in 
1.5.3.

Original comment by connor.tumbleson on 12 Nov 2013 at 1:16

GoogleCodeExporter commented 9 years ago
In PATH I have official android build-tools 18.0.1 aapt

Original comment by zoky1...@gmail.com on 12 Nov 2013 at 1:21

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Will try v2 with that aapt using -a option...

Original comment by zoky1...@gmail.com on 12 Nov 2013 at 1:21

GoogleCodeExporter commented 9 years ago
Nope, even when I specify same aapt used on v1, v2 still fails

So, it's v2 error...

Original comment by zoky1...@gmail.com on 12 Nov 2013 at 1:35

GoogleCodeExporter commented 9 years ago
And I'm sure same aapt was used because on second try I deleted embedded one in 
v2 jar file...

Original comment by zoky1...@gmail.com on 12 Nov 2013 at 1:42

GoogleCodeExporter commented 9 years ago
Then the aapt you are using is out of date.

The version of "build-tools" is difficult to be exact. I build aapt from source 
everytime there is a new AOSP drop. The current AAPT's in 2.0.0b8 are from the 
tag "kitkat-release" of frameworks/base: 
https://github.com/android/platform_frameworks_base/tree/kitkat-release

Or my tree here (where my changes are merged with AOSP)
https://github.com/iBotPeaches/platform_frameworks_base

Original comment by connor.tumbleson on 12 Nov 2013 at 3:17

GoogleCodeExporter commented 9 years ago
ReBuilding with ApkTool v1.5.3 and WITH aapt from 2.0b8 (and offical ones) WORKS

ReBuilding with ApkTool v2.0b8 with any aapt from official v18-v19 to 
embedded/integrated one FAILS.

As Viber app works normal when ReBuilded with v1.5.3

IT MUST BE APKTOOL V2 ERROR...

Original comment by zoky1...@gmail.com on 12 Nov 2013 at 9:52

GoogleCodeExporter commented 9 years ago
Apktool doesn't "fix" apk's. Read comment #20 of Bug441

Original comment by connor.tumbleson on 22 Nov 2013 at 10:56

GoogleCodeExporter commented 9 years ago
Sorry, but why then I can:
decompile apk with apktool v1
build successfully with apktool v2

Shouldn't it suggest that it is bug in decoding with apktool v2?

Original comment by zoky1...@gmail.com on 22 Nov 2013 at 11:37

GoogleCodeExporter commented 9 years ago
https://github.com/iBotPeaches/Apktool/commit/9f03d7d35c296a9cd8af29e7316fd41e90
322909

There was a hacky *android thing in 1.5.2 that would bypass that. It caused 
more problems than it solved, and isn't the valid thing to do in this 
situation. 

Original comment by connor.tumbleson on 22 Nov 2013 at 11:40

GoogleCodeExporter commented 9 years ago
Copying res/drawable/btn_accept_call.xml and res/drawable/call_background.xml 
from decompiled apktool v1 directory to decompiled apktool v2 directory solves 
the problem.

I attached difference reports from V1 and V2 apktool...

Original comment by zoky1...@gmail.com on 22 Nov 2013 at 11:53

Attachments:

GoogleCodeExporter commented 9 years ago
OK

Original comment by zoky1...@gmail.com on 22 Nov 2013 at 11:56