docker-android
docker-android copied to clipboard
how mount sdcard
I need to mount sdcard and send some images for app and site tests. How can it be done? I shared volume to docker but can not use adb push as it return: adb: error: failed to copy '/media/qa105.jpg' to '/storage/sdcard/qa105.jpg': remote Read-only file system
@mehrdad-abdoli You may try to mount sdcard (*.img) in the host running docker and to copy files to there. If you don't have additional sdcard image, try userdata-qemu.img or userdata.img in /root/android_emulator in docker-android containers.
$ mkdir ./sdcard
$ mount <sdcard_img> ./sdcard
$ copy <image_files> ./sdcard/image_path
@mehrdad-abdoli I think you adressed the wrong path. For me it works perfectly if I push the files to /sdcard/picture.jpg
which will the look something like that:
-
connect to device:
adb connect <docker-ip>:5555
-
become root (not needed):
adb root
-
push data:
adb push /picture.jpg /sdcard/picutre.jpg
if you have more than one device connected:adb -s <docker-ip>:5555 push /picture.jpg /sdcard/picutre.jpg
if you only choose the /sdcard path, then you need to display internal storage -
You can also push it to the Download folder:
/sdcard/Download/picture.jpg