I am trying to edit framework-res from cyanogenmod . I use apktool 1.2 and I can decompile just fine but trying to rebuild I get all this errors. So it seems that I am missing something apktool if does not do anything.
C:\apktool>apktool b framework-res
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
C:\apktool\framework-res\res\values\public.xml:956: error: Public symbol id/fill
_parent declared here is not defined.
C:\apktool\framework-res\res\values\public.xml:1285: error: Public entry identif
ier 0x1020235 entry index is larger than available symbols (index 565, total sym
bols 565).
C:\apktool\framework-res\res\values\public.xml:1285: error: Public symbol id/mod
e_normal declared here is not defined.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\ADMINI~1\AppData\Local\Tem
p\APKTOOL7608585969988241404.tmp, -x, -0, arsc, -S, C:\apktool\framework-res\res
, -M, C:\apktool\framework-res\AndroidManifest.xml, C:\apktool\framework-res\9pa
tch]
at brut.androlib.res.AndrolibResources.aaptPackage(Unknown Source)
at brut.androlib.Androlib.buildResourcesFull(Unknown Source)
at brut.androlib.Androlib.buildResources(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\ADMINI~1\AppData\Local\Temp\APKTOOL7608585969988241404.tmp, -x, -0, arsc, -
S, C:\apktool\framework-res\res, -M, C:\apktool\framework-res\AndroidManifest.xm
l, C:\apktool\framework-res\9patch]
at brut.util.OS.exec(Unknown Source)
... 7 more
C:\apktool>
It is most likely a coding error. What are you trying to change?
I am not in any way capable of understanding the log you posted but I've edited a fair amount of APKs and only had compiling errors if I screwed up something in an xml or smali file.
If you post an unedited framework-res, the one you edited, and a quick explanation of what you are trying to change I'll take a look
tritron777 said:
I am trying to edit framework-res from cyanogenmod . I use apktool 1.2 and I can decompile just fine but trying to rebuild I get all this errors. So it seems that I am missing something apktool if does not do anything.
C:\apktool>apktool b framework-res
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
C:\apktool\framework-res\res\values\public.xml:956: error: Public symbol id/fill
_parent declared here is not defined.
C:\apktool\framework-res\res\values\public.xml:1285: error: Public entry identif
ier 0x1020235 entry index is larger than available symbols (index 565, total sym
bols 565).
C:\apktool\framework-res\res\values\public.xml:1285: error: Public symbol id/mod
e_normal declared here is not defined.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\ADMINI~1\AppData\Local\Tem
p\APKTOOL7608585969988241404.tmp, -x, -0, arsc, -S, C:\apktool\framework-res\res
, -M, C:\apktool\framework-res\AndroidManifest.xml, C:\apktool\framework-res\9pa
tch]
at brut.androlib.res.AndrolibResources.aaptPackage(Unknown Source)
at brut.androlib.Androlib.buildResourcesFull(Unknown Source)
at brut.androlib.Androlib.buildResources(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\ADMINI~1\AppData\Local\Temp\APKTOOL7608585969988241404.tmp, -x, -0, arsc, -
S, C:\apktool\framework-res\res, -M, C:\apktool\framework-res\AndroidManifest.xm
l, C:\apktool\framework-res\9patch]
at brut.util.OS.exec(Unknown Source)
... 7 more
C:\apktool>
Click to expand...
Click to collapse
I am not saying this is a fix by any means but try this download Total commander and winzip. Now with apk files or zips I can go directly into them thru windows commander make any change I want and back out and it will save or recompile the apk or zip file for me and I can then push it over to the phone.
I have made quite a few changes to rom zip files as in removing apk's I dont want or putting my own apk's onto a rom before I install it on my phone.
I also have taken out png files from apk's and place them in other apk files if I so choose. So I am not sure exactly what you are trying to do but give that setup a whirl... PM if you need any further assistance
Link Total Commander
Are you editing xml files our just changing png's?
Sent from your mom's phone.
First I just tried to see if I can rebuild it. I just downloaded it from rom and decompiled and then Oliver tried to rebuild without making any changes but I got all those errors. Too me it looks like I am missing library to rebuild it
Related
I wanted to edit the settings in the default workspace such as change widgets and app icons. I wanted to do something small like change the size of the Market widget from 2x2 to 4x4. I decompiled and made the change. Then I tried to recompile using thee b(build) command. Here's what I get:
[email protected] ~ $ apktool d Launcher2.apk
I: Baksmaling...
I: Loading resource table...
I: Decoding resources...
I: Loading resource table from file: /home/treken/apktool/framework/1.apk
I: Copying assets and libs...
[email protected] ~ $ apktool b Launcher2
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL2635074741971448593.tmp, -I, /home/treken/apktool/framework/1.apk, -S, /home/treken/Launcher2/res, -M, /home/treken/Launcher2/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(Unknown Source)
at brut.androlib.Androlib.buildResourcesFull(Unknown Source)
at brut.androlib.Androlib.buildResources(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL2635074741971448593.tmp, -I, /home/treken/apktool/framework/1.apk, -S, /home/treken/Launcher2/res, -M, /home/treken/Launcher2/AndroidManifest.xml]
at brut.util.OS.exec(Unknown Source)
... 7 more
Caused by: java.io.IOException: Cannot run program "aapt": java.io.IOException: error=13, Permission denied
at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
at java.lang.Runtime.exec(Runtime.java:593)
at java.lang.Runtime.exec(Runtime.java:466)
... 8 more
Caused by: java.io.IOException: java.io.IOException: error=13, Permission denied
at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
at java.lang.ProcessImpl.start(ProcessImpl.java:65)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
... 10 more
[email protected] ~ $
Someone please help me!!!!!!! :O
It looks like you are on Linux and don't have permissions for the folder. Either modify the permissions or run in terminal as root.
Hey Guys, I m Tryin to add 4 in 1 reboot function for TB ,
Reference:http://forum.xda-developers.com/showpost.php?p=8674580&postcount=1
when i get the end of step 1 , i have some problem .
apk manager show me an error when i compile apk:
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode, sharing)
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
D:\apk\other\..\projects\framework-res.apk\res\values\public.xml:3635: error: Mu
ltiple entry names declared for public entry identifier 0x101 in type drawable (
btn_media_player_disabled_selected vs download).
D:\apk\other\..\projects\framework-res.apk\res\values\public.xml:2863: Originall
y defined here.
D:\apk\other\..\projects\framework-res.apk\res\values\public.xml:3635: error: Pu
blic symbol drawable/download declared here is not defined.
D:\apk\other\..\projects\framework-res.apk\res\values\public.xml:3633: error: Mu
ltiple entry names declared for public entry identifier 0xff in type drawable (b
tn_media_player vs reboot).
D:\apk\other\..\projects\framework-res.apk\res\values\public.xml:2861: Originall
y defined here.
D:\apk\other\..\projects\framework-res.apk\res\values\public.xml:3633: error: Pu
blic symbol drawable/reboot declared here is not defined.
D:\apk\other\..\projects\framework-res.apk\res\values\public.xml:3634: error: Mu
ltiple entry names declared for public entry identifier 0x100 in type drawable (
btn_media_player_disabled vs recovery).
D:\apk\other\..\projects\framework-res.apk\res\values\public.xml:2862: Originall
y defined here.
D:\apk\other\..\projects\framework-res.apk\res\values\public.xml:3634: error: Pu
blic symbol drawable/recovery declared here is not defined.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\liem\AppData\Local\Temp\AP
KTOOL4973910132166951427.tmp, -x, -S, D:\apk\other\..\projects\framework-res.apk
\res, -M, D:\apk\other\..\projects\framework-res.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(Unknown Source)
at brut.androlib.Androlib.buildResourcesFull(Unknown Source)
at brut.androlib.Androlib.buildResources(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\liem\AppData\Local\Temp\APKTOOL4973910132166951427.tmp, -x, -S, D:\apk\othe
r\..\projects\framework-res.apk\res, -M, D:\apk\other\..\projects\framework-res.
apk\AndroidManifest.xml]
at brut.util.OS.exec(Unknown Source)
... 7 more
系统找不到指定的文件。
请按任意键继续. . .
D:\apk>
can anybody help ?
Looking for mod to change battery icon in status bar to circle with percents
ROM: Virtuous 3.2.0 and Incredible Revolution theme
Can anyone point me to thread?
Thanks
http://forum.xda-developers.com/showthread.php?t=990829
got error on kitchen rebuild?
I adb pulled framework-res.apk from phone and uploaded as directed.
What did I wrong?
Code:
Decompiling framework-res.apk UOT-06-30-01-53-2
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
Compiling framework-res.apk UOT-06-30-01-53-2
W: Could not find sources
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL1643516675712976659.tmp, -x, -S, /home/uot/port5/data/working_dir/UOT-06-30-01-53-2/fw_dec/res, -M, /home/uot/port5/data/working_dir/UOT-06-30-01-53-2/fw_dec/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:174)
at brut.apktool.Main.main(Main.java:59)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL1643516675712976659.tmp, -x, -S, /home/uot/port5/data/working_dir/UOT-06-30-01-53-2/fw_dec/res, -M, /home/uot/port5/data/working_dir/UOT-06-30-01-53-2/fw_dec/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
/home/uot/port5/data/working_dir/UOT-06-30-01-53-2/fw_dec/res/layout-hdpi/screen_progress.xml:9: error: Error: String types not allowed (at 'foregroundGravity' with value 'fill_horizontal|top|center').
/home/uot/port5/data/working_dir/UOT-06-30-01-53-2/fw_dec/res/layout-hdpi/screen_title_icons.xml:13: error: Error: String types not allowed (at 'foregroundGravity' with value 'fill_horizontal|top|center').
I was making some color changes in my systemui.apk but it will not compile now. Im getting this error.
C:\Users\Sean\Desktop\Android Modding\APK's>apktool b systemui
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\Users\Sean\Desktop\Android Modding\APK's\sys
temui\res/drawable-sw600dp-xhdpi
invalid resource directory name: C:\Users\Sean\Desktop\Android Modding\APK's\sys
temui\res/layout-sw600dp
invalid resource directory name: C:\Users\Sean\Desktop\Android Modding\APK's\sys
temui\res/values-sw600dp
invalid resource directory name: C:\Users\Sean\Desktop\Android Modding\APK's\sys
temui\res/values-sw600dp-port
invalid resource directory name: C:\Users\Sean\Desktop\Android Modding\APK's\sys
temui\res/values-sw720dp
invalid resource directory name: C:\Users\Sean\Desktop\Android Modding\APK's\sys
temui\res/values-sw720dp-port
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\Sean\AppData\Local\Temp\AP
KTOOL7307828911707401960.tmp, -I, C:\Users\Sean\apktool\framework\1.apk, -S, C:\
Users\Sean\Desktop\Android Modding\APK's\systemui\res, -M, C:\Users\Sean\Desktop
\Android Modding\APK's\systemui\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\Sean\AppData\Local\Temp\APKTOOL7307828911707401960.tmp, -I, C:\Users\Sean\a
pktool\framework\1.apk, -S, C:\Users\Sean\Desktop\Android Modding\APK's\systemui
\res, -M, C:\Users\Sean\Desktop\Android Modding\APK's\systemui\AndroidManifest.x
ml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
C:\Users\Sean\Desktop\Android Modding\APK's>
bump
/10char
The clue is in the error:
invalid resource directory name: C:\Users\Sean\Desktop\Android Modding\APK's\sys
temui\res/drawable-sw600dp-xhdpi
Whats wrong with the bolded area?
the slash is the wrong way? why would it do that?
apktool incorrectly decompiled it. You need to remove those wrong slahes in the xml.
well ****, that seems like a lot of work
Nothing ctrl F won't fix. Or a grep.
Or just use the xml you modified and keep the old stuff.
now when u say to just use the xml i modded...how? do i just copy it to the apk im trying to flash? I thought it had to be recompiled? or can i recompile an individual xml. Im new to this whole themeing thing
guys, i've been decompiling and compiling for some time now. and never got the compiling error. but today, i add some lines to an xml file in the apk. and while compiling, as it got to Building resources, it gave the following error, res/xml/settings_headers.xml. yes thats the file i added lines too. anyways, could anyone help me out here? :/ i tried reinstalling framework, got the new apktool.jar and aapt.exe. but still no luck, i checked the lines for any typing errors, but was unable to find any. help.
emwno said:
guys, i've been decompiling and compiling for some time now. and never got the compiling error. but today, i add some lines to an xml file in the apk. and while compiling, as it got to Building resources, it gave the following error, res/xml/settings_headers.xml. yes thats the file i added lines too. anyways, could anyone help me out here? :/ i tried reinstalling framework, got the new apktool.jar and aapt.exe. but still no luck, i checked the lines for any typing errors, but was unable to find any. help.
Click to expand...
Click to collapse
Maybe unicorns ate half your file...
Got some logs? the error that appears will tell you what is wrong. if you dont know what it is saying pop the log here and we can help. if there are hundreds of errors put them in CODE quotes
Code:
like this
or put the file here so we can see it might help too...
Pvy
pvyParts said:
Maybe unicorns ate half your file...
Got some logs? the error that appears will tell you what is wrong. if you dont know what it is saying pop the log here and we can help. if there are hundreds of errors put them in CODE quotes
Code:
like this
or put the file here so we can see it might help too...
Pvy
Click to expand...
Click to collapse
D: unicorns exist. i knew it!!.
anyways, here it is,
Code:
C:\apktool>apktool b settings
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
C:\apktool\settings\res\xml\settings_headers.xml:19: error: Error parsing XML: m
ismatched tag
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, --min-sdk-version, 16, --target-sdk-ver
sion, 16, -F, C:\Users\Aashir\AppData\Local\Temp\APKTOOL7503268580718875465.tmp,
-I, C:\Users\Aashir\apktool\framework\1.apk, -S, C:\apktool\settings\res, -M, C
:\apktool\settings\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:255)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:324)
at brut.androlib.Androlib.buildResources(Androlib.java:269)
at brut.androlib.Androlib.build(Androlib.java:192)
at brut.androlib.Androlib.build(Androlib.java:174)
at brut.apktool.Main.cmdBuild(Main.java:188)
at brut.apktool.Main.main(Main.java:70)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 16, --target-sdk-version, 16, -F, C:\Users\Aashir\AppData\Local\Temp\
APKTOOL7503268580718875465.tmp, -I, C:\Users\Aashir\apktool\framework\1.apk, -S,
C:\apktool\settings\res, -M, C:\apktool\settings\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:253)
... 6 more
emwno said:
D: unicorns exist. i knew it!!.
anyways, here it is,
Code:
C:\apktool>apktool b settings
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
C:\apktool\settings\res\xml\settings_headers.xml:19: error: Error parsing XML: m
ismatched tag
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, --min-sdk-version, 16, --target-sdk-ver
sion, 16, -F, C:\Users\Aashir\AppData\Local\Temp\APKTOOL7503268580718875465.tmp,
-I, C:\Users\Aashir\apktool\framework\1.apk, -S, C:\apktool\settings\res, -M, C
:\apktool\settings\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:255)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:324)
at brut.androlib.Androlib.buildResources(Androlib.java:269)
at brut.androlib.Androlib.build(Androlib.java:192)
at brut.androlib.Androlib.build(Androlib.java:174)
at brut.apktool.Main.cmdBuild(Main.java:188)
at brut.apktool.Main.main(Main.java:70)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 16, --target-sdk-version, 16, -F, C:\Users\Aashir\AppData\Local\Temp\
APKTOOL7503268580718875465.tmp, -I, C:\Users\Aashir\apktool\framework\1.apk, -S,
C:\apktool\settings\res, -M, C:\apktool\settings\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:253)
... 6 more
Click to expand...
Click to collapse
Line 19 mismatched tag
Sent from my Galaxy Nexus using xda premium