Editing build.prop on rooted Nexus 6.

A

AC Question

I rooted my Nexus 6 with stock ROM 6.0.1 in order to edit the build.prop file to add "persist.debug.wfd.enable=1". This is to enable screen casting of Nexus 6 with Samsung smart TV's.

Even after rooting the phone, I am not allowed to modify the build.prop file using ES file browser or root explorer.
Modification using ADB also doesn't work as ro.debuggable is set as 0 in the default.prop file.

There is no question of moving to a custom ROM (which allows editing), as Marshmallow is not available yet.

I understand this extra file protection after rooting is an Android 6.0 feature.

Is there anyway I can modify the default.prop or build.prop files with the production ROM??

Will the edit work if I flash an old stock firmware like 5.0 and later update the firmware??
 

jj14x

Well-known member
Jan 9, 2011
995
24
0
Visit site
What is the error message you get when you try to edit it? Is it complaining about space not available? Or something else?
 

Sachin Kudva

Member
Jan 7, 2016
10
0
0
Visit site
ES File explorer throws the error "Error occurred when trying to save the file. It will not be saved. No enough space!"

When I connect the phone to a computer via USB and call "adb root" it says "adbd cannot run as root in production builds".
 

jj14x

Well-known member
Jan 9, 2011
995
24
0
Visit site
yeah, that's a new thing.
What has happened now is that with 6.0.1 factory images, the system partition is almost entirely full. There is almost no space available, and so, you are unable to make any changes easily.

What you can do is to go and delete out an app like youtube or G+ from the system partition, and then, reinstall it from the play store. What this will do is free up space on the system partition for you to make the changes you want, and since you reinstalled from the play store, the deleted app will still be working just fine (but it has now moved to the user data partition).
Hope that makes sense

Edit: you could also use TWRP to resize the system partition and add more space to it - that should work too.
 

Sachin Kudva

Member
Jan 7, 2016
10
0
0
Visit site
Are you sure its a space issue? I really doubt it. I tried to delete the new line characters at the end of the build.prop file and it would still not save the file. I still believe its a permissions issue with Android Marshmallow.

So I went back to the latest 5.1.1 for shamu and rooted my phone This time I was able to make my build.prop changes successfully. I verified that the screen cast worked wonderfully with my Samsung smart TV.

Now the biq question I have is this! Will an OTA update of 6.0 replace the build.prop file, as a result of which I may lose my changes again! Or will it only add the 6.0 related changes to the existing file..

As of now I haven't really received the update so will know only once the update arrives :p
 

jj14x

Well-known member
Jan 9, 2011
995
24
0
Visit site
Need more info to confirm that the space issue is what is happening in your case, but very likely. See the two links below for more info.
[BETA][2015.10.10] SuperSU v2.52 - Post #3393
Full system partition after 6.0.1 update. | Nexus 6

If you are rooted, how do you play to take OTA anyway? OTA will not work for you with any change to system files (which rooting does). You will need to flash new system image, which will overwrite your build.prop - but if/when you re-root, editing the build.prop is not that hard
 

Sachin Kudva

Member
Jan 7, 2016
10
0
0
Visit site
Ouch! I had no idea that a Nexus would stop receiving OTA's after rooting!
In any case, I did not change the stock recovery and moreover I flashed a stock ROM of 5.1.1 from the Google developer website.

So do I still have a chance of an OTA update? From an article on rescue root I understand that it is the custom recovery which is responsible for not receiving OTA's.
Damn I am not allowed to share links here :|

Also, had a look at the two links! looks like you are right!. But in any case I will still need to root the phone with 6.0.1 and then delete some in-built apps and then try to modify the build.prop file. So again I am at a risk of not receiving OTA updates.

How about using the sideload command in adb? Can I update my phone this way without having to go through the reset and complete setup of my phone all over again?
 

Sachin Kudva

Member
Jan 7, 2016
10
0
0
Visit site
I just discovered another potential blunder in my case.

From the Nexus factory images page of the Google developer website, I chose to flash the LMY48Y image for my International Nexus 6.

After a bit of googling around, It now looks like LMY48Y is an AT&T specific image (but this is not specified in the google developer website) and the corresponding 5.1.1 image for the International Nexus 6 version is LMY48X .

Any idea if I can sideload an image made for "from LMY48X" in my case. Otherwise I need to re-flash all over again! :'(
 

jj14x

Well-known member
Jan 9, 2011
995
24
0
Visit site
Starting with Lollipop, any change made to any of the system files (not just recovery, but also kernel, system, bootloader,etc) will cause OTA to fail. That's just the nature of OTA - it is an incremental update - updates only specific files that changed. But if other files are modified, there is no guarantee that the updated files will not cause conflict/issues, so as a failsafe, OTA is not permitted with any system modifications.

If you flashed all partitions of 5.1.1 successfully (userdata partition doesn't matter), you can get OTA. But if you are on LMY48Y now, that may be the latest OTA for your device, till AT&T releases OTA from LMY48Y to Marshmallow.

Since you are familiar with flashing system images, I'd suggest downloading the correct image for your device and flashing it. After the download, it shouldn't take more than 2-3 minutes (since you already have fastboot & drivers installed from flashing LMY48Y). You don't have to flash userdata partition - that way, your user apps won't get wiped.

Edit: you can't sideload images made for "from LMY48X" - those will fail, since you are not on LMY48X
For reference, here are the known OTA URLs - http://forum.xda-developers.com/nexus-6/general/ref-nexus-6-stock-ota-urls-t2906493
 

Sachin Kudva

Member
Jan 7, 2016
10
0
0
Visit site
Bang on! Thanks for the help..

I went back to the latest 6.0.1 by flashing the nexus factory image and rooted my phone.

Then I deleted an apk from the /system/app folder and managed to edit the build.prop file! All working fine now :)
 

Sachin Kudva

Member
Jan 7, 2016
10
0
0
Visit site
Yes. I downloaded the necessary rooting files from the chainfire website, entered the fastboot mode on my Nexus 6, connected it to the computer and ran the batch file provided within the chainfire zip folder.

And as for deleting the apk,
Once rooted, I used a file explorer (ES in my case) to navigate to the /system/apps folder and delete the hangouts.apk file in the Hangouts folder. This cleared almost 17 MB of space and I was successfully able to modify and save the build.prop file.
 

Sachin Kudva

Member
Jan 7, 2016
10
0
0
Visit site
Wow! So I get my February Security update last night and I am able to download the OTA on my Nexus. But when it tries to install, just like you said it would, I get an error!

So now the question is, can I update my phone after all? Without disturbing the order that is. Like a side load or something?
 

TacoKingYo

Well-known member
Apr 29, 2015
149
0
0
Visit site
Wow! So I get my February Security update last night and I am able to download the OTA on my Nexus. But when it tries to install, just like you said it would, I get an error!

So now the question is, can I update my phone after all? Without disturbing the order that is. Like a side load or something?

As jj14x said earlier, you can simply flash the factory images. If you don't flash userdata, you should still have all of your apps and such, but you may have to go through the setup again - I don't know. If you do this, you should make sure to fully unroot your supersu; it's under settings near the bottom. But you will have to edit build.prop (though what you're doing seems to be easy enough).
 

Forum statistics

Threads
942,111
Messages
6,912,514
Members
3,158,232
Latest member
andrewsmith