Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,782,463 Members 40,203 Now Online
XDA Developers Android and Mobile Development Forum

[Library]Build.prop Tools

Tip us?
 
Tezlastorme
Old
(Last edited by Tezlastorme; 31st January 2014 at 02:58 PM.)
#1  
Tezlastorme's Avatar
Senior Member - OP
Thanks Meter 184
Posts: 3,348
Join Date: Mar 2012
Default [Library]Build.prop Tools

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 ) 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
Current Devices: Samsung Galaxy Nexus [maguro] (GSM), HTC Wildfire S [marvel] (GSM)
Other Devices: BlackBerry 8800: bricked
Websites: tezlastorme.tk my (blog?) site, landsofdarkan.tk
My work:
Wildfire S Root and CWM Guide
[Library]Build.prop Tools
I have hidden the rest of my sig because it was huge
 



The Following 22 Users Say Thank You to Tezlastorme For This Useful Post: [ Click to Expand ]
 
Tezlastorme
Old
#2  
Tezlastorme's Avatar
Senior Member - OP
Thanks Meter 184
Posts: 3,348
Join Date: Mar 2012
Working on the next update which will have some more useful methods
Current Devices: Samsung Galaxy Nexus [maguro] (GSM), HTC Wildfire S [marvel] (GSM)
Other Devices: BlackBerry 8800: bricked
Websites: tezlastorme.tk my (blog?) site, landsofdarkan.tk
My work:
Wildfire S Root and CWM Guide
[Library]Build.prop Tools
I have hidden the rest of my sig because it was huge
 



The Following 4 Users Say Thank You to Tezlastorme For This Useful Post: [ Click to Expand ]
 
Tezlastorme
Old
#3  
Tezlastorme's Avatar
Senior Member - OP
Thanks Meter 184
Posts: 3,348
Join Date: Mar 2012
I haven't tested this new version, but I would appreciate it if people would test this and tell me whether these new methods work

https://docs.google.com/file/d/0B90a...it?usp=sharing

Changelog:

added getPropArray() and getPropAsHash() methods
Current Devices: Samsung Galaxy Nexus [maguro] (GSM), HTC Wildfire S [marvel] (GSM)
Other Devices: BlackBerry 8800: bricked
Websites: tezlastorme.tk my (blog?) site, landsofdarkan.tk
My work:
Wildfire S Root and CWM Guide
[Library]Build.prop Tools
I have hidden the rest of my sig because it was huge
 



The Following 3 Users Say Thank You to Tezlastorme For This Useful Post: [ Click to Expand ]
 
InfinityShooter
Old
#4  
Recognized Contributor
Thanks Meter 4,977
Posts: 5,670
Join Date: Jan 2012
Location: New Delhi

 
DONATE TO ME
Really useful and simple library for tweaking phones.Will use it later on and report
The Following User Says Thank You to InfinityShooter For This Useful Post: [ Click to Expand ]
 
InfinityShooter
Old
#5  
Recognized Contributor
Thanks Meter 4,977
Posts: 5,670
Join Date: Jan 2012
Location: New Delhi

 
DONATE TO ME
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
 
Tezlastorme
Old
#6  
Tezlastorme's Avatar
Senior Member - OP
Thanks Meter 184
Posts: 3,348
Join Date: Mar 2012
Quote:
Originally Posted by prototype-U View Post
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?
Current Devices: Samsung Galaxy Nexus [maguro] (GSM), HTC Wildfire S [marvel] (GSM)
Other Devices: BlackBerry 8800: bricked
Websites: tezlastorme.tk my (blog?) site, landsofdarkan.tk
My work:
Wildfire S Root and CWM Guide
[Library]Build.prop Tools
I have hidden the rest of my sig because it was huge
 



 
InfinityShooter
Old
#7  
Recognized Contributor
Thanks Meter 4,977
Posts: 5,670
Join Date: Jan 2012
Location: New Delhi

 
DONATE TO ME
Quote:
Originally Posted by Tezlastorme View Post
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?
Superuser permission? Never saw anything like that. Can you tell?

Sent from my HTC Desire X using xda app-developers app
 
xpirt
Old
#8  
xpirt's Avatar
Recognized Contributor
Thanks Meter 2,501
Posts: 2,432
Join Date: Feb 2013
Location: 69 6e 20 6d 79 20 68 6f 75 73 65

 
DONATE TO ME
Quote:
Originally Posted by prototype-U View Post
Superuser permission? Never saw anything like that. Can you tell?

Sent from my HTC Desire X using xda app-developers app
Request su permissions:
Code:
Process p = Runtime.getRuntime().exec("su");
xpirt
The Following 2 Users Say Thank You to xpirt For This Useful Post: [ Click to Expand ]
 
InfinityShooter
Old
#9  
Recognized Contributor
Thanks Meter 4,977
Posts: 5,670
Join Date: Jan 2012
Location: New Delhi

 
DONATE TO ME
Quote:
Originally Posted by xpirt View Post
Request su permissions:
Code:
Process p = Runtime.getRuntime().exec("su");
xpirt
thats for su access and that is not for androidmanifest.. its for your java class file
 
xpirt
Old
#10  
xpirt's Avatar
Recognized Contributor
Thanks Meter 2,501
Posts: 2,432
Join Date: Feb 2013
Location: 69 6e 20 6d 79 20 68 6f 75 73 65

 
DONATE TO ME
Quote:
Originally Posted by prototype-U View Post
thats for su access and that is not for androidmanifest.. its for your java class file
.ACCESS_SUPERUSER?

xpirt

The Following 2 Users Say Thank You to xpirt For This Useful Post: [ Click to Expand ]
Tags
build.prop, library, project, tools
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes