AMLogic remote reprogramming - Android Stick & Console AMLogic based Computers

I'm trying to reprogram the remote from my WeTek Hub to return to Kodi from other apps, but go to Kodi's main screen when already open.
I've managed to change the home button to go to Kodi's main screen by changing the 0xf2 entry in remote.conf from 102 (HOME) to 188 (KEY_1). I then changed the keymap in Kodi to make that key return to the main screen.
While this works perfectly in Kodi, I've now lost the ability to return to the launcher (programmed as Kodi) from other apps. How can I retain this functionality whilst adding the ability to Kodi?
Thanks!

I don't think this would be universal for amlogic devices, it would be device specific... I think. none the less I'm bumping because I would like an answer as well

Related

Keyboard Shortcut, In Case You Were Wondering

So out of habit from my PC, I have often pressed the "search" key and "tab" when trying to switch apps, obviously not doing anything. So I messed around for a sec, and realized that pressing "Alt" and then "Tab" brings up an app switching mode, very identical to Windows! I don't know if this was common knowledge, but it seriously made me fall in love with this thing all over again! Thought someone might find this helpful.
Most keyboard shortcuts found in Windows work in their related Android counterparts. For instance, in the stock browser CTRL+T opens a new tab, CTRL+R reloads a page etc. Copy & pasting works with CTRL+C/V in programs like Polaris Office, etc.
Some apps don't have keyboard shortcut support, but most Google apps do and a lot of top tier apps also support keyboard shortcuts.

redirect Q home screen to a launcher

By default, the Q has no launcher, and instead uses 'broker' as the default launcher, which has no interface, only loads up the visualizer. You cannot change this with a home switcher or any other app capable of changing the launcher. I haven't been able to find how exactly the Q is doing this, but I did find a workaround.
This assumes you are already rooted, you have a controller connected via OTG cable and have Nova launcher installed. This will work with other launchers but you will have to write your own app to launch something else.
For me, the solution consists of:
- Connect a controller of your choosing (logitech K400), and install Nova launcher
- Identify the Scan Code of the button you would like to use as a 'Home' key (KeyTool.apk attached to help find it easily if not a standard home button)
- Remap the 'CALL' action to the button you want to use. (I chose CALL since is of no use to the Q.)
- Install a small app to intercept the 'CALL' intent and fire up your launcher
1) To connect a controller, you will need a OTG cable. I wont go into this since others have already covered this in detail. Here's a good example: http://davidnhutch.com/sandbox/blog/connect-a-mouse-and-keyboard-via-usb/
2) If your controller already has a home button, and it is already kicking you to the visualizer, the scan code you're looking to intercept is probably 172. If not, you can install KeyTest.apk (attached credits solarbanjo at mobileread.com forums) on the Q and it will tell you the scancode when you press each button.
3) Now, you need to edit the Q's keylayout file (found in /system/usr/keylayout/Generic.kl) and point that key declaration to 'CALL' instead of 'HOME'. Find the number that cooresponds to your scan code, and change the action to CALL.
BTW There are probably multiple key layout files in this folder. I've attached my Generic.kl for reference, but if you're not using the same keyboard this might not be useful. Compare to yours and change accordingly.
Note: If you edit Generic.kl it will change the default action for any new device that is connected. The *proper* way to do this is to create a device specific key layout, but I didn't bother because I'm lazy.
You can find more detail about this part here: http://chris.boyle.name/2010/08/android-keymaps and here: http://www.mobileread.com/forums/showthread.php?t=159538
4) Install HijackDialer.apk (attached). This app is simple, all it does is received the dial intent and launches Nova. No need to run as service since its the only app registered to the dialer intent. Ideally, this would allow you to choose your launcher but this works for now.
I also mapped My F1 - F11 Keys to other actions like BACK, FORWARD, POWER etc. Now my keyboard can control the Q completely and I can get to my launcher without having to send adb commands. All I'm missing now is a 'close' button to kill locked up apps that don't behave on the Q.
I'm sure I may have glossed over some details but hope this helps someone.
Great work. I'll try this out this week.
Sent from my Nexus 7
I know this was posted some time ago but everytime I tried to change the Value an press sabe it say error can save. same thing happen trying to put the tablet xml also trying to change the dpi value is there something I have to do to edit system stuff
Forget it found my mistake need to be root to edit files just download Rom toolbox

Kodi / XBMC hide Home UI and launch video remotely

Hi,
I have a strange use case for Kodi / XBMC - I want to use it as a media player but dont want the home menu UI to appear. I would rather have the home launcher show up. I launch videos remotely to Kodi.
I have root access to the device and I tried this method http://forum.xda-developers.com/showthread.php?t=2057372 but the Home.xml is embedded the the libxbmc.so
Any ideas would be appreciated!

Air mouse mapping help

Hey guys,
I work for an IPTV provider and we decided to ship out some of those S905 boxes to be used as STB's. We have a third party writing the app to access our service, it works great with classic STB's, but the Android version only accepts touch screen input. We can cheat it by swiping with an air mouse. I am trying to remap a couple of keys on the air mouse remote controls to act as swipe gestures (which also change channels), so we can ship those boxes with updated key maps, while we wait for the developer to fix the Android app code.
Specific questions:
1) Is there a way to make a key map, app-specific? So that the system only applies the key map when the app is open and goes back to the default key map for the device for everything else?
2) Is there something like evtest for Android that will capture input and also give me key codes? (that will make re-mapping the keys a lot easier lol)
TIA for any help you can give me. If this is not the right forum for this, please point me there.

Remapping Gestures/Buttons to Keyboard Macros that include control/ctrl key (for PWAs) without changing keyboard?

I'm trying to use a PWA that makes heavy use of a small number of keyboard hotkeys/shortcuts. This is on a rooted (Magisk) Google Pixel 4a running Android 11.
I know there are a bunch of alternative keyboards that do this, but in my experiance none of them are up to par with the more mainstream alternatives. Also, in many cases I'd want to use these shortcuts when the keyboard is not up on screen.
Are there any apps or modules that allow the user to define certain gestures, e.g. double or triple multi-touch, stuff like that, as being a complete shortcut like ctrl-shift-o? I'm finding lots of them that allow many things, but none with this specific functionality so far.
Or, failing that, allow a hardware button (preferably double-clicked, like the built-in optional camera shortcut) or a transperant movable softkey to do the same?
Idealy all of these would be configurable on a per-app basis; I'd only want it to be on for a few apps, and behavior in those apps shouldn't all be the same.
Also would be cool if something existed that could remap the useless smiley key on a mainstream keyboard to the ctrl key, for use in terminal apps.

Categories

Resources