[Samsung Galaxy Mega] jusho:
This tutorial i'll show you how to decompile and recompile systemui.apk windows only.

Why i made this, because i try to decompile systemui.apk and recompile it but it always failed when i recompile.

The problem when recompile is devide into 2 categories:

1. Style

2. No default translation

I dont know its is only mega systemui or all other devices too, but all device with 4.2.2 JB have almost same problem,

What tools do we need for this:

1. APKTool compatible with 4.2.2

2. AAPT

3. Zipalign

*) I already upload number 1-3 on the attatchment below

4. 7zip

5. Notepad++

Lets go to the tutorial:

1. Extract all tool (1-3) that we've dowload below and put all 4 files in c:\WINDOWS

2. Make folder in C:\ directory, in this tutorial i use APK TOOL

3. Put framework-res.apk and systemui.apk in this folder

4. Make another folder inside the APK TOOL called backup, and put another copy of systemui.apk there

5. Open CMD

6. CD the folder that you made, ex: cd apk tool

7. Than we start decompile by

apktool if framework-res.apk
apktool if systemui.apk
apktool d systemui.apk

8. When its done we'll have a folder called systemui, we can make any change there

After you make a change on your SystemUI.apk its time to recompile back..

9. Now if we proceed to compile the apk and it will make 2 error that i already mention above, but its okay we need to know where the error come from

apktool b systemui almostdone.apk

After that command a lot of error will show up in your cmd window. Lets fix it one by one.

Find the first problem:

C:\APK Tool\systemui\res\layout\system_bar_notification_panel_title.xml:14: error: Error: No resource found that matches the given name (at 'style' with value [MENTION=262514]style[/MENTION]/SystemBarNotificationText').

Its mean the first problem is style in C:\APK Tool\systemui\res\layout\system_bar_notification_panel_title.xml, and the error in line 14

Now open the xml file with notepad++ and find line 14, please add + in front of [MENTION=262514]style[/MENTION]/SystemBarNotificationText.

Old: [MENTION=262514]style[/MENTION]/SystemBarNotificationText

New: [MENTION=262514]style[/MENTION]/SystemBarNotificationText

And continue another style problem with same treat as above

After all style finish please try recompile again to know if all the style problem already gone

apktool b systemui almostdone.apk

If there is no style error again proceed to 2nd problem

2nd Problem

aapt: warning: string 'day_of_week_long_sunday' has no default translation in C:

\APK Tool\systemui\res; found: mk

aapt: warning: string 'day_of_week_long_thursday' has no default translation in

C:\APK Tool\systemui\res; found: mk

For no translation problem:

1. Open your systemui decompile folder and go to build/apk and delete androidmanifest.xml there

2. Open as archive your systemui.apk from backup folder above

3. Copy folder META-INF and AndroidManifest.xml

4. Paste both in build/apk

5. Done

When you try to recompile again

apktool b systemui almostdone.apk

everything should ok now and almostdone.apk already created in your folder.

10. Open as archive almostdone.apk and original systemui.apk from backup folder side by side with 7zip

11. Delete META-INF and AndroidManifest.xml from almostdone.apk and replace it with META-INF and AndroidManifest.xml from original SystemUI.apk

12. Close the 7zip folder and open cmd again and now put command

zipalign -v 4 almostdone.apk done.apk

13. Now the done.apk is already created, copy to your phone and rename it with SystemUI.apk

14. Put in /System/App and it should work.

Credit to:
[MENTION=4469251]powerpoint45[/MENTION] for the amazing thread about compilation systemui.apk original thread
[MENTION=1999614]devabhishek[/MENTION] for the tips in no translation original post

Hope this help guys, please press thanks below if this information is useful for you:)

Happy theming guys..