8

I would like to know whether it is possible or not to open the build.prop file programmatically from an Android application and edit certain properties within it. Are there certain restrictions on this file in Android and can it be done without root access?

If someone could point me in the right direction or provide and example that would be great.

tshepang
  • 12,111
  • 21
  • 91
  • 136
user2060733
  • 123
  • 3
  • 9

2 Answers2

8

ROOT permission is required to open and edit build.prop file.

Check this App in Play Store. build.prop Editor. Since it's open source, and the code is extremely simple, you can use it as a stating point: https://github.com/nathanpc/Build.prop-Editor

Nathan Campos
  • 28,769
  • 59
  • 194
  • 300
Sadeshkumar Periyasamy
  • 4,848
  • 1
  • 26
  • 31
1

yes the ROOT permission is required and you can get the root access by adding following lines

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

for more details follow the below link http://www.stealthcopter.com/blog/2010/01/android-requesting-root-access-in-your-app/

krishna
  • 142
  • 7
  • 12