BASIC COMMANDS WITH ADB FROM THE ANDROID SDK

Androidsdk

When we need change recovery in our terminals, or when we need change the SPL or use the SDK emulator, we have to lay hold of the ADB tool that comes in the Android SDK. Many times we repeat the steps that we find in the manuals or on the web without knowing very well what we are doing, today we are going to try to make us know more about what we do the next time we use the ADB.

In order to use the ADB console it is necessary that we have lowered the Android SDK on our computer and unzipped in a folder that for practical reasons is recommended to be at the root of our hard drive. Inside this folder of the SDK we find another folder called Tools. In this folder tools are the tools to help developers in their work of creating applications, one of them is the ADB.

To use adb we need to open a session in the terminal if we are on mac or in the console Android commands if we are in windows. Once inside the terminal we have to go to the tools folder of the sdk, to do this with the command CD (change directory) we change the directory until we are in the tools. For example, if when we open the terminal or the console we see that we get a command line such that: c:/>Program Files/My Documents/Androidsis/_ means that we are inside the directory androidsis which is in turn inside the directory my Documents turn inside program files. We wrote cd .. and we will download a branch in the directory structure and we will be inside c: /> Program Files / My Documents / _ , we continue like this until we are in c: /> and once here we write cd and name of the folder in which we find the android sdk unzipped, if it were for example Android sdk 16, then we would have to write cd androidsdk16 and would lead us to be in C: /> android sdk 16 / _, we continue like this until we are inside the tools folder inside the Android SDk.

Once we are in this folder, just by putting adb and pressing enter it will list the available options to execute with this command. The ones we use the most are the following:

adb install adb install appmanager.apk This option allows us to install an application on our terminal.

adb push adb push appmanager.apk sdcard / appmanager.apk This option allows us to copy a specific file to a specific location on our phone.

adb pull adb sdcard / appmanager.apk appmanager.apk With this we managed to copy a file from our phone to our computer

adb decides It shows us a list with the terminals or emulators connected.

adb shell A pound sign will appear on the screen, a sign that we have entered a command interpreter session. Once inside the shell command interpreter, we can create partitions, directories, delete, create, etc ... Inside the shell we can use the following commands:

  • ls List the directories and folders existing in the path that we are.
  • reboot Restart the terminal
  • rm Delete a file
  • rmdir Delete a directory
  • cd Change directory
  • mkdir Create a directory
  • mkswapp Create an exchange system
  • mount Mount a drive or partition
  • umount Unmount a drive
  • mv Move or rename a file

Example:

adb shell mount / sdcard (We mount the Sd card to be able to work on it)

adb shell rm /sdcard/update.zip (We delete the update.zip file from our phone)

adb push androidsis.zip /sdcard/androidsis.zip (We copy the file androidsis.zip from our computer to our card)

adb shell umount / sdcard (We unmount our SD card)

Well, I hope it helps you, if you see any incorrectness, do not hesitate to tell me, thank you.

SOURCE | android.com

 

 


It may interest you:
How to remove viruses on Android
Follow us on Google News