Return to site

Push File To Android

broken image


ADB File copy may come in handy when you are in a tricky situation. In this guide, we will tell you how you can copy files from your computer to your Android device via ADB Push.

In this example implementing Google Cloud Messaging (GCM) for android. Using Google Cloud Messaging (GCM) sending push notification from web server to registered android devices. Using php as server side language and mysql as database. Then you can navigate to folder which you want to push your file in it. Right click on that folder and select upload(or press Ctrl+Shift+O). Select file you want to upload and it will upload file to desired location. Push file using adb.exe.

Ps3 emulator android. Whenever someone wants to copy files from/to their computer to/from their Android device, they can simply connect their device to the computer via USB cable and make use of the MTP Mode. It is just a tap away and opens the Android smartphone storage in the computer. So easy. You can even copy large number/huge files in a matter of few minutes, effortlessly.

But what if, there comes a situation where you cannot access MTP mode but need to copy a file from your PC to Android? You can simply do so by using the ADB Push Command.

Okay, Where Am I Gonna Need This?

Android Push Notification Permissions

Outlook android push notifications

Good question. Let us take this scenario: You are in the process of flashing custom ROMs on your Android device and one of the steps require you to fully wipe the device before proceeding. In that case, you will be left with an empty device with no ROM zip file on your device to be able to flash it. This is where ADB comes in to play.

You could simply push a file from your computer to your Android smartphone by using a simple ADB command. Of course, your Android device needs to be connected to your computer via USB cable.

This guide provides a detailed explanation on how to Transfer or Install files via TWRP Recovery. These include the 'ADB Push', 'ADB Sideload' and the 'Mount' option of TWRP Recovery. Let's face it. TWRP is hands down the best custom recovery available right now. This is mainly because of two reasons: features and stability. Snap on camera for phone. It is anything but commendable to be able to provide tons of features and yet at the same time maintain such amazing stability.

Of the many important features that it includes, three will be discussed here- the 'ADB Sideload', 'ADB Push' and the 'Mount' option. Using imovie to edit video. Whereas ADB Push and the Mount Option perform similar functions, ADB Sideload does a more useful functionality. Let's have a look at each one of them in detail. But first, make sure to carry out all the steps mentioned in the 'Prerequisites' as well as the 'TWRP Prerequisites' sections below.

Push File To Android

Good question. Let us take this scenario: You are in the process of flashing custom ROMs on your Android device and one of the steps require you to fully wipe the device before proceeding. In that case, you will be left with an empty device with no ROM zip file on your device to be able to flash it. This is where ADB comes in to play.

You could simply push a file from your computer to your Android smartphone by using a simple ADB command. Of course, your Android device needs to be connected to your computer via USB cable.

This guide provides a detailed explanation on how to Transfer or Install files via TWRP Recovery. These include the 'ADB Push', 'ADB Sideload' and the 'Mount' option of TWRP Recovery. Let's face it. TWRP is hands down the best custom recovery available right now. This is mainly because of two reasons: features and stability. Snap on camera for phone. It is anything but commendable to be able to provide tons of features and yet at the same time maintain such amazing stability.

Of the many important features that it includes, three will be discussed here- the 'ADB Sideload', 'ADB Push' and the 'Mount' option. Using imovie to edit video. Whereas ADB Push and the Mount Option perform similar functions, ADB Sideload does a more useful functionality. Let's have a look at each one of them in detail. But first, make sure to carry out all the steps mentioned in the 'Prerequisites' as well as the 'TWRP Prerequisites' sections below.

Prerequisites

  • To begin with, you will have to enable USB Debugging on your device. This is needed so that your device gets recognized by your PC in ADB Mode. Hence head over to 'Settings' > About Phone > Tap on 'Build Number' 7 Times > Go back to 'Settings' > System > Advanced > 'Enable USB debugging'.
  • Next up, download and install ADB and Fastboot Platform Tools on your PC. This will provide the necessary ADB and Fastboot binaries.
  • Head over to the platform-tools folder (it is the folder where you have installed Android SDK just now). Type in CMD in the address bar of the folder and hit Enter. This will launch the Command Prompt.
  • Also transfer the ZIP file, that you wish to push or sideload, to this 'platform-tools' folder.

TWRP Prerequisites

  • To begin with, make sure TWRP recovery is installed on your device. If not, then refer to this guide on How to Install TWRP Recovery on any Android Device. Or if you just wish to boot your device for one-time install (temporary installation), then refer to our guide: How to Boot into Recovery (TWRP/Stock) from Fastboot Mode.
  • Boot your device to the TWRP Recovery, either via the hardware key combination or by entering the below code:
  • With that, it is now time to start the guide on how to transfer or install files via TWRP Recovery.

The ADB Sideload Feature of TWRP

Hands down my favorite of the three. Using Sideload, you could directly install any zip file right from the command line. No need to transfer the file to the device's internal storage, navigate for the required file, and then flash it. The ADB Sideload feature does it all for you.

It takes the file from the PC and automatically installs it on your Android device. This feature is extremely beneficial when you have wiped your Internal Storage and about to flash a new ROM. Rather than copy-paste the entire ROM to the device, you could directly flash it from the PC itself. Let us have a look at how this could be achieved. Just keep in mind that you could only install zip files via it. But most of the time that is the only file format we are dealing with, right?

How to Use the ADB Sideload Feature

  1. Make sure the file to be sideloaded is placed inside the platform-tools folder.
  2. Now, with the device booted to the TWRP Recovery, tap on 'Advanced'.
  3. Next, tap on 'ADB Sideload' > 'Swipe to start Sideload'.
  4. At that instance, enter the following code in the PowerShell window:
  5. You will see the progress bar in the command window. As soon as it turns 100%, the zip file would be automatically installed on your device. That's it.
  6. For example, let's say we are installing a Magsik Module named ‘Mi_A2_Stock_Camera_app‘. Then the code will be: adb sideload Mi_A2_Stock_Camera_app.zip. Have a look at the below screenshot:

The ADB Push Feature

The next in our list of how to transfer or install files via TWRP Recovery is the ADB Push feature. This feature does not install the files on your device. Rather it is used to transfer files from the PC to your device. The obvious question then arises- what does it hold for me? Well, plenty of things. Although it may seem like a small code, it has many advantages.

First off, as opposed to the ADB Sideload feature, this feature does not need any custom recovery installed on your device. Which means you don't need a rooted device. Which, in turn, signifies that it will work very well on devices with a locked bootloader. Also, this feature is not just restricted to the ZIP file. You may transfer any file type you like. That's another big plus for this feature.

[Loving this guide? Make sure to check out another similar one: List of Useful ADB and Fastboot Commands]

Google Push Notification Android

How to Execute the ADB Push Process:

  1. Make sure the file to be ‘pushed' is present inside the Platform-Tools folder.
  2. In the PowerShell window, type the below code:
  3. Suppose we want to transfer a file named ‘game.apk' to the ‘sdcard', then the code will be:
  4. That's it. You have successfully transferred the file to the desired location on your device.

The 'Mount' Feature of TWRP Recovery

Let's move onto the final section of the guide on how to transfer or install files via TWRP Recovery. Suppose you have bricked your device and recovery is the thing you are able to access. [Even if you could only access the fastboot mode, then just type fastboot boot recovery-name.img to boot to TWRP Recovery]. In such cases, obviously, you won't be able to access the 'ADB Push' feature.

Push File To Android Studio

And if you want to try out a non-zip file, then even the 'ADB Sideload' won't work. This is where the Mount feature of TWRP comes in handy. Just enable this feature and transfer as many files as you want. Also, it is not restricted to any particular file type. Just amazing, no?

How to Access the 'Mount' Feature

  1. Boot your device to TWRP Recovery.
  2. Go to 'Mount'.
  3. Now, tap on the 'Enable MTP' option situated at the bottom right.
  4. After that, the device will be recognized on your PC.
  5. Just transfer the desired files to your device and start flashing them via the 'Install' feature of TWRP.

Adb Push File To Android

Final Thoughts

Push Files To Android Adb

So this was a comprehensive guide on how to transfer or install files via TWRP Recovery. All the three features mentioned above are extremely beneficial and time saver. Just use it as mentioned in the circumstances. Also, if you didn't understand any part of the guide, do let me know. I'll get back to you with a much simpler and more detailed explanation, if possible. Give your feedback in the comments section below. Happy Installing!





broken image