How can I customize the Power off Menu? (Samsung, Android 9) - Android Q&A, Help & Troubleshooting

How can I properly customize my power off menu for my (rooted) device, running an Android 9 ROM?
So far I've tried these:
Button customization apps​None of them work for the Power button.
Some XPosed Modules?​Found some stuff like NeoPowerMenu, but none of those work.
Tasker​Found this trick on Reddit, using Tasker.
Basically, it's waiting for the stock power menu to show, hide it, then replace with your own.
This process is really GLITCHY, as the stock power menu is still shown for a few moments, then hidden.
Replace Power button with something else! (current, working method)​I've edited /system/usr/keylayout/generic.kl, making the POWER key become the VOLUME_MUTE key (which does not exist on my phone anyway).
Then, I use traditional button customizers to launch my own app on VOLUME_MUTE key long press, and simulate the POWER key on VOLUME_MUTE key short press.
However, there are a few drawbacks:
- POWER key does not work when screen off. I must wake my phone using other keys such as the HOME hard key.
- As the POWER key is simulated through an app, the response is slow. I have to wait a second before the screen actually turns off.
Hack to launch script from hardware keys? (not working)​Followed this guide to disable the power button's normal function.
Then I followed this guide to launch a script using the power button.
The script fails to launch, even after pressing on that button.
So, I'm asking whether there are:​- Any API or library (possibly Root or Xposed, preferably available on Xamarin), that helps me to replace the power off menu.
- Any patch to SystemUI.apk that might help me replace the menu.
- Any open source power menu replacing applications that are currently working.

Actually solved that problem by decompiling SystemUI.apk and messing around with GlobalActionsDialog.
showOrHideDialog()
Actually converted my Android 11 power off menu to this after a few simple tweaks.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

trungnt2910 said:
Actually solved that problem by decompiling SystemUI.apk and messing around with GlobalActionsDialog.
showOrHideDialog()
Actually converted my Android 11 power off menu to this after a few simple
trungnt2910 said:
Actually solved that problem by decompiling SystemUI.apk and messing around with GlobalActionsDialog.
showOrHideDialog()
Actually converted my Android 11 power off menu to this after a few simple tweaksView attachment 5322721
Click to expand...
Click to collapse
Click to expand...
Click to collapse
What tweeks you made brother?
I wanna add reboot to recovery to power menu without any app or module, can you please help me

razs.originals said:
What tweeks you made brother?
I wanna add reboot to recovery to power menu without any app or module, can you please help me
Click to expand...
Click to collapse
have u found a way yet !

Related

Is it possible to remap the volume Up/Down key?

I have try using AE Button Plus v2.6.6.2 with 21905 Energy ROM, and I have try to set either single press or long press of the "Volume Up" button for "33. Backlight Level" - "2.Backlight Up", it just repeat the "Volume Up" when i hold the (try to make a long press). Even I remap for "single press", it still work as "Volume Up".
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
May I know if there has any way to remap the "volume +/-" key? Or did I make any mistake in using AE Button Plus?
Thanks a lot!
On my t-mobile hd2 I have been unable to find ANYTHING that can change the vol up and down buttons...I've tried voldpad, aebuttons plus, and even the recently posted app to start the camera.....in all cases after running the apps vol up an down continue to work as normal..this has been true under the stock rom that came with it and the two rom's I tried it on afterward including a wm 6.5.3 rom (Elegancia)
Is there any update regarding this issue?
You should change the volume app on volume buttons from HTC's to windows' one and then AE Button will work. Try this cab, but make backup first because I had at least 2 hard resets before I found this cab (don't remember where by the way )
Thanks!
200mpx said:
You should change the volume app on volume buttons from HTC's to windows' one and then AE Button will work. Try this cab, but make backup first because I had at least 2 hard resets before I found this cab (don't remember where by the way )
Click to expand...
Click to collapse
Thanks 200mpx! You saved my life! I was really desperate, when I found, that AEButton would not work any more with ROM versions 3.14 up.
Now, everything is fine again and I am happy again to be able to se my Vol up/down keys on my HD2 for different quicklinks.
Thanks again!
200mpx said:
You should change the volume app on volume buttons from HTC's to windows' one and then AE Button will work. Try this cab, but make backup first because I had at least 2 hard resets before I found this cab (don't remember where by the way )
Click to expand...
Click to collapse
For some reason my volume buttons started to change the channels from my radio en
change the songs from my music player. They didn't control the volume anymore. I had
no idea what had happened or what to do about it.
I used the search button on XDA and found you had posted this Cab.
Thanks a million man, it solved the problem and everything is back to normal.
Caliber....
200mpx thank you very much! now all work!

How to remove soft buttons from navbar?

Hello all. I tried to search for it but didn't found anything.
I'm trying to remove some softkeys from a ROM for the Galaxy Note. The Galaxy Note has a hw home button and capacitive back and menu buttons. The thing is, I like tablet ROMs because they use the screen better, but all of them come with Home, Menu and Recent Apps soft buttons added. On TW modded roms you can also find a multiwindow button to launch apps in multiwindow mod (looks like a "^"). So I just want to keep this button (maybe Recent apps too, I'll decide it later). I know how to decompile apks and edit xml's. What I want to know is which apks I need to edit and which xmls in said apps I need to edit/remove entries. I already tried to edit SystemUI.apk and tw_systembar.xml (deleted the entries for Home and Back), but UI crashed on startup and never come up again. If you can point to a good tutorial, it would also be great!
Just to make it clear, this is what I want to do, from this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
to this:
Thanks a lot for your help, it's much appreciated!
did you find out how to remove these buttons?
you can try editing build.prop and typing qemu.hw.mainkeys=1 But i dont know if that works on tablet roms
Sent from my U8160 using xda premium
AragornPE said:
Hello all. I tried to search for it but didn't found anything.
I'm trying to remove some softkeys from a ROM for the Galaxy Note. The Galaxy Note has a hw home button and capacitive back and menu buttons. The thing is, I like tablet ROMs because they use the screen better, but all of them come with Home, Menu and Recent Apps soft buttons added. On TW modded roms you can also find a multiwindow button to launch apps in multiwindow mod (looks like a "^"). So I just want to keep this button (maybe Recent apps too, I'll decide it later). I know how to decompile apks and edit xml's. What I want to know is which apks I need to edit and which xmls in said apps I need to edit/remove entries. I already tried to edit SystemUI.apk and tw_systembar.xml (deleted the entries for Home and Back), but UI crashed on startup and never come up again. If you can point to a good tutorial, it would also be great!
Just to make it clear, this is what I want to do, from this:
to this:
Thanks a lot for your help, it's much appreciated!
Click to expand...
Click to collapse
Any clues? I want this mod also, thank you.

Recent Apps Close Button Disappeared !!

My Oneplus x was working fine . Recently i have noticed that my Recent Apps Close Button Just Disappeared and now i have to close individual app one by one by swiping. i think there is some bug with the software.
Is anyone noticed this bug also??
and also Please tell me that How to get back the recent app close button again .
Here is the Screenshot.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Mine disappeared as well
Mine too..go in safe mode..by switching off ur phone then power it on and keep volume up and down button pressed till it boots up in safe mode..there u vl find close recent apps working properly..then restart it vl come back fr few days..den repeat again..simple...
happens when Google search Updates to 6.0
Why do you want to close all Apps?
I dont know about the update. But as soon as you remove or deactivate Google search the button is gone.
Booting into Safe mode then boot normally the issue was sorted for me...
To get into safe mode follow the instructions
1.Power Down the OnePlus X
2. Hold the Power Button Until Android Starts to Boot Up
3. As Soon as Android Starts Booting Up, Let Go of the Power Button
4. Then Immediately Start Holding Both the Volume Up and Volume Down Buttons
5. Continue Holding Both Volume Buttons Until Android is Fully Booted
follow the instructions from this forum
For me a simple restart did the job and it never disappeared again atleast till now
For me both restart or save mode didn't solve the problem. But I think in my case there is no fix because I uninstalled Google search. With that the button is gone. Its a little bit strange because in my other phone I did the same but the button is still there (other phone is in CM12.1).

Help: deactivate original soft key on RN2

Post this on the thread 'bout CM12 by Jo-san but now it was closed... so I think better make a independent thread.
Could sb help me with soft nav keys: I love to use virtual nav bar and I can edit build.prop to have it on, but how to deactivate (permanently, or occasionally maybe...) the original soft key below the scr!? I mean to have them no functional and no light. Is it simple to only edit sys files or else!?
In stock MIUI ROM they have made a function to do this (deactive/reactive) in the quick toggle buttons... Could that be ported to other ROMs!?
And btw once I have virtual nav bar, how to mod it (transparency, immersive mode,....) like in LG G4!?
Thanks so much!
Try Gravity Box with Xposed installed.
I think it have everything u need
You can't disable the buttons below the screen with GravityBox, as far as I know. I was only able to turn off all the functions, including the soft keys.
quasimodo03a218 said:
Post this on the thread 'bout CM12 by Jo-san but now it was closed... so I think better make a independent thread.
Could sb help me with soft nav keys: I love to use virtual nav bar and I can edit build.prop to have it on, but how to deactivate (permanently, or occasionally maybe...) the original soft key below the scr!? I mean to have them no functional and no light. Is it simple to only edit sys files or else!?
In stock MIUI ROM they have made a function to do this (deactive/reactive) in the quick toggle buttons... Could that be ported to other ROMs!?
And btw once I have virtual nav bar, how to mod it (transparency, immersive mode,....) like in LG G4!?
Thanks so much!
Click to expand...
Click to collapse
Swapped down from the top screen to access the toggles page. Here you can deactivated the navigation buttons. Then Under setting → addtional setting → button, to off the navigating button light. Hope it help.
Sent from my Redmi Note 2 using Tapatalk
Go to /system/usr/keylayout
Find Generic.kl and edit with an editor.
Put a # and a space in front of;
key 139 menu
key 158 back
key 172 home
Go to /system and open build.prop with an editor. Change;
qemu.hw.mainkeys=1 to qemu.hw.mainkeys=0
Dont forget to make backups first.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
dedebekri said:
Go to /system/usr/keylayout
Find Generic.kl and edit with an editor.
Put a # and a space in front of;
key 139 menu
key 158 back
key 172 home
Go to /system and open build.prop with an editor. Change;
qemu.hw.mainkeys=1 to qemu.hw.mainkeys=0
Dont forget to make backups first.
View attachment 3572895
View attachment 3572896
Click to expand...
Click to collapse
Great guide! Thanks man!!!

Changing language to a pseudolocale and restarting bricked my XZ1

Hi,
I have already posted the full description here in the noob-friendly help thread but I thought I might get a few tips directly here.
TLDR: Developer options enabled -> Language settings -> Add language cibarA [XB] (Arabic in reverse) -> Set it as the top / main language -> Restart the phone -> Booting gets stuck in a semi-turned-on state, where system UI is not loaded (so I cant even fully unlock the phone), but the system is kind of running.
To illustrate cibarA [XB] language:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Any ideas on what I can do now to be able to get it working again? Eg. changing the locale to English somehow through an alternative way which doesnt involve ui confirmations?
Ill post this as a subquestion - I would love to try recovery mode, but no matter how I try I cannot get there.
Tried:
- holding volume up when powering on
- holding volume down when powering on
- holding both volume buttons when powering on
- rapidly pressing volume up after Sony shows up
- rapidly pressing volume down after Sony shows up
But only managed to get into Safe mode instead (dont remember which case it was).
What is the correct way to do that on XZ1?
Mizumaky said:
Ill post this as a subquestion - I would love to try recovery mode, but no matter how I try I cannot get there.
Tried:
- holding volume up when powering on
- holding volume down when powering on
- holding both volume buttons when powering on
- rapidly pressing volume up after Sony shows up
- rapidly pressing volume down after Sony shows up
But only managed to get into Safe mode instead (dont remember which case it was).
What is the correct way to do that on XZ1?
Click to expand...
Click to collapse
Did you try with device off pressing volume up while you connect to PC? If I don´t remember bad from my last Sony device the connection to flash mode and fastboot mode are done either pressing volume down or volume up while you connect to the PC, a short vibration might happens and the led light turns either green or blue. Or try using the option reboot and keep pressing volume down (not power key).

Categories

Resources