[Q] {HELP NEEDED} updater-script - overwriting an existing file

cuttlefish

Member
Jan 2, 2008
11
12
0
Hi all,

I am attempting to write a file (thermald.conf.1620) from the root of my installer.zip and overwrite a file in /system/etc with it, but it just isn't working:

Code:
package_extract_file("thermald.conf.1620", "/tmp/thermald.conf");
ui_print("overwriting /system/etc/thermald.conf");
run_program("/sbin/cp", "-fp", "/tmp/thermald.conf.1620", "/system/etc/thermald.conf");
ui_print("removing /tmp/thermald.conf");
delete("/tmp/thermald.conf");
I tried the below code as well, but it also didn't work:

Code:
package_extract_file("thermald.conf.1620", "/system/etc/thermald.conf");
I'm not getting any errors in TWRP recovery console, but the file is not getting overwritten.
Can anyone give me a pointer as to where I'm going wrong?