Install this: https://play.google.com/store/apps/details?id=org.jraf.android.nolock&hl=en_US
Non play store link (It's a free app): https://apkpure.com/no-lock/org.jraf.android.nolock
Just install hit the big unlock button when you start the app, thats it!
Does take a moment to start on each activation / boot, won't notice it unless you try to immediately sleep then resume.
Was surprisingly hard to figure out this seemingly simple tweak, so figured I'd post it here. Just got a Nintendo switch and thought the instant resume was pretty nifty, wondered why the Xplay didn't do that so thought I'd look into it.
Tried a few other methods, first by enabling then disabling the custom lock screen in smart launcher, which worked but only for that boot.
Then tried an app called antilocker, which has an launch on boot function, which doesn't seem to work. So again it only works for that boot and you gotta redo it each time.
No Lock luckily just works!
If you want to customize which keys wake the phone just edit the files in /system/usr/keylayout/
Pretty simple to figure out, just add or remove WAKE_DROPPED from the key entry you want.
For example I copy the Switch and have it set to just be the power button that wakes.
Also considering making all the gamepad keys wake.
Another thing you can do with keybinds is make the volume buttons l2/r2 buttons, just copy the r1/r2 entries but change the number, removing the volume_up and down entries at the same time.
This will disable the volume function ofc, but let you use them as shoulder buttons in other apps, including the built in PSXPeria emulator!
To get volume buttons back you can use this app to make the shoulder buttons work as them. https://forum.xda-developers.com/showthread.php?t=1262314
I haven't tested it but I bet you could switch the volume buttons to be the l1/r1 buttons and I bet it'd think they were the shoulder buttons.
Edit: Tested, unfortunately doesn't work.
the volume to l1 r1 function would be very interesting for psx games...i don´t have a switch so i don´t exactly know what the instant resume function
Related
I'd like to be able to hold a button (other than Button 5) and have it execute a command/program. Can it be done?
ie. Hold OK button to launch X program? I've googled with no luck.
Search the forums. There is a thread by Sleuth255 (?) with the title PTT Function Hacked or something similar.
I found that thread. But it's doing what my TyTN does anyways... allows you to hold the button 5 and launch. I need that function for the other buttons as well.... unless I'm missing something.
i use ae button plus for this.
its free on a trial with a popup on phone phone startup, or $7 to unlock.
its FANTASTIC. interface isn't overly intuative to setup, but basicly you can have
1 click, 2 click, 3 clicks and press to hold on *all* the hardware buttons do different things.
its also got a reasonalbe app switcher built in, and way to turn the screen off and lock the keys if you want your media to keep playing when the phone in in a lower power state. *(not sure how much this saves in terms of power, but the key lock is why i use it)
For example,
my internet button (up and right of screen) is now set to
1 click - Load IE,
2 click - Load MusicID (listens to any song being played and then tells you the artist and track)
3 click - Load tomtom (usfull so i can switch between messages/phone calls and tomtom when driving quickly.
press and hold - turn off screen and lock keys for media playback.
Wish it was more popular i think its a fantastic application! you should give it ago.
as an aside note, i think there is a reg hack to do the press and hold on other buttons, but honestly do your self a favour and try
http://ae.inc.ru/aebplus.php
(website looks Naff!!! but good app)
Thank you. Exactly what I need. Cheers.
Ok, I searched and can't find anything on this. Any thoughts?
FYI...Im using CM7
Thanks.
Sent from my NookColor using XDA Premium App
ramiss said:
Ok, I searched and can't find anything on this. Any thoughts?
FYI...Im using CM7
Thanks.
Sent from my NookColor using XDA Premium App
Click to expand...
Click to collapse
I don't know that you can stop one of the 4 inputs from waking up the hardware, but...
You can define the 'n' button to do something that doesn't offend you and set your screen to sleep after a very brief moment (15 seconds).
Why do you want to change the hardward button behavior?
byronczimmer said:
Why do you want to change the hardward button behavior?
Click to expand...
Click to collapse
Hi, thanks for answering. The reason for this request is because the screen keeps waking up as it moves around in my bag. Just lightly pushing on the case/cover I use will activate the button and leave the screen on until the timeout. I am surprised this isn't an issue for more people (or perhaps people aren't noticing their nook turning on.)
Lowering the timeout is not going to work since I do a lot of reading and having to tap the screen every 15 seconds would be a pain. Unless anyone has figured out how to get screebl to work??
You can completely disable the "N" button by editing the keyboard layout file. Using Root Explorer (paid app - but WELL worth it!) or equivalent, navigate to SYSTEM>USR>KEYLAYOUT then click the button at the top to "Mount R/W", now long-press the file "qwerty.kl" and choose "Open in Text Editor". Then find the following line:
Code:
key 102 HOME WAKE
and simply add a # to the beginning of that line so that it looks like this:
Code:
#key 102 HOME WAKE
Now press your MENU button and choose "Save & Exit". You'll need to reboot the Nook for the change to take effect.
Now your N button should be completely disabled. Just make sure you have the soft keys set up with a home button so you'll have a way to use that functionality when needed.
If you want to maintain the functionality of the "N" button but just prevent it from waking the Nook, simply remove the word WAKE from that line and don't insert the # character. I haven't tried this implementation, but it should work fine.
If you did what jason suggest, make sure you not hide the status bar.
You can change the "unhide" button to something else in Tablet Tweaks or you can use the long-press Power menu option which is also in Tablet Tweaks.
911jason - thanks for that.
Running CM7.0.3 from sdcard, used Root Explorer to find and edit the keyboard layout file.
Simply removed WAKE from the home button as suggested.
Works beautifully. Doesn't wake the device, yet does all the other stuff it's supposed to.
Score one victory for increased battery life for shared knowledge.
I have a soft case and it gets turned on in my pocket.
I went ahead and also removed WAKE from the volume up and down buttons.
Now the only way to wake the screen is the power button. The way my case is, that's the one button that won't get pressed in daily travel.
(don't know if reboot is necessary, but i'd assume so, and did after each change before testing)
Thanks!
TCAndroid said:
911jason - thanks for that.
Running CM7.0.3 from sdcard, used Root Explorer to find and edit the keyboard layout file.
[ ... ]
I went ahead and also removed WAKE from the volume up and down buttons.
Click to expand...
Click to collapse
I also took WAKE off the volume keys, because I tend to reach into my bag and adjust the volume while walking or waiting for the train. My buttons don't tend to get pressed, since my bag is for a netbook and my uncased NC doesn't rattle around. However, after adjusting the volume, the screen was live and the bag and its contents sometimes made random touches all over the screen...
The volume buttons now work exactly the way I want! Thanks for the very clueful answer to this question!
Of course, now I have another thing to do every time I update my ROM. I should learn how to make update scripts!
I am curious why HOME has WAKE and not WAKE_DROPPED, when it appears to behave like WAKE_DROPPED.
From what I understand, WAKE_DROPPED causes the device to wake from sleep but does not send the command normally associated with the button that was pressed. WAKE will wake from sleep and also send the command after doing so.
911jason said:
From what I understand, WAKE_DROPPED causes the device to wake from sleep but does not send the command normally associated with the button that was pressed. WAKE will wake from sleep and also send the command after doing so.
Click to expand...
Click to collapse
Exactly so. HOME acts like WAKE_DROPPED, doesn't it? But it's marked WAKE.
Actually, yes, you're right... just realized that. Not sure why it's behaving that way.
I'm looking for a way to pause and resume media without interacting with the touchscreen. I don't care if it also wakes the screen, and I'm willing to remap a volume button to menu, camera, or whatever if necessary, though I would prefer just mapping it to a long-press, or better yet to the power button so that all media controls would be accessible without opening my case.
Are there any options?
Well, I have one less-than-ideal method:
Taosaur said:
1. install Media Keys app to add media controls to my shortcuts menu
2. use keysmod/NookKey Editor to map Menu to Vol- (I'd rather keep Vol-)
3. map play/pause to Menu longpress in CM Input settings
4. disable lock screen (I'd rather keep security)
5. use Power to wake the device, then longpress Vol- (now Menu)
Click to expand...
Click to collapse
Now, I'm already using the "Volume button music controls" setting which maps next/previous skip buttons to Vol+/- longpress when the screen is off. Does anyone conversant with ADB know a way I could swap in play/pause for previous on the Vol- key?
It would be ideal if I could map that behavior to the Home button; all it does now is wake the screen, which Power duplicates, but I suspect the framework is already in place for the Volume buttons, and it might be as simple as swapping one line of code for another.
I'm trying to submit more versatile "Volume button music controls" as a feature request for CM7, too, but if anyone has a more immediate solution I can implement myself, I'd like to give it a try.
A minor elaboration on the method above: keysmod lets me set the Vol- button (now Menu) as wake-on-press, so I can click it once to wake, then long-press to play/pause. Oddly enough, the long-press doesn't work if I left Google Music Beta (or probably any media player) on-screen when the NC went to sleep. I haven't tested extensively, but it's possible other apps would block the long-press behavior, too. So, for it to work reliably, you want to return to your homescreen before putting the NC to sleep.
Also, if nothing is playing, the long-press will start the default Music app. If another media player (including Google Music Beta) is playing, it will pause and resume that app.
I've poked my head into the CM7 code, but don't have so much as a toehold on tracking down and replacing the relevant bit of code to swap play/pause for previous track in the Volume button music controls setting. If any higher-level nerds than myself can offer a clue, it would be much appreciated.
ETA: My workaround is basically serviceable for using the NC as a PMP or bedside player, particularly for audiobooks where play/pause is going to be considerably more important than Vol-. If you're anxious that keysmod may affect Vol+/- functions in the CM7 boot menu or CMW, I can confirm that no, as expected, it does not.
/edit: this guide is now obsolete because Xposed Additions now has button remapping with some advanced options, which also seem to enable volume wake on my HTC One
If you hate locking and unlocking your HTC One with the Power button, you can change that quite easily int for example Volume Down.
ButtonRemapper would be the easiest method, but it doesn't work with the HTC One. It doesn't load the correct file.
The solution: simply edit the correct file
Code:
keypad_8960.kl
found in
Code:
/system/urs/keylayout/
by hand (I used Fx File Explorer with the paid Root plugin) and reboot your phone. My edited file is attached on this post.
Original:
Code:
key 116 POWER WAKE_DROPPED
key 114 VOLUME_DOWN WAKE
key 115 VOLUME_UP WAKE
key 107 ENDCALL WAKE_DROPPED
My current file that switches the Volume Down and Power button:
Code:
key 116 VOLUME_DOWN WAKE
key 114 POWER WAKE_DROPPED
key 115 VOLUME_UP WAKE
key 107 ENDCALL WAKE_DROPPED
I don't know if the same file is used on different ROMs. I tested this on the P.A.C. Man ROM.
Now waking my One is a breeze! :laugh:
P.S. You may need the following workaround to fix the 'volume wake not working' bug present in some (or all?) JB ROMs, which strangely also affects this tweak (symptom: volume down won't wake phone sometimes).
1. Install Xposed Framework (which you should anyway, it's awesome)
2. Install MoDaCo Toolkit
3. Wait for the annoying ad (Paul, tsk, tsk) and enable the option 'HTC One > Enable Volume Wake'
4. Enable MoDaCo Toolkit in Xposed
5. Reboot
6. Profit ^_^
Is there a way to remap volume keys to change song when double clicked or something?
dare2k said:
Is there a way to remap volume keys to change song when double clicked or something?
Click to expand...
Click to collapse
I'm not sure, but when there is, I think it's not done with this or another .kl file but with a 'ROM tweak', like AOKP settings.
But remapping it that way does it mean if you want to lower the volume you press the power button?
Sent from my HTC One using Tapatalk 2
baste07 said:
But remapping it that way does it mean if you want to lower the volume you press the power button?
Sent from my HTC One using Tapatalk 2
Click to expand...
Click to collapse
Correct. I'm currently having the issue that my phone won't always wake using the remapped Power button, or only after 4 seconds holding it. I think it's a conflict with my ROM settings though.
While locking the phone with volume down would be nice, it prevents you from turning the volume down/vibrate/off. Which is pretty important.
Although you could alternatively hit Volume Up and then drag the slider via the touchscreen.
BTW I tried this on TrickDroid 4.2.2 and it works.
Syn Ack said:
While locking the phone with volume down would be nice, it prevents you from turning the volume down/vibrate/off. Which is pretty important.
Although you could alternatively hit Volume Up and then drag the slider via the touchscreen.
Click to expand...
Click to collapse
Actually, the adjustment only swaps the buttons, so the physical Power button acts as Volume Down
I'm still having issues with the adjustment though, has anyone tried it and got it working correctly all the time? I also edited Generic.kl and qwerty.kl, but that didn't help. Pacman ROM 2.9.
Is there any way to use his once you're in the camera . Since we don't have a dedicated camera button it would be great to set up the volume key to take pictures ?
Sent from my HTC One using xda app-developers app
Volume wake bug workaround added to OP.
Problem...
jelbo said:
Volume wake bug workaround added to OP.
Click to expand...
Click to collapse
I have multiple problems guys:
Rooted...double checked if it's rooted (htc one) - then installed Xposed...mods...guess what? it worked for a few hours then all of the sudden...Framework disabled...pushed Install again...and then one of 2 things happen:
1 - phone reboots
2 - Installed and notification for SU....but when restarting my phone the framework it's NOT installed....wtf?!?
Solutions errybody
jelbo said:
Correct. I'm currently having the issue that my phone won't always wake using the remapped Power button, or only after 4 seconds holding it. I think it's a conflict with my ROM settings though.
Click to expand...
Click to collapse
PERMANENT FIX: This problem is caused when the phone enters Deep Sleep mode, the processor stops listening to the .kl files and is pre-programmed to listen on the power button. --On mine, I was completely unable to turn the phone on, I figured out thought that I could turn it on is by holding the power button and the configured volume button at the same time, like a screenshot, hope this helps somebody.-- To permanently fix this download "Wake My Android Pro (free)" from the Play Store, this app is specifically designed to keep your phone in the "Sleep" mode and preventing it from entering the "Deep Sleep" mode. **This does not drain your battery.** Just make sure to set "Low Wake" in the settings, and set the time to 9 seconds and auto-start. Hope this helps some people, those who do not want to fiddle around with Xposed.
dare2k said:
Is there a way to remap volume keys to change song when double clicked or something?
Click to expand...
Click to collapse
This you can do via Tasker. Just create a profile: Event, Variable Set: Volume - Media. This will pick up the volume presses, from there you can restore the volume to what it was (via stored variable) and detect double-presses or gestures between the vol-up and vol-down buttons. I recommend running Javascript to detect that, to be more streamlined. Once detected, use the Media Control action to skip/restart/pause songs in OEM, or if you use Spotify or Pandora, you will have to use a shell "input keyevent 87" Use Root: Yes--87 to skip, swap it with 88 for previous, 85 to play/pause.
rollsrd said:
Is there any way to use his once you're in the camera . Since we don't have a dedicated camera button it would be great to set up the volume key to take pictures ?
Click to expand...
Click to collapse
This can be achieved with Tasker as well. Use a profile "Application," select Camera, and combine with an Event (by long-pressing profile and "Add...") Variable Set: Volume - Ringer. For the action, select Input>Button>Camera. You must be rooted.
If we combine this button swapping idea with Tasker, we can do a lot of cool things guys. An easy way to pick up an easy button gesture with Tasker is with the power button (which always works from sleep, the volume buttons can only be detected when music is playing). I use Tasker to do a certain action when the power button is double-clicked (Display On>Display Off within, say, 1 or 2 seconds).
Hope all was a help, I am new to XDA (*NOT* a noob!) and actually, this is my first post, so a thumbs up or a "thank you" or whatever you guys call it would be great. Thanks! :good:
Hi,
I've been using CyanogenMod 10.2 on my Nexus 4, but I changed back to Stock Android. But now I'm missing a very useful option: the option to use the volume keys for skipping the Musik when the screen is on and I would like to use it now on Stock Android. The Apps in the Play Store don't work like I want, on one hand they don't work that good and on the other hand they only change the volume control to musik control, but I want to use both (short press for volme up/down, long press for next/previous title) so I thought I could use the ButtonRemapper or Tasker to make this real. But I can't find a function for "long press" in the ButtonRemapper or the possibility to have two things on one button or, in ideally a way to only activate it when the screen is turned off. And in Tasker (I only have the free version now for testing) I can't find a way too, so there would only be the possibility of a script for all I know.
Is there any way to solve my problem?
BTW: I have Android 4.3, rooted. And I need an "step-by-step-walkthrough", especially when I need a script because I don't know anything about scripting, so please have understanding when I need an easy way for that.
Works now with Xposed Framework...