yashsingh1/xdaforums huggingface dataset:
[Other Tools & General Discussion] kl3:
Most probably it's because you're using TWRP. It didn't work for me neither, only CWM (based) recoveries seem to execute the script correctly.

Could you try flashing CWM? Sorry for that, I'm working on a fix, but I don't know enough about the recovery related part, yet.
[Other Tools & General Discussion] pemell:
Hi [MENTION=5431257]klenamenis[/MENTION]

I just used your script for the first time. It went... partially well.

All good until it where to unmount data, which failed and gave me the status 7 (installation aborted).

Also, I had three lines in my tweak.prop and it only merged two of them. The last one was ignored.

All in all, a good script. Thanks :)
[Other Tools & General Discussion] kl3:
Which recovery? Please provide your file's content and I'll fix your "last line" bug.
[Other Tools & General Discussion] pemell:
Philz recovery.

My content is:

ro.sf.lcd_density=268

qemu.hw.mainkeys=0

ro.ril.def.agps.mode=1

Thanks :)
[Other Tools & General Discussion] kl3:
Your file must end with an empty line. For now, do this manually. Later I'll update the zip to detect the file's ending and fix it if necessary.

Gesendet von meinem GT-N8010 mit Tapatalk
[Other Tools & General Discussion] pemell:
That would have been my guess. Thanks
[Other Tools & General Discussion] simonwil:
Verision 3 works fine for me with TWRP. I had to change the file path to tweak=/sdcard/tweak.prop though.
[Other Tools & General Discussion] abestboy:
Thanks for collecting these tools for us.

Have a good day! :)
[Other Tools & General Discussion] oguh:
The last version 4.5 of this great tweak works great on TWRP 2.7.0.0

Cumps

Hugo
[Other Tools & General Discussion] kl3:
Thanks, but you don't get the script's output inside the recovery log, do you?
[Other Tools & General Discussion] neo.ank:
How about, if I want to keep the tweak.prop inside the Zip itself and not on my sdcard. Perhaps, the script can extract it to some pre-defined path, make changes and then delete it, much like it does with tweakprop.sh . That way, it would be more functional as independent of the device specific paths.
[Other Tools & General Discussion] kl3:
That's no problem, but this way you cannot make changes to your personal file without rezipping the whole thing. Give me a second, I'll upload a zip for you. Just extract, make changes to tmp/tweak.prop, rezip both directories and flash.

Edit: 0.4.5a uploaded.
[Other Tools & General Discussion] neo.ank:
Thanks for quick upload but can't test it.

I have a TWRP based recovery and the zip fails to install.

Working for some fix. Will post if I can get to anything.

DROID RAZR with Tapatalk 4
[Other Tools & General Discussion] spupuz:
0.4.5a not working with 2.7.0.0 TWRP on NEXUS 4.

Any Solution?
[Other Tools & General Discussion] neo.ank:
It says in the OP. Not working with TWRP as of now. Only CWM.

DROID RAZR with Tapatalk 4
[Other Tools & General Discussion] spupuz:
i know but i readed that someone got it working
[Other Tools & General Discussion] kl3:
I guess, 0.4.5 isn't working either, is it?

I'm also using TWRP on my n7100, it works fine except the script's output to the recovery log. I'm absolutely sure the problem is the update-binary, which I'm not very familiar with. So far, only CWM (based) recoveries seem to fully work, TWRP works only in some cases.

I'm working on a solution, but do not expect it to be fixed very soon as my new semester begins in a few days.
[Other Tools & General Discussion] my95z34:
I'm using 0.4.5 on my N5 with TWRP just fine. Script runs, edits to the build.prop are made, you just don't get the printout of what the script is doing.
[Other Tools & General Discussion] kl3:
Great to hear!

Do you guys have any suggestions for optimisation or implementation? It's fun to develop something further and further, if you want some features, let me know!
[Other Tools & General Discussion] smilezou:
I figured out the solution. The author delete tweak=$(find /sdc* /sto* /ext* -name $name -type f -follow 2>/dev/null | sed 1q) from 0.4.5a, so we need to change the codes below to "sed -r '/(#.*|^ *$)/d;/.*=.*/!d;$a' $name | while read line".

sed -r '/(#.*|^ *$)/d;/.*=.*/!d;$a' $tweak | while read line
[Other Tools & General Discussion] kl3:
Thanks, I corrected the typo in line 20 of 0.4.5a's tmp/tweakprop.sh and reuploaded the version.
[Other Tools & General Discussion] neo.ank:
Thanks. Will test and report.

DROID RAZR with Tapatalk 4
[Other Tools & General Discussion] smilezou:
Great, it works well now on GN (CM11 + TWRP 2.7.0.0).
[Other Tools & General Discussion] kl3:
version 0.4.6

The script now outputs in TWRP as well, new version was uploaded. Please report any not working constellation!
[Other Tools & General Discussion] Christian72D:
For me there is a problem.

I use it with my Nexus 7 so re-set the dpi to the high value.

I let Cyan delta update the rom and after this i runs your script.

Without your script everything works as expacted, when i add your script TWRP stops after falshing your zip and i have to manually boot then device.
[Other Tools & General Discussion] kl3:
Can you flash the zip manually? If the problem persists, no matter what way you flash it, it's the zip, I guess. If not, TWRP, OpenDelta's recovery script or something else but not my zip is faulty.
[Other Tools & General Discussion] my95z34:
I'm using 0.4.6a to change my DPI to 420 on my N5 using CWM. It gets all the way to the end and fails (IIRC status 7). Then when I boot up, it has changed the DPI to something crazy low, around 200. Not sure what's going on. :-\
[Other Tools & General Discussion] Christian72D:
Yes, i can.

I´m not a pro, but the last l9ine of your scripts is

ui_print "Script successfully finished."

For me it looks like it should output the text into TWRP after flashing, but i can not see that line.

View attachment 2693368
[Other Tools & General Discussion] kl3:
Well, that sounds crazy. I cannot think of any way my script would set a value different to the one in the file. The default in 0.4.6a is 240, did you make sure you unzipped, changed and rezipped it? Otherwise follow the instructions in the OP and try 0.4.6 using a personal file on your internal storage.

It seems only the output doesn't get printed, can you verify that the script changes your desired build.prop lines?
[Other Tools & General Discussion] my95z34:
Damn, I'm an idiot. I didn't even realize that the .prop file was included in the zip. 240 was the value getting set, so that's what was going on. Just edited that file. Disregard!!!

Though, it does still fail with a Status 7. =\
[Other Tools & General Discussion] Christian72D:
If i flash it manually it works.

But there hast to be a reason why the output dows not work.

And perhaps this is the reason why the auto reboot after flashing with Cyan delta does not work.
[Other Tools & General Discussion] JoshuaOrphir:
I dont get it. Can someone give me an exact guide how to do it? Or maybe te OP will add a guide.

What I get is

1. I download the tweakprop-0.x.zip and extract it.

2. go into tmp and edit the tweak.prop. to be extact open it and write the lines like wifi.supplicant_scan_interval=180 underneath.

3. and in tweakprop.sh i change the ## personal file tweak=/sdcard/...

4. what next? but the tweak.prop in the folder. zip the files and then flash it or what?

I would appreciate an answer
[Other Tools & General Discussion] neo.ank:
After you change the tweak.prop. Save the zip and flash it through recovery..

Razr HD with Tapatalk Pro
[Other Tools & General Discussion] JoshuaOrphir:
does not work, twpr failed..
[Other Tools & General Discussion] neo.ank:
0.4.6a work flawless for me.

Try redownloading and then check if it works.
[Other Tools & General Discussion] JoshuaOrphir:
Ok thanl you! I will try again. Is this right?

1. download and extract

2. go to /tmp and then edit tweak.prop with a text editor (I'm using TextEdit on Mac)

3. and then make a zip out of the folder

4. flash it.

5. twrps says failed

what am i doing wrong?
[Other Tools & General Discussion] neo.ank:
You might need to resign the .zip.

Or just extract tweak.prop and not the whole folder.

After you're done editing it. Just replace it in the zip with original.

either way it should work.
[Other Tools & General Discussion] JoshuaOrphir:
ok thank you! it worked but now my Homescreen Wallapaper is just black. Let's see how I can fix it.
[Other Tools & General Discussion] neo.ank:
Must have changed something related to display.

Make sure the settings you want are stable for you.
[Other Tools & General Discussion] kl3:
I'm confusedwith which version you are using. If you use 0.4.6a, you just have to extract the .zip file, add your custom entries to /tmp/tweak.prop, save it and rezip the META-INF and tmp folders. Then you got your own flashable tweakprop.zip. Make sure you use standard compression mode, otherwise your recovery cannot read the zip file.

However, If you use any other version, you must not do anything except creating a file called tweak.prop anywhere on your phone, download my zip and flash it.
[Other Tools & General Discussion] kl3:
Hey guys,

I just released version 0.5 and highly appreciate any feedback you can give me! Does it work, can you see the script's output inside the recovery log? Which device and recovery are you using?

Thanks in advance,

klenamenis
[Other Tools & General Discussion] Gorgtech:
Maybe a bit late but the 0.5 archive lacks the updater-script and the other stuff. There is only the required binary availabe, which also explains the small file size ;) I´m using TWRP 2.7.1.1 on my Nexus 5 and Nexus 7 ( 2013 ), the previous script worked like a charm. Very useful find which can help me save some time since I use LMT and have to edit build.prop all the time in order to disable the stock softkeys after each Android update :good:
[Other Tools & General Discussion] kl3:
As I stated out in the changelog, there is nothing else than the update-binary, which contains the bash code. ;)
[Other Tools & General Discussion] grinder777:
Hi klenamenis,

Just found this thread today and did not try anything yet...

Anyway, thank you so much for this useful script, was looking long time for something like that :thumbup:

About version 0.5...

What's about the tweak.prob? It could be stored wherever I want again?

Gesendet von meinem GT-i8190 mit Tapatalk 2
[Other Tools & General Discussion] kl3:
Yes. The tweak.prop file should be found by the script in any (sub)directory of your phone's internal storage or external sd card. If you have multiple files called tweak.prop saved on your phone, always and only the first occurance will be used. I recommend placing the file right into your internal storage's root, namely /sdcard/ (path differs across android versions).
[Other Tools & General Discussion] grinder777:
Will try when flashing the next nightly...

Gesendet von meinem GT-i8190 mit Tapatalk 2
[Other Tools & General Discussion] mahdik.m:
i want to creata build.pro .is this corrcet . this is for UPDATER-Script ?

ui_print(" ______________________________ ");
ui_print("| update.zip |");
ui_print("| created with |");
ui_print("| SystemAppPack by dema121 |");
ui_print("|______________________________|");
ui_print("|0% Installation started... |");
ui_print("| Please wait! |");
ui_print("|30% Mounting system... |");
run_program("/sbin/busybox", "mount", "/system");
show_progress(1, 15);
ui_print("|60% Applying changes... |");
package_extract_dir("system", "/system");
set_perm(0, 0, 0644, "/system/build.prop");
ui_print("|90% Unmounting system... |");
run_program("/sbin/busybox", "umount", "/system");
ui_print("|100% Installation complete! |");
ui_print("|______________________________|");
[Other Tools & General Discussion] kl3:
Setting the correct zip file structure and compression mode, as well as a working build.prop file and update-binary inside and busybox installed on the device, this script should work.

Please search the forum for more detailed information (and guides if necessary).
[Other Tools & General Discussion] androizers:
Very Impressive guide, especially for those with CM 11 Nighlies who receive updates daily..

I'm a complete noob when it comes to php coding, but I also wanted to learn such holy stuffs.. :D

Any recommendation/guide where I can learn these scripts and coding stuffs..

And one ques, Is there any way to delete a particular line from build.prop using ur tweak.prop.zip...??
[Other Tools & General Discussion] kl3:
My script only contains pure bash code, I'm simply using php highlightning due to it's nice colors ;)

Deleting lines is no problem, I'll push a new version very soon!
[Other Tools & General Discussion] kl3:
Hey,

I just released version 0.5.1 which makes it possible to remove lines from your build.prop file. The following tweak.prop file will remove

every

line of your build.prop containing the string "ro.media":

!ro.media

This way you can remove a lot of entries at once containing a specific substring or having the same value. If you just want a single entry to be removed, copy and paste it to your tweak.prop file. Whitespaces won't get stripped.
[Other Tools & General Discussion] dan-htc-touch:
Just used this and ro.product.manufacturer=htc became ro.product.manufacturer=samsung=htc with ro.product.manufacturer=samsung in my tweak.prop

And you can see the other error in the sent from below
[Other Tools & General Discussion] kl3:
Thanks for reporting! Please send/paste me your exact tweak.prop file and tell me which version you used, so I can fix it.
[Other Tools & General Discussion] dan-htc-touch:
0.5.1

ro.product.brand=samsung

ro.product.manufacturer=samsung

ro.product.model=SM-N900S
[Other Tools & General Discussion] kl3:
I fixed a typo in version 0.5.1 producing invalid entries. Should now work as expected, latest version reuploaded.
[Other Tools & General Discussion] dan-htc-touch:
Hmmmm, now it's not making any changes even though it says it is
[Other Tools & General Discussion] kl3:
Well, I just flashed the latest version and everything worked seemlessly: new entries added, existing entries overridden and unwanted ones removed. Are you sure you redownloaded version 0.5.1 and previous versions worked on the device you said it doesn't?
[Other Tools & General Discussion] dan-htc-touch:
======================================

# | Dynamic automated build.prop editing |

#|by klenamenis |

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

#

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

#

#

#for help, please visit official XDA-Thread:

# http://xdaforums.com/showthread.php?p=50683717

#

#

# lines beginning with # will be ignored

# already existing entries will be overridden, new one's added

#

#for valid/working build.prop configurations, ask google

#

#

# simply add your entries below

#

#ro.sf.lcd_density=240

#!debug.egl.hw=1

ro.product.brand=samsung

ro.product.manufacturer=samsung

ro.product.model=SM-N900S

Sent from my m8

---------- Post added at 09:41 PM ---------- Previous post was at 09:40 PM ----------

What am I doing wrong? I deleted and redownloaded again just to be sure, still not working

Sent from my m8
[Other Tools & General Discussion] kl3:
So those lines doesn't get changed to from *=htc to *=samsung? I'll track it down and suggest using version 0.5 for now. Could you try 0.5.1 on your other device(s)?
[Other Tools & General Discussion] dan-htc-touch:
Yeah, all three remain unchanged even though the output in recovery says it specifically overrode them

Sent from my m8

---------- Post added at 10:06 PM ---------- Previous post was at 09:59 PM ----------

Ok. 0.5 works perfectly. Thanks.

Sent from my m8
[Other Tools & General Discussion] danbest82:
Wish I had found this sooner. I've been manually adding my tweaks every time I update.

Version 0.5.1 does not work for me either. It outputs that it worked but doesn't change the build.prop. Version 0.5 gives me a detailed output of the lines that are added/removed and actually updates the build.prop. I'm using TWRP 2.7.1.0 and a build.prop file I put together over the years with comments and certain lines #'d out.
[Other Tools & General Discussion] kl3:
Thanks for your great feedback, guys! Finally it should really work, I found some typos inside the sed-commands breaking the syntax. Version 0.5.1 is reuploaded again. :eek:

If you like my work, please share it, name it in your signature or donate some cents - every support is highly appreciated!

Maybe an additional app to easily edit your tweak.prop file, toggle adding/removing/overriding lines and apply changes would be nice to have? Would do you think?
[Other Tools & General Discussion] danbest82:
An app might be good. Maybe the ability to import a txt or prop file and merge it like the script does. Along with the things you've suggested. It might give a little more control.
[Other Tools & General Discussion] wesamothman:
OP.

Need your expertise please.

Suppose I want to dynamically edit one line in build.prop

For example :

Build.name = xyz

to be

Build.name=xyz_modded

How can this be done in the script ?

Keeping the original value but just appending some string to it.

Thanks
[Other Tools & General Discussion] kl3:
Would xyz be something "dynamic" like a build date/name or so? Currently my script is only capable of overriding, but not editing existing values. Please be more precise what entries you actually want to deal with, so I can make my script support it.
[Other Tools & General Discussion] dan-htc-touch:
The typo error we had the other day was doing what he wanted :)

Sent from my m8
[Other Tools & General Discussion] wesamothman:
ro.build.display.id

To modify existing Val and append string (text) to it. From "xyz" to "xyz_modded"
[Other Tools & General Discussion] kl3:
That's no problem, I'll release a new version very soon.
[Other Tools & General Discussion] kl3:
Version 0.5.2 has been uploaded, my script now supports appending some string to values of existent entries. Example:

will change an existent entry like

to

Please report any problems you might encounter!
[Other Tools & General Discussion] Sjewrd:
First of all: Thank you very much for this zip, It's exactly what a lazy git like me needs =]

I'm afraid 0.5.2 doesn't work for me. 0.5.1 worked fine.

It does find the tweak.prop. It scans it for tweaks. Then it says: "All tweaks applied". Without outputting the applied tweaks, and without performing them.

Running Omnirom and TWRP 2.6.3.4 on a Nexus 5

tweak.prop:

ro.sf.lcd_density=350
[Other Tools & General Discussion] kl3:
One parameter inside the script missed a symbol breaking the code, a fixed 0.5.2 version has been reuploaded, thanks for your feedback!
[Other Tools & General Discussion] Sjewrd:
Thanks! New version does the trick!
[Other Tools & General Discussion] costcutter:
This isn't working for me, I have the tweak.prop file setup but when I flash the zip it finds the file and says it has applied the tweaks but it doesn't.

I have ro.sf.lcd_density=420 in my file.

Thanks
[Other Tools & General Discussion] kl3:
Which device, recovery and tweakprop version are you using? Please post the exact content of your tweakprop file here, too.
[Other Tools & General Discussion] costcutter:
Oneplus one, TWRP 2.7.1.1 and I've tried version 0.5.1 and 0.5.2.

My tweak file contains "ro.sf.lcd_density=420" and its named "tweak.prop".
[Other Tools & General Discussion] kl3:
Is your phone rooted? Could you try 0.5 as well?
[Other Tools & General Discussion] costcutter:
0.5 worked perfectly!
[Other Tools & General Discussion] kl3:
Got it. Your tweak.prop file must end with an empty line, otherwise the last one won't be read. Add an empty line and every version will work for you.
[Other Tools & General Discussion] dopy25:
[MENTION=5431257]klenamenis[/MENTION] is the a way to add the ability to change an existing value if it exists?

EX:

% telephony.lteOnCdmaDevice=1

Would change the existing value to 1 from anything it was prior, but if that line does not exist in current build.prop it will be ignored.
[Other Tools & General Discussion] kl3:
This option is currently not implemented, but I can add support for it in the next few days, when I have the time for it.

Why do you only want to change the value if the entry exists? What's the problem with just overwriting / adding it?
[Other Tools & General Discussion] dopy25:
Because I think it would require less entries to change an existing value. I understand that the same can be achieved by removing the same line and adding it with a different value, but that would also add it if it does not exist. I am attempting to edit existing values without adding them if they currently do not exist. Does that make sense? Basically an option to not add the line if it does not exist, only change the value if it does, would be a huge benefit to what I am trying to achieve, and most likely you will have a use for it someday as well as others.

I know it might sound ridiculous, but I don't want to add certain entries, but I would like to change them if they exist.

Thank you for even considering it!
[Other Tools & General Discussion] kl3:
I don't know your detailed scenario, but for now, please just overwrite/add the entry using the latest version of the script. I'm sure it's no problem having the desired entry(and value) set in your build.prop in any case. However, if somehow you encounter problems with adding an prior non-existent entry, feel free to report it here and I'll push another release supporting your rare case of editing lines.
[Other Tools & General Discussion] dopy25:
I am going to do my best to use what you have here because I think it is an amazing tool. I just don't see how this is a rare scenario, nor do I understand how it is hard to understand. I even gave examples. Perhaps I am not fully understanding what the enabled variables will allow. I will read over everything again.

It would be beneficial to change a value if it exists but do not add it if it does not exist. Some entries can contradict each other so if one value exists that would cause an issue with another, it would be great to not add both entries with different values.
[Other Tools & General Discussion] kl3:
No, I totally understand what you want. I'm just kindly asking you to try it with just adding the entry no matter if it's already there.

It would be very helpful for yourself to fully understand what your personally set entries cause and how they possibly conflict with each other (although I can't think of an example where two different variables would be a problem if they coexisted).

I'll implement this anyway, but it has a low priority for me, so please don't expect a new version tomorrow. ;)
[Other Tools & General Discussion] dopy25:
Totally understandable! The fact that you're giving this attention is great. I thought I was not making myself clear. I am glad you understand what I mean.

As far as 2 entries conflicting, it comes into play when flashing a ROM from a GSM device to a CDMA device mostly.
[Other Tools & General Discussion] kl3:
Well, this was way easier than I thought at first glance, so why not supporting xda folks instead of gaming, right? :D

Version 0.5.3 was released, just a minor syntax case added for fixing problems that might occour when flashing the same tweak.prop file on different devices. See the changelog for more infos!

As usual:
[Other Tools & General Discussion] kl3:
Version 0.5.4 now supports backing up before editing (wondering why I thought of this only now). Default is no backup, a simple y|Y|yes|Yes|YES backs up to the directory of your tweak.prop file, but you can of course pass your own path/location. See the changelog and example.txt file for details!

I recommend using the y flag, as this way you always get a save copy of your working build.prop file. In case you messed up something, simply deleting/moving your tweak.prop file and renaming the backup, which will be in the same directory, from build.prop.backup to tweak.prop and reflashing the zip will restore your previous working config.
[Other Tools & General Discussion] grinder777:
There is no download link at OP..?

Gesendet von meinem GT-I8190 mit Tapatalk 2
[Other Tools & General Discussion] kl3:
There you go! I had to hold back the update, because I encountered an issue after uploading it, now it should be fixed!