Anyone know how to get a Translucent notification tray background in 2.3?
martijua said:
Anyone know how to get a Translucent notification tray background in 2.3?
Click to expand...
Click to collapse
It has to be done in systemui.apk. Have to open that specific file to the rom your running and edit the files inside. What exact rom are you running?
fdb8231 said:
It has to be done in systemui.apk. Have to open that specific file to the rom your running and edit the files inside. What exact rom are you running?
Click to expand...
Click to collapse
Thanks. I am running the stock rooted deodexed rom.
Here is what I did:
1 nandoid backup
2 adb devices
3 adb pull /system/app/SystemUI.apk SystemUI.apk (made a backup copy of this file)
4 open the SystemUI.apk file with winrar
5 inserted the "status_bar_header_background.9.png", "status_bar_close_on.9.png" and a transparent "status_bar_background.png" into the SystemUI.apk's \res\drawable-hdpi folder
6 adb remount
7 adb push SystemUI.apk /system/app/
8 adb reboot
as you can see from the attached screen shot...the "status_bar_header_background.9.png" and the "status_bar_close_on.9.png" worked but the transparent "status_bar_background.png" isnt transparent.
Any ideas?
martijua said:
Thanks. I am running the stock rooted deodexed rom.
Here is what I did:
1 nandoid backup
2 adb devices
3 adb pull /system/app/SystemUI.apk SystemUI.apk (made a backup copy of this file)
4 open the SystemUI.apk file with winrar
5 inserted the "status_bar_header_background.9.png", "status_bar_close_on.9.png" and a transparent "status_bar_background.png" into the SystemUI.apk's \res\drawable-hdpi folder
6 adb remount
7 adb push SystemUI.apk /system/app/
8 adb reboot
as you can see from the attached screen shot...the "status_bar_header_background.9.png" and the "status_bar_close_on.9.png" worked but the transparent "status_bar_background.png" isnt transparent.
Any ideas?
Click to expand...
Click to collapse
You should use 7 zip then you can open and edit without unzipping. Is this like what you want
Sent from my PC36100 using XDA App
More like this
It used to work in 2.2.
Oh, you dont have to unzip the apk when using winrar.
I believe that in system ui that is actually part of an xml and needs to be moddified using xml.
Is this a simple PNG swap, or are there any XML/smali edits required?
if you're having a bunch of trouble, send it on over to me and i'll help u out.
_Burst_ said:
Ok, check it out, obviously you will need to know how to use apktool. Do not ask me how to use it. Educate yourself.
To make the Notification Bar transparent I followed these steps:
-decompile SystemUI.apk
This is a direct quote and was very similar to what I had to do. The only different is that the code:
isn't exactly that. But, just look for the the const/4 and corresponding 0x2 and change that one to "-0x3."
Also, you may have to hunt for it, but it is there about 5-8 lines up.
To make the Notification Bar Shade transparent I followed these steps:
Again, direct quote and same situation, the v# might not match but just change the "0x2" to "-0x3."
And there ya go. Thanks to Master and ogdobber.
Click to expand...
Click to collapse
Enjoy yoself
SteelH said:
Is this a simple PNG swap, or are there any XML/smali edits required?
Click to expand...
Click to collapse
"status_bar_header_background.9.png" and the "status_bar_close_on.9.png" are simple PNG swap in the SystemUI.APK
Transparent notification background in the deodexed [ROM][STOCK] --- Version 4.22.651.2 --- Odexed & De-Odexed --- that was posted by xHausx requires that the SystemUI.apk be decompiled and then edit the status_bar_tracking.xml changing the default "android:background="#ff000000"" to "android:background="@drawable/shade_bg"". I'm getting a W: could not decode attr 0x20 error when decompiling so I havent been able to successfully make the changes to get the transparent shade_bg notification tray backdound to work.
If anybody can get this done an post the updated SystemUI.apk we'd appreicate it!
I finally figured out what was causing the error and have successfully decompiled the systemui.apk. Next i'm going to try what _Burst_ posted.
_Burst_ said:
Enjoy yoself
Click to expand...
Click to collapse
status_bar_tracking.xml does not have the line in it that is referenced in the link that you posted. I've attached the file.
martijua said:
status_bar_tracking.xml does not have the line in it that is referenced in the link that you posted. I've attached the file.
Click to expand...
Click to collapse
What? yes it is.
so the numbers are different...
Here comes the airplane.... zoooooooooooooooooooooom.
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.TrackingView androidrientation="vertical" androidaddingLeft="0.0px" androidaddingRight="0.0px" androidaddingBottom="0.0px" android:focusable="true" android:visibility="gone" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android">
<View android:id="@id/background" android:background="@drawable/shade_bg" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0" />
<LinearLayout androidrientation="vertical" android:id="@id/swtich_buttons" android:layout_width="fill_parent" android:layout_height="wrap_content">
<View android:background="@drawable/divider_horizontal_dark_opaque" android:layout_width="fill_parent" android:layout_height="1.0px" />
<View android:id="@id/tab_header" android:background="@drawable/list_item_background" android:layout_width="fill_parent" android:layout_height="4.0sp" />
Click to expand...
Click to collapse
martijua said:
"status_bar_header_background.9.png" and the "status_bar_close_on.9.png" are simple PNG swap in the SystemUI.APK
Transparent notification background in the deodexed [ROM][STOCK] --- Version 4.22.651.2 --- Odexed & De-Odexed --- that was posted by xHausx requires that the SystemUI.apk be decompiled and then edit the status_bar_tracking.xml changing the default "android:background="#ff000000"" to "android:background="@drawable/shade_bg"". I'm getting a W: could not decode attr 0x20 error when decompiling so I havent been able to successfully make the changes to get the transparent shade_bg notification tray backdound to work.
If anybody can get this done an post the updated SystemUI.apk we'd appreicate it!
Click to expand...
Click to collapse
I'm working on it . I'm at work now but tomorrow I'm going to hit it pretty hard.
Uot kitchen wouldn't even work for it so.... I'll have to look at the smalis and change the const/
But the v #'s are off and don't match like the op said. But it only looks like there is 2 options for it . I'm just going to do both and report back. If you get it working before I do hit me up. Thanks.
I havent got this to work. I dont think much people have as I dont see any themes or roms with this feature.
martijua said:
I havent got this to work. I dont think much people have as I dont see any themes or roms with this feature.
Click to expand...
Click to collapse
it's in many cm7 themes. should be around soon enough for sense.
Finally got it. I used the uot kitchen site to get it going. Will be sending them a donation after I get home from work. \m/
Widgets
martijua said:
Finally got it. I used the uot kitchen site to get it going. Will be sending them a donation after I get home from work. \m/
Click to expand...
Click to collapse
What are all the various widgets you are using there? They all look pretty useful!
Minimal Text Date, Time, Weather, Battery
S2 Calendar widget
CalWidget
martijua said:
Finally got it. I used the uot kitchen site to get it going. Will be sending them a donation after I get home from work. \m/
Click to expand...
Click to collapse
Looks sweet. Unfortunately the kitchen does not work for the drop down on any kingdom ROM. I've tried to no avail.
Sent from my PC36100 using XDA App
*THIS HOPES TO SERVE AS A SLIPPERY STEPPING STONE FOR THOSE VENTURING INTO THE MODDING SCENE - AND FOR ANYONE TO POST THEIR QUESTIONS, ANSWERS, REQUESTS, AND COMMENTS ABOUT THEMES/MODS*
NOTE: This is still a WIP... I will clean it up, add/remove/replace as I, and others, see fit. Trying to make this a good resource for those wanting to journey into the rabbit hole..
I will try to make this as general as possible, but it is still mostly based off of Windows 7 OS. I will attempt to incorporate Linux (Ubuntu) as I can. Also, I urge other devs and users to please offer your advice or comments on how to make this thread as useful as possible, "I accept opinions, phone numbers, and the fact that not everyone wants smiles and eye contact" (sorry, homage to doseone - couldn't resist) - but PM's or posts are fine...
Finally, I have said it before about Android, and will say it again.. “there is more than one way to skin a cat...” meaning, that there are many, many ways to achieve the same outcome with different methods (but, I’m not sure who would want to skin a cat, and what for… but I guess I don’t even want to know where that phrase came from) - so, PLEASE SEARCH for more information, methods, tricks, and techniques - I can't fit everything under the sun into two posts - plus, I still got a lot to learn myself ...
Tools
Java JDK
Android SDK
7-zip (or similar file manager)
Notepad++ (or similar text editor – do not use windows notepad!)
GIMP (or similar image editor)
Sign+ (or similar zip-signing program)
Getting files from your phone
-Root browser: copy from original file location to sdcard
-adb pull (I will not go into an adb tutorial, but here’s an example):
Code:
adb pull /system/app/SystemUI.apk C:\Pulled
(I have two folders (“Pulled” and “Push”) in the root of my C:\ drive, where I do all my pulling and pushing)
-Take from a cwm backup (nandroid)
-Make a System Dump through adb (this is just something kind of fun, but not so necessary):
Code:
adb shell
su
busybox tar czvf /sdcard/systemdump.tgz /system
exit
exit
adb pull /sdcard/systemdump.tgz
You can delete it from your sdcard once it’s on your computer.
(for a Data Dump, just change the location to /data, and rename the tar file output..)
Edit png/jpeg images
-use 7-zip, winzip, (or stock File Roller on Ubuntu)
-GIMP or Photoshop (work best – but there are many other “tools” out there)
-open the apk (archive) with one of the above mentioned file managers and navigate to the appropriate /res/drawable folder (usually drawable-hdpi, but not only..). And, either copy the files you want to edit directly from there to your desktop or working folder, and make edits and/or drop your replacement files in the appropriate drawable folder in the apk with your file manager. Then move to your system to try it out.
GIMP Notes (it’s what I’m most familiar with, so, Photoshop users use your similar methods):
-Many times the images are in “Indexed” color mode. Go to Image>Mode and change it to RGB mode to avoid editing troubles.
-In GIMP 2.8.0, use the “Export..” feature to save your edited images (in older versions, use “Save as..”), and given quality options, I usually tend to the highest, and all boxes checked.
Decompiling/editing apks
Decompiling apks is necessary to edit .xml files and .9.png files.
See here for more information on the original apktool by brut.all: http://code.google.com/p/android-apktool/ <-- for ICS framework-res.apk, you need to decompile with v1.4.2, and compile with v1.4.3
See here for new version (v1.4.9) of apktool taken over by iBotPeaches: http://forum.xda-developers.com/showthread.php?t=1755243 <-- USE THIS ONE (it works for decompiling AND recompiling framework-res.apk on ICS)
More resources for decompiling/recompiling:
http://forum.xda-developers.com/showthread.php?t=1752201
http://forum.xda-developers.com/showthread.php?t=1466100
Some Tools:
APK Manager/APK Multi-Tool: http://apkmultitool.com/?q=node/5
APK Changer: http://forum.xda-developers.com/showthread.php?t=1189971
Studio Android: http://forum.xda-developers.com/showthread.php?t=1491689
Tickle My Android: http://forum.xda-developers.com/showthread.php?t=1633333
-use apktool alone (see above links for details)
-use an APK editing program (I still mostly use APK Manager v5.0.2 and switch out the apktool files)
-set the proper framework for apktool by placing framework-res.apk, moto-res.apk, blur-res.apk, and SystemUI.apk in the same folder as apktool.jar. Then, open the command prompt or terminal on that folder (need to hold shift and right-click maybe), and type the following, one at a time for each of the four apks listed above, hitting Enter after each entry (note that not all 4 apks are needed for all files, but it doesn’t hurt):
Code:
apktool if framework-res.apk
You should get a “Framework installed to:” message after each, showing you the location to which they were saved. Note on that: In all actuality, you could simply drop a copy of each in the \apktool\framework folder (my path is C:\Users\Owner\apktool\framework\), but rename them as following:
framework-res.apk --> 1.apk
moto-res.apk --> 2.apk
blur-res.apk --> 3.apk
SystemUI.apk --> 127.apk
Re-compiling apks
When compiling system apks, the trick is to save the original signatures (META-INF) folder, the AndroidManifest.xml (unless you are editing that but, that’s a whole different story depending on the apk), and not to compress the resources.arsc file (where all of the /values folders get hidden). Some apk tools do some of the work for you, but here’s few methods (they can be dependent on what was edited):
-after re-compiling your apk, copy your edited and compiled files back over to the original apk to preserve signatures and everything else you did not edit (do this with two 7-zip windows open). For edits to any xml in the /values folders, you need to copy over the resources.arsc also (see next note).
-after editing anything in the values folder, you need to re-insert the resources.arsc without compression. For example, rename your SystemUI.apk to SystemUI.zip, take out the newly compiled resources.arsc with your file manager and then “Add to archive..” that resources.arsc to the SystemUI.zip in “Store” mode (or “No compression”). Then rename the .zip back to .apk, and you should be good to go (you can check the compression directly in the 7-zip window – if the “Size” and “Packed size” values are different, then it’s compressed).
-you can also do it vice-versa, and copy the original META-INF, AndroidManifest.xml, etc., to your edited apk with 7-zip
-if you want to edit the AndroidManifest.xml, depending on the specific apk, be prepared to re-sign nearly all system and framework apps
Edit 9patch (.9.png) images
Do some research on what 9patch images are and how they work, but the most important point is to not disturb the 1-pixel black border around the image, unless you want to redraw it. You must decompile in order to edit 9patch images.
-use GIMP or Photoshop
-use draw9patch included in the android-sdk (fool-proof)
-with GIMP you can select the inner area, leaving the 1-pixel border unselected, and edit colors and such that way
-draw9patch is included in the /tools folder in the Android SDK, it only allows you to edit the 1-pixel border and only draws in #000000 (black) color. It will add one pixel to all sides if you are not careful, so you may need to resize it (down 2 pixels) with GIMP first
Baksmali/smali classes.dex (jar/apk files)
You need to have deodexed files to edit the classes.dex and the smali files within. See here for more info, downloads, and the definition of smali, baksmali, and dalvik: http://code.google.com/p/smali/
-decompiling the apk or jar with apktool will also disassemble (for editing) the smali files
-I used to use this baksmali/smali set with tutor (a good resource): http://forum.xda-developers.com/showthread.php?t=1136625
-or, as I typically do now, just remove the classes.dex from the apk/jar and just baksmali, edit, then smali that into a new-classes.dex. For example, I have a folder called smali_bak on my desktop containing baksmali.jar, smali.jar, and a .txt file with the commands shown below (I’m lazy to type it each time, so I copy and paste) – I put the classes.dex that I wish to edit in that same folder, then open the command prompt on that folder and type the following:
To disassemble (baksmali):
Code:
java -jar baksmali.jar -o classout/ classes.dex
To assemble (smali):
Code:
java -Xmx512M -jar smali.jar classout/ -o new-classes.dex
Then, rename it to classes.dex and drop it in the original apk or jar file with a file manager (no need to worry about compression with the classes.dex, as far as I know)
Deodex and create new odex files
Deodexing is basically the process of converting your .odex files into classes.dex files, and inserting those into the apk/jar - basically. And, re-odexing is the opposite - basically.
See cogeary's excellent guide on deodexing for an excellent guide on deodexing.
-xUltimate v2.4+ works well for deodexing
-see also dsixda's Android Kitchen, and there are many other tools for deodexing..
-See here for manual deodex methods: http://forum.xda-developers.com/showthread.php?t=1208320
-See here for a tool/guide to create a new odex file: http://forum.xda-developers.com/showthread.php?t=1853523
This is the new bootclass path for us (and a bunch of other Motos) to use with ICS (taken from /init.rc, minus the jars that didn't exist in /system/framework):
Code:
/system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework-ext.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/filterfw.jar:/system/framework/com.motorola.android.frameworks.jar:/system/framework/com.motorola.android.widget.jar:/system/framework/com.motorola.frameworks.core.addon.jar
Methods to move your modded files to your phone
-Create cwm recovery flash zips: Create a zip package (normal compression is fine) containing the proper folder structure (for example: /system/app/ and put your apk in the /app folder if that’s where it belongs). I have two folders on my desktop: /system and /META-INF, which I re-use basically for any flashable zip that I make (except ROM’s, of course). The /system folder has an /app folder or /framework folder usually, depending on what I was last working on (but it can obviously have different paths and many folders if need be), and in the /META-INF/com/google/android folder is an updater-script, and an update-binary file (just grab those from another update.zip mod package around here for now). The updater-script has the installation (or removal) info – meaning the location, permissions, and so on… After you create a zip package with those items and your modded files, then use a program like Sign+ to sign the package (or don’t but then you will need to toggle signature checks in recovery mode before installing). This will create three new files in the /META-INF folder (two CERT files and a MANIFEST).
-Use adb to push the files (don’t forget to set proper permissions!):
-Use Root Explorer (or similar) to move it (don’t forget to set proper permissions!):
NOTE: When experimenting with system files, please have a backup accessible just in case. Or, as I often do, make two zip packages - one with the modded files, and one with the original files to restore if necessary. And, as always, you are responsible for what you do to your device.
FURTHER READING:
Since I am obviously not the first to put something like this together, here are a few other general themeing guides:
Guide by theimpaler747: http://forum.xda-developers.com/showthread.php?t=916814
Guide by Nottach: http://forum.xda-developers.com/showthread.php?t=1186819
Interactive help thread by jeffsanace: http://forum.xda-developers.com/showthread.php?t=1605509
More (possibly out-dated) tips from Stericson: http://forum.xda-developers.com/showthread.php?p=3175518
See also this theming guide - did not read fully through it, but looks promising.
[HOW-TO] ADB/Change Moto Lockscreen to AOSP
BRIEF GUIDE TO USING ADB:
I will run through some example commands using adb - like pulling files from phone, pushing files to phone, deleting, setting permisisons, etc..
If you have adb set up in your environmental variables or .bashrc, then you can simply open a command prompt on the folder you would like to use adb from (right-click, or hold shift and right-click on the folder). Just always keep in mind your paths and folder structures.. Also, see HERE for more on adb.
Make sure you have adb and your device drivers installed and set up properly, then connect your usb..
Code:
#Terminates the adb server process (can help clear up adb issues):
adb kill-server
#Starts adb (or just use any adb command to start):
adb start-server
#List attached devices
adb devices
#Start logcat (Ctrl+C will terminate the current process)
adb logcat
#To pull files to the folder in your command prompt/terminal path
adb pull /system/framework/framework-res.apk
adb pull /system/etc/paranoid/preferences.conf
adb pull /cache/recovery/last_log
#To push files to our phone we need to first push them to the sdcard (also making a new directory on the sdcard called "newfolder")
adb push framework-res.apk /sdcard/
adb push SystemUI.apk /sdcard/
adb shell mkdir /sdcard/newfolder
adb push dexopt-wrapper /sdcard/newfolder
#To start a remote shell in the attached device and get superuser access
adb shell
su
#The following commands need to be run from shell..
#Mount /system re-writable
mount -o rw,remount -t ext3 /dev/block/system /system
#Copy files from sdcard to system
cp /sdcard/framework-res.apk /system/framework
cp /sdcard/SystemUI.apk /system/app
cp /sdcard/newfolder/dexopt-wrapper /system/bin
#Set proper permissions
chmod 0644 /system/framework/framework-res.apk
chmod 0644 /system/app/SystemUI.apk
chmod 0755 /system/bin/dexopt-wrapper
#Remove dalvik-cache and/or other files (note: on some ROMs, dalvik-cache is in /cache/dalvik-cache)
rm /data/dalvik-cache/[email protected]@[email protected]
rmdir /sdcard/newfolder
#Mount /system read-only (not necessary if rebooting right away)
mount -o ro,remount -t ext3 /dev/block/system /system
#Exit shell
exit
exit
#Reboot the device
adb reboot
Change Moto Lockscreen to stock AOSP (MultiwaveView)
(FYI - In GB it was a simple bools.xml edit to switch the Moto lock off.. and there's probably another way to do this - like by bypassing the zz_moto stuff entirely, but..)
If you have a custom locksceen already, then this probably doesn't apply or has already been done...
-decompile framework-res.apk
-open /res/layout/zz_moto_keyguard_unlock_widget.xml with Notepad++, Geany, or similar text editor
-delete all text there, and replace with this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.internal.widget.multiwaveview.MultiWaveView android:orientation="horizontal" android:id="@id/unlock_widget" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentBottom="true" android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera" android:directionDescriptions="@array/lockscreen_direction_descriptions" android:targetDrawables="@array/lockscreen_targets_with_camera" android:handleDrawable="@drawable/ic_lockscreen_handle" android:rightChevronDrawable="@drawable/ic_lockscreen_chevron_right" android:waveDrawable="@drawable/ic_lockscreen_outerring" android:outerRadius="@dimen/multiwaveview_target_placement_radius" android:hitRadius="@dimen/multiwaveview_hit_radius" android:vibrationDuration="20" android:snapMargin="@dimen/multiwaveview_snap_margin" android:feedbackCount="3" android:verticalOffset="0.0dip" android:horizontalOffset="0.0dip"
xmlns:android="http://schemas.android.com/apk/res/android" />
Stopping here and recompiling would give you something like this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
The above just changes the "widget" to the aosp multiwaveview and uses resources/drawables that we already have, which Moto decided to overlay with theirs (adding more bulk to the apks/jars)...
To edit the layout (remove/rearrange things in general), you need to edit keyguard_screentab_unlock.xml in the same folder - it's all there - the clock, date, sound toggle, horz. divider, charge (@id/status1) and alarm icons, unlock widget, music controls, etc... just play around with things..
To add the phone and text msg icons to the unlock widget, we need to edit the android.policy.jar and other xmls in framework-res.
More to come on that...
For Honeycomb style ripple lockscren mod, see here: http://forum.xda-developers.com/showpost.php?p=33854556&postcount=70
Change Clock Color in Status Bar (OUTDATED: FOR GB)
(This is a method I came up with myself)
-First, find a color that you want for your status bar clock.
-Now, find the hex code (combination of 6 letters and numbers) for that color --> see HERE, and/or HERE, and the Android Design guide for colors HERE. You may also use programs like GIMP and Photoshop to preview colors by hex code.
*For reference, 000000 is the absence of color (completely black), on the other end is ffffff (full on, all blinding color - completely white). Also, 33b5e5 is for ICS blue, 99cc00 is for android green (used below in the example).
-Decompile SystemUI.apk
-Open /res/layout/status_bar.xml (with a proper text editor like Notepad++)
-Look for the line that I highlighted in blue (from stock 2.3.6):
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.StatusBarView android:orientation="vertical" android:background="@drawable/statusbar_background" android:focusable="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:orientation="horizontal" android:id="@id/icons" android:layout_width="fill_parent" android:layout_height="fill_parent">
<TextView android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textSize="16.0sp" android:textStyle="bold" android:gravity="left|center" android:id="@id/onsText" android:paddingLeft="6.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:maxLength="18" />
<com.android.systemui.statusbar.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:paddingLeft="6.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" android:layout_alignParentLeft="true" />
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true" />
[COLOR="Blue"]<com.android.systemui.statusbar.Clock android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:gravity="left|center" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />[/COLOR]
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
-Add the code android:textColor="#ff33b5e5" to the line that starts with <com.android.systemui.statusbar.Clock as shown highlighted red below (NOTE: Insert your choice of hex code here - the 33b5e5 is just used as an example):
Code:
<com.android.systemui.statusbar.Clock android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" [COLOR="Red"]android:textColor="#ff99cc00"[/COLOR] android:gravity="left|center" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
Again, insert your choice of color in the blanks> android:textColor="#ff------"
-Make sure your spaces are uniform and then save the xml.
-Compile the apk, and use your own method for copying signatures (I use APK Manager, it does it for you)
-Move to your phone by your own means... Enjoy! Please don't blame me if you mess something up!
Related:
There are a lot more mods with partial direction in individual posts throughout this thread.. read on, if interested. I will hopefully compose a location list or something for some of these other mods in the near future.. until then, good luck, and godspeed...
HOW-TO Remove Carrier Name from Status Bar
Bools.xml mods list
Very nice! A while ago I figured out a different way to do it, having to do with editing framework-res/res/values/styles.xml and changing a color code in there. But your way is a bit simpler .
Thanks for the guide! It would be awesome if this thread turned into something like this (see the 2nd and 3rd posts).
cogeary said:
Very nice! A while ago I figured out a different way to do it, having to do with editing framework-res/res/values/styles.xml and changing a color code in there. But your way is a bit simpler .
Click to expand...
Click to collapse
I've learned that there are definitely multiple ways to skin a cat, in terms of themeing android - I went the long way with inverting some apks in Romulus (I did not touch the AndroidManifest), and that forced me to learn how to read and understand this "extensible markup language" a bit better - and to correct my text color issues, I learned that you can just add the text colors if you find the right xml...
cogeary said:
Thanks for the guide! It would be awesome if this thread turned into something like this (see the 2nd and 3rd posts).
Click to expand...
Click to collapse
Oh boy, I should've reserved more posts for something like that! I would love to put something comprehensive together like Nottach did, but with ICS coming, I know a few things will change - so, I figure I'm better off waiting and learning that system first..
Not sure why but I couldnt find those exact lines you have in the exampme box. And whats with the crazy symbols? Sorry man...still a lil new as you know at messing with this type of stuff.
sorry the pics are so ****ty. Lo-light, laptops and cameras/phones dont mix well lol. Thanks in advance man.
Sent From MY DROID That DOES! Not YOUR APPLE That DIDN'T!
^
I think you just unzipped, did not decompile SystemUI.apk
DX2Trip said:
Not sure why but I couldnt find those exact lines you have in the exampme box. And whats with the crazy symbols? Sorry man...still a lil new as you know at messing with this type of stuff.
sorry the pics are so ****ty. Lo-light, laptops and cameras/phones dont mix well lol. Thanks in advance man.
Sent From MY DROID That DOES! Not YOUR APPLE That DIDN'T!
Click to expand...
Click to collapse
Did u decompile the apk ?? That's y u probably got the wired symbols
Sent from my MB865 using xda premium
You are going to need to decompile the apk to be able to read those xmls...
I use APK Manager 5.0.2 for Windows - see updated OP.
Then read up on some other threads about the process, also check the carrier name removal post I linked in OP#2... but yea, there is good literature on de/recompiling out there..
P.S. - for me, all of my codes in the op's are botched and have smiley faces on the xda app - I did use code tags..!? Reference them on a computer for easier reading...
Sent from my phone's mind
EDIT: edited.
I updated the heck out of this thread to give some guidance on using APK Manager for decompiling and compiling (at least they way I do it)... hope it helps a few people.
Man...seem to always run into an error. Any thoughts? Don't know why it shows up as status bar right before installing. It does say SystemUI.apk in the folder though...
Sent From My DROID That DOES Not My APPLE That DIDN'T.
Are you getting errors compiling the apk? How are you trying to install the apk on your phone? It looks like some sort of SystemUI is installed from your pic (since you still have a status bar showing)... But, the Status Bar process is the SystemUI.apk. So, I'm a little confused..
I need a bit more info on how you're doing things to try and help you better..
Are you getting errors compiling the apk? How are you trying to install the apk on your phone? It looks like some sort of SystemUI is installed from your pic (since you still have a status bar showing)... But, the Status Bar process is the SystemUI.apk. So, I'm a little confused..
I need a bit more info on how you're doing things to try and help you better..
Click to expand...
Click to collapse
My bad lol, should have explained better. No errors decompiling, editing, compiling or signing. Just trying to install right from the root folder I placed it on in my SD. Don't know if its because it wont install over the OG SystemUI.akp or what. Yeah the OG was still intact while I tried installing the edited one. In fact I tried just moving the edited one into my system apps n it kept forceclosing to the point where I had to reboot and when it started back up I had no status bar at all! lol no worries though, had a nandroid and have still been trying to figure it out...maybe signatures have somthing to do with it. Idk...
heres what it looks like on the SD card. But right when I press it, it turns into status bar...odd.
Sent From My DROID That DOES Not My APPLE That DIDN'T.
I followed the instructions to the letter worked great ur awesome. Got my status bar clock red yea buddy lol
Sent from my MB865 using xda premium
DX2Trip said:
My bad lol, should have explained better. No errors decompiling, editing, compiling or signing. Just trying to install right from the root folder I placed it on in my SD. Don't know if its because it wont install over the OG SystemUI.akp or what. Yeah the OG was still intact while I tried installing the edited one. In fact I tried just moving the edited one into my system apps n it kept forceclosing to the point where I had to reboot and when it started back up I had no status bar at all! lol no worries though, had a nandroid and have still been trying to figure it out...maybe signatures have somthing to do with it. Idk...
Sent From My DROID That DOES Not My APPLE That DIDN'T.
Click to expand...
Click to collapse
I used root explore to move my SystemUI.apk into system/app folder with permission set at rw-r-r override and replace old 1 reboot and should be fine
Sent from my MB865 using xda premium
DX2Trip said:
My bad lol, should have explained better. No errors decompiling, editing, compiling or signing. Just trying to install right from the root folder I placed it on in my SD. Don't know if its because it wont install over the OG SystemUI.akp or what. Yeah the OG was still intact while I tried installing the edited one. In fact I tried just moving the edited one into my system apps n it kept forceclosing to the point where I had to reboot and when it started back up I had no status bar at all! lol no worries though, had a nandroid and have still been trying to figure it out...maybe signatures have somthing to do with it. Idk...
Sent From My DROID That DOES Not My APPLE That DIDN'T.
Click to expand...
Click to collapse
Thank goodness for cwm on boot and fresh backups ..
Well, I can tell you right off the bat that your method of installation is giving you problems. Also, don't sign the SystemUI.apk, you want to retain the original signature.
It is possible to move it on your phone with root explorer, but I know some people are against this method.. but, here it goes anyway..
-First go and check the permissions of (and possibly make a copy of) the file that you want to replace. Go to the file location, mount R/W, and long-press the file and choose permissions - and remember them, or write it down. (Note: All apps and framework in /system are rw-r--r--)
- Next, copy the new file that you want to put on your phone from your sdcard.
- IMPORTANT: Paste it in another system folder besides the final destination and SET the proper PERMISSIONS and rename if necessary to match the file you are replacing (need to mount R/W first). For example, paste your edited SystemUI.apk in the /system folder (NOT directly in the app folder), and change the perms there..
- IMPORTANT: Long-press on the file you are moving and select "MOVE".
- Then paste it in the final destination folder (i.e. /system/app), and select ok to overwrite the existing.
- Don't try to do anything else except reboot. And, it would be nice to wipe dalvik and cache partition while you are rebooting, if you have the chance.
Please, if anyone tries this method, be cautious, use CWM on Boot, and have a fresh backup just in case.. also, I assume no responsibility for your actions.. I have done this multiple times with many different file types and locations..
Sent from my phone's mind
chrisn91 said:
I followed the instructions to the letter worked great ur awesome. Got my status bar clock red yea buddy lol
Sent from my MB865 using xda premium
Click to expand...
Click to collapse
Very cool! Glad to hear it worked for you! You got a screenshot of the red?
Sent from my phone's mind
Yea..
Im reading on how to center my lockscreen clock and changing the color red as well
Sent from my MB865 using xda premium
chrisn91 said:
Yea..
Im reading on how to center my lockscreen clock and changing the color red as well
Sent from my MB865 using xda premium
Click to expand...
Click to collapse
Nice. You make all the edits yourself or is that a custom rom? Either way, lookin good, man.. keep it up!
And, I was also just about to dig into a few things, lockscreen clock color happens to be one of them.. but, I got the old moto lockscreen (which has a centered clock), so I'm thinking those xmls might be in a different place than the new moto lockscreen stuff... we'll see..
Sent from my phone's mind
alteredlikeness said:
Nice. You make all the edits yourself or is that a custom rom? Either way, lookin good, man.. keep it up!
And, I was also just about to dig into a few things, lockscreen clock color happens to be one of them.. but, I got the old moto lockscreen (which has a centered clock), so I'm thinking those xmls might be in a different place than the new moto lockscreen stuff... we'll see..
Sent from my phone's mind
Click to expand...
Click to collapse
Its a little of both. I.did some theming to sv6 with some pngs from other roms although I've learned alot here creating a img from scratch is a hard thing for me to grasp lol. I've tried many times to change the status bar clock but it won't work I would get systemui force closures or no change at all but thanks to ur steps and how to guide I got it
Sent from my MB865 using xda premium
Well I couldn't figure it out for the old native AOSP jog tab lockscreen, but I managed to change the clock and date color on the new Moto sliding door lockscreen... also changed the font style of the clock to DroidSans (which is actually Ubuntu font on Romulus, the default system font - it was Chulho_Neue)..
But, as you can see, I didn't get the "charging" text color. Also didn't look at moving the position yet..
Oh, yea... it's in framework-res.apk/layout/zz_moto_sd_keyguard_screen_tab_unlock.xml - look for the lines with the ids "timeDisplay", "am_pm", and "date"...
But the zz_moto_keyguard_screen_unlock_portrait.xml threw me off, and may have something more to do with this...
I'll try to look into this and post something better 2moro..
Sent from my phone's mind
EDIT: I think I just found it for the native jog tab lock... in a very obvious place: keyguard_screen_tab_unlock.xml (without the zz_moto_sd part, obviously) - this may help to center the zz_moto_sildingdoor lockscreen text as well... get some ideas or lines of code from it, and copy it over to the zz_moto keyguard xml..
This is a mod for the TF700T to add 1% battery indicators for both the tablet and dock.
This posting is for developers, not newbies who usually do not know what they are doing.
First things first: I am a retired software engineer (and approaching retirement age). I do not have much time for support of this mod as I spend most of my time teaching English in Thailand and I develop ROMs for the SGS3. With that said, you are free to use this however you wish. BUT, please give me credit for the work. A link back to this page would be great. AND, I cannot guaratee it will will for everyone. Use at your own risk.
I will try to answer questions as soon as I can. Hopefully, some of the better developers can jump in and help with questions. If I do not answer a question right away, it is because I am busy with school.
This is probably not one of the better how-to-do-it posts, but it is the best I can do at this time.
What you will need:
1. Winmerge - you can get it here: Winmerge
This is a great app for making changes to newer ROMs without having to manually find all your previous changes. It is a pretty much cut 'n paste layout as you can see where the changes are and just copy them into the new source file. It uses a split window format for comparing previous and new source files. I usually view the original modded file in the right window and the new file I want to mod in the left window. Differences will be highlighted. Just marked the changes and copy them from the right window to the left window. Don't forget to save the file before exiting.
2. The attached zip file which contains the battery icons for both the dock and tablet and the modified xml files. The icons were created using BatteryIconCreator_V9.0 which you can find on the web. Makes creating icons easy plus you can merge 2 icons into 1. The zip file contains xml files for JellyBean v10.4.4.20 ROMs. It should work on previous versions as I started working on this with v10.4.4.16.
3. apktool150.jar - from here: http://miui.connortumbleson.com/other/apktool/apktool_1.5.0.jar
4. aapt.exe - from here: http://miui.connortumbleson.com/other/apktool/aapt/win/aapt.exe
For items 3 and 4, I have included them for Windows only. You should already know how to use apktool already and where these files go.
IF your ARE NOT on Windows O/S, go to this link to get the correct aapt file: APKTOOL
You MUST HAVE both of the files (3 & 4). Very important.
There are no install zips attached to this post. I am just too lazy to make them.
This is mostly for developers of TF700T Roms.
The files we will be modding:
framework-res.apk
SystemUI.apk
Transformer.apk
First thing to do is to decompile all 3 files:
java -jar apktool150.jar d <source.apk> <folder>
where <source.apk> is one of the above 3 files and <folder> is where you want them decompiled to.
Example: java -jar apktool150.jar d SystemUI.apk systemui
First the tablet battery mod:
SYSTEMUI.APK
Tablet icons
1. Copy the tablet battery icons to: /res/drawable-sw720dp-hdpi
2. Copy stat_sys_battery.xml AND stat_sys_battery_charge.xml to /res/drawable
3. Add the following to the end of /res/values-sw600dp/styles.xml:
<style name="StatusBarBatteryNotificationText2">
<item name="android:textSize">1.0dip</item>
<item name="android:textColor">#00999999</item>
</style>
4. Change /res/layout/status_bar_quick_settings_title.xml
(change both dock and battery) below is the modified script change (partial script).
<TextView android:id="@id/battery_text" android:layout_width="wrap_content" android:layout_height="1.0dip" android:layout_marginTop="-4.0dip" android:src="@drawable/ic_notification_open" android:text="@string/status_bar_settings_settings_button" android:singleLine="true" android:layout_below="@id/battery" android:layout_centerHorizontal="true" style="@style/StatusBarBatteryNotificationText2" />
FRAMEWORK_RES.APK
Dock-icons
1. Copy the dock battery icons to /res/drawable-hdpi
2. Copy stat_sys_dock_battery.xml AND stat_sys_dock_battery_charge.xml to /res/drawable
TRANSFORMER.APK
1. Change res/layout/status_bar_docking.xml:below is the modified script change (partial script).
<ImageView android:layout_gravity="center_vertical" android:src="@drawable/asus_ep_kb_battery_dock" android:layout_width="32.0dip" android:layout_height="32.0dip" android:scaleType="centerInside" />
<TextView android:layout_gravity="right|center" android:id="@id/battery_level" androidaddingRight="12.0dip" android:layout_width="56.0dip" android:layout_height="wrap_content" android:singleLine="true" android:layout_toRightOf="@drawable/asus_ep_kb_battery_dock" android:layout_alignBaseline="@drawable/asus_ep_kb_battery_dock" style="@style/StatusBarNotificationText" />
2. Add asus_ep_kb_battery_dock.png to /res/drawable-hdpi/
After you have done all of that, you need to compile them:
BUT FIRST: SystemUI.apk will not be decompiled correctly -> res/values/public.xml
We need to change some things or it will not compile.
Open /res/values/public.xml and go all the way to the end.
Change the last 2 entries to look like the following (the decompile hex value ordering in out of sequence):
<public type="menu" name="notification_popup_menu" id="0x7f0f0000" />
<public type="menu" name="recent_popup_menu" id="0x7f0f0001" />
Save the file and exit.
Now we can compile all the files.
java -jar apktool150.jar b <source folder>
where <source folder> is where you decompile the apk to.
Example: java -jar apktool150.jar b systemui
the apk file will be in the dist subfolder under systemui
After all 3 files have been compiled, you need to copy the META-INF folder and the AndroidManifest.xml from the original apk to the newly built apk. You need to do this for each of the 3 files.
The TF700T does not like the resources.arsc entry compressed. So...we have to extract the contents from SystemUI.apk and Transformer.apk. Create a new apk (using store only) no compression. You can use 7zip for this.
After you have done this for the SystemUI.apk and Transformer.apk files, zipalign all 3 files and install them in their proper folders on your tablet. I have included a zip align program in the attached zip file. Put the 3 files in the align folder and run the zip-app.bat program.
I have tried to make this easy, especially if you use WinMerge. It's as easy as copy 'n paste.
All files, including the modded source files (except Winmerge) are included in the attached zip file.
ZIPFILE: TF700T 1% Battery Mod
Thanks man, donno if im gonna implement this but hopefully we can get some devs to preload it onto other roms. You should pm scott and hiemanshu! thanks again.
Sent from my ASUS Transformer Pad TF700T using Tapatalk 2
gutts10 said:
Thanks man, donno if im gonna implement this but hopefully we can get some devs to preload it onto other roms. You should pm scott and hiemanshu! thanks again.
Sent from my ASUS Transformer Pad TF700T using Tapatalk 2
Click to expand...
Click to collapse
I'm sure users would prefer percentage anyways, right?
From TF700, hit THANKS for others
Hi! thanks for this mod and for opening a dedicated thread.
Does the zip have a version to go for the latest job update? I can implement it straight into the ROM quickly if so. Otherwise I'll work through instructions and ask as I go.
sbdags said:
Does the zip have a version to go for the latest job update? I can implement it straight into the ROM quickly if so. Otherwise I'll work through instructions and ask as I go.
Click to expand...
Click to collapse
The easiest way is to just do file compares based on the files mentioned in Post #1.
If you use winmerge.exe it is easy to find the differences and cut and paste. It's what I use for all my ROM development for TF700T and GS3.
The files are from 104420.
OK Couple of questions - I tried to use the .20 files but SystemUI.apk is different.
There is no res/values folder......
neither is there a /res/values-sw600dp either ....
Are they important or have Asus changed the files?
Edit: Ah figured it out - ignore me!
I'm watching you
sbdags said:
OK Couple of questions - I tried to use the .20 files but SystemUI.apk is different.
There is no res/values folder......
neither is there a /res/values-sw600dp either ....
Are they important or have Asus changed the files?
Edit: Ah figured it out - ignore me!
Click to expand...
Click to collapse
Sent from my ASUS Transformer Pad TF700T
chogardjr said:
I'm watching you
Sent from my ASUS Transformer Pad TF700T
Click to expand...
Click to collapse
Figured it out and got it working
Thanks OP!
The icon and the % are not clear like stock...hard to read.
buhohitr said:
The icon and the % are not clear like stock...hard to read.
Click to expand...
Click to collapse
Agreed.
For my GNex I use circlesmod by hooolm, which is a lot clearer. I think I'll try throwing a mod together with those icons...
http://circlesmod.dk/?s=dl