Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting 'root" permission for Android App

I would like to know how can we get root permission from android app? Are there any app out there in android market?

I tried out the below line of code to list out files but nothing happened

Process process = Runtime.getRuntime().exec(new String[] { "su", "-", "root"});

I tried to give TEST_FACTORY permission in my manifest file but I got an error "permitted to system app"

How can I make my app system app?

I want help to get started with these stuff (make app if possible to get root permission) any help on this is very much appreciated. Thanks in advance :)

like image 482
ik024 Avatar asked Feb 06 '14 07:02

ik024


1 Answers

Theres a good answer here - ANDROID: How to gain root access in an Android application?

"As far as I know, you can only run command-line commands using root privileges. You can use this generic class I made that wraps the root access in your code: http://muzikant-android.blogspot.com/2011/02/how-to-get-root-access-and-execute.html"

like image 61
Nir Hartmann Avatar answered Sep 21 '22 18:09

Nir Hartmann