문제

Is there any function/method that I can use that'll add lines to the devices build.prop?

For example there is a build.prop line - pm.sleep_mode=1

And I want that line to be added to my device's build.prop when I click a button. How can I achieve this? Have searched but it only come sup with scripts?:S

도움이 되었습니까?

해결책

1st, you need a rooted android device. 2nd, use Runtime.getRuntime().exec() to invoke the script as root user. the script may like:

mount -o remount,rw ... #depends on your system partition block device
cat "pm.sleep_mode=1" >> /system/build.prop
setprop pm.sleep_mode 1
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top