3

We want to run our application with root privileges on a rooted device.

We have following queries.

  1. How to properly get root permissions whenever our app runs?

  2. To run an app as system application, it needs to be signed with platform certificate.

    a) How can we get this certificate from vendor?

    b) How to skip certificate verification?

    c) How to generate a certificate which can match platform certificate of any device?

Cœur
  • 37,241
  • 25
  • 195
  • 267
mobidev7
  • 61
  • 1
  • 3

2 Answers2

0

Your first question is answered here: How can I get root permissions through the Android SDK?

In answer to your second question: the vendors will not give you their platform certificate, as it would allow you to subvert security of their phones by claiming to be them. Unless running a custom build of Android, you cannot skip certificate verification. Generating a certificate matching an existing platform would require you to crack that platform's vendors private key, which would require a significant expenditure of computational power over a prolonged period of time, and is almost certainly beyond the level of resources you have available. Sorry.

Community
  • 1
  • 1
Jules
  • 14,841
  • 9
  • 83
  • 130
0

1) The link that Jules provided is not complete, you will not be able to execute your commands as root by only call su. The following link is answer Execute a command with superuser permission in JNI method in Android

2) Answer for second question can be found here How to compile Android Application with system permissions

Community
  • 1
  • 1
Krypton
  • 3,337
  • 5
  • 32
  • 52