[L7][CM10.1][GUIDE] Transparent Statusbar + 4 Tiles columns Quick Settings - Optimus L3, L5, L7 Android Development

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

Related

[Dev]Enabling CRT-off Animation on Neo Stock ICS roms

We all know that there is no CRT-off mod for the Neo /V. This is because only changing the value of config_animateScreenLights from true to false in framework-res.apk is not working anymore!
The problem is that are some missing commands in the /system/framework/services.jar
After comparing files from GB and ICS, i might have come up with a Method.
This will require some devs to continue on my work, as i don't have the proper tools to work on.
Hands-on:
This is what have to be done:
First of all decompile classes of services.jar (I won't provide any information to this, there are many tutorials out there how to use the smali tools!)
Then in com/android/server/PowerManagerService.smali we have to make the method nativeStartSurfaceFlingerAnimation(I)V callable from inner classes. To do that, we have to add the following after the last access$XXXX method:
Code:
.method static synthetic access$9000(Lcom/android/server/PowerManagerService;I)V
.registers 2
.parameter "x0"
.parameter "x1"
.prologue
.line 110
invoke-direct {p0, p1}, Lcom/android/server/PowerManagerService;->nativeStartSurfaceFlingerAnimation(I)V
return-void
.end method
Than we have to add some commands to the file com/android/server/PowerManagerService$BrightnessState.smali to trigger the CRT-off-effect. For that add the red part between :cond_38 and iget-object v4, p0, Lcom/a.... like this (its around line 400 in code):
Code:
.line 2679
.restart local v3 #turningOff:Z
:cond_38
[COLOR="red"]iget-object v4, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
const/16 v3, 0x11 # CRT-On and CRT-Off
#calls: Lcom/android/server/PowerManagerService;->nativeStartSurfaceFlingerAnimation(I)
invoke-static {v4, v3}, Lcom/android/server/PowerManagerService;->access$9000(Lcom/android/server/PowerManagerService;I)V[/COLOR]
iget-object v4, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
#getter for: Lcom/android/server/PowerManagerService;->mScreenBrightness:Lcom/android/server/PowerManagerService$BrightnessState;
invoke-static {v4}, Lcom/android/server/PowerManagerService;->access$6000(Lcom/android/server/PowerManagerService;)Lcom/android/server/PowerManagerService$BrightnessState;
move-result-object v4
Lastly, recompile the file, put it on your phone CRT-off effect will be magically displayed.
Lastly, i really seek the devs help to work on this and bring success to this work
Wow that will be great when we have this on ICS
Write in my mobile
TheF3nix said:
Lastly, recompile the file, put it on your phone CRT-off effect will be magically displayed.
Click to expand...
Click to collapse
what do u mean by magically displayed? u made it to work or its still a work in progress?
jjdoctor said:
what do u mean by magically displayed? u made it to work or its still a work in progress?
Click to expand...
Click to collapse
Work in Progress? Just follow my steps. I haven't try it out yet. Not sure whether it will work
Sent from my MT11i using Tapatalk 2
TheF3nix said:
Work in Progress? Just follow my steps. I haven't try it out yet. Not sure whether it will work
Sent from my MT11i using Tapatalk 2
Click to expand...
Click to collapse
we need modified surfaceflinger.so and sufaceflingerclient.so to get it to work...
jjdoctor said:
we need modified surfaceflinger.so and sufaceflingerclient.so to get it to work...
Click to expand...
Click to collapse
Is anyone working on this anymore?
This would be a great mod to have again
Really waiting to have that on my Ray... CM Based ROM have this effect... So nice.... As I decompile CM ROM, animatescreenlights is set to TRUE. What I saw new is the config_screenOffAnimations, that line on bool.xml and not present on Stock ROMS I think (some?).
What if you compare the surfaceflinger and surfaceflingerclient from cm9 and stock roms, they can't be that different right?, maybe thats the way to go, to get this to work.
The latest cm 9.1 stable has CRT enabled....
Surely someone can now port this to stock ICS!!!!!!!!!!!!!!!!!

[GUIDE] Remove "USB Connected" notification from JB ROMs

Since removing the extra "USB Connected" notification from my ROM, I've been getting a lot of questions about how to remove that notification so I thought I'd put the answer in one place. This is a simple mod (one once you know where to find it). As usual, this post assumes knowledge of decompiling and recompiling.
First, decompiled Settings.apk. Once decompiled, open com\android\settings\PSService.smali and find the SetUSBNotification method and do this:
Before:
Code:
.method public static SetUSBNotification(Landroid/content/Context;Z)V
.locals 12
.parameter "context"
.parameter "visible"
.prologue
const/4 v0, 0x1
After:
Code:
.method public static SetUSBNotification(Landroid/content/Context;Z)V
.locals 12
.parameter "context"
.parameter "visible"
.prologue
[COLOR="Red"]goto :goto_0[/COLOR]
const/4 v0, 0x1
Recompile and you're good to go. FYI, the other notification (the one where you get the selection for disk drive) is in a similar method in com\android\settings\SmartNSUtility.smali. You should leave that one alone though because that's the one that allows you to switch to disk drive mode.
Mike
Taking post 2 just in case.
Awesome thanks
Sent from my EVO using xda premium
your a beast mike!:good:
this guy is a frikkin genius
NICE!! Thanks Mike
nice, thx mike!
Mikey is at it again! Awesome. I'm excited that the LTE supports OTG.
Thanx for the info. By any chance you know how to remove the annoying data connect message that pops up when either wifi connects or when data disconnects.
Sent from my A500 using XDA Premium HD app
Nice. I've been fiddling around in the sysUI to get the old notification of usb back. Its a headach.
Sent from my EVO using xda app-developers app
Hey mikey. I think this edit wont work. the original code is changed in 3.16 base. instead of const/4 v0, 0x1, its const/4 v11, 0x0
PuRE IVIonztah said:
Hey mikey. I think this edit wont work. the original code is changed in 3.16 base. instead of const/4 v0, 0x1, its const/4 v11, 0x0
Click to expand...
Click to collapse
It'll still work, just put the 'goto :goto_0' abouve the 'const/4 v11, 0x0'
PuRE IVIonztah said:
Hey mikey. I think this edit wont work. the original code is changed in 3.16 base. instead of const/4 v0, 0x1, its const/4 v11, 0x0
Click to expand...
Click to collapse
Should still work: the goto jumps around all that anyway.
Mike
Sent from my EVO using xda premium
mikeyxda said:
Should still work: the goto jumps around all that anyway.
Mike
Sent from my EVO using xda premium
Click to expand...
Click to collapse
Vinchenzop said:
It'll still work, just put the 'goto :goto_0' abouve the 'const/4 v11, 0x0'
Click to expand...
Click to collapse
Thanks guys, I did try it anyway and i get errors thrown at me in vts when recompiling.
PuRE IVIonztah said:
Thanks guys, I did try it anyway and i get errors thrown at me in vts when recompiling.
Click to expand...
Click to collapse
I'm getting an error too....
Code:
C:\Android\baksmali1.4.1>java -Xmx1024M -jar smali.jar smali/ -o classes.dex
smali\com\android\settings\PSService.smali[2939,7] Label "goto_0" is not defined
.
smali\com\android\settings\PSService.smali[2940,4] The address offset cannot be
0. Use goto/32 instead.
PuRE IVIonztah said:
Thanks guys, I did try it anyway and i get errors thrown at me in vts when recompiling.
Click to expand...
Click to collapse
O.M.J said:
I'm getting an error too....
Code:
C:\Android\baksmali1.4.1>java -Xmx1024M -jar smali.jar smali/ -o classes.dex
smali\com\android\settings\PSService.smali[2939,7] Label "goto_0" is not defined
.
smali\com\android\settings\PSService.smali[2940,4] The address offset cannot be
0. Use goto/32 instead.
Click to expand...
Click to collapse
Worked fine for me...
Here is the modded Settings.apk from the latest base with this mod. It removes the 'USB connected' as described in the first post.
http://d-h.st/3Sg
Vinchenzop said:
Here is the modded Settings.apk from the latest base with this mod. It removes the 'USB connected' as described in the first post.
http://d-h.st/3Sg
Click to expand...
Click to collapse
Thanks a lot Vin!
Sent from my EVO using Xparent Purple Tapatalk 2
I've been trying to add this mod to the new 3.17 base and I'm getting the afore mentioned error:
Code:
C:\Android\baksmali1.4.1>java -Xmx1024M -jar smali.jar smali/ -o classes.dex
smali\com\android\settings\PSService.smali[2939,7] Label "goto_0" is not defined
.
smali\com\android\settings\PSService.smali[2940,4] The address offset cannot be
0. Use goto/32 instead.
I realize I could probably just use the same Settings.apk or the same PSService.smali, from 3.16, but there are some differences in the code and I want to keep the 3.17 update files as they are if possible.
Did anyone ever figure out how to avoid/fix this error?
sharkie405 said:
I've been trying to add this mod to the new 3.17 base and I'm getting the afore mentioned error:
Code:
C:\Android\baksmali1.4.1>java -Xmx1024M -jar smali.jar smali/ -o classes.dex
smali\com\android\settings\PSService.smali[2939,7] Label "goto_0" is not defined
.
smali\com\android\settings\PSService.smali[2940,4] The address offset cannot be
0. Use goto/32 instead.
I realize I could probably just use the same Settings.apk or the same PSService.smali, from 3.16, but there are some differences in the code and I want to keep the 3.17 update files as they are if possible.
Did anyone ever figure out how to avoid/fix this error?
Click to expand...
Click to collapse
That's the error I was getting before. Tey kdiffing the files
Sent from my EVO using Tapatalk 4

[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!

[MOD][COMPLETE GUIDE][NOOB-FRIENDLY] CM10 Transparent Statusbar and other mod

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.

[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