0

Lately, I write a batch script that allows me to search whole hard drive in my computer, find all pictures and movies and make a copy of them on USB flash drive or external USB storage. Script is also run from the USB flash drive.

Now I want to go further with this matter and make a similar script that will allow me to make the same but on android device like my smartphone (I want to plug a flash drive via OTG USB cable, run a script from it, and make a backup of all pictures and movies find on my phone).

Maybe someone can help me with this? Should it be a linux based script or some other code language, maybe you can propose some example that I can use?

Mofi
  • 46,139
  • 17
  • 80
  • 143
alzajac
  • 17
  • 4
  • I don't use Linux but on Windows my Android device can be usb connected as "media device" (choose this from device itself) giving a new drive letter that has folders for a/v media. If you can get something similar happening on Linux then just point your script to that drive & backup... – VC.One May 10 '17 at 16:03
  • I don't want to connect my android device to any PC. I want tu plug a pendrive with script on it directly to for example smartphone or tablet and run a script that will search whole device (external sd card too) to find pictures/movies files and copy them to directory on the penrdrive. I mentioned about linux because android is based on linux ;) – alzajac May 10 '17 at 18:34
  • I can't imagine **Android** or **iOS** security systems allowing random scripts on a pen drive to copy any type of phone data. That's scary!! Meaning this question could easily been _"How can I create a virus on pen drive that copies user data & then clears all device?"_ ... Anyways why not just make an app that does the file copy job? – VC.One May 12 '17 at 09:21
  • You can try reusing a script that I wrote about in my question here: https://stackoverflow.com/questions/56691427/script-to-transfer-photos-from-phone-camera-using-adb. Use `adb shell find` to find files of certain types. – bobasti Jun 20 '19 at 18:35

0 Answers0