3

I have one shell script placed in /sdcard/test.sh And the test.sh file has the below command. screenrecord --time-limit 10 /sdcard/sreee.mp4

When I run this command from adb shell command from Windows machine command executed successfully without any errors.

My Question is how can I execute the same script from Android app where When I press the start button?

Could you please help me out on this with a best example?

Sridhar Reddy S
  • 121
  • 2
  • 13
  • 1
    Have you tried [this technique](http://stackoverflow.com/a/10277822/119114)? – Nate Feb 28 '15 at 20:14
  • You will need root access since the uid:gid of `/system/bin/screenrecord` is root:shell. Try out https://github.com/Chainfire/libsuperuser or https://github.com/Stericson/RootTools – Jared Rummler Mar 01 '15 at 03:51
  • I tried Process proc = Runtime.getRuntime().exec("shell screenrecord --time-limit 10 /sdcard/sreee.mp4"); Eventhough It is not working :( – Sridhar Reddy S Mar 05 '15 at 06:40

0 Answers0