[GH-ISSUE #59] how mount sdcard #47

Closed
opened 2026-03-01 15:39:39 +03:00 by kerem · 2 comments
Owner

Originally created by @mehrdad-abdoli on GitHub (Jan 9, 2018).
Original GitHub issue: https://github.com/budtmo/docker-android/issues/59

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

Originally created by @mehrdad-abdoli on GitHub (Jan 9, 2018). Original GitHub issue: https://github.com/budtmo/docker-android/issues/59 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 #
kerem 2026-03-01 15:39:39 +03:00
Author
Owner

@greenerchen commented on GitHub (Mar 8, 2018):

@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
<!-- gh-comment-id:371532805 --> @greenerchen commented on GitHub (Mar 8, 2018): @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 ```
Author
Owner

@HasBert commented on GitHub (Mar 9, 2019):

@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
    stackoverflow

  • You can also push it to the Download folder: /sdcard/Download/picture.jpg

<!-- gh-comment-id:471205770 --> @HasBert commented on GitHub (Mar 9, 2019): @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 ![stackoverflow](https://user-images.githubusercontent.com/19623805/54075252-7151dd80-429d-11e9-8847-1103b105321f.png) - You can also push it to the Download folder: `/sdcard/Download/picture.jpg`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/docker-android#47
No description provided.