Amol Nage
Amol Nage

Reputation: 85

Copy system files in rooted android device

I want to copy files and directories from /root directory to a different folder inside the SD_CARD. So, I did lots of search, but couldn't found a useful answer.

I executed su command like this:

Process pp  = Runtime.getRuntime().exec("su cp "+originDir+"  "+targetDir);

Any help will be great. Thanks.

Upvotes: 1

Views: 2037

Answers (1)

Priya Jagtap
Priya Jagtap

Reputation: 1023

Try Using RootTools library for android. (RootTools: a library to run commands as root).

RootTools provides rooted developers a standardized set of tools for use in the development of rooted applications.

You can find the latest release here: https://github.com/Stericson/RootTools/releases

You can find more informaiton on our wiki: https://github.com/Stericson/RootTools/wiki

For a more slimmed down library, check out RootShell: https://github.com/Stericson/RootShell

Hope this will help you.

Upvotes: 1

Related Questions