diff --git a/README.md b/README.md index 80479d8..319ff0e 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,10 @@ To simplify the setup process, you can use the provided [docker-compose.yml](htt > **Note:** This command launches the Android emulator and web interface. First boot takes some time to initialize. Once ready, the device will appear in the web interface at http://localhost:8000. +3. **Use the Shared Folder (optional):** + + Any files placed in the `./shared` directory on the host will be available inside Android at `/mnt/shared`. + ## 📡 **Usage** ### 🌐 Use the Web Interface to Access the Emulator diff --git a/docker-compose.yml b/docker-compose.yml index c5a0f2a..3ca45cc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,6 +9,7 @@ services: volumes: - ./data:/data - ./extras:/extras + - ./shared:/shared environment: - DNS=one.one.one.one - RAM_SIZE=8192 diff --git a/first-boot.sh b/first-boot.sh index da825d8..3b74c13 100644 --- a/first-boot.sh +++ b/first-boot.sh @@ -10,6 +10,9 @@ apply_settings() { sleep 5 done adb root + adb wait-for-device + adb shell "mkdir -p /mnt/shared" + adb shell "mount -t 9p -o trans=virtio,version=9p2000.L shared /mnt/shared || mount -t virtiofs shared /mnt/shared" adb shell settings put global window_animation_scale 0 adb shell settings put global transition_animation_scale 0 adb shell settings put global animator_duration_scale 0 diff --git a/shared/.gitkeep b/shared/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/start-emulator.sh b/start-emulator.sh index aa19835..6aaf4fa 100644 --- a/start-emulator.sh +++ b/start-emulator.sh @@ -6,4 +6,4 @@ if [ -f /data/.first-boot-done ]; then fi # Start the emulator with the appropriate ramdisk.img -/opt/android-sdk/emulator/emulator -avd android -nojni -netfast -writable-system -no-window -no-audio -no-boot-anim -skip-adb-auth -gpu swiftshader_indirect -no-snapshot -no-metrics $RAMDISK -qemu -m ${RAM_SIZE:-4096} \ No newline at end of file +/opt/android-sdk/emulator/emulator -avd android -nojni -netfast -writable-system -no-window -no-audio -no-boot-anim -skip-adb-auth -gpu swiftshader_indirect -no-snapshot -no-metrics -selinux permissive $RAMDISK -qemu -m ${RAM_SIZE:-4096} -qemu -virtfs local,path=/shared,security_model=none,mount_tag=shared \ No newline at end of file