[Defy General] [] AL []:
Since I've mentioned it...here it is!:

HOW TO modify the SystemUI.apk to get TRANSPARENT STATUS BAR on any CM7-Jordan build [and other cm7 builds for different phones].

* This has been verified to work at least with ADW Launcher, ADW-EX Launcher, GO Launcher and FTL launcher BUT READ the Notes at the very bottom of the post.

What you need:

- From the OP, you should now have 7-zip and RootExplorer installed; otherwise download from here and here;

- Download smali/baksmali files from here and put the 4 files in a new folder (for example: c:\smali) [which I will use in this guide];

- Download and install Notepad++ from here: - this is just an awesome text editor ;);

Now let's do this:

0- Make a backup copy of your system and/or of the original SystemUI.apk file [from the /system/app directory].

1- With 7-zip installed, right-click on the zip of your current nightly and choose "7-Zip --> Open archive" [DO NOT extract it, just "Open Archive"] and navigate to: system/app and click and drag SystemUI.apk to your computer's desktop;

2- Repeat step 1 with the SystemUI.apk on your desktop and to find the file: classes.dex in the root folder of the apk. Select it and drag it (to make a copy of it) into your c:\smali directory (you can leave SystemUI.apk archive opened as we'll replace that file back in later on);

3- Open a CMD prompt (click Start and type: CMD) and type following 2 commands to decompile the classes.dex file:

cd c:\smali
java -jar baksmali-1.2.8.jar -o classout/ classes.dex

[*** --> Replace the "1.2.8" part by what ever file version you've downloaded]

** Do not close the CMD window just yet.

4- Go in the classout directory that was just created in c:\smali, and find the file named: StatusBarService.smali [in: c:\smali\classout\com\android\systemui\statusbar\] and open it with Notepad++;

5- Search for the line containing:

invoke-direct/range {v0 .. v5}, Landroid/view/WindowManager$LayoutParams;-><init>(IIIII)V

just above it, you will see: const/4 v5, 0×2 --> change that to: const/4 v5, -0×3

--> that line should be around line# 2223 for recent Defy and Defy+ cm7 nightly builds

6- Save the file and exit Notepad++;

7- Go back to your CMD prompt and enter this command to recompile the classes.dex file:

java -jar smali-1.2.8.jar classout -o classes.dex

[*** --> Don't forget to replace the "1.2.8" part by what ever file version you've downloaded]

8- Close your cmd window and slide the new classes.dex file back over your SystemUI.apk opened archive (drag and drop) and then close it.

Now the rest is just like in the OP:

To replace the SystemUI.apk on your phone:

So 1st, place the modded SystemUI.apk on the root of your sd card.

Open up Teminal Emulator from the app drawer and type the following:

su
cd /sdcard/ #(<-- modify this accordingly if you've placed your new systemUI.apk else where)
mount -o remount,rw /system/
cp -f SystemUI.apk /system/app

*** be careful here ***: once you do this last step, the launcher might crash or you might even get into an "error loop"; if you do, long press the power button and try to reboot between 2 errors popups OR just pull the battery out and reboot.

If you did not get into an error loop or if you've already rebooted, your status bar might be gone now; don't freak out!

--> Go set the permissions/ownership of the new SystemUI.apk in /system/app/

WITH Teminal Emulator again:

su
cd /system/app
mount -o remount,rw /system/
chmod 644 SystemUI.apk
chown 0.0 SystemUI.apk

OR

Using RootExplorer, navigate to: /system/app and long press on the SystemUI.apk to select "Permissions" and (scroll down for) "Change owner" entries to set all of their options exactly like the other files in that folder.

Exit RootExplorer or Terminal

Make sure to disable (UNCHECK) "Wallpaper Hack" in the phone settings ADWLauncher_System Preferences or "use High Quality Pictures" option if you use GO Launcher.

Reboot and enjoy!

Notes:

- Some of your widgets might need to be removed from your phone's screen and re-installed to display properly.

- Do not try to edit the systemUI.apk and incorporate it in the nightly zip before install; it won't work - it HAS TO be done on the phone after the nightly install has fully booted at least once.

- This will allow my theme or other transparent-enabled themes to work; I will add how to do this on the CM7 default themes (or any other) later maybe...

So for now, that's it!! - It wasn't too hard to do wasn't it? :cool:

ah!.. might as well finish this... ;):

This should probably have been at the beginning of the post but...

If you want the transparency on any theme (CM7 default themes at least), you might want to try the following:

Note: This will work at least on ADW Launcher, GO Launcher and FTL launcher [thanks lurkerPL ] - but keep reading as some launcher settings might be required.

All you need is to modify a few png images in the SystemUI.apk before replacing it onto the phone steps.

1- go to \SystemUI.apk\res\drawable-hdpi\ folder and drag this file out to your desktop:

statusbar_background.9.png

Optionally, do it for these 3 files also (which are for the notification pane pulldown background):

status_bar_background.9.png

shade_bg.png

status_bar_close_on.9.png

2- Open the PNG files in Paint.Net (nice and free: get it here ;)), [Gimp, Photoshop, or whatever your favorite image/picture editor capable of png transparency] and delete their background for fully transparent statusbar OR if you want semi-transparency; do that instead. in Paint.net, this is done by selecting: Layers_Layer properties..._Opacity value: 0-255.

--> I believe that I previously used something like 10% layer transparency for the first 2 files and 25% for the last 2 but you'll have to find what king of semi-transparency you prefer.

3- Go on and replace those modified PNG files back into the SystemUI.apk [\SystemUI.apk\res\drawable-hdpi\ folder Opened archive] by just dragging them over their original folder [7-zip again].

Go on with the SystemUI.apk replacement and reboot.

Notes:

- you might have to play around and switch theme with the ThemeChoser.

- again: don't forget to disable Wallpaper Hack in ADWLauncher settings_System preferences or "use High Quality Pictures" option with GO Launcher.