$ demo on|off [hhmm]
Enable or disable the demo mode on a connected Android device or emulator. You can also pass in a custom value for the system clock in the HHMM
format (only used when you use the on
command).
This script assumes you have adb
on your path. If you don't, you can specify the path to adb
by setting the $ADB
environment variable. If you have multiple devices connected, this script will not work, but you can set $ANDROID_SERIAL
to the target device's serial number (as displayed by adb devices
).
- Fix bug when parsing some Android version numbers (which would cause the clock not to be properly set)
- Allow turning on debug mode with the
--debug
flag
- Add back missing licence header
- Bring back support for
hhmm
parameter- By default, the script uses the device OS version as clock time (e.g., Android 8.1 ->
08:10
) - If you specify a
hhmm
parameter, it will be used instead (without validation!) - If the script fails at determining the device OS version, it will use
10:10
as clock time
- By default, the script uses the device OS version as clock time (e.g., Android 8.1 ->
- Improve script output and provide debugging log (requires modifying the script to enable)
- Verify that
adb
command is available
- Remove the adb root user request — it was not needed
- Force a clock time (08:00) working around the lack of a default
(this ignores the
hhmm
parameter you may have passed in)
- Initial version, lightly modified version of http://bit.ly/295BHLx