How to use adb command to push a file on device without sd card
How to push a file from computer to an Android device having no SD Card in it. I tried:
C:\anand>adb push anand.jpg /data/local
3399 KB/s (111387 bytes in 0.032s)
C:\anand>adb push anand.jpg /data/opt
3199 KB/s (111387 bytes in 0.034s)
C:\anand>adb push anand.jpg /data/tmp
3884 KB/s (111387 bytes in 0.028s)
Above commands to move a file anand.jpg
to a device but I didn't get this jpg
file in the device.
I didn't get any success result on cmd prompt, I only got:
3399 KB/s (111387 bytes in 0.032s).
From Ubuntu Terminal, below works for me.
./adb push '/home/hardik.trivedi/Downloads/one.jpg' '/data/local/'
I did it using this command:
syntax: adb push filename.extension /sdcard/0/
example: adb push UPDATE-SuperSU-v2.01.zip /sdcard/0/
Follow these steps :
go to Android Sdk then 'platform-tools' path on your Terminal or Console
(on mac, default path is : /Users/USERNAME/Library/Android/sdk/platform-tools)
To check the SDCards(External and Internal) installed on your device fire these commands :
- 1) ./adb shell (hit return/enter)
- 2) cd -(hit return/enter)
now you will see the list of Directories and files from your android device there you may find /sdcard as well as /storage
- 3) cd /storage (hit return/enter)
- 4) ls (hit return/enter)
you may see sdcard0 (generally sdcard0 is internal storage) and sdcard1 (if External SDCard is present)
- 5) exit (hit return/enter)
to come out of adb shell
- 6) ./adb push '/Users/SML/Documents/filename.zip' /storage/sdcard0/path_to_store/ (hit return/enter)
to copy file
Sometimes you need the extension,
adb push file.zip /sdcard/file.zip
run below command firstly
adb root
adb remount
Then execute what you input previously
C:\anand>adb push anand.jpg /data/local
C:\anand>adb push anand.jpg /data/opt
C:\anand>adb push anand.jpg /data/tmp