Modify/Disable HW Volume Buttons? [CM10] - Samsung Galaxy Tab Plus

Hey guys. I have found talk in various places about modifying the keylayout file(s) to change or disable HW button functionality.
I am running CM10 on my SGH-T869.
Within my /system/usr/keylayout/ directory I have a bunch of KL files but nothing that appears to govern the behavior of the device itself.
Files present include AVRCP.kl, Generic.kl, qwerty.kl, sec_keyboard.kl, and a bunch of Vendor_some_numbers.kl's.
All are commented,so, assuming the comments are correct, the vendor files are for various gaming input devices, like the Xbox 360, PS3, Logitech Racing Wheel, Logitech dual stick controller, etc, and an Apple BlueTooth keyboard.
The other files are for AVRCP control (glad I found this so I can disable WAKE on track change finally ), and also generic keyboard input devices.
All other devices I have found mods for have files with more specific / descriptive names like "sec_powerkey.lk", "sec_touchkey.kl", etc.
My goal is ideally to disable the HW volume buttons when the device has been locked, to prevent volume changes occuring accidentally. I'm fairly certain this sort of conditional disabling isn't possible, so I was planning on just globally disabling the volume up / down buttons. I use BlueTooth headphones with their own volume control, so my device's built-in volume is always left at maximum.
Any guidance or assistance on where to look would be most appreciated.

"Persist" app free in play store... locks volume while device is locked.. very helpful..

Related

[Q] Adding the ability to LONG press volume keys to change music track

I'm currently running Dronix 0.4 on my T-Mobile Comet (Ideos U8150). LOVE this ROM. Stable and smooth, and the only one for my comet that the multitouch actually works!
I've been trying desperately to figure out how to make the volume keys change music tracks when you LONG press on them. I was able to make them change tracks with a short press by simply editing the key layout .kl file in System/usr/keylayout, but then you can't actually adjust the volume with them. I know a few other ROMs do indeed let you control music tracks this way, and still have the volume functionality for short presses.
From what I've read, however, this is hard-coded in the kernel or something? Is there a way, without knowing how to make my own kernel, to simply update or replace something in the system files in order to get this working?
I've even tried using PowerAMP for my music, but still cannot use the volume keys to change tracks.
Please let me know, thanks in advance!

[Q] Market apps can't pick up or control wired headset, reassinging keycode works?

I recently got a Skullcandy wired headset that has a built in mic and the small button that can be used for routing calls. There are a number of third party apps to control more closely the actions of wired headsets, most notably "Headset Button Controller", but there are other free ones, or other ones that say they're for specific headsets and are supposed to work across the board, etc.
When the headset's plugged in and I press the button, it does register somehow in that the OS (AreaRom on Galaxy Precedent, gingerbread based) tries to do something funny like call the last person I talked to or start voice recognition. But I'm not sure exactly what it's doing. On all the third party apps for controlling headsets, I never got any change in the limited and buggy behavior of the headset button. On the "Headset Button Controller", for debug I checked the button to alert when the button was pressed, and it looks like it wasn't picking it up.
But what I *was* able to do was find the keycode (231, if it matters) using the key number tracker helper that comes with the Button Remapper app (floating around here on the forums) and remap it accordingly. After I did that, I could assign one, but only one, function to it. I chose the skip track function. The apps that are on the market allow you to control single tap, long tap, etc. Would also like to be able to pause...
Since I have this kind of limited control, I wonder if it's an issue with the third party apps expecting a certain keycode? is there something that I could remap the button to that these apps would be expecting to get?
If anyone has ideas please let me know, and hopefully I can help someone with the remapping tip, which gives limited functionality to that button for me as of now.

A way to detect volume rocker presses on low level

OK, here's the deal: Android services, unlike activities, are unable to capture keypresses via i.e. onKeyDown(). That makes it hard for services that for example play music to detect volume rocker presses. Capturing them is possible, as Voodoo Louder somehow detects it, but unfortunately Voodoo author is not willing to share his secret. So question to you hackers - is there any other way for service to capture volume button presses, beside the one I've posted on stack exchange, the one that employs ContentObserver? Some low level kernel access point? Something in /dev/ ? Note that my device doesn't have /dev/event0, as supposed here:
http://www.kandroid.org/online-pdk/guide/keymaps_keyboard_input.html

[Q] Headphone Volume + Track Inputs?

Please forgive me if this has been answered before, my searches have not resulted in the answer I seek.
I'm seeking to create a remote control for changing tracks while using my Galaxy S2 in the car, so that I don't have to pick up the phone and take my eyes off the road to skip songs.
On my S2 and Note 10.1, the Samsung headphones have three controls: play/pause, volume up and volume down. There's no discrete button(s) for track control (NEXT / PREV) but I see that such controls do exist.
This is what I've found for track control:
wisebread.com/build-a-cable-to-control-your-android-phone-while-you-drive
but I've found no similar schematics for volume control.
In testing, it seems my Samsung remote uses 50, 200 and 440 Ohms for play, V+ and V-. I'm guessing then that this is the standard for inputs, and how it's handled is device specific.
My question is: do headset controls for Samsung devices exist that have buttons for track control, or do they all require double/triple-tapping the play/pause button? Or am I correct in assuming it's one or the other, using the same resistance on the buttons, with the actual function being device dependent?
tl;dr - Are there headphone remotes with volume control AND track control?
Hey there
the PowerAMP player has the function to use the volume buttons for skipping tracks.
if that is what you are looking for maybe will be a good possibillity
i use this player as well.
and i use this feature in the car every day. when i wanna change audio tracks and dont want to crash into the next tree this is perfect.
i hope i could help you
Rah
RahXephon91 said:
the PowerAMP player has the function to use the volume buttons for skipping tracks.
i hope i could help you
Click to expand...
Click to collapse
Thanks Rah, that is helpful. It doesn't answer the question, but gives me an alternative solution to the problem. =)
And yeah, I love PowerAmp. I didn't know it had this feature, though I've been using it for a couple of years. Thanks!

volume control with buttonless MTCE

Hello all,
So I purchased a buttonless PX5:
https://www.aliexpress.com/item/And...32849648099.html?spm=a2g0s.9042311.0.0.qvQ36y
However, none of the Android widgets or volume buttons work to control the volume.
Only the little button off to the top right corner does anything.
I feel like I'm going to crash my car, constantly hunting for that thing.
Is there anyway to patch/hack this thing to respond to something like a virtual volume slider like this?
https://play.google.com/store/apps/details?id=com.clownface.volumeslider
Thanks!
Why do you need onscreen volume? Didnt you have a CAN and steering wheel controls? The volume control on HU is not the same as on smartphones. It has controlled by MCU board where android board sends special commands from the headunit service.
My car came with a sport package, which meant smaller diameter steering wheel and therefore no wheel controls
That being said, the sound slider via settings menu is indeed able to control the volume via onscreen controls. It just doesn't seem to respond to the normal android media controls, is there a way to link the two together?
Then the simplest way is to use infrared remote control (if your HU has it) or to buy universal resistive SWC and connect it to Key-wires.
xtracrispy said:
That being said, the sound slider via settings menu is indeed able to control the volume via onscreen controls. It just doesn't seem to respond to the normal android media controls, is there a way to link the two together?
Click to expand...
Click to collapse
The only way is to create your own service or automation that will send volume control broadcast intents to mcu.
For my MTCB it may be even a shell commands:
Code:
am broadcast -a com.microntek.irkeyDown --ei keyCode XX
where XX - 19 (volume up) or 27 (volume down).
You need to find this commands for your MTCE here and you will be able to use Tasker for your own service creation.
The second way is to write service on java. But you need a skill for that.
Found xposed-mtce-utils do the job. It has "a strip of volume control at the bottom of the screen".
https://forum.xda-developers.com/showpost.php?p=72103289&postcount=2
aluver said:
Found xposed-mtce-utils do the job. It has "a strip of volume control at the bottom of the screen".
https://forum.xda-developers.com/showpost.php?p=72103289&postcount=2
Click to expand...
Click to collapse
Thanks for the link! I'll definitely give this a shot.
Do you have any experience entering recovery mode on a deck that has absolutely no buttons?
xtracrispy said:
Thanks for the link! I'll definitely give this a shot.
Do you have any experience entering recovery mode on a deck that has absolutely no buttons?
Click to expand...
Click to collapse
Don't have a MTC unit but try this,
Install Terminal Emulator app, enter "reboot recovery"
pretty big fails on the trying front.
I've managed to buy a MTCE deck that has neither buttons or SD card slot with which to install malaysk rom the prescribed way.
Has anyone had luck with a pure download -> flash approach? If so, any instructions online?
xtracrispy said:
Has anyone had luck with a pure download -> flash approach? If so, any instructions online?
Click to expand...
Click to collapse
I believe it must update from usb-flash drive.
Volume up/down codes for your MTCE: 273 and 281.
You can now use Tasker to draw your own Up/Down arrows and set the shell commands for them (w/root).
Or you can use any usb keyboard or other usb-hid device and set the volume commands for buttons you wish.
Other key codes here https://forum.xda-developers.com/an...tcd-5-1-1-xposed-compatibility-t3380468/page2
Volume control workaround on buttonless HU
Hi this should help you which I posted on Car Launcher thread.
Seems we have the same HU except mine was sold by XTRONS.
Like many of you on this forum, I love the simple efficient GUI of Car Launcher AG, amazing work from the developer ! yet I have come to the frustration of volume control on bare HU like mine : PE88CMPL from XTRONS which has absolutely zero buttons at all.
So I went on eBay and bought "Car steering wheel remote control buttons wireless android gps navigation", connected it to Key 1/Key 2, Ground and acc 12V.
Programmed the buttons to volume up down mute and other useful functions such as back/home/gps/answer call/hang up and shutdown.
These setups are in the Car Steering Wheel area in settings.
Those buttons are super small and come with a 3M double face on the back and can be properly installed on the console at arm/finger reach.
I saws that JOYING sells a larger one that fits in cups holder "JOYING SWC Steering Wheel Controller for Android Universal Car GPS Stereo Radio" if you prefer that design.
Enjoy
Hello, i now that issue isn't from this thread but i need some help for use an usb knob that dont make nothing on a MCU of Spreadtrum SC9853I.
This multimedia knob change only the sound level of notifications. It's possible to make it work on MCU.
Thanks
PaulBorges said:
Hello, i now that issue isn't from this thread but i need some help for use an usb knob that dont make nothing on a MCU of Spreadtrum SC9853I.
This multimedia knob change only the sound level of notifications. It's possible to make it work on MCU.
Thanks
Click to expand...
Click to collapse
you're in the wrong forum, suggest searching for "SC9853I" and ask the question of the knowledgeable joying people.
Hi. Sorry for my google english.
I have -Px6 DSP 9 " MTEC_CHS buttonless with Android Pie- and I couldn't find (if any) a "Knobby volume control style" apk for volume control. I can't put a link from Google Play.
The idea is to touch the screen with 3 fingers (anywhere on the screen) and rotate your wrist to bring up the volume control and increase or decrease the volume. Like a home amp. Do you know of any MTCE that has it since I suppose it should be integrated into the MCU or some apk ?.
Thank you all

Categories

Resources