[MOD][COMPLETE GUIDE][NOOB-FRIENDLY] CM10 Transparent Statusbar and other mod - Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A

Hi All... This is my first theming guide
This guide is for set Transparent Statusbar, Transparent Notification Drawer and Change Clock Colour
NOTE ONLY FOR CM10
Having a problem? You can ask me in this thread :good:
Things you will need
PC or Laptop
apktool, zipalign and others
WinRAR or WinZip
Notepad++
Patience!
Click to expand...
Click to collapse
So, lets begin..
INSTALLING APKTOOL AND OTHER TOOLS
STEP 1
You must install apktool to your PC from HERE and other tools HERE
Extract it to a same directory same as the screenshot below
Then, copy cmd from Windows/System32 Directory (ex. C:\Windows\System32) and move it your apktool directory​
STEP 2
Download zipalign from HERE, move it to Windows Directory (ex. C:\Windows)​

GUIDE FOR TRANSPARENT NOTIFICATION DRAWER
STEP 1
Copy your framework-res.apk from system/framework and SystemUI.apk from /system/app/ then place it in your apktool directory​
STEP 2
Open cmd in your apktool directory, type
Code:
apktool if framework-res.apk
and
Code:
apktool if SystemUI.apk
then
Code:
apktool d SystemUI.apk
STEP 3
Go to SystemUI\smali\com\android\system ui\statusbar\phone
Open PhoneStatusBar$FastColorDrawable.smali with Notepad++
Go to this and edit
Code:
# virtual methods
.method public draw(Landroid/graphics/Canvas;)V
.locals 2
.parameter "canvas"
.prologue
.line 2856
[COLOR="Red"]iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$FastColorDrawable;->mColor:I[/COLOR]
sget-object v1, Landroid/graphics/PorterDuff$Mode;->SRC:Landroid/graphics/PorterDuff$Mode;
invoke-virtual {p1, v0, v1}, Landroid/graphics/Canvas;->drawColor(ILandroid/graphics/PorterDuff$Mode;)V
.line 2857
return-void
.end method
to this
Code:
# virtual methods
.method public draw(Landroid/graphics/Canvas;)V
.locals 2
.parameter "canvas"
.prologue
.line 2856
[COLOR="Red"]const v0, (your transparency values; look at [URL="http://forum.xda-developers.com/showpost.php?p=40251761&postcount=4"]post #4[/URL])[/COLOR]
sget-object v1, Landroid/graphics/PorterDuff$Mode;->SRC:Landroid/graphics/PorterDuff$Mode;
invoke-virtual {p1, v0, v1}, Landroid/graphics/Canvas;->drawColor(ILandroid/graphics/PorterDuff$Mode;)V
.line 2857
return-void
.end method
and save​
STEP 4
Open cmd in your apktool directory, type
Code:
apktool b SystemUI al.apk
then open al.apk and SystemUI.apk with WinRAR, drag META-INF folder and AndroidManifest.xml from SystemUI.apk to al.apk same as the screenshot below, when it ask to compress click OK​
STEP 5
Open cmd in your apktool directory, type
Code:
zipalign -v 4 al.apk SystemUImod.apk
STEP 6
Move your SystemUImod.apk to your phone, rename to SystemUI.apk, move it to /system/app/ and change permission to rw-r--r--
Then reboot​

GUIDE FOR STATUSBAR COLOR W/ TRANSPARENCY
STEP 1
Copy your android.policy.jar from /system/framework/ and place it in your apktool directory
Download phonewindowmanager.zip in the attachment below and extract it to your apktool directory​
STEP 2
Open cmd in your apktool directory, type
Code:
apktool d android.policy.jar
STEP 3
Go to android.policy.jar.out\smali\com\android\internal\policy\impl
Replace your PhoneWindowManager.smali with my PhoneWindowManager.smali​
STEP 4
Open cmd in your apktool directory, type
Code:
apktool b android.policy.jar.out
Go to android.policy.jar.out\dist, move android.policy.jar to your phone, move to /system/framework/ and set permission rw-r--r--
Then reboot​
STEP 5
Download xposed framework here, install, open it and tap install/update, then reboot
Download tweakbox here, install, Open xposed installer, tap on modules and enable tweakbox, then reboot
Open tweakbox, tap on statusbar, enable background color and change color/transparency whatever you want
Then reboot​

TRANSPARENCY VALUES
0x00000000 (100%)
0x88000000 (75%)
0x7f000000 (50%)
0xd8000000 (25%)
0xee000000 (15%)
Click to expand...
Click to collapse
OFF TOPIC
What's that theme you use at your PC screenshot?
Metro Tile Skin Pack for Windows7
What's that wallpaper you use at your phone?
HERE
Click to expand...
Click to collapse
CREDITS TO
powerpoint45 for his compiling guide HERE
reaper61616 for his transparent notification drawer guide HERE
Adi_ai****eru for his android.policy.jar transparent statusbar guide HERE
galaxynote2 for his transparent statusbar guide HERE​

Hmmm...screenshot of the transparent status bar/dropdown drawer would make this this guide more complete

iPusak Gaoq™ said:
Hmmm...screenshot of the transparent status bar/dropdown drawer would make this this guide more complete
Click to expand...
Click to collapse
Okay, that's good idea!
via XDA for Timescape™

hey friend thanks a lot for the post. today i have learned lot and managed to get my status bar with transparent.
but TRANSPARENT NOTIFICATION DRAWER didnt work from this part
apktool b SystemUI al.apk.
i couldnt find SystemUI al.apk. also pls tell when we change the value to const v0, (your transparency values; look at post #4) will it looks like
this if i want 100% transparent?
const v0, 0x00000000
and how to make status bar 100% transparent? which value should we change?
keep up the good work

will dis work on CM9.1 too please??
nice tutorial.....

Dilesh Perera said:
hey friend thanks a lot for the post. today i have learned lot and managed to get my status bar with transparent.
but TRANSPARENT NOTIFICATION DRAWER didnt work from this part
apktool b SystemUI al.apk.
i couldnt find SystemUI al.apk. also pls tell when we change the value to const v0, (your transparency values; look at post #4) will it looks like
this if i want 100% transparent?
const v0, 0x00000000
and how to make status bar 100% transparent? which value should we change?
keep up the good work
Click to expand...
Click to collapse
After you type
Code:
apktool b SystemUI al.apk
There's al.apk (not SystemUI al.apk) and the original SystemUI.apk
Open original SystemUI.apk with WinRAR, click META-INF folder and AndroidManifest.xml inside original SystemUI.apk, copy META-INF folder and AndroidManifest.xml, and open al.apk using WinRAR, paste it, when ask to compress click yes/OK
Yes, if you want 100% transparency it will look like this
Code:
# virtual methods
.method public draw(Landroid/graphics/Canvas;)V
.locals 2
.parameter "canvas"
.prologue
.line 2856
[COLOR="Red"]const v0, 0x00000000[/COLOR]
sget-object v1, Landroid/graphics/PorterDuff$Mode;->SRC:Landroid/graphics/PorterDuff$Mode;
invoke-virtual {p1, v0, v1}, Landroid/graphics/Canvas;->drawColor(ILandroid/graphics/PorterDuff$Mode;)V
.line 2857
return-void
.end method
via XDA for Timescape™

whalesplaho said:
will dis work on CM9.1 too please??
nice tutorial.....
Click to expand...
Click to collapse
Try it, but I though it will be possible
via XDA for Timescape™

Diaz1999 said:
After you type
Code:
apktool b SystemUI al.apk
There's al.apk (not SystemUI al.apk) and the original SystemUI.apk
Open original SystemUI.apk with WinRAR, click META-INF folder and AndroidManifest.xml inside original SystemUI.apk, copy META-INF folder and AndroidManifest.xml, and open al.apk using WinRAR, paste it, when ask to compress click yes/OK
Yes, if you want 100% transparency it will look like this
Code:
# virtual methods
.method public draw(Landroid/graphics/Canvas;)V
.locals 2
.parameter "canvas"
.prologue
.line 2856
[COLOR="Red"]const v0, 0x00000000[/COLOR]
sget-object v1, Landroid/graphics/PorterDuff$Mode;->SRC:Landroid/graphics/PorterDuff$Mode;
invoke-virtual {p1, v0, v1}, Landroid/graphics/Canvas;->drawColor(ILandroid/graphics/PorterDuff$Mode;)V
.line 2857
return-void
.end method
via XDA for Timescape™
Click to expand...
Click to collapse
thanks. but seems i can do De compile without any issue. but re compile not works. see the atachment
any idea whats wrong ??

Dilesh Perera said:
thanks. but seems i can do De compile without any issue. but re compile not works. see the atachment
any idea whats wrong ??
Click to expand...
Click to collapse
That's because apktool.yml not exist in your SystemUI decompiled folder
Try to decompiled SystemUI.apk again and find the apktool.yml in the decompiled folder
Look at the attachment

Nice guide for modders :good:

Diaz1999 said:
That's because apktool.yml not exist in your SystemUI decompiled folder
Try to decompiled SystemUI.apk again and find the apktool.yml in the decompiled folder
Look at the attachment
Click to expand...
Click to collapse
i tried many apks. but i never gets apktool.yml. have read many in xda. decompile not getting correctly it seems. i dont know how to fix it.
i followed all ur steps.

Dilesh Perera said:
i tried many apks. but i never gets apktool.yml. have read many in xda. decompile not getting correctly it seems. i dont know how to fix it.
i followed all ur steps.
Click to expand...
Click to collapse
See the second link in my sig for tips.

Dilesh Perera said:
i tried many apks. but i never gets apktool.yml. have read many in xda. decompile not getting correctly it seems. i dont know how to fix it.
i followed all ur steps.
Click to expand...
Click to collapse
Hmmm...better you use TickleMyAndroid cause this tool is much easy to use than other tool....

Diaz1999 said:
Try it, but I though it will be possible
via XDA for Timescape™
Click to expand...
Click to collapse
gonna try it out now... thanks!!!

dis is not in my smali folder; PhoneStatusBar$FastColorDrawable.smali
am using CM9.1 ROM.

whalesplaho said:
dis is not in my smali folder; PhoneStatusBar$FastColorDrawable.smali
am using CM9.1 ROM.
Click to expand...
Click to collapse
I though you want the transparent statusbar. Try to find in res/values/drawables.xml
Find a line that named status_bar_background (CMIIW) and change the colour
via XDA for Timescape™

hey nice guide, but I have a problem.
When i type this: apktool b SystemUI al.apk.
the al.apk does not get compiled. I also noticed that im missing the apktool.yml file in the folder of the decompiled SystemUI.

Related

X10 Mini/Mini pro Theme Reference for Newbies

This thread was opened to consolidate the information/knowledge about themes for the x10 mini/mini pro. It is basically a reference thread with key bits of information and links so that a new user can find all the necessary information in one place. It should also help us avoid the old ‘where the hell was that image…?’ and ‘where was that … thread again?’.
Please PM me or post any useful information that is missing, especially the OPs of the threads in the Themes section below. I will continually update this thread with any new information or links.
At the moment this is a work in progress. I will fill it out in the days to come. And will keep it updated so long as I have my x10 mini pro (at least another 18 months according to t-mobile ).
All useful information that is posted here will be added to this first page, so that you don't have to wade through pages of posts to try and find something. Everything after the first page should therefore either be repeated on this page somewhere or is just conversation. Please yell at me should this not be the case
Please help me out by posting information, ideas etc.
Creating Themes for the x10:
1. Getting Started
2. Using ADB
3. Creating a Theme
4. Modifying XML files and adding resources
5. Modifying Services.jar
6. Recovery tips
7. Theme collection
8. Replace Framework with Root Explorer
Credits:
_calum_
Download all your original system applications here.
**Guys If u like this tutorial thank me by donating me .**
Getting Started
Before getting started on a theme you'll need to set a few things up. Here's a list of everything you'll need:
• Root. Your phone will need to be rooted
• Java SDK (JDK). You'll need to install the JDK (and JRE) before you can start modifying the contents of your phone. Check out this video of Chewitts if you're having problems on x64 systems.
• ADB (from the Android SDK). You need ADB to push/pull files to and from your phone (see the next post)
The easiest way to make sure everything is set up properly is to install someone elses theme.
After you've done all that take a look at this.
Using ADB
There's an ADB Guide here :
Before you start need to unsecure the shell. Use the following adb commands to do this if you haven't already (to reverse it do chmod 0755... ):
Code:
adb shell
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
chmod 4755 /system/bin/sh
This is all described in the links posted in the Getting Started section above
Thanks to MrRusch for making our lives easier with this tool. For those of you new to this, you should still read the guide linked above so that you know what is actually going on.
Here's a step by step for pulling the framework from your phone and pushing it back. The boot animation mod at the bottom is for 2.1 it is found in system/media/bootanimation.zip.
Step 1:
Connect phone to pc, enable usb debugging and open adb. Type:
adb pull /system/framework/framework-res.apk framework-res.apk
That will pull your framework-res.apk to whatever folder is displaying in your command line.
Step 2:
Find the framework-res.apk on your hard drive, right click and open with 7zip.
Step 3:
Use png's here or create your own and dump into the appropriate folder within framework-res.apk.
Step 4:
When you are done editing the files open up adb and type the following command:
adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
adb push framework-res.apk /sdcard/framework-res.apk
adb shell dd if=/sdcard/framework-res.apk of=/system/framework/framework-res.apk
That will put the new framework-res.apk on your phone. It should automatically reboot (if not reboot it) and your changes should be applied!
When running the script above you can replace framework-res.apk with whatever you want. For example, Conversations.apk,Alarm.apk etc.
Remember, it is CASE sensitive I made this problem many times)
If you would like to pull an entire folder put a slash at the end of the last word. For example, adb pull /system/etc /etc"/" (no " in actual script )
Courtesy of corruptfate is the steps to modify the Boot animation
step 1: Copy bootanimation.zip to sdcard
step 2: Open CMD (Command Prompt)
step 2: type "adb shell"
step 3: type "su"
step 5: type "mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system"
step 5: busybox cp /sdcard/bootanimation.zip /system/media/bootanimation.zip
step 6: chmod 755 /system/media/bootanimation.zip
Click to expand...
Click to collapse
Creating a theme
So, now that we’ve got the framework-res.apk onto our hard drive, we can take a look at creating a theme. The only skill that is really required to change the appearance of the framework (this is the system file that contains the notification bar, settings etc.) is being able to edit .png image files to suit your tastes. If you can do this then it is just a matter of knowing how to extract the images, and how to update the .apk with them after editing.
.9.png's
Before we start we need to take a look at a special kind of image in android apk’s: the .9.png’s. These are recognisable, as the name suggests, by the double extension *.9.png.
.9.png's are images with a bit of extra information embedded. They contain information on how they can be stretched, and where the content can go (e.g. for a button background, which area of the background can contain the text).
This information is contained in a single pixel border (the guides) around the image and can be added using draw9patch. The catch here is that the guides must be compiled into the image before it can be used.
The Border: For the most part, you will not have to edit the border of a .9.png because, as long as you follow the guide below, the guides will already be in the image and you will not need to change them. If you do need to create your own (I’d assume you know enough not to be reading this though ), you can find more information here.
Editing the Framework
In this example we will look at editing framework-res.apk. However, the process can be used on any apk.
The method described below may seem overly complicated for those who have experience in this area, but it is (in my opinion) the easiest ‘sure-fire’ way to make sure you don’t have any problems (especially with the .9.png’s).
In rare cases, when the .apk your modifying doesn’t have any .9.png’s (e.g. the Recent Calls widget) then you can skip straight to the ‘Updating images using Drag/Drop’ section below.
Requirements:
You will need the following:
7zip apktool - this is included in the attached file themes.zip
Some people use WinRAR instead of 7zip, but apktool uses some 7zip commands internally so make sure it is installed (I think, I know this is the case for APK Manager, I still need to test this for apktool, but hey, just use 7zip, it's free and works exceptionally well).
Setting up:
In the attached zip file (themes.zip) you will find a copy of my theme creation environment. It’s not too complicated, it only contains a couple of folders so I know where everything is, three key batch files (all one-liners) and apktool.
The first thing we need to look at is install_framework.bat. This contains the following line:
Code:
java -jar apktool.jar install-framework stock\framework-res.apk
All this does is tell apktool to install the framework on your system. The resources from stock\framework-res.apk will be extracted to a default location. If you don’t do this then you will not be able to recompile other apk’s that rely on the framework (you will get a ResourceNotFound error).
The other batch files decompile and build the framework, these are the ones that need to be modified if you start working on a different apk:
Code:
decompile.bat
java -jar apktool.jar d stock\ framework-res.apk working\ framework-res
build.bat
java -jar apktool.jar b working\framework-res out\framework-res.apk
I have included the stock X10 mini pro framework. If you use on of the other frameworks out there you may find that you get a lot of errors when trying to recompile. That’s because someone got lazy with the .9.png’s
As we are modifying the framework directly we do not need to run install_framework.bat, for a different apk (e.g. Phonebook.apk) you may need to run this first to avoid errors when decompiling.
Decompiling and Building:
1. Run decompile.bat. After this you will see that the working folder is filled with the contents of the apk. The images we need to modify are in the subfolders res/drawable-ldpi and res/drawable-land-ldpi. If you look at some of the .9.png’s in there you can see the guides (see the attached image). This makes it really easy to edit them, you can just edit them like any other image (as long as you do not touch/alter the guides).
2. Edit any images that you want. For the .9.pngs I usually make a copy without the 1 pixel border so that I can edit the entire image, then I paste the copy back into the middle of the original .9.png. You don’t have to worry about the guides, they are already set correctly.
I have created a tool that takes the stock x10 mini / mini pro status bar icons, removes the background and sets them to a colour of your choice here. This was made to make my life easier by minimizing the time I spend in photoshop.
3. Run build.bat. This compiles the framework, embedding the guide information into the .9.png’s. The output framework is in the out folder. Do not push this to your phone as it is incomplete and the resources.arsc is stored incorrectly. If you do push it to your phone then you get to reflash
Now you can just drag the edited images out of the generated framework onto your hard drive and use steps 4. and 5. of the Drag/Drop method described below to update your framework.
Updating images using Drag/Drop:
1. Open the .apk in 7zip and browse to the appropriate image folder (almost always the res\drawable-hdpi folder)
2. Drag/Drop the images you want to edit to your hard drive. Leave the .apk open in 7zip
3. Edit the images in your favourite program (photoshop or similar)
4. Drag/Drop the images back into the .apk that is still open
5. Use the process described in the previous post to push the framework back to the phone
The reason that the .apk is left open in this process is that some (all?) of them are signed and updating them in this way doesn’t mess with the signature. I’ll admit to not being 100% sure about this, I’m sort of thinking now that people just had problems re-packing due to files being compressed that shouldn’t have been (see the section on editing XML files and adding resources to see what I mean). Please correct me on this one.
This also [almost] goes without saying, but: Make a backup before you start (you can look at the installer for Chewitts Dark10 theme to see how to do this).
OK, now you can start messing with the appearance of your phone, have fun
Credits
Thanks to Mr_Element for the help testing this process and making it easier to follow
Thanks to damnitpud for his post here, without which I would still have been a bit lost in draw9patch.
Modifying XML files and adding resources
First up, thanks to MrRusch for pointing out that the resources.arsc was being zipped differently. It would have taken a few more flashes to figure out how to pack it into the apk without that little nugget
The XML files in the framework-res.apk (and the other apps) are stored in a compiled form, making them impossible to edit without decompiling them. The process of decompiling them and recompiling is reasonably simple but care is required if any images/resources are added to the apk.
Modifying the xml files opens up certain things that can’t be changed by just modifying some image files. The best example is changing the battery icon in the notification bar to show a different image for each percentage instead of just 10%, 20%, 40% etc.
When you modify xml files and add resources to your apk, make sure you copy ALL the modifications made to the stock apk each time after compiling. I have noticed strange effects if I don't do this such as the wrong images being used - I am assuming that in the newly compiled resources.arsc the image references/IDs change when compiled, but I'm not really sure yet. An example of this is when I tried to add the signal strength mod mentioned above to a framework that included the battery icon mod below. This only worked if I also copied the battery mod files to the framework (even though they were already in the apk) after recompiling the signal strength mod. If I just copied the files required for the signal strength mod then the battery indicator would start showing the wrong images .
Battery Icon:
Here is a step by step for modifying the battery icon in the framework. To do this you will need to download apktool and install 7zip (other compression programs may work, but I’ve only used 7zip). I have attached some example files with 100 steps (one for each percentage) in case you just want to add them to your existing framework. Just make sure they are added as described below!
1. Decompile the framework using the following command:
Code:
java -jar apktool.jar d framework-res.apk framework-res
2.This will decompile the framework-res.apk that’s in the current command window folder into a subfolder framework-res
Find the xml files you need to modify, e.g. the battery icon xml res\drawable\stat_sys_battery.xml and edit them. This is assuming, of course that you know what needs to go in the XML file . For the battery XML it is pretty obvious, just copy/paste the existing nodes and change them so you have the necessary percentage entries, see the attachment for an example with 100 steps.
3. Add any necessary resources to the appropriate folder. For the battery icon you need to create an image for each percentage (or download one of these) and add them to the res\drawable_hdpi folder. The name is the same as the name in the xml (stat_sys_battery_*.png)
4. Rebuild the apk using the following command:
Code:
java -jar apktool.jar b framework-res out\framework-res.apk
This will create a new framework-res.apk in a subfolder out.
IMPORTANT: Do not push this apk to your phone unless you want to reflash
5. Extract the xml files and images from the newly generated apk (you can use the original images, but the xml files must be the newly compiled ones from the new apk). Add these files to the original framework-res.apk that you want to push to your phone (see the previous post).
6. Extract the resources.arsc from the root of the apk
7. Rename the original framework-res.apk from your theme to framework-res.zip
8. Right-click the extracted resources.arsc and choose the 7zip menu item ‘Add to archive’
9. In the dialog that appears set the achive field at the top to the framework-res.zip from step 7. And set the archive format to zip. Now set the Compression level to store and click OK(if you do not do this your phone will not boot). The settings are in the attached screenshot.
10. Rename framework-res.zip to framework-res.apk and double check that the compressed size or resources.arsc is the same as the original size (see screenshot)
11. Done. Push the new framework to your phone.
Status Bar Text:
The style for most (all?) UI elements can be found in res/values/styles.xml. This xml file is only available in a decompiled framework. In the compiled version everything in res/values is compiled into resoureces.arsc.
The status bar text style is named TextAppearance.StatusBar. The file is pretty large so it's best just to do a search for the name. The definition looks like this:
Code:
<style name="TextAppearance.StatusBar" parent="@style/TextAppearance">
<item name="textSize">16.0sp</item>
<item name="textStyle">normal</item>
<item name="textColor">@color/semc_text_color_primary</item>
</style>
You can easily adjust the size or make the text bold using the textSize and textStyle elements (see here for a description of these attributes and their values). The color uses the @color/... notation. This is a reference to a color resource, these can be found in colors.xml. We could just change this to a direct color entry (see here for an example), but then we wouldn't have a resource that can be reused for other parts of the UI.
If you open colors.xml you can find this:
Code:
<color name="semc_text_color_primary">#ffffffff</color>
This sets the primary text color to white (ARGB: FFFFFFFF = White). Changing the value of this will change the color of all primary text throughout the phone (settings menu etc.). If we just want to change the notification bar then it's best to add a new color. To do this just duplicate the above color definition and change the name and color:
Code:
<color name="semc_text_color_primary">#ffffffff</color>
<color name="semc_text_color_custom">#9900ff00</color>
And then adjust the style to use this new color resource:
Code:
<style name="TextAppearance.StatusBar" parent="@style/TextAppearance">
<item name="textSize">16.0sp</item>
<item name="textStyle">normal</item>
<item name="textColor">@color/semc_text_color_custom</item>
</style>
Now recompile and copy resources.arsc to your framework as described above and push the framework to your phone for semi-transparent green text in your status bar
Modifying Services.jar
To modify services.jar we need to decompile the classes.dex file contained within. We can do this with baksmali:
1. Open services.jar (found in system/framework) with 7zip
2. Extract classes.dex from the archive
3. Open a command window and use the following to decompile:
Code:
java -jar baksmali-1.2.5.jar -o out\services classes.dex
4. You will now have a subfolder out\services with the decompiled .dex classes (smali files)
These sort of modifications will not be necessary very often. Two things that have been looked at so far are changing the text color on the status bar clock (just the clock, not the notification text) and changing the signal strength to show dBm instead of just the bars. The text color of the clock is relatively simple and is described below. The signal strength mod was done by MrRusch and requires a bit more code.
I have attached a converter MrRusch has put together to convert java to smali. This is really helpful when trying to figure out how to modify the smali or event just trying to figure out what a piece of smali code does.
You can find a reference for all the smali ops here. This one is more complete but I prefer the first purely because it's a bit more compact and it has most of what I need anyway. Thanks to untemensch and JesusFreke for the links.
Status Bar Clock Color:
I have since figured out how to do this without changing any code, just by changing some xml in res/layout, but I will keep this here as I think it is a nice, easy to follow example to start out with.
This section describes how to modify the color of the clock in the status bar without changing the color of the notification text (changing all of the status bar text is described in the xml section above).
First we need to have a look at the smali file com\android\server\status\StatusBarIcon.smali to see how the color of the clock text is set. I use Visual Studio to view/edit the smali files, but you can use any text editor - I have seen PSPad recommended a few times.
If we look at the init method we can see the following piece of smali code:
Code:
.line 44
.local v15, textColor:I
const/4 v13, -0x1
.line 50
.local v13, styleIndex:I
const v18, 0x1030079
:try_start_1f
sget-object v19, Lcom/android/internal/R$styleable;->TextAppearance:[I
move-object/from16 v0, p1
move/from16 v1, v18
move-object/from16 v2, v19
invoke-virtual {v0, v1, v2}, Landroid/content/Context;->obtainStyledAttributes(I[I)Landroid/content/res/TypedArray;
move-result-object v5
.line 53
.local v5, a:Landroid/content/res/TypedArray;
const/16 v18, 0x0
move-object v0, v5
move/from16 v1, v18
move/from16 v2, v16
invoke-virtual {v0, v1, v2}, Landroid/content/res/TypedArray;->getDimension(IF)F
move-result v16
.line 54
const/16 v18, 0x3
move-object v0, v5
move/from16 v1, v18
move v2, v15
invoke-virtual {v0, v1, v2}, Landroid/content/res/TypedArray;->getColor(II)I
move-result v15
Here's a run-down:
I'm pretty sure the lines that start with a '.' are comments from the decompiler.
The .line 4 entries are just a reference to the line number in java source-code. And I think the .local v15, textColor:I entry just notes the v15 variable name and type (I = integer).
The first bit of interest is the line invoke-virtual {v0, v1, v2}, Landroid/content/Context;->obtainStyledAttributes(I[I). The obtainStyledAttributes method definition can be found here. There are a few overloads, but the call is to the method that accepts an integer and an integer array as parameters - hence the (I[I), I and [I. The three variables in braces at the start denote the object that the method is being called on (the Context object) and the two parameters respectively. The first parameter (v1) is a resource ID and a few lines up the v18 variable is copied to this (move/from16 v1, v18 - this means move the value from v18 to the v1 variable). v18 was declared a few lines above again with the value 0x1030079. This ID can be found in the framework xml-file res/values/public.xml and the value is the name of a style (TextAppearance.StatusBar) that can be found in res/valus/styles.xml (see the xml section above).
The result of obtainStyledAttributes is copied to v5 (move-result-object v5) which (in .line 54) is copied to v0 which is then used to call Landroid/content/res/TypedArray;->getColor with the two integer parameters v18 (0x3) and v15 (0x100 - this is the color black). The first parameter is the index of the color in the style array (index 3 in v5) and the second is the default value (black).
The result of getColor() is then copied to v15 and reused later when setting up the text view for the clock:
Code:
.line 61
.local v14, t:Landroid/widget/TextView;
move-object v0, v14
move-object/from16 v1, p0
iput-object v0, v1, Lcom/android/server/status/StatusBarIcon;->mTextView:Landroid/widget/TextView;
.line 62
new-instance v11, Landroid/widget/LinearLayout$LayoutParams;
const/16 v18, -0x2
const/16 v19, -0x1
move-object v0, v11
move/from16 v1, v18
move/from16 v2, v19
invoke-direct {v0, v1, v2}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V
.line 65
.local v11, layoutParams:Landroid/widget/LinearLayout$LayoutParams;
const/16 v18, 0x0
move-object v0, v14
move/from16 v1, v18
move/from16 v2, v16
invoke-virtual {v0, v1, v2}, Landroid/widget/TextView;->setTextSize(IF)V
.line 66
invoke-virtual {v14, v15}, Landroid/widget/TextView;->setTextColor(I)V
All this means that to change the color of the clock text only, we need to declare a new style and use the ID of this style in the call to obtainStyledAttributes. When adding the style to styles.xml I keep it in the same place as the other status bar styles:
Code:
...
<style name="TextAppearance.StatusBar" parent="@style/TextAppearance">
<item name="textSize">16.0sp</item>
<item name="textStyle">normal</item>
<item name="textColor">@color/semc_text_color_primary</item>
</style>
<style name="TextAppearance.StatusBar.Clock" parent="@style/TextAppearance">
<item name="textSize">16.0sp</item>
<item name="textStyle">normal</item>
<item name="textColor">@color/semc_text_color_clock</item>
</style>
...
The name of the style can be anything, what is important is the ID reference in public.xml, and that a color semc_text_color_clock is declared in colors.xml (see the xml section above).
The style reference in public.xml must have an ID that starts with 0x0103****. This is the ID range for styles, strings and other resources have a different ID range. I always add the new style at the bottom of the style group so that I can easily see which is the next free ID:
Code:
....
<public type="style" name="SEMCTheme.Dialog.Alert.Vanilla" id="0x01030139" />
<public type="style" name="TextAppearance.StatusBar.Clock" id="0x0103013a" />
....
Now that we have added a new style we just need to adjust the smali code to use it. Change the code above from:
Code:
.line 50
.local v13, styleIndex:I
const v18, 0x1030079
to:
Code:
.line 50
.local v13, styleIndex:I
const v18, 0x103013a
Now our new style is used for the call to obtainStyledAttributes. We then need to recompile the smali to a classes.dex file and update the services.jar:
Run the following command to recompile the smali:
Code:
java -jar smali-1.2.5.jar -o out\classes.dex out\services
The output file may be a slightly different size than the original classes.dex but as long as you don't get any errors it will be OK.
Now open services.jar with 7zip and update it with the new classes.dex (drag/drop).
Done Push the services.jar to your phone with adb and reboot (make sure you have updated framework-res.apk with the new xml resources first, otherwise our new ID will point to a non-existant resource)
Possible reasons your phone won't boot after modifications:
images anren't stored properly, right format, right size etc.
unpacked apk improperly, use 7zip, it doesn't mess anything up
you signed the package before pushing it- unless you know what you're doing follow the directions to a tee and you should be fine
pushed the package to the wrong directory, /system/framework-res.apk XX, /system/framework/framework-res.apk
I'm sure many other reasons, these were the only ones I encountered
How to get past boot screen:
Use backup framework-res.apk and push that one to your phone. Remember to place that one where the modified one is.
To see if adb sees your phone type adb devices, if a serial number pops up try pushing your original, if not...
Flash your phone again from scratch . Sorry, I don't know any better way yet.
from bitter personal experience :
If anyone does mess their phone up so much that not even the SE logo shows up (just a black, maybe flickering, screen) and a reflash/seus repair doesn't help. Then what sorted me out was a reflash to Generic Nordic 1.6 using this guide the same one I used to get the 2.1 update early - then boot the phone, shut down again and run seus for the 2.1 update and bin4ry flash tool.
Not directly related, but here's a tip from XperiaX10iUser:
To reverse chmod use 0755 instead of 4755.
Click to expand...
Click to collapse
Link to All The System Apps Mini : Download
Themes:
Black Android Theme 1.6 & 2.1 (by draco_ag)
*-=ShArP sUtEr=-* Theme Design For 2.1 (by Shiven Juneja)
Black HTC Theme For x10 mini & x8 (by pulpoff)
Suavesque x10 mini pro 2.1 theme
custom framework-res for 2.1 (By Mooozer)
Black theme + original android emotions For 1.6
[WIP] X10 Mini grey theme For 1.6
Iridium Carbon for 2.1 (by Dark_dog)
~THeMe~ Simplistic v1 Port for X10 Mini/Pro (By Manny-)
~THeMe~ Gingerbread Theme for X10 Mini/Pro
[Theme]Stock Android (Nexus One)
[Theme]Gingerbread Nexus S Edition [with Android 2.3 icons]
Root Explorer
@vippie
Maybe it's a known way, but I didn't find it yet . It works great for me. Your device has to be rooted.
Zocker Tko mentioned in his thread a black theme on a german forum. There's a little tutorial on that site on howto replace the framework-res.apk using Root Explorer:
* make a backup of the original file
* Copy framework-res.apk to the SD card
* Mount /system in RootExplorer as "rw"
* Copy framework-res.apk to /system
* Set permissions for framework-res.apk to 644. See screenshot:
* Move framework-res.apk to /system/framework and replace the existing file (reported to be safer than copy).
* Reboot your phone.
Ofcourse all credits goes to Bueffel the original poster.
Click to expand...
Click to collapse
Nice Guide for installing via root explorer by DarK_dOg:
Installation procedure:
Step 1:
Copy android.policy.jar, framework.jar, framework-
res.apk files into your (/sdcard).
Step 2:
Launch Root Explorer and browse to the location of the theme
pack files. Press menu and then "Multiselect". Then
select the files and press "copy".
Step 3:
Browse to /system. Press Mount R/W tab. Then press
paste.
Step 4:
You're in /system. Select android.policy.jar file.
From the pop-up menu, choose permissions and set them
according to the screenshot:
Step 5:
We follow the exact same procedure to set the permissions for
the framework.jar and framework-res.apk files.
CAUTION:It is very important to set
proper permissions (as shown on the screenshot) to all of the three
files, or else you will end up with a bricked phone
Step 6:
Once we set the permissions, our files are ready to move on /system framework. Press menu and then "
multiselect" (we are on /system).
For once again choose android.policy.jar, framework.jar
, framework-res.apk and press move.
Step 7:
Go to /system/framework and press
paste.
Click to expand...
Click to collapse
reserved.....
Great post. Thank you!
Quick question: Unsecuring the shell, if the phone stucks at boot, will I be able to replace framework-res as long as adb recognizes the phone? No need to su?
I ask this because I recently re-flashed my phone because I couldn't replace the framework I made by the stock one, but adb was recognizing the phone, just didn't let me su...
Thanks again.
Regards
ya u r write u can replace the framework with su
Steps:
adb push framework-res.apk /sdcard/framework-res.apk
adb shell
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
dd if=/sdcard/framework-res.apk of=/system/framework/framework-res.apk
shivenjuneja said:
ya u r write u can replace the framework with su
Steps:
adb push framework-res.apk /sdcard/framework-res.apk
adb shell
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
dd if=/sdcard/framework-res.apk of=/system/framework/framework-res.apk
Click to expand...
Click to collapse
Couldn't make this work.
My adb is still asking for su to root. Doesn't allow me to mount without root (su command after ad shell) even after chmod 4755.
This way if something goes wrong, I'll definitively will have to reflash... And that's... You know...
Any idea?
I would be much more comfortable to start playing around with this 'safety net' working...
Thanks again!
Regards
Thanks
Originally Posted by pulpoff >
If your phone gets stuck on booting after playing with framework or some other stuff, I've found a way to repair it without reflash :
restart phone, connect it to usb
in adb shell run rootshell command again to gain root (wise to keep it after rooting), the "su" won't work cause it depends on gfx libs and they are not started yet..
mount sdcard with this command : mount -t vfat /dev/block/mmcblk0p1 /sdcard
and put your backed files where they belong.
Good luck!
Click to expand...
Click to collapse
try this method....
shivenjuneja said:
try this method....
Click to expand...
Click to collapse
Sorry to bother...
Code:
D:\>adb shell
$ rootshell
rootshell
rootshell: permission denied
$ mount -t vfat /dev/block/mmcblk0p1 /sdcard
mount -t vfat /dev/block/mmcblk0p1 /sdcard
mount: Operation not permitted
$
Not sure I managed the 'rootshell' command well.
This is what I get.
My phone is rooted, obviously. I can do the 'su' with no problems.
I'm just trying to be safe before starting to mess around with framework...
Thanks you once again.
Regards
if the adb thing is not working thn you can do 1 thing. download droid explorer from this site http://de.codeplex.com/releases/view/50997 thn when you dont have access to your phone you can open droid explorer move your backup framework to your system framework framework-res.apk and you can also use this tool to do the further things...
http://forum.xda-developers.com/showthread.php?t=850340
I have droid explorer and android commander installed.
I know for experience that none of them work if phone gets stuck.
No 'su', no root, no permission to mount, no permission to write...
Feel free to delete this posts if you want the thread clean.
If we manage a solution, we can post it directly instead of 10 posts aroud the same thing.
Regards and thank you!
bro seus is the last option.... bt can u plz tell me where i wrote that we can do mofications without having su permissions in the thread??
shivenjuneja said:
bro seus is the last option.... bt can u plz tell me where i wrote that we can do mofications without having su permissions in the thread??
Click to expand...
Click to collapse
No, you didn't. I'm not saying that.
What I was looking for was a way to replace framework-res.apk in case something goes wrong and phone gets stuck in 'Sony Ericsson' black screen before bootanimation. In that case, 'su' is not allowed.
That's what happened to me last time I played around with it. And in that case I were not able to put the good framework-res.apk back in place, so I had to re-flash.
Having shell unsecured, I believe I can avoid re-flashing even if something goes wrong. I think I finally got a way to have this safety through SuperOneClick although I'm not so sure it will work in a worst case scenario, once the 'shell root' gained is always temporary until next reboot...
As I told you before, none of the ways you posted here to get 'shell root' or 'shell unsecured' worked for me, that's only what I was looking for.
Thank you again for all your work and patience.
Best regards!
Welll...
Playing aroud and I'm a small step to re.flash the phone.
I have my phone stuck in the 'Sony Ericsson' black screen.
Can't get root, rootshell, adb root or su after adb shell to work.
I need at least to change the permissions of my framework-res.apk file in /system/framework
Any idea on how to do this and avoid the re-flash?
Thanks

[DEV] How to add EDT Tweaks support in your odexed ROM/Themes

Original Threads (deodexed ROM/Themes)
[MOD] [JVP] Statusbar Tweaks - EDT
[MODS][MORPH] Kahvitahra's mods - EDT TWEAK
How to get it working on an ODEXED ROM!
The only file we are going to modify is /system/app/SystemUI.apk
If you already got this apk deodexed skip to step#2 (you can check for it by opening SystemUI.apk and check if classes.dex is already present)
Step#1 (baksmali)
You need to baksmali SystemUI.apk, i suppose you already know how to do it, if not just use search button!!!
Step#2 (apk-manager)
I am using apk-manager, so before to continue make sure you already have this tool installed and working!
Copy deodexed SystemUI.apk to place-apk-here-for-modding folder
Start Script.bat (don't close this windows we will use it later on)
Select option "19) Select compression level for apk's" and hit 0
Set current project (option 22)
Decompile apk (option 9)
go to projects\SystemUI.apk\res\layout and overwrite status_bar.xml with the file attached
go to projects\SystemUI.apk\smali\com\android\systemui\statusbar and copy the following files from the attached zip file: BatteryText$1.smali, BatteryText$SettingsObserver.smali, BatteryText.smali, Clock$1.smali, Clock.smali, DateView.smali
go to projects\SystemUI.apk\smali\com\android\systemui\statusbar\policy and overwrite StatusBarPolicy.smali with the one inside the zip file attacched
go back to the apk-manager windows (cmd.exe windows started with Script.bat) and select "Compile apk" (option 11)
just answer "yes" to the two questions you will promt!
Now before to go ahead, you will notice that a new folder "keep" has been created, open up that folder and delete "classes.dex" and "resources.arsc" then go to res/layout folder and delete status_bar.xml
Go back to the apk-manager windows and press enter to continue!
At the end you will see in place-apk-here-for-modding folder you modified unsignedSystemUI.apk
Step#3 (odex back)
-Download and copy "dexopt-wrapper" on /system/bin
-In adb just type:
Code:
adb shell echo $BOOTCLASSPATH
you should use the above string later on!
-copy "unsignedSystemUI.apk" from your pc to your /sdcard/mod folder (create this folder) and rename it to SystemUI.apk
-copy /sdcard/mod/SystemUI.apk to /sdcard/mod/done/SystemUI.apk, now open without extract it (use 7zip winrar..) and delete classes.dex.
Code:
> adb remount
> adb shell
# su
# cd /system/bin
# busybox chmod 755 dexopt-wrapper
Now you have right permission for dexopt-wrapper
Let's create a new .odex file from the SystemUI.apk file
Code:
# cd /sdcard/mod
# dexopt-wrapper SystemUI.apk new.odex [BOOTCLASSPATH]
fill in the value of BOOTCLASSPATH, without the []
do NOT continue until this command succeeds!
At this point your new.odex file won't work because dalvik virtual Machine store checksum for each packages which means that your new.odex file cannot pass this check on boot.
We will fix it:
Copy over the "signature" from the current(original one in your /system/app) .odex file into the new .odex file.
Code:
# busybox dd if=/system/app/SystemUI.odex of=new.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
now replace the old .odex file with the new .odex file. Also we will copy the apk without classes.dex to /system/app
Code:
# cd /system/app
# busybox cp /sdcard/mod/new.odex SystemUI.odex
# busybox chmod 644 SystemUI.odex
# busybox cp /sdcard/mod/done/SystemUI.apk SystemUI.apk
# busybox chmod 644 SystemUI.apk
# sync
# reboot
That's it!
NOTE:
Remember to backup your system before you start doing it, because some time your phone won't boot, maybe because you made some mistake in the smali code you have changed...
I usualy prepare a zip package with the original file i am going to replace, therefore if something goes wrong i can flash them back via CWM the original one!
Hope it can help!
Thanks to Kahvitahra for source code and every single one in this community.
View attachment EDT_sources.zip
Hi mate!
I also moded dateview.smali to show clock in pulldownbar
kahvitahra said:
Hi mate!
I also moded dateview.smali to show clock in pulldownbar
Click to expand...
Click to collapse
Thanks Bro!
\Edit
OP has been updated!
Suggestion for thread title:
How to add EDT Tweaks support in your odexed ROM/Themes.
Another suggestion:
Put links for the original threads on first post:
[MOD] [JVP] Statusbar Tweaks - EDT
[MODS][MORPH] Kahvitahra's mods - EDT TWEAK
OK, after the 1st quick overview i must say...i like my LeoMAR ROM as it is now! ;o)
Never done something like that before and i don´t wanna challenge my luck too much...
Just wonderfull Many thanks
Second way
Edited post
mmmh?
Can i have an italian guide to apply this on my odexed rom? i never use this program...i know only how install a rom! now i have a tweaky rom v2 on my sgs
is it possible to do??? grazie infinite!!!
Hy. Can anyone make me this for XWKJ1 odexed rom pls?
Code:
.method private final updateClock()V
.locals 5
.prologue
.line 78
new-instance v0, Ljava/util/Date;
invoke-direct {v0}, Ljava/util/Date;-><init>()V
.line 85
.local v0, now:Ljava/util/Date;
const/4 v1, 0x2
const/4 v2, 0x0
invoke-static {v1, v2}, Ljava/text/DateFormat;->getDateTimeInstance(II)Ljava/text/DateFormat;
move-result-object v1
invoke-virtual {v1, v0}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
move-result-object v1
invoke-virtual {p0, v1}, Lcom/android/systemui/statusbar/DateView;->setText(Ljava/lang/CharSequence;)V
.line 87
return-void
.end method
Sorry for reviving this thread but i have a question.
With this code in DateView.smali i got an am/pm clock and i use a 24h format.
Anyone knows how to edit DateView.smali or StatusBarPolicy.smali to get a 24H format on the clock in the notification pulldown?
I´ve been searching and found some references but it looks a little "grey" to me, because they only refer on removing the am/pm and not displaying 24h format.
Is there a way to get the correct time format from this line?
Code:
invoke-static {v1, v2}, Ljava/text/DateFormat;->getDateTimeInstance(II)Ljava/text/DateFormat;
Thanks
Edit: If i change system language to Portuguese, the clock displays 24h format, but in english it only displays 12h. Still no go, i want to use english.
battax said:
Code:
.method private final updateClock()V
.locals 5
.prologue
.line 78
new-instance v0, Ljava/util/Date;
invoke-direct {v0}, Ljava/util/Date;-><init>()V
.line 85
.local v0, now:Ljava/util/Date;
const/4 v1, 0x2
const/4 v2, 0x0
invoke-static {v1, v2}, Ljava/text/DateFormat;->getDateTimeInstance(II)Ljava/text/DateFormat;
move-result-object v1
invoke-virtual {v1, v0}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
move-result-object v1
invoke-virtual {p0, v1}, Lcom/android/systemui/statusbar/DateView;->setText(Ljava/lang/CharSequence;)V
.line 87
return-void
.end method
Sorry for reviving this thread but i have a question.
With this code in DateView.smali i got an am/pm clock and i use a 24h format.
Anyone knows how to edit DateView.smali or StatusBarPolicy.smali to get a 24H format on the clock in the notification pulldown?
I´ve been searching and found some references but it looks a little "grey" to me, because they only refer on removing the am/pm and not displaying 24h format.
Is there a way to get the correct time format from this line?
Code:
invoke-static {v1, v2}, Ljava/text/DateFormat;->getDateTimeInstance(II)Ljava/text/DateFormat;
Thanks
Edit: If i change system language to Portuguese, the clock displays 24h format, but in english it only displays 12h. Still no go, i want to use english.
Click to expand...
Click to collapse
Hi!
Getdatetimeinstance gets time format depending to your locale, like you said. With simpledateformat you can achive that what you are looking for.
Im on phone now so cant paste links, but you can navigate to my thread from my signature. There is edt + custom date format. You can pick code from there or just use that the way its done. There is also moded settings.apk so that you can put any format you like in that notification date/time. Affected files are told in those posts.
Thanks i´ve already used your mod yesterday a awhile after my first post, but i will search the code.
Thanks
I believe you can have a deodexed app on your odexed rom. Just remember to remove (backup) the 2 odexed files and clear dalvik-cache.
PS: this is true only for files in the app folder! Not in the framework folder!
Pps: I should include some of this mod in my mod
Thanks!
Sent from my GT-I9100 using xda premium

[GUIDE] Smali coding guide for beginners

BEGINNER'S GUIDE TO SMALI CODING OF SYSTEMUI​​Presenting to you a beginners guide to smali coding. This thread would focus specifically on SystemUI modding. Please keep questions related to other apks out of this thread.
Disclaimer​
This guide is provided "as is" with no warranties with regard to the accuracy and completeness of the information provided herein. I am not responsible for any bad outcomes you or anyone may have because you followed this guide. When I say beginners, I expect you to have
- Knowledge of some programming language (C,java,etc)
- An inquisitive mind to try things out
- The patience to first google and try to find answers to simple questions
Click to expand...
Click to collapse
Background​
I was also a noob at smali coding till few weeks back. What I have learnt through hours of google searching, reading over the internet, figuring things out and experimenting, I will try to write it up in this guide so that it becomes easier for other beginners to get into systemUI smali coding. This guide won't be just a copy paste guide to get certain mods to work in your systemUI. Rather it should get you started to write your own smali codes and edit systemUI. Lastly, I have limited knowledge on smali currently but I'll try to clarigy doubts as much as possible and I sincerely wish that the great devs around who knows smali coding would join up and help make this thread better and I certainly hope that we all get to learn more smali through this thread.
Click to expand...
Click to collapse
Ok cut the crap. Lets get to the real thing.
If you already know what is smali - goto : post_2
If you already know smaling and baksmaling - goto : post_3
If you just wanna know how to implement the my mod (right finger pull for quick panel toggles) of Serajr's JB like SystemUI - goto : post_4
If you already do smali coding and would like some tips to make life easier - goto : post_6
What is smali?
Android programmers write android apps in java. The compilers like eclipse are then used to build apks from these codes by converting the java source code into dalvik executables (.dex files). The dalvik virtual machine (dalvikvm) in Android can then run these executables. So the perfect way to mod systemUI would be to edit the source code of the systemUI and build the modded systemUI. This is possible for AOSP ROMs like cyanogenmod. So anyone who knows java can download the source code of cyanogenmod, do any crazy modification they want and build CM with the new systemUI. This is all possible because the CM is open source. But unfortunately the OEM Roms like Xperia, Sense, etc are not open source as far as I know. So their source code is not available.
But their dex files are available which would be in a totally unreadable. So to edit it we need to convert this .dex files to a more understandable form. This is where smali comes in. To make it easier to understand I can represent it like this:
.dex <------------------> .smali <--------------------- java source code​
Converting a .dex file to smali (called baksmaling) gives us readable code in smali language. Now if you wonder why can't smali be converted into java source, that's because java is a very developed language and smali is more of an assembly based language. And so while going from java source to smali information is lost and that's why smali can't be used to completely reconstruct java source code
How to baksmali SystemUI.apk?
So let us first decode and obtain the smali code from the SystemUI.apk in your phone.
APK Multi-tool: There are many tools out there that can baksmali apks and later recompile them back after you edit the .smali files. I used APK Multi-tool for this purpose and I would say it works really well with SystemUI.apk as the tool handles system apps separately and has a comparatively more decent UI. I used Windows Version v1.0.11
(Don't forget to give thanks to the people who made these tools if these come in handy for you!)
I - Setting up APK Multi-Tool
Download and extract it
Now from your phone copy framework-res.apk from /system/framework and SystemUI.apk from /system/app and paste it in <folder to which you extracted APK-Multitool>\other. Also copy SemcGenericUxpRes.apk from /system/framework. You will need it later. SemcGenericUxpRes.apk is only for Sony stock based ROMs. For ROMs from other OEMs the corresponding file may have different name and/or location
Run Setup.bat (I think it needs to be run as administrator)
Choose option 2. And from there choose the option to install framework-res.apk and SystemUI.apk. After both are installed return to main menu
Choose option 3 to setup directories
Choose 00 to quit
Now that we have APK Multi-Tool setup for use let us do some baksmaling
II - Decompiling and Baksmaling
Run Script.bat (In case you face problems try running it as administrator. But you probably wouldn't need to unless you extracted all this somewhere in your main windows partition)
Place the apk to be modded in 'place-apk-here-for-modding' folder
Choose option 10 in APK Multi-Tool command window
When it asks for the dependee apk as input drag and drop SemcGenericUxpRes.apk you took from your phone earlier at the command input
If all goes well you would return to the main screen. Don't close the script yet. Back at the APK Multi-tool\projects folder you should find a new folder inside which you would find a folder named smali. This folder has all the required smali files
DON'T CLOSE THE SCRIPT YET
The script needs to be open from baksmaling and needs to stay till you smali it again. If you close it in between you will have to start over again​
Trouble?
Try running the scripts as administrator if you get errors
Make sure you have java installed (Latest version recommended. I've used APK MultiTool with v1.6 and 1.7). Open command prompt (Type cmd in run to open command prompt) and type in java. If it says something similar to unknown command, that means you either don't have properly working java or you haven't added java to the command line path. Here is how to add it. The method explained for Vista worked in my Windows 7 laptop
If you get an error similar to wrong dependee then try this. Goto %userprofile%/apktool/framework. You must already be having 1.apk there if you successfully installed framework-res.apk in step I.4 above. Just copy and paste it again in that same folder as a copy (don't overwrite the first 1.apk) and rename this copy to 2.apk and try baksmaling again
III - Coding
This is where the actual work happens. As far as I have understood each class in the java source code would make a seperate smali file. Suppose there is a PhoneStatusBar class in the actual SystemUI source code you will find a PhoneStatusBar.smali somewhere in the smali folder APK Multi-Tool just made. If there was one sub class in the PhoneStatusBar class then that would result in a PhoneStatusBar$1.smali and so on. So you need to figure out which file to edit and do it using any text editor. More help on that in the next post
IV - Smaling and Recompiling
After you finished editing all the smali files and xmls and pngs next the whole thing needs to be smalied and then recompiled into the final apk.
From the APK Multi-tool script choose option 11.
When it asks about y/n enter y
You would now find a new folder named keep in the APK Multi-Tool directory. From that folder delete everything that you changed. Obviously you won't find any smali files as they have already been smalied into dex. So if you made changes in any smali file then delete the .dex file in this folder. If you have made changes in any xml then delete the resources.arsc and also the xml file that you changed. Delete any png or any other file you have changed
Go back to the script and press any key to continue
If all goes well you would now have the modded apk waiting for you in the 'place-apk-here-for-modding' folder with its unsigned added to its file name.
Trouble?
Try running the scripts as administrator if you get errors
In the main window type in option 23 to check the log. Try to figure out what you messed up from the information in the log.
:angel: Welcome to the world of smali coding! ​
Smali is not an easy programming language to master. You can get info about almost all smali commands here and here. These two links are excellent references for you all along the way! Here I'll go through some of the facts about smali and some of the things that I have found which might help you in writing your own smali code
As far as I know Smali resembles java the most. And the best resource to java in android programming is nothing else than developer.android.com
Click to expand...
Click to collapse
As I said earlier its not possible to reconstruct java source code from smali. But this handy tool APK_OneClick would still get you as close to the source code as possible. That said don't expect to get a compilable code out of it. Set up is pretty straight forward. Running the bat file adds few shell extensions to the right click menu including reconstructing java code. This tool has helped me a lot in understanding the code structure in SystemUI and I highly recommend using it. As a warning don't trust it completely. It did make mistakes a few times mostly when loops are involved
Click to expand...
Click to collapse
That said let us talk more about loops. You might have played with for, while loops, etc before. But well you won't find them in smali. Smali being more of an assembly language handles such loops using labels and goto commands.
Example 1 java code
Code:
if (flagx == 1)
flagx = 2
else
flagx = 3
When flagx variable is referenced as v0
Equivalent Example 1 smali code
Code:
const/4 v1, 0x1
if-ne v0, v1, :cond_0
const/4 v2, 0x2
move v0,v2
goto :goto_0
:cond_0
const/4 v2, 0x3
move v0,v2
:goto_0
Click to expand...
Click to collapse
See how much complex the so simple java code became in smali! At this rate how the hell can one figure out the smali for complex java code? Well the easiest way to do it would be starting from the opposite end.
Get Android SDK and Eclipse downloaded and set up
Write the java code which resembles what you want to do as closely as possible for a simple non-system app
Build the apk in eclipse
Decompile and Baksmali the apk and look at the smali code
Through this, if we get to know how the smali code would look, it should be easier to start off. For an example and more details on this check this post and this post
Click to expand...
Click to collapse
Numbers in smali are represented in hex number system and follow IEEE 754 standards. Yeah you guessed right - That's also complicated.
Suppose you want to introduce a number in your smali code. Say in example 1, you want flagx to be 330 instead of 3. The best way to find how 330 would look in smali would be to do what I said in the previous quote about starting from the opposite end. Write a java code with 330 replacing 3 and look into the baksmalied file to see how it looks.
Online Converter - This is an excellent online converter to make things easier. But even this isn't straight forward. Suppose you find a hexadecimal 0x435c in a smali file. Look for what type of variable is it stored in. And you see that that value is stored in smali in a 16 bit variable. Unfortunately the online converter takes only 32,64 and 128 bits. So type in 435c0000 in the input of the online converter. For 64 bit variables you will have to put more zeros. To find the IEEE 754 hex representation of decimal 330, type in 330 in the online converter and get its hex representation for different bit sizes
Click to expand...
Click to collapse
I will update this post as and when I get more stuff to add.
Pulling Status Bar down from the right side for Quick Panel Toggles in Serajr's SystemUI​
This was the first SystemUI mod that I did. I have refined the code a bit after that with suggestions from Serajr (Thanks bro! :good: ) This is a pretty simple edit and do-able for beginners. I will try to explain each step rather than just asking you to copy paste code.
Define a new boolean mTouchRight in PhoneStatusBar class (\SystemUI.apk\smali\com\android\systemui\statusbar\phone\PhoneStatusBar.smali) along with the other .field lines in the beginning part of this smali file.
Code:
.field private mTouchRight:Z
Now define a new method interceptOneFingerStatusBarRightTap to check if the user is touching the statusbar on its right side and make mTouchRight true if he is and false if not. All this is done only if mExpanded is zero
Code:
.method private interceptOneFingerStatusBarRightTap(Landroid/view/MotionEvent;)V
.locals 2
.parameter "event"
.prologue
iget-boolean v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpanded:Z
if-nez v1, :cond_1
invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawX()F
move-result v0
const/high16 v1, 0x435c
cmpl-float v0, v0, v1
if-ltz v0, :cond_0
const/4 v1, 0x1
iput-boolean v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTouchRight:Z
goto :goto_0
:cond_0
const/4 v1, 0x0
iput-boolean v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTouchRight:Z
:cond_1
:goto_0
return-void
.end method
You can just add such method definitions at the end of the smali file or in between. Just dont add it within another method!
Now we need to call this method in some function that handles touch events. I will talk about how to figure this out in a later post (Hint: coding logic+Names of variables and methods+using logcat).
In this case the method that we are interested in is interceptTouchEvent.
Original
Code:
if-ge v2, v3, :cond_0
iget-boolean v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpanded:Z
if-nez v2, :cond_5
:goto_2
invoke-virtual {p0, v5, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->prepareTracking(IZ)V
Change to
Code:
if-ge v2, v3, :cond_0
iget-boolean v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpanded:Z
if-nez v2, :cond_5
:goto_2
[COLOR="Red"]invoke-direct {p0, p1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->interceptOneFingerStatusBarRightTap(Landroid/view/MotionEvent;)V
[/COLOR]
invoke-virtual {p0, v5, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->prepareTracking(IZ)V
Next we need to make another new method to flip To QuickPanel in case mTouchRight is true.
Code:
.method private oneFingerStatusBarRightTapFlipToQuickPanel()V
.locals 1
.prologue
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTouchRight:Z
if-eqz v0, :cond_0
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->fastFlipToQuickPanel()V
:cond_0
return-void
.end method
Now to find out where this method needs to be called, I did the same as what I did with interceptOneFingerStatusBarRightTap (which would be explained in a later post)
I found out that if the call is added in makeExpandedVisible method, as the statusbar starts to get pulled down, the flip-to-quickpanel happens.
Original makeExpandedVisible
Code:
iput-boolean v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedVisible:Z
invoke-virtual {p0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->visibilityChanged(Z)V
const/16 v0, -0x2710
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateExpandedViewPos(I)V
Change to:
Code:
iput-boolean v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedVisible:Z
[COLOR="Red"]invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->oneFingerStatusBarRightTapFlipToQuickPanel()V[/COLOR]
invoke-virtual {p0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->visibilityChanged(Z)V
const/16 v0, -0x2710
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateExpandedViewPos(I)V
You can also put the call in updateExpandedViewPos method in which case the flip would happen only after the notification panel is completely open. Don't put the call for the method in both makeExpandedVisible and updateExpandedViewPos. Only one of them
Original code:
Code:
if-ne p1, v8, :cond_5
move v6, v3
.local v6, pos:I
Change to:
Code:
if-ne p1, v8, :cond_5
move v6, v3
[COLOR="Red"]invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->oneFingerStatusBarRightTapFlipToQuickPanel()V[/COLOR]
.local v6, pos:I
Nice Work
Figuring out smali ​
So in the previous post I said we should call interceptOneFingerStatusBarRightTap in interceptTouchEvent method. But how does one find that out? In which function to call and where?
Well first of all look at the names of the methods and variables and try to figure out what they do. Look at the parameters in function calls. Like interceptOneFingerStatusBarRightTap requires MotionEvent as its parameter in the function call to be able to use getRawX(). So now look at all the methods in PhoneStatusBar.smali which has acces to MotionEvent. In simple cases you might then be able to figure out where to put the method call if you understand the smali code and/or through trial and error. But in more complex cases you can take the help of logcat
Send messages to logcat
So here our aim is to add the call to interceptOneFingerStatusBarRightTap to a method in PhoneStatusBar.smali that has access to MotionEvent and is called when the user touches the screen. Goto all such methods and add smali code to send messages to the logcat. The smali code would be like this
Code:
const-string v1, "Message1"
const-string v2, "Message2"
invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
Make sure the variables used doesn't interfere with the code. Let us say we want to see when interceptTouchEvent is called. Add the above code at the beginning of the definition for interceptTouchEvent method. Instead of "Message1" write "interceptTouchEvent" and instead of "Message2" write "beginning". Now if you smali+compile the code to get the unsignedSystemUI.apk and get it working in your phone, connect the phone to your PC/laptop with USB debugging and open up logcat in cmd or eclipse. Now the "interceptTouchEvent" and "beginning" would come up in the logcat the moment the beginning part of interceptTouchEvent is executed. Like this you can find out which method is called when the user touches the status bar and where in the method should the code be added so that the right tap check happens only when you want it to
In some cases you would want to see what value a certain variable holds. Suppose you want to know the value in mTouchRight at the beginning of interceptTouchEvent. The following code would do it
Code:
iget-boolean v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTouchRight:Z
const-string v2, "mTouchRightatbegofITE"
invoke-static {v1}, Ljava/lang/String;->valueOf(Z)Ljava/lang/String;
move-result-object v3
invoke-static {v2, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
The extra line is to convert the boolen value in mTouchRight to string as Log.d() needs string parameters.
Finally get rid of the log.d() commands you wouldn't require before releasing the final version!
Click to expand...
Click to collapse
Starting from the Opposite End
To aid in this I'll share a simple apk source code that my friend (unfortunately he's not a member of xda) and I made with this post. Just import this project into eclipse and you should be able to build it. Suppose you want to know how much 107.0 is in hex. Just change the value at the place where it checks with getRawX in the java code to 107.0 and build the apk. Decompile/Baksmali the apk to check the corresponding smali hex value of 107.0
This is just a starter. You can probably do many things with this. Do complex codes in java in a dummy apk and see how it looks in smali and then try to implement it in the smali code of the actual apk!
Click to expand...
Click to collapse
Notepad++
If you have already gotten into smali coding you might have seen that just the number of all these smali files are enough to cause headache! How do you find out all the places where interceptTouchEvent is being called? Well if you sit and open all smali files and search for the method your patience would soon abandon you (to put it in a decent way ) Don't worry, here's notepad++ to the rescue. Here's why I recommend notepad++
The above mentioned purpose - Notepad++ has a "find in files" feature. It lets you search for "interceptTouchEvent" in every file that notepad++ can handle (of course including smali). It even lets you know which line in the file in the search result has the search string
Smali syntax highlighting - You can get proper syntax highlighted in notepad++ by importing the .xml file for smali. Google for "notepad++ smali user defined language" and find the .xml. Import it in notepad++ as a new user defined language by going to Language>Define you language.. in notepad++. I can't share the .xml file here due to some reasons.
Easy to use with multiple-tabs for multiple files
More minor reasons are there which I would let you discover for yourself :laugh:
Click to expand...
Click to collapse
Great Work!!!
Wow! Great stuff!! :good:
trust me serajr will damn happy seeing this..
This is awesome..
Sent from my GT-S6102 using Xparent ICS Tapatalk 2
Wow. This will be very handy. Thank you so much!
Sent from my Xperia Z using XDA Premium
..Have you tried Tickle My Android yet?
Ticklefish said:
Wow. This will be very handy. Thank you so much!
Sent from my Xperia Z using XDA Premium
..Have you tried Tickle My Android yet?
Click to expand...
Click to collapse
Buddy check serajr's thread.. need some files from u.
Sent from my GT-S6102 using Xparent ICS Tapatalk 2
Thank you very much for this...
Very very useful...
btw, will it work on gb???
---- by ----
Ganesh,
R.C. @ XDA
sandy7 said:
trust me serajr will damn happy seeing this..
Click to expand...
Click to collapse
Sandy bro... It´s been hard to wipe the smile off my face after see this thread!!
Havocgb, you come true an old dream!!! HATS OFF!!! :good:
serajr said:
Sandy bro... It´s been hard to wipe the smile off my face after see this thread!!
Havocgb, you come true an old dream!!! HATS OFF!!! :good:
Click to expand...
Click to collapse
Thanks bro! Now I can't wipe the smile off my face after seeing the response from all you guys! You guys are the best! :highfive:
Ganesh A said:
Thank you very much for this...
Very very useful...
btw, will it work on gb???
---- by ----
Ganesh,
R.C. @ XDA
Click to expand...
Click to collapse
Hmm I have no idea. I haven't done any decompiling/baksmaling for the SystemUI from GB rom but it might work if the tools I have used support GB. Ask in APK-Multi-Tool thread if there is one or try contacting its maker. Or else try it and see As for serajr's systemUI, I don't think it supports GB. Its for ICS. And so you won't be able to use my mod also. But just decompiling/balsmaling your GB systemUI.apk might work
And dont forget to install smali syntax highlightning for notepad++
http://androidcracking.blogspot.com/2011/02/smali-syntax-highlighting-for-notepad.html
Rempty said:
And dont forget to install smali syntax highlightning for notepad++
http://androidcracking.blogspot.com/2011/02/smali-syntax-highlighting-for-notepad.html
Click to expand...
Click to collapse
I was actually in the process of editing that post to mention the xml. xda is acting too slow now. Guess there is some server issue
I didn't wanna put up a direct link for the xml as the website at the link you have given (and where I got it from) is for a not-so-good purpose
New post added for more help with smali coding. Post is in the 1st page. link
wow really need this, thanks bro
WOW! Great job havocgb! I can definitely learn some tricks from this
I generally avoid writing complex methods completely in smali. (Especially ones that involve loops, if / else and switch statements. It is so easy to screw something up )
I prefer to write complex new methods in Java (in a dummy project in Eclipse), compile the project, decompile it to smali and copy-paste the new method.
Example:
If, let's say you want to write the method:
Code:
.method private interceptOneFingerStatusBarRightTap(Landroid/view/MotionEvent;)V
in the file:
Code:
smali/com/sonymobile/some_app/Class1.smali
In an Eclipse project:
1. Create the package com.sonymobile.some_app in the directory src
2. Create a new Java class (Class1) in the package you created in step 1.
3. Add your new method in the newly created Class1.java file
Code:
package com.sonymobile.some_app;
public class Class1
{
private void interceptOneFingerStatusBarRightTap(android.view.MotionEvent event)
{
//...
//add your logic here
//...
// Example
int action = event.getAction();
action = action+1;
}
}
4. Compile the project
5. Decompile the resulting apk file to smali
6. This is what the smali code will look like:
Code:
.class public Lcom/sonymobile/some_app/Class1;
.super Ljava/lang/Object;
.source "Class1.java"
# direct methods
.method public constructor <init>()V
.locals 0
.line 3
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
#p0=(Reference,Lcom/sonymobile/some_app/Class1;);
return-void
.end method
.method private interceptOneFingerStatusBarRightTap(Landroid/view/MotionEvent;)V
.locals 1
.parameter "event"
.line 12
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
move-result v0
.line 13
.local v0, action:I
#v0=(Integer);
add-int/lit8 v0, v0, 0x1
.line 14
return-void
.end method
7. Copy the new method from the smali file you've just produced to the original smali file you are trying to modify.
If you think this is off topic or irrelevant, please let me know and I'll delete it
Congrats again for the great thread!

[L7][CM10.1][GUIDE] Transparent Statusbar + 4 Tiles columns Quick Settings

Hi everybody
This is my first thread about android development on my L7 device. A few days ago i was searching in XDA about status bar transparency for CM 10.1, so all info that i found gives me a good result. I will explain you how to change status bar color and get transparency.
Please read: I am not responsible for damage to your device in the carrying out of these procedures
First you must have knowledgement of apk compiling and decompiling using apktool. I will not explain it in this thread.
So let's go to work:
1. Decompile android.policy.jar
Open android.policy.jar\smali\com\android\internal\policy\implPhoneWindowManager.smali and find this method.
Code:
.method public getSystemDecorRectLw(Landroid/graphics/Rect;)I
SELECT it until its .end method and DELETE IT
2. Replace by this method
Code:
.method public getSystemDecorRectLw(Landroid/graphics/Rect;)I
.registers 3
.parameter "systemRect"
.prologue
.line 3051
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemLeft:I
iput v0, p1, Landroid/graphics/Rect;->left:I
.line 3052
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemTop:I
iput v0, p1, Landroid/graphics/Rect;->top:I
.line 3053
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemRight:I
iput v0, p1, Landroid/graphics/Rect;->right:I
.line 3054
iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSystemBottom:I
iput v0, p1, Landroid/graphics/Rect;->bottom:I
.line 3057
const/4 v0, 0x0
return v0
.end method
3. That's all for android.policy.jar, so then compile it
4. Next step is decompiling SystemUI.apk
If have done, gone to SystemUi.apk/res/layout/status_bar_expanded_header.xml, In XML LINE 2 replace with my line
Code:
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/header" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" android:baselineAligned="false"
5. Open SystemUI.apk/res/values/drawables.xml
find this line
Code:
<item type="drawable" name="status_bar_background">[COLOR="Red"]#00000000[/COLOR]</item>
You have only change the red text by #88000000 for 100% transparency, or select one of the following values: (you can use any alpha color for this, in my case is black)
#00000000 - 100% transparency
#3F000000 - 75% transparency
#7F000000 - 50% transparency
#BF000000 - 25% transparency
That's all for SystemUI.apk son you can compile it and put in /system/app and give permissions to 644
To get 4 Tiles columns in QuickSettings just do next steps.
1. Open decompiled SystemUI.apk/res/layout/status_bar_expanded_header.xml
Go to XML Line 2 and replace by my line
Code:
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/header" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" android:baselineAligned="false"
2. Open SystemUI.apk/res/values/integers.xml
Find this line
Code:
<integer name="quick_settings_num_columns">[COLOR="Red"]3[/COLOR]</integer>
3 Is stock, change it for 4 or 5 if you want 4 tiles or 5 tiles columns.
3. Open SystemUI.apk/res/values/dimens.xml
3.1 Find out this line
Code:
<dimen name="notification_panel_header_height">[COLOR="red"]48.0dip[/COLOR]</dimen>
You must change the inside dimen value to 60.0dip
3.2 Find out this line
Code:
<dimen name="quick_settings_cell_height">[COLOR="red"]110.0dip[/COLOR]</dimen>
Change 110.0dip value to 100.0dip
4. Open decompiled SystemUI.apk/res/layout/styles.xml
Now, we have to change font size to adapt to our tiles columns, so find this line
Code:
<style name="TextAppearance.QuickSettings.TileView" parent="@style/TextAppearance.QuickSettings">
<item name="android:textSize">[COLOR="red"]12.0dip[/COLOR]</item>
Change 12.0dip to a small size like 9.0dip
That's all, Job done and now compile SystemUI.apk, if you don't know how to do all this, just flash my zip with 50% transparency and 4 Tiles columns [Tested on L7 CM 10.1 Beta 3]
i always got eror when decompiling cm10.1 it said java heap bla bla bla..any suggestions..?? i use apktool & apk manager with jdk7 and updated android sdk,,never been like this on cm10 or JB stock.
i always got eror when decompiling cm10.1 it said java heap bla bla bla..any suggestions..?? i use apktool & apk manager with jdk7 and updated android sdk,,never been like this on cm10 or JB stock.
Click to expand...
Click to collapse
Hi there, try to update Java SDK at the latest version, or try on another pc, maybe your windows is wrong with java...
blackcoffeez said:
i always got eror when decompiling cm10.1 it said java heap bla bla bla..any suggestions..?? i use apktool & apk manager with jdk7 and updated android sdk,,never been like this on cm10 or JB stock.
Click to expand...
Click to collapse
just download .jar files for android 4.2
Sent from my LG-P700 using xda premium
Tried the flashable zip on CM10.1 beta1 on my lg l7, it installed, i rebooted, and now its not going past the CM boot screen, not a bootloop tho, it just stays on the boot screen of cyanogenmod. For now, i reflashed CM10.1 and everything is working but i'd like to try this out.
So since beta 3 CM10.1 was released there were some changes, so i recommend update to BETA 3 to make this mod work in your device.
drdexter1989 said:
So since beta 3 CM10.1 was released there were some changes, so i recommend update to BETA 3 to make this mod work in your device.
Click to expand...
Click to collapse
Will try and report back. :good:
drdexter1989 said:
Hi there, try to update Java SDK at the latest version, or try on another pc, maybe your windows is wrong with java...
Click to expand...
Click to collapse
yesiamfrozen said:
just download .jar files for android 4.2
Sent from my LG-P700 using xda premium
Click to expand...
Click to collapse
its fine now..use apkmanager,,change java heap values..havent try to decompile jar file..
That's Good. If you can decompile apk files obiously it must have work with jar files.
drdexter1989 said:
That's Good. If you can decompile apk files obiously it must have work with jar files.
Click to expand...
Click to collapse
yes..ur mods works good
same way on cm10/JB to get transparent status bar :good:
blackcoffeez said:
yes..ur mods works good
same way on cm10/JB to get transparent status bar :good:
Click to expand...
Click to collapse
Nop, for CM 10 aren't same steps. Theres a change only one value in FastColorDrawable.smali, need to edit a smali file.
I have a modded UI for CM 10, if you want it maybe i'll upload it.
hello friends... thank you for thread..
is this also for l5?
if not, how can i install the status bar to my L5?
vuralemre said:
hello friends... thank you for thread..
is this also for l5?
if not, how can i install the status bar to my L5?
Click to expand...
Click to collapse
I'm not sure if it works on L5. I think it's works. If you try it don't forget always backup ur files.
Enviado desde mi LG-P700 usando Tapatalk 2
drdexter1989 said:
Nop, for CM 10 aren't same steps. Theres a change only one value in FastColorDrawable.smali, need to edit a smali file.
I have a modded UI for CM 10, if you want it maybe i'll upload it.
Click to expand...
Click to collapse
yes..cant wait to try it.. i'm also made some mods for L7 cyanogen base too..such as lockscreen,,tabbed setting with swipe..only havent post it on xda yet..
please post your mods!!
Sent from my LG-P700 using xda premium
Don't try to flash zip on new beta 4, cause bricks your phone :|
ubuntuh said:
please post your mods!!
Click to expand...
Click to collapse
i'll try... but there's some reason why i havent share it here.. check this thread
http://forum.xda-developers.com/showthread.php?t=2367670
as u see..more than 60 view..still got no comments same as my other mods..
drdexter1989 said:
Don't try to flash zip on new beta 4, cause bricks your phone :|
Click to expand...
Click to collapse
kind of strange..actually its still same system file.. it should be working on beta 4..
blackcoffeez said:
i'll try... but there's some reason why i havent share it here.. check this thread
http://forum.xda-developers.com/showthread.php?t=2367670
as u see..more than 60 view..still got no comments same as my other mods..
kind of strange..actually its still same system file.. it should be working on beta 4..
Click to expand...
Click to collapse
There's an UI System incopability
Enviado desde mi LG-P700 usando Tapatalk 2
hope that OP will make the update from the last build..
Why?
Sent from my LG-P700 using Tapatalk 2

[Tip] Activating Ink effect with fingers (4.3)

A. android.policy.jar file:
1. Copy the contents of “to android.policy.jar” folder.
2. Decompile android.policy.jar by backsmali/smali program.
3. Go to classout\com\android\internal\policy\impl\sec\ folder open CircleUnlockRippleRenderer.smali and search for "const/16 v1, 0x4002" and change this line.
search
Code:
const/16 v1, 0x4002
if-ne v0, v1, :cond_138
change
Code:
const/16 v1, 0x4002
if-ne v1, v1, :cond_138
Now recompile android.policy.jar and push them to your device.
Credits. majdinj
Sorry for my English
Great! Havent tried it yet, but it should work.. Any other way though? Like to flash via recovery? I have 4.3 leaked, stock, rooted, twrp, odexed
Sent from my GT-N7100 using XDA Premium 4 mobile app
Could you share the files.. TQ
here it is.
please help me.
sorry for bothering you with my newbies question.
i have problem,, i hope you can help me regarding to this thread.
first i used [4.3][MI6]DN3(Ditto Note 3) ROM from Electron Team(E-team)
in that ROM the ripple effect is basically mod like in this thread, what i want to do is to reverse it to the original note 2 which is the ink only out when using s-pen.
i already follow steps like you said on post#1
1. copy my android.policy.jar to my sd and move to my computer
2. decompile with backsmali/smali program
3. unlike you i go to classout\com\android\internal\policy\impl\keyguard\sec folder open CircleUnlockRippleRenderer.smali and search for "const/16 v1, 0x4002" and change
i change the value
Code:
const/16 v1, 0x4002
if-ne v1, v1, :cond_138
into the original
Code:
const/16 v1, 0x4002
if-ne v0, v1, :cond_138
4. Recompile android.policy.jar and copy to my sdcard.
5. move the android.policy.jar with rootbrowser to its original location and replace the original android.policy.jar
but i ended with many error when i push the android.policy.jar that i mod with steps like you said in post#1.
my error is non stop FC and non stop TW, NFC, and etc stopped working.
can you tell me where do i made mistake? please give me solution about this problem, thanks before.
Safe way to replace any files in framework folder is using cwm.zip
Sent from my GT-N7100 using XDA Premium 4 mobile app
ink effect for kitkat 4.4.2 with fingers.
please go here
Thanks.
Hit THANKS button, If I helped You.

Categories

Resources