In this thread I am going to use adb backup command to backup user app datas and apks. I am aware of the fact that Helium backup does the same just with a nice GUI, but I beleive it is important to know these basic tools like adb backup. I know many of you just causal android users who don't like wrting commands and etc... but for people like me it was an interesting discovery that this magical Helium backup is not that magical at all.
What is adb backup?
Some of you may know that it is not possible to root your Nexus 5 wihtout a full wipe. Adb backup is a tool which let you back up your data on your phone without root. Then after root you can easily restore your data.
Adb backup parameters:
adb backup [-f <file>] [-apk|-noapk] [-shared|-noshared] [-all] [-system|nosystem] [<packages...>]
Click to expand...
Click to collapse
-f <file>: backup file name. Without this parameter the name of the backup file will be backup.ab
-apk: save apk
-noapk: don't save apk
-shared: save sdcard content
-noshared: don't save sdcard content
-system: save system app data
-nosystem: don't save system app data
<packages...>: save the app data for the app or apps given as parameter
-all: save systam app data and user app data
Click to expand...
Click to collapse
Requirements:
Ability to use adb command.
Have usb drivers installed. (Windows users)
Seting up adb and installing drivers are not part of this guide. If you have to do that then please use @rootSU's great thread to find the guides you need.
Let's start!
Enable USB debugging on the phone.
Connect USB cable.
Open CMD or terminal window.
Depending on what you want to do, backup only user app data with apk or without apk or just certain apps, you will have many options. I will try to cover everything to serve everyone's need.
Type any command to CMD or terminal window which suits your needs.
After executing the command you will be prompted on your phone to start the backup:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
You can give a password for your backup if you want
Select Back up my data on your phone to start the backup.
Option 1: Backup only user app data with apk.
(Note: you can't backup paid app apks)
adb backup -all -apk -nosystem
Click to expand...
Click to collapse
If you want to give a custom name for the backup then just add the -f switch and type a name you want to give to the backup file.
adb backup -all -apk -nosystem -f backup-2014-07-22.ab
Click to expand...
Click to collapse
You will find the backup file in your Username folder if you added the adb command to your path or installed the 15 secs adb installer (windows users). Otherwise it will be in the folder where the adb binary is.
Windows: C:\Users\<username>
Linux: /home/<username>
Option 2: Backup only user app data without apk.
adb backup -all -nosystem
Click to expand...
Click to collapse
If you want to give a custom name for the backup then just add the -f switch and type a name you want to give to the backup file.
adb backup -all -nosystem -f backup-2014-07-22.ab
Click to expand...
Click to collapse
You will find the backup file in your Username folder if you added the adb command to your path or installed the 15 secs adb installer (windows users). Otherwise it will be in the folder where the adb binary is.
Windows: C:\Users\<username>
Linux: /home/<username>
Option 3: Backup system app data and user app data with apk.
(Note: you can't backup system app apks)
adb backup -all -apk
Click to expand...
Click to collapse
If you want to give a custom name for the backup then just add the -f switch and type a name you want to give to the backup file.
adb backup -all -apk -f backup-2014-07-22.ab
Click to expand...
Click to collapse
You will find the backup file in your Username folder if you added the adb command to your path or installed the 15 secs adb installer (windows users). Otherwise it will be in the folder where the adb binary is.
Windows: C:\Users\<username>
Linux: /home/<username>
Option 4: Backup system app data and user app data without apk.
adb backup -all
Click to expand...
Click to collapse
If you want to give a custom name for the backup then just add the -f switch and type a name you want to give to the backup file.
adb backup -all -f backup-2014-07-22.ab
Click to expand...
Click to collapse
You will find the backup file in your Username folder if you added the adb command to your path or installed the 15 secs adb installer (windows users). Otherwise it will be in the folder where the adb binary is.
Windows: C:\Users\<username>
Linux: /home/<username>
Option 5: Backup everything.
System app data, user app data with apk and sdcard content.
(Note: you can't backup system app apks and paid user app apks)
adb backup -all -apk -shared
Click to expand...
Click to collapse
If you want to give a custom name for the backup then just add the -f switch and type a name you want to give to the backup file.
adb backup -all -apk -shared -f backup-2014-07-22.ab
Click to expand...
Click to collapse
You will find the backup file in your Username folder if you added the adb command to your path or installed the 15 secs adb installer (windows users). Otherwise it will be in the folder where the adb binary is.
Windows: C:\Users\<username>
Linux: /home/<username>
Option 6: Backup certain app or apps.
(Note: you can't backup system app apks and paid user app apks)
First find out the name of the app or apps you want to backup.
Go to play.google.com.
Search for your app or apps.
The name you have to input to CMD or terminal will be the end of the URL after the '=' sign.
Type following command to back up your desired app:
adb backup <app name>
Click to expand...
Click to collapse
Example:
I want to backup Bloons TD Battles.
I search for it on play.google.com.
The URL for that is http://play.google.com/store/apps/details?id=com.ninjakiwi.bloonstdbattles
So the name of the app which I have to input is com.ninjakiwi.bloonstdbattles
To back it up I use the following command:
adb backup com.ninjakiwi.bloonstdbattles
Click to expand...
Click to collapse
If I want it with apk
adb backup -apk com.ninjakiwi.bloonstdbattles
Click to expand...
Click to collapse
If I want to give a custom name for the backup file.
adb backup -apk com.ninjakiwi.bloonstdbattles -f bloons_td_battles-2014-07-22.ab
Click to expand...
Click to collapse
If you want to backup multiple apps then just write the app names like this:
adb backup -apk com.ninjakiwi.bloonstdbattles com.frogmind.badland com.supercell.clashofclans
Click to expand...
Click to collapse
List all installed apps:
Windows users type this command:
adb shell pm list packages -f
Click to expand...
Click to collapse
The name of the app will be after the '=' sign.
Linux users type this command:
adb shell pm list packages -f | sed -e s/.*=// | sort
Click to expand...
Click to collapse
Restore the backup
(Note: If you have backed up paid apps, then first install them from playstore before you restore your backup)
Enable USB debugging on the phone. (If it is disabled)
Connect USB cable.
Open CMD or terminal window.
Type the following command:
adb restore <path to the backup>
Click to expand...
Click to collapse
After executing the command you will be prompted on your phone to start the restore:
Enter your password for the backup if you have any.
Select Restore my data on your phone to start the restore.
Example:
I store may backups in the C:\backups folder.
I know I made a backup one week ago and I gave backup-2014-07-15.ab as backup name.
The command I use to restore the backup is:
adb restore C:\backups\backup-2014-07-15.ab
Click to expand...
Click to collapse
Extras:
There is a adb plugin for Total Commander which has the option to handle your backup-restore operations. I found it more useful than Helium backup.
If you want to extract your backup then I can recommend you this tool. It works both on windows and linux, but you will need java to run it. It is a command line app. Read the README.TXT for usage.
Sad thing is people still will use Towelroot or whatever because they don't want to lose data lol. Good thread. :good:
This is nice. I will try this later when i root my phone. Thanks!
Sent from my Nexus 5 using XDA Premium HD app
Very helpful. Thank you for the step by step guide.
Awesome info!! :thumbup:
Not sure why anyone wouldn't root an N5....but this is a great way to backup for those anyone's.
KJ said:
Awesome info!! [emoji106]
Not sure why anyone wouldn't root an N5....but this is a great way to backup for those anyone's.
Click to expand...
Click to collapse
My aim is to give an option to backup every data before root then restore it after root. I know how bad to lose all your progress in games and lose your perfectly set up home screen then do everything from nothing
U can take me as an example I knew that unlocking bootloader wipes internal memory but never knew internal memory is sdcard for our device. Paid the price and lost all of my pics and game data too. I never have a habit of syncing to PC and hate cloud storage. I used helium to backup btw. Should've followed this method.
This backup method works also on Nexus 4?
[email protected] said:
This backup method works also on Nexus 4?
Click to expand...
Click to collapse
It should be working on every phone with android ics and above.
bitdomo said:
It should be working on every phone with android ics and above.
Click to expand...
Click to collapse
PERFECT!! I will report my experience after rooting of my N4.
Thanks for how to guide.
Status of back up?
My question is, How does one know when the back up has finished? I know that it shows whats going on when it brings up the prompt for you to select full back up but once you move from that prompt to let's say,check a message or open another app it seems as if there is no way of going back. Is there a way to check on the status of the back up? Or even check from your pc to know that it has finished? Thanks in advance.
Thanks heaps for this.
Being no stranger to the command line I was hoping there was something simple like this.
Just so people know you have to be patient with this especially if you do the apk versions.
There is no progress bar so go have a cuppa/beer and wait.
The app will disappear on your phone when it's done.
I stopped it half way through and it was a bit of a problem to get it to go again.
Also I am guessing from the size of the file it doesn't back up sms, images, movies or music.
Thanks again though.
Greg
one of the greatest thread
I've done this a few times where I needed to back up before unlocking the bootloader. It's something every rooter should learn.
I know this is reviving a very old topic but i have a problem.
My problem is once i type in the adb command nothing appears on my tablet to confirm the start of the backup. What am i doing wrong? The code i am using is below.
Once i run the code the backup file has been made but its 0 bytes. and nothing appears on the screen of the tablet once unlocked... i have tried restarting the tablet, changing the folder that the backup is made to. The tablet in question is an Asus MemoPad 7 ME173x and the device IS rooted. What am I doing wrong and has anyone else experienced this?
adb backup -apk -shared -system -all -f C:\Users\MyName\Android_Backups\backup.ab
Click to expand...
Click to collapse
wivane said:
I know this is reviving a very old topic but i have a problem.
My problem is once i type in the adb command nothing appears on my tablet to confirm the start of the backup. What am i doing wrong? The code i am using is below.
Once i run the code the backup file has been made but its 0 bytes. and nothing appears on the screen of the tablet once unlocked... i have tried restarting the tablet, changing the folder that the backup is made to. The tablet in question is an Asus MemoPad 7 ME173x and the device IS rooted. What am I doing wrong and has anyone else experienced this?
Click to expand...
Click to collapse
I have had issues where I had a backup file with 0 bytes, but it was usually due to the format of my adb command or when I tried it with the M Preview for the Nexus 5. Have you tried the command without the pathway in your file name? I just did the command that way and everything worked fine for me.
Hi, please advise what's wrong as when I try to run adb backup command windows reports as adb.exe stopped.
Running as administrator after the error message the cmd window is still there with command line like nothing happened but no backup created.
Please help.
This is great! But question: what exactly does the system variable backup?
I would only like to backup user apps and app data., since most other things are backed up by the phone in the cloud or other apps I use like gcloud, but I'm wondering what system includes.
Anyway, what if I only backup app data? What happens when I restore this app data without having the corresponding app installed?
This is so great that I wanted to keep it handy when offline. So, from within xda app (on my rooted nexus 5 running stock 4.4.4) I tried to copy the thread content to save it in a convenient place on the phone.
However when I pasted the copied content, the command line texts did not paste. Is this a known problem with android's copy/paste? Is there a way to enable full copy paste in android?
(Same thing happens when I copy paste content with images. The images are not included).
does it back up everything ? including the kernel bootloader and so on ?
Related
↓ A new root method! ↓
There is now a new root method, that does not require downgrade!
http://forum.xda-developers.com/showthread.php?t=2180688
↑ Read this thread first! ↑
Prerequisites
A rooted LG O4X HD with a v10 firmware. (SuperSU preferred - personally tested)
Device adb drivers installed (so that a phone is detected as an ADB device when in B&R Recovery mode), adb itself is included in the archive
You need an installed Busybox! (/system/bin preferred, or need to edit bat file)
Warning: Do NOT do factory reset between step 1 and step 3! Otherwise /data/rootkit will be deleted, and you will have to start over.
Important note for linux users: bat files are for Windows. If you are using linux, i assume that it will be easy for you to open bat files and do commands by hand.
Step 0
Backup all your settings, and data from internal storage (!), cause factory reset (wipe) will be required.
You can try using LG's backup tool or Titanium Backup or anything else.
Also I'd strongly recommend removing SIM card and SD card from the phone.
Step 1
Make sure USB debugging is enabled (Settings -> Dev Options -> Debugging)
Connect your phone to your PC.
Execute file step0.bat and ensure that you grant su priv to ADB shell (2000).
Now execute file step1.bat - it:
- creates folder /data/rootkit
- copies busybox from /system/bin to /data/rootkit
- copies su from /system/xbin to /data/rootkit
- copies Superuser.apk from /system/app to /data/rootkit
- ensures owner and group of 0 for those files
- chmods files to required attributes (06755 for su, 0644 for apk, 0777 for busybox)
Result should be something like this: Note: In v2 i modified step1, so it tries to copy busybusybox from bin and xbin - one of them will fail, thats normal.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Step 2
Upgrade your firmware to v20a. For example: http://forum.xda-developers.com/showthread.php?t=2069723
DO NOT DO FACTORY RESET! OR YOU WILL DELETE /data/rootkit FOLDER! DO STEP 3 FIRST!
Step 3
After successful upgrade shut down your phone.
Now, with USB connected (!!), hold volume up and power, and keep holding it at least until you hear windows "new device" sound.
You must see something like this:
Now execute file step3.bat - it:
- remounts system as writeable
- copies su to /system/xbin/
- copies superuser to /system/app/
- sets permissions on those files
Step 4
Now you can hold power button to reboot or just run step4.bat to reboot instantly.
Make sure that root is working, before doing factory reset!
Now you are STRONGLY recommended to do factory reset - or many things will mess up, such as lock screen settings or storage.
AGAIN warning, that factory reset WILL wipe internal storage, look at step 0
If you did all things correct, root will be kept (because it is on ro system partition now)
Step 5
Enjoy.
Note
If you are already at v20a and you want root, you can:
1) Wait for official release, with really unlocked BL - then it will be possible to install CWM -> get root
2) Wait until I make some interaction with B&R daemon in recovery
3) Wait for someone to find easier method
4) If you dont want to wait, you can go back to v10x (warning: all data will be wiped!), root phone, and do the procedure.
Any comments, notes, criticism or anything else very welcome!
Edit: In version 2 it tries to copy busybox from /system/bin and /system/xbin, thanks to AlderCass for pointing out
Nice work friend :good:
I don't have adb on my pc, is there a way to simply download the drivers? I ask because my current pc doesn't have the internet
Sent from my LG-P880 using Tapatalk 2
@non4 said:
I don't have adb on my pc, is there a way to simply download the drivers? I ask because my current pc doesn't have the internet
Sent from my LG-P880 using Tapatalk 2
Click to expand...
Click to collapse
adb is included in the archive... i will see what i can do about drivers.
try to connect phone to your PC with debugging on and do "adb devices" from the folder with unpacked adb
if it sees your device - then good
@SkyDev
great findings, nice to see ideas expand to something useful.
did you also went all way and tried to install a changed/modified boot.img and add it to the LNX partition in /dev/block/mmcblk0p2 or /dev/block/platform/sdhci-tegra.3/by-name/LNX , it might just be our bootloader do work as unlocked and we can write unsigned boot / recovery img
edit;
i believe you can easily test it from recovery and su in here. even if you get security error on "boot", i think recovery can still be booted and you can recover the backup of the mmcblk0p2 partition (men always do backups)
Utterly fantastic work, and I'm sure this discovery will be the first huge step in truly unlocking this device. Congratulations!
Sent from my LG-P880 using xda app-developers app
skydev said:
adb is included in the archive... i will see what i can do about drivers.
try to connect phone to your PC with debugging on and do "adb devices" from the folder with unpacked adb
if it sees your device - then good
Click to expand...
Click to collapse
Isn't adb a pain to install? At least it was back in the day when I rooted my desire z with froyo thanks for the good work I will try get this to work on my own
Sent from my LG-P880 using Tapatalk 2
Dexter_nlb said:
@SkyDev
great findings, nice to see ideas expand to something useful.
did you also went all way and tried to install a changed/modified boot.img and add it to the LNX partition in /dev/block/mmcblk0p2 or /dev/block/platform/sdhci-tegra.3/by-name/LNX , it might just be our bootloader do work as unlocked and we can write unsigned boot / recovery img
edit;
i believe you can easily test it from recovery and su in here. even if you get security error on "boot", i think recovery can still be booted and you can recover the backup of the mmcblk0p2 partition (men always do backups)
Click to expand...
Click to collapse
Well, when now root is easily obtainable, you can do it
I think you are more experienced in all those things, i am low-levelly playing with phones only for 3-4 days so far.
I just dont want to trash stuff to the extent that reflash would be required.
Anyway i worked on the method almost 10 hours instead of sleeping at night, so now i think i going to go take some "Deep sleep" /10:46/
Anyway, i am noting again: if anyone also has disassembly skills, then you really should try to disassemble and analyze brd (backup and recovery daemon) - it runs at recovery with root rights, listens for commands on udp port, and probably can be used for "perfect root" (root without reflashing, and maybe even any LG device)
for people having issues using adb, you can download "terminal" from play , and do the same steps except do not start from a windows shell with adb
you just open the terminal.
secondly all files needed, should be tar'd instead, so the busbox more easily can unpack all files with proper rights instantly to the dest folder.
ie.
# cd /data ; tar xf /data/local/tmp/rootkit.tar
assuming rootkit folder is extracted and all files already was properly set with rights in linux when tar'ing the folder.
so conclusion
you do 3 steps to do this.
1. download rootkit.tar
2. open terminal on phone
3. cd to /data and extract(tar xf) rootkit.tar from where you put it when downloaded
this is all without adb used.
but you need adb in the end to run the bat file
Dexter_nlb said:
for people having issues using adb, you can download "terminal" from play , and do the same steps except do not start from a windows shell with adb
you just open the terminal.
secondly all files needed, should be tar'd instead, so the busbox more easily can unpack all files with proper rights instantly to the dest folder.
ie.
# cd /data ; tar xf /data/local/tmp/rootkit.tar
assuming rootkit folder is extracted and all files already was properly set with rights in linux when tar'ing the folder.
so conclusion
you do 3 steps to do this.
1. download rootkit.tar
2. open terminal on phone
3. cd to /data and extract(tar xf) rootkit.tar from where you put it when downloaded
this is all without adb used.
but you need adb in the end to run the bat file
Click to expand...
Click to collapse
Well, adb will be required anyway, and i want to keep freedom of choosing the su binary and Superuser.apk file.
The only requirement: su must grant root if called from recovery (when Superuser.apk is not accessible)
Also, why mess with terminal? You can easily misspell command, and they are long and important (because executed as root)
But idea with tar is good, maybe it will be required to do it this way, from B&R way.
I'm trying this method now and I noticed that a command in step1 fails on my system.
I changed:
adb shell su -c cp /system/bin/busybox /data/rootkit/
to
adb shell su -c cp /system/xbin/busybox /data/rootkit/
postacik said:
I'm trying this method now and I noticed that a command in step1 fails on my system.
I changed:
adb shell su -c cp /system/bin/busybox /data/rootkit/
to
adb shell su -c cp /system/xbin/busybox /data/rootkit/
Click to expand...
Click to collapse
Prerequisites
A rooted LG O4X HD with a v10 firmware. (SuperSU preferred - personally tested)
Device adb drivers installed (so that a phone is detected as an ADB device when in B&R Recovery mode), adb itself is included in the archive
You need an installed Busybox! (/system/bin preferred, or need to edit bat file)
Warning: Do NOT do factory reset between step 1 and step 3! Otherwise /data/rootkit will be deleted, and you will have to start over.
Important note for linux users: bat files are for Windows. If you are using linux, i assume that it will be easy for you to open bat files and do commands by hand.
Click to expand...
Click to collapse
Already mentioned in first post.
lukas77 said:
Already mentioned in first post.
Click to expand...
Click to collapse
I stated that I changed the line to work "on my system".
So everybody trying this will pay attention to that...
sry for this newbie ques,
but how to install adb drivers in our device..
jitesh22 said:
sry for this newbie ques,
but how to install adb drivers in our device..
Click to expand...
Click to collapse
There are many posts on these forums on how to do this - search for them, as this thread does not deal with that.
Everything works perfect, and now i have root on my JB .
Works like a charm! Thanks so much skydev! :laugh:
I upgraded to v20a with these instructions and now I have a rooted v20a.
Thank you very much skydev.
A picture for proof: http://g1303.hizliresim.com/17/7/ktz5m.png
I think we will be able to root when new versions arrive as long as we keep the /data/rootkit folder.
Edit: I upgraded to v20a with my LG PC Suite Version Hacker ( http://forum.xda-developers.com/showthread.php?t=2134192 ) and did no factory reset after the upgrade. Everything seems to work fine upto now.
quick and dirrrrrty
thats how i like it^^
well done
AW: [TUTORIAL] Keeping root after upgrade from v10x to v20x
Worked fine. There we're no problems. Did the kdz flashing via virtual machine with windows and the rooting part on mac os x since your scripts can be easily adapted. Also i dont have to care about adb or fastboot drivers.
Gesendet von meinem LG-P880 mit Tapatalk 2
Hi Everyone,
I was unsuccessful at finding any helpful information on how to backup the HTC ONE before unlocking the bootloader.
So I decided to learn about adb and its features for myself, turns out the HTC ONE cares more about syntax then any other android distro... but that's another story.
So here I hope to document for you the process I successfully took to backup my unrooted HTC ONE.
Please Note this Backup does not backup your Photos or Music but they can be easily backed up by just copy and paste.
It also does not backup your SMS's, Contact's, to backup SMSs I used 'SMS Backup and Restore' available from Play Store, and I did not have to worry about the contacts as they are all pulled from my Gmail Account.
Follow the Video wwwDOTyoutubeDOTcom/watch?v=xuIq0gmYpFA provided by XDA dude Steve (Twitter - @Electr0z).
I would have put a html link in but the superior XDA mods do not like nubies to post links
Stop the Video before he takes you into the process of getting into fastboot for the second time, its around 4 minutes 30
You Should now have Android SDK installed and be able to find your device by running
adb devices
Click to expand...
Click to collapse
Example
D:\Android\HTC ONE>adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
HT364X945763 device
Click to expand...
Click to collapse
Now that you have the cmd window open type
adb backup -apk -shared -all -nosystem -f backup.ab
Click to expand...
Click to collapse
This will Call the Android device to backup all the apks + data available (i.e saves, cause you gotta keep that temple run score), the important part to this script is to not backup the system which many of the therads here for the phones say to include, but dont, HTC will crack the ****s.
Because we do not have root access if we try backing up the system it will take ages and it wont work anyway because we will have no access to do it.
Now that the script is running we want to keep an eye on it,
Open up Task Manager
Select View
Select Columns
Tick I/O Read Bytes
Tick I/O Write Bytes
Select Processes Tab
Search for "adb.exe"
If the command is successful we should see the byte count climbing as adb pulls data from the HTC
For me It took about 1 and a half hours to complete the backup,
Once Complete confirm the backup file is a considerable size, 1GB+, mine was 1.6GB and I had about 20 apps installed.
Maybe do the backup again (with a different name) just to verify.
Follow the rest of the video and unlock the bootloader, once finished restore the HTC Backup with the command
adb restore backup.ab
Click to expand...
Click to collapse
Any Questions Please post below and I will try assist.
hey sorry, first time with all this stuff and i seem to be running into some difficulties when i run the command in cmd to start the backup, it generates the file, asks for my confirmation on my phone, but in task manager the bytes don't rise and the backup never completes.
I was wondering if you knew how to fix this
any help would be appreciated.
My mind a2 display is broken I am able to connect my phone via adb can anyone please tell me command to pull data?
If phone has Oreo, you can boot into TWRP and then pull /data partition content into image, and then expand it or use for pushing.
As current TWRP does not decrypt Pie /data, this won't work for Pie.
For Pie you can only backup user applications and their settings:
Code:
adb backup -apk -shared -all -keyvalue -f .\backup_yymmdd_hhmm.ab
and then try to expand .ab file (search the net)
There is also program called MyPhoneExplorer, but to use it one have to get root and install MyPhoneExplorer android client beforehand - prior to breaking display.
Aerobatic said:
If phone has Oreo, you can boot into TWRP and then pull /data partition content into image, and then expand it or use for pushing.
As current TWRP does not decrypt Pie /data, this won't work for Pie.
For Pie you can only backup user applications and their settings:
Code:
adb backup -apk -shared -all -keyvalue -f .\backup_yymmdd_hhmm.ab
and then try to expand .ab file (search the net)
There is also program called MyPhoneExplorer, but to use it one have to get root and install MyPhoneExplorer android client beforehand - prior to breaking display.
Click to expand...
Click to collapse
My phone was dropped badly . . . Only display is working finger print works device get unlocked adb can detect the device, I don't want any apps I want my data Pics and all . .
I am on pie
It is possible?
razor17 said:
My phone was dropped badly . . . Only display is working finger print works device get unlocked adb can detect the device, I don't want any apps I want my data Pics and all . .
I am on pie
It is possible?
Click to expand...
Click to collapse
try to use: adb pull /sdcard/
if your device is not completely dead then there is a chance to recover the data by connecting it to PC and use any data recovery software like Android Recovery etc, on it to backup the data.
MIN313 said:
if your device is not completely dead then there is a chance to recover the data by connecting it to PC and use any data recovery software like Android Recovery etc, on it to backup the data.
Click to expand...
Click to collapse
That's what . . .adb can detected in PC, problem is I am not able to pull data
I will try recovery softwares etc, thank you
razor17 said:
I will try recovery softwares etc, thank you
Click to expand...
Click to collapse
Have you tried
Code:
adb pull /sdcard/
as @leonardcoutinho suggested? Works for me from PC which was previously authorized for ADB
Aerobatic said:
Have you tried
Code:
adb pull /sdcard/
as @leonardcoutinho suggested? Works for me from PC which was previously authorized for ADB
Click to expand...
Click to collapse
It says remote object/sdcard/ does not exist
razor17 said:
It says remote object/sdcard/ does not exist
Click to expand...
Click to collapse
Does that mean that you have not previously authorized the PC to ADB phone? Or even have not got developer state and have not enabled "Debugging via USB" in phone? If that's the case, then I do not see a solution.
My display is broken, i can't see anything on my Mi9T pro.
But i can boot blind into recovery or system, enter the pin via an USB-keyboard and then browse my files on my computer. I can also find the phone with adb.
Is there any chance to get my app data from the phone? Can i backup my app data without using the screen? Or even a chance to browse it? Or can i see my screen via usb?
I have titanium backup on my phone, can i make a backup without seeing it? And then get the files via mtp to my computer?
I'm on the latest xiaomi.eu release (from second august-week).
If you have enabled usb debugging then try scrcpy.
sagar29 said:
If you have enabled usb debugging then try scrcpy.
Click to expand...
Click to collapse
I get:
INFO: scrcpy 1.16 <https://github.com/Genymobile/scrcpy>
adb: error: failed to get feature set: no devices/emulators found
ERROR: "adb push" returned with value 1
Press any key to continue...
Does that mean, that USB-debugging is not enabled? But i can access internal storage and find the device via adb.
Edit: I can find it in ADB when i'm in recovery. After entering the pin, i can also access data in recovery. When i am in OS and entered the pin, i can access the storage.
if you can access your storage from adb then copy your data to your pc.
sagar29 said:
if you can access your storage from adb then copy your data to your pc.
Click to expand...
Click to collapse
When i get an answer with "adb devices", then i am connected. What should i enter next?
McFlypants said:
When i get an answer with "adb devices", then i am connected. What should i enter next?
Click to expand...
Click to collapse
if you want to backup data in your internal storage then type "adb pull sdcard/Android"
if you want to backup data partition then type "adb backup --twrp data" it will create a backup.ab file, you cannot browse this file you can only restore.
you can also copy appdata from data patrition like this "adb pull /data/app"
you can browse folders like this
adb shell
cd data
ls
sagar29 said:
if you want to backup data partition then type "adb backup --twrp data" it will create a backup.ab file, you cannot browse this file you can only restore.
Click to expand...
Click to collapse
This is not working because i have to unlock my phone for that - what i can't do because i can't use the screen. When i disconnect the usb-connection to connect the usb-keyboard, adb closes.
sagar29 said:
you can also copy appdata from data patrition like this "adb pull /data/app"
Click to expand...
Click to collapse
That works, i will try to restore the needed app data on my new phone!
Thanks!!
How can i copy TitaniumBackup folder to PC?
With my others Galaxy phones i always could copy through MTP but with my G998B/DS i can't.
I've used all the methods i found on the internet, such as:
Copy through MTP;
Compress TitaniumBackup's folder into a .zip file;
And through the ADB command
Code:
adb pull "/sdcard/TitaniumBackup" "D:\BACKUP"
Through MTP and compressing the folder i only get the .PROPERTIES files and through ADB i get this error message:
adb: error: failed to copy '/sdcard/TitaniumBackup/com.google.android.apps.photos-20210403-172138.tar.gz' to 'D:\BACKUP\TitaniumBackup\com.google.android.apps.photos-20210403-172138.tar.gz': remote open failed: Permission denied
If anyone can help me I would appreciate it.
SOLUTION: I entered in TWRP and i've been able to copy the folder.
anyone know how to resolve this? i don't have TWRP so i can't use that work around.
fizmixa said:
anyone know how to resolve this? i don't have TWRP so i can't use that work around.
Click to expand...
Click to collapse
Do you get the same error as below?
MasterHack10 said:
adb: error: failed to copy '/sdcard/TitaniumBackup/com.google.android.apps.photos-20210403-172138.tar.gz' to 'D:\BACKUP\TitaniumBackup\com.google.android.apps.photos-20210403-172138.tar.gz': remote open failed: Permission denied
Click to expand...
Click to collapse
Maybe the "Permission denied" error is triggered by windows itself since you try to copy into the root of drive D. Maybe running your terminal (e.g. PowerShell) as admin will resolve your issue.
Else, @fizmixa , you could still manually boot (but not flash) twrp using fastboot, if your device isn't a Samsung device (I don't know if you can achieve this with Samsung).
Same here...Still couldn't find a solution.
I had the same problem. Looks like it's permission related. I fixed the problem by booting into TWRP -> Advanced -> File Manager, navigating to /sdcard/TitaniumBackup, clicking the blue folder with the tick and then selecting the chmod755 option.
@fizmixa, try and download Terminal Emulator for Android from the Play store and run:
Code:
chmod 755 /sdcard/TitaniumBackup/
It is about owner permission. Tar.gz files has a different owner from .properties. I don't have TWRP recovery because I use Android Emulator. How can I solve this problem?
Same issue here. Is this an Android 11 issue?
I'm struggling with the same issue .. No TWRP with me yet. So any clue how to get these files out of the device ?
JazonX said:
I'm struggling with the same issue .. No TWRP with me yet. So any clue how to get these files out of the device ?
Click to expand...
Click to collapse
They're protected due to security changes in newer versions of Android. I had the same issue on my last device, unable to pull /sdcard/android or /sdcard/TitaniumBackup using ADB for example.
You can try the SmartSwitch Windows app to take a backup of your phone?
Just a word of warning, I used SmartSwitch yesterday and although the backup was successful the call log backup zip was corrupt and couldn't be restored.
skymera said:
They're protected due to security changes in newer versions of Android. I had the same issue on my last device, unable to pull /sdcard/android or /sdcard/TitaniumBackup using ADB for example.
You can try the SmartSwitch Windows app to take a backup of your phone?
Just a word of warning, I used SmartSwitch yesterday and although the backup was successful the call log backup zip was corrupt and couldn't be restored.
Click to expand...
Click to collapse
Hey, I just managed to sort it out.
Go to Titanium Backup, Preferences, Backup location - and click the below selected option;
Select the external backup storage option, and allow access to it.
It was weird how this caused the PC copying / internal copying to fail .. This sorted the problem for good.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
JazonX said:
Hey, I just managed to sort it out.
Go to Titanium Backup, Preferences, Backup location - and click the below selected option;
Select the external backup storage option, and allow access to it.
It was weird how this caused the PC copying / internal copying to fail .. This sorted the problem for good.
Click to expand...
Click to collapse
I'm not rooting my S21U but this is good to know for the future, tks.
I'm also having this problem with Android 11 on Pixel 5a, adb: error: failed to copy ...: remote open failed: Permission denied
There isn't a TWRP for this device yet so I can't try that solution. I tried JazonX's idea but it hasn't helped. The problem seems to be that the tar.gz files are owned by media_rw user instead of u0_a252 like the other files. I tried using 'adb shell', "su -" and then "chmod 755 /sdcard/TitaniumBackup/" but it doesn't actually change any of the permissions. Also tried commands such as "chown u0_a252 *.tar.gz" but it doesn't actually change anything. I tried to write to TB support too but no response yet. Any other ideas?
Aha! I found a solution! use "adb shell" then "su -" then navigate to "cd /data/media/0/TitaniumBackup". Now commands like "chown u0_a252 *" actually work and I was able to get full backup of /sdcard/TitaniumBackup with "adb pull". Crazy Android file system!
scarlion said:
Aha! I found a solution! use "adb shell" then "su -" then navigate to "cd /data/media/0/TitaniumBackup". Now commands like "chown u0_a252 *" actually work and I was able to get full backup of /sdcard/TitaniumBackup with "adb pull". Crazy Android file system!
Click to expand...
Click to collapse
Wow! It worked for me! Thanks very much
scarlion said:
Aha! I found a solution! use "adb shell" then "su -" then navigate to "cd /data/media/0/TitaniumBackup". Now commands like "chown u0_a252 *" actually work and I was able to get full backup of /sdcard/TitaniumBackup with "adb pull". Crazy Android file system!
Click to expand...
Click to collapse
Did you do this via windows command prompt or within a terminal program on the android device?
As I can't seem to get it to work on Windows CMD
Code:
C:\platform-tools>adb shell
redfin:/ $ su -
redfin:/ # cd /storage/emulated/0/TitaniumBackup
1|redfin:/storage/emulated/0/TitaniumBackup # chown u0_a252 *
redfin:/storage/emulated/0/TitaniumBackup # adb pull "/storage/emulated/0/TitaniumBackup" "D:\Temp"
: adb: inaccessible or not found
127|redfin:/storage/emulated/0/TitaniumBackup # adb pull /storage/emulated/0/TitaniumBackup
: adb: inaccessible or not found
127|redfin:/storage/emulated/0/TitaniumBackup #
pennywaltz said:
Code:
redfin:/storage/emulated/0/TitaniumBackup # adb pull "/storage/emulated/0/TitaniumBackup" "D:\Temp"
: adb: inaccessible or not found
127|redfin:/storage/emulated/0/TitaniumBackup # adb pull /storage/emulated/0/TitaniumBackup
: adb: inaccessible or not found
127|redfin:/storage/emulated/0/TitaniumBackup #
Click to expand...
Click to collapse
I think you have to exit the "adb shell" for further adb commands to work, as "adb" is in your C:\platform-tools directory
scarlion said:
I think you have to exit the "adb shell" for further adb commands to work, as "adb" is in your C:\platform-tools directory
Click to expand...
Click to collapse
I'm having the same problem on my Pixel 5 ("redfin"). It has nothing to do with adb. Without adb running at all, I can go to a terminal emulator on the device and run the following commands ...
Code:
redfin:/ $ su -
redfin:/ # cd /sdcard/TitaniumBackup
redfin:/sdcard/TitaniumBackup # chown u0_a362 *
No error is reported. However, after doing this, all the files previously owned by rw_media are still owned by rw_media. In other words, for those files, the chown command is effectively a no-op, even after an su to root.
Google strikes again with its "We think we're much smarter than you, and we're going to 'protect' you from yourself, whether you like it or not!" attitude.
HippoMan said:
Google strikes again with its "We think we're much smarter than you, and we're going to 'protect' you from yourself, whether you like it or not!" attitude.
Click to expand...
Click to collapse
I know right, it's pretty annoying... but even with root, I think you have to specifically modify the data from the /data/media/0 directory instead, i.e.:
redfin:/ $ su -
redfin:/ # cd /data/media/0/TitaniumBackup
redfin:/data/media/0/TitaniumBackup # chown u0_a362 *
Does that work?
scarlion said:
I know right, it's pretty annoying... but even with root, I think you have to specifically modify the data from the /data/media/0 directory instead, i.e.:
redfin:/ $ su -
redfin:/ # cd /data/media/0/TitaniumBackup
redfin:/data/media/0/TitaniumBackup # chown u0_a362 *
Does that work?
Click to expand...
Click to collapse
Yep, that worked for me! Thanks! It seems they have put some stupid userland file system which mirrors files from /data:
/dev/fuse on /storage/emulated type fuse (rw,lazytime,nosuid,nodev,noexec,noatime,user_id=0,group_id=0,allow_other)