[Guide] [How-to] Replace Recents with Menu & LongPress Home for Recent Apps - Sprint Galaxy S 5 General

[Guide How-to] Replace Recents with Menu & LongPress Home for Recents
This guide is for the Galaxy S5 and should work on all variants.
Keylayout edits:
system/usr/keylayout/Generic.kl
Change key 254 from APP_SWITCH to MENU
key 254 MENU
system/usr/keylayout/gpio-keys.kl
Do the same to key 254
key 254 MENU
Now Recent Apps capacitive key is Menu (single-press) and Search (long-press).
However, we have now lost access to recent apps via a hardware key.
How-to map Recent Apps to Long-press Home
android.policy.jar edits
smali/com/android/internal/policy/PhoneWindowManager.smali
.method private handleLongPressOnHome()V
Search for and delete the line in RED.
Code:
iget v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mLongPressOnHomeBehavior:I
if-eqz v2, :cond_0
iput-boolean v5, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHomeConsumed:Z
const/4 v2, 0x0
invoke-virtual {p0, v2, v4, v4}, Lcom/android/internal/policy/impl/PhoneWindowManager;->performHapticFeedbackLw(Landroid/view/WindowManagerPolicy$WindowState;IZ)Z
iget v2, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mLongPressOnHomeBehavior:I
[COLOR="Red"] if-ne v2, v5, :cond_6
[/COLOR]
invoke-direct {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->toggleRecentApps()V

Thanks for all of the work you guys are doing for this phone, really appreciate it.

Can this be made into a flashable zip or just wait for a rom to be incorporated with this?

jbadboy2007 said:
Can this be made into a flashable zip or just wait for a rom to be incorporated with this?
Click to expand...
Click to collapse
This mod is actually being implemented into the newest release of R.D.D.T ND2 v1.1 according to the changelog in that thread and is currently being tested by sleshepic. TDunham is posting the guide here for other developers and users to be able to recreate his steps and avoid any pitfalls he may have encountered. He did post the mod files in another thread for a specific ROM build, but that tells me the mod is not universal and likely needs to be built on top of a custom ROM.
if you'd like to give the mod a shot yourself though, here's a great guide for breaking into the world of editing smali files and it's really thorough:
http://forum.xda-developers.com/showthread.php?t=2193735
If you succeed let us know!

I wish I could express how freaking long I spent digging around in phonewindowmanager trying to figure out ho to do this. I did figure out the menu button, that was almost too easy...sheesh, thanks for helping man, ill make sure to edit my thread asking for help with this to include a link to this!

Hey bro, kinda confused by the reverse for long pressing for the Search function.
A point in the right direction would be awesome. I'm on sleshepic latest ND2 1.1 of course.
Appreciate the work man, thx
Sent from my SM-G900P using Tapatalk

reverepats said:
Hey bro, kinda confused by the reverse for long pressing for the Search function.
A point in the right direction would be awesome. I'm on sleshepic latest ND2 1.1 of course.
Appreciate the work man, thx
Sent from my SM-G900P using Tapatalk
Click to expand...
Click to collapse
To revert change just change the key 254 in both highlighted files back to APP_SWITCH instead of MENU using a text editor in root explorer:
Keylayout edits:
system/usr/keylayout/Generic.kl
Change key 254 from to MENU from APP_SWITCH
system/usr/keylayout/gpio-keys.kl
same edit
key 254 APP_SWITCH

tdunham said:
To revert change just change the key 254 in both highlighted files back to APP_SWITCH instead of MENU using a text editor in root explorer:
Keylayout edits:
system/usr/keylayout/Generic.kl
Change key 254 from to MENU from APP_SWITCH
system/usr/keylayout/gpio-keys.kl
same edit
key 254 APP_SWITCH
Click to expand...
Click to collapse
Well at first, I did just that. Used RE to change key 254 in both files, but only the recent hardware key went back to stock. Then I took the original files from the 1.0 zip, but that didn't revert the home button long press either. I saw your post in the rom thread, before I posted here.
Sorry to be a pain
Sent from my SM-G900P using Tapatalk

reverepats said:
Well at first, I did just that. Used RE to change key 254 in both files, but only the recent hardware key went back to stock. Then I took the original files from the 1.0 zip, but that didn't revert the home button long press either. I saw your post in the rom thread, before I posted here.
Sorry to be a pain
Click to expand...
Click to collapse
No, that edit requires decompiling android.policy.jar and putting the line back in from that part of the guide I posted above. In the rom you're running, I added recent apps shortcut to the pulldown also.

tdunham said:
No, that edit requires decompiling android.policy.jar and putting the line back in from that part of the guide I posted above. In the rom you're running, I added recent apps shortcut to the pulldown also.
Click to expand...
Click to collapse
Ahh OK, I must have just read the OP wrong. Sorry to bother man, i appreciate it!
Sent from my SM-G900P using Tapatalk

reverepats said:
Ahh OK, I must have just read the OP wrong. Sorry to bother man, i appreciate it!
Sent from my SM-G900P using Tapatalk
Click to expand...
Click to collapse
I have a feeling you'll be giving back in a manner that this is no pain at all :good:
Happy Friday y'all
Sent from My Venum'd S5

I always wonder, how they find all this kind of stuff

eloko said:
I always wonder, how they find all this kind of stuff
Click to expand...
Click to collapse
Experience, logcat, and a little bit of luck

Is there a way to swap the short and long press of just the recent/menu to menu/recent without changing the home button?
Sent from my Rooted Sprint GS5 SM-G900P

KaptainRandom said:
Is there a way to swap the short and long press of just the recent/menu to menu/recent without changing the home button?
Click to expand...
Click to collapse
Yes, the modification is two part. The keylayout edits are just for the capacitive key and the android.policy.jar edit is for the home key. Just don't do the android.policy edit.
It is stated that way in the OP as well I think.

Sorry to be a bother...
Clarification... I is confused...
The OP says it changes the recent button from recent/menu to menu/search...
I don't want menu/search...
I want menu/recent.
Sent from my Rooted Sprint GS5 SM-G900P

deleted

KaptainRandom said:
Sorry to be a bother...
Clarification... I is confused...
The OP says it changes the recent button from recent/menu to menu/search...
I don't want menu/search...
I want menu/recent.
Click to expand...
Click to collapse
You ever get this figured out? I am trying to figure out a way to do the same...
Never mind...Finally found the answer that seemed to do the trick.
Also make the following change in Generic.kl:
key 127 MENU -> key 127 APP_SWITCH

Thanks for the mod guys. I was wondering if I wanted to change the recent/menu button to back and the back to the menu/recent. Would this be simple?

nova0387 said:
Thanks for the mod guys. I was wondering if I wanted to change the recent/menu button to back and the back to the menu/recent. Would this be simple?
Click to expand...
Click to collapse
I'm not sure. Doing it from the keylayout file I wrote about in the OP you can try swapping the Back (default key is 158 btw) with recent or menu but I'm not really sure how it would work out. However, you can't edit the longpress function because those are hard coded in smali so that's why I said I'm not sure what would happen.
And when I mean SWAP, I mean just swapping the names. Leave the key values right where they are.

Related

[Q][howto] how to integrate the vanilla lockscreen

Changing this thread to HOWTO
Instructions:
1. Phone must be rooted
2. Deodexed ROM is a must
3. Download the edited android.policy.jar from http://forum.xda-developers.com/showthread.php?t=1112991 (it would be the latest update on the the thread. Check the first page.)
4. Paste the file using root explorer in system/framework.
5. Restart your phone.
*** If you would want to revert back to the old glass screen, make a backup of the android.policy.jar.
Sorry i pressed the wrong button. Can somebody write up a guide on how to integrate the vanilla lockscreen to any theme? This will greatly be appreciated.
Sent from my GT-I9003 using XDA App
Dude there is a guide by skin search the i9003 development section
When i checked the thread and downloaded the file, it was a full deodexed rom. Are there any files that i can just push?
Sent from my GT-I9003 using XDA App
TRy android policy.jar
jcbalunsat said:
Sorry i pressed the wrong button. Can somebody write up a guide on how to integrate the vanilla lockscreen to any theme? This will greatly be appreciated.
Sent from my GT-I9003 using XDA App
Click to expand...
Click to collapse
Check my ultimate-blue-tripin theme, I have posted the theme with android.policy.jar for vanilla unlock screen.
trip007in said:
Check my ultimate-blue-tripin theme, I have posted the theme with android.policy.jar for vanilla unlock screen.
Click to expand...
Click to collapse
So if i just replace the android.policy.jar , the lockscreen will change even if i dont follow the steps from the deodexing thread?
You need to deodex your framework, otherwise you can take risk by replacing the apk and deleting the corresponding odex file and reboot and hope that it will boot. Then report here, it will help others also. Just kidding, I have not tested this on non-deodexed framework. But this is the way to do it and theoretically it should work.
Sent from my GT-I9003 using XDA Premium App
For deodexed jus replace d android.policy file, right?
trip007in said:
You need to deodex your framework, otherwise you can take risk by replacing the apk and deleting the corresponding odex file and reboot and hope that it will boot. Then report here, it will help others also. Just kidding, I have not tested this on non-deodexed framework. But this is the way to do it and theoretically it should work.
Sent from my GT-I9003 using XDA Premium App
Click to expand...
Click to collapse
Sent from my GT-I9003 using XDA App
Yeah you are right
hey guys, i had deodex my i9003 successfully and installed the vanilla lockscreen mod by trip007. but i notice that pressing the menu button on the device can accidentally unlock the screen!!! is it a problem with the lockscreen??
Not at all
Sent from my GT-I9003 using XDA Premium App
hi sakindia123, thanks for the reply!
however, my phone still has this problem. at the vanilla lockscreen, pressing the soft key "menu" (leftmost key on i9003) will bring me to the main menu screen (also means unlock my phone)
some help needed!!!
hekckos said:
hi sakindia123, thanks for the reply!
however, my phone still has this problem. at the vanilla lockscreen, pressing the soft key "menu" (leftmost key on i9003) will bring me to the main menu screen (also means unlock my phone)
some help needed!!!
Click to expand...
Click to collapse
well if u dont want it den replace original files
@ hekckos
its not a problem its a general feature only its not a bug so dont worry about that
thanks kkrraazzyy for the reply !!! much appreciated!!

Touchwiz spell check mod jb,ics

as many of u know. touchwiz roms dont include spell checking
(the red line underneath miss spelled words like found on nokiia,blacknerry,iphone and cm based roms)
i think i came across a fix for this,
the files that has 2 be changed are the following 2.
Secsettings.apk & framework2.jar
--or you can backup your device and replace the 2 files with files attached in 2nd post
--or you can flash the zip file in 2nd post (please backup and confirm if it works on your device
as member iT iS Me states he did the following
iT iS Me said:
For me Spell Checking option is very important and I like using it in CM roms. However, our NOTE is more productive with Stock roms. I searched a lot to find a way to enable the option. Unfortunately, there was no 100% clear guidance but I could manage to get it. Thanks to everyone helped.
You need to decompile Secsettings.apk & framework2.jar.
In SecSettings, open the file "res\xml\language_settings.xml" and look for:
Code:
<PreferenceScreen android:title="@string/phone_language" android:key="phone_language" android:fragment="com.android.settings.LocalePicker" />
add new line and paste the following:
Code:
<com.android.settings.inputmethod.SpellCheckersPreference android:title="@string/spellcheckers_settings_title" android:key="spellcheckers_settings" />
In framework2.jar, open the file "smali\android\widget\TextView.smali" and look for:
Code:
.method public isSuggestionsEnabled()Z
.locals 1
.prologue
.line 8464
[COLOR="Red"][B]const/4 v0, 0x0[/B][/COLOR]
return v0
.end method
Change the highlighted to:
Code:
.method public isSuggestionsEnabled()Z
.locals 1
.prologue
.line 8464
[COLOR="Red"][B] const/4 v0, 0x1[/B][/COLOR]
return v0
.end method
That is all and enjoy.
NOTE: It works with Google Keyboard or alternatives.
Click to expand...
Click to collapse
--or you can backup your device and replace the 2 files with files attached in 2nd post
--or you can flash the zip file in 2nd post (please backup and confirm if it works on your device)
2nd post reserved for uploads
https://dl.dropbox.com/u/32170931/SpellCheckTest.zip <- flashable zip
I tried this on my Galaxy Note 10.1 running stock UK ma5 ROM, it kind of worked in some apps, red underline appeared, but I lost access to my "settings" panel and it also installed something called mobihotspot(?) Which I was unable to remove.
when u say u lost access to settings panel, does it mean it force closes when u open it, or doesnt it appear anymore? ur gonna have to take ur original note10.1 files and edit them urself. not use the files i supplied here?
Any ideas if this solution works also on the Galaxy S 4?
Jiiins said:
Any ideas if this solution works also on the Galaxy S 4?
Click to expand...
Click to collapse
Try it.
Sent from my Samsung Galaxy SVII using Tapatalk 6 Beta
Do I need active internet connection for this?
Sent from my GT-N7000 using Tapatalk 4 Beta
What rom and device are these files in the zip from?
can it be safely rooted for unexperienced user ?
wolverin99 said:
can it be safely rooted for unexperienced user ?
Click to expand...
Click to collapse
Very simple. Just go the the PhilZ kernel thread and follow the instructions very closely.
Sent from my Samsung Galaxy SVII using Tapatalk 6 Beta
Jiiins said:
Any ideas if this solution works also on the Galaxy S 4?
Click to expand...
Click to collapse
I did not try the flashable file, but doing this manually worked on my VZW Galaxy S4 running JellyBeans build 6 (deodexed ROM).
*Edit*
This also adds spell checking to chrome's address bar, and presumably other text fields that do not normally have it. For me, that is only a minor annoyance and is greatly outweighed by the addition of spell check. Just an FYI.
dropbox link is not working
Dear many thanks for your important subject please please please provide me with zip file to flash it as i tried to do manually but it did't work
Thanks regards,
spell checker on note 3 sm-n9005
can you help me to get the same file on note 3
primitive.A said:
2nd post reserved for uploads
https://dl.dropbox.com/u/32170931/SpellCheckTest.zip <- flashable zip
Click to expand...
Click to collapse
does anyone still have these files!!! I would really like to have my spell check back! I miss that about my Razr.
I am now on the Verizon S4.
The drop box link does not work and I cant seem to find the raw files either!
swc2001 said:
does anyone still have these files!!! I would really like to have my spell check back! I miss that about my Razr.
I am now on the Verizon S4.
The drop box link does not work and I cant seem to find the raw files either!
Click to expand...
Click to collapse
bump!!
Anybody there!?!
Sent from my SCH-I545 using Tapatalk
swc2001 said:
Anybody there!?!
Sent from my SCH-I545 using Tapatalk
Click to expand...
Click to collapse
You need to do the mod for yourself. Every rom is different. You could also look for a rom that the developer included it in his rom.
athlonxp2300 said:
You need to do the mod for yourself. Every rom is different. You could also look for a rom that the developer included it in his rom.
Click to expand...
Click to collapse
Well I am not sure how to do the mod. and the zip files are not there. I only use stock rooted because it works 100%
swc2001 said:
Well I am not sure how to do the mod. and the zip files are not there. I only use stock rooted because it works 100%
Click to expand...
Click to collapse
The mod only works on deodexed roms. You have to copy the required files from that rom, decompile, edit then recompile. Then copy the files back over the originals.
swc2001 said:
Well I am not sure how to do the mod. and the zip files are not there. I only use stock rooted because it works 100%
Click to expand...
Click to collapse
Did you try to read the OP?
Sent from Nexus 5 on Slimkat

[HOWTO] Access build.prop without root!

Hello all, Here I present a tutorial on how to access build.prop without root!
If you havent already, Download ES File Explorer.
After installation, open it.
You are most likely to be landed on mnt/sdcard.
Click "Favorites".
Click the "/" with the phone icon.
After getting there, find the "system" folder.
Look for a file called "build.prop"
If prompted, open with any text file editor you have.
VOILA! You have now accessed the build.prop without root!
Press Thanks if I helped.
___________________
Curious about the 1970 Tapatalk bug? Read here.
SammyDroidWiz said:
Hello all, Here I present a tutorial on how to access build.prop without root!
If you havent already, Download ES File Explorer.
After installation, open it.
You are most likely to be landed on mnt/sdcard.
Click "Favorites".
Click the "/" with the phone icon.
After getting there, find the "system" folder.
Look for a file called "build.prop"
If prompted, open with any text file editor you have.
VOILA! You have now accessed the build.prop without root!
Press Thanks if I helped.
___________________
Curious about the 1970 Tapatalk bug? Read here.
Click to expand...
Click to collapse
thanks a lot bro
i find it as a nice tip
i never knew of this feature thanks a lot
Im not gonna try this as i already have root and access to build.prop. But im gonna go ahead and say it wont work. Sure you can get to the build.prop location and file but will it even open? Its in /system and unless you have access to /system (root) then how are you going to open any files unless the system allows it? Going through files and seeing them is one thing. Opening and editing them is another.
That's right, I'm the premium potaytoman and i seek the TROOOOOF! Problem?
gmaster1 said:
Im not gonna try this as i already have root and access to build.prop. But im gonna go ahead and say it wont work. Sure you can get to the build.prop location and file but will it even open? Its in /system and unless you have access to /system (root) then how are you going to open any files unless the system allows it? Going through files and seeing them is one thing. Opening and editing them is another.
That's right, I'm the premium potaytoman and i seek the TROOOOOF! Problem?
Click to expand...
Click to collapse
I was able to click and open the file, but i didnt edit since im scared.
___________________
Sent from the other side...
[HOWTO] Access build.prop without root!
For those with broken Tapatalk:
http://forum.xda-developers.com/showthread.php?t=2194417
SammyDroidWiz said:
I was able to click and open the file, but i didnt edit since im scared.
___________________
Sent from the other side...
[HOWTO] Access build.prop without root!
For those with broken Tapatalk:
http://forum.xda-developers.com/showthread.php?t=2194417
Click to expand...
Click to collapse
Lol dont worry. Editing the build.prop is nothing. I barely even need it. But like i said. Opening AND editing is another thing to just being able to see the files.
That's right, I'm the premium potaytoman and i seek the TROOOOOF! Problem?
gmaster1 said:
Lol dont worry. Editing the build.prop is nothing. I barely even need it. But like i said. Opening AND editing is another thing to just being able to see the files.
That's right, I'm the premium potaytoman and i seek the TROOOOOF! Problem?
Click to expand...
Click to collapse
Well, jst waiting for some daring guy to test, otherwise ill send a close request.
___________________
Sent from the other side...
http://forum.xda-developers.com/showthread.php?t=2194417
Click to expand...
Click to collapse
Without rooting you wont be able to save in build.prop. you need to be rooted for saving the desired value.
Do not be hurt, but at least this could be a joke of the week
SammyDroidWiz said:
Well, jst waiting for some daring guy to test, otherwise ill send a close request.
___________________
Sent from the other side...
Click to expand...
Click to collapse
At least you seemed clever enough to try. But like someone above me said. You have to be rooted to edit it and save it. Sure you can do whatever at first but if you cant save then then nothing will change.
Sorry to ruin your train of thought
That's right, I'm the premium potaytoman and i seek the TROOOOOF! Problem?
But at least your brain is working Sammy and that's more than we can say for alot of people around here. :thumbup::thumbup::thumbup:
Sent from my Kitteh via my Sexy Nexi 4 using Tapatalk
Thanks^^^
___________________
Sent from the other side...
Press the THANKS button if I helped.
Bump
Sent from the unknown abyss
_______________
She has said it, And you said it again.
Has this just become one of those threads that becomes off-topic after everything on-topic has been said?
That's right, I'm the premium potaytoman and i seek the TROOOOOF! Problem?
gmaster1 said:
Has this just become one of those threads that becomes off-topic after everything on-topic has been said?
That's right, I'm the premium potaytoman and i seek the TROOOOOF! Problem?
Click to expand...
Click to collapse
Sorta...
Sent from the unknown abyss
_______________
She has said it, And you said it again.
Tis OK
Ohai Sammy *waves towards the Philippines *
Sent by my Kitteh eating my muffin head (Im chocolate chip) via my Sexy Nexi 4 using Tapatalk
On 2019 this has got fixed.
Help?

Hardware Key

solved
Can't you just remap the key in /system/usr/keylayout/your-keylayout-file.kl ? I haven't tried personally, but it might work.
Sent from a Toasted Devil
netwokz said:
Can't you just remap the key in /system/usr/keylayout/your-keylayout-file.kl ? I haven't tried personally, but it might work.
Sent from a Toasted Devil
Click to expand...
Click to collapse
Solved! Wrong file edited.
Solution for HTC devices: the files that have to be edited are the ones that end with "touchscreen".
xpirt

Left hand Button Short press for Options

I hate the new system where you have to long press for options and short press gives you task manager (Which I never use).
Is there a way to revert it?
Gravity box will help you
What is gravity box Please?
here is the Gravity Box Thread on XDA : http://forum.xda-developers.com/apps/xposed-modules/app-gravitybox-v2-9-1-tweak-box-android-t2316070
I may consider using it...
Edit: thread for KitKat : http://forum.xda-developers.com/apps/xposed-modules/app-gravitybox-v2-9-1-tweak-box-android-t2554049
Corwin9S said:
here is the Gravity Box Thread on XDA : http://forum.xda-developers.com/apps/xposed-modules/app-gravitybox-v2-9-1-tweak-box-android-t2316070
I may consider using it...
Edit: thread for KitKat : http://forum.xda-developers.com/apps/xposed-modules/app-gravitybox-v2-9-1-tweak-box-android-t2554049
Click to expand...
Click to collapse
I assume it requires root which I do not have.
networkn said:
I assume it requires root which I do not have.
Click to expand...
Click to collapse
Yes, root only, and you'll need the xposed framework. .. well worth doing, and the first thing I installed when I got my phone yesterday! I now have menu options on the left key how it should be!
networkn said:
I hate the new system where you have to long press for options and short press gives you task manager (Which I never use).
Is there a way to revert it?
Click to expand...
Click to collapse
I prefer this new layout, although I'm still getting used to it
-Sent from Tapatalk

Categories

Resources