fdroidcl
fdroidcl copied to clipboard
Debian 10: "devices: could not get devices: failed to get device ABIs"
Hello there,
I'm facing an error when trying to list devices on Debian 10:
$ fdroidcl devices
devices: could not get devices: failed to get device ABIs
Note that adb
is able to list devices:
$ adb devices -l
List of devices attached
3300e36aa634a2f7 device usb:2-2 product:s5neoltexx model:SM_G903F device:s5neolte transport_id:7
Here are pieces of information I gathered:
fdroidcl version: v0.5.0 (0.5.0-3+b3 installed from bullseye)
adb version: Android Debug Bridge version 1.0.39 Version 1:8.1.0+r23-5 Installed as /usr/lib/android-sdk/platform-tools/adb
fdroidcl update
works fine and downloads the index
Another occurrence of the same error:
$ fdroidcl download zen.meditation.android
Downloading https://f-droid.org/repo/zen.meditation.android_1644109.apk... done
APK available in /home/amnesia/.cache/fdroidcl/apks/zen.meditation.android_1644109.apk
$ fdroidcl install zen.meditation.android
install: could not get devices: failed to get device ABIs
Any hint? (I can provide more info if necessary)
Related issue (same error but on Windows 10): https://github.com/mvdan/fdroidcl/issues/49
The code in question is https://github.com/mvdan/fdroidcl/blob/1bd0f39050540dec815e93c7e4b10c4f8a52ba89/adb/device.go#L94-L135. My guess is that adb shell getprop
isn't giving us the lines we expect, like ro.product.cpu.abilist
.
Hi @mvdan, and thanks for having a look!
Is it the right way to test?:
$ adb devices -l
List of devices attached
330030978d467223 device usb:2-2 product:s5neoltexx model:SM_G903F device:s5neolte transport_id:9
$ adb shell getprop ro.product.cpu.abilist
armeabi-v7a,armeabi
$ fdroidcl devices
devices: could not get devices: failed to get device ABIs
The output that froidcl grabs which leads to your error is just adb shell getprop
; then the output is parsed as a list of key-values. Can you share that?
Sure!
But running adb shell getprop
returns.. nothing. No single line
Tested again adb shell getprop ro.product.cpu.abilist
and the result is still armeabi-v7a,armeabi
I double-checked the syntax, but still nothing with only adb shell getprop
Yeah so that's the problem; with most devices, adb shell getprop
prints all properties, and we rely on that to avoid multiple adb shell getprop xxx
commands.
I can't really find canonical docs or manuals for the command, but every page I find seems to agree that, without arguments, it should print all properties.
An alternative here would be to rewrite the code to fall back to separate adb shell getprop xxx
commands if getting the entire list didn't work. At least that might make fdroidcl support more devices. I'm happy to review patches; see https://github.com/mvdan/fdroidcl/issues/56.
I would be glad to tackle this, but this is unfortunately way out of my competencies.
Do you think of someone I could ping here?
Might work now with https://github.com/mvdan/fdroidcl/releases/tag/v0.6.0. If not, reopen the issue.