lzhiyong / android-sdk-tools

building android-sdk tools for Android
Apache License 2.0
378 stars 65 forks source link

Adb and fastboot #17

Closed RohitVerma882 closed 2 years ago

RohitVerma882 commented 2 years ago

Adb and fastboot doesn't work on nonrooted device, Can you add option to provide custom fd from java?

RohitVerma882 commented 2 years ago

libusb error access denied

RohitVerma882 commented 2 years ago

It's very helpful for me if you add option somthing like --usb-device-fd

lzhiyong commented 2 years ago

Consider this for the next version update.

lzhiyong commented 2 years ago

It's very helpful for me if you add option like --usb-device-fd

I think it should be compiled with termux's libusb as they do some hacks for android. see https://wiki.termux.com/wiki/Termux-usb Getting usb-device-fd should use termux-usb instead of adb

RohitVerma882 commented 2 years ago

It's very helpful for me if you add option like --usb-device-fd

I think it should be compiled with termux's libusb as they do some hacks for android. see https://wiki.termux.com/wiki/Termux-usb Getting usb-device-fd should use termux-usb instead of adb

Yes, but how to pass fd from java to adb or fastboot?

lzhiyong commented 2 years ago

I haven't done this yet, and haven't used usb to transfer data like using Arduino or MCU etc, so can't really help you.

RohitVerma882 commented 2 years ago

It's very helpful for me if you add option like --usb-device-fd

I think it should be compiled with termux's libusb as they do some hacks for android. see https://wiki.termux.com/wiki/Termux-usb Getting usb-device-fd should use termux-usb instead of adb

Yes, but how to pass fd from java to adb or fastboot?

In Termux-app added support for termux-usb (custom fd from java api)