bottlesdevs / Bottles

Run Windows software and games on Linux
https://usebottles.com
GNU General Public License v3.0
6.34k stars 265 forks source link

Is there any way to use adb fastboot tools inside a bottle with any version of wine? #2630

Open ghost opened 1 year ago

ghost commented 1 year ago

Xiaomi devices require a proprietary windows-only program to unlock the bootloader. Since I don't use Windows, I decided to use bottles. The program runs and I am also able to login with my Xiaomi account but the program isn't able to detect my phone connected via a USB cable.

I am aware that there exists a 3rd party native linux program which is capable of doing the job but it seems to have been abandoned and I am facing login issues on it like many other users who have already opened an issue in its issue tracker. Some have tried fixing the issue but that fix invites a new issue related to login(again) and I am left with no choice but to rely on the official proprietary program.

The official program comes with its own binaries of adb and fastboot so the user isn't supposed to deal with installing anything else. I am assuming that the issue is because wine or Bottles isn't able to detect/access the USB connection which in turn doesn't let the program detect my phone.

I was wondering if there's any way to make adb fastboot tools or more specifically the USB connections accessible inside a bottle. I opened this issue here in Bottles' issue tracker because I am unsure if this issue is specific to wine itself or Bottles.

More Information:
Distribution: Fedora Silverblue
Bottles version: 50.2(flathub)
Runner: wine-ge-proton7-35
Kinsteen commented 1 year ago

I'm not sure what's the best way under Wine, but I would suggest using a Windows VM for this, as it will probably work way more easily than in Wine...

ghost commented 1 year ago

I have considered setting up a Windows VM but the thing is I would prefer to do it with Wine because it is not as big as something I would want to setup an entire VM for. I will eventually just use a VM in the end if I have no choice but to rely on it.

Qronikarz commented 1 year ago

Sorry for joining in, but had an idea if you're willing to spend some time testing.

How about using heroic games launcher to see if the USB is detected? Since some time it has ability to install normal .exe games and it also has an appimage version so it won't have any problems that come with flatpak permissions. If it works on the AppImage (assuming you can run it on Silverblue distro) version you could then test the flatpak version of the heroic launcher and we could know if it's issue with Bottles or with flatpak.

ghost commented 1 year ago

It doesn't seem like an issue with flatpak permissions because on other flatpak applications, USB connection is being detected easily once I allow the application access to All devices via Flatseal, Bottles already have the permission by default from what I can tell via Flatseal. I tested remote debugging via USB using Firefox Android and Firefox flatpak, and it works like a charm. I am assuming there's something in wine, or perhaps even Bottles, that is needed to be tweaked to make things work.

Qronikarz commented 1 year ago

I've read some more on this matter and no new knowledge gained. Just searching usb in WineHQ gives results to read for hours. You need to make symlinks and other tweaks. Tested Heroic AppImage with Rufus and USB stick and it doesn't detect anything. So probably something with Wine. Newest version with some info about it is Wine 7.13 where the USB Driver was converted to PE so at the very least there is some work. https://www.winehq.org//announce/7.13