[Guide]Safely root the nexus 5 and keep warranty

Status
Not open for further replies.
Search This thread
Jan 1, 1970
1
240
I did this with my nexus 5 and I thought It should be useful and handy as well as useful to keep warranty.
I want to thank all the great devs who have made all this things down here and made our devices more useful
+Chainfire​
Osmosis
And the ppl on XDA

THIS IS THE SAFEST AND THE MOST USEFUL WAY OF ROOTING AND UNLOCKING BOOTLOADERS AND STILL KEEPING WARRANTY

FIRST OF ALL FEW THINGS ABOUT NEXUS 5 WE MAY OR MAY NOT KNOW

1:- THERE IS A NEW IMPLEMENTATION LIKE WHAT SAMSUNG DID FROM NOTE 2, S3 AND SOME DEVICES AFTER THAT LIKE THE EFS PARTITION AND FLASH COUNTER THEORIES (THE REASON WHY I HATE SAMSUNG'S PLASTIC ****)

2:- IN NEXUS 5 WE DONT HAVE A SEPERATE PARTITION FOR EFS BUT THE THING IS PUT IN BY GOOGLE. IT CAN ACCIDENTALLY WIPE WHILE FLASHING CUSTOM ROMS, FACTORY IMAGES OR ANY OTHER THING AND MAY RENDER YOUR DEVICE USELESS LEAVING YOU WITH A DEVICE WITH UNKNOW IMEI AND SERIAL NUMBER ( THERE IS ONE CASE OF THIS THING HAPPENING TO A USER ON XDA)


3:- THE BOOTLOADER HAS A HASTAMPER FLAG WHICH WHEN REBOOTING TO BOOTLOADER AND CONNECTED TO THE PC AND RUNNING A COMMAND IN COMMAND PROMPT IN WINDOWS AND TERMINAL IN LINUX AND MAC ( I HATE APPLE)
AND TYPING IN THE COMMAND fastboot oem device-info
Displays this three things:-
Device tamper: [true/false]
Boot loader unlock : [true/false]
Secure boot:[enabled/disabled]

Now we all know the ppl at the manufacturing company [Samsung for gnex/ lg for nexus 4]
Use to see our bootloader status for warranty

Now things and technology have changed and so is the security and policies of companies

So if the device tamper shows true then be aware that the warranty is void of our very own latest Google flagship phone

THINGS THAT WE NEED FOR ROOTING AND BACKING UP RECOVERY, EFS AND CHANGING THE DECIVE TAMPER FLAG TO FALSE

1:adb and fastboot tools for Linux/windows/MAC search it on google to how to setup Adb and fastboot for your respective OS

Also enable development settings by tapping build number in 7 times and enable USB debugging in development settings and don't consider yourself a developer after doing so, it need much more to be a developer in Android

2:-cf-auto-root from
http://xdaforums.com/showthread.php?t=2507211

you will get all the info that the cf-auto-root will wipe all your data and unlock your bootloader, so make a backup of all your data and all those things that you want

Now we have a rooted devices
Now download http://downloads.codefi.re/autoprime/LG/Nexus_5/Nexus_5_Backup_EFS.zip and copy it to the sdcard

2:- now we need to relock the bootloader

This step needs two things

A custom recovery either twrp or Clockworkmod I prefer Twrp over cwm (Twrp is user friendly but when it comes to flashing my favorite ROM Catacalysm, I prefer Cwm )

Download this
http://xdaforums.com/showthread.php?t=2239421 and move it to the internal storage


Done with the recovery. Now copy the recovery in platform-tool in Android-Sdk in window. Or if u are in Linux then copy it to the Home directory not on desktop.

Now open Terminal
And type
sudo apt-get install adb
sudo apt-get install fastboot

This will install adb and fastboot

Now navigate to the folder in which you have saved the recovery
By cd ~/Home

In windows copy the recovery.img to platform tools that is better rather than CD ing
And hold shift and right click and select open command prompt here

Now u are ready for the commands to put in

There are no different commands for windows and Linux but Mac have commands like ./fastboot

So now connect the device The. Computer and start the commands to put in
1st command
adb devices

Accept what pops up on your device

2nd command

adb reboot-bootloader (Linux)

adb reboot bootloader (windows)

./adb reboot-bootloader (Mac)

Now you may know what the command does it will reboot to bootloader

3rd Command

fastboot devices

The serial number show up with device online status

4th command

fastboot oem device-info the one I mentioned previously It above
It will display the device tamper and bootloader info

5th command

Ensure that you have the recovery.img in platform-tools and your command prompt is opened in platform-tools/ you have navigated to the directory in which the recovery is placed

Now type the following command

fastboot boot recovery.img

(Ensure that the downloaded recovery is renamed to recovery.img | if while renaming in windows it may come out like recovery.img.img so just remove the one .IMG )

This won't replace the stock recovery partition

But

Your device will boot into Twrp
Or Cwm only

Here make a system backup Advanced backup will have an option for efs backup just tick all of others except the efs and backup. It will be saved to sdcard and move it to ur PC This will be helpful while Ota updates. If u want you can backup efs also. You can follow this step to recover everything at the time of OTA

4)
Now when u are in the recovery just flash the cwmnexusbooloaderunlock.zip

And Nexus_5_Efs_backup.zip one after the another.

BY THIS PROCESS YOU WILL RELOCK THE BOOTLOADER AND CHANGE THE HASTAMPER TO FALSE. YOU CAN CHECK THAT AGAIN BY THE 4TH COMMAND MENTIONED ABOVE. You will also have a folder in the sdcard with efs1,efs2 and efsflashable.zip named efs_backup transfer / copy this to PC AND FLASH THIS WHENEVER U LOSE THE SERIAL NUMBER AND IMEI

WITH THIS YOU HAVE A ROOTED DEVICE WITH A BOOTLOADER LOCKED AND WARRANTY INTACT

Now download 3 apps from play store

Flashify

Bootunlocker


Use flashify to backup current recovery and kernel

And bootunlocker to unlock the bootloader without tampering the
Hastamper flags and without wiping data and u can relock with the same u can verify it by my favorite command

Optional :-
Use tasker and its plugins and follow every tutorial about tasker
Actions that I use are like call recording , wave to take call, and activating voice while incoming call when in silent mode.

I also use xposed framework

Gravitybox, AppsOpsXposed, Google search Api , smoother system progress bars.


ROMS AND KERNELS I USE ARE
OMNIROM:- BEING A CONTRIBUTOR

CATACALYSM:- Favorite

Might come with my own ROM in the future

KERNELS:-
BRICKED, FRANCO AND ELEMENTAL X

I MAY ALSO COME UP WITH A KERNEL OF MY OWN NAMED PRIME KERNEL IN JANUARY

BACKUP APPS:-

GO BACKUP
TITANIUM BACKUP

THIS WILL BE USEFUL WHEN U RETURN TO STOCK WITH TWRP U CAN USE THEM TO GET YOUR APPS AND GET THE OTA WITHOUT LOOSING THE DATA



KUDO AND THANKS TO ALL THE DEVELOPERS AND PEOPLE AND ALL THE BEST WITH ROOTING AND DONT MESS UP YOUR DEVICE AND

FOLLOW THE COMMAND PROPERLY I HAVE DONE THIS MANY A TIMES DO IT PROPERLY I AM NOT RESPONSIBLE IF YOU GO WRONG AND MESS UP YOUR DEVICE


The EFS BACKUP SCRIPT IS NOT MY CREATION AND NOT THE SCRIPT THAT RELOCKS THE BOOTLOADER

OSMOSIS MADE THE CWM UNLOCK BOOTLOADER SCRIPT AND SORRY THE PERSON WHO MADE THE EFS BACKUP SCRIPT I AM REALLY SORRY I DONT REMEMBER YOUR NAME THANKS TO ALL OF YOU GUYS


ALL THE BEST 

Sent from my Nexus 5 using XDA Premium 4 mobile app
 
Last edited:

Wakamatsu

Senior Member
Jan 3, 2011
1,435
714
Jan 1, 1970
1
240
Yes but its not the download page its the thread just follow it properly and read it

Sent from my Nexus 5 using XDA Premium 4 mobile app
 

Wakamatsu

Senior Member
Jan 3, 2011
1,435
714
Super. I already rooted and such but I didn't even consider relocking the bootloader and resetting the tamper flag.

Great guide.
 

Knight-Rider

Senior Member
Feb 28, 2013
560
100
Nexus Tool Kit can do all this for you no need to do this on your own by typing in commands, just saying.
 
Jan 1, 1970
1
240
OK does wugfresh and skipsoft relock and changes the hastamper flags to false there is a difference in toolkits and actual guides I wrote this because I did not want any thanks but I just wanted to share what I did. I don't have any harsh feelings towards toolkit but after sometime they make you lazy and you won't learn. Just Read the whole thread and tell me if its useful or not. I am a Linux user so I don't use toolkits

Sent from my Nexus 5 using XDA Premium 4 mobile app
 
Jan 1, 1970
1
240
I just want you to ask mskip and the wugfresh toolkit creater that does their toolkits changes hastamper flags to false after unlocking the bootloader

Sent from my Nexus 5 using XDA Premium 4 mobile app
 
  • Like
Reactions: rakesh595160

cmstlist

Senior Member
Jan 11, 2010
3,342
514
Toronto
Google Pixel 4a
Have there been any reports of Google / LG not honouring the warranty due to this flag? My first N5 went back to LG on a warranty swap with just a regular bootloader relock. Haven't heard a complaint yet.

Sent from my Nexus 5 using Tapatalk
 
Jan 1, 1970
1
240
Have there been any reports of Google / LG not honouring the warranty due to this flag? My first N5 went back to LG on a warranty swap with just a regular bootloader relock. Haven't heard a complaint yet.

Sent from my Nexus 5 using Tapatalk

Well there may or may not be any smart customer service agents there but maybe we sometimes don't have luck so we can have a problem then my guide just for help but it may or may not be helpful but I think is worth it and its main moto is to unlock and relock the bootloader without loosing data and messing up the temper flag and backing up the efs
 
Last edited:

mr mystery

Senior Member
Nov 20, 2010
1,141
134
Brampton
Have there been any reports of Google / LG not honouring the warranty due to this flag? My first N5 went back to LG on a warranty swap with just a regular bootloader relock. Haven't heard a complaint yet.

Sent from my Nexus 5 using Tapatalk

Sent mine back with standard boot loader lock as well, we'll see how this turns out. Had no idea Google was flagging now.
 
Jan 1, 1970
1
240

cmstlist

Senior Member
Jan 11, 2010
3,342
514
Toronto
Google Pixel 4a
I sent mine back with a standard bootloader relock. A few days ago I phoned Google to verify that everything is in order. They said yes, the case is closed. I did not ask about bootloaders and they did not indicate any red flags.
 
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 10
    I did this with my nexus 5 and I thought It should be useful and handy as well as useful to keep warranty.
    I want to thank all the great devs who have made all this things down here and made our devices more useful
    +Chainfire​
    Osmosis
    And the ppl on XDA

    THIS IS THE SAFEST AND THE MOST USEFUL WAY OF ROOTING AND UNLOCKING BOOTLOADERS AND STILL KEEPING WARRANTY

    FIRST OF ALL FEW THINGS ABOUT NEXUS 5 WE MAY OR MAY NOT KNOW

    1:- THERE IS A NEW IMPLEMENTATION LIKE WHAT SAMSUNG DID FROM NOTE 2, S3 AND SOME DEVICES AFTER THAT LIKE THE EFS PARTITION AND FLASH COUNTER THEORIES (THE REASON WHY I HATE SAMSUNG'S PLASTIC ****)

    2:- IN NEXUS 5 WE DONT HAVE A SEPERATE PARTITION FOR EFS BUT THE THING IS PUT IN BY GOOGLE. IT CAN ACCIDENTALLY WIPE WHILE FLASHING CUSTOM ROMS, FACTORY IMAGES OR ANY OTHER THING AND MAY RENDER YOUR DEVICE USELESS LEAVING YOU WITH A DEVICE WITH UNKNOW IMEI AND SERIAL NUMBER ( THERE IS ONE CASE OF THIS THING HAPPENING TO A USER ON XDA)


    3:- THE BOOTLOADER HAS A HASTAMPER FLAG WHICH WHEN REBOOTING TO BOOTLOADER AND CONNECTED TO THE PC AND RUNNING A COMMAND IN COMMAND PROMPT IN WINDOWS AND TERMINAL IN LINUX AND MAC ( I HATE APPLE)
    AND TYPING IN THE COMMAND fastboot oem device-info
    Displays this three things:-
    Device tamper: [true/false]
    Boot loader unlock : [true/false]
    Secure boot:[enabled/disabled]

    Now we all know the ppl at the manufacturing company [Samsung for gnex/ lg for nexus 4]
    Use to see our bootloader status for warranty

    Now things and technology have changed and so is the security and policies of companies

    So if the device tamper shows true then be aware that the warranty is void of our very own latest Google flagship phone

    THINGS THAT WE NEED FOR ROOTING AND BACKING UP RECOVERY, EFS AND CHANGING THE DECIVE TAMPER FLAG TO FALSE

    1:adb and fastboot tools for Linux/windows/MAC search it on google to how to setup Adb and fastboot for your respective OS

    Also enable development settings by tapping build number in 7 times and enable USB debugging in development settings and don't consider yourself a developer after doing so, it need much more to be a developer in Android

    2:-cf-auto-root from
    http://xdaforums.com/showthread.php?t=2507211

    you will get all the info that the cf-auto-root will wipe all your data and unlock your bootloader, so make a backup of all your data and all those things that you want

    Now we have a rooted devices
    Now download http://downloads.codefi.re/autoprime/LG/Nexus_5/Nexus_5_Backup_EFS.zip and copy it to the sdcard

    2:- now we need to relock the bootloader

    This step needs two things

    A custom recovery either twrp or Clockworkmod I prefer Twrp over cwm (Twrp is user friendly but when it comes to flashing my favorite ROM Catacalysm, I prefer Cwm )

    Download this
    http://xdaforums.com/showthread.php?t=2239421 and move it to the internal storage


    Done with the recovery. Now copy the recovery in platform-tool in Android-Sdk in window. Or if u are in Linux then copy it to the Home directory not on desktop.

    Now open Terminal
    And type
    sudo apt-get install adb
    sudo apt-get install fastboot

    This will install adb and fastboot

    Now navigate to the folder in which you have saved the recovery
    By cd ~/Home

    In windows copy the recovery.img to platform tools that is better rather than CD ing
    And hold shift and right click and select open command prompt here

    Now u are ready for the commands to put in

    There are no different commands for windows and Linux but Mac have commands like ./fastboot

    So now connect the device The. Computer and start the commands to put in
    1st command
    adb devices

    Accept what pops up on your device

    2nd command

    adb reboot-bootloader (Linux)

    adb reboot bootloader (windows)

    ./adb reboot-bootloader (Mac)

    Now you may know what the command does it will reboot to bootloader

    3rd Command

    fastboot devices

    The serial number show up with device online status

    4th command

    fastboot oem device-info the one I mentioned previously It above
    It will display the device tamper and bootloader info

    5th command

    Ensure that you have the recovery.img in platform-tools and your command prompt is opened in platform-tools/ you have navigated to the directory in which the recovery is placed

    Now type the following command

    fastboot boot recovery.img

    (Ensure that the downloaded recovery is renamed to recovery.img | if while renaming in windows it may come out like recovery.img.img so just remove the one .IMG )

    This won't replace the stock recovery partition

    But

    Your device will boot into Twrp
    Or Cwm only

    Here make a system backup Advanced backup will have an option for efs backup just tick all of others except the efs and backup. It will be saved to sdcard and move it to ur PC This will be helpful while Ota updates. If u want you can backup efs also. You can follow this step to recover everything at the time of OTA

    4)
    Now when u are in the recovery just flash the cwmnexusbooloaderunlock.zip

    And Nexus_5_Efs_backup.zip one after the another.

    BY THIS PROCESS YOU WILL RELOCK THE BOOTLOADER AND CHANGE THE HASTAMPER TO FALSE. YOU CAN CHECK THAT AGAIN BY THE 4TH COMMAND MENTIONED ABOVE. You will also have a folder in the sdcard with efs1,efs2 and efsflashable.zip named efs_backup transfer / copy this to PC AND FLASH THIS WHENEVER U LOSE THE SERIAL NUMBER AND IMEI

    WITH THIS YOU HAVE A ROOTED DEVICE WITH A BOOTLOADER LOCKED AND WARRANTY INTACT

    Now download 3 apps from play store

    Flashify

    Bootunlocker


    Use flashify to backup current recovery and kernel

    And bootunlocker to unlock the bootloader without tampering the
    Hastamper flags and without wiping data and u can relock with the same u can verify it by my favorite command

    Optional :-
    Use tasker and its plugins and follow every tutorial about tasker
    Actions that I use are like call recording , wave to take call, and activating voice while incoming call when in silent mode.

    I also use xposed framework

    Gravitybox, AppsOpsXposed, Google search Api , smoother system progress bars.


    ROMS AND KERNELS I USE ARE
    OMNIROM:- BEING A CONTRIBUTOR

    CATACALYSM:- Favorite

    Might come with my own ROM in the future

    KERNELS:-
    BRICKED, FRANCO AND ELEMENTAL X

    I MAY ALSO COME UP WITH A KERNEL OF MY OWN NAMED PRIME KERNEL IN JANUARY

    BACKUP APPS:-

    GO BACKUP
    TITANIUM BACKUP

    THIS WILL BE USEFUL WHEN U RETURN TO STOCK WITH TWRP U CAN USE THEM TO GET YOUR APPS AND GET THE OTA WITHOUT LOOSING THE DATA



    KUDO AND THANKS TO ALL THE DEVELOPERS AND PEOPLE AND ALL THE BEST WITH ROOTING AND DONT MESS UP YOUR DEVICE AND

    FOLLOW THE COMMAND PROPERLY I HAVE DONE THIS MANY A TIMES DO IT PROPERLY I AM NOT RESPONSIBLE IF YOU GO WRONG AND MESS UP YOUR DEVICE


    The EFS BACKUP SCRIPT IS NOT MY CREATION AND NOT THE SCRIPT THAT RELOCKS THE BOOTLOADER

    OSMOSIS MADE THE CWM UNLOCK BOOTLOADER SCRIPT AND SORRY THE PERSON WHO MADE THE EFS BACKUP SCRIPT I AM REALLY SORRY I DONT REMEMBER YOUR NAME THANKS TO ALL OF YOU GUYS


    ALL THE BEST 

    Sent from my Nexus 5 using XDA Premium 4 mobile app
    2
    OK does wugfresh and skipsoft relock and changes the hastamper flags to false there is a difference in toolkits and actual guides I wrote this because I did not want any thanks but I just wanted to share what I did. I don't have any harsh feelings towards toolkit but after sometime they make you lazy and you won't learn. Just Read the whole thread and tell me if its useful or not. I am a Linux user so I don't use toolkits

    Sent from my Nexus 5 using XDA Premium 4 mobile app
    1
    Oops sorry I will edit

    Sent from my Nexus 5 using XDA Premium 4 mobile app
    1
    I just want you to ask mskip and the wugfresh toolkit creater that does their toolkits changes hastamper flags to false after unlocking the bootloader

    Sent from my Nexus 5 using XDA Premium 4 mobile app
    1
    We already have two stickied threads at the top of this forum going into detail on unlock, rooting, and restoring factory images including how to reset the tamper flag.

    How to flash a factory image | Return to stock | Unroot your Nexus 5

    [GUIDE] Nexus 5 - How to Unlock Bootloader, Install Custom Recovery and Root


    Maybe I'm missing the point of this post? I thought a rooted device = voided warranty period.