yashsingh1/xdaforums huggingface dataset:
[Other Tools & General Discussion] trobbs:
Brilliant, thanks OP!

This makes Cyandelta updates far less painful (DPI gets reset).
[Other Tools & General Discussion] kripz:
Thank you so much, DPI now survives OTA updates!
[Other Tools & General Discussion] jamespopoy:
Dude need help also. i have Lenovo A328, when i edited my build.prop i forgot to change the permisssions and then i rebooted it. unfortunately it ends up in black screen. and i cant seem to fix the problem using update.zip. it always says INSTALLATION ABORTED.

if you want i can send the update.zip.
[Other Tools & General Discussion] kl3:
I'm not sure whether you used my script.

Which ROM do you use? If you have a tweak.prop file located on your phone, you should be fine reflashing my zip, otherwise your (hopefully custom) ROM can be flashed over to fix it, too.
[Other Tools & General Discussion] jamespopoy:
i have kitkat 4.4.2, im currently trying to push adb blah blah. and im having a hard time because im in a computer shop and some setups need to run in administrator mode but the owner doesn't allow me to. im losing hope here :crying::crying::crying:
[Other Tools & General Discussion] grinder777:
Is it a custom ROM? Do you have a recovery?

Try Aroma File Manager to set the permissions...

Have fun!
[Other Tools & General Discussion] an0therus3r:
Looks great. Can this be used on any rom on any device? For example cm12 nightlies on a oneplus one?
[Other Tools & General Discussion] kl3:
Yes, it is only required to have a custom recovery like TWRP or CWM installed which executes my script properly.
[Other Tools & General Discussion] dev>null:
Great job

[MENTION=5431257]klenamenis[/MENTION] just what I was looking for ! Was going to write it myself, but found yours which works perfectly :D

Amazing time-saver ! Thank you man :good:

PS: IMHO no need for the app, there are already many editors out there...and the syntax is really simple.
[Other Tools & General Discussion] jeffallin:
Is there any way to make this work on lollipop/CM12 ?

Oops, nvm- I forgot the blank line at the end of my tweak.prop file. Works great now :)
[Other Tools & General Discussion] Beyaz66:
[MENTION=5431257]klenamenis[/MENTION]

¤¤ Strings like "Europe/Paris" in $persist.sys.timezone|Europe/Paris are ignored

¤¤ And ALL the prints I have are as "value ... changed to": even variables not present in build.prop. So non-existent variables are not appended . Everything is run with the first part of your code. Any help is welcome, I'd like to make this work.

sed -r '/(^#|^ *$|^BACKUP=)/d;/(.*=.*|^\!|^\@.*\|.*|^\$.*\|.*)/!d' $tweak | while read line
do
## if change of existing value
elif echo $line | grep -q '^\$'
then
entry=${line#?}
var=$(echo $entry | cut -d\| -f1)
new=$(echo $entry | cut -d\| -f2)
## change $var's value only if $var present in $build
[ $(grep $var $build) = $var=$new ] || (sed -i "s/^$var=.*$/$var=$new/" $build && ui_print "..value of $var changed to $new")
else
var=$(echo $line | cut -d= -f1)
## if variable already present in $build
if grep -q $var $build
then
## override value in $build if different
grep -q $(grep $var $tweak) $build || (sed -i "s/^$var=.*$/$line/" $build && ui_print "..value of $var overridden")
## else append entry to $build
else
echo $line >> $build && ui_print "..entry $line added"
fi
fi
done

Here my test tweak.prop:

#
!autogenerated
!begin
!obsolete
!# end build

# Change
$ro.product.locale.language|fr
$ro.product.locale.region|FR
$ro.com.android.dataroaming|true
$ro.config.notification_sound|Alya.ogg
$ro.config.alarm_alert|Helium.ogg
$ro.config.ringtone|Themos.ogg
#ro.wifi.channels|14
$wifi.supplicant_scan_interval|120

# Add
$persist.sys.timezone|Europe/Paris
$ro.product.device|aries
$bey.bey|bey

# Override
$ro.product.board=MSM8960
[Other Tools & General Discussion] kl3:
What exactly do you mean with "first part" of my code, specific if-blocks?

In case you're just using the code that you quoted, it is obvious why only changes to values have been made. This section of my code only regards lines beginning with $, your tweak.prop contains almost only those ones.

I advise you to simply download and use the latest version, namely 0.5.4, without changing the code.

Have you made sure "persist.sys.timezone" already exists? If not, nothing will happen of course, as you use the $.|. construct. Furthermore, you have to remove the "$" in your Override section as there exists no $.=. construct. Simply putting in the line itself is enough.

You might want to have a look at my example file again.
[Other Tools & General Discussion] Beyaz66:
PLEASE forget everything I said. 2 lines in the OP made me confused and I have not read the script properly! :o

That was just a quote of the part I have problem to deal with. I didn't modified the script.

So I'll do my job correctly this time and try it. Many thanks for Your support and this tool!

...Now, I don't understand the usefulness to the "modify only if present" as I never needed to. But that doesn't matter.
[Other Tools & General Discussion] xXx:
[MENTION=5431257]klenamenis[/MENTION] your script is awesome. May I use your script as part of my cleaner project? I will give you credit of cause.
[Other Tools & General Discussion] kl3:
Yes, sure!
[Other Tools & General Discussion] hhp_211:
[MENTION=5431257]klenamenis[/MENTION] Nice work! Thanks.

What would happen if you had several files called tweak.prop just in different folders?

It seems as it would try to run them all.

next question.

How would I include a tweak.prop, as in older version 0.4.6a, and have it function that way,,,

fully containing all the prop edits in 1 downloadable and flashable file so the user does not need to have or maintain a tweak.prop file?
[Other Tools & General Discussion] kl3:
tweak=$(find /data/* sdcard* /storage/* /ext* -name $name -type f -follow 2>/dev/null | sed 1q)

sed makes sure that only the first instance gets written to $tweak.

I just made an a version of 0.5.4, although I can't test it at the moment; so if 0.5.4a fails, please fallback to 0.4.6a until it's fixed.
[Other Tools & General Discussion] natemup:
Does this work if we use the CM updater to flash new ROMs?
[Other Tools & General Discussion] kl3:
Yes, it works regardless of the way you flash.
[Other Tools & General Discussion] razerbro:
let me first start off by saying this has saved me soo much time and I really appreciated it.

I had an issue specifically with writing

ro.build.fingerprint=

it seems that it will not write and i suspect that it is because of the forward slash /. Is there a way I can name my ro.build.fingerprint to get around this or a fix

for example:

(this will work) ro.build.description=victara_retbr-user 5.1 LPE23.32-14 13 release-keys

(this will not write) ro.build.fingerprint=motorola/victara_retbr/victara:5.1/LPE23.32-14/13:user/release-keys
[Other Tools & General Discussion] kl3:
I will look into this issue today and hopefully provide you with a fix as soon as possible.

Edit: Version 0.5.7 has been uploaded fixing errors with entries containing characters like /.

[MENTION=6809971]razerbro[/MENTION]: Your lines should work now regardless if you use !, @ or plain $var=$val syntax. The latter one should have already worked in version 0.5.4, but thanks for (unintentionally) pointing out the special character bug. If you still encounter issues please provide information like your tweakprop version, your tweak.prop file as well as name and version of your ROM.
[Other Tools & General Discussion] razerbro:
Using versions 0.5.7

I am getting an error "error in tweakprop.zip (status 255)" aborted.

tried both twrp and cwm. I cant get the log file for some reason because the error locks up my phone and I have to restore it.

-> after restoring I tried 0.5.4 and it ran fine, except of course for the special characters did not write in this version.
[Other Tools & General Discussion] kl3:
Not working version 0.5.7 has been replaced by 0.5.8 fixing the 255 error as well as containing minor code changes but no new functionality compared to 0.5.7.

[MENTION=6809971]razerbro[/MENTION]: Your issue is fixed now. 0.5.8 flashes totally fine on my N7100 using TWRP 2.8.x.
[Other Tools & General Discussion] kl3:
Versioin 0.5.8 has again been replaced since not passing BACKUP= at all resulted in failure instead of just not backing up. This is fixed now and custom paths are checked properly now (hopefully).

I highly recommend using either /system/build.prop.backup or /sdcard/build.prop.backup as custom paths. /storage/emulated/0/foo/bar/foo.bar will fail! If you encounter issues when using backups, please try using one of the recommend paths first before reporting. Some paths vary across different devices/ROMs.

After all, BACKUP=y is probably the

safest and easiest

way to safe your original build.prop file.
[Other Tools & General Discussion] O-T:
A typo is detected in tweakprop-0.5.9a.zip folder name

META-INF_a

- can be renamed by users with tool 7-zip to correct folder name

META-INF

Variable to backup or not is identical to backupPATH in tweak.prop:

BACKUP=y|Y|yes|Yes|YES
BACKUP=/foo/bar/foo.bar

That's why 0.5.9 failed. /sdcard/tweak.prop was found having a single line to add including BACKUP=Y. I expected by default a backup to be placed in same folder. That's why I kept the 2nd setvar BACKUP commented.

See attached images.

- how about using different name to avoid confusion of what is what:

BACKUP=y|Y|yes|Yes|YES
BACKPATH=/foo/bar/foo.bar
[Other Tools & General Discussion] jsylvia007:
So... I made the change to the file using 7zip, and commented out ALL lines in the internal tweak.prop file.

At the end of tweak.prop, I added:

dalvik.vm.dexopt-flags=v=n,o=v,m=y

ro.sf.lcd_density=380

(and a blank line like originally stated in the OP...

Neither of those changes makes it into my build.prop, yet no errors are indicated in TWRP.

What am I doing wrong?
[Other Tools & General Discussion] Killerdog:
Hi kl3

i want to ask some question :

can we use your script as an init.d so the system parse it at each boot and correct the change made by flashing an update ROM ?

i want to include it in my rom so when an update is done via OTA it automaticaly change the entry in the build.prop without any intervention.

my init.d script is located into "/data/local" so it survive after OTA.

The OTA file don't come from me, it's why i need to change build.prop after update.

thanks
[Other Tools & General Discussion] phpbb3:
I have read through the thread, and I believe I understand the concept. I wasn't sure how to use the "a" version, so I deleted the entire folder from the zip. I then created a tweak.prop file out of the example in the same directory that the zip was in, and added qemu.hw.mainkeys=1 and a blank line. When I ran the zip via TWRP, this was the result

Installing zip file '/data/media/0//tweakprop-3e33ec320f.zip'
Installing '/data/media/0//tweakprop-3e33ec320f.zip'...
Checking for MD5 file...
Skipping MD5 check: no MD5 file found
I:Zip does not contain SELinux file_contexts file in its root.
I:Legacy property environment initialized.

###############################
# tweakprop 0.5.9 #
# --by kl3-- #
###############################

Mount /system partition...
/system mounted rw
Mount /data partition...
/data remounted rw
Set write permissions for /system/build.prop...
searching personal file...
../data/media/0/tweak.prop found and not empty
sh: #n|N|no|No|NO: unknown operand
/tmp/updater: line 74: can't create y
#n|N|no|No|NO	# same as commented out, just there for completeness
#/foo/bar/foo.bar	# chose your own path: nonexistent directory
ERROR: Cannot write to backup file yE:unknown command [#n|N|no|No|NO	#]
E:unknown command [#/foo/bar/foo.bar	#]

I:Legacy property environment disabled.
E:Error executing updater binary in zip '/data/media/0//tweakprop-3e33ec320f.zip'
E:Error installing zip file '/data/media/0//tweakprop-3e33ec320f.zip'
Done processing script file

And then my phone wouldn't boot, I had to restore my /system. I erased everything from tweak.prop and re-added the qemu line, hit enter twice, and saved and tried again. The error was a little different, but once again I found myself having to restore my /system in order to boot. Could I get some help please?
[Other Tools & General Discussion] Looki75:
Thanks! This flashable zip is very useful!

Cheers
[Other Tools & General Discussion] vandermark:
[MENTION=5431257]kl3[/MENTION] I still don't know what the exact procedure is: keep bootlooping and having to restore nandroid backup.

I only need to add the following line to my buil.prop:

qemu.hw.mainkeys=1

Do I need to change the tweak.prop in the temp dir of the zip file?

Do I need to place this tweak.prop file on my sdcard also?

I am quite confused, please help. These are my tweak.prop contents:

#	======================================

#	| Dynamic automated build.prop editing |

#	| --by kl3-- |

#	======================================

#

# Personal file located at /sdcard/0/tweak.prop

#

# For help, please create an issue on https://notabug.org/kl3/tweakprop

# or visit the official XDA-Thread http://xdaforums.com/showthread.php?p=2664332

#

# If you want to backup your build.prop before editing, uncomment the following line

# or specify a custom path. Already existing backup files will be overridden.

#

BACKUP=y	# creates /sdcard/build.prop.backup since tweak.prop resides there

#BACKUP=n|N|no|No|NO	# same as commented out, just there for completeness

#BACKUP=/foo/bar/foo.bar	# chose your own path

#

# simply add your entries below

#

# set exactly this entry even if it overrides the already existing value

qemu.hw.mainkeys=1

# remove every entry containing the string "debug.egl"

#!debug.egl

# append the string ",ppp0" to the value string of the variable "mobiledata.interfaces" if it exists

#@mobiledata.interfaces|,ppp0

# Override the value of the variable "telephony.lteOnCdmaDevice" to "1" if and only if the entry already exists

#$telephony.lteOnCdmaDevice|1
[Other Tools & General Discussion] phpbb3:
This is exactly what I'm trying to do too!
[Other Tools & General Discussion] Looki75:
That should be working...

Please post your zip file (complete zip that you flash) and I can check it for you.
[Other Tools & General Discussion] vandermark:
Thanks for your time & help! I just download the zip file direct from https://notabug.org/kl3/tweakprop

I don't change it, this is the one I flashed: https://dl.dropboxusercontent.com/u/46665844/tweakprop-3e33ec320f.zip
[Other Tools & General Discussion] Looki75:
That's what I thought...

That is not working, this is normal.

Download my attachment.

Inside my zip, update /tmp/tweak.prop as needed.

Flash it.

Should be working.

Please report back.

Cheers
[Other Tools & General Discussion] vandermark:
Flashing worked without error but build.prop is not changed...
[Other Tools & General Discussion] Looki75:
Try this one then (thi is the one I am using everyday).

1/ Place your tweak.prop file on your internal sdcard

2. Flash the zip file

If it didn't work, place the tweak.prop file on you external sdcard and flash again...

Please report back.

Cheers
[Other Tools & General Discussion] vandermark:
YES!! This worked, many thanks for your persisting efforts.
[Other Tools & General Discussion] Looki75:
You're welcome!

I modified the sources in order to have the ability to place the tweak.prop file on internal/external sdcard + corrected some bugs appearing on my TWRP recovery (bug was related to "modify existing lines" and "delete existing lines")...

[MENTION=5431257]kl3[/MENTION] you can check my previously attached file "5. MOD_build_prop.zip" if you want to update your sources.

Cheers
[Other Tools & General Discussion] phpbb3:
I still get a "error executing updater binary" when I flash.
[Other Tools & General Discussion] Looki75:
Can you post full recovery log?

Which recovery and version do you use?
[Other Tools & General Discussion] phpbb3:
I couldn't get the log to upload, but here's a pastebin http://pastebin.com/Jut6AZWi TWRP 2.8.7.0 for falcon.

---------- Post added at 06:31 PM ---------- Previous post was at 06:30 PM ----------

If you need the full log I can post from my laptop when I get home from work
[Other Tools & General Discussion] Looki75:
You get this error message that I don't know:

E:request read returned -1, errno: 22, exiting MtpServer::run loop

It seems that the script cannot mount /data.

Do you have another zip file that modifies files in your /data partition and that you know it is working OK?

Thanks
[Other Tools & General Discussion] phpbb3:
I don't, but I can factory reset and then restore a backup of /data without issue if that helps
[Other Tools & General Discussion] KnightRider2008:
Can someone reupload version 0.5.4a zip ?
[Other Tools & General Discussion] m0han:
no idea if what i'm doing is right. i downloaded from git and got a file named tweakprop-3e33ec320f.zip having md5 59fa0bc96e6d92f854c5b473128c5397.

is this the latest version? or is 0.5.9(a) mentioned in post#2 a newer version? anyway, could someone upload the very latest release and share the link? [MENTION=5431257]kl3[/MENTION]?

---------- Post added at 12:41 PM ---------- Previous post was at 12:01 PM ----------

your file has a 'Example_tweak.prop' file inside the zip. should that remain even after placing tweak.prop file on internal or external sdcard? will there be any conflict?

better would be this: can your zip file be modified in such a manner that tweak.prop file can be placed inside the zip file itself and flashed in one go?
[Other Tools & General Discussion] Miustone:
IGNORE
[Other Tools & General Discussion] sohailhind:
LS675 i was editng build.prop and the screen goes blank.

i have copy of build.prop on my desktop.

is there anyway to make update to zip to replace modded build.prop with original build.prop.

only available option are adb side load recovery and update via sd card.
[Other Tools & General Discussion] Ztsanga:
Where is the download link?
[Other Tools & General Discussion] tofu:
1. The command "zipit a" results in flashable zip that has /a/ -root folder. It doesn't work.

2. I moved manually the contents of /a/ into root within the zip, and then flashed it. Nothing happened to my build.prop, even though I had edited the tweak.prop -file.

Inside tweak.prop I had this:

BACKUP=n

$ro.qc.sdk.audio.fluencetype|none

Any idea where's the problem?
[Other Tools & General Discussion] BillGoss:
Did you get this error shown in last_log?

/tmp/tweakprop.sh: line 13: can't create /proc/self/fd/: Is a directory

Because I find that the script runs fine if used as update-binary, but not if it's invoked as a shell script, as done in the "a" form. The error is due to the fact that definition of ui_print() writes to "/proc/self/fd/$OUTFD" which gives the error when invoked in a shell.
[Other Tools & General Discussion] vladniko:
So how do I go about getting

persist.audio.fluence.voicecall=false

in my tweak.prop file to actually edit the build.prop? I've tried both that command and

$persist.audio.fluence.voicecall|false

and neither of them work
[Other Tools & General Discussion] BillGoss:
So many questions!

Did you see any helpful information in your TWRP log file?

Does it work for other changes to your build.prop file?

Have you successfully used this tool before?

Where did you put your tweak.prop file?

What does your tweak.prop file look like?

Are you running the "normal" version or the "a" (script) version?
[Other Tools & General Discussion] vladniko:
Nothing out of the ordinary in the TWRP terminal.

It works for adding Google Assistant

tweak.prop is in a folder on internal storage

I have the a but it doesn't seem to work. It works if I have my tweak.prop on the device
[Other Tools & General Discussion] BillGoss:
I have no problem installing the line you wanted. Did you check that the line isn't already in your build.prop?
[Other Tools & General Discussion] vladniko:
The voice call line is in my build.prop and always will be as its a toggle. I'm just trying to get the program to change the end of the argument from true to false
[Other Tools & General Discussion] BillGoss:
If you attach your tweak.prop I'll try it out on my phone, which also has that property set to true.
[Other Tools & General Discussion] vladniko:
Sure, thanks so much!

It wouldn't allow me to upload the .prop extension so when you download it, just change the file extension from .txt to .prop
[Other Tools & General Discussion] BillGoss:
You have to end each line with a line feed. Just add it to the last line and it'll work. :laugh:
[Other Tools & General Discussion] vladniko:
I added a space between the two lines and it still doesn't work
[Other Tools & General Discussion] BillGoss:
No, you need a blank line at the end of the file. Each line must finish with a \n (new line).
[Other Tools & General Discussion] vladniko:
Can you send me an edited file that shows exactly what you mean? Sorry, I'm not following the /n thing
[Other Tools & General Discussion] BillGoss:
Here you go.
[Other Tools & General Discussion] vladniko:
It worked! Thanks so much
[Upgrading, Modifying and Unlocking] nexusredwilly91:
guys help!!

my nexus 4 got no os to boot up, i accidentally wipe all data, now i can only boot cwrp recovery, anyone can guide me how to push rom to the device in recovery?
[AT&T Samsung Galaxy S 4 Q&A, Help & Troubleshootin] FordoGreenman:
So I've been itching to get the new KitKat update that ATT released the other day for the GS4's but since I'm rooted, I of course cannot achieve that until I roll back to 4.2 with the Odin method. The only problem is..I cant seem to figure out why my phone won't accept the flash process.

This is the info from Odin..

<ID:0/003> Added!!

<OSM> Enter CS for MD5..

<OSM> Check MD5.. Do not unplug the cable..

<OSM> Please wait..

<OSM> I337UCUAMDB_I337ATTAMDB_I337UCUAMDB_HOME.tar.md5 is valid.

<OSM> Checking MD5 finished Sucessfully..

<OSM> Leave CS..

<ID:0/003> Odin v.3 engine (ID:3)..

<ID:0/003> File analysis..

<ID:0/003> SetupConnection..

<ID:0/003> Initialzation..

<ID:0/003> Get PIT for mapping..

<ID:0/003> Firmware update start..

<ID:0/003> aboot.mbn

<ID:0/003> NAND Write Start!!

<ID:0/003>

<ID:0/003> Complete(Write) operation failed.

<OSM> All threads completed. (succeed 0 / failed 1)

My phone also has some red text during the process (while its in Download mode) which says..

SW REV. CHECK FAIL : fused : 4 , Binary : 1

Not sure if that's important but the more information the better I suppose.

Anyway, if anyone has any leads or information that might be able to help me, please and thank you very much. :D

Cheers everyone!

-Fordo
[AT&T Samsung Galaxy S 4 Q&A, Help & Troubleshootin] jd1639:
Pretty sure you're on mk2 firmware and need these files http://xdaforums.com/showthread.php?p=49687770
[AT&T Samsung Galaxy S 4 Q&A, Help & Troubleshootin] FordoGreenman:
Thanks a bunch!

One more question, which file specifically should I be downloading from that thread?

Just making sure so I don't make any mistakes. Heh, cheers mate.
[AT&T Samsung Galaxy S 4 Q&A, Help & Troubleshootin] Kaze105:
Just the all-in-one for simplicity. Instruction on how to use the file is in bottom of the post of that thread.