ADB shell: change IME method gives error “Unknown ID: null” - Android Q&A, Help & Troubleshooting

I bought a Chinese Android 4.2.2 smartwatch (SWatch / Kingelon K2) and discover it does not have any virtual keyboard. There is also no "input" option in Settings (there is "language" only).
I installed a third party keyboard (Anysoftkeyboard) and another app called Quick Keyboard Switch that can change keyboards with going through Settings.
When I run Quick Keyboard Switch and tried to enable the downloaded keyboard, the app force closed.
I found a post in Stackexchange describing how to use ADB shell to enable and set the default keyboard:
how to change input method with ime command
The instruction from the above post describes how to enable the keyboard using "ime enable com.etc.etc" command before setting the keyboard as default using "ime set com.etc.etc"
Unfortunately, when I use the "ime enable" command in ADB shell ("su" applied, the watch has been rooted), it gives me an error message:
Error: Unknown ID: null
When I use "ime set" command, it returns a similar error message ("com.etc.etc" (name of keyboard) instead of "null") - I gather this is because I have not enabled the keyboard yet.
I am worried that I don't even see "keyboard" option in Settings - does that mean the input module has been removed by the firmware maker of this smartwatch?
If so, where should I look in the Android firmware (I guess somewhere inside /system) that I can copy and paste to restore the keyboard input function?
I am NOT a developer nor a computer engineer. I google and try to find solutions to my problems. Thank you for your help and being patient.

Related

Bluetooth Keyboard doesn't work

Hi people,
I've recently received my new Bluetooth Keyboard, I bought via DealExtreme.
Unfortunately, I can't get it working.
I guess, X10 simply doesn't have the needed bt profile.
I also tried, what a user wrote over there:
Finaly a did it!!...you have to mount /system read and write and copy three files to /system/xbin (hidd, hcitool and hciconfig) from code.google.com/p/androidobex/downloads/list change permission to 777. Enable bluetooht on Android and pair with the device (Paired but not connected) - to do this you have to enter de pin number on the phone (0000) and then enter the same number on the keyboard and then press enter. After this you have to open the terminal and issue the commands:
hcitool scan
(to find the address of the keyboard)
Scanning ...
DC:2C:26:B3:C6:46 Bluetooth Mini Keyboard
hidd --connect DC:2C:26:B3:C6:46
the bluetooh keyboard will stop blinking....tadaaaa!!
Click to expand...
Click to collapse
But I get errors, while using the commands.
When I type
Code:
hcitool scan
I get:
Code:
reloc_libary[1215]: 4030 cannot locate '__aeabi_ui2f' ...CANNOT LINK EXECUTABLE
So I manually searched for the hidd.
Now I tried:
Code:
hidd --connect DC:2C:26:B4:44:99
But....:
Code:
Can't open HIDP control socket: Protocol not supported
Any Ideas guys?
Android 1.6 does not support HID devices at all. My guess these files are for some Android 2.x version.
Okay, thanks for your answer.
I'll be patient in this case.
have you tried any drivers?
http://www.mymobilegear.com/AndroidKBDriver.php
or
http://www.otadrivers.com/

[Q] Tasker - changing system language / shell command?

Hey,
I would like to make a task, which would change system language to x, then - on exit task to y. I was searching a bit, but I haven't found any plugin which could do that - but maby it's possible to change sys language by using shell command, which can be executed by tasker?
ty
I'm looking for the same thing, still no luck?
Found! https://play.google.com/store/apps/details?id=com.intangibleobject.securesettings.plugin&hl=en
Tasker/Locale plugin which allows you to change the system language.

Inputting swipe with adb - unknown command: swipe

I'm trying to input a swipe from the top of the screen to the bottom. My screen is 320x480 so
Code:
adb shell input swipe 160 0 160 480
should work
However, i get the following error
Error: Unknown command: swipe
usage: input [text|keyevent]
input text <string>
input keyevent <event_code>
I know my adb command is correct because it works on my HTC Wildifire S running 4.2.2 CM9
It doesn't work on my Geeksphone Keon running ICS 4.0.4
So is it a device side thing? How can i fix it?
Also adb shell input tap doesn't work either
I understand this is an old question, but I thought I'd add this information for those who may have come here looking for answers. From what I understand, the tap and swipe commands (and possibly others) were not added to 'input' until Android 4.1.1. If you're running an Android version lower than that, then those commands simply wont work because they haven't been implemented yet. There are other ways of performing tap and swipe commands in older versions, but the one way I'm aware of is quite extensive.

[Tutorial] How to disable the bottom bar when using a keyboard

Hello guys, so today I'm going to teach you on how to disable a black bar under your keyboard on rog 3
Im using Gboard as my default keyboard.
First go to adb mode ( make sure you have enabled the usb debugging mode in developers option )
and type " adb devices " , wait for it to detect your device.
Then copy this command " adb shell wm overscan 0,0,0,-170 "
To restore the bar simply change the "-170 " with another digits
By the way, my settings for display is Large so adjust the last digit as you like. That's all

[Guide] Linux on Wear OS!

THIS IS ONLY TESTED IN WEAR OS 3 ON A GALAXY WATCH 4
THOUGH THIS SHOULD WORK ON ALL WATCHES AND OLDER VERSIONS OF WEAR OS
Requirements:
ADB installed on your computer
Have your wear OS device connected to the same network as you computer
A bit of patience, this works in a very weird way!
Downloading apks and installing them
Firstly enable adb and adb debugging over WiFi on your wear OS device
Then download the latest apks:
Termux
MultiVnc If you want a graphical environment on Linux
When you have the apks run these commands:
Code:
adb connect IP_OF_YOUR_WEAR_OS_DEVICE
You might be able to see your ip under the button for enabling adb debugging over wifi
Then run these commands in the downloads folder
Code:
adb -s " IP_OF_YOUR_WEAR_OS_DEVICE" install NAME_OF_THE_DOWNLOADED_TERMUX_APK_FILE
and
Code:
adb -s " IP_OF_YOUR_WEAR_OS_DEVICE" install NAME_OF_THE_DOWNLOADED_MULTI-VNC_APK_FILE
BE AWARE THAT YOU MIGHT HAVE TO RESTART THE ADB CONNECTION, SOMETIMES IT MAY FREEZE.
to do that run
Code:
adb disconnect
then
Code:
adb connect IP_OF_YOUR_WEAR_OS_DEVICE
Installing Linux in Termux
Stay awake sleepyhead!
To make everything easier enable the option in Termux to keep your watch awake, this will save you from so much trouble.
First open up Termux, then long press the black background.
Then press the three dots and choose the option "More...".
Scroll down until you see the option "Keep screen on", turn on that.
Keyboard?
I've discovered that there's a problem with Wear OS keyboards, for some reason they might not interact properly with certain android applications.
So open up Termux in your Wear OS device and see if you can write anything in Termux.
If that works, see if there's any enter button on your keyboard and see if it works.
If Termux gave any response to what you entered then skip this part and head straight for "The Linux multiverse!"
If the enter button doesn't work then you gotta install an android keyboard.
The best keyboard I've found that also works on round Wear OS devices is "Unexpected keyboard"
Download the keyboard and run:
Code:
adb -s " IP_OF_YOUR_WEAR_OS_DEVICE" install NAME_OF_THE_DOWNLOADED_KEYBOARD_APK_FILE
When the keyboard is installed change you default keyboard into the previously installed keyboard.
The Linux multiverse!
On your ANDROID PHONE install Andronix.
In there you will have a lot of options for installing Linux on Termux. You can choose whatever you want!
When you've chosen what you want, then Andronix will copy a command to your phones clipboard.
Oh no!
This is where you might only have a few options!
The problems is that you have to get the command from your phone to your Wear OS device, though your Wear OS device might not even let you copy and paste!
Though there is a way to bypass this, ANDROID APPS! The easiest way is to install messenger lite(not messenger for Wear OS).
First download Messenger lite. (source for the messenger download link)
Then In the downloads folder run:
Code:
adb -s " IP_OF_YOUR_WEAR_OS_DEVICE" install NAME_OF_THE_DOWNLOADED_MESSENGER_APK_FILE
Log into messenger on your phone and your Wear OS device.
On your phone send the command Andronix gave you, to yourself in messenger.
Then open up messenger on your Wear OS device and long press the command and select copy!
Now the biggest hassle is gone!
The long, really long awakening
Now that you've copied the command, enter Termux. Then long press the black background and press paste.
NOW DON'T TOUCH ANYTHING, so that you don't accidentally change anything in the command.
From your computer run:
Code:
adb shell input keyevent 66
Try to remember this command, or put it somewhere easy to copy. You'll need it pretty often. (this command serves as an enter button)
The installation of Linux will now begin, there will be some Y/N questions, just choose the default options by running:
Code:
adb shell input keyevent 66
After a while you might get questions about region, keyboard and such.
use
Code:
adb shell input keyevent 66
to scroll down when it says [MORE]
then use
Code:
adb shell input text "NUMBER/WORD"
(don't remove the parentheses)
then again use
Code:
adb shell input keyevent 66
as an enter button
It might also ask you for a vnc password, choose a small and easy password.
FINALLY LINUX!
You should now have Linux installed on your Wear Os device. Go do whatever you want with it.
Just remember that your Wear OS device uses arm, so if you wanna use x86 applications, then you gotta use Box64 if you have a 64-bit processor and Box86 if you have a 32-bit processor
Start Linux(Linux might automatically start after installation)
First run:
Code:
adb shell input text "ls"
Code:
adb shell input keyevent 66
This will run the ls command.
Look for a file closely name to start-SOME_LINUX_DISTRO.sh or start-andronix.sh
then run:
Code:
adb shell input text "./start-SOME_LINUX_DISTRO"
then
Code:
adb shell input keyevent 66
BOOM Linux is now running :3
What about GUI?
If you installed a Linux version with a graphical interface then you either gotta use a VNC to display anything on your watch
run
Code:
adb shell input text "vncserver-start"
then
Code:
adb shell input keyevent 66
then
Code:
adb shell input keyevent 66
The terminal will say " New 'remote-desktop' at :NUMBER on machine localhost "
remember that number
now exit Termux and start Mutli-Vnc
Scroll down to "New Connection"
in Address enter localhost
in port enter 590 and then the number. (If the number as is higher than 9, enter 59 and then the number)
Scroll down password and enter in the vnc password you chose earlier.
Then the scroll all the way down and press the big green "Connect" button!
You should now some something, maybe not a lot, but something"
You can manually set the resolution if you want, so that you're able to utilize the screen better, go here for a guide on that.
External GUI
If you actually wanna use the Linux installation, then you'll have to use an external device to view the desktop.
You can follow this guide here, as it's better at explaining then me.
You can also use this guide if you wanna use XSDL.
A tip for entering &, use the keyboard on the watch! Also the read the explanation of commands before you continue, you'll need it!
Command explanation!!
adb shell input text " " will enter any text into the connected adb device, %s is used for spaces
adb shell input keyevents will do any key event, like pressing enter, 66 is for enter
If something doesn't work, let me know. I might've missed something!

Categories

Resources