[Q] apktool recompilation error!

Search This thread

keshav13

Senior Member
May 22, 2014
60
75
While using apktool to recompile the contacts apk, SecContacts_OSup.apk, I am getting the following error in cmd. This is unedited folder, and trying to compile it right after de-compilation. But still getting error.

I have tried different aapt, different apktool.jar, both java 6 and 7 and such but to no avail.

D:\apktool\112233>apktool b 11 wert.apk
I: Using Apktool 2.0.0-Beta9 on 11
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
D:\apktool\112233\11\res\layout\photo_selector_view_popup.xml:9: error: Error: No resource found tha
t matches the given name (at 'layout' with value '@layout/photo_updates_header').
aapt: warning: string 'remove_from_namecard_list_popup_title' has no default translation in D:\apkto
ol\112233\11\res; found: zh_SG
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.co
mmon.BrutException: could not exec command: [C:\Users\Keshav\AppData\Local\Temp\brut_util_Jar_7378085
831899028208.tmp, p, --forced-package-id, 127, --min-sdk-version, 19, --target-sdk-version, 19, --ve
rsion-code, 19, --version-name, 4.4.2-I9505XXUFNB8, -F, C:\Users\Keshav\AppData\Local\Temp\APKTOOL365
2482745200459136.tmp, -0, arsc, -I, C:\Users\Keshav\apktool\framework\1.apk, -I, C:\Users\Keshav\apkto
ol\framework\2.apk, -S, D:\apktool\112233\11\res, -M, D:\apktool\112233\11\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:435)
at brut.androlib.Androlib.buildResources(Androlib.java:363)
at brut.androlib.Androlib.build(Androlib.java:286)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:236)
at brut.apktool.Main.main(Main.java:88)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [C:\U
sers\Keshav\AppData\Local\Temp\brut_util_Jar_7378085831899028208.tmp, p, --forced-package-id, 127, --
min-sdk-version, 19, --target-sdk-version, 19, --version-code, 19, --version-name, 4.4.2-I9505XXUFNB
8, -F, C:\Users\Keshav\AppData\Local\Temp\APKTOOL3652482745200459136.tmp, -0, arsc, -I, C:\Users\Kesh
av\apktool\framework\1.apk, -I, C:\Users\Keshav\apktool\framework\2.apk, -S, D:\apktool\112233\11\res
,-M, D:\apktool\112233\11\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:470)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:416)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [C:\Users\Keshav\AppData\Local\Temp\bru
t_util_Jar_7378085831899028208.tmp, p, --forced-package-id, 127, --min-sdk-version, 19, --target-sdk
-version, 19, --version-code, 19, --version-name, 4.4.2-I9505XXUFNB8, -F, C:\Users\Keshav\AppData\Loc
al\Temp\APKTOOL3652482745200459136.tmp, -0, arsc, -I, C:\Users\Keshav\apktool\framework\1.apk, -I, C:
\Users\Keshav\apktool\framework\2.apk, -S, D:\apktool\112233\11\res, -M, D:\apktool\112233\11\Android
Manifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:464)
... 6 more



If I import this raw project into Eclipse I get these 5 errors:


Description Resource Path Location Type
error: Error: No resource found that matches the given name: attr 'android:actionBarNonEmbeded'. styles.xml /DialtactsActivity/res/values-sw360dp-xxhdpi line 10 Android AAPT Problem
error: Error: No resource found that matches the given name: attr 'android:actionBarNonEmbeded'. styles.xml /DialtactsActivity/res/values line 10 Android AAPT Problem
error: Error: No resource found that matches the given name: attr 'android:searchViewTextField'. styles.xml /DialtactsActivity/res/values line 95 Android AAPT Problem
error: Error: No resource found that matches the given name: attr 'android:actionBarNonEmbeded'. styles.xml /DialtactsActivity/res/values line 661 Android AAPT Problem
error: Error: No resource found that matches the given name: attr 'android:searchViewTextField'. styles.xml /DialtactsActivity/res/values-sw360dp-xxhdpi line 63 Android AAPT Problem


Although not the right thing to do, I can remove the line with 'android:actionBarNonEmbeded' in them in Eclipse and there is no problem after deleting those 3 lines. But can't simply delete lines with 'android:searchViewTextField' as it throws up too many other errors, mostly same for other attrs.

I have surfed tons of pages at stackoverflow, xda and some other sites... but couldn't crack a solution. Can't add a simple + to @drawable either, obviously.

Reply by connor.tumbleson here on code.google.com might be answer but I couldn't figure out what to do.
url - code.google.com/p/android-apktool/issues/detail?id=441#c20

So, uh, pls help!

Note: Of course, I'm installing the framreworks first (framework-res.apk, twframework-res.apk and systemUI.apk). And have tried apkMultiTool v3.4 and some other apktool based solutions too. Nothing helped. :(
 
Last edited:

_alex74_

Inactive Recognized Themer
Nov 11, 2012
1,316
3,007
FVG
While using apktool to recompile the contacts apk, SecContacts_OSup.apk, I am getting the following error in cmd

look in \res\layout\photo_selector_vie w_popup.xml line 9, u must remove all references to photo_updates_header, common problem, sometimes system apk have been done badly ha ha ha

try this and report :D
 

keshav13

Senior Member
May 22, 2014
60
75
worked but didn't work!

look in \res\layout\photo_selector_vie w_popup.xml line 9, u must remove all references to photo_updates_header, common problem, sometimes system apk have been done badly ha ha ha

try this and report :D

First of all, thansk for the tip!

I removed the layout portion of that line that actually made reference to photo_updates_header file. So, that actually didn't got me those error, but it didn;t build an APK file despite showing exactly that in cmd. Here's what cmd says:

D:\apktool>apktool b c1 111.apk
I: Using Apktool 2.0.0-Beta9 on c1
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
aapt: warning: string 'remove_from_namecard_list_popup_title' has no default translation in D:\apkto
ol\c1\res; found: zh_SG
I: Building apk file...
I: Copying unknown files/dir...

There is no APK file built, tho. Which is bad, and surprising. What do you suggest?
[I'm using apktool 2.0 beta9, and have Java 7 installed on Win8.1.]

Edit:
Is there a way how I should remove the reference to photo_updates_header file? Should I just delete the whole of line 9 that is making the reference?
 
Last edited:

_alex74_

Inactive Recognized Themer
Nov 11, 2012
1,316
3,007
FVG
First of all, thansk for the tip!

Is there a way how I should remove the reference to photo_updates_header file? Should I just delete the whole of line 9 that is making the reference?

as posted apk must be builded in dist folder of your decompiled apk :), no errors that says different.

that reference is about missing traslation, just warning u can keep it(no harm in apk compiling) or add a line like this:
<string name="photo_updates_header">photo updates header</string>

in res/values/strings.xml on bottom of all strings

lemme know
 

keshav13

Senior Member
May 22, 2014
60
75
Nope :/

as posted apk must be builded in dist folder of your decompiled apk :), no errors that says different.

that reference is about missing traslation, just warning u can keep it(no harm in apk compiling) or add a line like this:


in res/values/strings.xml on bottom of all strings

lemme know

Hi _alex74_,

Adding the line <string name="photo_updates_header">photo updates header</string> didn't work. Very sad.
Please suggest something else.

Can you reproduce the problem at your end? Can you recompile it or not even when it's untouched? :(
Here's the link to contacts APK that's been torturing me: __www24.zippyshare.com/v/59685951/file.html__

Thanks a lot!