With my setup (Kubuntu 17.10 and Lineage 14.1), when the script calls su -c printf TEST on the device, it ends up telling su to run printf as user TEST, as opposed to telling it to run printf TEST, and passing no user argument. Same deal with the cat command invoked in adb_read_file().
This change makes it so that when su is invoked on device, the argument to -c is passed as one thing. The cat command also quotes the path to prevent problems with spaces in paths, although I don't expect those to happen often on Android.
I haven't tested this on Windows, or other *nix platforms. I assume the script works somewhere as-is, but I speculate these changes shouldn't break it.
With my setup (Kubuntu 17.10 and Lineage 14.1), when the script calls
su -c printf TEST
on the device, it ends up tellingsu
to runprintf
as userTEST
, as opposed to telling it to runprintf TEST
, and passing no user argument. Same deal with thecat
command invoked inadb_read_file()
.This change makes it so that when
su
is invoked on device, the argument to-c
is passed as one thing. Thecat
command also quotes the path to prevent problems with spaces in paths, although I don't expect those to happen often on Android.I haven't tested this on Windows, or other *nix platforms. I assume the script works somewhere as-is, but I speculate these changes shouldn't break it.
Resolves #2