Add Android PATH to your ubuntu profile and make your life less shitty (Updated 15 March 2018)

Like the title say,  let us do it.

After you finish doing installation of the Android SDK, you probably don't want to open the terminal and keep on typing cd to find adb path before doing god know what.

Obviously I'm the latest generation of GNU/Linux user that cannot be bothered with learning vi or emacs, so I'm going to use nano instead.

DISCLAIMER: I've tried it on Ubuntu, Kali Linux and Debian, it works for me so far.

  1. Open your terminal, make sure it is in the home directory, click Ctrl + H and locate your .bashrc file.
  2. type sudo nano .bashrc, enter your password if you are not root (duh).
  3. scroll until the end of all those things that we don't understand.
  4. start typing the path of your Android SDK:
    export PATH="$PATH:/"your_path"Android/Sdk/tools/:/"your_path"/Android/Sdk/platform-tools/:/"your_path"/Android/Sdk/build-tools/26.0.2/"
  5. Save those things by clicking Ctrl + O.
  6. Exit your nano by clicking Ctrl + X.
  7. Now to enable the changes on your profile, simply type on your terminal:
    source .bashrc
  8. At this time hopefully you would be able to simply type adb on any path on your terminal (again hopefully).
The problem you shall encounter is probably the bad spelling like what I do, hence why I provide the path for you to copy.
Simply change "your_path" to the path inside your OS and insert in your  .bashrc

#########(UPDATE 15 MARCH 2018)#########
The steps now simplified!

# Add the directory containing executables in PATH so that they can be found
echo 'export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools' >> ~/.bashrc
source ~/.bashrc



Popular posts from this blog

VMware Workstation 14 Bridge Mode not Connected to Internet

Fixing Installation Problem in Kali Linux 2018.2 for VirtualBox and VMware Workstation. (gcc 7.3.0)

This is how I understand Data Encapsulation