Install adb and fastboot from /e/ documentation

To avoid having to type the above commands every time you can add the location of the folder where you save the extracted platform tool file to you system configuration

On Ubuntu systems

Type the below command to you .bashrc file

You will be able to see the .bashrc file which are hidden files by pressing on your keyboard ctrl and h keys

export PATH="$HOME/platform-tools:$PATH"

here we have assumed you have saved the downloaded files to a folder named platform-tools and this is in your home directory

After this you should be able to access adb and fastboot by typing only the below commands in a console

adb devices

or

fastboot devices

I have copy that in the file but the fastboot still is not reconizing the device. If I use the command

platform-tools/fastboot devices

then it can recognize it

?

After you add
export PATH="$HOME/platform-tools:$PATH"
to your ~/.bashrc you will have to logout and log back in again to make the change effective.

2 Likes

I have done that but it doesnt work either

$ fastboot devices
List of devices attached

And doesnt matters where is add export PATH="$HOME/platform-tools:$PATH" ? I add it at the end of the text

That is correct, you add it as a new line at the foot of the existing text.

Can we just check that platform-tools got unzipped in the expected place. Please can you show the output of:

cd ~
cd platform-tools
ls

Edit. The above is academic if you already did:

`#!/bin/bash

wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip
unzip \platform-tools-latest-linux.zip
sudo cp platform-tools/adb /usr/bin/adb
sudo cp platform-tools/fastboot /usr/bin/fastboot`

Please can you confirm if you actually did that? If you did then you should probably delete your added line in .bashrc.

1 Like

~$ cd ~
noax@noax:~$ cd platform-tools
noax@noax:~/platform-tools$ ls
adb fastboot make_f2fs_casefold sload_f2fs
dmtracedump hprof-conv mke2fs source.properties
e2fsdroid lib64 mke2fs.conf sqlite3
etc1tool make_f2fs NOTICE.txt systrace
noax@noax:~/platform-tools$

Yes I did it cause the other on from e/ was not evn working to.
Should I start from 0 again?

I have uninstall the adb fastboot now again. And now I try to open from the file platform-tools the adb and adb devices and it says that bash : /usr/bin/ad no such file or directory

I have just found how to do it :

1.Extract the zip of the adb/fastboot in home
2.write in terminal :
cd platform-tools
sudo install adb /usr/bin/adb
sudo install fastboot /usr/bin/fastboot

And you will be able to use the last update of adb/fastboot tools

One problem with your method is that you have considered adb and fastboot, but have you considered all the other components of platform-tools?

I think it would be quite a good exercise to check out what you have wound up with. The following will help to try to check if any duplicates remain from your novel method. I suggest you read this link to become familiar with what I propose. https://linuxize.com/post/linux-which-command/.

I suggest you run:

echo $PATH
which -a adb
which -a fastboot

The output of the above will determine your next move. But I recommend you also check the version of adb and fastboot that you are going to be available. Version checking is a good way to determine that any command is actually available to you.

adb version
fastboot --version

1 Like

noax@noax:~$ echo $PATH
/home/noax/.local/bin:/home/noax/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
noax@noax:~$ which -a adb
/usr/bin/adb
/bin/adb
noax@noax:~$ which -a fastboot
/usr/bin/fastboot
/bin/fastboot
noax@noax:~$ adb version
Android Debug Bridge version 1.0.41
Version 32.0.0-8006631
Installed as /usr/bin/adb
noax@noax:~$ fastboot --version
fastboot version 32.0.0-8006631
Installed as /usr/bin/fastboot
noax@noax:~$

It was a good point of what to do with the other files.

Ok, so what to do next then?

What I did has help me to use adb and fastboot recognize the phone again. While I had the platform-tools extracted and copy paste the line in the bashrc, it was keeping saying in the terminal that was not such a file or directory in usr/bin

So we see duplicates in /usr/bin/ and /bin/. Notice that the usr/bin commands are taking preference. I wonder, what is the source of /bin/adb and /bin/fastboot?

what to do next then?

My reply would have to include that imho the instuctions we are using should include a sentence to say something like this.

If you have no platform-tools on your Linux machine go ahead and provide them as follows.

If platform-tools already exist on your machine you will need to consider if you are sufficiently expert to run two sets of identical commands.

If you don’t want to be compromised by duplicates please read your distribution’s instructions and fully uninstall the system platform-tools or android-tools as appropriate, before you start this process.

I think you will have learned quite a lot in this process. For the safety of any phones you are about to connect I would recommend you seriously consider undoing all you did and try to get /e/ method right, so that all platform-tools components are from the “same set”.

For interest you might check

/bin/adb version
/bin/fastboot --version
1 Like

noax@noax:~$ /bin/adb version
Android Debug Bridge version 1.0.41
Version 32.0.0-8006631
Installed as /usr/bin/adb
noax@noax:~$ /bin/fastboot --version
fastboot version 32.0.0-8006631
Installed as /usr/bin/fastboot
noax@noax:~$

Seems that comes from the same platform-tools

I am in Ubuntu and I have apt unistall the packeage of Ubuntu.

How to undo all of it right?

First point first! Please can you try

cd /bin
./adb version
./fastboot --version

I am not a Ubuntu user, I am aware they do it different from Debian, so I am sorry but I cannot help much on the Ubuntu system tools.

1 Like

noax@noax:~$ cd /bin
noax@noax:/bin$ ./adb version
Android Debug Bridge version 1.0.41
Version 32.0.0-8006631
Installed as /usr/bin/adb
noax@noax:/bin$ ./fastboot --version
fastboot version 32.0.0-8006631
Installed as /usr/bin/fastboot
noax@noax:/bin$

Good, so if you now use a file manager and look in /bin do you see that adb and fastboot there are in fact symbolic links to /usr/bin? If you confirm that you will know you do not seem to have old “system” versions left behind.

How do you propose to undo
sudo install adb /usr/bin/adb
sudo install fastboot /usr/bin/fastboot
from Post #13 ?

1 Like

with rm -rf ‘location of it’ ??

First, please can you confirm you saw symbolic links.

If that is a yes, then go for rm -rf; it will have to be sudo!

1 Like

Which file manager can I use for that?

Try
ls -l /bin/adb
ls -l /bin/fastboot

1 Like

this is what I get

noax@noax:~$ ls -l /bin/adb
-rwxr-xr-x 1 root root 8477840 Feb 3 14:51 /bin/adb
noax@noax:~$ ls -l /bin/fastboot
-rwxr-xr-x 1 root root 2231048 Feb 3 14:52 /bin/fastboot
noax@noax:~$

What you think if I rm -rf the adb and fastboot files in /bin and in /usr/bin ?

If you can reconfirm that you got good positive responses from uninstall/purge platform-tools and or android-tools the “Ubuntu way”, then I guess this is what you will have to do.

1 Like