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

后端 未结 13 1646
南笙
南笙 2020-12-04 07:44

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         


        
相关标签:
13条回答
  • 2020-12-04 08:08

    You are trying to write to system folders. With ADB you have root (admin) access so you see the system folders of which sdcard is one of them so to send a picture you could use

    D:\Program Files\Android\sdk\platform-tools\adb push am files\android sdk\adb.exe push C:\Downloads\anand.jpg /sdcard/pictures/

    NB: C:\Downloads\anand.jpg replace with path and name to picture..

    0 讨论(0)
  • 2020-12-04 08:11

    From Ubuntu Terminal, below works for me.

    ./adb push '/home/hardik.trivedi/Downloads/one.jpg' '/data/local/'
    
    0 讨论(0)
  • 2020-12-04 08:12

    Sometimes you need the extension,

    adb push file.zip /sdcard/file.zip

    0 讨论(0)
  • 2020-12-04 08:12

    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.

    0 讨论(0)
  • 2020-12-04 08:15

    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
    
    0 讨论(0)
  • 2020-12-04 08:16

    Try this to push in Internal storage.

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

    Works in One plus device, without SD card.

    0 讨论(0)
提交回复
热议问题