yashsingh1/xdaforums huggingface dataset:
[Nexus 4 General] surferdude73:
So I'm following the guide to root my N4. This is not the first phone I've rooted, it's probably 4th or 5th.

Anyway, when I reboot into recovery and attempt to apply update from .zip, it does not show me CWM-SuperSU-v0.98.zip.

It is in Nexus 4 > Internal Storage, but I must be missing something.

EDIT, disregard. Saw it didn't matter, put it in Data, and just navigated to it. Didn't have /sdcard or data/media/0
[Nexus 4 General] techfed:
Thanks for your help

thanks for this guide i successfully done it.
[Nexus 4 General] sdixit3:
Need link to factory occam image (*.tgz)

@efrant, Could you provide a link to download the original occam factory image (*.tgz). It seems this is not available on Google developers site.

thanks
[Nexus 4 General] thephantom:
Page 1 under Notes C3 has a link to a site hosted by oldblue
[Nexus 4 General] Caniv:
i dont get it, in this page: \

https://developers.google.com/android/nexus/images

there is no NEXUS 4

so what do i download?

i tied going here:

http://www.randomphantasmagoria.com/firmware/

like the site said and ended up here:

http://www.randomphantasmagoria.com/firmware/nexus-4/occam/

so here do i get the last one? its kinda worrysome since it says

FROM JOP40C to JOP40D... so doesnt that mean its like an "update" and i cant use it for this?
[Nexus 4 General] 3rdstring:
You need to download the image (fastboot) not the update.
[Nexus 4 General] c1umsyb3ar:
Thanks for the guide! Had fun rooting my phone today (finally, after 3 weeks)
[Nexus 4 General] quickdry21:
Just rooting

I'm pretty comfortable with the process of unlocking/rooting/flashing, but I've got a question.

I successfully unlocked and rooted my new Nexus 4, but I skipped most of the steps. To unlock I basically did C7 to D4 and then I followed the rooting section, which means I didn't wipe the cache/any of that fun stuff. Are there any additional recommended steps to unlocking the bootloader aside from the fastboot oem unlock, or is at as simple as that? I realize that most of the other steps had to do with flashing the stock rom, but what about flashing the radio? Was that just for returning to stock?
[Nexus 4 General] puncha1580:
[MENTION=5973336]Pichananas[/MENTION], I sincerely hope the unbrick thread will help you. Just a word of caution again, please read through the entire thing and follow the steps, exactly as outlined....
[Nexus 4 General] Pichananas:
The links to download the tools in the method you linked are still dead.

I didn't forgot to give a feedback ;)

Hope to come back with good news soon.
[Nexus 4 General] lobata:
Hi,

my Nexus 4 has been stuck in a boot loop for a while now. I found it turned off (didn't have any problems before) and (since I knew it couldn't be a flat battery) wanted to turn it back on but it get's stuck on the X screen every time.

The phone wasn't rooted, I don't have developer options or USB debugging enabled and it's running on 4.4.4. I'm using a mac.

After posting in a different thread I gave up on trying to save my photos and tried a factory reset/wipe data from the bootloader menu first which didn't change anything.

So I followed this guide to flash the stock ROM and while I don't get any error messages I still get stuck on the X screen. I wiped data and cache but still the same, even after letting it try to boot for over an hour.

I have done this multiple times by now, the only thing I noticed is that when I try to run flash-all.sh I get this

The file names are right and I can flash them manually without any problem.

I would be very grateful for any help.
[Nexus 4 General] Natakranta:
It looks like flash command is not working. Did you unlock bootloader successfully? When you turn on your phone and Google appears, is there unlocked lock icon at the bottom of the screen? If it's there it means bootloader is unlocked.

You wrote manual fastboot flash is working. What exact command do you type and what messages do you receive?

Type: fastboot devices when you are in bootloader. What message is outputted? Does it display your phone serial number? If not it means drivers on your computer are not working.
[Nexus 4 General] lobata:
Hi, the bootloader is unlocked, I get the unlocked lock item and the fastboot mode says "lock state - unlocked" at the bottom.

Since I'm using a mac, I use ./fastboot-mac flash bootloader bootloader-mako-makoz30d.img.

(But using only ./fastboot works just the same.)

I put everything I get if I do whole thing under a spoiler.

Rhaegar-3:~ ricarda-wolf$ cd /Users/ricarda-wolf/Documents/android

Rhaegar-3:android ricarda-wolf$ ./fastboot-mac flash bootloader bootloader-mako-makoz30d.img

sending 'bootloader' (2203 KB)...

OKAY [ 0.120s]

writing 'bootloader'...

OKAY [ 0.300s]

finished. total time: 0.421s

Rhaegar-3:android ricarda-wolf$ ./fastboot-mac reboot-bootloader

rebooting into bootloader...

OKAY [ 0.001s]

finished. total time: 0.001s

Rhaegar-3:android ricarda-wolf$ ./fastboot-mac flash radio radio-mako-m9615a-cefwmazm-2.0.1701.03.img

sending 'radio' (45537 KB)...

OKAY [ 1.945s]

writing 'radio'...

OKAY [ 2.442s]

finished. total time: 4.387s

Rhaegar-3:android ricarda-wolf$ ./fastboot-mac reboot-bootloader

rebooting into bootloader...

OKAY [ 0.001s]

finished. total time: 0.001s

Rhaegar-3:android ricarda-wolf$ ./fastboot-mac flash system system.img

erasing 'system'...

OKAY [ 0.843s]

sending 'system' (731040 KB)...

OKAY [ 26.520s]

writing 'system'...

OKAY [ 44.476s]

finished. total time: 71.895s

Rhaegar-3:android ricarda-wolf$ ./fastboot-mac flash userdata userdata.img

erasing 'userdata'...

OKAY [ 0.932s]

sending 'userdata' (98413 KB)...

OKAY [ 3.870s]

writing 'userdata'...

OKAY [ 5.620s]

finished. total time: 10.422s

Rhaegar-3:android ricarda-wolf$ ./fastboot-mac flash boot boot.img

sending 'boot' (6366 KB)...

OKAY [ 0.362s]

writing 'boot'...

OKAY [ 0.371s]

finished. total time: 0.734s

Rhaegar-3:android ricarda-wolf$ ./fastboot-mac flash recovery recovery.img

sending 'recovery' (6916 KB)...

OKAY [ 0.376s]

writing 'recovery'...

OKAY [ 0.403s]

finished. total time: 0.779s

Rhaegar-3:android ricarda-wolf$ ./fastboot-mac format cache

erasing 'cache'...

OKAY [ 0.049s]

formatting 'cache' partition...

Creating filesystem with parameters:

Size: 587202560

Block size: 4096

Blocks per group: 32768

Inodes per group: 7168

Inode size: 256

Journal blocks: 2240

Label:

Blocks: 143360

Block groups: 5

Reserved block group size: 39

Created filesystem with 11/35840 inodes and 4616/143360 blocks

sending 'cache' (10984 KB)...

writing 'cache'...

OKAY [ 1.332s]

finished. total time: 1.382s

Rhaegar-3:android ricarda-wolf$ ./fastboot-mac reboot

rebooting...

finished. total time: 0.001s

If I type in ./fastboot-mac devices I get a serial number and fastboot behind that.
[Nexus 4 General] Natakranta:
All looks good in the commands and outputs. I don't see any error. Is it looping on the X sign?

Try again doing factory reset in recovery. Let it boot for 10 minutes, this should be enough.

Did you check MD5 check sum of the factory image?

Redownload another copy of it and check check sums with those provided by Google on developers page.

You are doing it right, it should work.
[Nexus 4 General] lobata:
It still is, I just tried it again, flashed everything again, let it loop for 20mins, did the factory reset, let it loop for 20 mins and still the same.

I just checked the MD5 check sum, they match. (Didn't download it again, is that important? I'm only on limited data since I'm traveling.)

Nice to know that I'm doing it right at least...
[Nexus 4 General] Natakranta:
Download latest CWM or TWRP. Flash it with fastboot, check if you can boot into it from bootloader menu. If so, download custom ROM on your Mac and push it to phone SD card, there should be such option when you are in recovery. Then flash it in recovery and see if it boots. If it boots then something's wrong with your factory image.

It's worth to give it a try.
[Nexus 4 General] lobata:
I can flash Twrp, but if I then turn off the phone and try to access it by holding vol- & power I go back to the stock recovery.

I flash it using ./fastboot-mac flash recovery twrp.img and then select recovery mode. The phone restarts into twrp but if I turn it off I can't access it again. Am I doing something wrong?

To push a custom ROM on my phone I would have to use "./adb-mac push /customrom.zip/ /sdcard/" right? I just tried to see if adb is working, but if I type in ./adb-mac devices I get nothing after list of devices attached, but the same with fastboot still shows up the serial number.

I tried ./adb-mac reboot bootloader and only got "error: device not found" (the fastboot is still working).
[Nexus 4 General] Natakranta:
adb works only when device is booted to android or when device is booted to recovery. When it is booted to bootloader (sometimes called fastboot mode) only fastboot commands work from terminal. You can't have both adb and fastboot working at the same time because they are meant for different states.

So if you want to push file to device SD card using adb the device needs to be booted either to android (system) or to recovery.

No idea why custom recovery doesn't stay after you fastboot flash it.

In bootloader do:

fastboot flash recovery twrp.img

Still being in bootloader use volume up and down keys to chose recovery and press power button to confirm. Does it boot to TWRP? If so now use adb to push custom ROM zip file to phone's SD card. I'm not sure but maybe you need to chose this option in TWRP first. Go through TWRP options. Does it work?

If so, chose wipe, advanced and tick cache, system, data and dalvik, slide to wipe. Flash ROM. Chose reboot system from TWRP options.

Let's hope it boots. Let me know.

Whatever happens, when you go later to bootloader and with volume keys chose recovery, will it boot to TWRP?

All the above you can try as well with this in bootloader:

fastboot boot twrp.img

This command only boots the phone into custom recovery without physically flashing it to SD card recovery partition (that's why it's only three words inserted of four when you use flash command and must specify location of flash like recovery).

It's useful if you have access to computer with fastboot and just went to flash zip file without losing stock recovery.
[Nexus 4 General] lobata:
I figured out what was the Problem with TWRP, it was just me being a noob and confusing bootloader and recovery...

I'm looking for a nice ROM at the moment (might as well do it properly in case it works).

But just to see if adb was working I pushed the SuperSU zip file on it and twrp root the phone. I wasn't watching the phone but when I looked again it was on a screen saying "Updating Android now" und under that "Starting system apps" but even after an hour on that screen nothing happend so I restarted it again and got back to being stuck on the X.

Custom ROM doesn't help.

I downloaded the latest AOPK one from their website, checked the md5 number, pushed it onto the phone, wiped data, system, cache and dalvik and flashed the ROM. The phone said it was successful so I choose reboot system but do now get stuck on the AOPK bootup screen with the led on the bottom of the phone glowing green (it's been over an hour).

One thing I noticed is that Android File Transfer keeps saying "Could not connect to device. Try restarting or reconnecting your device." If I close the popup it comes back after a few minutes.
[Nexus 4 General] Natakranta:
So TWRP stays after you flash it? It doesn't disappear?

Try latest stable SlimKat 7.0 from here

http://www.slimroms.net/index.php/d...13327-slim-mako-4-4-4-build-7-0-official-5936

with Slim gapps from here:

http://slimroms.net/index.php/downloads/dlsearch/viewcategory/1251-addons/downloads/dlsearch

Mini, normal or full package 199 (is the latest one)

No idea why stock nor custom ROM is not booting on your mako.

If you have access try fastboot flashing factory images on windows PC. Use different USB cable, preferably the original one which came with the phone. Different USB port on computer. Update fastboot files to latest version.

Once there was a guy who couldn't boot KitKat factory images but all was good for him when he was flashing older factory images like 4.3 or 4.2.2. Maybe try with jelly bean factory images.

If you can boot to bootloader and have working fastboot resurrecting the phone should be a matter of 15 minutes.

Usually system boot loops (the X sign, or custom ROM logo) are solved by wiping cache or factory reset in stock recovery. Try it again after you you flash full factory images.
[Nexus 4 General] Cepillao:
Can't get past the "X"

Hello and thank you for this guide, it has been really helpful since this was my first time flashing the N4.

I went through all the steps mentioned in the guide to flash my N4 (from 4.4.4 to 4.4.3) Everything went well that time, except for the fact that the new image didn't solve the problem I was trying to fix (No signal since I upgraded via OTA to 4.4.4, a common issue).

So.. I decided to go back to 4.2 and followed the steps once more, everything went well until I got to the "X", where my device is stuck right now. I've read a bunch of posts but unfortunately I can't manage to get past this, I know there are some instructions in case this happens, however I tried everything and it keeps rebooting straight to a screen where it says "Google" and shows the "unlocked" symbol, then the screen gets to the "X" and stays there.

I'm afraid that my N4 could be bricked, BIG problem since I live in Venezuela and someone bought this cellphone for me in the US, so I lost my warranty and with the economy here, buying a new device is almost unthinkable.

I would really appreciate if someone could help me with this, maybe is something stupid but I just haven't figured it out.

P.S. Sorry for my english and thanks in advance.
[Nexus 4 General] Natakranta:
!Hola [MENTION=6016071]Cepillao[/MENTION]! Vamos a probar :)

Were you flashing 4.2.2 factory images manually one by one or did you use flashall.bat file from the factory images zip?

Did you flash anything else on to of factory images, like custom recovery?

Can you go to bootloader (press and hold both: power and volume down if I recall correctly for N4, I sold mine almost a year ago).

When you are in bootloader use volume keys to chose recovery and press power button to confirm. You should see android on his back with exclamation mark over him. That's stock recovery. Then there was a combination of hardware keys to press to display stock recovery options. Try power key with one of the volume's keys (Google it, I don't remember, I haven't seen stock recovery for 10 months, I replace it immediately with TWRP or CWM). From the list of options chose factory reset and confirm with power key.

Reboot and pray;)

Let me know if it helped.
[Nexus 4 General] CHangyuuW:
Excellent work. Thanks!
[Nexus 4 General] Cepillao:
Thanks! It worked.

Thank you very much my friend! I managed to get into the recovery menu and now it's all good.

I'm still facing the radio issue tho, it seems like there's not a definite solution at the moment.
[Nexus 4 General] Natakranta:
Good to hear your phone is not boot looping any more. I guess a factory reset in stock recovery sorted that out.

And about the mobile signal, did you try flashing different, older radios? There should be a thread with N4 recovery flashable radio zips or you can extract radio.img files from factory images and fastboot flash them in bootloader mode.
[Nexus 4 General] damngood98:
has anyone had issues unlocking the bootloader?

specifically, after unlocking it and rebooting into bootloader mode it returns to a locked state...phone is currently unrooted but stuck in a bootloop. would just like to restore stock on it and start with a fresh device but without unlocking i'm kinda stuck :confused:
[Nexus 4 General] Natakranta:
If your N4 is rooted, use Flashify to flash stock recovery image. Then reboot to bootloader. Do fastboot oem unlock but instead of rebooting bootloader, boot to system (option Start from bootloader options IIRC). Let it boot to android. Then give it a minute and reboot the phone. Check if the unlocked bootloader open lock icon appears at the bottom of the screen.

Edit

I've just noticed you have a boot loop as well.

That's bad. You can't boot android to use Flashify to flash stock recovery. You can't fastboot flash stock recovery in bootloader because bootloader is locked.

Vicious circle.

Are you sure bootloader is locked?

Maybe after performing fastboot oem unlock don't reboot bootloader but try if fastboot flash recovery recovery.img works.

I keep on writing about stock recovery because at least in N5 after performing fastboot oem unlock you need to reboot system. Phone is doing something in stock recovery and then booting android. If there's no stock recovery but custom recovery, phone cannot perform its script designed for stock recovery and then boot loops.

I remember one work around. If you can't fastboot flash recovery stockrecovery.img because of locked bootloader, try just booting stock recovery from your PC. Use cmd: fastboot boot stockrecovery.img

I'm not sure if fastboot boot command works with locked bootloader, I don't have fastboot at office PC. From logical point of view it shouldn't work due to security reasons.

---------- Post added at 02:27 PM ---------- Previous post was at 01:59 PM ----------

I took a look at OP and it doesn't state that system reboot is required after unlock bootloader. I just wander if it's due to the fact that OP was written for Jelly Bean and this system reboot came with KitKat. Or is it a N5 vs N4 difference.

Anyway, I'm assuming you have custom recovery there. Go there from bootloader and do wipe cache. Reboot system and check if it still loops. If it still loops go back to bootloader than to custom recovery and do factory reset. Good bye to your data :( maybe it will boot system now. If it still loops side load any custom ROM and flash it in custom recovery.

Wipe caches, do factory reset and so on. Maybe it will boot.

As the last thing you can side load stock recovery zip and flash it in custom recovery. Then reboot to bootloader and perform fastboot oem unlock. Reboot to system.

If it doesn't work then it's bad. You have stock recovery and can't flash anything in it (or are there stock tar or whatever files you can?)
[Nexus 4 General] bringonblink:
Hi im trying to dl your odex rom, but when i click on the goo link, it takes me to the site and nothin happens?!

Do you happen to have a mirror?
[Nexus 4 General] elhabibi:
16 GB Nexus 4 shows 5.67GB

Hi,

I tried everything you said followed all the steps, did factory reset, did wipe cache, flashed factory image. But nothing seems to work and my nexus keeps on displaying 5.67GB even after being a 16GB device. May you please help.. ?
[Nexus 4 General] efrant:
So you flashed the stock recovery, booted into the stock recovery, performed a wipe of data from the factory recovery and it's still showing as an 8GB device?
[Nexus 4 General] Natakranta:
Wow! When I finally gave up on this thread professor himself if back :)

All the best to you [MENTION=1566190]efrant[/MENTION]!

The Answer to The Ultimate Question of Life, the Universe, and Everything is: CLEAN FLASH.
[Nexus 4 General] efrant:
:) Yes, I was away for a while, but I'm back now!
[Nexus 4 General] Natakranta:
Good to see you :)

I was doing my best here but it's a tough slice of breed to bite sometimes. The fact that I don't own N4 for a year now doesn't help. But nexus is still a nexus.

The Answer to The Ultimate Question of Life, the Universe, and Everything is: CLEAN FLASH.
[Nexus 4 General] cornpollen:
My problem is i can't find the stock ROM for moto x 2014 verizon. This really sucks because my phone is bricked.
[Nexus 4 General] atulclassic:
wrong thread mate..this is for Nexus 4

---------- Post added at 01:17 PM ---------- Previous post was at 01:16 PM ----------

have you tried this

http://xdaforums.com/nexus-4/general/how-to-fix-internal-storage-16gb-8gb-t2033692

it always helped for me
[Nexus 4 General] Shift2win:
So I flashed back to stock, and everything went well except now I have no data. How can I fix this?

Update: Nevermind, for anyone this happens to in the future, check to make sure the APN name is correct.
[Nexus 4 General] jaberial:
nexus 4 is soft bricked !

Hi , my nexus 4 is soft bricked !

I tried to flash it many times but there is not results

in (Nexus Root Toolkit and Nexus Toolkit) same thing failed !!

the message in cmd

archive does not contain root.sig

archive does not contain recovery.sig

i even tried SDK and N-CRY programs but no results !

please help me

​
[Nexus 4 General] efrant:
Did you follow the instructions in the first post of this thread?
[Nexus 4 General] WiseManWhite:
Much Thanks!

Your guide saved me! Thanks again for putting this together. I just had to donate.
[Nexus 4 General] zh cohen:
cannot load 'system.img': not enough space

First of all thanks for the wonderful guide. I've been reading on and off for several years but until i found this page i never felt like i had things clear enough to take the plunge...

I just bought a Nexus 4 from ebay, and when i turned it on it did not have the regular stock android. Basically it was normal looking Android 4.2 build, with a few extra apps: DUT_Activity, Hidden Menu, and LocMgrFT 1.4.

Under about phone:

Kernel Version:

3.4.0-perf-g2c26718-00003-g469a130

taeju.park@fanta #3

Tue Aug 6 09:38:09 KST 2013

Build Number:

full_mako-userdebug 4.2 LGEP19 b7db016445

test-keys

I followed the steps in this thread, but when i got to flashing the system.img, i got an error.

I saw that someone up thread had a similar issue, but i couldn't figure out how he fixed it..

If anyone has any suggestions for me, i would be very grateful.

Thanks again
[Nexus 4 General] the incredible:
my nexus has stopped in google logo..

before of this it had installed last purity rom...today i had some crashes on search google app...so i did wike and others.

Now i have the recovery twp with message no os installed...

already i have downlod a file of a new rom..but i do not acces to sd for copy the file....how do i do?
[Nexus 4 General] Natakranta:
Boot to TWRP, connect phone to PC with USB cable. On computer, do you see phone's SD card? If so can you copy new ROM .zip and gapps zip to the phone? You may be able to copy only to /TWRP folder.

If not, go through TWRP options and find "enable MTP". Enable, try, disconnect, connect, try.

If your PC still does not see your phone as MTP, use adb push command on windows cmd window to copy ROM and gapps from PC to the phone.

Edit

Don't you have nandroid backup to restore?

Don't you have any ROM zip left on your phone which you could flash in recovery?

You should always have at least one nandroid and one ROM zip you know is good and boots.

The Answer to The Ultimate Question of Life, the Universe, and Everything is: CLEAN FLASH.
[Nexus 4 General] zh cohen:
I figured it out.

I started over again at a different computer, and with an earlier version of android. I'm not sure what did the trick, but this time it went smoother than i thought possible...

Thanks again OP, i couldn't have done this without you, and I'm looking forward to continuing to learn.
[Nexus 4 General] sunilkamboj:
Nexus 4 completely wiped up...

Hi i have completely wiped up my google nexus 4,,,,, my phone is showing only google on startup........ The customer care is not helping me kindly help me out....
[Nexus 4 General] efrant:
Follow the steps in the first post...
[Nexus 4 General] kelvin99:
Is this still working for flashing the 5.0 factory image?
[Nexus 4 General] steviemch:
Yes, the commands are still the same.

Sent by Borg neural subspace transceiver node.
[Nexus 4 General] hamedunix:
How about the "cache.img" file? It is included in 5.0 factory image.
[Nexus 4 General] MinDokan:
This is still valid.

On my N4 took a long time to update. The spinning logo was in display for a while. Don't panic.
[Nexus 4 General] silvagroup:
Yeah there's cache.img in there as well.
[Nexus 4 General] Dylan. Veldhuis:
I have twrp and root, do I need to flash the stock recovery image?