build.prop on Android 8.1 new issues when editing? - Android Q&A, Help & Troubleshooting

Hi There
I have been a long time Hacker of largely MTK devices. So I wanted to ask a question and see if there's anything I am missing here:
I have an Android 8.1 device, I have rooted it using Magisk no problem and I have successfully changed the bootanimation.zip and also the audio files. I have been able to release the rooted OS, get the OS back to a released state with the changes as I have simply kept the removed dm-verity flags that Magisk uses on the OS.
However, I am unable to change the build.prop at all.
If I copy the build.prop file from the device, edit it on the PC, and save it back it bootloops. If I edit it, roll back all the changes and re-copy it back to the device it is fine.
I noticed the original build.prop permissions are RW (Chmod 600). I tested the above chmodding to 600 and 644 and it makes no difference. If it has changes in it, it fails, if not it works!
So something somewhere is maybe checking the build.prop against an original and not liking it.
Is there anyone on here that could help shed some light on this at all?

Bump...Anyone?

So an update to this is that I have now successfully removed DM-Verity from this device. I have also managed this on many other devices. I prove this by installing all kinds of changes on the device.
So I can pretty much do anything with this device, almost like pre-Android 5.1, however whenever I edit the build.prop at all it bootloops.
What I have tried so far:
I have tried all kinds of permissions on the file
I have duplicated the /vendor/build.prop in an attempt to get round possible build.prop variety issue.
I have removed the /vendor/build.prop
I have replaced system/prop with original build.prop but still edited (and changed back) from my PC and the device boots OK.
So it looks like somethiung is looking up the build.prop file and checking something. Almost like a DM-verity for the build.prop.
Really out of ideas now. i can literally unlock/change anything MTK now except for this issue.
Any help is much appreciated.

Oh i forgot to mention, this is a systemless and not TREBLE OS.

I usually change /system/build.prop and have never had an issue up through Android 10. I know this is elementary and no intention to offend anyone - but are you sure the file is being saved with unix-style line endings.

File-permission must be set to 644.

Related

[Q] (Solved?) Change DEFAULT Homepage on Cooked Rom

Ok, got a bit of a problem here... I need to change the default homepage of the browser in a Rom I'm cooking... that means the homepage you get after a full factory reset, not that you set in the menu.... Please don't tell me how to set it in the browser menu....
A bit of background... I'm using a leaked Rom to build from. It was leaked from a Tracfone "LG-L95G" which is identical in every way to the LG-P999 aka T-Mobile G2X. Everything is working 100%. The only problem left from the "porting" is removing Tracfone as the default browser homepage.
This has turned out to be harder than I expected.
What I have done:
Browser.apk - the xml lists Google as the homepage. The word "tracfone" appears NOWHERE in the entire structure of the decompiled xml or values or even in the smali code.
SystemUI & framework-res - I've seen suggestions the homepage hides here. Can't find anything suggesting a setting to "tracfone"
flexdb - I really thought I had it kicked here. /system/etc/flex.db listed m.tracfone.com as the homepage for T-Mobile US. I changed all occurrences here to about:blank. I have also tried simply copying the flex.db from a P999 itself. Ie, removed ALL references to tracfone service and made it identical to a P999 in every way.
Ran grep -R tracfone * on the entire ROM.
Dug through tons of files by hand looking for any clue.
Unfortunately, even with all of that, do a wipe, open the browser, and you GET M.TRACFONE.COM again!
The word "tracfone" does not appear in build.prop, it does not appear in any init scripts, not even in the kernel scripts! Yet it comes back like Christine...
Does anyone have a clue where I could look next? Or failing that, even some way from an init.d script that I can overwrite the setting myself?
EDIT
Okay, I hate giving myself clues like this, but maybe this will help others (if I'm on the right track)...
Instead of doing a grep on the ROM from my PC, pre-install, I decided to actually hit up the RUNNING copy... so from adb into a Bash prompt on the phone itself, I ran a grep -r tracfone * and got the following result:
Code:
data/data/com.android.browser/databases/browser.db:Web page not availablehttp://m.tracfone.com/
data/data/com.android.browser/shared_prefs/com.android.browser_preferences.xml:<string name="homepage">http://m.tracfone.com</string>
data/data/com.lge.providers.flex/databases/flex.db:M77BRW_SETTINGDB_CURRENT_HOME_URL_Ihttp://m.tracfone.comhttp://m.tracfone.comI#
data/data/com.lge.providers.flex/databases/flex.db:=77BRW_SETTINGDB_HOME_URL_Ihttp://m.tracfone.comhttp://m.tracfone.como"
data/data/com.lge.providers.flex/databases/flex.db:=;;DATACOM_ACCOUNT_MMSC_0_Ihttp://mms.tracfone.comhttp://[email protected]
data/data/com.lge.providers.flex/databases/flex.db:;%%DATACOM_ACCOUNT_APN_0_Iwap.tracfonewap.tracfone:?
data/data/com.lge.providers.flex/databases/flex.db:M77BRW_SETTINGDB_CURRENT_HOME_URL_Ihttp://m.tracfone.comhttp://m.tracfone.comI
data/data/com.lge.providers.flex/databases/flex.db:=77BRW_SETTINGDB_HOME_URL_Ihttp://m.tracfone.comhttp://m.tracfone.como
data/data/com.lge.providers.flex/databases/flex.db:=;;DATACOM_ACCOUNT_MMSC_0_Ihttp://mms.tracfone.comhttp://mms.tracfone.com6%
data/data/com.lge.providers.flex/databases/flex.db:;%%DATACOM_ACCOUNT_APN_0_Iwap.tracfonewap.tracfone:$
Which is very odd.... considering that is NOT the content of the actual flex.db that was flashed to the phone. That leads to 1 question: Why isn't the phone respecting the flex.db? I've noticed other edits to the file (such as bookmarks) do not apply either. So it is being ignored at somepoint. FlexProvider.apk maybe? Or is something in the ROM still identifying the phone to T-Mobile as an MVNO device and they're pushing out an OTA flex update?
EDIT 2:
AHA! There's a flex.db *INSIDE* the FlexProvider.apk file! So it *IS* ignoring the one placed in /system/etc/flex/! Editing this should solve it - but I'm going to test test test to make sure.
lotherius said:
Ok, got a bit of a problem here... I need to change the default homepage of the browser in a Rom I'm cooking... that means the homepage you get after a full factory reset, not that you set in the menu.... Please don't tell me how to set it in the browser menu....
Click to expand...
Click to collapse
firstly to say interesting question!!
but I think it it not possible to change programmatically default homepage
this is a system app so will be signed by your provider let us suppose you find homepage location in code (could by result of a script parsing) by modifying source of that apk package how to solve signature problem ?!
if in .db file ...this file is created after flashing as a result of script parsing
not framework-res.apk better browser-res.apk if you have one
ruscan.calin said:
firstly to say interesting question!!
but I think it it not possible to change programmatically default homepage
this is a system app so will be signed by your provider let us suppose you find homepage location in code (could by result of a script parsing) by modifying source of that apk package how to solve signature problem ?!
if in .db file ...this file is created after flashing as a result of script parsing
not framework-res.apk better browser-res.apk if you have one
Click to expand...
Click to collapse
man use a ... editor...I can show you for fifty bucks
I was just curious about this tricky change (from your post) so thinking about Google motto don't be bad finally I have found but should recognize that I am bad at this time
here is solution
Actually, you can use an sqlite editor to change the values in the flex.db file... the problem I was having in the OP is that on an LG phone (maybe others?) the flex.db file is ignored and the one inside FlexProvider is used instead, so you have to edit both. You can add new locales the same way. No need to use a hex editor, as that would be much more difficult.
lotherius said:
Actually, you can use an sqlite editor to change the values in the flex.db file... the problem I was having in the OP is that on an LG phone (maybe others?) the flex.db file is ignored and the one inside FlexProvider is used instead, so you have to edit both. You can add new locales the same way. No need to use a hex editor, as that would be much more difficult.
Click to expand...
Click to collapse
maybe you are right regarding your phone... but also I prepare a custom rom for Alcatel ot-908 also to change default homepage was a problem for me but I did and simply works !

[Q] mt6575 based ics tab needs to update build.prop

Hello everyone, I've an mt6575 based ics device and I'd like to tweak some part of it like the build.prop, and update it via the stock recovery. but my recovery has "everything" except the update option! can I update the said parts if that option was present?
The reason why I want to update the build.prop is because it has some bad lines in it, it says 240 ppi on this 800x480, 7" device! funny! and I also would like to root it if possible...
Any help regarding the said things (recovery, updating build.prop, rooting etc.) is highly appreciated.
Regards.
dakocha said:
Hello everyone, I've an mt6575 based ics device and I'd like to tweak some part of it like the build.prop, and update it via the stock recovery. but my recovery has "everything" except the update option! can I update the said parts if that option was present?
The reason why I want to update the build.prop is because it has some bad lines in it, it says 240 ppi on this 800x480, 7" device! funny! and I also would like to root it if possible...
Any help regarding the said things (recovery, updating build.prop, rooting etc.) is highly appreciated.
Regards.
Click to expand...
Click to collapse
It might come late, but build.prop is not neccessery to be updated, or edited trough recovery, simply, you need to have rrot premission, then use root explorer, or es explorer, navigate to /system and at the end of the scroll line you should be able to see buil.prop file, open it with text editor and change what you need. Another option is to copy it to sdcard and send to PC, where you can use Notepad++ (because regular notepad will stirr things up otherwise) and edit lines. This applies to all devices, but best is to backup your ROM trough recovery prior to doing this. And also you should know what lines you will change and what consequences are going to happen. Good luck

Tethering[mod] "build prop edit"vs985

hello fellow xda junkies!
HERE IS A SIMPLE WAY TO GET DATA TETHERING THROUGH BUILD.PROP EDIT
NOTE:MESSING WITH BUILD.PROP COULD MESS YOUR PHONE UP BE CAREFUL
Step 1.) download a text editor.i suggest 920 text editor.
Step 2.) you will also need an root explorer so download that also.
Step 3).open up your root explorer and navigate to system/build.prop. and copy that file to another directory. i.e example sdcard/download.then rename
original build.prop file to build.prop.bak
Step 4).open up your text editor and navigate to the directory where you copied the build.prop file
Step 5.)look for this line [they are both close to the end of the build.prop file] "net.tethering.nonprovisioning=true" [once you find it change the true
to false] so it reads "net.tethering.nonprovisioning=false" NOTEDO NOT TYPE THE QUOTATION MARKS!!!
Step 6.) " look for line "persist.data.tethering_oc=1" change the variable 1 to 0 so it reads "persist.data.tethering_oc=0
Step 7.) move the build.prop file that you copied and edited from location you placed it in to its rightful spot in system/.change permissions to rw--r--r
reboot phone and your good to go!works on my vs985 LIKE A CHAMP.
deathsquad737 said:
hello fellow xda junkies!
HERE IS A SIMPLE WAY TO GET DATA TETHERING THROUGH BUILD.PROP EDIT
NOTE:MESSING WITH BUILD.PROP COULD MESS YOUR PHONE UP BE CAREFUL
Step 1.) download a text editor.i suggest 920 text editor.
Step 2.) you will also need an root explorer so download that also.
Step 3).open up your root explorer and navigate to system/build.prop. and copy that file to another directory. i.e example sdcard/download.then rename
original build.prop file to build.prop.bak
Step 4).open up your text editor and navigate to the directory where you copied the build.prop file
Step 5.)look for this line [they are both close to the end of the build.prop file] "net.tethering.nonprovisioning=true" [once you find it change the true
to false] so it reads "net.tethering.nonprovisioning=false" NOTEDO NOT TYPE THE QUOTATION MARKS!!!
Step 6.) " look for line "persist.data.tethering_oc=1" change the variable 1 to 0 so it reads "persist.data.tethering_oc=0
Step 7.) move the build.prop file that you copied and edited from location you placed it in to its rightful spot in system/.change permissions to rw--r--r
reboot phone and your good to go!works on my vs985 LIKE A CHAMP.
Click to expand...
Click to collapse
You know there is already a flash for this and an apk.
Yes i do know this but some like to do it on there own.but hey nice to meet ya!
deathsquad737 said:
Yes i do know this but some like to do it on there own.but hey nice to meet ya!
Click to expand...
Click to collapse
Just checking.
I'm a tinkerer also which is how I figured out the thermal throttling.
Nice to met you.
tech_head said:
Just checking.
I'm a tinkerer also which is how I figured out the thermal throttling.
Nice to met you.
Click to expand...
Click to collapse
Thermal daemon mitigation?is that what you are referring too?
A.L.B/E.B.B
deathsquad737 said:
Thermal daemon mitigation?is that what you are referring too?
A.L.B/E.B.B
Click to expand...
Click to collapse
Actually not.
Instead of trying to stop the thermal mitigation from working I did just the opposite, I changed the parameters on how it operates.
The file /system/etc/thermal-engine-8974.conf.
This file controls what happens to cpu speed at various temperatures.
That is what you tweak and it just works.
I also used ROM Toolbox to change the governor.
tech_head said:
Actually not.
Instead of trying to stop the thermal mitigation from working I did just the opposite, I changed the parameters on how it operates.
The file /system/etc/thermal-engine-8974.conf.
This file controls what happens to cpu speed at various temperatures.
That is what you tweak and it just works.
I also used ROM Toolbox to change the governor.
Click to expand...
Click to collapse
Wow that's heavy I don't know if I have a high enough pay grade to do that lol
A.L.B/E.B.B
deathsquad737 said:
Wow that's heavy I don't know if I have a high enough pay grade to do that lol
A.L.B/E.B.B
Click to expand...
Click to collapse
I can always get you a copy of the file.
tech_head said:
I can always get you a copy of the file.
Click to expand...
Click to collapse
Yes please I pm you
A.L.B/E.B.B
Thank you but...
First of all, thanks for the post. Although I appreciate the helpful post, my phone is now stuck in boot loop . I hate to be the one to open up an old thread but I'm freaking out at the moment due to brick fever :crying: My current setup was a rooted LG G3 VS98512b. My goal was simple, I didn't want to do anything crazy, I just wanted to enable wifi tether now I'm afraid I've lost everything... Is there a way I can get back into the storage of my phone and delete the modified build.prop, remove the ".bak" from the original and be back to the good life? Any assistance is greatly appreciated, this seemed like such a simple modification that led to such a big headache.
It sounds like you might have used an editor on your build.prop that could not handle the file size, resulting in your editted build.prop being truncated. Otherwise, maybe your permissions were left wrong. Either of these will cause your phone to bootloop.
Sent from my VS985 4G using Tapatalk
trent999 said:
It sounds like you might have used an editor on your build.prop that could not handle the file size, resulting in your editted build.prop being truncated. Otherwise, maybe your permissions were left wrong. Either of these will cause your phone to bootloop.
Sent from my VS985 4G using Tapatalk
Click to expand...
Click to collapse
Thanks for the reply. I used the editor recommended in the tutorial, 920 text editor. I followed the instructions word for word, I don't know what the problem is. Maybe its because I have the newest update and this mod was for 10b???As far as the permissions, the phone asked automatically if I wanted to change the permissions. The original build.prop is still there... is there a way I can delete the modified build.prop and replace it with the original? I really wish I would not have followed this tut, it didn't seem like a popular method. There has to be a way to delete the modified build.prop right?
soundmasterx said:
Thanks for the reply. I used the editor recommended in the tutorial, 920 text editor. I followed the instructions word for word, I don't know what the problem is. Maybe its because I have the newest update and this mod was for 10b???As far as the permissions, the phone asked automatically if I wanted to change the permissions. The original build.prop is still there... is there a way I can delete the modified build.prop and replace it with the original? I really wish I would not have followed this tut, it didn't seem like a popular method. There has to be a way to delete the modified build.prop right?
Click to expand...
Click to collapse
Yes you can reflash the firmware or if you don;t want to restore to stock you can use ADB to fix the files and restore your .bak
Digital_MD said:
Yes you can reflash the firmware or if you don;t want to restore to stock you can use ADB to fix the files and restore your .bak
Click to expand...
Click to collapse
Again, thank you for the response. Do you recommend a specific method or tutorial for trying restore the original build.prop? I did search however, because this scenario is so specific I'm not sure there is an exact solution to my problem.
Again, just in case someone else can chime in, I followed the instructions on the first post of this thread (see first post for detailed info). I copied the original build.prop then changed the name of the original build.prop, edited the copy, moved it to the original directory and restarted the phone. Now my phone doesn't make it to the Verizon screen (I think it is stuck in boot loop), the screen stays black and the small led on the left corner flashes blue and green. If I can just get access to the storage I can replace the modified build.prop with the original that is still in the same directory just renamed. It seems like such an easy task but, I just don't know how to go about it I'm a somewhat of an old school tinker, I'm just now getting back into the swing of Android... Thanks in advance!!
Bump
Bump please
This is crazy... I changed 2 values in build.prop for tethering and my phone wont boot now... I didnt install a ROM, change DPI, or make any major changes WTF???
Do you have a custom recovery (twrp)?
Can you connect to your phone with adb?
If you have twrp, search the board for the startup hardware key sequence to reach twrp, else from adb do a reboot recovery.
In twrp, you can select to mount system, then go to advanced - file manager. You can delete the bad build.prop, rename the good one, then set the permissions on the good one. If your good copy of build.prop is on a PC, put it on a flash drive, and use twrp's file manager to get it into your phone.
If you have a saved copy of build.prop on your PC, you can also use adb's push command. (You may also want to look at the adb shell command. The sequence might be to open a shell, delete the bad build. prop, get the right build.prop into the right directory, then chmod the right build.prop so it has the proper permissions.)

Roll Back after Build.Prop deletion

Looking for a little help here.
In an effort to make some tweaks on my HDX, I somehow managed to delete the actual build.prop while I was in the process of trying to restore from a backup (build.prop.bak). I've tried removing build.prop.bak to build.prop, however Root Explorer keeps telling me that the Renaming Action has Failed.
I'm struggling to get my device to load/recognize on my PC with ADB. I'm looking for solutions to prevent my device from bricking.
Does anyone know if it would be possible to use the "Rollback" method from 4.5.3 to 3.2.8; or will not having a proper build.prop interfere with that?
The most aggravating thing, is I have a fully functioning build.prop backup, I just can't seem to get it to take as the actual build.prop
Any ideas are much appreciated
positivehxcgo said:
Looking for a little help here.
In an effort to make some tweaks on my HDX, I somehow managed to delete the actual build.prop while I was in the process of trying to restore from a backup (build.prop.bak). I've tried removing build.prop.bak to build.prop, however Root Explorer keeps telling me that the Renaming Action has Failed.
I'm struggling to get my device to load/recognize on my PC with ADB. I'm looking for solutions to prevent my device from bricking.
Does anyone know if it would be possible to use the "Rollback" method from 4.5.3 to 3.2.8; or will not having a proper build.prop interfere with that?
The most aggravating thing, is I have a fully functioning build.prop backup, I just can't seem to get it to take as the actual build.prop
Any ideas are much appreciated
Click to expand...
Click to collapse
Sounds like you are on 4.5.3 but lost root. Might try to reroot using Kingroot although I believe that involves a reboot. Pretty sure your device will not restart (effectively brick) without build.prop. You really need to get adb working to expand beyond those options. Keep your device on charge to prevent a shutdown due to low battery.
I absolutely would not attempt a 3.2.8 rollback. There is an outside chance a factory reset from stock recovery would restore a generic build.prop if none is found. It generally will not repair or replace a damaged file and involves a reboot which could be fatal. This becomes an last resort option imo.
If you device was purchased from Amazon it may still be under warranty. Sometimes that is the best/only path. Good luck.
I've managed to get it mounted as ADB, and have pulled the backup, and renamed the file.
I'm now running into a problem pushing the file to /system/ I'm going to assume it's because I've lost my root access (I'm guessing it's because the buildprop manages it?).
So Making advances, just now stuck here. I've tried editing the prop, and it's in read only. I've tried sending it to a different folder and copying it over, but that's also failing.
positivehxcgo said:
I've managed to get it mounted as ADB, and have pulled the backup, and renamed the file.
I'm now running into a problem pushing the file to /system/ I'm going to assume it's because I've lost my root access (I'm guessing it's because the buildprop manages it?).
So Making advances, just now stuck here. I've tried editing the prop, and it's in read only. I've tried sending it to a different folder and copying it over, but that's also failing.
Click to expand...
Click to collapse
You will probably need to root via adb which is challenging and by no means certain. Take a look at this thread for ideas. You may want to reach out to @myotai as he faced a similar problem.

How do I determine required file permissions?

I'm working on a custom ROM, and I've been having very little trouble - very few problems are occurring, and I've written a number of scripts to automate everything for me. It's a stock-based ROM based on Samsung's KitKat 4.4.2 firmware.
The problem I'm having, is I don't know what permissions are vital. I could copy all of the permissions, and then strip out the ones I don't need after I've removed or changed files, and I could automate that, but that makes my updater-script roughly 3000 lines long - taking up unnecessary space.
I've looked at other ROMs, but what I want to know is whether there is any point having permissions set for everything. Obviously there needs to be permissions on some areas, but do all areas need permissions set?
How can I figure out what permissions I actually require? Or should I think about checking if everything in a folder has the same permissions, and then make that folder one recursive one (and keep working backwards from there until almost all permissions are conglomerated in recursive permission sets)?
Thank you very much and I hope you can help me.
furzewolf said:
I'm working on a custom ROM, and I've been having very little trouble - very few problems are occurring, and I've written a number of scripts to automate everything for me. It's a stock-based ROM based on Samsung's KitKat 4.4.2 firmware.
The problem I'm having, is I don't know what permissions are vital. I could copy all of the permissions, and then strip out the ones I don't need after I've removed or changed files, and I could automate that, but that makes my updater-script roughly 3000 lines long - taking up unnecessary space.
I've looked at other ROMs, but what I want to know is whether there is any point having permissions set for everything. Obviously there needs to be permissions on some areas, but do all areas need permissions set?
How can I figure out what permissions I actually require? Or should I think about checking if everything in a folder has the same permissions, and then make that folder one recursive one (and keep working backwards from there until almost all permissions are conglomerated in recursive permission sets)?
Thank you very much and I hope you can help me.
Click to expand...
Click to collapse
Take a look at the stock permissions and how they are set. In most updater scripts I've seen, unless there's a specific reason, individual permissions are not set, they are handled recursively through the partition or folder. I am fairly certain that all areas must have permissions set, if they weren't then the system wouldn't know what to do with the files (I have never tried to flash files with permissions not set, so I don't know if the system defaults to a permission set or not). The vast majority of files in your ROM will be rw-r--r-- (0644), so verify the permissions you need from the stock ROM and you should be ok.
Edit - Also, this is a good source of information when it comes to updater scripts.
Stryke_the_Orc said:
Take a look at the stock permissions and how they are set. In most updater scripts I've seen, unless there's a specific reason, individual permissions are not set, they are handled recursively through the partition or folder. I am fairly certain that all areas must have permissions set, if they weren't then the system wouldn't know what to do with the files (I have never tried to flash files with permissions not set, so I don't know if the system defaults to a permission set or not). The vast majority of files in your ROM will be rw-r--r-- (0644), so verify the permissions you need from the stock ROM and you should be ok.
Edit - Also, this is a good source of information when it comes to updater scripts.
Click to expand...
Click to collapse
I ended up realising that trying to recursively generate the permission script is a bit on the... scary side. So I just looked through all the permissions (thrice, to ensure correctness) and I've made a base file of permissions and a base file of symlinks for the stock ROM in question.

Categories

Resources