AutoInput Disable Power Button [Samsung Galaxy S5 SM-G900T, CM12.1]

Discussion in 'AutoApps' started by i5lee86it, Jul 8, 2015.

  1. i5lee86it

    i5lee86it New Member

    May 31, 2015
    Likes Received:
    Hi all, I'm running SOKP (CM12.1 Android LP 5.1.1 based) ROM on a Samsung Galaxy S5 (T-Mobile) model.

    Problem: I would like to be able to supress the power button from making any action. Essentially disable the power button.

    AutoInput Modes -> Suppress Key seemed very promising, especially considering after doing additional research, AutoInput only reroutes actions when the screen is on. Perfect for my application (say somehow the phone did go to sleep, I can still wake). Anyway, problem is it seems to suppress any key successfully... EXCEPT for the power button. =(

    Before I get any backlash or lessons on the usefulness of a functioning power button (sarcasm), here is my application for using it this way. I have a task set up that upon connecting to my car bluetooth: to launch ARUR, car mode, change media volume, enable wifi tethering, automatically cast screen to the chromecast behind my head unit, dim backlight (pretty much invisible, good on AMOLED screen), launch carhome ultra, poweramp, etc. etc. etc and anything inbetween. Basically mirror my phone to my head unit with touch controls, all without pulling the phone out of my pocket. Biggest problem right now is that once ARUR connects, if I ever accidentally hit the power button and the display goes to sleep, it crashes the phone in such a wonderfully inconvenient way that it flashes on and off and at that point I need to pull over and reboot the phone manually. It also crashes the system UI in such a way I need to reset my wallpaper.

    Xposed Additions isn't an option. For a while, I actually ran a mega AutoInput task to go through the menus and remap Power Button to Home. But I had to introduce additional tasks to lock rotation because if it wasn't in portrait mode, it wouldn't see everything in the menus and freeze the task. Eventually this introduced other small bugs that made the process hit or miss, which sucks (and is dangerous) when you're already on the road. I have it set at this point where it's always 100% successful, until I accidentally hit that blasted power button!! Considering AOSP Camera as an app itself can use power button as shutter (take picture) button, there's gotta be some way, whether with AutoInput or something else (like learning to write Android Apps... phooey).

    So basically, anyone can help me out and/or have experience with disabling the power button? I would really appreciate it. =)
  2. Daniel D

    Daniel D Member

    Feb 11, 2015
    Likes Received:
    I'm sorry for not directly help you with the subject of this thread, but...
    The behavior of this application seems erratic at best. I bet you've done your research on the subject so I'm asking you: Is the problem you are describing something affecting many users? Did you get in contact with the developer (for the money you've payed, you're surely entitled to get some attention from him/her)?
    On another note, you could try a custom kernel (like ElementalX) that would allow you to set the illumination value to 0. That way the screen would be totally dark but still active.
  3. joaomgcd

    joaomgcd Administrator Staff Member

    Feb 3, 2015
    Likes Received:
    Unfortunately the power button is the only one that can't be intercepted/disabled/remapped without root. I'm guessing that Google didn't want a user to accidentally not be able to reboot the device at all :)


Share This Page