[Q][Huawei U8150] End button behavior - Android Software/Hacking General [Developers Only]

Hi all, I want to try Cyanogenmod 7 (latest nightly of course), but I realized that the end button (red end call button) behavior is different from the stock rom. The stock rom behavior is:
if not in home screen -> go to home screen
if in home screen -> do nothing
if locked and screen turned on -> turn screen off
everything else -> do nothing
Notice that pressing the end button seems to be different than pressing the home button: if the current foreground activity does not respond, home button won't work (ANR window will show up); end button, instead, will simply go to home screen, like if it's killing the current activity. However, relaunching the closed activity restores its previous state (like when I use the home button to get away from an activity).
Cyanogenmod has stock gingerbread behavior (which should be fine, I know it's the android way), but I really would like to preserve my habits.
I already tried:
Spare parts: does not have the option I'd like
Remapping keys via keymaps: doesn't work since behavior cannot be defined using the available built-in commands
I'll get my hands dirty in the Android code if necessary (I'm a developer), but I really want to know if there is another way before looking at the source code.

Related

[Q] Restore HOME function?

AppDog killed my tablet's home button functionality...
For those of you unfamiliar with it, AppDog pays you a couple cents at a time for trying out new apps (pays out in Facebook credits). I had tried it on Bluestacks and it worked just fine. When I tried it on my tablet, things got all screwy. Once I installed it, it took over control of my Home buttons. The on-screen home button would bring me back to AppDog instead of to Launcher, and the hard button now acts as a "back" button instead of "home".
I uninstalled AppDog, but it didn't fix anything. The hard button still acts as a back button, and the on-screen home button now does nothing at all.
How do I restore the functionality of the home buttons? It's a huge pain to have to manually back out of whatever I'm doing (esp. when browsing the web, as I have to back through every page I've visited)
My tablet is a 7" Craig model CMP741e running ICS 4.0.3, factory rooted.
A side note, I'm not sure if this was caused by the same app, but I'm missing some options in my Settings (i.e. Dev Options doesn't show up unless I'm plugged into my PC)

ANDROID: Getting HW Key to trigger Event in Service

I am starting an Android app (on my Galaxy Note 2). It is Rooted.
While the screen is off (or on) i want to be able to double tap a hardware key (ie. Power Button) and this triggers an event within my foreground / background service. If the screen is off, i want the screen to remain off. This is a development project so i require source code to make this happen. I will have root access so if i must programmatically modify standard items on an Android device then so be it.
Can you please recommend articles to help me compose all of the above. The best i've found so far is to replace the default Home Launcher with my own then time it for a double press otherwise launch the default home launcher. I'm still reviewing its limitations.
Thanks

[Q][HELP] Weird CM11S bug: software keys configuration is not saved.

I got my OnePlus One 64 GB, Indian edition (so no updates from CM) 2 days ago. I quickly switched to software keys (creature of habit, previous phone had them). My personal preference for software navigation keys is to place the back button on the right side and the multitasking one on the left, plus a rightmost toggle for search button/magnifying glass (I find this configuration very productive). I use the following process to change them:
1. Settings->Buttons
2. Software buttons layout->Lock icon
3. Make changes->Lock icon again to save changes
The said changes are reflected, and I'm able to observe them.... until the device locks. After unlocking, the software keys are reset to the default configuration: back key, home and multitasking button. I've tried rebooting the device and it doesn't help. Only thing I've changed in the device is switching to ART, everything else is stock. Can't wrap my head around the issue, so any help would be appreciated. Thanks!

[Q] Remap volume-up button to power button

Hello all,
Recently the power button on my Nexus 5 has been acting really weird. Sometimes it works flawlessly, others it requires pressing it really hard to work. In order to prevent it to stop working indefinetely, I am looking for a way to remap my volume-up button so it can work as a power button. I don't need it to turn my phone on or to work in the recovery mode (from what I read, it seems to be impossible), only when Android is running.
I've already tried some workarounds:
1) Volume Unlock Power Button Fix app: I tried it, but it just allowed me to turn on my phone with volume but not turning off. Also, it drains a LOT of power.
2) Buttonremapper app: It would theoretically do exactly what I wanted, but did not work at all.
3) Editing generic.kl: I tried switching volume-up and power buttons codes in generic.kl, but also did not work. Maybe I need to modify another file?
3) Xposed Framework + Additions: The installation of Xposed went Ok, but after installing Additions module I got stucked in bootloop. I am running Android 5.1 stock, maybe this module is not yet compatible.
So, can anyone help me? Do I need to install a custom ROM?
PS: I live outside US, so no warranty for me. Otherwise I would just use it
Thanks in advance for any help!
Cheers,
Humberto
Hi folks,
Just a heads up for anyone who might be facing the same issue. I decided to change from stock to Cataclysm ROM due to some specific features (listed below). After the installation, here's what I did to work around this problem:
1) Enabled "Volume wake" and "Sleep button on status bar" in "Cataclysm Settings / Miscellaneous".
2) Enabled "Swipe to sleep" and resized NavBar to 115% in "Cataclysm Settings / Navigation bar options". -> This way I can swipe in NavBar at any time (except lockscreen) to turn off screen. I raised it a little to facilitate the swipe gesture.
3) Changed Lockscreen Dialer shortcut to ""Turn off Screen" app shortcut (just search for it in the play store) in "Cataclysm Settings / Lockscreen options" -> This allows me to just swipe right and turn off the screen when my security settings are disabled (which accounts for most of the time). I found it way faster than pressing sleep button in status bar, especially when I'm driving and I can't look at the screen. Plus, I don't really use the dialer function of my phone so often since the invention of Whatsapp ;P
I realize this is not the perfect solution, but I don't see a better way to deal with this power button malfunction problem (except from a hardware fix).
Hope this helps!
Cheers,
Humberto
PS: I am really enjoying Cataclysm. It's a very nice ROM, completely stable and with a lot of other interesting features aside from the ones mentioned above. I strongly encourage anyone to give it a try!
I'm facing the exact same problem but I really need to eliminate the power button or I will need a power button fix soon.
The solutions you found hthiengo are good if not needing to turn off (or worst: running out of battery, something that happens me sometimes). I'm in the situation that next time I hit power button I will need to replace the button, or throw the nexus away
I did installed the xposed additions for lollipop but it is not working, and the Cataclysm trick is not enough in this case
Ok, after some research I've found a temporary solution:
For the power button you can remap modifying the file gpio-keys.kl under system/usr/keylaout (i wonder why anyone could figure out thise before, no that difficult). I would like to map power button leeaving it useless but I've found it impossible to remap the power button (probably because the key number is not 116). I would have liked to see xposed additions to help me map the keys but is not functional at least for me.
If the phone runs out of battery I've found that if I plug the power cable by pressing both volume buttons at the same time, eventually it starts up with the bootloader so I can plug the pc cable and it will reboot sucessfully.
So despite the phone know is pretty disfunctional (not the best phone for a hurry without battery), I can still use it for some weeks before I plan buying a new one or something (or I find a place for reparing). Its a shame I could not find a better solution for example, ADT when powered off so I could just reboot it by using ADT reboot command while powered off.
And It would be really amazing if the volume up button could also power it on from the powered off state.
In my case the power button is broken, but sometimes it gets stuck and puts the phone in a reboot loop: To avoid pressing the power button accidentally I've made a hole in the protective case so its pretty difficult to access it.
That's all for now. If anyone can make it better I will be glad to hear him/her

Hard Buttons Acting as they were held for sometime!?

I have a stock Galaxy S6 with stock ROM and no mods at all.
Problem:
The problem started couple months ago where when I tap the back capactive key it acts like it was on hold for a time so it triggers the options context menu of the current app. That would trigger on some apps most of the time, another apps will sometimes pass, sometimes have the problem.
Here is exactly what happens when I tap the back key:
Tap *Vibration to let me know the hardware received my gesture*
No action
Tap again *no vibration this time - phone trying to complete (on its own) the time needed for the key to be held to trigger the HOLD action and open the options menu on the currently active app*
After some time, option menu (eg. settings menu on the top right corner of Whatsapp for example opens up)
This exact process happens so fast, and was inconsistent so I acted as if it was never there, and after sometime, it was gone for a short period of time, until Today, the problem reoccured again but now with the home button and the recent button.. Back button is fully working now.
Home button: Triggers Google Assistant
Recent button: Triggers Split View
I restarted my phone and now it's gone, but I know it is coming back.
I think it is not a hardware issue, how do I fix that annoying issue?
Current Version Info:
SM-G920F
Baseband: G920FXXU6ERCA
Android 7.0
Security Patch Level: March 1, 2018

Categories

Resources