My emulator can't do adb root. Anyway, I can do adb shell and then do su and get root to do my things. But how to copy some file from my PC to connected device using adb shell? Where can I access my disk? cp Mypc/somefile /Myandroid/comewhere ?

EDIT: I can't also do adb pull :(

1 Answer 1


Lol, I just set everything to 777 with su:

x86_64:/ $ su
x86_64:/ # chmod 777 /data/mi 
misc/     misc_ce/  misc_de/
x86_64:/ # chmod 777 /data/misc                                                             
x86_64:/ # chmod 777 /data/misc/                                                            
adb/              cameraserver/     media/            shared_relro/     vold/
audioserver/      dhcp/             net/              sms/              vpn/
bluedroid/        ethernet/         perfprofd/        systemkeys/       wifi/
bluetooth/        gatekeeper/       profiles/         trace/            zoneinfo/
bootstat/         keychain/         profman/          update_engine/
boottrace/        keystore/         radio/            user/
x86_64:/ # chmod 777 /data/misc/key                                                         
keychain/  keystore/
x86_64:/ # chmod 777 /data/misc/keystore/                                                   
x86_64:/ # chmod 777 /data/misc/keystore/user_0/                                            
x86_64:/ # chmod 777 /data/misc/keystore/user_0/*                                           
chmod: /data/misc/keystore/user_0/*: No such file or directory
1|x86_64:/ # chmod 777 /data/misc/keystore/user_0/*                                         
chmod: /data/misc/keystore/user_0/*: No such file or directory
1|x86_64:/ # 

And it worked :)))

marat@marat-desktop ~/Desktop> adb push charles-ssl-proxying-certificate.cer /data/misc/keystore/user_0/charles-ssl-proxying-certificate.cer
charles-ssl-proxying-certificate.cer: 1 file pushed. 5.4 MB/s (1348 bytes in 0.000s)
marat@marat-desktop ~/Desktop> 
  • 1
    Fix the permissions afterwards or else you just opened up a vulnerability on your devices data partition. Commented Apr 8, 2019 at 9:13
  • @Cookie you are in a sense making fun of Discretionary Access Control, like Windows did with UNIX and now they are fighting with malware. If everything is to be chmodded to 777, why there other permission modes exist! Instead of changing permissions of directories, do adb push to some writeable directory like /data/local/tmp and then use cp or mv from su shell. Commented Apr 9, 2019 at 21:09
  • Yeah, cp is more elegant way to do this. But i was using anbox and it cant even set pin code for ssl by android'd os requrement :( Commented Apr 12, 2019 at 8:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .