ADB Push & ADB Pull

ADB Push

Want to minimize your work while working on your android device debugging using ADB Push & ADB Pull? If yes, then you might hear about ADB. Today we are going to talk about ADB in detail. Keep reading get more knowledge about it.

What is ADB?

Now before starting about adb push, we will see what ADB is?

ADB stands for Android Debug Bridge. It is a powerful command-line tool. This tool helps in debugging the android device by building a bridge between the android device and the computer.

There are a lot of ADB commands to make our work easier while debugging android devices. But the most used commands are Adb push and pull. These two commands are used to push and pull files from the android system. We will talk about them in great detail in a bit. But first, we have to know what things we need to work with ADB. All we need is an Android device, a Computer, and an ADB driver for your android device. Now let us see how to set up your android device for ADB. You can google it also.

What happens when ADB is not recognized?

How to set up an Android Device?

Setting up an Android device is quite easy for this. All you have to follow some simple steps which are given below to work with ABD on your device.

  1. The first thing you need to do is to maintain the battery of at least 60%.
  2. The next thing you need is to install the driver software of your device on your computer. You can find your device driver on the website of your device manufacturer.
  3. Now once you have done installing the driver next thing you have to do is to enable the developer option on your device. First of all, you have to go to device settings and then go to developer options and then enable it. Now you are almost done.
  4. Download any of the fastboot/adb controllers on your computer and install it.
  5. Download the platform-tools and extract it on your computer.
adb push
adb push
  1. Open the platform-tools folder and right-click anywhere in that folder. From the popup, which appears on the page, select the launch command prompt/terminal here. A black screen will appear on your screen.

Now once you have done these steps correctly, you are all set to work on the ADB.

ADB push and pull.

Adb push and Adb pull are the two most used commands. These two commands are used to push and pull files into the android system. These two command makes the work very. We will now see how to use these two commands.

Adb Push

Now to push any file into the Android system, you need to use the command. This command tells you to specify the source path of the file and the target or the destination where you want to put the file. But going further about it we should need to know something.

Pushing files into the system need permissions as the android system works on a read-only basis. We need to change it to read-write mode. To do it, enter the given command below as it is.

adb shell 
su .
mount -o remount,rw /system

You have to enter these commands one by one. If you do everything correctly, you will be able to change the permissions. Now once you have done that. Let us see the syntax of the push command.

adb push <source-path> <target-path>

For example, In this example, we are trying to push Settings.apk to the folder system, and there is a subfolder named apps.

adb push Settings.apk /system/apps/

This is the simple way to push any file into the system. If you enter the command correctly, you will get a message of the amount of data transferred. This is to verify that you have successfully pushed the file into the system.

Now once you have done pushing files into the system you again need to change the permissions to read-only. To do so, enter the command given below.

See also: ADB Sideload

mount -o remount, ro /system
Adb Pull

As now we have seen how to push any file into the android system now, we will see how to pull some files from the android device to the computer.

The first thing you should know before pulling a file from the system you need to know the exact address of the file. The syntax of pull is

adb pull <path-of-the-file>

Now for the time let us assume that we want to pull alarm.apk which is present in the system/apps folder, the command should follow as

adb, pull /system/app/Alarm.apk

The file will be pulled and to confirm that it will popup a message the same as the previous one telling about the total amount of data pulled from the android system to the computer.

Now you know how to push and pull files in the system. These two simple command makes everything easy. But keep in mind that while pushing and pulling files into the android system, you need to have the proper knowledge of the address of the file, or it may corrupt the file.

Let us see some other handy Adb command to make our debugging more easy. So let us roll into it.

adb help

This small command will list you all the command in adb. It comes handy when you dont know some command and want to use it. Just put this command, and you have a full list of adb commands with an explanation over how to use them.

adb devices

This command will list you all the android devices which are successfully connected to adb. This comes in handy when you have connected more than one device, and you need to put some command in some of the devices. You should always run this command once before putting some command into the device to make sure that the device is properly connected to the system or you are sending the correct information to the correct device.

adb usb

This command will list you all the android devices connected to your system through an usb cable. This command comes handy to check which of the device is connected to adb. This will also be used to verify whether a device is successfully connected to the system.

adb devices //show devices attached

This command will list you all the android devices connected to the computer over any means of communication. This command comes handy when you want to which all devices are connected to the system at the point of time.

adb connect ip_address_of_device

The adb connect command is used to connect to the IP address of the android device. This will help to access the data over the internet through the android device.

adb reboot

The adb reboot command is used to reboot the system through the adb command pannel. This will help in when the system needed some reboot after the debug. However, when the android device boots up again, you again need to connect the device to the adb command pannel, or it will not work.

adb reboot bootloader

The adb reboot command bootloader is used to reboot the device into bootloader mode through the adb command pannel. This will help in when the system needed some reboot into the bootloader after the debug. However, when the android device boots up again, you again need to connect the device to the adb command pannel, or it will not work.

adb reboot recovery

The adb reboot command is used to reboot the system through the adb command pannel. This will help in when the system needed some reboot after the debug. However, when the android device boots up again, you again need to connect the device to the adb command pannel, or it will not work.

adb install

This command is used to install apk to the android device by using the adb command pannel. This will install the apk available on your computer. You have to specify the address of the file to install.

adb uninstall

This command will uninstall an apk from the android device using the adb command pannel.

adb logcat

This small command is used to see all the log data of the android device.

adb bugreport

This command is the same as the adb logcat; the difference is that it shows all the data related to debug like dumpsys, dumpstate and logcat data.

adb get-state

This command is used to get the status of the android device connected to the adb control panel.

adb backup

This command will help you to take the backup of your android system to your computer. You need to specify the address where you want to store the backup.

Conclusion

All of us need to minimize our work while working on something. While working on android debugging, ADB Push & ADB Pull command comes in handy. We have talked about a lot of adb commands in today’s article. Try these commands and minimize your work. I hope you liked the post. Keep reading.

Gossipfunda | Android | Electronic | Tech News | App Review
error: Content is protected !!