WuDi-ZhanShen / AndroidUHidPureJava

纯Java实现的uhid模拟HID设备!A HID device simulation implemented purely in Java!
21 stars 3 forks source link

AndroidUhidPureJava stops working in Android 14 #1

Open huynhtanloc2612 opened 5 months ago

huynhtanloc2612 commented 5 months ago

Hi @WuDi-ZhanShen Thanks for sharing this code. It works correctly in Android 13 and earlier Android version. However, after I updated my phone to Android 14, it shows "Aborted" every time I try to run it. I checked the Devices.java file in AOSP and see that there was no thing changes since 2022. I am investigating the reason but have not found it. Do you have any advice? Thanks.

WuDi-ZhanShen commented 5 months ago

Hi @WuDi-ZhanShen Thanks for sharing this code. It works correctly in Android 13 and earlier Android version. However, after I updated my phone to Android 14, it shows "Aborted" every time I try to run it. I checked the Devices.java file in AOSP and see that there was no thing changes since 2022. I am investigating the reason but have not found it. Do you have any advice? Thanks.

Thanks for your comment. I guess that the signature of the native method may have changed in Android 14. I will fix it when I have free time.

EDLLT commented 4 months ago

Hi @WuDi-ZhanShen Thanks for sharing this code. It works correctly in Android 13 and earlier Android version. However, after I updated my phone to Android 14, it shows "Aborted" every time I try to run it. I checked the Devices.java file in AOSP and see that there was no thing changes since 2022. I am investigating the reason but have not found it. Do you have any advice? Thanks.

Thanks for your comment. I guess that the signature of the native method may have changed in Android 14. I will fix it when I have free time.

I also keep on getting Aborted on Android 12. I'm using a Samsung device(Samsung Galaxy S20 FE 5G) This is my first time trying it

EDLLT commented 4 months ago

Hi @WuDi-ZhanShen Thanks for sharing this code. It works correctly in Android 13 and earlier Android version. However, after I updated my phone to Android 14, it shows "Aborted" every time I try to run it. I checked the Devices.java file in AOSP and see that there was no thing changes since 2022. I am investigating the reason but have not found it. Do you have any advice? Thanks.

Thanks for your comment. I guess that the signature of the native method may have changed in Android 14. I will fix it when I have free time.

I also keep on getting Aborted on Android 12. I'm using a Samsung device(Samsung Galaxy S20 FE 5G) This is my first time trying

Apparently the issue was with me getting into a shell session and trying to execute it from there(might be due to my environment as I have the systemless mkshrc magisk module installed) Solution was to execute it via adb shell directly instead

adb shell CLASSPATH="/data/local/tmp/Testing/virtual_hid_project/classes.dex" app_process / com.android.commands.hid.Hid

🥹 been searching the whole internet for a way to create a virtual HID for a couple of years for my personal project with no success. istg as soon as I had given up and was closing my hundreds of tabs I stumbled upon this project