Replies: 29 comments 1 reply
-
首先,你需要 用 Android Studio 构建一个 Android 项目 然后打开设备
|
Beta Was this translation helpful? Give feedback.
-
Try this tip as well from Peter Stoiber.
|
Beta Was this translation helpful? Give feedback.
-
#830 |
Beta Was this translation helpful? Give feedback.
-
This operation can indeed connect successfully. However, not all interfaces can be opened. For some interfaces, The claimInterface operation will fail |
Beta Was this translation helpful? Give feedback.
-
这个问题什么时候关闭呢? |
Beta Was this translation helpful? Give feedback.
-
@XanaduAPI Please use English here as others may not understand Chinese. Thanks. So you think that the issue can be closed as your solution is already working? Or do you think there are works to be done? |
Beta Was this translation helpful? Give feedback.
-
Hi, problems with claiming the interfaces on native side could be solved by claiming them before on Java/Kothlin side. |
Beta Was this translation helpful? Give feedback.
-
@Peter-St |
Beta Was this translation helpful? Give feedback.
-
Sure,
You can modify the source of the unRootedAndroid.c for performing other actions and recompile it again. I have uploaded a working sample: https://github.com/Peter-St/unRootedSample If you have any improvements plz tell. Peter |
Beta Was this translation helpful? Give feedback.
-
Okay, I will try. But now we have a holiday. I will contact you if I have news. thank you. |
Beta Was this translation helpful? Give feedback.
-
--> happy holidays and a good start into the new year. 🎉 |
Beta Was this translation helpful? Give feedback.
-
For me, it's just an ordinary Festival, and the new year will come to the Spring Festival.🎉 |
Beta Was this translation helpful? Give feedback.
-
I wonder if some documents are missing? I can't find the relevant implementation. |
Beta Was this translation helpful? Give feedback.
-
Check your Plugins for Android-Studio. |
Beta Was this translation helpful? Give feedback.
-
hi I checked the list of plug-ins and found nothing extra. public interface unRootedSample extends Library { What is in "unRootedAndroid"? Is this your C code? Xanadu |
Beta Was this translation helpful? Give feedback.
-
hi In fact, I also used libusb and passed in descriptors, but for Apple devices, I can only open a specific PTP interface, but the multiplexing interface cannot. Specific interface calls to claimInterface fail, whether it's libusb or Java code. |
Beta Was this translation helpful? Give feedback.
-
Hello, Plz check my commits from the Pull Request first. If you were getting no compilation errors (because no error logs were attached), then set your Android Studio debugging Options from autodetect to Java Only. (menu.entry under Run or Build menu). In Android-Studio I can only get Debugging log from "Java Only" set from Native Code. In my project I used the official Libusb with my posted PullRequst. The unRootedAndroid.c (in the Examples folder) is accessed over JNA. Claiming the Interfaces on Java still does not work on some Android devices too, but once opend the Device on Java and reopened than with LibUsb Interface claiming allways works. |
Beta Was this translation helpful? Give feedback.
-
I read your explain. But I fail to call UsbDeviceConnection.claimInterfacein() Java |
Beta Was this translation helpful? Give feedback.
-
On some Devices I'm having still problems finding the interfaces on Java, but could always find them with Libusb. Your problem looks more like the Interfaces were obtained by other kernel drivers, which you can not detach. Try to debug, if you can detach any drivers from the Usb Interfaces... this concern is not really pointing at this topic of this Issue any more I think, because here we start to talk about something else. So far, Peter |
Beta Was this translation helpful? Give feedback.
-
My goal is to use usbmuxd to run on Android and connect to IOS devices, so the operations you provide can only open some other interfaces. As you said, maybe I need more in-depth study. Anyway, thank you very much. Xanadu |
Beta Was this translation helpful? Give feedback.
-
Ok, in your case I would not use libusb for this behavior. Usbmuxd uses tcp to communicate. Look at the Telnet-Server: You will have to send data bytes to the usbmuxd filedescriptor. Not the one from dev/bus/usb...) I don't own an ios devs, so I think I couldn't help you any more in your concern. So far, Peter |
Beta Was this translation helpful? Give feedback.
-
I see that usbmuxd relies on libusb, and it needs to enumerate USB devices. Of course, you don't need to help me. In fact, we've switched to other ways now. By building a tiny Linux hardware system between Android and iPhone, these permission problems can be avoided. So much for your help. I wish you a happy life. |
Beta Was this translation helpful? Give feedback.
-
Ok, same too you and good luck in your issue! |
Beta Was this translation helpful? Give feedback.
-
I submitted #874 to make libusb seamless for my usecase on android (includes device enumeration). I'm new to libusb and didn't review the whole api, so if anybody has comments, advice, or can add what's missing onto my work, it's appreciated. |
Beta Was this translation helpful? Give feedback.
-
https://github.com/libusb/libusb/wiki/Android I have also update the wiki to point to this issue #717, as well as #830 and #874. |
Beta Was this translation helpful? Give feedback.
-
For Android users, please check out #1164 for further improvement. |
Beta Was this translation helpful? Give feedback.
-
Hello,I have also been studying libusb recently, and I want to realize the access to iphone on android devices. Now I am looking for a solution. What do you mean by "a tiny Linux hardware system between Android and iPhone"? @AiXanadu |
Beta Was this translation helpful? Give feedback.
-
@ben1681 What I'm talking about is another method, using a small Linux system as middleware to connect Android and iPhone. |
Beta Was this translation helpful? Give feedback.
-
hey,boy ,有没有联系方式,想跟你请教下这些问题 /ღ( ´・ᴗ・` )比心 |
Beta Was this translation helpful? Give feedback.
-
Hi everyone,
I'm trying to port a library that internally uses libusb from Linux to Android, the library managed to build apparently fine after previous build of all its dependencies, and while I have success obtaining permission for the USB device in my android application. Calling the library endpoints simply won't do anything. Then I came across this paragraph in libusb:
Could someone please describe how is that match done? I've searched around and for the love of Yoda that I cannot find anything useful or anyone describing such kind of example in some sort of detail, or some example of a working usage of the same case stated above.
Thank you in advance
Beta Was this translation helpful? Give feedback.
All reactions