Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6645587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:18:22+00:00 2026-05-26T00:18:22+00:00

My app needs to request SU access (on rooted devices) and the only examples

  • 0

My app needs to request SU access (on rooted devices) and the only examples out there say to do this:

Process p = null; 
p = Runtime.getRuntime().exec("su"); 

That’s fine, but how do I associate that p process with what I want to do next? For example how do I use that process to open a database so that the attempt to open the database happens with root permissions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T00:18:23+00:00Added an answer on May 26, 2026 at 12:18 am

    Please see this discussion:
    Run secure API calls as root, android

    Basically, you’d have to specify the stuff you want to execute in your call to the exec() method. Since that’s hard to do, using the system app is really the best way to do things.

    For the actual call, do this in your code:

    Process p = null; 
    p = Runtime.getRuntime().exec("su sqlite3 your_query");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I need to access a web service from an iPhone app. This
My app needs to play some audio files and I want to fade-out the
I am developing a Java Desktop Application . This app needs a configuration to
Question is regards to handling Request IDs from App Request. Is there any way
Is there a way to upload an app, but only have it accessible by
I'm developing an app which needs access to 'the last 5 seconds worth of
I'm trying to create a Sandbox App Domain that has read only access to
My app needs to build a buffer from all the selected cells on a
My current app needs to store address information for a user. I'm currently debating
My Cocoa app needs some small dynamically generated windows. How can I programmatically create

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.