Is there a safe root on stock 5.1.1 that doesn't wipe data? - Nexus 5 Q&A, Help & Troubleshooting

I desperately need more storage on this phone.. :crying: The only way I have found to gain extra storage is to have root and use StickMount. I have a lot of info and game saves that I don't want to lose to a data wipe though. Is there a safe root method on stock 5.1.1 that doesn't wipe data?

The reason rooting with ChainFire's root tool wipes your data is becuase it boots to a custom one-time-use recovery (different from flashing twrp or cwm) to install the SU binaries. However, to do this an unlocked bootloader is needed. When the "oem unlock" command (what unlocks the bootloader) is run, it wipes all user data (the /data partition) as a security precaution, because one could flash something like twrp and then use adb commands to pull your personal files or remove the password on your lockscreen.
I cant verify if his works right now, i just got CyanogenMod 12.1 (pre-rooted) up and running, but you could try this: ROOTMaster
I used that to root my KFHD and my old LG Optimus G, both on older versions of android though. Let me know if it works for you

https://play.google.com/store/apps/details?id=com.rerware.android.MyBackup
https://play.google.com/store/apps/details?id=com.koushikdutta.backup
Try these 2 apps to backup your stuff, you should be able to backup your stuff without root, and then when you have root you could restore it. Just make sure to move the data from the phone because i believe oem unlock deletes everything from it.

My issue with those backup apps is this "* Users with root access can backup APKs AND DATA!". I have tried using backup apps in the past without root and the apps were backed up but I lost my game saves. Which, is really all I am worried about because I know how to back everything else up without root. I have lost games saves a few times switching from phone to phone without root and it sux. Also, with no data wipe I can avoid the hefty amount of time installing and setting up my phone environment. I do very much so understand the importance of a clean wipe and fresh environment though. With no data wipe and root I could back up app data and then do a fresh install.

It all depend on if you have already unlocked bootloader or not. If yes, just install custom recovery (TWRP) and install SuperSU. If not, there is no way to backup data without wiping your data, beside adb backup command.
http://forum.xda-developers.com/galaxy-nexus/general/guide-phone-backup-unlock-root-t1420351

So how do people transfer their game stuff to a new device? Does the adb backup command allow you to back up a device and transfer it onto another device? or will their be complications like file placement since it is a different device?

Related

FlashFire with HTC One A9?

Anyone used ChainFire's FlashFire with the One A9?
I've used it for backups successfully but have yet to restore anything with it (a little squeamish to do so :silly.
And I'll just add, if anyone has used it and could offer any tips or procedures that would be great.
FlashFire usage is straightforward, at least for me. I haven't flashed anything dangerous with it directly (bootloader, radio) yet.
It has handled flashing backups of system, boot, recovery, and even the 1.57.617.41 ota flawlessly.
Special thanks to @Chainfire!
Sent from my HTC One A9 using XDA Free mobile app
CSnowRules said:
FlashFire usage is straightforward, at least for me. I haven't flashed anything dangerous with it directly (bootloader, radio) yet.
It has handled flashing backups of system, boot, recovery, and even the 1.57.617.41 ota flawlessly.
Special thanks to @Chainfire!
Sent from my HTC One A9 using XDA Free mobile app
Click to expand...
Click to collapse
Were you already rooted? I'm rooted and xposed and want to update via flashfire. will it work?
theNdroid said:
Were you already rooted? I'm rooted and xposed and want to update via flashfire. will it work?
Click to expand...
Click to collapse
Of course. Root is required to use FlashFire. I use Xposed as well, and I've had no problems updating via FlashFire.
CSnowRules said:
FlashFire usage is straightforward, at least for me. I haven't flashed anything dangerous with it directly (bootloader, radio) yet.
It has handled flashing backups of system, boot, recovery, and even the 1.57.617.41 ota flawlessly.
Click to expand...
Click to collapse
Just for my edification, flashing a firmware update like 1.57.617.41 will wipe my data partition, correct?
eelpout said:
Just for my edification, flashing a firmware update like 1.57.617.41 will wipe my data partition, correct?
Click to expand...
Click to collapse
No not at all. Flashing the OTA will not wipe your data. I've done the .41 and .52 OTAs via FlashFire.
***Warning--if you're not currently encrypted, flashing the OTA will update your boot partition, so be sure to use the preserve recovery option in FlashFire and reboot to TWRP to patch your boot image, or your device will encrypt data on first boot.***
CSnowRules said:
No not at all. Flashing the OTA will not wipe your data. I've done the .41 and .52 OTAs via FlashFire.
***Warning--if you're not currently encrypted, flashing the OTA will update your boot partition, so be sure to use the preserve recovery option in FlashFire and reboot to TWRP to patch your boot image, or your device will encrypt data on first boot.***
Click to expand...
Click to collapse
meaning, flash this A9 boot image patcher from TWRP?
Or does using the EverRoot SuperSU option patch the boot image for us on the A9 (and then does one check "preserve recovery" using that or not)?
This can all get a bit confusing.
eelpout said:
meaning, flash this A9 boot image patcher from TWRP?
Or does using the EverRoot SuperSU option patch the boot image for us on the A9 (and then does one check "preserve recovery" using that or not)?
This can all get a bit confusing.
Click to expand...
Click to collapse
Yes, that's one way to disable forceencrypt. You could also flash the latest SuperSU or Magisk. Either one will disable forceencrypt by default. Of course, if your data is already encrypted, you won't have a problem, but I'd assume that you would like to have root, so I'd recommend SuperSU or Magisk+phh root.
CSnowRules said:
Yes, that's one way to disable forceencrypt. You could also flash the latest SuperSU or Magisk. Either one will disable forceencrypt by default. Of course, if your data is already encrypted, you won't have a problem, but I'd assume that you would like to have root, so I'd recommend SuperSU or Magisk+phh root.
Click to expand...
Click to collapse
i'm already unecrypted and rooted, but on firmware from last year. just trying to find the most efficient way to bring things up to date.
eelpout said:
i'm already unecrypted and rooted, but on firmware from last year. just trying to find the most efficient way to bring things up to date.
Click to expand...
Click to collapse
Ok, this post will go a bit off topic. That being said, I can offer two courses of action. I take no responsibility for anything in this post.
Safest--almost no risk (my personal preference)
1. Backup your data partition, including internal SD via TWRP to ext SD or USB OTG drive. Flash the latest RUU from HTC. Boot stock and apply OTAs until there are no more updates available. Fastboot flash the latest TWRP, and finally restore your data and flash the latest SuperSU via TWRP. Reboot your fully updated, rooted A9 with all your data still intact.
A little risky and untested to my knowledge--could result in a hard brick if something partially fails. FLASHING BOOTLOADERS IN FLASHFIRE IS STILL ALPHA FOR HTC DEVICES!!! This may work with s-on...but may require s-off.
Your system partition must have never been mounted r/w for this to work.
2. Download the OTA zips for your phone from the first update available to the latest and the latest SuperSU and TWRP. Use FlashFire to do everything in one shot. Select allow flashing bootloaders in FlashFire settings, select your OTAs for installation from oldest to newest (don't select restore boot and recovery), select TWRP and SuperSU for installation, disable everroot and preserve recovery. Cross your fingers and timidly press flash... If all is successful, you should have the same end result as option 1.
I STRONGLY recommend the first method, but if you're feeling lucky and decide to try the second method, please share how it goes, since this post is FlashFire related and this would be the ultimate test of FlashFire for our devices.
For me, I've found that though TWRP backups take more time, and DON'T preserve internal storage, it's still the most reliable and consistent way to backup especially for OTAs.
I've previously tried FlashFire restore but it doesn't seem to restore internal storage as claimed; deal-breaker.
The real problem is we want OTA automation to:
1) disable lock-screen (pattern or fingerprint) so emergency restore of /data don't fail to unlock after boot
2) restore OEM recovery
3) flash OTA and let it do its things of updating /system, /boot, etc
4) reflash SuperSU before normal system boot so /boot doesn't try to re-encrypt /data
5) restore whatever the original recovery was
6) boot
The problem always is catching the step between 3 -> 4 in some automated way. If the OTA goes all the way through, /data is encrypted and so time is wasted to go back to recovery after full-boot, wipe /data, restore /data, lost internal storage contents and PICTURES. If pattern-lock / finger-print lock is not disabled (1), you won't be able to get past the lock screen as it won't recognize the correct lock-pattern nor fingerprint. Solution is to adb shell in, and move/delete some files as root. PITA and I don't think FlashFire does this.
If you did manually restore /data, then /data is corrupted for some apps that use it such as Waze, LINE, KakaoTalk, Whatsapp, etc where they can't write to their data directories anymore. A reinstall of the app is the only way to fix it.
NuShrike said:
For me, I've found that though TWRP backups take more time, and DON'T preserve internal storage, it's still the most reliable and consistent way to backup especially for OTAs.
I've previously tried FlashFire restore but it doesn't seem to restore internal storage as claimed; deal-breaker.
The real problem is we want OTA automation to:
1) disable lock-screen (pattern or fingerprint) so emergency restore of /data don't fail to unlock after boot
2) restore OEM recovery
3) flash OTA and let it do its things of updating /system, /boot, etc
4) reflash SuperSU before normal system boot so /boot doesn't try to re-encrypt /data
5) restore whatever the original recovery was
6) boot
The problem always is catching the step between 3 -> 4 in some automated way. If the OTA goes all the way through, /data is encrypted and so time is wasted to go back to recovery after full-boot, wipe /data, restore /data, lost internal storage contents and PICTURES. If pattern-lock / finger-print lock is not disabled (1), you won't be able to get past the lock screen as it won't recognize the correct lock-pattern nor fingerprint. Solution is to adb shell in, and move/delete some files as root. PITA and I don't think FlashFire does this.
If you did manually restore /data, then /data is corrupted for some apps that use it such as Waze, LINE, KakaoTalk, Whatsapp, etc where they can't write to their data directories anymore. A reinstall of the app is the only way to fix it.
Click to expand...
Click to collapse
The solution for problem 1 can be handled in TWRP. The files can be deleted via TWRP's file manager or the built in terminal, which may be easier for some people.
Also, the solution for the corrupted data and internal SD is to create an image of the data partition (just like the system image backup option). This can be done via dd in TWRP or adb. It requires a large amount of storage and it takes longer, but I've had to do it, since I use VIP Access by Symantec for work. A normal file based backup in TWRP breaks that app. This also keeps the pin/fingerprint data intact.
If we could have that implemented in a user friendly manner, that would be great, but I'm sure CaptainThrowback and Chainfire both have bigger issues to deal with. I could probably figure out a solution, but the work wouldn't be worth it for my own benefit, since I'm fluent with the Linux command line.

Create flashable backup of phone in current state

Hi, I have my phone rooted, magisk'd, xposed etc etc and with a lot of apps and tweaks done to it.
Is there any way at all I could make a flashable image of it instead of having to make a backup of it in TWRP and then restoring it from there? (The TWRP method has never failed me but I was just curious about whether the question below could be done)
I'd like to be able to have a copy of the entire phone as a backup on the PC so I could then flash the phone back to its current state (if I mess anything up) using SP Flash Tool?
Forgive me if this is a stupid question or a task so complicated that it would just be easier to continue using TWRP.
The reason I ask is if the TWRP backup on the phone gets corrupted somehow then I'd like a copy of the phone so I could restore using that.
MrGRiMv2 said:
Hi, I have my phone rooted, magisk'd, xposed etc etc and with a lot of apps and tweaks done to it.
Is there any way at all I could make a flashable image of it instead of having to make a backup of it in TWRP and then restoring it from there? (The TWRP method has never failed me but I was just curious about whether the question below could be done)
I'd like to be able to have a copy of the entire phone as a backup on the PC so I could then flash the phone back to its current state (if I mess anything up) using SP Flash Tool?
Forgive me if this is a stupid question or a task so complicated that it would just be easier to continue using TWRP.
The reason I ask is if the TWRP backup on the phone gets corrupted somehow then I'd like a copy of the phone so I could restore using that.
Click to expand...
Click to collapse
You can store a copy of your TWRP backup on PC, then, if the backup that is stored on the device gets corrupted, you can use the copy that is stored on PC.
Sent from my SM-S767VL using Tapatalk
I have a copy of it on PC just in case, I thought I remembered reading a thread on here quite a few years back about creating a custom ROM from your existing installation with SPFlashtool or a similar program but it was so long ago that I might have mistaken it for another backup method.
Either way the TWRP backup is still quick enough to recover from and was thinking about the SPFlashtool way as an experiment. Thanks for replying.
You should be able to make partition image backups in TWRP. System, data and boot. Then you can Fastboot flash those partitions back.
I am not familiar with the MTK devices but it must be similar.
You can also use SuperR's kitchen to easily build a ROM from the images.
MrGRiMv2 said:
Hi, I have my phone rooted, magisk'd, xposed etc etc and with a lot of apps and tweaks done to it.
Is there any way at all I could make a flashable image of it instead of having to make a backup of it in TWRP and then restoring it from there? (The TWRP method has never failed me but I was just curious about whether the question below could be done)
I'd like to be able to have a copy of the entire phone as a backup on the PC so I could then flash the phone back to its current state (if I mess anything up) using SP Flash Tool?
Forgive me if this is a stupid question or a task so complicated that it would just be easier to continue using TWRP.
The reason I ask is if the TWRP backup on the phone gets corrupted somehow then I'd like a copy of the phone so I could restore using that.
Click to expand...
Click to collapse
Please check if this will help you out, I know it can save app, app data and roms. I used it on my device. Though some apps have problem using the app data which was backed up, most apps worked
https://play.google.com/store/apps/details?id=balti.migrate&hl=en_US
https://forum.xda-developers.com/android/apps-games/app-migrate-custom-rom-migration-tool-t3862763
gopikrishnanrmg said:
Please check if this will help you out, I know it can save app, app data and roms. I used it on my device. Though some apps have problem using the app data which was backed up, most apps worked
https://play.google.com/store/apps/details?id=balti.migrate&hl=en_US
https://forum.xda-developers.com/android/apps-games/app-migrate-custom-rom-migration-tool-t3862763
Click to expand...
Click to collapse
That is useless for what they are trying to do. That only backs up and restores user apps and user data, it helps you keep your data when switching ROMs. That doesn't help restore the system if the device gets corrupted.
Sent from my SM-S767VL using Tapatalk
Can't believe nobody on XDA told you about dd in 361 days!
Abstract:
Twrp have constant problem with encrypted data. The goal to achieve is make full backup of encrypted phone, when is unlocked, and be able copy on another same model of phone, and again encrypt it.
Same question here.
Im currently working on this.
Will update soon...
-`chiron` -> lineage-18.1-20210722
1. First try:
Code:
a) adb shell
b) su
c) dd if=/dev/block/by-name/system of=/mnt/sdcard/system.img
d) copied /mnt/sdcard/system.img to windows file system
e) dd if=/dev/zero of=/dev/block/by-name/system (after that phone restarted and automaticly went into fastboot)
(adb exited)
f) fastboot flash system system.img
g) Flashed with success, system animation showing, but after longer time phone turning off.
Data looks to dumped correctly, but now question is how to restore it correctly? (i didnt check it well: todo)
Copy full disk image from Android to computer
I have a smartphone without the possibility to insert an SD-card. I would like to make a dump of the biggest partition (cause I lost files and I'd like to use a dump to recover them). The partition...
stackoverflow.com
How to stream an encrypted backup of the entire device to remote host?
I have an Android device that has no free space and no SD-card that I can replace (thanks to OnePlus policy). I also have no free space on PC to accommodate the backup so I wanted to upload it to the
android.stackexchange.com

How to backup my son's user data from our unrooted tablet where i am device owner

I'm trying to ensure my son's game and app data can be backed up from a tablet we both use so I can flash a rom (or even move to a new device). I am the owner of the tablet. He is connected to my google account with google family link. I have access to all passwords and pins. Device is not rooted.
As far as I can tell, I can't root the device without a factory reset (an older lenovo tablet, though I believe my overall goal is independent of device brand and model). That would obviously cost him his data. I can't use google's native backup and restore functionality I believe (as I think only the device owner can use that). I can't make him the device owner, without a factory reset (again, costing him his data). I can't get his data with titanium backup I believe (which i've used for myself in the past), since the device isn't rooted.
I'd appreciate any help on this. I've searched fruitlessly for quite some time.
Thanks!
You need to start mobile in recovery mode. You need sd card on mobile.
You will get option backup user data under recovery mode.
Those data backup on sd card.
Mobilelearner said:
You need to start mobile in recovery mode. You need sd card on mobile.
You will get option backup user data under recovery mode.
Those data backup on sd card.
Click to expand...
Click to collapse
Thanks for the reply. It's just a stock tablet, no recovery is flashed yet (I'm assuming a recovery would wipe data for my device but I'll take a look) Or perhaps you are implying a stock recovery, which I'll check if one exists (android 7.x)
brady747 said:
Thanks for the reply. It's just a stock tablet, no recovery is flashed yet (I'm assuming a recovery would wipe data for my device but I'll take a look) Or perhaps you are implying a stock recovery, which I'll check if one exists (android 7.x)
Click to expand...
Click to collapse
Ever since Android OS first saw the light of day, an Android device by default has had Stock Rcovery, unless it gets removed from device.
Hint: Use ADB to backup / restore apps & their data.
brady747 said:
Thanks for the reply. It's just a stock tablet, no recovery is flashed yet (I'm assuming a recovery would wipe data for my device but I'll take a look) Or perhaps you are implying a stock recovery, which I'll check if one exists (android 7.x)
Click to expand...
Click to collapse
Use volume and power button to start mobile in recovery mode. Then you will get option of backup user data.
simple use adb its reliable fast and safest method you can use. even if you are new to this thing you just need a computer and copy paste commands from google to backup/restore app data.
Thank you all! I'm on it. Now, onto the fun of old products and adb/usb drivers.

Recovering Data from TWRP Back Up

Hello, I have a bit of a conundrum, yesterday I was tinkering around with my phone and when I went to restart it, it wouldn't boot.
So I went into TWRP and made a backup of everything and started to try and get it to boot.
I copied the back up data to my PC.
After a few hours of trying to get it to boot I decided it wasn't worth it and wiped the phone and reinstalled everything.
Thing is I had a google authenticator on the phone and it was wiped when I did the format.
I assume since I did the TWRP back up the authenticator data was back up as well, at least I hope so.
I checked online it said that you can manually extract that data with a adb command.
("adb pull /data/data/com.google.android.apps.authenticator2/databases/databases")
I was wondering is it possible to access that data from the TWRP Back Up on my PC?
I really don't want to have to wipe my new installation as it already had new authenticators on its (excluding the Google one)
Could it be possible to create an android emulator on the PC recover the data?
I had trouble accessing and manipulating data during the recovery process so I dont wanna re-brick and un-brick my phone for nothing.
Any help would be appreciated.
In principle the backups what TWRP creates are .TAR files, but unfortunately TWRP uses a custom build of tar so you cant read / extract them by means of Android's tar or Windows's tar, you need TWRP to so.
You can install TWRP on Google's Android Emulator. More info here:
How to install TWRP Recovery on Android Emulator [Guide] | dotTech
A custom recovery partition is just as useful on an Android Emulator as it is in a smartphone. There is nothing stopping you from installing a custom ROM on the Android Emulator and shifting away from the stock ROM. Further, you'll reap the benefits of other features your custom recovery has on...
dottech.org

Question My G100 Un-rooted Itself

I could be mistaken, but it seems as though my G100 has returned to a non-rooted state.
Yesterday morning I was finally able to move the slider for OEM-unlock under Developer Settings.
So I installed Magisk on my device, downloaded a stock firmware using the RSA tool from Lenovo, patched the boot.img using Magisk on my phone, and was able to write that to my phone using the [fastboot flash boot boot.img] command.
And all seemed to be well. I even had my carrier and everything working on it last night and had begun restoring my apps and data with Titanium Backup.
And then suddenly Titanium Backup is reporting it is unable to gain root access. Magisk seems to still believe that the phone is rooted, and Titanium Backup still shows up in it's list. I still see the notification pop up when Titanium Backup launches, saying that it was granted Superuser access. But Titanium Backup has it's own internal popup that says it couldn't acquire root using /system/bin/su
I've tried re-writing my boot.img via fastboot as before, and there is no change in the symptom.
Anyone have any ideas?
I've performed a factory reset on my device, and the command [fastboot flash boot boot.img] again, and it seems to be working.
Titanium Backup is working, but seems to be unable to restore some things. I've reached out to them to see if anything can be done.
After further investigation, it seems the "root" I have obtained so far with the stock ROM is not really root at all. It does allow some root operations, but many are simply blocked on Android 11 by default.
I suspect my only path forward is to install a custom ROM.
Looked into this a bit more and found that disabling the option:
Verify apps over usb
Under developer settings allows Titanium Backup to proceed for most of my restores.
Also, it seems Titanium Backup is deprecated, so that's fun. Edit: Titanium Backup was able to restore most of my applications after the above change, but many of the restored applications simply don't work.
Going to try out Swift Backup.

Categories

Resources