[Android Themes] Cortiis:
Reading the next couple of paragraphs will help you to yourself create a Transparent Statusbar for CM7 based and also most other ROMs. I feel that despite some good programs available for doing this, for example the excellent patcher from ZduneX25, users face quite a bit of difficulty in creating their own transparent statusbars. So here is a detaild guide based on my experience. I have prepared status bars at least for 20 different ROMs using this process with zero fails. Hope it helps people out here.

Prerequisites:

Properly configured Apktool - http://code.google.com/p/android-apktool/

7-zip - http://www.7-zip.org/

Framework-res.apk and SystemUI.apk of the ROM for which you wish to create the statusbar

SystemUI.apk from an existing ROM or theme having transparent statusbar from which you want to copy the transparent images. I have attached the one I am using currently. Use it if you want.

Steps to create the statusbar:

Step 1 – Edit the SystemUI.apk to enable transparency

Open command prompt and go to the directory where you have installed Apktool

Install Framework-res.apk

apktool if Framework-res.apk

Decompile SystemUI.apk

apktool d /path/to/SystemUI.apk /path/to/decompiled_files

Now in the decompiled_files folder, open the following file ina a text editor

/path/to/decompiled_files/smali/com/android/systemui/statusbar/StatusBarService.smali

Search and Find the following string:

new-instance v0, Landroid/view/WindowManager$LayoutParams;

Three or four lines below this string you will find the following:

const/4 v5, 0x2

Replace it with

const/4 v5, -0x3

Now open the following file in a text editor

/path/to/decompiled_files/res/layout/status_bar.xml

You will find the following code at the end of the file

<com.android.systemui.statusbar.DateView android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:gravity="left|center" android:id="@id/date" android:background="@drawable/statusbar_background" android:paddingLeft="6.0px" android:paddingRight="6.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />

Replace it with

<com.android.systemui.statusbar.DateView android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:gravity="center|center" android:id="@id/date" android:background="@drawable/statusbar_background2" android:paddingLeft="6.0px" android:paddingRight="6.0px" android:layout_width="fill_parent" android:layout_height="fill_parent" android:singleLine="true" />

Save and close the file

Browse to

/path/to/decompiled_files/drawable-mdpi or drawable-hdpi

Copy

statusbar_background.9.png

and paste it again as

statusbar_background2.9.png

in the same folder. You can also copy-paste and rename the file.

Recompile the SystemUI.apk

apktool b /path/to/decompiled_files

The new SystemUI.apk is saved to

/path/to/decompiled_files/dist/SystemUI.apk

Step 2 – Add the transparent images

Open the new SystemUI.apk in 7-zip and browse to the following locations depending on your device resolution

\res\drawable-mdpi\ or \res\drawable-hdpi\

Open the other SystemUI.apk (no. 4 in the prerequisites above) also in 7-zip and browse to the same folder,

\res\drawable-mdpi\ or \res\drawable-hdpi\

depending on your device resolution. Select the following files

statusbar_background.9.png

statusbar_background2.9.png

shade_bg.png (if you want a transparent pull down as well. Make sure the shade_bg.png is a transparent image.)

Drag and drop these files over to the other open 7-zip window containing your new SystemUI.apk. 7-zip will ask for confirmation, click OK.

Step 3 – Sign SystemUI.apk

You can use a number of signing tools to sign your files but in my experience it results in error many times, specially on Windows. The alternative way is use the signed files of the original apk.

Open the new SystemUI.apk in 7-zip

Open the original SystemUI.apk in 7-zip. This is the original SystemUI.apk from the ROM for which you want to create the statusbar, the one you decompiled.

Drag and drop the META-INF folder and AndroidManifest.xml file from the original to the new SystemUI.apk.

Close all files. That’s it. You just signed your APK with zero chances of any error.

Now push this final SystemUI.apk to /system/app on you phone and reboot.

Of course the risk is your own here. If something bad happens just push your original SystemUI.apk to the phone and you should be good.

Also in case you find any error here, please inform me and I will try to correct it.

Click the Thanks button if this writeup helped you.:-)