Which is the minimum supported android version?
Closed this issue · 19 comments
Hello,
last week I tried to install this apk to an old rooted phone that I had on hand which is running android 8 Oreo and I couldn't install the apk.
As the title suggests, which is the minimum supported version of android?
Thank you very much for this very useful piece of software!
android 10 is the minimum version, but that was an arbitrary choice from back when I first started making the app. I'll try to see the ramifications of lowering it. if it's not a problem I'll lower it to at least 8, but maybe further too.
if you want to get it running right now rather than waiting for me to get to it (and you know how to use android studio), you can lower the minSDK yourself and build the app. or if you're fine with basically being a beta tester, I could quickly build the app with a lower minSDK, send it here, and you could see if it works well.
android 10 is the minimum version, but that was an arbitrary choice from back when I first started making the app. I'll try to see the ramifications of lowering it. if it's not a problem I'll lower it to at least 8, but maybe further too.
if you want to get it running right now rather than waiting for me to get to it (and you know how to use android studio), you can lower the minSDK yourself and build the app. or if you're fine with basically being a beta tester, I could quickly build the app with a lower minSDK, send it here, and you could see if it works well.
Thank you very much for your reply!
Lowering the support to android 8 would be great and totally enough for my case. Unfortunately the only rooted phone that I have on hand run a system that is so old, but I'm planning to root my main phone as well, as soon as I'll have time
Unfortunately, I don't have any experience with android studio, but I can wait as much time as you need, obviously.
The I'll gladly test it and report back.
Thank you very much again
I just built a debug APK with a minSDK of 27 (Android 8). Github doesn't let me attach APK files to issues, so the link below points to my web server, where I'm temporarily gonna make the file available.
edit: by the way, that's not signed with my main signing key, which just means that if you ever install this app from the Github release page, you'll have to uninstall this debug version beforehand.
Thanks for testing this!
Thank you very much for the superquick feedback.
I tried to install the apk and it refused to install since the beginning throwing a "There was a problem parsing the package" error.
On a rooted stock Motorola Android 8.0.0 system.
thats weird, I usually only see that when downloads get corrupted. I also just downloaded and tested the file and it worked fine. however, i did just realize that you specifically said Android 8.0.0, and I believe API level 27 is Android 8.1, so that's my bad.
new link: https://files.arianb.me/android-usb-hid-client-debug.apk
edit: apparently that error is known to also happen when your android version is too low. guess i learned something.
Thank you.
Now I was able to install the APK, but the app crashes as soon as I launch it.
Unfortunately I'm not able to send any log about that, but in case I'm available to try to look into it if you have the time to guide me
hmm. I was hoping it would be easy. since there are actual problems, I'll have to do some testing. if it's an application crash on start, it shouldn't have anything to do with root, so I'll try it out in an emulator later.
it gives me a good reason to set up automated testing tho, which is probably a bit overdue tbh.
thanks for the details, and I'll ping you on this issue when I get a chance to test it!
Thank you and don't worry.
I plan to root my main android 13 phone soon anyway.
But if you are interested in backward compatibility I am always ready to test as soon as you get the chance
i think i found a bug in v2.0.0 and up of my app that impacted all android versions below Android 12. So in a bit when I can push the fix, i'll give you a link to the Github Actions artifact download link so you can test it. once I get a chance to push and send you the link, my earlier note about this being a debug version of the app still applies by the way.
... if you ever install this app from the Github release page, you'll have to uninstall this debug version beforehand.
got sidetracked but here it is: https://github.com/Arian04/android-hid-client/actions/runs/8587437156/artifacts/1391735684
edit: also if it doesn't work, we can reopen this issue
I took a while to reply because at the moment I'm travelling.
Unfortunately I'll not be able to test the apk until I'll be back in about a week.
But I'll report back as soon as I'll be able to.
Thank you again for your work
no problem! it might even be in the next release by then since I tested it through the emulator and it seems to work fine
I came back from my trip and I was able to install the actual version (2.2.1) on my old Android 8 phone (rooted with magisk 27.0).
The app starts up correctly now, it correctly requests superuser rights and is included in the magisk list of the apps that has superuser rights but, as soon as I try to type something with the keyboard (unexpected keyboard, as suggested), I receive an "ERROR: failed to create character device".
I guess that this issue might be limited to my specific configuration (the app itself seems to work fine now), but do you by chance have some suggestions on how I could fix the error and have the app working correctly?
Thank you very much again
I would probably manually mess with the character device in termux or via ADB in a root shell, but that's not a super straightforward thing to do. You could also install USB Gadget tool (another open source app) and take a screenshot of the main page it shows you when you open it. I've been meaning to improve the debugging experience for people facing issues with actual character device creation, but the problem is I have two devices that don't have any issue with that and emulators don't simulate the quirks between devices kernels. I haven't been able to find a way to fully virtualize android device kernels for testing purposes either.
really what I need to do is improve my logging debugging/logging settings code but I've been busy and didn't get to mess with it as much as I wanted to. I can ping you once I make progress on that if you want.
I would probably manually mess with the character device in termux or via ADB in a root shell, but that's not a super straightforward thing to do. You could also install USB Gadget tool (another open source app) and take a screenshot of the main page it shows you when you open it. I've been meaning to improve the debugging experience for people facing issues with actual character device creation, but the problem is I have two devices that don't have any issue with that and emulators don't simulate the quirks between devices kernels. I haven't been able to find a way to fully virtualize android device kernels for testing purposes either.
I installed USB gadget tool and took the screenshot
I also copied the log, in case it can help
log:
ROOT - Execute command: for dir in /config/usb_gadget//; do echo GADGET_PATH=$dir; cd $dir/configs/; echo CONFIG_PATH="$dir/configs/ls -1 | head -1
/"; cd $dir; if [ "$?" -ne "0" ]; then echo "Error - not able to change dir to $dir... exit"; exit 1; fi; echo UDC=$(cat UDC); find ./configs/ -type l -exec sh -c 'echo FUNCTIONS_ACTIVE=$(basename $(readlink "$@"))' _ {} ;; for f in ./functions//; do echo FUNCTIONS=$(basename
ROOT (stdout) - GADGET_PATH=/config/usb_gadget//
CONFIG_PATH=/config/usb_gadget///configs/acct/
Error - not able to change dir to /config/usb_gadget/*/... exit
ROOT (stderr) - : [1]: cd: /config/usb_gadget//configs: No such file or directory
: [1]: cd: /config/usb_gadget/: No such file or directory
root - length=1; index=1
ROOT - Execute command: echo KERNEL_VERSION=(uname -r |cut -d '-' -f1 )
&& (gunzip -c /proc/config.gz | grep -i configfs | sed 's/# //; s/ is not set/=NOT_SET/')
ROOT (stdout) - KERNEL_VERSION=3.18.71
ROOT (stderr) - : [1]: gunzip: not found
ROOT - Execute command: for dir in /config/usb_gadget//; do echo GADGET_PATH=$dir; cd $dir/configs/; echo CONFIG_PATH="$dir/configs/ls -1 | head -1
/"; cd $dir; if [ "$?" -ne "0" ]; then echo "Error - not able to change dir to $dir... exit"; exit 1; fi; echo UDC=$(cat UDC); find ./configs/ -type l -exec sh -c 'echo FUNCTIONS_ACTIVE=$(basename $(readlink "$@"))' _ {} ;; for f in ./functions//; do echo FUNCTIONS=$(basename
ROOT (stdout) - GADGET_PATH=/config/usb_gadget//
CONFIG_PATH=/config/usb_gadget///configs/acct/
Error - not able to change dir to /config/usb_gadget/*/... exit
ROOT (stderr) - : [1]: cd: /config/usb_gadget//configs: No such file or directory
: [1]: cd: /config/usb_gadget/: No such file or directory
root - length=1; index=1
ROOT - Execute command: for dir in /config/usb_gadget//; do echo GADGET_PATH=$dir; cd $dir/configs/; echo CONFIG_PATH="$dir/configs/ls -1 | head -1
/"; cd $dir; if [ "$?" -ne "0" ]; then echo "Error - not able to change dir to $dir... exit"; exit 1; fi; echo UDC=$(cat UDC); find ./configs/ -type l -exec sh -c 'echo FUNCTIONS_ACTIVE=$(basename $(readlink "$@"))' _ {} ;; for f in ./functions//; do echo FUNCTIONS=$(basename
ROOT (stdout) - GADGET_PATH=/config/usb_gadget/g2/
CONFIG_PATH=/config/usb_gadget/g2//configs//
UDC=
FUNCTIONS=*
UDC=
bDeviceClass=0x00
bDeviceProtocol=0x00
bDeviceSubClass=0x00
bMaxPacketSize0=0x00
bcdDevice=0x0318
bcdUSB=0x0000
configs=
functions=
idProduct=0x0000
idVendor=0x0000
os_desc=
strings=
=============
ROOT (stderr) - : [1]: cd: /config/usb_gadget/g2/strings/0x409: No such file or directory
cat: configs: Is a directory
cat: functions: Is a directory
cat: os_desc: Is a directory
cat: strings: Is a directory
really what I need to do is improve my logging debugging/logging settings code but I've been busy and didn't get to mess with it as much as I wanted to. I can ping you once I make progress on that if you want.
Of course, I would be glad to help you out whenever you will have the time to improve the logging features of the app.
Thank you again
just wanted to let you know I moved this to another issue so it can be open and I can keep track of things easier (and not forget about it)
just wanted to let you know I moved this to another issue so it can be open and I can keep track of things easier (and not forget about it)
sure, thank you very much