yashsingh1/xdaforums huggingface dataset:
[Nexus 4 General] Blockberd:
Oh come on. If someone already did the work of unlocking bootloader, flashing custom recovery and flashing a root app, they can easily unroot in the SU app, apply the update and flash the SU app again.

What is the deal?

Feel free to contact Chainfire about it. I am pretty sure he will give you some information about it sooner or later.
[Nexus 4 General] hgmichna:
Now that I know, of course it is not a big problem. But don't ask me how many hours I wasted until I found the cause. And multiply that by the number of other people stumbling into the same trap.

I hope that the programmers, even if they are not directly paid for it, strive for perfection. I do the same in my fields of work.
[Nexus 4 General] efrant:
I actually think that [MENTION=2893530]hgmichna[/MENTION] brings up valid points and concerns. He has obviously done some thinking about the problem.

Most of us are here because we are developers or enthusiasts, and we should be not only trying to get a fix for the problem, but to understand what is causing the problem so we understand how things work, and then share our knowledge (which you have been doing I see :good:).

EDIT: I would love to see everyone looking through the updater-script file in OTA update files. You get a good idea of how updates work, and what they do.
[Nexus 4 General] Blockberd:
I also faced the same problem after flashing jwr66n leak rom. Set_perm was killing me. Only after the help from crazypeter i was able to fix the problem. This is when the ball started to roll.

Of course i agree with you that the su app developers should try to find another way of keeping root and recovery on 4.3. Let's see what chainfire and co come up with.

But if there is no other way i won't mind.

---------- Post added at 07:57 PM ---------- Previous post was at 07:55 PM ----------

Let me try to have a look later. Maybe i can figure it out.
[Nexus 4 General] pjmarkert:
Thanks

This fixed it for mine finally got the JWR66Y installed & rooted

to add: this was on Nexus 7 with TWRP
[Nexus 4 General] doublewings:
Notice that prior to 4.3, the screen buttons would go away for certain apps till I tap. Now they're always on top.
[Nexus 4 General] hgmichna:
BS Player still hides them. Haven't checked other programs, only the gallery, which apparently never hides the buttons, only makes them dark. I forgot whether it had always been like that.

It would be a step back, as the essential advantage of having them on the display is that you can use the display area for other purposes when you don't need the buttons. Usually a program would redisplay the buttons when you touch the screen. I always thought that that was an ingenious idea.
[Nexus 4 General] SinisterSHO:
pardon my noobness, but how do I replace the build.prop file?
[Nexus 4 General] SinisterSHO:
I got it from one of your earlier posts in this thread. When I try to paste it in the system file, I get an error EROFS read only file. :confused:
[Nexus 4 General] Blockberd:
Just open the left-side menu (tap the icon on left top), tap "Root Explorer", "Mount R/W", select "RW" for the path /system.

Make sure you undo this once done.
[Nexus 4 General] SinisterSHO:
Finally got it all sorted out. Thank you for all your help!
[Nexus 4 General] kukimax:
Nexus 7 can use it??:confused:
[Nexus 4 General] DecypherT:
Just a bit anxious here to update since it went wrong real good after trying to re-root after being so dumb to apply the OTA 4.3 update to my 4.2.2 installation, with out a NANDROID backup. Resulting in re-unlocking the bootloader and losing all my data.

When i flash efrant's "keep root" JWR66Y update. Will my phone prompt if TWRP & SU should be restored/keeped? If it does do i apply yes to both?
[Nexus 4 General] Blockberd:
Is your Nexus 7 rooted? If yes, you have two options:

1) Unroot, apply OTA update from notification or flash update ZIP manually in recovery and while still in recovery you flash your root app again.

2) Get the latest factory image for the N7, extract the system.img, boot.img, radio.img and kernel.img. Then boot the N7 into bootloader (vol down + power), connect it through USB with PC and execute fastboot like that from command line from PC:

fastboot flash system "path-to-system.img"

fastboot flash boot "path-to-boot.img"

fastboot flash radio "path-to-radio.img"

fastboot flash kernel "path-to-kernel.img"

Now boot into recovery and flash your root app again and reboot.

You can only use efrant's ZIP if you are already on JWR66V. You should keep root. TWRP could prompt you with something like "do you want to prevent flashing stock recovery?" which you say yes.

[MENTION=1566190]efrant[/MENTION]:

I am curious... Is it possible that the bootloader can be locked again by an OTA update?
[Nexus 4 General] DecypherT:
Thanks for confirming bud. Just flashed the update without errors and kept root :good:

efrant, big thanks for that custom update!
[Nexus 4 General] efrant:
I suppose technically it would be possible, but I doubt Google would ever do that. OTA updates have never relocked the bootloader, on any Nexus device going back to the Nexus One.
[Nexus 4 General] Azstynger:
Chainfire just updated SuperSU to v1.55 to address the OTA errors for rooted users. So the only problem left for smooth OTA for rooted phone is LTE enabler which can be easily done using the approach by Blockberd above? Has anyone confirm that the LTE enabler work for JWR66Y?
[Nexus 4 General] sordna:
Just in case, there's the free BootUnlocker utility, so as long as you have root (or a custom recovery) you can unlock your boot loader without wiping your data. Trickster Mod also has boot lock/unlock switch.
[Nexus 4 General] Blockberd:
The method i described should make it possible for LTE enabled devices to go from JWR66V to JWR66Y. I dont know how the enabler will work with the latest build though.

Note: If there is a new update after Y you need the stock build.prop of the Y build...

I also mentioned the SuperSU update in the other thread. I hope El Daddy picks it up and updates the first post. :)
[Nexus 4 General] SinisterSHO:
So is there anyway that my phone would revert to an older build? I swear I had jwr66y the other day, but I just got the notification for the update again and phone shows jwr66v.

If I didn't reflash the LTE enabler, and just pasted the LTE enabled build.prop?
[Nexus 4 General] mrlad:
Finally getting around to trying this. I'm using the Koush Superuser and not SuperSU. What is the procedure to unroot w/Superuser? I can't find an option in the settings.
[Nexus 4 General] hgmichna:
My current info is that you don't have to do it. Just go ahead and update.

In the worst case you would just have to re-root and re-flash your recovery, but I believe you won't even have to do that.

Does anybody know how Superuser achieves this?
[Nexus 4 General] mrlad:
Confirmed, I just upgraded w/o having to unroot w/the Koush superuser.
[Nexus 4 General] DecypherT:
What does this have to do with the update?

The bootloader stays unlocked so if you lose root, it's easily obtained by reflashing SU (if I'm right, with chainfire's updated v1.55 SU, you will keep root in survival mode when applying OTA updates).

If you lock the bootloader manually, update and lose root (what happend before in my case) you have a problem. Cause then you will have to unlock the bootloader again, but now via toolkits or ADB/Fastboot commands, wiping your data.

Send from my Nexus 4
[Nexus 4 General] jcagara08:
Just received my OTA notification over an hour ago, one question, will it format my phone or all data will be intact?

I wanted to know before I apply the update,

I wonder how I got this notification that I am rooted, unlocked bootloader, and custom recovery installed but I have stock 4.3 JWR66V onboard my Nexus 4?

Please advise, thanks in advance!
[Nexus 4 General] Blockberd:
Let me point you to this thread and it's first post: http://xdaforums.com/showthread.php?t=2145848

Also: It will not format anything. It will just patch specific APKs and other files on the phone. Your userdata should stay intact.
[Nexus 4 General] jcagara08:
Whoah Thanks blockberd! Rep points for you!!
[Nexus 4 General] Azstynger:
Just curious as I'm new to this custom recovery stuff, what is 'survival' mode and how do you get in that mode? I updated to SU v1.55 and applied the OTA without any problem but lost root. I had to re-root and install twrp custom recovery again. No big deal but just want to know about survival mode so it will save me an extra step of re-rooting next time I do another OTA.

For those with LTE enabler, LTE works just fine in JWR66Y.
[Nexus 4 General] DecypherT:
Survival mode is a feature of SU and only available in the pro version of SU.

I read on XDA that survival mode was broken/not working on Android 4.3 (until now), because of the way android 4.3 handles root.

Send from my Nexus 4
[Nexus 4 General] Tomatot-:
I'm using JWR66Y through Purity ROM and this system build is great and better than JSS builds so far, mainly because of deadlocks. However even if the performances ain't as good as they are on JSS builds it's way enough to wait for JSS builds without deadlocks or even Android 5.0 :D
[Nexus 4 General] hgmichna:
To the best of my knowledge there has never been any need to relock the bootloader. Also no OTA update has ever relocked an unlocked bootloader.

The manufacturers have no interest in relocking a bootloader, because that would effectively reinstate the warranty.
[Nexus 4 General] DecypherT:
Indeed there is no need. but a locked bootloader is more secure in the matter of protection.

I locked it because of that and lost my ability to unlock it after the update from 4.2.2 to 4.3 (because I lost root).

I just gave the warning so people don't make the dumb mistake i made. Have to unlock the bootloader again and then realise you didn't made a NANDROID backup and lose all data.....

Send from my Nexus 4
[Nexus 4 General] Blockberd:
That's nice but I think your post will not receive the audience it needs. Maybe [MENTION=962867]El Daddy[/MENTION] puts it somewhere in his INFO thread.

What do we learn from that? Always NANDROID. :D

(Sry, mate. Could not resist...)
[Nexus 4 General] DecypherT:
No your absolutely right about the last one.

After the new root that was the first thing I did.

Send from my Nexus 4
[Nexus 4 General] efrant:
If I'm not mistaken, there's a bug related to this, which allows you to unlock without losing data. Unlock the bootloader, do NOT reboot, go directly into recovery, wipe cache, then reboot. All your data should still be there.

I would say that is debatable.
[Nexus 4 General] Blockberd:
If that behavior is always reproducable like that then I assume they store some kind of script in the cache folder which is executed and deleted during first boot. This script would simply need to format userdata partition.
[Nexus 4 General] madd0g:
There's no point in having a locked device for security while having root.
[Nexus 4 General] DecypherT:
Then the guys who invented the "bootunlocker" app are making false assumptions in the matter of (extra) security.

Send from my Nexus 4
[Nexus 4 General] efrant:
Although this is getting a little off topic here, I'll try to address the concerns.

I didn't create the BootUnlocker app, all (well-deserved) credit for that goes to [MENTION=4551856]segv11[/MENTION]. However, I did contribute somewhat to the proof-of-concept when we initially started looking at it for the Galaxy Nexus, so I have an idea of what I'm talking about.

First of all, the bootloader on the Nexus 4, much like on the Galaxy Nexus, does not really prevent partitions from being written to when locked. There is no "security" or lock (or for those who are used to HTC devices, there is no S-ON) per se -- all partitions are writable. All that a locked bootloader on a N4 does is 1) prevents partitions from being written to using fastboot, 2) prevents using the "fastboot boot" command to load kernels into memory, and 3) forces a data wipe when unlocked.

Before I go on, remember that segv11 released BootUnlocker in June 2012... a lifetime ago in the Android world, and a lot of new info has come to light since then.

Now, for point #3 above, it has been reported (although I haven't tried) that if you 1) unlock the bootloader, and 2) do not reboot immediately but boot into recovery and wipe /cache, then reboot, your data is still in tact. So, if this is indeed the case, then you can easily unlock the bootloader, boot a custom recovery, and pull off any data you want off the device. So, all that a locked bootloader does in this is... not much.

Additionally, there a low-level utilities for the various SoC's that can write directly to the devices partitions (like OMAPFlash and, I believe but not sure, QPST). With these utilities, you can easily by-pass the bootloader.

So, based on the above, you can draw whatever conclusions you want about extra security with a locked bootloader. I, for one, do not believe that it adds any level of security -- if you want to secure your data, use encryption with a strong password... although there's even ways around that if someone really wants your data.
[Nexus 4 General] sordna:
Thank you for this. For starters I'm now using the encrypted backup option of TWRP, seems to work and I can decrypt the tarballs in linux with the oaes utility if I need to grab a file (would be a dealbreaker if I couldn't). Still on the fence on whether to try the encrypt device option in android, I guess then I wouldn't be able to extract files from a nandroid, would I ?
[Nexus 4 General] efrant:
I've never used it, but I believe that TWRP can access encrypted partitions, so you would be able to I think.
[Nexus 4 General] segv11:
That's a nasty bug...

Sent from my stock 4.3 mako.
[Nexus 4 General] efrant:
Agreed.

Here is the method I was mentioning.
[Nexus 4 General] SinisterSHO:
Anyone confirm this for me?
[Nexus 4 General] DecypherT:
[MENTION=1566190]efrant[/MENTION], thanks for the detailed explanation.

I'm learning big time, android wise here on XDA

Send from my Nexus 4
[Nexus 4 General] SinisterSHO:
Followed all the earlier steps again and I have 66Y running and re-flashed the LTE enabler and seems to be working fine. But I lost root, I can still boot to twrp, and supersu is still installed, but telling me I need to manually reroot. I thought I saw someone say I can just flash the supersu zip, but I'm not sure where to find it. The one link I saw said it would overwrite my recovery and load stock recovery.

If I was home, I imagine I could just reroot with the wugfresh toolkit?
[Nexus 4 General] Blockberd:
Grab SuperSU 1.60 from http://download.chainfire.eu/350/SuperSU/UPDATE-SuperSU-v1.60.zip and flash in custom recovery. Make sure you have latest custom recovery and if prompted for the revert-to-stock-fix apply that.
[Nexus 4 General] SinisterSHO:
You mean have the latest custom recovery downloaded, and use that zip if I'm prompted to revert to stock?
[Nexus 4 General] efrant:
1) Make sure you have the latest recovery flashed (TWRP found here)

2) Download the latest SuperSU file found here

3) Reboot into recovery and flash the SuperSU zip you downloaded in step 2.

4) If it prompts you to do anything like fix root or recovery or whatever the prompt is, choose no.
[Nexus 4 General] sordna:
Don't the newer recoveries do the right thing with that now ? Although I haven't gotten that prompt recently...
[Nexus 4 General] efrant:
Maybe. But if you have just flashed a superuser zip, then the right thing for the recovery to do would be no prompt at all.
[Nexus 4 General] sordna:
Looks likeTWRP 2.6.1.0 / 2.6.2.0 and SuperSU 1.60 do the right thing then :)
[Nexus 4 General] Blockberd:
That's right and in CFs changelog for SuperSU he mentioned something like that...

http://xdaforums.com/showpost.php?p=23427824&postcount=3
[Nexus 4 General] SinisterSHO:
I'm guessing I can't flash the latest recovery, from the recovery since an .img and not a zip?
[Nexus 4 General] sordna:
Yes, to flash an .img you need to use fastboot or an app like Touch Image Gui / Flashify / Recovery Tools
[Nexus 4 General] SinisterSHO:
So, I fixed root with the WugFresh toolkit taht I used to root in the first place. The root checker tells me that I have root. However I was just in twrp and when I rebooted the system it still said I needed to fix root. I declined and still have root, but not sure why twrp thinks otherwise..?
[Nexus 4 General] efrant:
Not to sound mean, but just so I get this straight: I wrote out step by step instructions for you, and you still went ahead and used a toolkit, and now you are wondering why things are working the way you thought? I'll just leave this here: http://xdaforums.com/showthread.php?t=1469909
[Nexus 4 General] SinisterSHO:
You mean, after I asked if I could just do it with the toolkit? Its okay, I didn't think you were being mean.
[Nexus 4 General] efrant:
Although I could be mistaken, I'm pretty sure I never said to anyone at any point, whether in this thread or any other, that you could/should do anything with a toolkit, particularly how strongly I feel about using them. The problem with toolkits/scripts is that they do things in the background, so you don't know exactly what steps are taken. On the other hand, if you do things yourself, you can see if/where something messed up. In any case, if you do have root, you probably don't need to worry about what TWRP is saying, but it is weird, given that sordna confirmed TWRP didn't ask him.
[Nexus 4 General] SinisterSHO:
My point was you could have told me no, when I asked.

I believe the newest version of twrp was 2.6.1, mine is 2.6.0, so maybe that was the issue?
[Nexus 4 General] efrant:
I must have missed the post where you asked. Otherwise I certainly would have suggested against it.

Could very well be, yes.
[Nexus 4 General] hgmichna:
At the risk of drifting into a pro-and-con discussion about toolkits: I am wondering whether all toolkits are created equal and have the same level of risk. To make a general contra-toolkit statement, you would have to analyze all toolkits in existence and find fault with each of them.

I must admit that I tend to use the WugFresh Nexus Root Toolkit (NRT) from time to time, because it seems to do things properly and is so much faster and more convenient than doing things by hand, step by step, that I sometimes prefer to save the time and use the automatic procedure. Since NRT auto-updates itself, including automatically obtaining the latest versions of Superuser, SuperSU, ClockworkMod Recovery, and TWRP, it actually makes the procedures a bit safer and certainly quite convenient.

Moreover, it also offers a command-line window with fresh versions of adb and fastboot, so you can still do things by hand without having to install the entire Android SDK, which may also be convenient for many casual users.

I do see the point that the automated procedures are done in the background, so if something goes wrong, you don't know immediately what went wrong. But the NRT does a check after each step to make sure the phone is in the correct state and halts the automated procedure when that is not the case. I have yet to see any case where the NRT did any damage.

I have looked at a few other toolkits and found them wanting. So far only the NRT has my approval with the qualification that, after a new Android version appears, you should give the WugFresh developer a few days to adapt NRT, which he has so far always done in a timely fashion. Some functions are independent of the Android version and can always be done, if you are aware of the increased incompatibility risk. For these NRT has a special Android version setting (*.*.*).

All in all I think the decision whether to do everything by hand or use NRT is not always very simple. It's a tradeoff and should be recognized as such.
[Nexus 4 General] Blockberd:
Thank you VERY much, efrant! You are speaking from my heart. Very good and long post. Thanks for taking the time to write down all that stuff. I would never thought that your work has nothing to do with this kinda stuff or what-so-ever.

I am in the same boat as you regarding the learning topic. All the things I told since the latest OTA update came out.

I started using fastboot and adb actively since then and I LOVE it!
[Nexus 4 General] eman3316@optonline.net:
[MENTION=1566190]efrant[/MENTION] - You also have to realize that not everyone here has an interest in what is going on behind the scenes. They just want their phone to act in a certain way. They don't care what is in a zip file and that is okay and for that I applaud toolkits.

I have been rooting, unlocking, breaking phones since my ppc-6600 and have done things manually and automated all along the way.

At this point even knowing how to do everything manually, and even when you forget the instructions are written out to almost foolproof the procedure I prefer to use a toolkit and hope the devs continue to build them for future devices. I have nothing to prove by doing the steps manually and others shouldn't feel any less for doing it either.

If one day their toolkit isn't there, then they can easily learn how to do it manually at that time.

In the end everyone gets to the same thing.
[Nexus 4 General] Blockberd:
I think the fact is that most people asking how to fix their bricked phone are in fact toolkit users. This may be because the people who choose the manual way know exactly what they did (wrong) and can fix it witb mostly no issue. A toolkit user does not know that most of the time as the magic happens in the background.
[Nexus 4 General] eman3316@optonline.net:
You have a point but it takes time to also learn how to use the toolkit. If you learn how to use the kit then you will always know how to get back to stock. Like anything nothing is foolproof and you always need to take some time to learn how to use something.

Also, one disadvantage of the toolkit is when something new comes out you usually need to wait for the toolkit to update for it.