[Q] ADB Backup doesn't work - Nexus 4 Q&A, Help & Troubleshooting

hello, i want to do adb backup on my n4 with PA 3.50. I write
Code:
adb backup -apk -all
on the terminal,
i unlock the screen but i can't push the confirm button! i can only set the password or exit.
can somebody help me?

Related

Automated ADB script

Hey all,
I'm trying to create a linux script that executes some adb commands. For example, I would like it to be able to automatically exchange nv_data.bin (which need 'su' rights as you certainly know). The problem begins here:
if I execute command: 'adb shell cp x.x y.y' is fine,
but 'adb shell su cp x.x y.y' is just now working.
So I would need help with this. How can I make it work? I tried adb shell & su and stuff like this, but just did not work... THanks in advance!
94kram01 said:
Hey all,
I'm trying to create a linux script that executes some adb commands. For example, I would like it to be able to automatically exchange nv_data.bin (which need 'su' rights as you certainly know). The problem begins here:
if I execute command: 'adb shell cp x.x y.y' is fine,
but 'adb shell su cp x.x y.y' is just now working.
So I would need help with this. How can I make it work? I tried adb shell & su and stuff like this, but just did not work... THanks in advance!
Click to expand...
Click to collapse
adb shell su -c ls
Thanks! It seems to work, but somehow it just did not ask for permission on the phone, so returns 'Permission denied.' I checked phone, but it didn't ask me if I want to enable or not.
Try
Code:
adb shell su -c "ls" -root
Hm, now it asks for it. Thanks! Is it possible, to ask for permission only once, at the beginning, and then be able to do everything?
94kram01 said:
Hm, now it asks for it. Thanks! Is it possible, to ask for permission only once, at the beginning, and then be able to do everything?
Click to expand...
Click to collapse
I'd think if u call it with -root it should only ask once.
Not sure though.
If it asks more than once, could you push a script to the device (somewhere that normally has full r/w access), run it with a single command, then delete it?

using adb to backup user apps on googleglass

I found the following steps useful and thought I should document it for the benefit of others. I did not know that adb has a backup which is useful for non-rooted devices like the google glass where you do not have direct access to /data/app folder via adb shell.
adb backup [-f <file>] [-apk|-noapk] [-obb|-noobb] [-shared|-noshared] [-all] [-system|-nosystem] [<packages...>]
- write an archive of the device's data to <file>.
If no -f option is supplied then the data is written
to "backup.ab" in the current directory.
(-apk|-noapk enable/disable backup of the .apks themselves
in the archive; the default is noapk.)
(-obb|-noobb enable/disable backup of any installed apk expansion
(aka .obb) files associated with each application; the default
is noobb.)
(-shared|-noshared enable/disable backup of the device's
shared storage / SD card contents; the default is noshared.)
(-all means to back up all installed applications)
(-system|-nosystem toggles whether -all automatically includes
system applications; the default is to include system apps)
(<packages...> is the list of applications to be backed up. If
the -all or -shared flags are passed, then the package
list is optional. Applications explicitly given on the
command line will be included even if -nosystem would
ordinarily cause them to be omitted.)
I used "adb backup -nosystem -apk -all -f backup.ab" to backup all my apps
You can then use http://sourceforge.net/projects/adbextractor/ to validate the integrity of the backup
[email protected]:~/android-backup-extractor-20130526-bin$ java -jar abe.jar info
Android backup extractor
Cipher.getMaxAllowedKeyLength("AES") = 128
Strong AES encryption disabled, MaxKeyLenght is < 256
Please install Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 7
http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html
Usage:
info: abe info <backup.ab> [password]
unpack: abe unpack <backup.ab> <backup.tar> [password]
pack: abe pack <backup.tar> <backup.ab> [password]
Works like a champ!
Hope this helps someone like me who did not know about adb backup prior to now.
It is interesting that on an un-rooted XE12 glass, one can access directly all the system apks that are located under /data/system but not directly access the manually loaded app apks located under /data/apps
All of these succeed
adb pull /system/app/ApplicationsProvider.apk
adb pull /system/app/BackupRestoreConfirmation.apk
adb pull /system/app/CalendarProvider.apk
adb pull /system/app/CertInstaller.apk
adb pull /system/app/ContactsProvider.apk
adb pull /system/app/DefaultContainerService.apk
adb pull /system/app/DownloadProvider.apk
adb pull /system/app/FrameworkStubs.apk
adb pull /system/app/GlassBluetooth.apk
adb pull /system/app/GlassBoutique.apk
adb pull /system/app/GlassBrowser.apk
adb pull /system/app/GlassCamera.apk
adb pull /system/app/GlassDeviceAdministration.apk
adb pull /system/app/GlassGesture.apk
adb pull /system/app/GlassHangouts.apk
adb pull /system/app/GlassHome.apk
adb pull /system/app/GlassLockRecovery.apk
adb pull /system/app/GlassLogging.apk
adb pull /system/app/GlassMaps.apk
adb pull /system/app/GlassMusicPlayer.apk
adb pull /system/app/GlassPhone.apk
adb pull /system/app/GlassPhotosphere.apk
adb pull /system/app/GlassSearch.apk
adb pull /system/app/GlassSettings.apk
adb pull /system/app/GlassSetup.apk
adb pull /system/app/GlassSound.apk
adb pull /system/app/GlassSystemUI.apk
adb pull /system/app/GlassTutorial.apk
adb pull /system/app/GlassUpdate.apk
adb pull /system/app/GlassVideoPlayer.apk
adb pull /system/app/GlassVoice.apk
adb pull /system/app/GoogleBackupTransport.apk
adb pull /system/app/GoogleLoginService.apk
adb pull /system/app/GoogleServicesFramework.apk
adb pull /system/app/GoogleTTS.apk
adb pull /system/app/KeyChain.apk
adb pull /system/app/LatinIME.apk
adb pull /system/app/MediaProvider.apk
adb pull /system/app/NetworkLocation.apk
adb pull /system/app/PackageInstaller.apk
adb pull /system/app/SettingsProvider.apk
adb pull /system/app/SystemUI.apk
adb pull /system/app/UserDictionaryProvider.apk
adb pull /system/app/VpnDialogs.apk
adb pull /system/framework/framework-res.apk
adb pull /system/framework/glass-framework-res.apk
I can't for the life of me select any of the options. If I reboot Glass, run the command, I can highlight the "Do not backup" button by tapping the side of Glass once. But there is no way to swipe over to "Backup my data". Any pointers?

[Q] Can't push CM-12.1 to NP for installation

Hey guys!
I'm tearing out my hair over this. My NP has bootloader unlocked and is rooted.
I've been sitting a few hours just to install CM-12.1 on my NP... but it won't work!
I can see that my NP is connected when I type:
Code:
adb devices
I push using this command:
Code:
adb push cm-12.1-20150830-NIGHTLY-fugu.zip /sdcard/cm-12.1-20150830-NIGHTLY-fugu.zip
I also tried:
Code:
adb push cm-12.1-20150830-NIGHTLY-fugu.zip /sdcard/
It succeeds in pushing the file, because I can see it when I type:
Code:
adb shell ls /sdcard/
But when I choose install from internal storage in Cyanogen Recovery, the file does not show up! I've tried it over and over again for hours.
Am I doing something wrong?
Fixed it myself.
Thanks for the help everyone!!!

ADB backup not working properly

I'm having some problems using "adb backup" with my stock & locked Nexus 6P.
When I run "adb backup -apk -all -obb -shared -f foo.ab" the device asks me about an backup ecryption key and my confirmation. When I do so the buttons turn grey and a confirmation toast pops up.
However, the created "foo.ab" file stays basically empty at 517 bytes.
Any idea?
EDIT: Seems like adb didn't like the sshfs folder. Works fine locally. Nevermind then!
same problem

Relock Z5 Compact Bootloader

This method is for those who have used iovyroot to back up their TA partition before unlocking the bootloader.
Flash back to lollipop (the ROM you used to get the TA backup).
Enable developer mode
Connect phone and allow USB debugging from the computer
open command prompt in iovyroot folder (folder should also contain your TA img)
adb push "root/iovyroot" "/data/local/tmp/iovyroot"
adb push "root/restore.sh" "/data/local/tmp/restore.sh"
adb push TA-XXXXXXXX.img "/data/local/tmp/TA.img"
adb shell
chmod 777 /data/local/tmp/iovyroot
chmod 777 /data/local/tmp/restore.sh
/data/local/tmp/iovyroot /data/local/tmp/restore.sh
well i locked with flashtool and it completed but i also get the bootloader unlock allowed: yes
ksc6000 said:
This method is for those who have used iovyroot to back up their TA partition before unlocking the bootloader.
Flash back to lollipop (the ROM you used to get the TA backup).
Enable developer mode
Connect phone and allow USB debugging from the computer
open command prompt in iovyroot folder (folder should also contain your TA img)
adb push "root/iovyroot" "/data/local/tmp/iovyroot"
adb push "root/restore.sh" "/data/local/tmp/restore.sh"
adb push TA-XXXXXXXX.img "/data/local/tmp/TA.img"
adb shell
chmod 777 /data/local/tmp/iovyroot
chmod 777 /data/local/tmp/restore.sh
/data/local/tmp/iovyroot /data/local/tmp/restore.sh
Click to expand...
Click to collapse
Working Perfectly
So many thanks my friend
boris.klimes said:
Working Perfectly
So many thanks my friend
Click to expand...
Click to collapse
Glad it helped! Was very interesting to see a response to a message I made in 2016!

Categories

Resources