aleix's blog

How to fix your wife's Nexus 5

1 May 2015 8:32 pm (android)

DISCLAIMER: I'm not responsible for what happens to your phone if you decide to proceed with the instructions below.

Are you experiencing:

  • Boot loop with Lollipop (Android 5.x).

  • Have downgraded to Kitkat (Andorid 4.x) and there's no service, camera crashes, google play store crashes, google earth tells you it needs SD internal storage and crashes.

At this point the phone seems practically unusable except wifi and only with Kitkat, Lollipop doesn't even boot.

It might be that the /persist partition is corrupted. So, don't despair, here's how I fixed it after looking around a bit:

  • Download adb and fastboot. On Ubuntu this is:

    $ sudo apt-get install android-tools-adb android-tools-fastboot
    
  • Power off your phone.

  • Connect your phone to your computer through USB.

  • Boot into the bootloader by pressing volume down and power buttons at the same time.

  • Unlock it:

    $ fastboot oem unlock
    
  • On the phone you must select the option to wipe everything. WARNING: This will wipe all contents on the device.

  • Download TWRP (an improved recovery mode).

  • Flash it:

    $ fastboot flash recovery openrecovery-twrp-2.8.5.2-hammerhead.img
    
  • Reboot again into the bootloader.

  • Once in the bootloader, choose the Recovery mode. It will then start TWRP.

  • On your computer you now type:

    $ adb shell
    

    If everything went well this should give you a root prompt.

  • Fix /persist partition.

    # e2fsck -y /dev/block/platform/msm_sdcc.1/by-name/persist
    
  • Re-create /persist file system.

    # make_ext4fs /dev/block/platform/msm_sdcc.1/by-name/persist
    
  • Exit the adb shell.

  • Download the latest Nexus 5 factory image and untar it.

  • Finally,inside the untared directory run:

    $ ./flash-all.sh
    
  • Your phone should be fixed!

  • As a last step you might want to lock it again. So, go into the booatloader again and this time run:

    $ fastboot oem lock
    

Good luck!

These are the couple of websites I used. Thank you to the guys who wrote it!

http://www.droid-life.com/2013/11/04/how-to-root-the-nexus-5/
http://forum.xda-developers.com/google-nexus-5/general/guide-to-fix-persist-partition-t2821576

10 responses

  1. Leandro says:

    What do you need root access for?

  2. Bernardo says:

    To install/flash custom recovery.

  3. Auditman says:

    Thx man!!!! worked!!!

  4. Noah says:

    Nexus 5 is bootlooping.

    Tried to go through your guide, and at the e2fsck command, this is what is returned:

    [CODE]root@hammerhead:/ # e2fsck /dev/block/platform/msm_sdcc.1/by-name/persist
    e2fsck 1.41.14 (22-Dec-2010)
    e2fsck: Attempt to read block from filesystem resulted in short read while tryin
    g to open /dev/block/platform/msm_sdcc.1/by-name/persist
    Could this be a zero-length partition?
    8|root@hammerhead:/ #[/CODE]

    My dad, who knows a lot more about Linux, thinks the flash on my phone needs to be reformatted...

    Is there something else I should try?

    Thanks.

  5. James says:

    You are a legend,

    My phone was stuck in that crappy logo hang on boot and your instructions solved my problem.

    Thank you

  6. Essay Writing Help says:

    Unfortunately, some people have institute that the Nexus 5 can’t forever be trusted to let them know when someone is profession or texting them.

  7. C# programming homework help says:

    Fantastic post I like it. Keep it up.

  8. Thesis help says:

    Hi buddy, your blog' s design is simple and clean and i like it. Your blog posts about Online writing Help are superb. Please keep them coming. Greets!

  9. Jenn Thorson says:

    Hello! this is very nice article about it! its very interested, but before please check google very awesome blog!

  10. Essayshark.com coupon says:

    Thank you so much, this is exactly what I was looking for. You really helped me out with this post. Thanks a lot again.

Leave a Reply