How to use adb command to push a file on device without sd card

Viewed 665256

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).
15 Answers

Try this to push in Internal storage.

adb push my-file.apk ./storage/emulated/0/

Works in One plus device, without SD card.

After Trying all the answers this worked for me

Where I am Pushing a file on Desktop to Android Device (Redmi K20 pro) connected Over the air using adb.

This command pushes the file to the downloads folder on my phone

adb push ~/Desktop/notifications.drawio ./storage/emulated/0/Download

after running this if you get a permission denied error

try running these commands in order (which basically changes the directory permission)

adb shell

chmod 777 /data/local/tmp

exit

and then run try the adb push command

I have documented this here feel free to share your views and help improve it.

This might be the best answer you'll may read. Setup Android Studio Then just go to view & Open Device Explorer. Right-click on the folder & just upload a file.

In my case, I had an already removed SDCard still registered in Android. So I longpressed the entry for my old SDCard under:

Settings | Storage & USB

and selected "Forget".

Afterwards a normal

adb push myfile.zip /sdcard/

worked fine.

In Mac: To push files via adb

adb push /Users/Downloads⁩/amazon.sdktester.json '/mnt/sdcard/amazon.sdktester.json'
Related