I am trying to create a script to automatize a few repeated things I need to do with adb. I can run most of the commands on my local bash. But at one step, I need to find the list of some files. I then use that list in the steps that follows. What I am doing now is manually going into adb shell and copying the list:
$ adb shell
$ ls /Path/To/Folder *.abc
xyz.abc xzy.abc uvw.abc
I copy the resulting list and replace it in my script everytime before running the script.
Is it possible to run this without going into
adb shell so that I could do something like this:
$ file_list="$(adb execute 'ls /Path/To/Folder *.abc')"
This way I could eliminate the repetitive manual steps and just run the script every time.