**These instructions apply to Mac and Linux only, due to the fact we're working with aosp source and building in windows is not supported at this time**
I approached this a little different than I’m used to seeing in terms of a mod. Normally we start off by decompiling an apk and go from there. Since this is for an aosp rom, we have easy access to the source code and can make changes there. Now, I don’t proclaim to know java. I have very, very little programming experience, and even that is limited to an introductory C++ class I just took. But even without knowing java, you’ll have a much easier time reading java source code than you will smali. So, yes, you need to sync with aosp to use this guide. It's not hard, and there's good instructions HERE.
As an aside, my personal opinion is that anyone that a true-blue xda'er should have aosp syned...even if you have no intention of building roms. It's like an android encyclopedia. I've learned A TON just from poking around/reading though some parts. I probably comprehend < 10%, but it's easily been one of the most beneficial things I've done to further my understanding.So now you have the source code. What we need to change is the PixelFormat for the statusbar. In froyo and gingerbread this was done in StatusBarService. It’s been changed a little in ics, although the edits remain in SystemUI. The two files I changed were StatusBar and PhoneStatusBar.
Starting in the root of your aosp working directory, the absolute path of the first file I edited is
Next you make similar edit in PhoneStatusBar.java. From the same directory that StatusBar.java is in, go to the phone directory and open PhoneStatusBar.java in your text editor. Now this file is much, much longer to read through. Rather than doing that (of course you can if you want) just performa search for that same text again “PixelFormat” You’ll get several returns, some of them will already have TRANSLUCENT set.
BUT...Don’t get carried away and change all the OPAQUE values. One of the search returns will be part of the function getRecentsLayoutParams (starts on line 378). The portion of code that you might be temted to change checks the PixelFormat by way of a boolean test
(opaque ? PixelFormat.OPAQUE : PixelFormat.TRANSLUCENT)
Edit: After reading the entire code a little bit more, I think we could change it toThe exact places I did change OPAQUE to TRANSLUCENT were in lines 311, and 481. That’s it for the code portion. Make sure to save your changes. Now go back to the res directory and we need to edit some xml files.without any ill effects, although I'm not sure what, if any, additional benefit we'd see. I have not tried.Code:PixelFormat.TRANSLUCENT
From the root of the SystemUI directory, open res/values/colors.xml. Find the entry for “status_bar_background” and change it’s value to whatever you want. In mine I’ve set it to “a6000000” which black but 35% translucent. The first 2 characters control the opacity on a scale from 0-255 where 0 is completely transparent and 255 is fully opaque. That value is then stated in hexadecimal format; e.g. 0=00, 255=ff.
*if you also want a translucent bottom menu bar, it is set in res/layout/navigation_bar.xml. Change the hex value of android:background=”ff000000” to your desired value for opacity.*
Now you should have all the edits in place for a translucent statusbar. All that’s left is to compile the apk. Before you compile SystemUI, you need to have ran the extract-files script. Only needs to be done once. Connect your phone to the computer(making sure that usb debugging is turned on) then in terminal, starting from the root of your aosp working directory:
cd device/samsung/maguro/ ./extract-files.sh
Now cd back to the root of your working directory and run
Next step to build your SystemUI is to run lunch. Just type "lunch" and press enter:
pendo:master pendo$ lunch You're building on Darwin Lunch menu... pick a combo: 1. full-eng 2. full_x86-eng 3. vbox_x86-eng 4. full_stingray-userdebug 5. full_wingray-userdebug 6. full_crespo-userdebug 7. full_crespo4g-userdebug 8. full_maguro-userdebug 9. full_toro-userdebug 10. full_panda-eng Which would you like? [full-eng]