FORUMS
Remove All Ads from XDA

[GUIDE] Change on-screen keyboard to LeanKey

20 posts
Thanks Meter: 17
 
By Wredal, Junior Member on 28th December 2016, 05:40 PM
Post Reply Email Thread
I have fireTV 2 since a week and its on-screen keyboard was driving me crazy. If you also believe it is the worst keyboard you have ever seen, I have created a guide how to replace it with something decent.

It should work without root, as long as you can enable ADB debugging and connect to the device using adb.

Benefits: New keyboard supports mouse, has qwerty layout and is compatible with the web (doesn't force you to go prev/next on the page, so you can login to your services), will also not get in the way if you are using external keyboard.



I am a new XDA member and after trying to place this post I learned that our forum does not allow me to give any line of code - when I try, I get error message that the system blocked my thread and I should contact administrator if I feel this is unfair.

XDA served me for years as invaluable source of knowledge, and I will update this guide after these restrictions are no longer in place.

In the meantime, you can see full guide here: thorn*piekielko*pl/keyboard*html
(replace stars with dots).

And if you by a chance know any way to adjust fireTV volume, please let me know.
That's my next pain point with this device...
The Following 3 Users Say Thank You to Wredal For This Useful Post: [ View ] Gift Wredal Ad-Free
 
 
30th December 2016, 05:20 PM |#2  
InfinityFire!'s Avatar
Junior Member
Flag Sioux City
Thanks Meter: 2
 
Donate to Me
More
Seems nice, going to try it.

---EDIT---

Works great. Just tried it, Just one thing when i went to website. I tried to go to the homepage to just to check it out and then my Antivirus said it found some kind of virus or malware like a bot. Not sure? Has my antivirus gone crazy?
Oh and have you found away to get the regular keyboard back. Looked for keyboard app name but could not find it.

-Tested on Fire TV Stick-
31st December 2016, 12:18 AM |#3  
OP Junior Member
Thanks Meter: 17
 
More
Quote:
Originally Posted by Android Doge

Seems nice, going to try it.

---EDIT---

Works great. Just tried it, Just one thing when i went to website. I tried to go to the homepage to just to check it out and then my Antivirus said it found some kind of virus or malware like a bot. Not sure? Has my antivirus gone crazy?
Oh and have you found away to get the regular keyboard back. Looked for keyboard app name but could not find it.

-Tested on Fire TV Stick-

Happy to hear it works also on the Fire TV Stick. And it looks like it is confirmed now that you don't need root to do it Great.

If you wish to revert to your original keyboard, you have to list available input methods by this command:

ime list

You will see something like the result below, and you need to copy name of the input method you wish to set (without colon - this is the part I highlighted)


and then again use same command as before with a name of original keyboard to revert to it back.

ime set NAME_GOES_HERE

That's it.

For the server, your antivirus was overreacting. Some time ago I read an interesting article by Casey Smith about possible priviledges elevation in Windows and was experimenting a bit with it (however never managed to get it working). I guess when you opened the homepage your antivirus just noted its unusual code and rightfully warned you. I removed this proof of concept already, never expected someone will go here
The Following User Says Thank You to Wredal For This Useful Post: [ View ] Gift Wredal Ad-Free
31st December 2016, 12:59 AM |#4  
Y314K's Avatar
Senior Member
Thanks Meter: 434
 
More
Nice... I mostly use a USB K400r Keyboard with my Rooted FTV1's. And the stock keyboard app always gets in the way. I would want a keyboard that has a minimize option on it in case I want to use my physical keyboard only.

I do wonder if there is an Android "Settings.apk" compatible with FireOS 5 that can be installed like we did on FireOS 3. Back then it was for easy Bluetooth control. Which is not needed now that Amazon added more robust stock BlueTooth support. But I wonder if an Android 5 pulled/updated "Settings.apk" that is compatible with FireOS 5 can give you the same control for easy default KeyBoard switching from within the "Settings.apk". This would mean no ADB Shell needed & multiple KeyBoard support with faster switching.

Has anybody tested any "Settings.apk" on FireOS 5 for KeyBoard modding or something else ?
31st December 2016, 01:17 AM |#5  
OP Junior Member
Thanks Meter: 17
 
More
@Y314K Yes, this was my initial approach. You can sideload settings app, but it will just exit if you enter to keyboard and language settings. That's why I started to investigate adb commands.

For the minimize option, you can press back button to hide LeanKey when displayed, however it will appear again after you go to the next text field.
The Following User Says Thank You to Wredal For This Useful Post: [ View ] Gift Wredal Ad-Free
31st December 2016, 01:37 AM |#6  
Y314K's Avatar
Senior Member
Thanks Meter: 434
 
More
Quote:
Originally Posted by Wredal

@Y314K Yes, this was my initial approach. You can sideload settings app, but it will just exit if you enter to keyboard and language settings. That's why I started to investigate adb commands.

For the minimize option, you can press back button to hide LeanKey when displayed, however it will appear again after you go to the next text field.

Was that Settings.apk the same we where using for FireOS 3. That is why I was wondering about finding a Settings.apk for a Android 5 build. Well I just tested one of my FTV1's that is still on FireOS 3 & have had the Settings.apk installed for a long time. And sure enough. It crashes if I try to go into language & input. So it's probably a dead end.

Nice, hitting back is still much better then dealing with the stock keyboard popup. I do wonder, can you use the mouse pad to edit multiple specific parts of one input field. Like after pasting your tutorials link & changing the * to .'s ? Without having the keyboard app constantly popup ?
Also is there a way to make the keyboard much larger then the one it shows on your pic in the OP ?

Much appreciate you sharing this method.

Here is the direct link to the tutorial for now: http://thorn.piekielko.pl/keyboard.html
31st December 2016, 08:24 AM |#7  
Y314K's Avatar
Senior Member
Thanks Meter: 434
 
More
Switched keyboards following your guide on my PreRooted FW v5.2.1.1_r1 FTV1. And I am very happy with the results. Pretty close to perfect. This keyboard is made for AndroidTV type devices. And it does a great job. I still think the developer can tweak it a bit for it to look better & can probably add a few extra options. But it is just about perfect functionally wise. I did find some small bugs in a few of the apps I use. But overall this is one of the best mods one can do on any FireTV device, Rooted or UnRooted. Specially if you use a keyboard/mouse. Great share Wredal.

As for the Installation Guide, I did find a few pointers.

First I would advise that everybody first do an "IME List" command & that they copy & paste (or take a screen grab) their response to a .txt file on their PC as a backup in case they want to know what they had as stock.

Quote:

adb connect IP
adb shell
ime list

Stop to copy & paste info or to screen grab the info. Then you can continue to enable & set your new keyboard.
Quote:

ime enable org.liskovsoft.androidtv.rukeyboard/com.google.leanback.ime.LeanbackImeService
ime set org.liskovsoft.androidtv.rukeyboard/com.google.leanback.ime.LeanbackImeService

In my case after enabling & setting the LeanKey Keyboard. If I do a IME List command again. It shows/lists both keyboards. First the stock & then the LeanKey. On your IME List picture it only shows the LeanKey Keyboard. Is this because you had disabled the stock keyboard on one of your prior tweaks ??

If you did disable, hide, deleted or did something to your stock keyboard. I do wonder what would happen if the LeanKey Keyboard would become unset. Which can happen if the LeanKey Keyboard APK crashes or if you manually go into the installed LeanKey Keyboard app settings & choose "Force Stop" Or "Clear Data" since this makes my stock keyboard comeback as default. "Clear Cache" does not seem to unset the LeanKey Keyboard. And it survives a AFTV restart just fine.

It is a easy fix. Just run the Set command again to set the LeanKey Keyboard back.

Quote:

adb connect IP
adb shell
ime set org.liskovsoft.androidtv.rukeyboard/com.google.leanback.ime.LeanbackImeService

The LeanKey Keyboard seems to work perfectly with just about any app I've tried so far. Great on latest Chrome, Viki, old Viki TV, Downloader, etc.

The only apps I've had some very minor problems with is Opera & Opera Beta @ v37. The back key option to hide the keyboard kicks you out of the input field altogether. And when trying to scroll down thru your bookmarks when going thru your address bar the keyboard tries to stay there blocking you view. I did find a way to get rid of the keyboard while still being able to stay on the input field or drop down list. First you need to start to input something that will make some recommendations. Then you have to grab the white part where the possible options/recommendation are with your mouse. This will get rid of the keyboard but will leave the input field or list. This is a very minor bug. Plan to test Opera v41 or newer in the next few days. I did not have any of this problems with Chrome. But I do prefer how great Opera is at blocking pop-ups & ads on the FireTV.

Thanks again for posting this awesome guide.
31st December 2016, 12:09 PM |#8  
OP Junior Member
Thanks Meter: 17
 
More
Quote:
Originally Posted by Y314K

hitting back is still much better then dealing with the stock keyboard popup. I do wonder, can you use the mouse pad to edit multiple specific parts of one input field. Like after pasting your tutorials link & changing the * to .'s ? Without having the keyboard app constantly popup ?

Well, you can click and edit the text using your physical keyboard and just ignore that onscreen keyboard is also displayed. It will not interfere.

Quote:
Originally Posted by Y314K

Also is there a way to make the keyboard much larger then the one it shows on your pic in the OP ?

Not LeanKey, but I have nice, large keyboard in my MiBox and I am going to try to extract it and see if it works on FireTV.

Quote:
Originally Posted by Y314K

Much appreciate you sharing this method.

Always happy to help
The Following User Says Thank You to Wredal For This Useful Post: [ View ] Gift Wredal Ad-Free
31st December 2016, 02:45 PM |#9  
InfinityFire!'s Avatar
Junior Member
Flag Sioux City
Thanks Meter: 2
 
Donate to Me
More
Quote:
Originally Posted by Wredal

Happy to hear it works also on the Fire TV Stick. And it looks like it is confirmed now that you don't need root to do it Great.

If you wish to revert to your original keyboard, you have to list available input methods by this command:

ime list

You will see something like the result below, and you need to copy name of the input method you wish to set (without colon - this is the part I highlighted)



and then again use same command as before with a name of original keyboard to revert to it back.
That's it.

For the server, your antivirus was overreacting. Some time ago I read an interesting article by Casey Smith about possible priviledges elevation in Windows and was experimenting a bit with it (however never managed to get it working). I guess when you opened the homepage your antivirus just noted its unusual code and rightfully warned you. I removed this proof of concept already, never expected someone will go here

Thanks for the guide. LeanKey is so much better then Amazon Keyboard.
31st December 2016, 09:18 PM |#10  
OP Junior Member
Thanks Meter: 17
 
More
Quote:
Originally Posted by Y314K

As for the Installation Guide, I did find a few pointers.
First I would advise that everybody first do an "IME List" command

Well, that's not needed. You can list available IME at all times, and if IME is not listed, you can't enable it or use it. Having this list stored somewhere will not give you any advantage.

Quote:
Originally Posted by Y314K

In my case after enabling & setting the LeanKey Keyboard. If I do a IME List command again. It shows/lists both keyboards. First the stock & then the LeanKey. On your IME List picture it only shows the LeanKey Keyboard. Is this because you had disabled the stock keyboard on one of your prior tweaks ??

Yes, when you follow my guide, the original stock keyboard will be always available for you. In my case, I was trying different angles to replace the keyboard and one of them included replacing original apk file from system to something else - hence it is no longer available in my box. If you don't happen to remove random files from your /system folder you should be fine

Quote:
Originally Posted by Y314K

If you did disable, hide, deleted or did something to your stock keyboard. I do wonder what would happen if the LeanKey Keyboard would become unset. Which can happen if the LeanKey Keyboard APK crashes or if you manually go into the installed LeanKey Keyboard app settings & choose "Force Stop" Or "Clear Data" since this makes my stock keyboard comeback as default. "Clear Cache" does not seem to unset the LeanKey Keyboard. And it survives a AFTV restart just fine.

If it crashes, system will restart the app automatically. If you uninstall or disable or clear it, system will go for the next IME option (which will be the stock keyboard).

In the most bizzare situation when you remove stock kb and uninstall LeanKey, system will be stuck trying to restart any IME, and you will get blinking screen restarting launcher in infinite loop.

OK, if you freeze all IMEs and disable dbugging and have no root to reinstall system from recovery, I guess you are bricked. But if you went such a long way to do so, you kind of deserve it :P
The Following User Says Thank You to Wredal For This Useful Post: [ View ] Gift Wredal Ad-Free
1st January 2017, 03:52 AM |#11  
Y314K's Avatar
Senior Member
Thanks Meter: 434
 
More
Quote:
Originally Posted by Wredal

Well, that's not needed. You can list available IME at all times, and if IME is not listed, you can't enable it or use it. Having this list stored somewhere will not give you any advantage.

Good to know. I always like to have a note or saved up list of the stock setup. And since I didn't see it on the pic you posted I thought it would be a good idea. But since it's always there unless you go the extra mile to remove it. Then it is not needed.

Quote:
Originally Posted by Wredal

Yes, when you follow my guide, the original stock keyboard will be always available for you. In my case, I was trying different angles to replace the keyboard and one of them included replacing original apk file from system to something else - hence it is no longer available in my box. If you don't happen to remove random files from your /system folder you should be fine

Good to confirm. That is what I thought once you mentioned "tweaks". I am using this FTV1 on the latest PreRooted FW as a testing device before I update all my other FTV1's so that is why I am testing different things above normal usage. I know I will be Factory Resetting it once I am happy with everything. Fun testing for now. And as long as TWRP is fine. Very easy to go back to PreRooted stock.

Quote:
Originally Posted by Wredal

If it crashes, system will restart the app automatically. If you uninstall or disable or clear it, system will go for the next IME option (which will be the stock keyboard).

Thanks for the info. Since I don't want to even see the old stock keyboard I went ahead & removed it from the list running the following line:

Code:
ime disable com.amazon.tv.ime/.FireTVIME
It can always be enabled again by running the following line:

Code:
ime enable com.amazon.tv.ime/.FireTVIME
Now even if I "Force Stop" or "clear Data" on the LeanKey Keyboard app. It always instantly comes back as the stock keyboard. Brilliant!!

Quote:
Originally Posted by Wredal

In the most bizzare situation when you remove stock kb and uninstall LeanKey, system will be stuck trying to restart any IME, and you will get blinking screen restarting launcher in infinite loop.

OK, if you freeze all IMEs and disable dbugging and have no root to reinstall system from recovery, I guess you are bricked. But if you went such a long way to do so, you kind of deserve it :P

, Since I am using this FTV1 for testing right now. I went ahead & uninstalled the LeanKey Keyboard App when it was the only enabled IME device. It was the only device showing after the IME List command.

I did this from within AppStarter. Once I hit Uninstall, I was kicked out to the Home/Recent screen. I went back into FireStarter & tried an app that uses the onscreen keyboard. And to my surprise. The stock keyboard app was back. Did a check of the IME List. And sure enough it was back on there as the only IME device. So there seems to be fail safe mechanism that re-Enables & re-Sets the stock keyboard in the event you have manually disabled it. Like you mentioned, you would probably need to mess with the IME files within /System with root access to really mess things up. Good to know...

Then I just re-Installed the LeanKey KeyBoard App from a backup I had created in ES File Explorer. And it showed back on my IME List without any action from me. But the stock keyboard app was still the default. So I just disabled the stock keyboard again. And I am back to an all LeanKey KeyBoard bliss.

On that note, now that I got LeanKey Keyboard working perfectly. I am moving on to solving the last bug I've found since upgrading from PreRooted FireOS 3 to PreRooted FireOS 5. It is the inability to Enable the Root option from ES File Explorer. Seems it might have something to do with the FireOS 5 file structure. Maybe you can come over & take a look. I will be doing a detailed post in the next few hours over on this thread:

https://forum.xda-developers.com/fir...issue-t3397914

Thanks again..

---------- Post added at 08:52 PM ---------- Previous post was at 08:47 PM ----------

Forgot to add: Let me know if you need any help testing the nice, large keyboard in your MiBox after you extract it.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes