• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

[Verizon] Is it possible to add lines to your build prop via updater script?

p-bOt

Android Expert
Jul 18, 2011
908
262
This may sound weird, but it would serve me a great purpose. I flash the newest CM Nightly about every 3 or 4 days. So I made my own flashable zip file that adds a few init.d tweaks and flashes a framework-res that I modded to get rid of that stupid CRT animation and shortens the "hold back to kill" timeout to an actual usable amount of time instead of having to hold the back button for 5 seconds lol. Along with delete some system apps that I have no need for...and add a modded sysctl file for battery life. And I do this all by flashing one file.

But I usually have to add a couple build.prop tweaks that I like to use by hand. I was wondering if anyone knew if it was possible to add build.prop lines via the updater script? Then I would truly be able to flash the new versions of CM Nightlies with absolute ease :)

any help is appreciated :)
 
This may sound weird, but it would serve me a great purpose. I flash the newest CM Nightly about every 3 or 4 days. So I made my own flashable zip file that adds a few init.d tweaks and flashes a framework-res that I modded to get rid of that stupid CRT animation and shortens the "hold back to kill" timeout to an actual usable amount of time instead of having to hold the back button for 5 seconds lol. Along with delete some system apps that I have no need for...and add a modded sysctl file for battery life. And I do this all by flashing one file.

But I usually have to add a couple build.prop tweaks that I like to use by hand. I was wondering if anyone knew if it was possible to add build.prop lines via the updater script? Then I would truly be able to flash the new versions of CM Nightlies with absolute ease :)

any help is appreciated :)

A: Yes :).

Create a script file (say, "upd-build-prop.sh") that will do the updates (something like: echo new-prop=value >> /system/build.prop) and place it in the top-level of your update.zip file.

Then, in your updater-script, extract your script and then use run_program function to execute that script:

assert (package_extract_file ("upd-build-prop.sh", "/cache/upd-build-prop.sh"));
run_program ("/sbin/sh", "/cache/upd-build-prop.sh");

Note that you'll likely have to mount /system if you haven't already in order to update the /system/build.prop file.

Hope that helps! :)
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones