Skip to content
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

Cannot repackage facebook #670

Closed
iBotPeaches opened this issue Mar 18, 2015 · 4 comments
Closed

Cannot repackage facebook #670

iBotPeaches opened this issue Mar 18, 2015 · 4 comments

Comments

@iBotPeaches
Copy link
Owner

Original issue 560 created by cs.jlwu on 2013-12-03T03:28:56.000Z:

What steps will reproduce the problem?
1.apktool d facebook_1385100508635.apk
2.apktool b facebook_1385100508635 fb.apk

What is the expected output? What do you see instead?
I expect it repackage successfully.
However, here is the output.

jl@lab:~/Downloads$ apktool b facebook_1385100508635 fb.apk
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
/home/jl/Downloads/facebook_1385100508635/res/values/styles.xml:16: error: Error retrieving parent for item: No resource found that matches the given name 'DialogWindowTitle.FacebookHolo'.
/home/jl/Downloads/facebook_1385100508635/res/values/styles.xml:17: error: Error retrieving parent for item: No resource found that matches the given name 'FacebookHolo.ButtonBar'.
/home/jl/Downloads/facebook_1385100508635/res/values/styles.xml:49: error: Error retrieving parent for item: No resource found that matches the given name 'DialogWindowTitleContainer.FacebookHolo'.
/home/jl/Downloads/facebook_1385100508635/res/values/styles.xml:76: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.FacebookHolo.Light.Button.Borderless'.
/home/jl/Downloads/facebook_1385100508635/res/values/styles.xml:667: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'.
/home/jl/Downloads/facebook_1385100508635/res/values/styles.xml:708: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'.
/home/jl/Downloads/facebook_1385100508635/res/values/styles.xml:755: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'.
/home/jl/Downloads/facebook_1385100508635/res/values/styles.xml:785: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'.
/home/jl/Downloads/facebook_1385100508635/res/values/styles.xml:801: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base.DropDownItem'.
/home/jl/Downloads/facebook_1385100508635/res/values/styles.xml:828: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'.
/home/jl/Downloads/facebook_1385100508635/res/values/styles.xml:835: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Light.Base'.
/home/jl/Downloads/facebook_1385100508635/res/values/styles.xml:852: error: Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Base'.
/home/jl/Downloads/facebook_1385100508635/res/values/styles.xml:885: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'.
/home/jl/Downloads/facebook_1385100508635/res/values-v14/styles.xml:158: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'.
/home/jl/Downloads/facebook_1385100508635/res/values/styles.xml:1082: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Base'.
/home/jl/Downloads/facebook_1385100508635/res/values/styles.xml:3280: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.DialogMessage'.
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 14, --target-sdk-version, 14, -F, /tmp/APKTOOL4789268317848835902.tmp, -I, /home/jl/apktool/framework/1.apk, -S, /home/jl/Downloads/facebook_1385100508635/res, -M, /home/jl/Downloads/facebook_1385100508635/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 14, --target-sdk-version, 14, -F, /tmp/APKTOOL4789268317848835902.tmp, -I, /home/jl/apktool/framework/1.apk, -S, /home/jl/Downloads/facebook_1385100508635/res, -M, /home/jl/Downloads/facebook_1385100508635/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 14, --target-sdk-version, 14, -F, /tmp/APKTOOL4789268317848835902.tmp, -I, /home/jl/apktool/framework/1.apk, -S, /home/jl/Downloads/facebook_1385100508635/res, -M, /home/jl/Downloads/facebook_1385100508635/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:355)
... 6 more

What version of the product are you using? On what operating system?
The version of apktool is 1.5.2 and my OS is ubuntu 12.04 64bit

Please provide any additional information below.
I have tried other methods like changing the aapt file and remove the file ~/apktool/framework/1.apk but it doesn't work.

@iBotPeaches
Copy link
Owner Author

Comment #1 originally posted by cs.jlwu on 2013-12-03T04:13:59.000Z:

I upload the apk to baiduyun.
http://pan.baidu.com/s/1AFyLp

@iBotPeaches
Copy link
Owner Author

Comment #2 originally posted by hieunp@ati.vn on 2013-12-05T06:22:51.000Z:

I have the same problem. (apktool 1.5.2, os centos 6.3)

  1. Decode facebook app is ok (not show error on linux but on Windows 7 error)
  2. Repacke apk error (when generator resource binary error, I try to run aapt command with resource decoded by apktool still error)

Command AAPT
/home/aapt p -u -f --min-sdk-version 9 --target-sdk-version 14 -F /home/com.facebook.katana/temp.unsigned.apk -I /home/android/android.jar -S /home/com.facebook.katana/res -M /home/com.facebook.katana/AndroidManifest.xml -A /home/com.facebook.katana/assets

this error message on linux when I try to rung with aapt command

/home/com.facebook.katana/res/values/styles.xml:16: error: Error retrieving parent for item: No resource found that matches the given name 'DialogWindowTitle.FacebookHolo'.
/home/com.facebook.katana/res/values/styles.xml:17: error: Error retrieving parent for item: No resource found that matches the given name 'FacebookHolo.ButtonBar'.
/home/com.facebook.katana/res/values/styles.xml:74: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.FacebookHolo.Light.Button.Borderless'.
/home/com.facebook.katana/res/values/styles.xml:515: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'.
/home/com.facebook.katana/res/values/styles.xml:555: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'.
/home/com.facebook.katana/res/values/styles.xml:602: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'.
/home/com.facebook.katana/res/values/styles.xml:632: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'.
/home/com.facebook.katana/res/values/styles.xml:648: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base.DropDownItem'.
/home/com.facebook.katana/res/values/styles.xml:674: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'.
/home/com.facebook.katana/res/values/styles.xml:681: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Light.Base'.
/home/com.facebook.katana/res/values/styles.xml:698: error: Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Base'.
/home/com.facebook.katana/res/values/styles.xml:731: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'.
/home/com.facebook.katana/res/values-v14/styles.xml:153: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base'.
/home/com.facebook.katana/res/values/styles.xml:926: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Base'.
/home/com.facebook.katana/res/values/styles.xml:2580: error: Error retrieving parent for item: No resource found that matches the given name 'Widget.DialogMessage'.

@iBotPeaches
Copy link
Owner Author

Comment #3 originally posted by connor.tumbleson on 2013-12-06T13:07:25.000Z:

See FrameworkFiles

Or delete the one at $HOME/apktool/framework/1.apk, because the file located there is out of date.

@iBotPeaches
Copy link
Owner Author

Comment #4 originally posted by cs.jlwu on 2013-12-09T05:34:49.000Z:

Hi,

I deleted the file $HOME/apktool/framework/1.apk and package it again,
however, the same problem occurs.

How can I fix this?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant