So I try the stock android 12 tablet mode and when I use a USB touch screen the touch is scale down in the vertical buy horizontal track correctly I try whit two different screen and same thing append but if I connect both screen on windows or on my phone everything work fine BTW I try multiple resolution nothing changes
Android 12 usb touch screen are buggy
I have similar issues. If I switch the screen to portrait mode left to right maps to exactly 1 height and up to down maps to exactly one left to right.
I.e swiping down triggers a swipe from left to right and so on⌠Something funky going on with the Android touchscreen/HID driver on Rock 5B release (possibly others?)
I have it working on Ubuntu. Screen works with windows no problem. Screen works with Samsung DeX no problem. Screen worked with Android on a RPi4 no problem. It comes down to the Rock 5B or rather the Android image for Rock 5B.
Yup, same problem here. Horizontally it works, but the vertical touch is not scaled correctly. The screen works with pi zero. I have to double check on linux.
Would be an A++++ improvement if someone could figure this out⌠I havenât been able to find out exactly why this happens but it seems to be spread between different screens at least.
Everything works so much smoother than my old RPi4 but I cannot use it because the touch is all wonky
I have figured it out, see issue on Github:
Does the solution work for Android too? What to set the file permissions/ownership to when adding it externally?
Yes this solution is specifically for Android.
Make sure to name the idc file with the actual vendor and product IDs as they might not be the same as mine.
I added the file by signing in with adb then âsuâ for root and creating the file in vi using busybox.
I guess the owner and group became root as i created the file as root.
âbusybox vi FILENAMEâ to edit the file.
My rock5 android is not rooted (Radxa android 20221129). I need to add the file by mounting the partition under Linux and adding it from there. But if the owner can be root, it shouldnât be a problem I then, right?
I see no reason that it shouldnât work to add it by mounting the file system somewhere else just set permissions the same as the already existing idc files.
Also i have done nothing special with the December 02 release from radxa to be able to be root using su command over adb. Are you sure you canât become root over adb?
I tried your solution as root (used su
command over adb) yet when I try to save the file in vi it wonât let me with the message âRead-only file systemâ. Copying a file over to this /system/usr/idc folder results in the same error message. It doesnât seem that I have write permissions for this folder even as root.
Are you sure you didnât root the Rock before doing this? Did you do anything special in order to have write permissions?
I figured it out. I needed to run the following adb
commands first:
adb root
adb shell mount -o remount,rw /system
Then I was able to put files in /system/usr/idc
.
Unfortunately, this didnât fix the problem for me. I changed the filename to be the vendor and product id of my touchscreen device, put the file there with the same contents as @massy described, and after a reboot nothing changed.
However, my problem is the same as @Elden but not @massy: itâs a vertical scaling issue. The horizontal scaling is fine, the orientation is fine, but oddly the vertical scaling is very wrong where only a narrow band of the touch screenâs vertical space maps to the entire vertical range of the Android screen. I have tried on another device (Orange Pi 5) and the touch screen works correctly. Changing the resolution of the screen also does nothing.
I am using the latest Android image Rock5B-Android12-rkr12-20230315-gpt
Yes as you write you need to remount the filesystem to get write access, glad you figured it out!
It sounds like you have the same issue as me. I think weâve just confused eachother.
Have you checked the permissions of the idc file? It should be the same as the already existing files in the folder. Also make 100% sure you typed the vendor and product id correctly.
I doubt anything has changed from the older image I am running in this regard.
Edit: Noticed my example was
/system/usr/idc/Vendor_2a94_Product_526.idc
it should be
/system/usr/idc/Vendor_2a94_Product_526d.idc
but that obviosuly only applies if you have the same device as meâŚ
You were spot on with the file permissions - changing the file permissions to 644 fixed it! Touch screen is mapped correctly now. Thank you @massy!!
Afternoon all,
I am using the below screen on a 5A. I have exactly the same issue. X tracks correctly but Y I would describe as magnified/larger than the screen. Using device ID I can see that X is mapped as min 0 max 1279 and Y as min -624 max 1423 so effectively a 1280 by 2047 screen when it should be 1280x800. I have found the IDC folder as above and can pull files from the folder but cannot push due to it being read only.
Can anyone help me on the following?
1 - How do I gain write access to the idc folder? (I tried @zero25 in post 10 but got the error message âmount: âsystem/usr/idcâ not in /proc/mountsâ)
My device is not rooted as I am struggling to work out how to accomplish thisâŚ
2 - How do I find out the vendor and product id to name the file?
3 - Inside the IDC file is it just as per the link in post 5?
Thank you
No problems, managed to work it out!!! Although that likely wouldnt have happened without this thread, thank you everyone!
can you share your answer please @Jad ? I am struggling to get files to the android /system/usr/idc folder. i can see it exists on android using an app but when i write from linux via terminal (no adb) it gets discarded.
also, i canât setup adb since i have no way to get usb from the 5a to my pc.
iâve also tried creating the file on the android device but since itâs root file system i canât do it.
for anyone wondering how to do this. u need platform-tools for .adb which can be run in both linux and windows, after that connect over usb and enable usb debugging. from there you need to ./adb root
./adb remount
then do ./adb dumpsys input
find ur display vendor and product ids, then create a file on your local machine Vendor_YOURVENDORID_Product_YOURPRODUCTID.idc
with the contents device device.internal=1
then you can ./adb push Vendor_YOURVENDORID_Product_YOURPRODUCTID.idc /system/usr/idc/
from local to android then you can do ./adb shell
and cd /system/usr/idc
and finally ls
to view ur file is in the correct folder. reboot and uâve got a screen with the correct config. also make sure usb is plugged to the otg port, altho havenât verified this is required (not very familiar with android)
thanks to @massy for the fix.
sorry Kinjo, just came here to reply! glad youre sorted.
i couldnât debug over ethernet but picked up a cable to save the troubles there.