Every time I run ADB backup, I get a message near the bottom of the home screen saying
Backup starting..., followed by a message saying
Backup finished a few seconds later despite the fact that I'm using 17 GB of device memory, and the resultant backup file is created with a size of 0 bytes. I receive no error messages, no feedback whatsoever indicating that anything is wrong, let alone what is wrong. It appears to work, but way too quickly, and the backup file is empty.
I confirm that the device is recognized by ADB using the
adb devicescommand, and receive the following output:
List of devices attached 8e1f368a device
I issue the ADB backup command (details to follow).
I get the following message at the command prompt:
Now unlock your device and confirm the backup operation.
...and the following prompt on the phone:
It makes no difference what I do here (details to follow).
I tap the Back up my data button (bottom right corner).
The phone returns to the home screen and shows me the
Backup starting...message, then the
Backup finishedmessage a few seconds later. A 0-byte file is created, named either the default backup.ab or whatever I specified with the -f switch.
The ADB backup command (used in step 2):
I've tried multiple combinations of options, ranging from as simple as
adb backup -all
to things like
adb backup -all -apk -s 8e1f368a -f 'C:\Data Files\PDA\Backups\ADB\GalaxyS4_20140919.ab'
I also tried adding the
-nosystem switch after reading this and this, which indicate that trying to include a system backup on an unrooted device may result in a 0-byte file, and that this switch must be used. It makes no difference, the process still completes in a matter of seconds and I still get a 0-byte file.
The "Full backup" password prompt (step 3):
I'm quite sure I have never set a backup password before. I've never had the occasion to set this password or access this setting in any way before. However, I have tried all of the following:
- Leaving both passwords blank
- Leaving the "current backup password" blank and entering a new password in the second box
- Entering the current screen lock PIN and all PINs I've ever used in the past as the "current backup password".
- Entering every password I can think of that I would have ever used for anything on this device
In all cases the behavior is exactly the same as described in step 5. I get no errors or any kind of indication that anything is wrong or that my passwords are invalid, and no hint as to whether it's actually expecting a current password or whether that field should be left blank. (The screen shot in this answer and several other support forums I've looked at seems to imply that the "current backup password" box wouldn't be displayed if there's no current password, but that's just an inference; nothing makes it clear whether a current password is actually required.)
I suspect that the password it's prompting for might be the "Desktop backup password" set in Developer options:
I have never set that password before. If I try to set one, I get a message saying
Failed to set backup password.
In searching for information about this error, I've encountered at least one other case in which someone who was having this problem said this was preventing him from using ADB backup, but he wasn't specific about what happens when he tries to use ADB backup.
Most people who received this message having never set the password before say that the solution was to leave the current password blank, but I tried that in the first place and it didn't work. I found a question by another person who encountered this problem and was sure he hadn't set the password before. Unfortunately it doesn't look like he ever got a solution or even an explanation.
Regardless of whether ADB is looking for the "Desktop backup password" or the ADB encryption password is something separate, it boggles my mind why ADB would require you to enter a previous password in order to initiate a new backup. I'm not trying to restore, overwrite, or in any way access previously encrypted data, so even if an encryption password for a backup had previously been set, I can't imagine why anyone would think it's a good idea to prevent you from backing up your device if you don't remember what password you used to encrypt backups in the past.
Model: Samsung Galaxy S4 SCH-I545
Kernel version: 3.4.0
OS version: 4.4.2
Android SDK Tools version: 1.16
USB debugging is enabled.
Note that my reason for using ADB backup is to take a full backup of my phone to be on the safe side before rooting it* so I can use nandroid backup tools such as Titanium backup. So, any suggestion involving rooting my phone would be a Catch-22, not a solution. Needless to say, a factory reset is also not a solution, since it would defeat the entire purpose of performing the backup.
The phone is set up to sync with my company's Exchange servers, and there are some policies enforced by the server. I had thought that the device was encrypted when I first set up the sync with company account, but apparently it isn't currently encrypted. In fact, that's what set this chain of events in motion: I'm getting a message telling me that I need to encrypt the device in order to continue to connect to company servers. I want to take a nandroid backup before encrypting, which requires rooting, and I want to use ADB backup before rooting.
* Yes, I'm aware that Towelroot is purported to be safe, but I'd rather not take chances, and I'd like to resolve or at least understand this problem in case related issues come up in the future.