3

I would like to root my Nexus 5 but I am worried it will cause a bootloop or some other sort of problem and therefore I would like to back up all my phones data including / before hand. Is this possible?I have already tried using the adb command like this:

adb pull / your path here

But this doesn't work and returns

permission denied: read only file system

Is it possible using adb to backup / without having to be rooted so that I can root?

Thank you,

Isaac

Is there any way I can use adb pull instead of adb backup?

  • 3
    See Full backup of non-rooted devices. – Firelord Jul 11 '15 at 12:59
  • 1
    The simple one line answer is: adb pull won't even fetch the files which adb backup can cover. So you should stick with adb backup if you want app data, and use adb pull only for /system -- but if you're going to root, then you can certainly flash the stock ROM as well in case of an issue, and speaking of flash, which Android version are you using? – Firelord Jul 11 '15 at 13:17
  • I have using Lollipop 5.1.x – Isaac Walker-cox Jul 11 '15 at 13:40
  • 1
    Still, adb backup doesn't cover really everything – but it's as close as you can get to (without a custom recovery or root). With root, Titanium Backup probably covers more – and with a custom recovery, a Nandroid backup covers really everything :) – Izzy Jul 11 '15 at 13:48
1

You do not have to backup Entire /. Rooting phone only unlocks bootloader for custom recovery and involves installations of the su binary in /system partition and the overall partitions that can be affected due to bad root are: /system, /data, /cache. Rest of the partitions wont really be bothered.

An effective way to backup your everything is to use ADB Backup. It will backup ALL of your data except SMS (so backup them up manually with some app beforehand).

Hope this helps.

| improve this answer | |
  • Yes but I can't back those partitions up either. I would use adb backup but I feel like its unreliable because it isn't documented on developers.android.com – Isaac Walker-cox Jul 11 '15 at 13:03
  • 1
    "It will backup ALL of your data" minus those apps' data which doesn't want to be backed up and declared related flag in their manifest. – Firelord Jul 11 '15 at 13:07
  • 1
    Correction: Since when does rooting unlock the bootloader? I've had my LG O4X rooted for two years, the bootloader was still locked until I unlocked it explicitly (to install a custom recovery). – Izzy Jul 11 '15 at 13:49
  • 1
    @Izzy, rooting itself doesn't unlock the bootloader but to obtain root without unlocking the bootloader you need to use a security flaw. Lollipop on the Nexus 5 has no flaws that have been exploited in order to gain root, as far as I am aware. – LJD200 Jul 11 '15 at 17:05
  • 1
    @LJD200 Yepp, that's correct. You can e.g. root via a custom recovery, which you only can install with the boot-loader unlocked. But that's not how this answer puts it. Quote: "Rooting phone only unlocks bootloader and makes some changes to /system", which is at best a bit misleading ;) – Izzy Jul 11 '15 at 17:45
1

It sounds like you need to use ADB's partner, Fastboot.

Like ADB, it is a command line tool run from cmd.exe (Window$) or terminal (Linux & Mac). You can only use fastboot while the device has been booted into bootloader mode. Bootloader mode can be accessed using the following steps:

  1. turn off device
  2. press volume down
  3. while pressing volume down, press the power button
  4. when device vibrates, release the buttons
  5. connect device to computer with a USB cable

Device should now be in bootloader mode.

Fastboot is primarily used during the rooting process to unlock the bootloader and flash a custom recovery. You can also use fastboot to return the device back to stock by flashing the original factory images. Here are the commands available command line list of fastboot options and commands

This process, if not done properly, can turn your device into an expensive paperweight. It also can void the warranty if the device is still under one.

| improve this answer | |
0

Those on Android 6+ can try the instructions that I posted here, starting at step 5. I think this will work without root, but I haven't tried. You'll need 6+ if you're running stock because some of these commands require tools only included in Toybox.

See also Ryan Conrad's great answer, based on this xda-developers guide, also linked by Firelord above.

| improve this answer | |
0

There is a very handy toolkit for nexus devices, at least on windows, which you can use to back up your system, unlock bootloader and flash a recovery via gui, called nexus root toolkit, I think you can get it on xda.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.