abd under Ubuntu 20.04

Questions about Wine on Linux
Locked
johnaaronrose
Level 2
Level 2
Posts: 22
Joined: Tue Dec 01, 2009 8:49 am

abd under Ubuntu 20.04

Post by johnaaronrose »

Has anybody tried to use abd (Android bridge) to link to their phone ? I've placed it in the Program Files (x86) directory. When I tried to run it (with the equivalent of 'adb devices' which runs Ok on my Ubuntu 20.04 box) there was a problem with AdbWinApi.dll being missing. So I downloaded that dll file and put it into C:windows\syswow64. I then tried in Terminal:

Code: Select all

wine start /unix "virtualwinedrives/b4x64/drive_c/Program Files (x86)/Anywhere Software/Basic4android/adb.exe devices"
but up popped a window saying Error in title with contents of 'File not found'. I've also tried it with single quotes replacing the double quotes. I looked at the Wine documentation but AFAIK it doesn't give an equivalent example to mine. Any ideas?
hotfrostworm
Level 2
Level 2
Posts: 15
Joined: Fri Nov 06, 2020 3:20 pm

Re: abd under Ubuntu 20.04

Post by hotfrostworm »

Keep it simple. The path seems to be in question, I don't see a root here? Assuming virtualwinedrives is in home??

Try this from terminal;

cd "virtualwinedrives/b4x64/drive_c/Program Files (x86)/Anywhere Software/Basic4android"

If you are not in your directory, I suspect you are missing the home/.wine prefix. Try this;

cd $HOME"/.wine/virtualwinedrives/b4x64/drive_c/Program Files (x86)/Anywhere Software/Basic4android"

Still not there? Use your filemanager to navigate then open the terminal in that folder. Look at the entire string for typos or (dots) hidden folders.

Once you navigate to your file simply type;

wine adb.exe

I keep all my programs on a separate partition to access them I use a scripted command such as;

cd "/media/userone/partition3/JoyToKey_(v3_79)"
wine JoyToKey.exe

I avoid using spaces, when possible replacing them with underscores.
Ebiko
Level 1
Level 1
Posts: 9
Joined: Fri Dec 03, 2021 8:30 am

Re: abd under Ubuntu 20.04

Post by Ebiko »

Sry, but why on earth are you trying to run adb with wine ?

Adb runs fine Natively in basically any Linux ?

You don't need wine for it.

Just sudo apt install adb ?

Google it.
You do not need wine to run adb and fastboot.
Both are available in official software repositories.
johnaaronrose
Level 2
Level 2
Posts: 22
Joined: Tue Dec 01, 2009 8:49 am

Re: adb under Ubuntu 20.04

Post by johnaaronrose »

hotfrostworm wrote: Fri Mar 04, 2022 9:15 am Keep it simple. The path seems to be in question, I don't see a root here? Assuming virtualwinedrives is in home??

Try this from terminal;

cd "virtualwinedrives/b4x64/drive_c/Program Files (x86)/Anywhere Software/Basic4android"

If you are not in your directory, I suspect you are missing the home/.wine prefix. Try this;

cd $HOME"/.wine/virtualwinedrives/b4x64/drive_c/Program Files (x86)/Anywhere Software/Basic4android"

Still not there? Use your filemanager to navigate then open the terminal in that folder. Look at the entire string for typos or (dots) hidden folders.

Once you navigate to your file simply type;

wine adb.exe

I keep all my programs on a separate partition to access them I use a scripted command such as;

cd "/media/userone/partition3/JoyToKey_(v3_79)"
wine JoyToKey.exe

I avoid using spaces, when possible replacing them with underscores.
Thanks for your useful reply. I've just created platform-tools in ~/VirtualWineDrives/B4X/drive_c/Android/ from this file platform-tools_r31.0.3-windows.zip downloaded from https://androidsdkmanager.azurewebsites ... tformtools

Here is what I've just tried:

Code: Select all

john@desktop:~/VirtualWineDrives/B4X/drive_c/Android$ ls
build-tools  extras  licenses  platforms  platform-tools  tools
john@desktop:~/VirtualWineDrives/B4X/drive_c/Android$ cd platform-tools
john@desktop:~/VirtualWineDrives/B4X/drive_c/Android/platform-tools$ dir
adb.exe		  etc1tool.exe	       make_f2fs_casefold.exe  NOTICE.txt
AdbWinApi.dll	  fastboot.exe	       make_f2fs.exe	       source.properties
AdbWinUsbApi.dll  hprof-conv.exe       mke2fs.conf	       sqlite3.exe
dmtracedump.exe   libwinpthread-1.dll  mke2fs.exe	       systrace
john@desktop:~/VirtualWineDrives/B4X/drive_c/Android/platform-tools$ wine adb.exe version
adb.exe F 03-08 08:05:59   408   253 sysdeps_win32.cpp:2908] _wenviron is not set, did you link with -municode?

abnormal program termination
'wine adb.exe' gives the same result as above. Running adb.exe from ~/VirtualWineDrives/B4X/drive_c/Program Files (x86)/Anywhere Software/Basic4android/adb.exe gives the same result. I've even tried copying AdbWinApi.dll & AdbWinUsbApi.dll to ~/VirtualWineDrives/B4X/drive_c/windows/system32 & ~/VirtualWineDrives/B4X/drive_c/windows/syswow64/ but same result.

The Linux version of adb from (which I've put in directory ~/B4X/platform-tools/ from this file platform-tools_r31.0.3-linux.zip downloaded from https://androidsdkmanager.azurewebsites ... tformtools works Ok:

Code: Select all

ohn@desktop:~$ B4X/platform-tools/adb version
Android Debug Bridge version 1.0.41
Version 31.0.3-7562133
Installed as /home/john/B4X/platform-tools/adb
john@desktop:~$ 
PS The WINEPREFIX is /home/john/VirtualWineDrives/B4X
johnaaronrose
Level 2
Level 2
Posts: 22
Joined: Tue Dec 01, 2009 8:49 am

Re: abd under Ubuntu 20.04

Post by johnaaronrose »

Ebiko wrote: Mon Mar 07, 2022 4:37 pm Sry, but why on earth are you trying to run adb with wine ?

Adb runs fine Natively in basically any Linux ?

You don't need wine for it.

Just sudo apt install adb ?

Google it.
You do not need wine to run adb and fastboot.
Both are available in official software repositories.
adb.exe is required by Windows app B4A (part of app suite B4X) which runs under Wine Ok apart from an adb.exe problem. B4A stands for Basic4Android, which is a RAD tool to develop Android apps.
hotfrostworm
Level 2
Level 2
Posts: 15
Joined: Fri Nov 06, 2020 3:20 pm

Re: abd under Ubuntu 20.04

Post by hotfrostworm »

In your code block:

Code: Select all

ohn@desktop:~$ B4X/platform-tools/adb version
Android Debug Bridge version 1.0.41
Version 31.0.3-7562133
Installed as /home/john/B4X/platform-tools/adb
john@desktop:~$ 
The adb you ran for version is Linux. There was no call to Wine from what you just showed?

Try this;
cd /home/john/VirtualWineDrives/B4X/drive_c/Android/platform-tools
wine adb.exe version

You seem to have both versions installed.
johnaaronrose
Level 2
Level 2
Posts: 22
Joined: Tue Dec 01, 2009 8:49 am

Re: abd under Ubuntu 20.04

Post by johnaaronrose »

Here is your suggestion's results:

Code: Select all

john@desktop:~$ cd /home/john/VirtualWineDrives/B4X/drive_c/Android/platform-tools
john@desktop:~/VirtualWineDrives/B4X/drive_c/Android/platform-tools$ wine adb.exe version
adb.exe F 03-11 06:43:39   403   375 sysdeps_win32.cpp:2908] _wenviron is not set, did you link with -municode?

abnormal program termination
john@desktop:~/VirtualWineDrives/B4X/drive_c/Android/platform-tools$ 
I have both versions installed as I'm using B4a RAD tool.
Locked