# Help With Decompiling And Recompiling Apks



## ac398

For the life of me I cannot get my apk tool properly setup, Ive tried using apktool and apk multitool. My main goal here is to decompile framework-res, make some changes and recompile it. Using APKtool 1.4.3 I load the framework then decompile it and everything looks fine., To test it out, before making any changes I try to recompile it and I get error messages. This is my log from apk multi tool but its the exact same error message I get with using APKTool.

W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
C:\androidsdk\projects\framework-res.apk\res\values\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
C:\androidsdk\projects\framework-res.apk\res\values\plurals.xml:79: error: Found tag </item> where </plurals> is expected
C:\androidsdk\projects\framework-res.apk\res\values-de\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
C:\androidsdk\projects\framework-res.apk\res\values-de\plurals.xml:79: error: Found tag </item> where </plurals> is expected
C:\androidsdk\projects\framework-res.apk\res\values-en-rGB\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
C:\androidsdk\projects\framework-res.apk\res\values-en-rGB\plurals.xml:79: error: Found tag </item> where </plurals> is expected
C:\androidsdk\projects\framework-res.apk\res\values-es\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
C:\androidsdk\projects\framework-res.apk\res\values-es\plurals.xml:79: error: Found tag </item> where </plurals> is expected
C:\androidsdk\projects\framework-res.apk\res\values-fr\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
C:\androidsdk\projects\framework-res.apk\res\values-fr\plurals.xml:79: error: Found tag </item> where </plurals> is expected
C:\androidsdk\projects\framework-res.apk\res\values-it\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
C:\androidsdk\projects\framework-res.apk\res\values-it\plurals.xml:79: error: Found tag </item> where </plurals> is expected
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Armand\AppData\Local\Temp\APKTOOL4871150680849856539.tmp, -x, -S, C:\androidsdk\projects\framework-res.apk\res, -M, C:\androidsdk\projects\framework-res.apk\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:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Armand\AppData\Local\Temp\APKTOOL4871150680849856539.tmp, -x, -S, C:\androidsdk\projects\framework-res.apk\res, -M, C:\androidsdk\projects\framework-res.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more

All I see is a bunch of plurals, non positionals, and false values and have absolutely no idea what any of this shit means. Using APK manager which is out dated I could get it to recompile but when flashed to my phone the framework on the lockscreen, appdrawer and settings menu would be all messed and the power button menu would revert to the stock one. I also tried decompiling framework with apktool 1.4.1 and 1.4.3 and copying the decompiled 1.4.1 folder into the decompiled 1.4.3 folder. APKtool 1.4.3 would then recompile it but when flashed to my phone it would give me the exact same messed up framework in lockscreen, app drawer, settings, and broken power menu.

I can decompile and recompile my systemui w/ softkey mods but when I flash the systemui the softkey changes dont take affect and I know theres not a problem with the updater script thats flashed.

SO could anyone out here please help me maybe with a detailed walkthrough or something. Much appreciated this shits been driving me nuts since sunday and Im about ready to say screw it.


----------



## runandhide05

U need to change the purles on line 79 on each XML, if u add a % at the end of the existing second % it will fix it

Sent from my Galaxy Nexus using Tapatalk


----------



## ac398

runandhide05 said:


> U need to change the purles on line 79 on each XML, if u add a % at the end of the existing second % it will fix it
> 
> Sent from my Galaxy Nexus using Tapatalk


Thank you i will be trying that as soon as I get home later


----------



## runandhide05

then end code would look like this



Code:


<br />
	<plurals name="matches_found"><br />
		<item quantity="other">%d of %%d</item><br />
		<item quantity="one">1 match</item><br />
	</plurals><br />
</resources><br />

but in EVERY plural for each language


----------



## ac398

just to clarify:
This is what im thinking you mean, just wanna make sure-
Open up every "plural.xml" go to line 79 in each one and add the second %.

Or do you mean- open up every single .xml, go to line 79 and add the 2nd %.

I didnt get a chance to get to it tonight I got busy so Im gonna do this tomorrow night.
Thanks for your help man


----------



## runandhide05

ac398 said:


> just to clarify:
> This is what im thinking you mean, just wanna make sure-
> Open up every "plural.xml" go to line 79 in each one and add the second %.
> 
> Or do you mean- open up every single .xml, go to line 79 and add the 2nd %.
> 
> I didnt get a chance to get to it tonight I got busy so Im gonna do this tomorrow night.
> Thanks for your help man


U are only adding one 
Sent from my Galaxy Nexus using Tapatalk


----------



## ac398

Ur last post threw me off for a bit- its early. But looking at the log and putting your posts together I know what to do.

Open up each "plural.xml" shown in the log go to line 79 and add a % like in ur example.
Thanks man


----------



## runandhide05

ac398 said:


> Ur last post threw me off for a bit- its early. But looking at the log and putting your posts together I know what to do.
> 
> Open up each "plural.xml" shown in the log go to line 79 and add a % like in ur example.
> Thanks man


The orgininal line 79 has two current % looking at the code I posted u will add one percent sign in front of the second one.
Example: before 
%word word% 
Example after
%word word%%

Sent from my Galaxy Nexus using Tapatalk


----------



## semperandroid

This is a bug in apktool. You can decompile with 1.4.1 and recompile with 1.4.3. This will stop the problem, but you may encounter other errors. Check apktool's bug log.

Sent from my Galaxy Nexus using RootzWiki


----------



## DHO

semperandroid said:


> This is a bug in apktool. You can decompile with 1.4.1 and recompile with 1.4.3. This will stop the problem, but you may encounter other errors. Check apktool's bug log.
> 
> Sent from my Galaxy Nexus using RootzWiki


Thank you, that was driving me mad the other day


----------



## akellar

Any ideas why I am getting this when compiling framework? I am using 1.4.2 to decompile and 1.4.3 to compile. http://pastebin.com/Ydh73HQW


----------



## runandhide05

Others are saying use 1.4.1 to decomp then 1.4.3 to rebuild, I haven't done that, I just use 1.4.3 with latest aapt decomp fix the plural XML and rebuild with no problem

Swyped from my GNEX


----------



## bouchigo

runandhide05 said:


> Others are saying use 1.4.1 to decomp then 1.4.3 to rebuild, I haven't done that, I just use 1.4.3 with latest aapt decomp fix the plural XML and rebuild with no problem
> 
> Swyped from my GNEX


This is what I do too. No issues with it this way.

Sent from my cm_tenderloin using RootzWiki


----------



## ac398

Thank you Runand Hide, I was busy yesterday and didngt get to report back. I got everything working, following what you said, it recompiled without a hitch and worked fine when I flashed it.

And for you guys using 1.4.1 and 1.4.3, I tried that and it didnt work for me so if you get an error while trying that just do what runandhide suggested to fix the plural.xml. It now works for me using both apktool and apk multi-tool


----------



## runandhide05

just to clear up my post earlier, and i think this is where i lost ya

the code will look like this before u change anything
BEFORE


Code:


<br />
	<plurals name="matches_found"><br />
        <item quantity="other">%d of %d</item><br />
		<item quantity="one">1 match</item><br />
	</plurals><br />
</resources><br />

once you make your change it will look like this



Code:


<br />
	<plurals name="matches_found"><br />
		<item quantity="other">%d of %%d</item><br />
		<item quantity="one">1 match</item><br />
	</plurals><br />
</resources><br />

again this change needs to be done on every plural.xml for each language on line 79 for the plural.xml


----------



## Fatsix

Well this sucks.

Edit: I trashed all the foreign values, sorry foreigners. Is there any need to keep the Raw as well?


----------



## alatedseraph

so all i did was put both fram and sys in the folder with apktool, registered framework decompiled sys then recompiled instantly and this is what i get. Can anyone help me out?

symbol drawable/stat_sys_battery_charge_anim85 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:417: error: Public
symbol drawable/stat_sys_battery_charge_anim86 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:418: error: Public
symbol drawable/stat_sys_battery_charge_anim87 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:419: error: Public
symbol drawable/stat_sys_battery_charge_anim88 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:420: error: Public
symbol drawable/stat_sys_battery_charge_anim89 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:421: error: Public
symbol drawable/stat_sys_battery_charge_anim9 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:422: error: Public
symbol drawable/stat_sys_battery_charge_anim90 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:423: error: Public
symbol drawable/stat_sys_battery_charge_anim91 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:424: error: Public
symbol drawable/stat_sys_battery_charge_anim92 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:425: error: Public
symbol drawable/stat_sys_battery_charge_anim93 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:426: error: Public
symbol drawable/stat_sys_battery_charge_anim94 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:427: error: Public
symbol drawable/stat_sys_battery_charge_anim95 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:428: error: Public
symbol drawable/stat_sys_battery_charge_anim96 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:429: error: Public
symbol drawable/stat_sys_battery_charge_anim97 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:430: error: Public
symbol drawable/stat_sys_battery_charge_anim98 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:431: error: Public
symbol drawable/stat_sys_battery_charge_anim99 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:432: error: Public
symbol drawable/stat_sys_battery_charge_animfull declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:433: error: Public
symbol drawable/stat_sys_battery_unknown declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:161: error: Public
symbol drawable/stat_sys_data_bluetooth declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:162: error: Public
symbol drawable/stat_sys_data_bluetooth_connected declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:163: error: Public
symbol drawable/stat_sys_data_connected_1x declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:164: error: Public
symbol drawable/stat_sys_data_connected_3g declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:165: error: Public
symbol drawable/stat_sys_data_connected_4g declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:166: error: Public
symbol drawable/stat_sys_data_connected_e declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:167: error: Public
symbol drawable/stat_sys_data_connected_g declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:168: error: Public
symbol drawable/stat_sys_data_connected_h declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:169: error: Public
symbol drawable/stat_sys_data_connected_roam declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:170: error: Public
symbol drawable/stat_sys_data_fully_connected_1x declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:171: error: Public
symbol drawable/stat_sys_data_fully_connected_3g declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:172: error: Public
symbol drawable/stat_sys_data_fully_connected_4g declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:173: error: Public
symbol drawable/stat_sys_data_fully_connected_e declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:174: error: Public
symbol drawable/stat_sys_data_fully_connected_g declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:175: error: Public
symbol drawable/stat_sys_data_fully_connected_h declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:77: error: Public s
ymbol drawable/stat_sys_data_wimax_signal_0 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:78: error: Public s
ymbol drawable/stat_sys_data_wimax_signal_0_fully declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:79: error: Public s
ymbol drawable/stat_sys_data_wimax_signal_1 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:80: error: Public s
ymbol drawable/stat_sys_data_wimax_signal_1_fully declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:81: error: Public s
ymbol drawable/stat_sys_data_wimax_signal_2 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:82: error: Public s
ymbol drawable/stat_sys_data_wimax_signal_2_fully declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:83: error: Public s
ymbol drawable/stat_sys_data_wimax_signal_3 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:84: error: Public s
ymbol drawable/stat_sys_data_wimax_signal_3_fully declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:85: error: Public s
ymbol drawable/stat_sys_data_wimax_signal_disconnected declared here is not defi
ned.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:86: error: Public s
ymbol drawable/stat_sys_data_wimax_signal_idle declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:176: error: Public
symbol drawable/stat_sys_gps_acquiring declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:53: error: Public s
ymbol drawable/stat_sys_gps_acquiring_anim declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:177: error: Public
symbol drawable/stat_sys_no_sim declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:178: error: Public
symbol drawable/stat_sys_ringer_silent declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:179: error: Public
symbol drawable/stat_sys_ringer_vibrate declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:180: error: Public
symbol drawable/stat_sys_roaming_cdma_0 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:54: error: Public s
ymbol drawable/stat_sys_roaming_cdma_flash declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:181: error: Public
symbol drawable/stat_sys_roaming_cdma_flash_anim0 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:182: error: Public
symbol drawable/stat_sys_roaming_cdma_flash_anim1 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:183: error: Public
symbol drawable/stat_sys_signal_0 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:184: error: Public
symbol drawable/stat_sys_signal_0_fully declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:185: error: Public
symbol drawable/stat_sys_signal_1 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:186: error: Public
symbol drawable/stat_sys_signal_1_fully declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:187: error: Public
symbol drawable/stat_sys_signal_2 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:188: error: Public
symbol drawable/stat_sys_signal_2_fully declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:189: error: Public
symbol drawable/stat_sys_signal_3 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:190: error: Public
symbol drawable/stat_sys_signal_3_fully declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:191: error: Public
symbol drawable/stat_sys_signal_4 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:192: error: Public
symbol drawable/stat_sys_signal_4_fully declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:193: error: Public
symbol drawable/stat_sys_signal_flightmode declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:194: error: Public
symbol drawable/stat_sys_signal_in declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:195: error: Public
symbol drawable/stat_sys_signal_inout declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:196: error: Public
symbol drawable/stat_sys_signal_out declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\valueException in thread "main" s\pub
lic.xml:197: error: Public symbol drawable/stat_sys_sync declared here is not de
fined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:198: error: Public
symbol drawable/stat_sys_sync_error declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:199: error: Public
symbol drawable/stat_sys_tty_mode declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:200: error: Public
symbol drawable/stat_sys_wifi_in declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:201: error: Public
symbol drawable/stat_sys_wifi_inout declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:202: error: Public
symbol drawable/stat_sys_wifi_out declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:203: error: Public
symbol drawable/stat_sys_wifi_signal_0 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:204: error: Public
symbol drawable/stat_sys_wifi_signal_1 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:205: error: Public
symbol drawable/stat_sys_wifi_signal_1_fully declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:206: error: Public
symbol drawable/stat_sys_wifi_signal_2 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:207: error: Public
symbol drawable/stat_sys_wifi_signal_2_fully declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:208: error: Public
symbol drawable/stat_sys_wifi_signal_3 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:209: error: Public
symbol drawable/stat_sys_wifi_signal_3_fully declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:210: error: Public
symbol drawable/stat_sys_wifi_signal_4 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:211: error: Public
symbol drawable/stat_sys_wifi_signal_4_fully declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:68: error: Public e
ntry identifier 0x7f0200e8 entry index is larger than available symbols (index 2
32, total symbols 13).
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:68: error: Public s
ymbol drawable/status_bar_background declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:55: error: Public s
ymbol drawable/status_bar_bg declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:212: error: Public
symbol drawable/status_bar_bg_tile declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:213: error: Public
symbol drawable/status_bar_close_on declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:56: error: Public s
ymbol drawable/status_bar_expand declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:214: error: Public
symbol drawable/status_bar_expand_default declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:215: error: Public
symbol drawable/status_bar_expand_pressed declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:216: error: Public
symbol drawable/status_bar_hr declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:57: error: Public s
ymbol drawable/status_bar_item_background declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:71: error: Public e
ntry identifier 0x7f0200eb entry index is larger than available symbols (index 2
35, total symbols 13).
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:71: error: Public s
ymbol drawable/status_bar_notification_row_background_color declared here is not
defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:70: error: Public e
ntry identifier 0x7f0200ea entry index is larger than available symbols (index 2
34, total symbols 13).
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:70: error: Public s
ymbol drawable/status_bar_recents_app_thumbnail_background declared here is not
defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:58: error: Public s
ymbol drawable/status_bar_recents_background declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:69: error: Public e
ntry identifier 0x7f0200e9 entry index is larger than available symbols (index 2
33, total symbols 13).
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:69: error: Public s
ymbol drawable/status_bar_recents_background_solid declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:59: error: Public s
ymbol drawable/status_bar_settings_slider_disabled declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:60: error: Public s
ymbol drawable/status_bar_ticker_background declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:61: error: Public s
ymbol drawable/status_bar_toggle_button declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:62: error: Public s
ymbol drawable/ticker_background declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:67: error: Public e
ntry identifier 0x7f0200e7 entry index is larger than available symbols (index 2
31, total symbols 13).
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:67: error: Public s
ymbol drawable/ticker_background_color declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:217: error: Public
symbol drawable/title_bar_shadow declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:218: error: Public
symbol drawable/toggle_2g_1 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:219: error: Public
symbol drawable/toggle_2g_1_off declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:220: error: Public
symbol drawable/toggle_2g_2 declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:221: error: Public
symbol drawable/toggle_2g_2_off declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:222: error: Public
symbol drawable/toggle_airplane declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:223: error: Public
symbol drawable/toggle_airplane_off declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:224: error: Public
symbol drawable/toggle_bluetooth declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:225: error: Public
symbol drawable/toggle_bluetooth_off declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:226: error: Public
symbol drawable/toggle_data declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:227: error: Public
symbol drawable/toggle_data_off declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:228: error: Public
symbol drawable/toggle_gps declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:229: error: Public
symbol drawable/toggle_gps_off declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:230: error: Public
symbol drawable/toggle_lte declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:231: error: Public
symbol drawable/toggle_lte_off declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:232: error: Public
symbol drawable/toggle_rotate declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:233: error: Public
symbol drawable/toggle_rotate_off declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:234: error: Public
symbol drawable/toggle_silence declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:235: error: Public
symbol drawable/toggle_silence_off declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:236: error: Public
symbol drawable/toggle_sync declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:237: error: Public
symbol drawable/toggle_sync_off declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:238: error: Public
symbol drawable/toggle_torch declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:239: error: Public
symbol drawable/toggle_torch_off declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:240: error: Public
symbol drawable/toggle_vibrate declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:241: error: Public
symbol drawable/toggle_vibrate_off declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:242: error: Public
symbol drawable/toggle_wifi declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:243: error: Public
symbol drawable/toggle_wifi_ap declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:244: error: Public
symbol drawable/toggle_wifi_ap_off declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:245: error: Public
symbol drawable/toggle_wifi_off declared here is not defined.
C:\android-sdk\platform-tools\SystemUI\res\values\public.xml:63: error: Public s
ymbol drawable/togglebtn_bg declared here is not defined.
brut.androlib.AndrolibException: brut.common.BrutException: could not exec comma
nd: [aapt, p, -F, C:\Users\Me\AppData\Local\Temp\APKTOOL1507387117660897386.tmp,
-I, C:\Users\Me\apktool\framework\1.apk, -S, C:\android-sdk\platform-tools\Syst
emUI\res, -M, C:\android-sdk\platform-tools\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\Me\AppData\Local\Temp\APKTOOL1507387117660897386.tmp, -I, C:\Users\Me\apkto
ol\framework\1.apk, -S, C:\android-sdk\platform-tools\SystemUI\res, -M, C:\andro
id-sdk\platform-tools\SystemUI\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
C:\android-sdk\platform-tools>


----------



## runandhide05

its all around, and u should really read the apktool ref and faq. that said
if you use 1.4.1 to decomp and 1.4.3 to rebuild that should fix you problem, 
if not, in apktool there are other ways to fix it, along with amodified apktool.jar
happy researching


----------



## sonicxml

http://dl.dropbox.com/u/50845713/Android/working-apktool.zip

Here's a link for working apktool files - I don't remember where I got it, but they do work with ics files. 
No need for switching between apktool versions anymore


----------



## imnuts

Why not just make the changes you want to the source and recompile the apk that way, rather than through apk tool? Granted, it will take a little more disk space, and may require more time, but it's a cleaner way of hacking the apk.


----------



## sonicxml

imnuts said:


> Why not just make the changes you want to the source and recompile the apk that way, rather than through apk tool? Granted, it will take a little more disk space, and may require more time, but it's a cleaner way of hacking the apk.


I know I need apktool because I work with MIUI, so it's kinda hard to get the source


----------



## maxwintrobe

sonicxml said:


> http://dl.dropbox.co...ing-apktool.zip
> 
> Here's a link for working apktool files - I don't remember where I got it, but they do work with ics files.
> No need for switching between apktool versions anymore


OMFG \o/ - read countless posts - tried APK multi-Tool, AutoAPKTool, EasyAPK, plain apktool, etc. - did the decompile with 1.4.1/1.4.2 but then recompile with 1.4.3 - downloaded all sorts of supposedly working apktools - finally yours ACTUALLY does work, no plurals.xml edit needed, framework-res.apk Sprint GNex fitsnugly Jellybro CM10 nightly kang. Many thanks!!!​


----------



## yarly

sonicxml said:


> I know I need apktool because I work with MIUI, so it's kinda hard to get the source


Most of the source for MIUI is now open as of a month or so ago. It's applied as a patch the the AOSP source so it's screwy and no, I have not ever tried or care to (not a fan of MIUI). However, you can compile it most likely now if I was able to understand the gist of their discussion in Mandarin on their forum.

https://github.com/MiCode

Best tool to decompile apk files and such though is baksmali and smali. Everything else is basically a wrapper for those and not always the most up to date. Creator of baksmali/smali updates constantly when the Android API changes or someone reports a bug.


----------

