[MOD][LineageOS Based ROMS] Swap Buttons for Xiaomi Mi 5s - Xiaomi Mi 5s ROMs, Kernels, Recoveries, & Other De

On previous versions of the CM roms and on MIUI you could swap the back and menu/recent app buttons to mimic the input you're most familiar with back-home-recent (nexus/pixel style) or recent-home-back (Samsung style).
Coming from nexus and AOSP based devices you would be more familiar with the order being BACK ----- HOME ----- RECENT APPS
You can generally find swap buttons from
Settings>Buttons>Swap buttons
It currently isn't available in the LineageOS 14.1 ROM by @xiaobai112220
To swap the button config you would have to open and edit System/usr/keylayout/synaptics_dsx.kl and set it as the following
Code:
key 139 BACK VIRTUAL
key 102 HOME VIRTUAL
key 158 APP_SWITCH VIRTUAL
key 143 WAKEUP
To solve this mess, I've created two flashable zip files.
If you want your left button for navigating back and right button for recent (Nexus/Pixel style)
Flash "Swap Buttons Back Home Recent.zip" in your recovery
This will be your order.
BACK-----HOME-----RECENT
If you want your left button for recent and right button for navigating back (Samsung style)
Flash "Swap Buttons Recent Home Back.zip" in your recovery
This will be your order.
RECENT-----HOME-----BACK
Downloads(Refer Download section or links below):
This will work on most of the LineageOS based ROMs, if it doesn't let me know..

Thank you!
ru1dev said:
On previous versions of the CM roms and on MIUI you could swap the back and menu/recent app buttons to mimic the input you're most familiar with back-home-recent (nexus/pixel style) or recent-home-back (Samsung style).
Coming from nexus and AOSP based devices you would be more familiar with the order being BACK ----- HOME ----- RECENT APPS
You can generally find swap buttons from
Settings>Buttons>Swap buttons
It currently isn't available in the LineageOS 14.1 ROM by @xiaobai112220
To swap the button config you would have to open and edit System/usr/keylayout/synaptics_dsx.kl and set it as the following
Code:
key 139 BACK VIRTUAL
key 102 HOME VIRTUAL
key 158 APP_SWITCH VIRTUAL
key 143 WAKEUP
To solve this mess, I've created two flashable zip files.
If you want your left button for navigating back and right button for recent (Nexus/Pixel style)
Flash "Swap Buttons Back Home Recent.zip" in your recovery
This will be your order.
BACK-----HOME-----RECENT
If you want your left button for recent and right button for navigating back (Samsung style)
Flash "Swap Buttons Recent Home Back.zip" in your recovery
This will be your order.
RECENT-----HOME-----BACK
Downloads(Refer Download section or links below):
This will work on most of the LineageOS based ROMs, if it doesn't let me know..
Click to expand...
Click to collapse
Working 100%.
Thank you! Thank you! Thank you! A million times, thank you!
Now, if good guy @xiaobai112220 would put this (or even better, the "Settings->Buttons->Swap buttons" option that you described) in the Lineage 14.1 Capricorn build, that'd be super duper. Until then, this fixes my OCD.
Thanks again! :good: :good: :good:

thanks mate,perfectly working ...

Thanks, much appreciated.

Would this work with changing the capacitive buttons when using MIUI? I'm guessing not.
Edit: This app did the job on my RN3P. https://play.google.com/store/apps/details?id=com.irishin.buttonsremapper

Pumpino said:
Would this work with changing the capacitive buttons when using MIUI? I'm guessing not.
Edit: This app did the job on my RN3P. https://play.google.com/store/apps/details?id=com.irishin.buttonsremapper
Click to expand...
Click to collapse
yes it will work

Delete this (my) post.

Hi,
doesn't it have to be
Code:
key 139 BACK VIRTUAL
key 102 HOME VIRTUAL
key 158 MENU VIRTUAL
key 143 WAKEUP
just to switch the buttons?
Otherwise the menu key can't be configured in the settings.
That was the case on my phone.
I attached a modified file which did the job for me.
Regards
Webrat

I am on the Oneplus 3T and I have the same issue. Is there a flashable zip to do the same for a oneplus 3T?

Three days ago I flashed Swap Buttons *.zip* file from @ru1dev and it worked perfectly fine. Yesterday somehow I encrypted my phone while flashing a new version of Lineage. So I decrypted my phone again and in the process my phone got wiped completely. Funny thing though, swap buttons remained intact. Great work @ru1dev, thanks a lot. :good:

Want to change into : recent-home-back with zip file.... clear dalvik/cache - install zip with twrp - clear dalvik/cache- reboot ....... no Menu to swap buttons in settings
Im on hexa rom from 17.may.....any idea ?!?

Didn't work for me either, you can do it manually by editing the file mention in the OP and swaping the codes for back and recent. That worked for me after a reboot

yipieee...in the new Hexa Build 5/23 it works with flashing the zip from post 1....
great...and big Thanks

help me
Hi I got swap button in setting but it doesn't turn on anyway
I really want my back button in the right side
Flash file from recovery but doesn't work
Crdroid last version lineage based

Yeah this isnt working on Aicp 12.1....even with flashing with twrp

IT's really useful,but it can be changed in the setting.
We can input "swap buttons" in the Search Bar,and we can find it which is available.

How can i make it work in Los 15.1?

Unlimited Studying said:
We can input "swap buttons" in the Search Bar,and we can find it which is available.
Click to expand...
Click to collapse
If this does not work, maybe you use localisation, change you language on English and reboot, and find again 'swap buttons' :good:

After flashing the recent-home-back my button still the same back-home-recent , how to change the code?
---------- Post added at 09:38 AM ---------- Previous post was at 08:52 AM ----------
Why my keylayout directory empty?

No need for LineagsOS 15.1
Can be change in settings:
System -> Buttons -> Additional buttons -> Swap buttons

Related

ROM AOKP JB 4.1.2 with Stock ICS Kernel (Droid 4 XT894)

AOKP JB Rom with Stock ICS Kernel
The one on rombot is a couple of days old so I have updated with one I build on 10/16.
Built from Hashcode and DHackers source. Give thanks to them!
Read this thread on how to install and thank Hashcode: http://forum.xda-developers.com/showthread.php?t=1886935
Link to Droid 4 folder with some roms, inverted gapps, safestrap, tools, etc:
https://www.dropbox.com/sh/mhmmrku5e4x8boj/hbd5BE-Nae or here: http://d-h.st/users/jsnweitzel
Use safestrap 3.05
Android 4.1.2
Working Camera now, no flash though.
As usually doing this stuff can break your device.
Thanks for this! Just finished DLing. Going to back up and test it out.
russia. megafon. No connection to the Internet. To create APN does not change anything.
hows the battery life?
For some reason every time I download the ROM then try to either install it safe-side on Safestrap 2.11 it won't open. I also notice that I'm unable to open the archive on my computer as thought the file is corrupt?
I just updated the op with a build I did this morning.
hi, i just flashed this ROM but i noticed my pictures from my SD card isn't showing up in my gallery, I tried googling it and its supposed to be a known issue for jellybean, i tried a few different things but nothing worked so now i'm using Quickpic.
but is there a way to connect the Quickpic app to the camera app or a way for the stock gallery app to rescan for all the pictures?
I don't seem to be having any trouble with reading my pics from the external sdcard.
The keyboard lights don't come on after the phone wakes up.
AOKP GSM edition, stock kernel. works fine.
http://d-h.st/rFH
olegfusion said:
AOKP GSM edition, stock kernel. works fine.
http://d-h.st/rFH
Click to expand...
Click to collapse
I didn't get mobile data with your build until editing build.prop.
Code:
--- build.pbak
+++ build.prop
@@ -139,7 +139,7 @@
# could use this property too. IKMAIN-732
#1 this is verizon wireless globle phone
#0 this is not verizon wireless globle phone
-ro.mot.phonemode.vzwglobalphone=0
+ro.mot.phonemode.vzw4gobalphone=1
# END Motorola, nfjb73, 21-jun-2010, IKMAIN-732
# BEGIN Motorola, nfjb73 23-jun-2010, IKMAIN-624
@@ -325,8 +325,7 @@
ro.cdma.subscribe_on_ruim_ready=true
persist.sys.moto_oem_telephony=false
persist.sys.moto_imsi_fix=false
-ro.config.not_world_phone=true
-
+ro.config.not_world_phone=false
#
# ADDITIONAL_BUILD_PROPERTIES
#
@@ -357,3 +356,13 @@
dalvik.vm.dexopt-flags=m=y
net.bt.name=Android
dalvik.vm.stack-trace-file=/data/anr/traces.txt
+
+ro.ril.hsxpa=3
+ro.ril.gprsclass=12
+ro.ril.hep=1
+ro.ril.enable.dtm=1
+ro.ril.hsdpa.category=28
+ro.ril.enable.a53=1
+ro.ril.enable.3g.prefix=1
+ro.ril.hsupa.category=7
+
Not sure the ro.ril settings were absolutely needed. But no APNs showed up until I changed the world mode settings.
Also something is wrong with your keymap. The capslock and OK buttons don't do anything in Connectbot. OK should be DPAD Enter. CapsLock could be ALT, since it's not really needed for itself. (Shift-Shift is already caps lock after all.)
I don't think the caps lock and ok key work in any of the jb roms. You can double click the shift key for all caps. Anyone have them working?
Never mind the build.prop settings, they may be a red herring. It looks like every other reboot, data fails because the RIL is unable to read the IMSI because the SIM card isn't ready yet when it tries.
I've also found that I can successfully reset the RIL and get data working by going into Airplane mode, then in a root shell kill the existing rild, which forces it to restart. After it restarts toggle back out of Airplane mode and data is working.
Back to keymaps - also the arrow keys are all set to the wrong directions. I've manually edited my omap4-keypad.kl file to fix these issues.
jsnweitzel said:
I don't think the caps lock and ok key work in any of the jb roms. You can double click the shift key for all caps. Anyone have them working?
Click to expand...
Click to collapse
After I straightened out the arrow keys, the OK key started working as usual in Connectbot. It must have been looking for a particular layout and giving up when it didn't see what it expected.
I've found that setting CapsLock to Alt doesn't actually do anything useful, probably because nothing in the Keymaps file has anything defined for its Alt position.
Oh, and the CapsLock key wasn't working because the file had "CAPS" but the correct keyword is "CAPS_LOCK" - so it's working for that on mine now.
The SYM key used to bring up a dialog box with special characters, now it just brings up a dialog to select Input Method. That appears to be a JB-specific thing. Makes it pretty useless.
highlandsun said:
After I straightened out the arrow keys, the OK key started working as usual in Connectbot. It must have been looking for a particular layout and giving up when it didn't see what it expected.
I've found that setting CapsLock to Alt doesn't actually do anything useful, probably because nothing in the Keymaps file has anything defined for its Alt position.
Oh, and the CapsLock key wasn't working because the file had "CAPS" but the correct keyword is "CAPS_LOCK" - so it's working for that on mine now.
The SYM key used to bring up a dialog box with special characters, now it just brings up a dialog to select Input Method. That appears to be a JB-specific thing. Makes it pretty useless.
Click to expand...
Click to collapse
Can you email me these changes so that I can merge them into the mainline? Or feel free to submit a pull request on github?
highlandsun said:
Never mind the build.prop settings, they may be a red herring. It looks like every other reboot, data fails because the RIL is unable to read the IMSI because the SIM card isn't ready yet when it tries.
I've also found that I can successfully reset the RIL and get data working by going into Airplane mode, then in a root shell kill the existing rild, which forces it to restart. After it restarts toggle back out of Airplane mode and data is working.
Back to keymaps - also the arrow keys are all set to the wrong directions. I've manually edited my omap4-keypad.kl file to fix these issues.
Click to expand...
Click to collapse
On the RIL settings for GSM:
I can enable the new build.prop values DHacker has been working on which add the same data toggles specifically for these fixes. Allows the user to enable/disable certain RIL features via settings until it works right.
Hashcode said:
Can you email me these changes so that I can merge them into the mainline? Or feel free to submit a pull request on github?
Click to expand...
Click to collapse
PM'd you the diff. Let me know if you'd prefer it some other way.
Hashcode has put a new build up here: http://goo.im/devs/Hashcode/maserati/aokp/STOCK-JB-aokp_maserati_unofficial_Oct-18-12.zip
Haven't found a changelog. Anyone tried this on GSM yet. Does it work, or do we have to wait for Olegfusion to do his magic?
Lum_UK said:
Hashcode has put a new build up here: http://goo.im/devs/Hashcode/maserati/aokp/STOCK-JB-aokp_maserati_unofficial_Oct-18-12.zip
Haven't found a changelog. Anyone tried this on GSM yet. Does it work, or do we have to wait for Olegfusion to do his magic?
Click to expand...
Click to collapse
Hope in the changelog the earpiece volume is fixed, it is way too low. I end up having to put people on speaker phone just to hear them.
Just wanted to give this thread a bump and say THANK YOU to jsnweitzel for throwing these new builds out and feeding my crack flashing addiction!

How to turn off vibartion with back and home button (Nokia X2)

So, Hope somebody let me know how to turn off vibration with back and home button as well as vibration when text sms
I used Nokia X2, thanks a lot
dinhquanvien said:
So, Hope somebody let me know how to turn off vibration with back and home button as well as vibration when text sms
I used Nokia X2, thanks a lot
Click to expand...
Click to collapse
Goto Settings-->Sound. It should be there.
:crying:
It isn't existed in "Sound", i wish i could find it in there
dinhquanvien said:
:crying:
It isn't existed in "Sound", i wish i could find it in there
Click to expand...
Click to collapse
hi u can not turn it off. it is nokia build
but i know a way to turn it off i will make a guild soon
and i m vietnamese ^^
(nói chung là tui đang test để test xong rồi vài ngày nữa tôi làm cái hướng dẫn)
Many thanks, and eagerly waiting for your result, hope it come soon
dinhquanvien said:
Many thanks, and eagerly waiting for your result, hope it come soon
Click to expand...
Click to collapse
do you know about xposed
please google and download xposed installer last vesion 2.6.1
you can turn off back and home key vibration
do it step by step
1. download and install "xposed installer"
2.go to tab framework chosse "install/update" then reboot your phone by xpsoed option
2. download Gravity Box from xposed installer
3. active gravity box form tab modules of xposed installer
4. reboot your phone
5. open Gravity Box
6.go to Navigation keys actions (have a popup warning about enable navigation keys just hit ok nvm it fin. and please do not active Navigation key on Nokia X2 it have error. i have active that already @@)
7.to turn off vibration chosse Virtuan key vibration patten and type "," hit ok
8. know vibration is off ^^
MORE THAN THAT
not only help you turn off vibration, you also can change funtion of back and menu key
with back key you can change funtion by long-press and double tab
home key only long-press work
another option to chose that is "Xposed addtions"
install Xposed addtions vertion 2.3.8 (only this vertion work on NOKIA X2)
u can change any key funtion
like home key, volume up, volume down and power button( back key not work)
u can bring back power menu like any normal android phone by power long-press but becarefull do not change press option off power button and double tab work fine.
and please remeber do not setup one key with both app GravityBox and Xposed addtions. Ex: you can set funtion of Back key by GravityBox and Home key by xposed addtions.
:laugh: Thanks so much,
But to used this app, my device have to be root, right ?
dinhquanvien said:
:laugh: Thanks so much,
But to used this app, my device have to be root, right ?
Click to expand...
Click to collapse
yes!

[Q] is there a mod for CM12 5.0.2 on screen buttons?

is there a mod for CM12 5.0.2 on screen buttons? Please the home button is dead so I need on screen buttons and plus there look really cool lol
edit your /system/build.prop (use CM file manager), and add this line:
Code:
qemu.hw.mainkeys=0
that's it, reboot and you will have on-screen "navigation bar".
andrei53 said:
edit your /system/build.prop (use CM file manager), and add this line:
Code:
qemu.hw.mainkeys=0
that's it, reboot and you will have on-screen "navigation bar".
Click to expand...
Click to collapse
Doesn't work, always says denied
Edit: changed to r/w changed prop now nothing appears after s3 mini logo. Just blank screen
brooker88 said:
Doesn't work, always says denied
Click to expand...
Click to collapse
You need to use a text editor that supports root access mode.
Use CM's built-in File Manager and its editor. To enable root access, go to Settings -> General Settings -> Access Mode, and pick something other than "safe".
andrei53 said:
You need to use a text editor that supports root access mode.
Use CM's built-in File Manager and its editor. To enable root access, go to Settings -> General Settings -> Access Mode, and pick something other than "safe".
Click to expand...
Click to collapse
Will try in a min thanks, do you know how I disable hardware keys after this? I can't stop them from lighting up, bln app doesn't work either
Edit: it worked thanks so much! Been trying for hours to get on screen keys ����
brooker88 said:
Will try in a min thanks, do you know how I disable hardware keys after this? I can't stop them from lighting up, bln app doesn't work either
Edit: it worked thanks so much! Been trying for hours to get on screen keys ����
Click to expand...
Click to collapse
To disable hardware button backlight, Settings -> Buttons -> Backlight.
There you can also set Recents Button -> both long and short press -> no action
The only thing not possible to disable currently is the back button.
andrei53 said:
To disable hardware button backlight, Settings -> Buttons -> Backlight.
There you can also set Recents Button -> both long and short press -> no action
The only thing not possible to disable currently is the back button.
Click to expand...
Click to collapse
I tried that already, and the bln app but still lights up. Guess its cause I'm using f kernel.thanks for all your help

How To Add Screen Record And Restart Options To Power Botton

How to add reboot or screen recoder things when pressing power button
Hello guys.
This thread only for stock user .as we all know in stock rom when we press power button then there only power off option. So today ill share method to add commands like reboot,reboot to recovery, e.t.c
1. U need a rooted phone
2.xposed installed
3.browse to download module in xposed three search for (APM+) Android power menu.
4.Then activate and reboot
5.Then open (APM+) there you'll option to add commands there choose what you want to add..
Thanks to APM+ devs
And thanks to rovo89 for xposed
yeah...nice one.
Thanks for sharing this great..APM+

[MOD]Remove Navigation Bar for Android N DP4

You will need to ROOT the Nexus 6P (Android N DP4) so that you can make the required changes to the build.prop file. *NOTE: This process will work on systemless root
Nexus 6P Disable Navigation Bar
1. Download the Build Prop Editor Application
2. Launch the Build Prop Editor App
3. If Prompted, Let the Application Have Root Access via SuperSU
4. Tap the Pencil Icon at the Bottom(or the 3-dot menu at the top right and then tap on edit)
5. Scroll All the Way Down to the Bottom of the Build.Prop File
6. Create a New Line at the End of the File
7. Then Type or Paste the Following Text. . .
8. " qemu.hw.mainkeys = 1 "
9. Then Press the Save/Disk Icon at the Top Right
10. If Prompted, Grant Root Access to the Application Again
11. Wait for the ‘Build Prop Saved’ Toast Message to Appear at the Bottom
12. Press the Home Button to Close the Application
13. Then Reboot the Nexus 6P
Navbar Replacement Apps:
-Swipe Navigation
-GMD GestureContol Lite
FYI - Using this method also disables Google now...
I would be suggest removing navigation bar using the layers loophole used by swipe navigation
djide01 said:
FYI - Using this method also disables Google now...
I would be suggest removing navigation bar using the layers loophole used by swipe navigation
Click to expand...
Click to collapse
Does "Swipe navigation" trick work on Android N ? Any other ways to do it on nougat ?
coolsid8 said:
Does "Swipe navigation" trick work on Android N ? Any other ways to do it on nougat ?
Click to expand...
Click to collapse
No it does not. I'm also looking for an alternate method. Had it running for awhile on Nougat official release, but if I accidentally long-pressed on any of my Swipe Navigation attempts, it would stop working and I'd be stuck in whatever app I was using. Having to shut down and reboot to get home is not ideal.
it removes the navbar but it also breaks my camera. suggestions?
edit; I fixed it using this mod I only had assistant enabled in the aroma installer http://forum.xda-developers.com/one...r-pixel-launcher-t3492677/page27#post70291365
Suggestions
yakie996 said:
it removes the navbar but it also breaks my camera. suggestions?
edit; I fixed it using this mod I only had assistant enabled in the aroma installer http://forum.xda-developers.com/one...r-pixel-launcher-t3492677/page27#post70291365
Click to expand...
Click to collapse
I see you too had this issue on your moto x style , of the two zip's given which one should I use for my stock 7.0 x style
This methode use to work on my phone prior of Android O. But it completely break my system if when I tried on O DP1-2-3. It wont let me rebooting at all, goes directly in recovery and have to reflash system. I know the thread is concerning N and not O but wondering if anyone would have advise
Is there any other way of removing the nav bar ? I tried substratum to set the size to 0 but that won't work either
You can use a custom ROM, like Pure Nexus.
t4rdif said:
This methode use to work on my phone prior of Android O. But it completely break my system if when I tried on O DP1-2-3. It wont let me rebooting at all, goes directly in recovery and have to reflash system. I know the thread is concerning N and not O but wondering if anyone would have advise
Is there any other way of removing the nav bar ? I tried substratum to set the size to 0 but that won't work either
Click to expand...
Click to collapse
https://forum.xda-developers.com/nexus-6p/general/guide-hide-navigation-bar-status-bar-app-t3509747
coremania said:
https://forum.xda-developers.com/nexus-6p/general/guide-hide-navigation-bar-status-bar-app-t3509747
Click to expand...
Click to collapse
Immersive mode is one way of doing it but I personally hate it. Swiping the bottom of the screen will bring back the nav bar. When hidden the keyboard won't show. Plus it still doesn't give you back the screenestate, it is simply replaced with a black bar.
Custom ROM like Pure Nexus have the option because they are running N. The build prop mod use to work prior of O. Hope there will be a way of getting rid of that nav bar ! #givemebackpie
t4rdif said:
Immersive mode is one way of doing it but I personally hate it. Swiping the bottom of the screen will bring back the nav bar. When hidden the keyboard won't show. Plus it still doesn't give you back the screenestate, it is simply replaced with a black bar.
Custom ROM like Pure Nexus have the option because they are running N. The build prop mod use to work prior of O. Hope there will be a way of getting rid of that nav bar ! #givemebackpie
Click to expand...
Click to collapse
Ok, that's personal taste, I do prefer immersive with transparent navbar.
does it also work on Oreo
Currently my nexus 6P is running Oreo, I use the root explorer to add qemu.hw.mainkeys = 1 on Build Pro File, but it turned out bad, my whole system collapsed and I have to reflash the OS. Will this app work in Oreo? Many thanks.
Worked for z5 premium dual 6833 nougat 7.1.2 mokee. and stock sony 7.1.1 different firmwares.
Tnx
This method does not apply to my cell phone,android7.0,EMUI 5.0.1 OS。

Categories

Resources