Successfully modified file: /home/Messier82/projects/service-book/app/src/androidTest/java/com/yorvana/testsupport/DemoMode.kt (1 replacements). Here is the updated code: ... import java.io.FileInputStream object DemoMode { fun enter() { runShell("cmd uimode night no") // Force Gesture Navigation via settings and overlay runShell("settings put secure navigation_mode 2") runShell("cmd overlay enable com.android.internal.systemui.navbar.gestural") runShell("settings put global sysui_demo_allowed 1") runShell("am broadcast -a com.android.systemui.demo -e command enter") runShell("am broadcast -a com.android.systemui.demo -e command clock -e hhmm 0900") runShell("am broadcast -a com.android.systemui.demo -e command battery -e level 100 -e plugged false") runShell("am broadcast -a com.android.systemui.demo -e command network -e wifi show -e level 4") runShell("am broadcast -a com.android.systemui.demo -e command network -e mobile show -e datatype none -e level 4") runShell("am broadcast -a com.android.systemui.demo -e command notifications -e visible false") // Give the system a moment to settle the UI changes (nav bar, demo mode) Thread.sleep(2000) } fun exit() { runShell("cmd overlay enable com.android.internal.systemui.navbar.threebutton") runShell("settings put secure navigation_mode 0") runShell("am broadcast -a com.android.systemui.demo -e command exit") } fun ensureOutputDirectory() { runShell("mkdir -p ${ScreenshotConstants.DEVICE_SCREENSHOT_DIR}") ...