[team d.i.r.t] how to properly de/recompile apks on all android versions!

Search This thread

evol4g

Senior Member
Mar 20, 2012
1,882
1,446
chandler-gilbert 480!!!
As I've said before in this thread, I am no expert, but until someone who is comes along...

FROM THE OP: If you are decompiling any framework other that AOSP ie: sense, touchwiz, ect you will have to install the framework and systemui.apk for them as well, ie: for miui it's framework-miui-res.apk

Thought it worth asking if you are following that step? For example, on my Samsung E4GT with stock ICS Touchwiz ROM, besides installing framework-res.apk, I also install twframework-res.apk which is also found in the system/framework/ folder.

Yes.. If its touchwiz the command is
java -jar apktool.jar if twframework-res.apk
Htc is framework-htc-res.apk i think... Idk i dont work with sense often tho..

@vbcoder
Try deleting those two folders that are in the error is reporting


ALSO ANYONE POSTING ERRORS USE THIS SITE
paste.ubuntu.com


Sent from my SPH-D710 using Tapatalk 2
 

Chrack

Senior Member
Feb 12, 2011
788
1,527
Bergheim
Samsung Galaxy S23 Ultra
Hello,

i have a problem with one apk in my Rom.
All other apk´s (systemUI/framework-res/etc) have no problems at de/compile.

I try to decompile the SecPhone.apk with no errors, now i changed nothing an try compile but with follow errors.

Code:
c:\apktool>java -jar apktool.jar b SecPhone
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
c:\apktool\SecPhone\res\values\arrays.xml:245: error: Found tag reference-array
where item is expected
c:\apktool\SecPhone\res\values-es\strings.xml:195: error: Multiple substitutions
 specified in non-positional format; did you mean to add the formatted="false" a
ttribute?
c:\apktool\SecPhone\res\values-es\strings.xml:196: error: Unexpected end tag str
ing
c:\apktool\SecPhone\res\values-es-rUS\strings.xml:200: error: Multiple substitut
ions specified in non-positional format; did you mean to add the formatted="fals
e" attribute?
c:\apktool\SecPhone\res\values-es-rUS\strings.xml:201: error: Unexpected end tag
 string
c:\apktool\SecPhone\res\values-it\strings.xml:197: error: Multiple substitutions
 specified in non-positional format; did you mean to add the formatted="false" a
ttribute?
c:\apktool\SecPhone\res\values-it\strings.xml:198: error: Unexpected end tag str
ing
c:\apktool\SecPhone\res\values\public.xml:1393: error: Public entry identifier 0
x7f080075 entry index is larger than available symbols (index 117, total symbols
 77).
c:\apktool\SecPhone\res\values\public.xml:1393: error: Public symbol array/RAD_a
rr_roaming_auto_dial_help declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1394: error: Public entry identifier 0
x7f080076 entry index is larger than available symbols (index 118, total symbols
 77).
c:\apktool\SecPhone\res\values\public.xml:1394: error: Public symbol array/RAD_r
oaming_auto_dial_settings declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1391: error: Public entry identifier 0
x7f080073 entry index is larger than available symbols (index 115, total symbols
 77).
c:\apktool\SecPhone\res\values\public.xml:1391: error: Public symbol array/calle
rimage_alert_changed declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1343: error: Public symbol array/calle
rimage_alert_changed_for_kor declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1392: error: Public entry identifier 0
x7f080074 entry index is larger than available symbols (index 116, total symbols
 77).
c:\apktool\SecPhone\res\values\public.xml:1392: error: Public symbol array/calle
rimage_alert_default declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1344: error: Public symbol array/calle
rimage_alert_default_for_kor declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1381: error: Public entry identifier 0
x7f080069 entry index is larger than available symbols (index 105, total symbols
 77).
c:\apktool\SecPhone\res\values\public.xml:1381: error: Public symbol array/cdma_
network_preferences_choices declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1382: error: Public entry identifier 0
x7f08006a entry index is larger than available symbols (index 106, total symbols
 77).
c:\apktool\SecPhone\res\values\public.xml:1382: error: Public symbol array/cdma_
network_preferences_values declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1379: error: Public entry identifier 0
x7f080067 entry index is larger than available symbols (index 103, total symbols
 77).
c:\apktool\SecPhone\res\values\public.xml:1379: error: Public symbol array/cdma_
roaming_mode_choices declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1380: error: Public entry identifier 0
x7f080068 entry index is larger than available symbols (index 104, total symbols
 77).
c:\apktool\SecPhone\res\values\public.xml:1380: error: Public symbol array/cdma_
roaming_mode_values declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1383: error: Public entry identifier 0
x7f08006b entry index is larger than available symbols (index 107, total symbols
 77).
c:\apktool\SecPhone\res\values\public.xml:1383: error: Public symbol array/cdma_
subscription_choices declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1384: error: Public entry identifier 0
x7f08006c entry index is larger than available symbols (index 108, total symbols
 77).
c:\apktool\SecPhone\res\values\public.xml:1384: error: Public symbol array/cdma_
subscription_values declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1375: error: Public entry identifier 0
x7f080063 entry index is larger than available symbols (index 99, total symbols
77).
c:\apktool\SecPhone\res\values\public.xml:1375: error: Public symbol array/cdma_
system_select_choices declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1377: error: Public entry identifier 0
x7f080065 entry index is larger than available symbols (index 101, total symbols
 77).
c:\apktool\SecPhone\res\values\public.xml:1377: error: Public symbol array/cdma_
system_select_sub_choices declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1378: error: Public symbol array/cdma_
system_select_sub_values declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1376: error: Public symbol array/cdma_
system_select_values declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1361: error: Public entry identifier 0
x7f080055 entry index is larger than available symbols (index 85, total symbols
77).
c:\apktool\SecPhone\res\values\public.xml:1361: error: Public symbol array/clir_
display_values declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1362: error: Public entry identifier 0
x7f080056 entry index is larger than available symbols (index 86, total symbols
77).
c:\apktool\SecPhone\res\values\public.xml:1362: error: Public symbol array/clir_
values declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1357: error: Public symbol array/conne
ct_query declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1358: error: Public symbol array/count
ry_query declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1348: error: Public symbol array/data_
roaming_guard_set declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1395: error: Public entry identifier 0
x7f080077 entry index is larger than available symbols (index 119, total symbols
 77).
c:\apktool\SecPhone\res\values\public.xml:1395: error: Public symbol array/ddtm_
mode_entries declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1396: error: Public symbol array/ddtm_
mode_values declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1387: error: Public entry identifier 0
x7f08006f entry index is larger than available symbols (index 111, total symbols
 77).
c:\apktool\SecPhone\res\values\public.xml:1387: error: Public symbol array/dtmf_
tone_entries declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1388: error: Public entry identifier 0
x7f080070 entry index is larger than available symbols (index 112, total symbols
 77).
c:\apktool\SecPhone\res\values\public.xml:1388: error: Public symbol array/dtmf_
tone_values declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1331: error: Public symbol array/emerg
ency_domestic_name_list_for_kt declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1335: error: Public symbol array/emerg
ency_domestic_name_list_for_lgt declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1336: error: Public symbol array/emerg
ency_domestic_name_list_for_lgt_no_sim declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1327: error: Public symbol array/emerg
ency_domestic_name_list_for_skt declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1333: error: Public symbol array/emerg
ency_domestic_number_list_for_kt declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1339: error: Public symbol array/emerg
ency_domestic_number_list_for_lgt declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1340: error: Public symbol array/emerg
ency_domestic_number_list_for_lgt_no_sim declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1329: error: Public symbol array/emerg
ency_domestic_number_list_for_skt declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1332Exception in thread "main" : error
: Public symbol array/emergency_roaming_name_list_for_kt declared here is not de
fined.
c:\apktool\SecPhone\res\values\public.xml:1337: error: Public symbol array/emerg
ency_roaming_name_list_for_lgt declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1338: error: Public symbol array/emerg
ency_roaming_name_list_for_lgt_cs_available declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1328: error: Public symbol array/emerg
ency_roaming_name_list_for_skt declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1334: error: Public symbol array/emerg
ency_roaming_number_list_for_kt declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1341: error: Public symbol array/emerg
ency_roaming_number_list_for_lgt declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1342: error: Public symbol array/emerg
ency_roaming_number_list_for_lgt_cs_available declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1330: error: Public symbol array/emerg
ency_roaming_number_list_for_skt declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1349: error: Public symbol array/globa
l_data_roaming_access_entries declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1350: error: Public symbol array/globa
l_data_roaming_access_values declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1373: error: Public entry identifier 0
x7f080061 entry index is larger than available symbols (index 97, total symbols
77).
c:\apktool\SecPhone\res\values\public.xml:1373: error: Public symbol array/gsm_u
mts_network_preferences_choices declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1374: error: Public entry identifier 0
x7f080062 entry index is larger than available symbols (index 98, total symbols
77).
c:\apktool\SecPhone\res\values\public.xml:1374: error: Public symbol array/gsm_u
mts_network_preferences_values declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1345: error: Public symbol array/kt_ad
ded_service_menu declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1347: error: Public symbol array/kt_ad
ded_service_sub_menu declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1346: error: Public symbol array/kt_in
box_menu declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1351: error: Public symbol array/lgt_d
efault_roaming_values declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1371: error: Public entry identifier 0
x7f08005f entry index is larger than available symbols (index 95, total symbols
77).
c:\apktool\SecPhone\res\values\public.xml:1371: error: Public symbol array/list_
language_entries declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1372: error: Public entry identifier 0
x7f080060 entry index is larger than available symbols (index 96, total symbols
77).
c:\apktool\SecPhone\res\values\public.xml:1372: error: Public symbol array/list_
language_values declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1326: error: Public symbol array/pref_
roaming_options_values declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1325: error: Public symbol array/pref_
settings_roaming_options declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1363: error: Public entry identifier 0
x7f080057 entry index is larger than available symbols (index 87, total symbols
77).
c:\apktool\SecPhone\res\values\public.xml:1363: error: Public symbol array/prefe
rred_network_mode_choices declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1365: error: Public entry identifier 0
x7f080059 entry index is larger than available symbols (index 89, total symbols
77).
c:\apktool\SecPhone\res\values\public.xml:1365: error: Public symbol array/prefe
rred_network_mode_choices_lte declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1367: error: Public symbol array/prefe
rred_network_mode_choices_lte_global declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1369: error: Public symbol array/prefe
rred_network_mode_choices_lte_global_non_cdma declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1364: error: Public symbol array/prefe
rred_network_mode_values declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1366: error: Public symbol array/prefe
rred_network_mode_values_lte declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1368: error: Public symbol array/prefe
rred_network_mode_values_lte_global declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1370: error: Public symbol array/prefe
rred_network_mode_values_lte_global_non_cdma declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1397: error: Public entry identifier 0
x7f080079 entry index is larger than available symbols (index 121, total symbols
 77).
c:\apktool\SecPhone\res\values\public.xml:1397: error: Public symbol array/roami
ng_mode_entries declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1398: error: Public entry identifier 0
x7f08007a entry index is larger than available symbols (index 122, total symbols
 77).
c:\apktool\SecPhone\res\values\public.xml:1398: error: Public symbol array/roami
ng_mode_values declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1399: error: Public entry identifier 0
x7f08007b entry index is larger than available symbols (index 123, total symbols
 77).
c:\apktool\SecPhone\res\values\public.xml:1399: error: Public symbol array/roami
ng_network_mode_list declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1400: error: Public entry identifier 0
x7f08007c entry index is larger than available symbols (index 124, total symbols
 77).
c:\apktool\SecPhone\res\values\public.xml:1400: error: Public symbol array/roami
ng_network_mode_list_values declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1324: error: Public symbol array/selec
t_dialog_items declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1359: error: Public symbol array/sid_q
uery declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1360: error: Public symbol array/sid_q
uery2 declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1385: error: Public entry identifier 0
x7f08006d entry index is larger than available symbols (index 109, total symbols
 77).
c:\apktool\SecPhone\res\values\public.xml:1385: error: Public symbol array/tty_m
ode_entries declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1386: error: Public symbol array/tty_m
ode_values declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1355: error: Public symbol array/voice
call_type_entries declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1356: error: Public symbol array/voice
call_type_values declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1389: error: Public entry identifier 0
x7f080071 entry index is larger than available symbols (index 113, total symbols
 77).
c:\apktool\SecPhone\res\values\public.xml:1389: error: Public symbol array/voice
mail_notification_vibrate_when_entries declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1390: error: Public symbol array/voice
mail_notification_vibrate_when_values declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1352: error: Public symbol array/zzz_t
ts_incoming_call_from declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1353: error: Public symbol array/zzz_t
ts_notification_voicemail_title declared here is not defined.
c:\apktool\SecPhone\res\values\public.xml:1354: error: Public symbol array/zzz_t
ts_string_langs declared here is not defined.
brut.androlib.AndrolibException: brut.common.BrutException: could not exec comma
nd: [aapt, p, --min-sdk-version, 15, --target-sdk-version, 15, -F, C:\Users\Lapp
y\AppData\Local\Temp\APKTOOL2200843832259958825.tmp, -I, C:\Users\Lappy\apktool\
framework\1.apk, -S, c:\apktool\SecPhone\res, -M, c:\apktool\SecPhone\AndroidMan
ifest.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, 15, --target-sdk-version, 15, -F, C:\Users\Lappy\AppData\Local\Temp\A
PKTOOL2200843832259958825.tmp, -I, C:\Users\Lappy\apktool\framework\1.apk, -S, c
:\apktool\SecPhone\res, -M, c:\apktool\SecPhone\AndroidManifest.xml]
        at brut.util.OS.exec(OS.java:83)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:253)
        ... 6 more

c:\apktool>
 

evol4g

Senior Member
Mar 20, 2012
1,882
1,446
chandler-gilbert 480!!!
K
1) if you read the post above you you'd see that I don't want people posting long huge errors on here..
Please use paste.Ubuntu.com

I'll let it sly this time ;) lol

2) as far as your error goes its an interesting one at that.. have you tried simply decompiling and recompiling with no changes?

Sent from my Nexus S 4G using Tapatalk 2
 

boyheadkick

Senior Member
Oct 10, 2012
2,425
1,158
Davao City
is this thread still active?if so please advise..
i just started learning how to this stuff and i found your thread so tried it out..i got a problem though when i recompile to apk..

i got error W: Could not find sources
i didnt do any changes with anything
please advise

untitled_zpsfc8eb1b5.png


if im violating any forum or thread rules please report this post
 

DonDizzurp

Senior Member
Aug 15, 2009
2,616
447
The Internet
There is now a new person taking over the apktool project, his name is ibotpeaches.. His apktool works with every android version up to date.. This thread will now be a basic guide on how to use apktool :)

iBotPeaches' APKTOOL THREAD

What I do is create a folder to work in and call it for example:
Code:

c:\apktools

1) Take the apktool.jar from ibot's OP and the modded aapt he provided and place them in the folder.

2) You will need to pull the framework-res.apk from the rom you are working on. Copy it to c:\apktools.

4) Open a command window and navigate to your apktool folder
cd c:\apktools

5) We now need to install the framework and type the following:
java -jar apktool.jar if framework-res.apk

If you are decompiling any framework other that AOSP ie: sense, touchwiz, ect you will have to install the framework and systemui.apk for them as well, ie: for miui it's framework-miui-res.apk

You only need to do this once, unless you are working on a different Rom, then you will need to copy the framework-res.apk from that Rom and run the above command again.

6) We can now decompile framework-res with apktool
java -jar apktool.jar d framework-res.apk (here you can add the folder you'd like to have your extracted apk save to)
it will create a folder by the name of the .apk or .jar by default but say you wanted it just to go to a folder called "frameres" (just to be a lil more convienent while typing your command would look like this
java -jar apktool.jar d framework-res.apk frameres

the d option stands for decompile and you will now see a folder under c:\apktools\frameres (in my case, yours will be whatever your output folder's name is). Here is all the output and can make any changes you want, and then can recompile. I would test to make sure you can recompile before making a lot of changes though.


6) We will now compile framework-res.apk
java -jar apktool.jar b frameres NEWframework-res.apk
I always put something different in the new apk name for instance i always put NEWapk.apk some people use numbers like apk1.apk ect.. whatever you feel is comfortable for you.. But once you enter the command it will take a few minutes and it should complete without any errors.


7) Once it is done compiling you will need to go to c:\apktools\ and you will now see your new framework-res.apk in my case titled "NEWframework-res.apk"

IMPORTANT LAST STEP
Once you recompile the apk you're going to wanna use 7-zip to open both the original UNMODDED apk and the newly compiled apk
you wanna copy the META-INF folder and the AndroidManifest.xml from the ORIGINAL into the NEWLY compiled apk otherwise your apk won't work


Just remember to copy any apk you want to decompile right into the root of c:\apktools, run the decompile command and it will create a folder of the output that has the same of the apk file.

I was stuck for two days figuring out why the damn recompiled APK was smaller than the original. This helped a lot.. thanks!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 44
    There is now a new person taking over the apktool project, his name is ibotpeaches.. His apktool works with every android version up to date.. This thread will now be a basic guide on how to use apktool :)

    iBotPeaches' APKTOOL THREAD

    What I do is create a folder to work in and call it for example:
    Code:

    c:\apktools

    1) Take the apktool.jar from ibot's OP and the modded aapt he provided and place them in the folder.

    2) You will need to pull the framework-res.apk from the rom you are working on. Copy it to c:\apktools.

    4) Open a command window and navigate to your apktool folder
    cd c:\apktools

    5) We now need to install the framework and type the following:
    java -jar apktool.jar if framework-res.apk

    If you are decompiling any framework other that AOSP ie: sense, touchwiz, ect you will have to install the framework and systemui.apk for them as well, ie: for miui it's framework-miui-res.apk

    You only need to do this once, unless you are working on a different Rom, then you will need to copy the framework-res.apk from that Rom and run the above command again.

    6) We can now decompile framework-res with apktool
    java -jar apktool.jar d framework-res.apk (here you can add the folder you'd like to have your extracted apk save to)
    it will create a folder by the name of the .apk or .jar by default but say you wanted it just to go to a folder called "frameres" (just to be a lil more convienent while typing your command would look like this
    java -jar apktool.jar d framework-res.apk frameres

    the d option stands for decompile and you will now see a folder under c:\apktools\frameres (in my case, yours will be whatever your output folder's name is). Here is all the output and can make any changes you want, and then can recompile. I would test to make sure you can recompile before making a lot of changes though.


    6) We will now compile framework-res.apk
    java -jar apktool.jar b frameres NEWframework-res.apk
    I always put something different in the new apk name for instance i always put NEWapk.apk some people use numbers like apk1.apk ect.. whatever you feel is comfortable for you.. But once you enter the command it will take a few minutes and it should complete without any errors.


    7) Once it is done compiling you will need to go to c:\apktools\ and you will now see your new framework-res.apk in my case titled "NEWframework-res.apk"

    IMPORTANT LAST STEP
    Once you recompile the apk you're going to wanna use 7-zip to open both the original UNMODDED apk and the newly compiled apk
    you wanna copy the META-INF folder and the AndroidManifest.xml from the ORIGINAL into the NEWLY compiled apk otherwise your apk won't work


    Just remember to copy any apk you want to decompile right into the root of c:\apktools, run the decompile command and it will create a folder of the output that has the same of the apk file.
    4
    Thanks for the useful information! Here is an archive of batch files that simplify the process. Enough to drag needed file or folder with mouse at appropriate batch file:

    apktool-if.cmd - installation of framework-res, SystemUI, etc.
    apktool-d-1.4.2.cmd - decompiling with apktool.jar.1.4.2.
    apktool-d-1.4.3.cmd - decompiling with apktool.jar.1.4.3.
    apktool-b.cmd - building.

    Correct version of apktool is selected automatically.

    Link: ApkTools-ICS-Simple.rar
    2
    I need to update this thread.. there's a gentleman by the name of ibotpeaches who's worked his ass off continuing the apktool project.. I believe he's on 1.4.10 now.. I'll update op with link to his OP tomorrow and basic instructions to use apktool.. :)

    Sent from my SPH-D710 using Tapatalk 2
    2
    Thanks for sharing this info. I know a lot of people have been frustrated lately getting apks to properly decode and rebuild in ICS.

    I took your great instructions and refined them a bit to reduce the workflow, having to rename the apktool.jar between decoding and building. You can download what I am using here.


    • First register framework-res by placing the framework-res.apk from your rom into the extracted apktool zip directory, then execute 0-FRAMEWORK-IF.BAT:

      Code:
      C:\Test\Test1.4.2-1.4.3>0-FRAMEWORK-IF.bat
      I: Framework installed to: C:\Users\Derek\apktool\framework\1.apk
    • Next decode the apk, 1-DECODE.BAT SystemUI.apk . A new output sub-directory will automatically be created based on the apk name (SystemUI.apk_out):

      Code:
      C:\Test\Test1.4.2-1.4.3>apktool-1.4.2.bat d SystemUI.apk ./SystemUI.apk_out
      I: Baksmaling...
      I: Loading resource table...
      I: Loaded.
      I: Loading resource table from file: C:\Users\Derek\apktool\framework\1.apk
      I: Loaded.
      I: Decoding file-resources...
      I: Decoding values*/* XMLs...
      I: Done.
      I: Copying assets and libs...
    • Make your edits and build. 2-BUILD.BAT SystemUI.apk:

      Code:
      C:\Test\Test1.4.2-1.4.3>2-BUILD.bat SystemUI.apk
      
      C:\Test\Test1.4.2-1.4.3>apktool-1.4.3.bat b -f -d SystemUI.apk_out
      I: Smaling...
      I: Building resources...
      I: Building apk file...

    Download zip package
    2
    By the way, when I induce bootloop issues like this from messing with the system, I've started doing a custom Nandroid restore and just restoring the system, to save time. If anyone knows a reason not to do this, please let me know.