-2

I want to use "su" in my app but here is some problem

Code:

String command[]={"su","-c","ls /data/data/package.name/databases"};

My phone not root, but My APP need root permission. Problem is : Is my phone need root?

Is this possible? Not root phone and APP get root permission?

By the way, my English is not very good, please forgive me...

Peanut0wO
  • 23
  • 1
  • 5

1 Answers1

3

Simple answer:

It is not possible.

Why:

The user executing your application has not root-rights. Any way to gain root access would violate the user concept and besides that be a huge security issue.

Denis Lukenich
  • 3,084
  • 1
  • 20
  • 38
  • Futher more, su command appears only after rooting the device. Beacause of this is a programm i can not lauch it if no root and no sych programm exists. – Vyacheslav Oct 05 '15 at 07:57