usb/bt uk keyboard layout. Tested on touch pad ICS 4.0 - Android General

Here is the uk layout files for external usb/bt keyboard. Tested with ICS on touch pad with microsoft wireless desktop 800. So you will never type the "wrong" key.
You need to extract them to
Code:
/data/system/devices/keychars/Vendor_045e_Product_0745.kcm
/data/system/devices/keylayout/Vendor_045e_Product_0745.kl
These are for microsoft wireless desktop 800 (Vendor ID: 045e, Product ID: 0745). To find out your keyboard's Vendor ID and Product ID just plug in your usb keybard then adb into your device and run
Code:
lsusb
which will result similar to this
Code:
Bus 004 Device 002: ID 045e:0745 Microsoft Corp. Nano Transceiver
where 045e:0745 is of the format Vendor ID: Product ID. Just note down your device's Vendor ID and Product ID then make a copy of these files to:
/data/system/devices/keychars/Vendor_[VID]_Product_[PID].kcm
/data/system/devices/keylayout/Vendor_[VID]_Product_[PID].kl
replace VID and PID by your devices Vendor ID andProduct ID

Related

Routing from /dev/bus/usd/01/01/ to /dev/ttyS9

I am attempting to connect to a serial device from a Android tablet, via USB-Serial Converter. In order to interface with this particular serial device, a linux library must be used as an interface.
This library takes an integer as an argument, and tries to connect to the device at the following location : /dev/ttySx, where x is the arguement. If 2 is provided to the library, it will look for the device at /dev/ttyS2. Very simple.
When I connect the device to Ubuntu, there's is one simple extra step for this device to work with the USB-Serial convert. The converter is exposed at the location /dev/ttyUSB1. I just need to create a simple soft-link with the serial port pattern (etc "ln -s /dev/ttyUSV1 /dev/ttyS99"). It works perfectly.
Now the problem arises for Android. The converter is seen at /dev/bus/usb/01/01. I never seen this convention in other project. The question is how can I direct the I/O from /dev/ttySX to /dev/bus/usb/01/01

adding driver to kernel 809iv

Hi guys
I am new to android and i need some help. Apologies if i have posted this in the wrong place.
I manufacture and supply large touch screens to special needs schools and in the past i have used multitouch overlays that came with a mini pc android called istick by PQ Labs that were coded to work as multi touch. now i have changed touch panel product i need an android pc to work with it.
I am thinking of using a MK809iv and the company that supplies the overlay has sent me the mods that need to be made to the kernel but i have no idea how to do this.
Here is what they sent me.
Transplanting under Android4.0 For IRMT Multi Touch Frame Driver V1.1
The following method is suitable for the kernel which above Linux 3.0, we take an example of Kernel 3.08.
1. Add manufacturer ID and Device ID in the 352st line of “drivers/hid/hid-ids.h”
#define USB_VENDOR_ID_IRMTOUCH 0x23c9
#define USB_DEVICE_ID_IRMTOUCH_SSERIAL 0x5666
2. Add device according to put the following program in the 669st line of “/drivers/hid/hid-multitouch.c”
/* IRM Multi-touch panel */
{ .driver_data = MT_CLS_CONFIDENCE,
HID_USB_DEVICE(USB_VENDOR_ID_IRMTOUCH,
USB_DEVICE_ID_ IRMTOUCH_SSERIAL) },
3. Add special protocol support in the 1392st line of “drivers/hid/hid-core.c”
{HID_USB_DEVICE(USB_VENDOR_ID_IRMTOUCH, USB_DEVICE_ID_IRMTOUCH_SSERIAL) },
4. Configuring the kernel. (menuconfig)
Firstly enter Device Drivers, then enter HID Devices ,then select Special HID drivers. Build-in HID Multitouch panels . ( select “*” )
Save and exit.
5. Compile the kernel and update the mirror of android 4.0
Shanghai IRMTouch Technology Co.,Ltd
2012.8.31
Any help would be greatly appreciated
Thanks
Ty

How to read data from android.car.cluster available on network port 5151

While performing a vulnerability scan for open ports of an Android Automotive Infotainment system, I found out that port 5151 is open. Doing a netcat on the open port, reveals a continuous stream of unreadable data.
Code:
kali:~$ nc 192.168.x.x 5151 //IP of infotainment system
7ò”°R YJøOæݽ9^çÆC€E†éúaI™íÐåY—
...
...
Since I had the root access to the Android system, I could find out that this data is related to android.car.cluster.
Code:
console:/ # netstat -ltpu
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program Name
tcp6 0 0 :::pcrd :::* LISTEN 4473/android.car.cluster
Now my question is, whether there is a way to read this data that is being pushed to the port 5151. for eg. some client application, that I can install on my Kali Machine to read the data on the port.
Android version used : android-10.0.0_r20.
Kali Machine and Infotainment system are on the same local network.
You have a rooted Android 10 Android Automotive in hands? Can you share with us what OEM it is for?
I guess you are aware that the Cluster app in the Google repo above is only an example implementation and that the OEM will have its own private and proprietary implementation of such app pre-installed on the device. If you have a rooted device, then simply pull the apk from the device and re-engineer it
realzoulou said:
You have a rooted Android 10 Android Automotive in hands? Can you share with us what OEM it is for?
I guess you are aware that the Cluster app in the Google repo above is only an example implementation and that the OEM will have its own private and proprietary implementation of such app pre-installed on the device. If you have a rooted device, then simply pull the apk from the device and re-engineer it
Click to expand...
Click to collapse
The system is under development, hence obtaining a root access was not difficult.
There is currently no cluster app available in the infotainment system.
So seems like this is a dummy implementation as you mentioned. Could any valuable information be retrieved from this at all? Here is a link to the data that is read. The data is completely binary
: https://onedrive.live.com/?authkey=!AMcXrkjcLGnjyuY&cid=35E147C2C403215D&id=35E147C2C403215D!106&parId=root&action=locate
If you are doing a vulnerability scan, why is the data content important and why do you not ask the OEM that (I assume) has contracted you with doing the scan? And ... no, I cannot decode this hex stream.

Need Help: How to debug boot crashes?

I am trying to build a custom ROM for pixel 4a. I was able to build the images successfully. After I flash, the phone boots but gets stuck in Google logo. How can I debug this? Device is not listed in adb at this point of time. Any suggestions/guide to debug the device preferably without rooting in this scenario?
I'm assuming you are hitting a problem with the kernel. Your best, maybe only option is to connect a serial console to the device. Luckily, it seems you don't have to disassemble the phone to reach solder pads anymore, but you do have to create an adapter to get console out of the USB port. I found these links that might be helpful. I did not find anyone selling pre-made adapters.
Serial debugging:Cable schematics - postmarketOS
wiki.postmarketos.org
GitHub - Peter-Easton/android-debug-cable-howto: This is a simple how-to to create your own android kernel debugging cable using commercially available parts.
This is a simple how-to to create your own android kernel debugging cable using commercially available parts. - GitHub - Peter-Easton/android-debug-cable-howto: This is a simple how-to to create y...
github.com
GitHub - google/usb-cereal: USB-Cereal is a debugging and development tool for designs that use USB-C port and bring out serial TX/RX lines into SBU1/2 pins. USB-Cereal is made compatible with both 1.8V and 3.3V signalling.
USB-Cereal is a debugging and development tool for designs that use USB-C port and bring out serial TX/RX lines into SBU1/2 pins. USB-Cereal is made compatible with both 1.8V and 3.3V signalling. -...
github.com
If the kernel finishes booting, and you have an Android problem, you might have other options.
If storage can be mounted, you could dump logs there.
If the network is up you can dump logs remotely. You'd need another device on the network to receive the logs. A USB LAN dongle might be better than WiFi for this...
There was a bootsplash mod that printed console messages. I don't know how easy it is to just write on the screen but if you can leverage an existing project like this it might be manageable.
Are you not using any kind of emulation for testing prior to pushing to the device? Emulation will give you the capability to capture dump/log data for analysis.
Actually I have made few changes in the some xml files that goes into vendor.img. For emulators, we dont need vendor .img right?

No virtual keyboard when BT gamepad connected on Andorid 12

I have Samsung S10 with Android 12
When I connect bluetooth gamepad, it gets recognized as "Physical keyboard" (gamepad is VR BOX)
When I enter in SCUMMVM (gaming app), it has a hud on screen shortcut key (HUD)to call a onscreen keyboard (needed in some games). If a bluetooth gamepad is connected, the shortcut key doesn't work and I can't call the onscreen keyboard. Under "Physical keyboard" options I have turned on "show on-screen keyboard" but it didn't help.
I've read that in past people had simmilar problems with other gamepads on older andorid phones and that the solution was to go to Android settings and "select your default keyboard. (physical or virtual)" but I don't have that option.
Any idea how to solve this problem?
The root problem is that the USB HID report descriptors in your little handheld are written incorrectly.
It's reporting that it can send the alphabet (specifically "Q").
Me? I'd fix the problem by reverse engineering the device.
The next possibility is to use a custom /system/usr/idc/Vendor...idc to make it clear that this is not a qwerty
The last possibility (and the one you probably want) is in Settings > System > Languages & input > Physical keyboard > Keyboard assistance > Show virtual keyboard.
You can load my UsbMode.apk (in the sig) and see that your handheld is identified as a qwerty.
Renate said:
The root problem is that the USB HID report descriptors in your little handheld are written incorrectly.
It's reporting that it can send the alphabet (specifically "Q").
Me? I'd fix the problem by reverse engineering the device.
The next possibility is to use a custom /system/usr/idc/Vendor...idc to make it clear that this is not a qwerty
The last possibility (and the one you probably want) is in Settings > System > Languages & input > Physical keyboard > Keyboard assistance > Show virtual keyboard.
You can load my UsbMode.apk (in the sig) and see that your handheld is identified as a qwerty.
Click to expand...
Click to collapse
Thanks for your answer
As I've mentioned before "Show virtual keyboard" doesn't work. I can see the on screen button that would call the virtual keyboard but it doesn't work if the gamepad is connected
I'm interested in solution to use custom Vendor.idc or to reverse engineer the device but I'm a noob to do it myself. I've went to /system/usr/idc/ dir and can see 4 .idc files where in the files, it says that two are form "Sony DS4...", and two are for "Google Reference RCU Remote" - none seams that belongs to the "no name" gamepad device I'm using? There are bunch of other .idc files but also no one seams to belong to the device...
Here's the paste from the Google RCU device:
1st file:
# Input Device Configuration file for Google Reference RCU Remote.
#
# Basic Parameters
# Due to a memory error on early prototypes of the reference remote control
# the VID/PID is mapped to 248a/8266 instead of 0957/0001
keyboard.layout = Vendor_0957_Product_0001
keyboard.doNotWakeByDefault = 1
audio.mic = 1
2nd file:
# Input Device Configuration file for Google Reference RCU Remote.
#
# Basic Parameters
keyboard.layout = Vendor_0957_Product_0001
keyboard.doNotWakeByDefault = 1
audio.mic = 1
Any help?
This gamepad I'm trying to use is pretty neat to play games by one hand which is great on mobile as you can hold device in one hand and gamepad in other so it would be great to hack it if to also be able to show keyboard on keypress demand if it is possible
Try the UsbMode.apk. Also, does a little boxed "A" appear on the status bar when the remote is active?
First, with the remote active, identify the VID/PID of your device
Code:
$ logcat|grep btif
bt_btif : bta_hh_co_send_hid_info: vendor_id = 0x291a, product_id = 0x8502, // something like this
^C
Could you do me a favor (just for my own interest)?
Code:
$ cd /sys/bus/hid/devices
$ cd whatever // there's only one directory here, named ????:VID#:PID#:????
$ cp report_descriptor /sdcard/descript.img
$ ^D
C:\>adb pull /sdcard/descript.img
Hmm, it looks like there is no option in idc. You'll have to make a keylayout file.
Please use the UsbMode.apk and write down what all the buttons do.
There's not that many. I just need the Android names, you don't need to say which button on the remote it is.

Categories

Resources