diff --git a/docs/redroid/README.md b/docs/redroid/README.md
index 97850a5..e2f62ea 100644
--- a/docs/redroid/README.md
+++ b/docs/redroid/README.md
@@ -5,7 +5,17 @@ This Image contains a browser-accessible version of [Redroid](https://github.com
![Screenshot][Image_Screenshot]
[Image_Screenshot]: https://f.hubspotusercontent30.net/hubfs/5856039/dockerhub/image-screenshots/redroid.png "Image Screenshot"
+## Important !!
+
+This image requires host level kernel modules to be installed and loaded.
+See [Redroid Docs](https://github.com/remote-android/redroid-doc?tab=readme-ov-file#getting-started) for more details
+
# Environment Variables
-* `APP_ARGS` - Additional arguments to pass to the application when launched.
+* `REDROID_GPU_GUEST_MODE` - Used to instruct redroid to utilize GPU rendering. Options are `auto`, `guest`, and `host`
+* `REDROID_FPS` - Set the maximum FPS for redroid and scrcpy
+* `REDROID_WIDTH` - Set the desired width of the redroid device
+* `REDROID_HEIGHT` - Set the desired height of the redroid device
+* `REDROID_DPI` - Set the desired DPI of the redroid device
+* `REDROID_SHOW_CONSOLE` - Display the scrcpy console after launching the redroid device.
\ No newline at end of file
diff --git a/docs/redroid/demo.txt b/docs/redroid/demo.txt
index 8064874..6eb92d4 100644
--- a/docs/redroid/demo.txt
+++ b/docs/redroid/demo.txt
@@ -1,9 +1,9 @@
# Live Demo
-
+
**Launch a real-time demo in a new browser window:** Live Demo.
-
+
∗*Note: Demo is limited to 3 minutes and has upload/downloads restricted for security purposes.*
diff --git a/src/ubuntu/install/redroid/custom_startup.sh b/src/ubuntu/install/redroid/custom_startup.sh
index d956bca..793c7b8 100644
--- a/src/ubuntu/install/redroid/custom_startup.sh
+++ b/src/ubuntu/install/redroid/custom_startup.sh
@@ -7,32 +7,44 @@ DEFAULT_ARGS="-n"
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
ANDROID_VERSION=${ANDROID_VERSION:-"13.0.0"}
REDROID_GPU_GUEST_MODE=${REDROID_GPU_GUEST_MODE:-"guest"}
-REDROID_FPS=${REDROID_FPS:-"60"}
+REDROID_FPS=${REDROID_FPS:-"30"}
REDROID_WIDTH=${REDROID_WIDTH:-"720"}
REDROID_HEIGHT=${REDROID_HEIGHT:-"1280"}
REDROID_DPI=${REDROID_DPI:-"320"}
REDROID_SHOW_CONSOLE=${REDROID_SHOW_CONSOLE:-"1"}
+ICON_ERROR="/usr/share/icons/ubuntu-mono-dark/status/22/system-devices-panel-alert.svg"
+
+
LAUNCH_CONFIG='/dockerstartup/redroid_launch_selections.json'
# Launch Config Based Workflow
if [ -e ${LAUNCH_CONFIG} ]; then
ANDROID_VERSION="$(jq -r '.android_version' ${LAUNCH_CONFIG})"
fi
-function audio_patch() {
- # The devices start with audio quite low
- set +e
- for ((i=1; i<=10; i++)); do
- adb -s localhost:5555 shell input keyevent KEYCODE_VOLUME_UP &
- sleep 0.2
- done
- set -e
+function check_modules() {
+ if lsmod | grep -q binder_linux; then
+ echo "binder_linux module is loaded."
+ else
+ msg="Host level module binder_linux is not loaded. Cannot continue.\nSee https://github.com/remote-android/redroid-doc?tab=readme-ov-file#getting-started for more details."
+ echo msg
+ notify-send -u critical -t 0 -i "${ICON_ERROR}" "Redroid Error" "${msg}"
+ exit 1
+ fi
+
+ # Check for ashmem_linux module
+ if lsmod | grep -q ashmem_linux; then
+ echo "ashmem_linux module is loaded."
+ else
+ msg="Host level module ashmem_linux is not loaded. Cannot continue.\nSee https://github.com/remote-android/redroid-doc?tab=readme-ov-file#getting-started for more details."
+ echo msg
+ notify-send -u critical -t 0 -i "${ICON_ERROR}" "Redroid Error" "${msg}"
+ exit 1
+ fi
}
start_android() {
- /usr/bin/filter_ready
- /usr/bin/desktop_ready
sleep 5
xfce4-terminal --hide-menubar --command "bash -c \"sudo docker pull redroid/redroid:${ANDROID_VERSION}-latest \""
sudo docker run -itd --rm --privileged \
@@ -48,7 +60,6 @@ start_android() {
sleep 2
adb connect localhost:5555
sleep 5
- audio_patch
}
start_scrcpy() {
@@ -74,8 +85,6 @@ kasm_startup() {
do
if ! pgrep -x $DOCKER_PGREP > /dev/null
then
- /usr/bin/filter_ready
- /usr/bin/desktop_ready
set +e
sudo /usr/bin/supervisord -n &
set -e
@@ -83,8 +92,6 @@ kasm_startup() {
fi
if ! pgrep -x $SCRCPY_PGREP > /dev/null
then
- /usr/bin/filter_ready
- /usr/bin/desktop_ready
start_scrcpy
fi
sleep 1
@@ -95,4 +102,7 @@ kasm_startup() {
}
+/usr/bin/filter_ready
+/usr/bin/desktop_ready
+check_modules
kasm_startup