quoteForDeviceShell function

String quoteForDeviceShell(
  1. String arg
)

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("'", "'\\''")}'";