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

  • Home
  • SEARCH
  • 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 6815571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:49:24+00:00 2026-05-26T20:49:24+00:00

How can I, within my application, edit a file in the /system/ directory? Do

  • 0

How can I, within my application, edit a file in the /system/ directory?

Do I have to make the system R/W accessible?

I ve tried:

process = Runtime.getRuntime().exec("su");
os = new DataOutputStream(process.getOutputStream());
os.writeBytes("mount -o remount,rw /system\n");
os.writeBytes("exit\n");
os.flush();
process.waitFor();

and many other ways, without success.

If anybody can help me, I’d greatly appreciated it! 🙂

Also, if i finally made it, will it worked with all rooted phones? Or is it different with some phones?

  • 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-26T20:49:24+00:00Added an answer on May 26, 2026 at 8:49 pm

    I use:

        os.writeBytes("mount -o remount rw /system/\n"); 
        //instead of a comma, I have a space. 
        //When I tried it with a comma, mine didn't work either.
    

    And that allows me to successfully mount.

    If you exit right after that, of course it will not work. You have to stay within the same process and use the linux commands to edit the file.

    I have no idea how to edit the files, but I suggest googling how to do things in linux terminal, and then putting the proper code in os.writeBytes("CODE_HERE");

    Though, as far as the mounting process is concerned, I don’t know if that command will work universally. It may just fortunately work on my device.

    EDIT:
    I now use RootTools: http://code.google.com/p/roottools/downloads/list
    And here is the Wiki page:
    http://code.google.com/p/roottools/w/list

    But I now am using:

    RootTools.remount(file, mountType);
    //For example:
    RootTools.remount("/system/", "rw");
    

    I believe that is universal

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I reuse the application icon from within my application so I don't
Can both WPF and Windows forms controls be used within one application? How difficult
Can I do a search of the iPhone filesystem from within an application? I
I need to run an external application from within my Java code. I can
How can I use the <label> tag within an ASP.NET application? I want it
Assuming Windows, is there a way I can detect from within a batch file
I need to open a html help file from within a legacy windows application
I currently have a Maven application within Netbeans. Since I need to use regular
I have a wxPython application that relies on an external config file. I want
I have an ASP.NET application. It resides within another ASP.NET application. I put my

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.