Backup the phone with adb - permission denied or adb root is unavailable


(I hope it is a good place to ask this type of question…)

For the first time I try to backup all my phone. I tried 2 ways to do it without success.

1/ adb pull data/ data

it seems I cannot access this directory. I can do an adb pull sdcard / sdcard without problem.
When I do an "adb shell" I have a “permission denied” on data dir.
Tried adb root with a “adbd cannot run as root in production builds” error.

2/ $ python -b

2015-12-20 22:26:47,596 - utilities.adb_helper - WARNING - adbd cannot run as root in production builds

When I go to Settings > Developer
I see an option “Unlock privileges”> “Unrestrict dev tools” = false
But when I click on this option to enable it, a big warning ask me “erase all my data and to a reset” so I didn’t :wink:


Try getting full root from webide

I tried lot of things and explanation in mozilla documentation (like) but my device is not visible in WebIDE. I can see it via wifi but an error occurs when I try to click on it. adb devices show it only after rebooting and without unlocking the screen I don’t understand why. I thing I will update without backup #fingercrossed

I believe that the nexus builds are built with a user variant which means
that you won’t be able to root the device unless you hack root it.

We can file a bug to have it be a uservariant instead, in which you would
be able to gain root by doing adb root or adb shell then su.

As for the visible on WebIDE it depends on which OS you are on. For
windows, you will need to install the appropriate device drivers for the
device. For linux you would have to adjust the rules. For Mac, it should
just work.

The other part you will need to do is turn on Adb access on the phone
itself, by goint to settings -> developer -> debugging via USB -> ADB&

You need the devtools portion for webide to work.


Thanks for your answer.

I tried on linux with last firefox developper release. settings -> developer -> debugging via USB -> ADB& Devtools is enabled.

I think must do something wrong :slight_smile:

Oh Linux. You have to modify the android.rules file.

I have a repo that has all the devices accessible in the android.rules file
located here :

instructions for ubuntu is in the; I think they work for most other
linux platforms as well.



I am feeling in an “impasse”. I put the udev files and I see well my device with adb devices as before.

Trying another way to flash without (saving and) loosing data…

If I flash from my local computer boot and system with

./ boot
./ system

Should I have a complete reset of my phone without loosing data ? is it sufficient ?


I apologize, I must have missed the information about seeing the adb

It’s possible to get the boot.img and system.img and keep your data,
thoughthere’s also a chance that you will lose your data.

If you are to update your phone and try to keep the data, it’s best to use
the full FOTA image.

I thought using the zip here like the first time

Ah. I see the problem. The fullimg fota isn’t created for that build. ; it appears that no
one had worked on that bug. I need to take care of a couple of things with
the flame and aries and we’ll try to push that bug forward.

1 Like

Okay !

I was looking for something like “full fota image” for nexus 5 and was lost in jungle of documentations, pages, websites, repositories etc. Not easy to know if I found the right information : )
If Fota image was created for that build, where could I find it in the future ?

I will follow this bz, thanks nhirata.


Unfortunately FOTA was not created for that build, it will have to be added
into the build system to produce one.

If you’re familiar with building,

The trick is to implement that in our build system within taskcluster +

Ok nhirata, thanks for having a look. (I am completely not familiar with that.)

(Happy new year :wink:

I just end the story for people who would be interested in…

I took the last build and did:

It take me two minutes, it seems I am up to date and I see my datas (apps, contacts, sms & co.).