yashsingh1/xdaforums huggingface dataset:
[Nexus 4 General] efrant:
For the N4, fastboot mode and bootloader are the same. (They can be different, like in the Nexus One for example.)
[Nexus 4 General] luistox:
Hello,

I'm on CM 10.1.0 RC5 (nexus 4).

I wan't to go back to stock, so there is my question: do I need to flash first JWR66V and then JWR66Y or can I directly flash JWR66Y?

Thanks!
[Nexus 4 General] sordna:
directly flash JWR66Y.
[Nexus 4 General] vlatkonexus4:
I have just made a really in depth tutorial for your answe please see my post http://xdaforums.com/showthread.php?t=2430908

i am happy to help and glad if that is accepted from everyone
[Nexus 4 General] faddyie:
Purpose?

Sent from my Nexus 4
[Nexus 4 General] Natakranta:
fresh stock Nexus 4 Nandroid with CWM

Yesterday I finally received my new Nexus 4. Tonight I had time to play with it. I decided to open boot-loader straight away when I still don't have anything installed so I don't bother with loosing anything when fastboot oem unlock does factory reset. All went smooth and I rebooted and set my gmail acct. and updated stock apps. Now I decided is good moment to make a backup as I have full stock with open boot-loader. Instead of flashing custom recovery I just fastboot booted it with this tutorial command: fastboot -c "lge.kcal=0|0|0|x" boot CWM.img and made a nandroid backup in CWM. If I understand correctly now I have a nandroid of full stock with stock recover as I did not flash the CWM but only fastboot booted the device into it.

As per CWM this backup should be saved in /sdcard/clockworkmode/backup/

The thing is I don't see a backup/ folder in /sdcard/clockworkmode/ folder in ES file explorer. I enabled show hidden files but it only showed me .recovery_version file of 37,00 B in /sdcard/clockworkmode/ folder.

The backup is on the device. I can see it when I fastboot boot CWM again. It is available in restore option. I am just curiose where it is saved on the device and how I can see it? Does ES file explorer needs to have root access to be able to show it to me?

Could somebody point me into right direction.

Now I am going to flash CWM and then flash Slim ROM 4.3 beta 4 which I am using on my old maguro for last 3 weeks and I am very happy with. That's why I don't even bother to root the stock ROM. Anything goes wrong I can always restore factory stock from my today's nandroid. And if this fail, well ther's always fastboot way :)

I am so happy I spent countless hours reading efrant's tutorial on Galaxy Nexus forum so I can do it all now manually with fastboot instead of using toolkit.

Understanding the journey ;) kudos efrant!
[Nexus 4 General] sordna:
Congrats on getting a great phone! When I used CWM, the backup was stored in /data/media/clockworkmod which is only accessible with root access. I use TWRP now, which stores backups in /sdcard/TWRP which is visible even if not rooted.
[Nexus 4 General] star-ter:
Thank you for the instructions, it all worked well, my phone was downgraded to 4.2.2. I really appreciate it.

Still it did not fix my problem... I get no mobile signal on any of my sim cards... Looks like my phone is useless now with no mobile service.
[Nexus 4 General] Natakranta:
Thanks for the tip! It's there and takes 1GB. Not exactly small but I think it's worth the space it takes.
[Nexus 4 General] vikas_toad:
Can this be used to update to 4.3?
[Nexus 4 General] C4SCA:
Yes

sent from my NEXUS 4 tasting a revamped cooking recipe of Jellybeans (stock 4.3).
[Nexus 4 General] absp2006:
OH YEAHH

BRO, HOW MANY HUGS DO YA WANT... 4, 5, Seven?
[Nexus 4 General] BLADESMAN1889:
You will often see in Guides or Instructions something like this

"now enter bootloader/fastboot mode"

but as previous poster said they aren't the same but usually custom Roms on Nexus devices have a long press power button function that allows to boot into bootloader which is where you will execute your fastboot commands from.

Sent from NEXUS⁴ via XDA Prem [AOKP//Nightlies]​
[Nexus 4 General] Guzanni:
Hi, I have gotten a worse reception since I flashed a new bootloader and radio. I think flashing the newest radio was the problem. I did a factory reset and flashed stock rooted 4.3, but still got a bad reception. Someone told me it is the best to flash stock occam image from Google. So I am doing it right now. I am in fastboot and doing it step by step. But I am stuck at this:

2) Unlock your bootloader (if you have not already done so): fastboot oem unlock

3) You will see a prompt on your device. This will wipe your entire device (including the /sdcard folder). Accept. Note: you use the volume keys to change the option and the power button to accept. You cannot use the touch screen.

My bootloader is already unlocked. So it won't wipe the entire device. Can I just skip this and go to step 4? Or do I have to wipe it trough fastboot first?
[Nexus 4 General] sordna:
You only need to unlock your bootloader once, so if it's already unlocked then skip this step.
[Nexus 4 General] Guzanni:
Ok, thanks. But then I will flash the images on my existing ROM without wiping anything? Is that the idea? I thought that I have to factory reset first.

You mean it is normal to skip unlocking bootloader and do not need to wipe anything and start flashing those images rightaway?
[Nexus 4 General] sordna:
If you want to do a factory reset, you can do it from the phone, you wouldn't normally lock/unlock to do that.

Yes, you would skip unlocking the bootloader, but whether you want to wipe or not is a different story. If you want to keep your data then don't flash userdata.img neither do factory reset. If you don't mind and what to start completely fresh, then do a factory reset, but you still don't need to lock/unlock the bootloader.

By the way, if the only problem you have is reception, you could potentially only flash the radio.img, or an older radio or a hybrid radio that many people are using. I don't think you need to go to the trouble to wipe and flash the entire phone.
[Nexus 4 General] Guzanni:
I understand what you are saying. Well, what I want to do, is a fresh start. If I don't care about wiping my phone, then it is correct to don't do a factory reset before but it is ok to skip to step 4 and factory reset automatically happens when I flash the userdata.img later, right?

The problem is, I tried flashing different radio's. I tried 48, 54, 84. When I was on RBJ, it was working fine. Because of the freezes, I updated my bootloader and radio (from 48 to 84) and flashed PA 3.99 and since then, my reception sucks (standing in a crowdy discotheque makes me have no reception at all, so even no phone calls..) Someone advised me to return to stock, that's why I'm here.

But I didn't try to flash any hybrid radio's yet, would that be helpful?
[Nexus 4 General] sordna:
I don't know much about radio issues, but given what you said, it's probably worth to flash stock and start fresh. Good luck!
[Nexus 4 General] cgorki:
damnit...

I installed the OTA update to 4.3 before removing SU & Busybox.

the second line "mount ..... " now gives me "operation not permitted" in the terminal

big fail? or is there a way? (bricked USB) :eek:
[Nexus 4 General] efrant:
What is it that you are trying to do?

Edit: I just re-read your post. If you are trying to get back to stock with no USB port, no root, and no custom recovery, unfortunately you are SOL.
[Nexus 4 General] cgorki:
thanks for reply, thnanks for your guide that worked (almost) for me :)

you might want to edit your second post to warn people doing the same mistake as me. (updating to 4.3 before removing SuperSU)
[Nexus 4 General] efrant:
Ok, I've added a note to NOT accept any OTA updates. (Every OTA update since the very first one on the Nexus One has always disabled root.)
[Nexus 4 General] remcoswienink:
15 minutes on writing 'system', what am I doing wrong??
[Nexus 4 General] IceKreem:
Do you have correct drivers and USB debugging enabled?
[Nexus 4 General] efrant:
Stop the process and start again with flashing system.img.

If he got to flashing the system image, then he has the correct drivers.

USB debugging does NOT need to be enabled. It's irrelevant for fastboot as USB debugging is an Android setting, not a fastboot setting.
[Nexus 4 General] IceKreem:
I know but I wanted to help but I didn't really have a clue so I just said some vague stuff hoping it could apply :confused::(
[Nexus 4 General] killerzcud:
Lot

Now that looks like a lot to do :cyclops: Noob Here :angel:
[Nexus 4 General] efrant:
While your willingness to help is commendable, throwing out random suggestions does more harm than good.

If you have no clue, then it would probably be most helpful to not respond to those particular questions. (For example, in this specific case, we don't want people believing that USB Debugging is even remotely related to flashing images, when it has nothing to do with it whatsoever.)
[Nexus 4 General] EuroAsia:
thanks for the information
[Nexus 4 General] ptrm2:
is it possible to flash these .imgs via a terminal emulator on my phone? So I do not have to connect it to my pc?
[Nexus 4 General] efrant:
Well, you can flash most of them in recovery.

There is a recovery flashable zip for the radio in the radio thread, a zip for the bootloader in the bootloader thread, and there is (I believe) a couple stock odexed ROMs in the dev section.

You certainly can flash the recovery, boot and bootloader images via a terminal emulator. The radio may be possible, but I would make sure you have airplane mode on before you do that. As for the system image, it won't be possible -- that's why you need one of the stock ROMs in a recovery-flashable format. (Instructions in the second post.)

Now, having said all of that, it's good to go through the procedure in the first post for learning purposes.
[Nexus 4 General] TheNerd:]:
Would I be able to flash the stock image with flashify?
[Nexus 4 General] Mnemoch:
Sorry if asked but searching on the mobile app sucks...

What is the reason that just running the flash-all script in the 4.3 image is not the recommended procedure to go back to stock?

Edit: found a post where you explain you prefer people understand the steps, which is cool, but it has me worried that flash-all isn't a valid method as not mentioned even as an option... Sorry

Do I need 4.2 for warranty? I would have thought ota would have taken it to 4.3 anyways so could consider that as stock... Sending my phone back on Monday so any advice would be welcome! Thanks in advance
[Nexus 4 General] ferrocene:
How can they void the warranty on a Dev phone? Is this a thing?
[Nexus 4 General] sordna:
Use your common sense to avoid silly questions :) Of course you don't need any particular version for warranty, as long as it's a stock image, with stock kernel/recovery, and locked bootloader. But as far as versions are concerned, any official version starting with the version you bought the phone and ending with the latest OTA, is good. Anything that a regular consumer like your grandma would do, like simply apply updates as they come, is OF COURSE fair game. It would be ridiculous if a vendor denied you warranty on the basis of you accepting the OTA that they themselves prompted you for.
[Nexus 4 General] Mnemoch:
Edit: I just keep digging a bigger hole, on reading again he does say choose which version you want to flash when doing the 'steps', it is only on the on-device option for a broken USB port that 4.2.2 is the version being flashed. Again sorry. Normally I read better than this, I promise!

Yeah yeah, I know, seemed silly to me but the OP was updated this month and still is on how to flash 4.2; didn't know if there was a particular reason. So I asked. Seems more silly now. Anyways, thanks...will try the flash_all and done, can always go back to the step by step if I need to.
[Nexus 4 General] shznmothmn:
custom recovery didn't not come out

Sorry, i am new here just wanna ask question regarding on rooting

i follow all the step in rooting the nexus and succeed but i just wondering why when in recovery mode, the android icon just pop out with message "no command"

what should i do?

Thanks
[Nexus 4 General] IceKreem:
Seems like you went into stock recovery, and you don't have a custom recovery? Make sure you download TWRP and put it in platform tools ( I assume you have SDK) and then in cmd fastboot flash recovery (filename)
[Nexus 4 General] stagius24:
Hi everyone,

I was using CM 10.2 with franco kernel.

I want to go back to original stock so I follow this guide (skip step 10). I couldnt get pass the X icon after the last step. I reboot into recovery mode but I didnt make it. It shows an android icon with a red X. I couldnt make it to recovery to restore to my custom rom that I backup earlier. I already wait over 10 min on the red X with no success.

Please advice me what to do?
[Nexus 4 General] efrant:
As has been mentioned many times, the Android with the red ! is the splash screen for the stock recovery. To access the menu from that screen, hold the power button and press volume up.
[Nexus 4 General] Clauu:
Hy, i'm trying to unroot, flashed bootloader okay but then at the radio part it get;s stucked with 'writing radio'.. advices please?
[Nexus 4 General] CatsAreGods:
Did you try powering off, removing and checking and replacing the SIM card?
[Nexus 4 General] maxdak:
I did. In the beginning, I thought it might be a hardware issue (including SIM card) but after examining the card and slot a few times I've put that possibility off to the side.

Based on the baseband showing up as unknown (within the OS when it boots; baseband version has always shown up on the bootloader display) and no visible issues with the physical elements of the device (and to the best of my knowledge the user reported no drops or physical trauma), I have proceeded with the assumption that this is a non-hardware issue.

Of course, if someone can correct that assumption please do!
[Nexus 4 General] FemBlack:
I am trying to update recovery TWRP from 2.5.0.0 to 2.6.3.0 ... its updating properly but after reboot when i go to recovery its says twrp version 2.5.0.0 ... can u guys help me to instally twrp version 2.6.3.0...

below is the command i used fastboot -c "lge.kcal=0|0|0|x" boot customrecovery.img

u can find my phone details in my signature....
[Nexus 4 General] spaceman860:
Its

fastboot flash recovery customrecovery.img

BLACKED OUT LTE N4
[Nexus 4 General] FemBlack:
its for 4.2 currently i m running android 4.3 In OP this has mentioned use fastboot -c "lge.kcal=0|0|0|x" boot customrecovery.img command for 4.3
[Nexus 4 General] spaceman860:
That command is for 4.3 if you only want to temporarily flash it. That's why when you reboot you end up with v2.5.0.0 again.

BLACKED OUT LTE N4
[Nexus 4 General] FemBlack:
thanks pal u solved my problem...
[Nexus 4 General] TheNerd:]:
device doesn't boot

device has been trying to boot for ten mintues. android recovery boots into dead android with read triangle. help!
[Nexus 4 General] OhDae-su:
Already tried that posted in OP?
[Nexus 4 General] TheNerd:]:
device doesn't boot

it tried to boot up for 6 hours. Volume up and power didn't boot into anything when I got the dead android
[Nexus 4 General] OhDae-su:
Press + hold power button and then press volume up (while holding power button). Then u see the menu of your recovery. From there you can wipe caches or doing a factory reset.
[Nexus 4 General] TheNerd:]:
it worked

Holy ****. Oh my gosh, finally managed to do this and oh my gosh. Had a softbricked nexus for two days. your amazing. thankyou
[Nexus 4 General] Kaherdin:
Restored my Nexus 4 to Stock Rom without usb

Just wanted to say thanx :cowboy: for helping me out with an issue I had;

My Nexus 4 was not recognized by Widows 7, for some reason. I tried every USB driver out there (Kush, Naked driver, LG, Samsung, you name it), and I tried to remove all drivers also, but still no luck.

​

My device wouldnt even conect using fastboot in bootloader.

So, I had to assume that my USB port was broken...

And by flashing these files I can now return my device for warranty service without being svared that I would get rejected because of some custom firmware I previously had on it (Here in Europe we acctually can have what ever we want on our devices but some service reps are a pain about it anyways). :silly:
[Nexus 4 General] chrismalla:
[MENTION=1566190]efrant[/MENTION], I was about to write you a PM when I suddenly spotted the red part in your signature. So I looked up this thread as it in some way or another is related to what I have to ask you about. Anyway, I saw this post of yours and wonder how you converted the one file bootloader-mako-makoz20i.img into the files listed below, which can be flashed through recovery. I would very much appreciate your help and explanation.

bootloader-flag.txt
bootloader.sbl2.img
bootloader.sbl3.img
bootloader.tz.img
bootloader.rpm.img
bootloader.aboot.img
bootloader-flag-clear.txt
[Nexus 4 General] efrant:
That's a very good question. I didn't actually split up the bootloader image file. (I suppose it would be possible, but I haven't looked into it, nor do I plan to.)

What was done for the file you linked to was: we had a device that already had the bootloader flashed onto it, and we just dumped the partitions individually using dd. Once you have the individual partitions, you just package them up the same was as I did.

The syntax for dd is like this for the N4:

dd if=/dev/block/platform/mm_sdcc.1/by-name/xxx of=/sdcard/xxx.img

Replace the xxx with the name of the partition. That will dump the partition to a file in /sdcard. Then just take those file and package them up in a flashable zip like I did. Have a look at the updater-script file in the zip to see the commands I used.
[Nexus 4 General] chrismalla:
Aaaha, ok thanks very much for your quick answer,...

...but how does one know what partitions are related to the bootloader. Well, I know because they are listed but how did you (or the first person) find out?

...but how did you end up with TWO .txt files when dumping ONE misc partition? And why are these two .txt files named as they are when the partition they come from i named "misc"? The other dumped .img files at least share the same name as their corresponding partition.
[Nexus 4 General] efrant:
The only partitions dumped were the 5: sbl2, sbl3, tz, rpm, and aboot. I found these by looking at an OTA update file that flashed a new bootloader. Those were the 5 images that were flashed to the device. The two .txt files are just to set a flag before and after flashing. They don't contain anything besides one byte to set a flag. I used the same script that Google used when they pushed out a bootloader update -- I took the script from an OTA update and deleted all the stuff not related to the bootloader.
[Nexus 4 General] chrismalla:
Why do you need to dump the partitions when you (presumably) can grab the 5 images and 2 .txt files from the OTA package then? I tried looking up the JWR66Y OTA package and stumbled upon it here: http://xdaforums.com/showthread.php?t=1971169

However, it's very small and doesn't contain any bootloader related images, nor does it contain any modem image either for that matter. There must be more packages other than the "main system" ones listed in the thread above, am I right?
[Nexus 4 General] efrant:
I think you are confusing a few things:

1) We needed to dump the 5 images because the OTA update file was NOT available - a user on irc had a device that had the new bootloader on his device and no one else had it. So, we dumped the images, and I packaged them up so that others could flash it if they wanted.

2) I knew which images because we already had an older bootloader update via OTA.

3) The JWR66Y update did not contain a bootloader update. JWR66V did, as well as JDQ39.
[Nexus 4 General] chrismalla:
Oooh yes of course JWR66Y didn't contain any bootloader files! Now everything has fallen into place! Thank you very much for your help and time! Best regards.
[Nexus 4 General] KhuongNguyen152:
I am having this problem when trying to flash the system.img - FAILED <remote: bogus Chunk size for Chunk type Raw>. Does anyone know how to fix it?
[Nexus 4 General] chrismalla:
Ok [MENTION=1566190]efrant[/MENTION], I came back to ask you this, because I'm curious. You said that the .txt files were flashed to set a flag before and after the bootloader flash. Why is that? Is it really necessary to flash those two files to the misc partition? If so, why? Is the misc partition used for stuff other than bootloader flashing? What's the purpose of the misc partition?
[Nexus 4 General] maverickronny:
[MENTION=1566190]efrant[/MENTION] , Hey , I wish to flash 4.4 fresh on my phone when it comes ( not ota on 4.3). So this process remains exactly same, only i flash 4.4 images, am I right?

Another question, You have written in ur post about flashing radio, now I have seen peope flashing various radio files, are they flashing mods or google itself is giving multiple radios? :confused:. if so then which radio to flash
[Nexus 4 General] C4SCA:
The process is always the same on nexus devices.

Tgere is multiple radios files, one for each version of android and then modded ones to get 4G working.

Anyway, when flashing stock,flash the radio file that comes with the version u downloaded, so that u sure everything will work (wifi, H+, data ...)

sent from my NEXUS 4 tasting a revamped cooking recipe of Jellybeans (stock 4.3).
[Nexus 4 General] efrant:
I don't really know why you need to set the flag before and after flashing the bootloader. That is the way Google does it in their OTA updates, so that is what I did as well. I didn't really feel like messing around with it given that you can brick a device with a bad bootloader flash.
[Nexus 4 General] undercover:
What flag is it mate?

Sent from N4 ? now Free
[Nexus 4 General] efrant:
I have no idea. As I mentioned, I just took the script from an OTA update from Google that contained a bootloader update, and I used that to create a recovery-flashable bootloader. In that script, it contains the following lines to flash the bootloader (which I didn't modify):

package_extract_file("bootloader-flag.txt", "/dev/block/platform/msm_sdcc.1/by-name/misc");
package_extract_file("bootloader.sbl2.img", "/dev/block/platform/msm_sdcc.1/by-name/sbl2");
package_extract_file("bootloader.sbl3.img", "/dev/block/platform/msm_sdcc.1/by-name/sbl3");
package_extract_file("bootloader.tz.img", "/dev/block/platform/msm_sdcc.1/by-name/tz");
package_extract_file("bootloader.rpm.img", "/dev/block/platform/msm_sdcc.1/by-name/rpm");
package_extract_file("bootloader.aboot.img", "/dev/block/platform/msm_sdcc.1/by-name/aboot");
package_extract_file("bootloader-flag-clear.txt", "/dev/block/platform/msm_sdcc.1/by-name/misc");
[Nexus 4 General] manudevil:
I have a question.

I have rooted my Nexus and changed the kernel. I guess OTA updates won't work. Am I right ?
[Nexus 4 General] Rycon33:
Ota needs stock kernel(and recovery) for it to work.

And lol, I did an accidental thanks:D

Tapatalked from my N4
[Nexus 4 General] clozecall:
Isn't working for me, downloaded everything fine but during each step to put a command in command prompt I get this at every step:

failed: (remote: flash write failure)

Anyone know why or how to fix this?
[Nexus 4 General] khanh1289:
Ok, is there anyway to get back to stock without plugging the phone into the computer? My microusb port is broken and I need to return it to google for RMA. I want it back to stock but like I say.. I can't do it through fastboot.

Thanks in advance
[Nexus 4 General] 3rdstring:
Check the 2nd post
[Nexus 4 General] Shftup:
Hey guys, need your help.

I accidentally flashed a 4.3 kernal on AOKP 4.2 - whoops!

So, now when I try to boot my nexus 4, all I get is the google sign with unlocked symbol for about 4-7 seconds, then nothing.

I cant get to fastboot, or TWRP recovery.

What should I do to get a working phone (without loosing SD card stuff, etc)

Thanks in advance - sorry for the noob questions.
[Nexus 4 General] efrant:
With the phone off, what happens when you hold volume down and press and hold power?
[Nexus 4 General] Shftup:
Well - sometimes it shows me the google logo with unlock symbol, other times nothing. If I get the logo, only shows for 4-7 seconds then nothing.

The phone does get warm like it on and doing something.