quoteForDeviceShell function
adb joins shell arguments into one command line for the device's sh, so text is single-quoted to arrive as one literal argument.
Implementation
String quoteForDeviceShell(String arg) => "'${arg.replaceAll("'", "'\\''")}'";