Related
Hi all, hope this is the right forum.
This thread is meant for ROM cooks only!
Let's start: I found a way to decrease the home button lag and would like to share this fix with you.
Some theory first:
The way from home button click to the home screen can be separated in two parts:
System will wait about 0.5s for another tap. This is due to the double click to voice-search feature, Samsung implemented. You won't find this lag on any other phone.
The good news is, that we can avoid it with some changes in framework.
The second part is the time the launcher needs to load. It's about 0.3 - 0.5 sec, depending on which app is currently running.
Now to the fix:
You have to decompile android.policy.jar (framework folder) using baksmali.
Open com\android\internal\policy\impl\PhoneWindowManager.smali and search for lines 3896 to 3922. They should look like this:
Code:
const/4 v4, 0x3
move/from16 v0, p4
move v1, v4
if-ne v0, v1, :cond_1
.line 1279
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHomeKeyDoubleClickConcept:Lcom/android/internal/policy/impl/PhoneWindowManager$HomeKeyDoubleClickConcept;
move-object v4, v0
move-object v0, v4
move/from16 v1, p2
move/from16 v2, p7
move v3, v13
invoke-virtual {v0, v1, v2, v3}, Lcom/android/internal/policy/impl/PhoneWindowManager$HomeKeyDoubleClickConcept;->addAction(IIZ)V
.line 1288
:cond_1
Delete all of these lines.
Now go a few lines deeper to lines 3920 - 3922. They should be
Code:
invoke-virtual {v4, v5}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
.line 1294
Replace these two lines with:
Code:
invoke-virtual {v4, v5}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
[COLOR="SeaGreen"] move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHomePressed:Z
move v4, v0
[COLOR="Red"] if-eqz v4, :cond_2[/COLOR]
invoke-virtual/range {p0 .. p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->launchHomeFromHotKey()V[/COLOR]
.line 1294
(Note that the first and last line are the original ones.)
Warning: take a look at line 3933. If it is not ":cond_2", you have to replace the cond_2 in "if-eqz v4, :cond_2" with the cond from line 3933.
It looks like the naming sceme depends on the baksmali version you're using.
Now recompile with smali and you're done
Some notes:
The device will no longer wait for double clicks of home key. This means, that the voice-search obviously can no longer be started with a double-tap on home key.
You will still notice some lag on home key. That's the time the home launcher needs to load. Try it from within the launcher (for example in the app chooser) and it will react instant. It should now be comparable to any other phone.
The given line-numbers are from a KH3 ROM. The numbers may change in future roms.
I would call this fix "experimental". I tested it for a few days without any issues, but I can't guarantee that it is bug free.
The problem is, that Samsung made the single click listener depend on the double click listener, so removing the double-click listener might cause some problems.
That's it. I hope, I could help you
Very nicely done! This will be in the next Cognition release!
Great news... Thanks for the idea
Anyone wanna compile this into an update.zip for the lazy? :-D
designgears said:
Very nicely done! This will be in the next Cognition release!
Click to expand...
Click to collapse
woooo hoooo
cheers
DG
Working great!
Many thanks mate!
Thanks so much for this fix !
Excellent tweak OP, thank you!
I had a problem with this line:
Code:
if-eqz v4, :cond_2
smali complained about it during recompilation of Batista framework.
Just change it to next cond_[something] you find just after the part you inserted.
The Devs/Cooks are going to LOVE you! The flac they've copped recently from thus 'bug'/feature has been enoumous!
Sent from my GT-I9100 using XDA Premium App
Will this produce the same effect as removing voice command or will it make it faster than that?
Thanks!
Thank you very much!! Marvelous!
I'll include it in my next rom thx!
Inviato dal mio GT-I9100 usando Tapatalk
xan said:
I had a problem with this line:
Code:
if-eqz v4, :cond_2
smali complained about it during recompilation of Batista framework.
Just change it to next cond_[something] you find just after the part you inserted.
Click to expand...
Click to collapse
I was having the same issue. Thanks for that. I also didn't realize that the .smali had to be closed when recompiling LOL
Just pushed it to the frameworks folder. Rebooting and trying!
Yay, stuck at boot screen lol. I'll be honest, I don't know much about this stuff so I probably screwed something up...
This was my procedure:
1) Copied /framework to my computer
2) Downloaded baksmali/smali from the Google code page
3) In command prompt, did the following:
java -jar baksmali-1.2.7.jar -c core.jar:bouncycastle.jar:ext.jar:framework.jar:android.policy.jar:services.jar:core-junit.jar -x android.policy.odex
Click to expand...
Click to collapse
4) Opened the file using word, deleted the lines (even though my :cond_1 was :cond_42 I think)
5) Replaced the other section and used :cond_57 as you suggested
6) Did the following in command prompt:
java -jar smali-1.2.7.jar out -o android.policy.odex
Click to expand...
Click to collapse
7) Copied the new android.policy.odex to my framework folder and changed the permissions to all read/owner write
8) Rebooted
Where did I go wrong? I did this while running the Frakenstein'd KH3 ROM. Is this only for DEODEXED ROMs?
Awesome. Just mod mine, works great.
As mentioned earlier is there any possibility to a CWM zip
you are a hero! will send youna beer in a few hours, you don't know how happy I am right now
Sent from my GT-I9100 using XDA Premium App
Will be in my next rom release thanks man
Kudos to you man, this is amazing.. Will make a lot happy.
advance users must help newbies, please provide cwm zip file
Sent from my GT-I9100 using XDA Premium App
Can someone figure out where I went wrong in my above procedure?
Thanks!
Here is manual, how to make CRT-OFF mod without glitches on JB.
Originally, it has been released in my UNIROM ROM in 4PDA.ru community.
Here is the guide. Instruction is based on I9300XXDLIB, but it's easy to adjust it to other ROMS.
To make CRT-OFF working, you need to decompile services.jar.
in file com\android\server\PowerManagerService$ScreenBrightnessAnimator.smali
find following code and modify it according to red colored part:
Code:
.line 2906
.end local v0 #delta:I
:cond_1
:goto_1
iget-object v7, p0, Lcom/android/server/PowerManagerService$ScreenBrightnessAnimator;->this$0:Lcom/android/server/PowerManagerService;
#getter for: Lcom/android/server/PowerManagerService;->mScreenBrightnessHandler:Landroid/os/Handler;
invoke-static {v7}, Lcom/android/server/PowerManagerService;->access$7300(Lcom/android/server/PowerManagerService;)Landroid/os/Handler;
move-result-object v7
[COLOR=Red] if-eqz p2, :cond_2xx
const/16 v9, 0xb
const/4 v10, 0x0
const v2, 0x10
invoke-virtual {v7, v9, v2, v10}, Landroid/os/Handler;->obtainMessage(III)Landroid/os/Message;
move-result-object v9
invoke-virtual {v9}, Landroid/os/Message;->sendToTarget()V
:cond_2xx
[/COLOR] const/16 v9, 0xa
invoke-virtual {v7, v9}, Landroid/os/Handler;->removeMessages(I)V
Black color is original code, you need to find.
Effect will start to work, but u will notice glitch: if you turn on screen by power button and then put it to sleep again by button without unlocking then phone will wake up just after CRT effect finishes.
Here is workaround part.
decompile android.policy.jar.
in file com\android\internal\policy\impl\PhoneWindowManager.smali
Find following parts (black is original code) and modify according to red text:
Code:
.class public Lcom/android/internal/policy/impl/PhoneWindowManager;
.super Ljava/lang/Object;
.source "PhoneWindowManager.java"
# interfaces
.implements Landroid/view/WindowManagerPolicy;
[COLOR=Red].implements Ljava/lang/Runnable;[/COLOR]
# annotations
Code:
.line 5411
.end local v9 #isAllowed:Z
.end local v16 #kioskMode:Landroid/app/enterprise/kioskmode/KioskMode;
:cond_1
:goto_2
[COLOR=Red] and-int/lit8 v0, v19, 0x4
if-eqz v0, :cond_2xx
and-int/lit8 v19, v19, -0x5
move-object/from16 v0, p0
invoke-virtual {v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->sleepDelay()V
:cond_2xx
[/COLOR] return v19
at the end of file add following code:
Code:
[COLOR=Red].method public sleepDelay()V
.locals 10
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
const-wide v2, 0x64
check-cast p0, Ljava/lang/Runnable;
invoke-virtual {v0, p0, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
return-void
.end method
.method public run()V
.locals 10
.prologue
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const-string v1, "power"
invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/os/PowerManager;
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v2
const-wide/16 v6, 0x3e8
add-long/2addr v2, v6
invoke-virtual {v0, v2, v3}, Landroid/os/PowerManager;->goToSleep(J)V
return-void
.end method
[/COLOR]
That's all.
My method doesn't require patches for libsurfaceflinger.so library.
P.S.: I didn't put much effort to investigate of possibility for CRT-ON effect. I'm not sure if this effect is even compiled inside stock libsurfaceflinger.so. I'm happy that i could achieve fully working CRT-OFF without patching library. I remember how much time i've spent to patch libsurfaceflinger.so for I9100 ICS ROM against flicker, so it's real deal breaker for me to go through reversing and patching of .so file again.
I've attached mod for XXDLIB version.
Install in CWM recovery to DEODEXED ROM.
This is for stock deodexed I9300XXDLIB ROM. If you use any custom made ROM and there are some additional modifications in android.policy.jar or services.jar then you will loose all those mods.
I have neither time no ability to make flashable zips for other ROMs. I cannot download every ROM, integrate this mod and test. So, ask custom ROMs authors to integrate it into their ROMs by themself.
you may post the whole thing, already ready to be flashed? you'll be very grateful
I can post mod for XXDLIB version, but if you have other mods integrated in these framework files, you will loose them.
sorg said:
I can post mod for XXDLIB version, but if you have other mods integrated in these framework files, you will loose them.
Click to expand...
Click to collapse
would be good for me, I use the WanamLite XXDLIB V3.8.
How did you decompile services.jar? I'd be happy with a link too, but I'd also like to know how to decompile jars
Kryten2k35 said:
How did you decompile services.jar? I'd be happy with a link too, but I'd also like to know how to decompile jars
Click to expand...
Click to collapse
It's for experienced in modifications users. If you don't know how to do it, then you won't make it right. So, wait for ready to flash mod, made by some one.
I've attached mod for XXDLIB version to the OP.
sorg said:
It's for experienced in modifications users. If you don't know how to do it, then you won't make it right. So, wait for ready to flash mod, made by some one.
I've attached mod for XXDLIB version to the OP.
Click to expand...
Click to collapse
Anybody try?? Work without this issue??
Works perfect on Wanam 3.7!
please is possible have this for odex stock rom dlib?? thanks for reply
sorg said:
I've attached mod for XXDLIB version to the OP.
Click to expand...
Click to collapse
work perfect..always on Wanam 3.7..thank you :good:
Just put this into my rom...works perfect, thanks for the guide
Sorgen, dass could you please provide a zip version in first post with included 4-way-reboot? Just recognized that it's gone with your mod because of the changed files.
Thanks m8!
sent with Samsungs unleashed beast using Tapatalk 2
hi Sorg, sorry for double request, is possible have this for odex rom DILB root? thanks for reply
sorg said:
It's for experienced in modifications users. If you don't know how to do it, then you won't make it right. So, wait for ready to flash mod, made by some one.
I've attached mod for XXDLIB version to the OP.
Click to expand...
Click to collapse
I know what I'm doing, I just haven't found any reliable tools to decompile jar's
Kryten2k35 said:
I know what I'm doing, I just haven't found any reliable tools to decompile jar's
Click to expand...
Click to collapse
a) you can rename jar to apk and use your favorite tool
b) apktool works fine with jars as well
c) use baksmali/smali tools
sorg said:
a) you can rename jar to apk and use your favorite tool
b) apktool works fine with jars as well
c) use baksmali/smali tools
Click to expand...
Click to collapse
Thanks. Last source I read suggested AndroidChef, which didn't work at all. I'll use apktool first and see how that goes.
uberto.costanzo said:
hi Sorg, sorry for double request, is possible have this for odex rom DILB root? thanks for reply
Click to expand...
Click to collapse
i can upload mods for ROMs i'm using. I'm using deodexed ROM. Since i often change something in ROM, deodexed version is the one suitable for me.
If you like to use mods, install stock deodexed ROM and you will have more freedom to install many different mods and hacks.
Here we go. CRT + Extended Pwer Menu.
Thanks Sorg, including this in my ROM
Kryten2k35 said:
Here we go. CRT + Extended Pwer Menu.
Thanks Sorg, including this in my ROM
Click to expand...
Click to collapse
Man, 10 mins faster than me
Great work as always!
sorg said:
It's for experienced in modifications users. If you don't know how to do it, then you won't make it right. So, wait for ready to flash mod, made by some one.
I've attached mod for XXDLIB version to the OP.
Click to expand...
Click to collapse
=-O Kryten is a matter chef
---------- Post added at 11:28 PM ---------- Previous post was at 11:26 PM ----------
Kryten2k35 said:
Here we go. CRT + Extended Pwer Menu.
Thanks Sorg, including this in my ROM
Click to expand...
Click to collapse
Just flash from recovery for Ultima 2.4?
This guide was written based on the Sprint Samsung Galaxy S3 ND8 KitKat stock ROM but with the proper modifications may work for other KitKat ROMs. Please don't ask me to modify this to work with ROM xyz or to compile this for you into a ROM. I won't do it.
Background Info
This guide is based on work orignally written by havocgb here. His code was written for the Sony Xperia Mini and had to be somewhat modified for use on our phones so make sure to drop a thank you over in that thread.
Requirements
apktool 2.0 beta 9 and the knowledge of how to use it. There are various guides on how to use apktool on XDA. Find one and read it. Make sure to read the information on the apktool site as well since some of the options in 2.0 may be different from the guides you find.
A text editor that supports Unix-style text files. I recommend Notepad++.
Files
You'll be working with SystemUI.apk
SystemUI.apk
Decompile SystemUI.apk using apktool.
Open smali\com\android\systemui\statusbar\phone\PhoneStatusBar.smali in your preferred text editor.
Find # instance fields and add .field private mTouchRight:Z on a new line somewhere before # direct methods.
Find # virtual methods and add the following methods ABOVE it:
Code:
.method private interceptOneFingerStatusBarRightTap(Landroid/view/MotionEvent;)V
.locals 4
.param p1, "event" # Landroid/view/MotionEvent;
.prologue
iget-boolean v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedVisible:Z
if-nez v1, :cond_1
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDisplay:Landroid/view/Display;
invoke-virtual {v0}, Landroid/view/Display;->getRotation()I
move-result v1
const v0, 0x1
if-eq v0, v1, :cond_2
const v0, 0x3
if-eq v0, v1, :cond_2
const/high16 v1, 0x44070000
:goto_0
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
move-result v0
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_1
:cond_0
const/4 v1, 0x0
iput-boolean v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTouchRight:Z
:cond_1
:goto_1
return-void
:cond_2
const/high16 v1, 0x44480000
goto :goto_0
.end method
.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-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->flipToSettings()V
:goto_0
return-void
:cond_0
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->flipToNotifications()V
goto :goto_0
.end method
Take note that the line const/high16 v1, 0x44070000 is a floating-point hexadecimal value that controls the starting point of the quick pulldown zone in pixels when in portrait orientation (in this case, the start point is set at approximately 540 pixels from the left side of the status bar) while the line const/high16 v1, 0x44480000 controls the start point of the pulldown zone when in landscape orientation (this value is approximately 800 pixels from the left side of the status bar). For larger screens or to change the size of the drag zone, you'll want to re-calculate these using a floating-point to hexadecimal conversion.
Locate the portion of code that looks like the following:
Code:
.method public flipToNotifications()V
.locals 10
.prologue
const/high16 v9, 0x3f800000
const/4 v8, 0x0
const-wide/16 v6, 0xc8
const/4 v5, 0x1
const/4 v4, 0x0
On a new line under const/4 v4, 0x0, add iput-boolean v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTouchRight:Z
Locate the portion of code that looks like the following:
Code:
.method public flipToSettings()V
.locals 11
.prologue
const-wide/16 v9, 0x15e
const/4 v8, 0x4
const/4 v7, 0x1
const/4 v6, 0x0
const/4 v5, 0x0
On a new line under const/4 v5, 0x0, add iput-boolean v7, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTouchRight:Z
Locate the section of code that looks like the following:
Code:
.method public interceptTouchEvent(Landroid/view/MotionEvent;)Z
.locals 5
.param p1, "event" # Landroid/view/MotionEvent;
.prologue
const/4 v1, 0x0
const/4 v2, 0x1
.line 2973
iget v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindowState:I
if-nez v3, :cond_1
.line 2974
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
On a newline above ABOVE the line invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I, add invoke-direct {p0, p1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->interceptOneFingerStatusBarRightTap(Landroid/view/MotionEventV
Locate the method .method public updateExpandedViewPos(I)V and locate the line return-void inside of the method. On a new line above return-void, add invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->oneFingerStatusBarRightTapFlipToQuickPanel()V.
Save the file and recompile SystemUI using apktool. Don't forget to re-sign the APK (either use an APK signer if you have a ROM that has 3rd-party system app signatures enabled or copy the AndroidManifest.xml file and META-INF folder from the original to the new APK).
Install to your phone using your preferred method. You should already know this but I'll say it anyway, THIS CANNOT BE INSTALLED LIKE NORMAL SIDE-LOADED APKs. I prefer to reboot to recovery and use ADB to push the file to the system, but you can use whatever method is easiest for you (ie. Aroma file manager, flashable zip, etc.).
Thanks for this. I plan on adding this to Tribute in the near future.
I need help please. I'm having error " [5048,15] no viable alternative at input 'p1' " whenever I compile SystemUI.apk. I'm trying to apply this mod on my N8000. Thanks in advance!
filchi756 said:
I need help please. I'm having error " [5048,15] no viable alternative at input 'p1' " whenever I compile SystemUI.apk. I'm trying to apply this mod on my N8000. Thanks in advance!
Click to expand...
Click to collapse
Try using apktool 2.
Thank you for releasing this guide. Looking forward to adding this to my rom.
talkingmonkeys said:
Try using apktool 2.
Thank you for releasing this guide. Looking forward to adding this to my rom.
Click to expand...
Click to collapse
Ok thanks for the suggestion. I will try that.
Need help please .I manage to solve my problem about compiling but when I install it I'm having systemUI stop(foreclose) message. If you have time if possible please help me check my Phonestatusbar.smali ,in what part did I do wrong I've attach my PhoneStatusBar.smali below. Hope you can help me.Thanks in advance.
filchi756 said:
Need help please .I manage to solve my problem about compiling but when I install it I'm having systemUI stop(foreclose) message. If you have time if possible please help me check my Phonestatusbar.smali ,in what part did I do wrong I've attach my PhoneStatusBar.smali below. Hope you can help me.Thanks in advance.
Click to expand...
Click to collapse
Would need to see a logcat. If you don't know how to pull one and post it here, however, I'd say you're not ready to start implementing mods.
moonknightus said:
Would need to see a logcat. If you don't know how to pull one and post it here, however, I'd say you're not ready to start implementing mods.
Click to expand...
Click to collapse
Ok I will post a logcat when I have access to pc. Yeah I think I'm not ready yet for this kind of mods.But I have some little experience in implementing mods in Jellybean before though(by following others guide too), but having a hardtime with kitkat at the moment. By the way any chance you can share me your phonestatusbar.smali or even the SystemUI.apk with you mod included so I can compare it with mine? I think it not necessary to download the whole rom if I just need one apk and beside I don't have S3. And I have a crappy internet connection. Hope you understand.Thanks!
filchi756 said:
Ok I will post a logcat when I have access to pc. Yeah I think I'm not ready yet for this kind of mods.I have some experience in implementing mods in Jellybean before though(by following others guide too), but having a hardtime with kitkatat the moment. By the way any chance you can share me your phonestatusbar.smali or even the SystemUI.apk with you mod included so I can compare it with mine? I think it not necessary to download the whole rom if I just need one apk and beside I don't have S3. And I have a crappy internet connection. Hope you understand.Thanks!
Click to expand...
Click to collapse
Nope. My ROM has multiple mods so the smali and apk will not help you. Not to mention, my phone is a Galaxy S3.
moonknightus said:
Nope. My ROM has multiple mods so the smali and apk will not help you. Not to mention, my phone is a Galaxy S3.
Click to expand...
Click to collapse
Ok thanks.I'll wait for someone's else help, who implemented this mod of your's and with clear instruction I'm capable of understanding(like the guide of havocgb, it has before and after).Your mod is just new that's means just few people implemented it yet in their rom at the moment.When time come's there will surely be someone out there who will write a clear guide which we amateur's will understand. Thanks again for this guide anyway. Cheers mate!
P.S. I think even we have different gadget as long as they are the same brand(like Samsung) .I think there are a lot of similarities on their content. I successfully made mods for my tablet using guides from Note 2014 and Note pro before by the way .
filchi756 said:
Ok thanks.I'll wait for someone's else help, who implemented this mod of your's and with clear instruction I'm capable of understanding.Your mod is just new that's means just few people implemented it yet in their rom at the moment.When time come's there will surely be someone out there who will write a clear guide which we amateur's will understand. Thanks again for this guide anyway. Cheers mate!
P.S. I think even we have different gadget as long as they are the same brand(like Samsung) .I think there are a lot of similarities on their content. I successfully made mods for my tablet using guides from Note 2014 and Note pro before by the way .
Click to expand...
Click to collapse
There's nothing new about this mod. Was originally written for an Xperia phone by havocgb in March 2013. This is clearly stated in the op. If you are incapable of following instructions, modifying the code to fit your device, and debugging your own code, that is not my fault. FYI, others have already successfully implemented this mod. At least one was on a note device.
moonknightus said:
There's nothing new about this mod. Was originally written for an Xperia phone by havocgb in March 2013. This is clearly stated in the op. If you are incapable of following instructions, modifying the code to fit your device, and debugging your own code, that is not my fault. FYI, others have already successfully implemented this mod. At least one was on a note device.
Click to expand...
Click to collapse
Ok. I'll look for that who implemented it on note(If I get lucky).I'm just looking for a quick solution for this cause I really want to implement this to my gadgets. Thankfully you did not suggest "google is your friend" thing to find solution for your problem.I can't access google, its block in my location(China).Thanks again for the guide.Anyway Cool! peace mate!
filchi756 said:
Ok. I'll look for that who implemented it on note(If I get lucky).I'm just looking for a quick solution for this cause I really want to implement this to my gadgets. Thankfully you did not suggest "google is your friend" thing to find solution for your problem.I can't access google, its block in my location(China).Thanks again for the guide.Anyway Cool! peace mate!
Click to expand...
Click to collapse
There's always Baidu. If I run across the PM, I'll shoot the guy's name over to you. I may have deleted it
moonknightus said:
There's always Baidu. If I run across the PM, I'll shoot the guy's name over to you. I may have deleted it
Click to expand...
Click to collapse
Ok thanks mate .That will be great:good:! If I use baidu in China the results are only from China and in chinese(I don't understand Chinese). I tried it before in Hongkong the results are international and in English.Hope you understand what I meant mate.
P.S. I'm trying your other mod here: http://forum.xda-developers.com/gal...t/mod-enable-heads-notifications-nd8-t2873109 .Lets see if I can implement it successfully:fingers-crossed:.
bro. screenshots show the work of this tutorial..
Sorry for my bad english
please upload the screenshot
Hai XDA. I just want share little guide and very simple
How to full lockscreen/ hide statusbar on lockscreen,
Lets go to guide
Requirement
Apktool
Notepad
android.policy.jar
Decompile your android.policy.jar
Go to : smali\com\android\internal\policy\impl\KeyguardViewManager.smali
find .method public declared-synchronized show()V
and scrool down, find line similiar like this
Code:
const/4 v5, 0x0
invoke-direct {v1, v2, v3, v5}, Lcom/android/internal/policy/impl/KeyguardViewManager$KeyguardViewHost;-><init>(Landroid/content/Context;Lcom/android/internal/policy/impl/KeyguardViewCallback;Lcom/android/internal/policy/impl/KeyguardViewManager$1;)V
iput-object v1, p0, Lcom/android/internal/policy/impl/KeyguardViewManager;->mKeyguardHost:Landroid/widget/FrameLayout;
.line 119
const/4 v9, -0x1
.line 120
.local v9, stretch:I
const v4, [COLOR="Red"]0x100800[/COLOR]
.line 125
.local v4, flags:I
iget-boolean v1, p0, Lcom/android/internal/policy/impl/KeyguardViewManager;->mNeedsInput:Z
if-nez v1, :cond_2
.line 126
const/high16 v1, 0x2
or-int/2addr v4, v1
see the code I marked in red : 0x100800 and change it to 0x10000504
Save, recompile your android.policy.jar and DONE!!
Happy Modding :highfive:
full lockscreen
you can be edited to me full lockscreen which is not hide statebar
Thanks for the guide its work for me.
kulphat said:
you can be edited to me full lockscreen which is not hide statebar
Click to expand...
Click to collapse
what do you mean full lockscreen which is not hide statebar?
amadeuszxd said:
Thanks for the guide its work for me.
Click to expand...
Click to collapse
You'r welcome
I lock the screen while listening to music with headphones , the music I was lag
I often listen to music and it makes me feel very uncomfortable ... you can not fix it
nice guide mastah
syaeful said:
Hai XDA. I just want share little guide and very simple
How to full lockscreen/ hide statusbar on lockscreen,
Lets go to guide
Requirement
Apktool
Notepad
android.policy.jar
Decompile your android.policy.jar
Go to : smali\com\android\internal\policy\impl\KeyguardViewManager.smali
find .method public declared-synchronized show()V
and scrool down, find line similiar like this
Code:
const/4 v5, 0x0
invoke-direct {v1, v2, v3, v5}, Lcom/android/internal/policy/impl/KeyguardViewManager$KeyguardViewHost;-><init>(Landroid/content/Context;Lcom/android/internal/policy/impl/KeyguardViewCallback;Lcom/android/internal/policy/impl/KeyguardViewManager$1;)V
iput-object v1, p0, Lcom/android/internal/policy/impl/KeyguardViewManager;->mKeyguardHost:Landroid/widget/FrameLayout;
.line 119
const/4 v9, -0x1
.line 120
.local v9, stretch:I
const v4, [COLOR="Red"]0x100800[/COLOR]
.line 125
.local v4, flags:I
iget-boolean v1, p0, Lcom/android/internal/policy/impl/KeyguardViewManager;->mNeedsInput:Z
if-nez v1, :cond_2
.line 126
const/high16 v1, 0x2
or-int/2addr v4, v1
see the code I marked in red : 0x100800 and change it to 0x10000504
Save, recompile your android.policy.jar and DONE!!
Happy Modding :highfive:
Click to expand...
Click to collapse
nice guide can you make a guide for4.0+ How to create lollipop lockscreen.??:good:
veneetsingh said:
nice guide can you make a guide for4.0+ How to create lollipop lockscreen.??:good:
Click to expand...
Click to collapse
Thanks sir. Maybe not diferent too much with this tut. Just find similiar line.
syaeful said:
Thanks sir. Maybe not diferent too much with this tut. Just find similiar line.
Click to expand...
Click to collapse
i know it is Easy but I am creating lollipop rom for my device and i need help All is done but need only lollipop lockscreen..?
can you help me.?:victory:
thanx sir, nice guide and work great to me :good:
Doctor Be said:
thanx sir, nice guide and work great to me :good:
Click to expand...
Click to collapse
You're welcome
veneetsingh said:
i know it is Easy but I am creating lollipop rom for my device and i need help All is done but need only lollipop lockscreen..?
can you help me.?:victory:
Click to expand...
Click to collapse
Sorry sir... i can't port it
maybe you can use this application,, or port
https://play.google.com/store/apps/details?id=com.hi.locker&hl=en
Nice Guide Dude!
Keep it up :thumbup:
SuperMan(Alex) said:
Nice Guide Dude!
Keep it up :thumbup:
Click to expand...
Click to collapse
Thanks :highfive:
inquiry
syaeful said:
Hai XDA. I just want share little guide and very simple
How to full lockscreen/ hide statusbar on lockscreen,
Lets go to guide
Requirement
Apktool
Notepad
android.policy.jar
Decompile your android.policy.jar
Go to : smali\com\android\internal\policy\impl\KeyguardViewManager.smali
find .method public declared-synchronized show()V
and scrool down, find line similiar like this
Code:
const/4 v5, 0x0
invoke-direct {v1, v2, v3, v5}, Lcom/android/internal/policy/impl/KeyguardViewManager$KeyguardViewHost;-><init>(Landroid/content/Context;Lcom/android/internal/policy/impl/KeyguardViewCallback;Lcom/android/internal/policy/impl/KeyguardViewManager$1;)V
iput-object v1, p0, Lcom/android/internal/policy/impl/KeyguardViewManager;->mKeyguardHost:Landroid/widget/FrameLayout;
.line 119
const/4 v9, -0x1
.line 120
.local v9, stretch:I
const v4, [COLOR="Red"]0x100800[/COLOR]
.line 125
.local v4, flags:I
iget-boolean v1, p0, Lcom/android/internal/policy/impl/KeyguardViewManager;->mNeedsInput:Z
if-nez v1, :cond_2
.line 126
const/high16 v1, 0x2
or-int/2addr v4, v1
see the code I marked in red : 0x100800 and change it to 0x10000504
Save, recompile your android.policy.jar and DONE!!
Happy Modding :highfive:
Click to expand...
Click to collapse
will this work on kitkat firmware?
boszjhiee22 said:
will this work on kitkat firmware?
Click to expand...
Click to collapse
not tested sir... maybe different
apktool
I would like to do it but i dont know how to install apktool i did step by step, but i dont kn0ow how to write the code in cmd
Is this guide for JB?
It works!
Thank you so much. Cheers
how to hide status bar in lollipop 5.1.1 lockscreen
Dear friend,
can u help me to edit android policy.jar to remove the status bar in lock screen?
thanks in advance
Hello guys
After very long day
my second tut in this new year
So here i gonna provide a tut on Hide/Show 3 Dot Menu ( which is hidden in navigation Bar )
All you need is
Deodexed Settings.apk and SystemUI.apk
1. Decompile SystemUI.apk
2. Navigate to SystemUI.apk/smali/com/android/systemui/statusbar/phone
3. Open NavigationBarView.smali and look for this method
Code:
.method public setMenuVisibility(ZZ)V
and replace the complete method with this below
Code:
.method public setMenuVisibility(ZZ)V
.locals 3
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getContext()Landroid/content/Context;
move-result-object v0
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "dot_menu_show"
const/4 v2, 0x0
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-eqz v0, :cond_0
const/4 p1, 0x1
:cond_0
const/4 v1, 0x0
if-nez p2, :cond_1
iget-boolean v2, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mShowMenu:Z
if-ne v2, p1, :cond_1
:goto_0
return-void
:cond_1
iput-boolean p1, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mShowMenu:Z
iget-boolean v2, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mShowMenu:Z
if-eqz v2, :cond_2
iget v2, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mNavigationIconHints:I
and-int/lit8 v2, v2, 0x2
if-nez v2, :cond_2
const/4 v0, 0x1
:goto_1
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getMenuButton()Landroid/view/View;
move-result-object v2
if-eqz v0, :cond_3
:goto_2
invoke-virtual {v2, v1}, Landroid/view/View;->setVisibility(I)V
goto :goto_0
:cond_2
move v0, v1
goto :goto_1
:cond_3
const/4 v1, 0x4
goto :goto_2
.end method
4. Now save and close
5. Compile it and sign it and replace
Time to Work on with settings
Look for post #2
Settings
Welcome to easy part on adding the option to hide/show in settings
1. Decompile the Settings.apk
2. Download this View attachment 3606027 and merge to your settings
3. Add the below code to your settings ( i had added to my own settings.xml )
you can add in settings.apk/res/xml/Dispaly_settings.xml
Code:
<com.android.settings.cyanogenmod.SystemSettingSwitchPreference android:title="3Dot Menu" android:key="dot_menu_show" android:defaultValue="0" android:summaryOn="Shown" android:summaryOff="Hidden" />
and then compile/sign and replace your settings
OR
Try download this ROM Control application (View attachment 3616872 ) where you can Easily control
All you is just install and have fun
Thanks to @daxgirl for the app source
now have fun guys
Dont Forget to mention me if you used my work
that feels me happy
Works fine bro thanks so much the only bug for me it's that the switch still be unable after that I enable and return to the screen settings anyway the dots works fine
Great tutorial bro.. Keep up the good work..
venkat kamesh said:
...
Click to expand...
Click to collapse
You can also do this on a single app level if for example an app shows the legacy 3 dots menu but with no actual use for it when running on Android 3.0+
All you have to do is in the app manifest under sdkInfo set targetSdkVersion to 14 and minSdkVersion to a minimum of 11 and the button will be gone
adding a function in the button?
Uoouuu I just found out. thank you:good:
Thank bro
Thanks!!!!Could you teach me how to make the menu button always show by default?
I can confirm this tut works on Marshmallow
Bloodlvst said:
I can confirm this tut works on Marshmallow as long as you do a SystemUI restart
Click to expand...
Click to collapse
bro it works without restart ui
just click back (after enable) and tada you get dot menu
regards
VK
venkat kamesh said:
bro it works without restart ui
just click back (after enable) and tada you get dot menu
regards
VK
Click to expand...
Click to collapse
Yes I noticed this after just forgot to edit post! Just fixed, ty bro
Sent from my D6603 using XDA-Developers mobile app
nice guide bro,I have a question,how so each go to the menu display, 3dot navbar keep active?
for every open menu display, 3dot navbar back off, so it must be activated if any open menu display
Mirza_H said:
nice guide bro,I have a question,how so each go to the menu display, 3dot navbar keep active?
for every open menu display, 3dot navbar back off, so it must be activated if any open menu display
Click to expand...
Click to collapse
Go read his guide here on settings switches :
http://forum.xda-developers.com/cro...pps/guide-dev-how-to-switch-checkbox-t3300468
venkat kamesh said:
Hello guys
After very long day
my second tut in this new year
Click to expand...
Click to collapse
@venkat kamesh ~ using your mod app, and working well, but smali mod didn't work. Compiled and replaced with no errors, but still menu didn't show. I'm using Xperia system ui port on CM12. What do you think? I tried modding some other files, but can't figure it out...
venkat kamesh said:
Hello guys
After very long day
my second tut in this new year
Click to expand...
Click to collapse
Got it working with Settings tweak - thanks