[Library]Build.prop Tools

Search This thread
G

GuestK00178

Guest
Build.prop Tools is a library that makes it easier for app developers to edit the build.prop file from their applications. I decided to make this library when I needed to edit build.prop from within an app I'm developing and I couldn't find a library to make this simple. So, after I had worked out how to do it and tested the code in my app, I made it into a library, because I think this will help quite a few developers.

Project on GitHub: https://github.com/Tezlastorme/build-prop-tools/

The download link is there on the project page, along with the source.

The methods are all documented, and there are a couple of wiki pages, an FAQ (it's not a very long FAQ :silly: ) and a tutorial.

Bug reporting
Do not report a crash unless you have read the FAQ, and when you do, post a logcat, preferably errors only.
I CAN NOT HELP YOU WITHOUT A LOGCAT.


I hope this helps people :)

Credits:
Me
@torpedo mohammadi
 
Last edited:

hell_lock

Inactive Recognized Developer
Jan 20, 2012
5,972
5,173
24
New Delhi
I just wrote this in my program and it crashed..

Code:
String device = BuildProp.getProp("ro.product.model");


Not even started coding till now.. Logcat shows error in line 15 which contained the above code.. I am using 1.1 beta
 
G

GuestK00178

Guest
I just wrote this in my program and it crashed..

Code:
String device = BuildProp.getProp("ro.product.model");


Not even started coding till now.. Logcat shows error in line 15 which contained the above code.. I am using 1.1 beta

1. Logcat please.

2. Is the device rooted?

3. If it was rooted, was it granted root access? And did you add the superuser permission to AndroidManifest.xml?
 
G

GuestK00178

Guest
Hi.
I've got a question :
Is it possible to access Build.prop without accessing root using this library ?
For example ro.build.model or ...
Thank you.

Currently, no. Before the release, in the prototypes you could, but it was really buggy and would do things like deleting build.prop or making it empty or unable to open. I have no idea why. I made it so it copies the file to sdcard then reads it and that works fine. Maybe I could see about doing that without root. I might experiment more some time but I've been busy with school and other things lately.

Sent from my Wildfire S A510e
 
G

GuestK00178

Guest
App Crash when i want getprop :/

banyve9y.jpg


Sent from my Wildfire S A510e
 

rampo

Senior Member
How to obtain Root Access

Superuser permission? Never saw anything like that. Can you tell?

Sent from my HTC Desire X using xda app-developers app

Using RootTools library (used also from the library) https://code.google.com/p/roottools/
The library require Root Access.


Necessary
Obtain Root Access

Code:
if (RootTools.isAccessGiven()) {// your app has been granted root access
}

Advised
Specify the app uses Root permissions, add this to AndroidManifest.xml
Code:
    <uses-permission android:name="android.permission.ACCESS_SUPERUSER" />
 

Top Liked Posts

Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone