If you have a working phone you might want to backup all your partitions - Sprint HTC One (M8)

Sneakyghost in the General M8 forum wrote a script to "image" all your partitions.
I ran it on mine before updating anything. I forget if it needs S-OFF, Root etc. What ever is required for ADB.
http://forum.xda-developers.com/showthread.php?t=2696826
I would not share your backed partitions though, these would only for the specific phone you imaged. There is a lot of phone specific information in many of the partitions.

Related

Dual booting 1.2 on main partition

I wanted to add this as a reply to the existing How-To guide in Android Development, but I don't have sufficient permissions to post in that forum.
The 3 guides currently in that forum are very detailed, and consequently very complex. If you haven't rooted a NC yet and/or have not set up dual booting yet, you should use those guides. However, having done both of those things several times, I think it would be helpful to have a brief overview of the steps to take to 1) Install 1.2 and 2) Set it up to dual boot.
I also wanted to have 1.2 on my main partition so that I could keep it up-to-date with new flashable roms as they come out, but leave my old 1.1 setup on the second partition, so that I could always go back to a ROM that I knew was functional for me. Setting it up this way took a few extra steps.
To get all the files you need, you'll have to go throug the Android Development forum. This post is only for the overall steps, and the order to take them in:
1)If you're already set up to dual boot, it's probably a good idea to remove that and go back to a single partition. (This will erase the ROM you're running on your second partition)
2)Create a nandroid backup of whatever ROM you're currently using and enjoying. (You can only backup the ROM on your primary partition)
3)Upgrade to 1.2
4)Root 1.2
5)Set up dual booting (flash the dual boot prep .zip)
**If you want to run 1.2 as your primary partition, here's where the tricky part comes.**
6)Now boot into CWM and create a nandroid backup of your rooted, dual-boot-prepped 1.2.
7)Boot into CWM and restore whatever custom ROM you want as your secondary partition. THIS WILL ERASE your 1.2 setup, so make sure you've got it's backed up
8)Flash the eclair-to-dual-boot.zip. This will copy whatever ROM you just restored onto your secondary partition.
9)Restore the backup you made of your rooted, dual-boot-prepped 1.2
Now you've got 1.2 set to boot up by default, and you can flash new kernels, new ROMs, etc... You've got a different ROM (in my case rooted 1.1) set to boot when holding power+n.
If you wanted 1.2 as your secondary (power+n) partition, at step 6 you'd flash eclair-to-dual-boot.zip, and then restore whatever ROM you like as your primary, and you'd be done.
Hope this helps someone. It would have helped me.
I don't really know what the forum etiquette is, but if I need to go through and add links to the files, threads, etc... and add credits, someone please let me know and I'll do that later.

[Q] Basic questions about flashing ROM's new build and TWRP

I have a rooted KFHD 7” (gen 1) with TWRP. I have a few questions about rooting in general. I’ve rooted several devices in the past but with extensive hand-holding so I still don’t completely understand the process. I’ve tried looking for general explanations but my search has come up empty so far.
1. The KFHD is running an early CM11 build with some functions missing (cannot install ANY Amazon apps, Netflix via HDMI glitches, etc). I want to flash a more recent CM11 build that supposedly has those issues ironed out.
- Do I have to wipe all data before I flash to the new CM11 build? Do I have to flash new GAPPS? Will TWRP backups from the earlier build still work after I flash a new build? When do I wipe cache and delvik cache, and what are they exactly?
2. These questions are related to TWRP. I made a backup back in April 2014 when I first rooted the KFHD, and then created another one yesterday. Why do I see only the backup I made yesterday when I boot into TWRP? I am asking because the TWRP folder is about 5gb, which is a lot of space on a 16gb KFHD. I want to delete the older backup and perhaps minimize the size of future backups. Please see picture attached for a screen cap. Only the first file "boot.emmc.win" is cut off (it is a 8mb that I assume to be important). Which files can I delete? Like I said, I don't see the April 2014 backup when I booted into TWRP.
3. Also for TWRP: what is the difference if I made a backup with or without “data” checked? I experimented yesterday and made 2 backups – one with “data” and one without “data”. I first recovered with the “with data” backup to check if it works fine, then boot into TWRP and recovered with the “without data” backup. Everything seems to be the same and nothing’s lost – is it because I didn’t wipe the KFHD before I restore with the "without data" backup? If I wiped the KFHD and then restore with the “without data” backup, what kind of difference would I see?
Sorry for the essay. Really want to learn the basic principles of rooting.
1. Go into settings>about tablet>cyanogenmod updates>check for updates. M7 should be on the list, press the button to the right and it should update, as long as you are on cm 11 already this procedure is fine and no gapps update is needed.
2. The backups from earlier don't show because twrp was fixed a while back and now reads our serial number, notice the backups are probably in a folder that random alpha numeric characters and another that is a ton of zero's, when ESN was able to be read it stored our backups in the folder with our correct ESN rather than a fake ESN made of zeros. Either move that backup from the 0's folder or delete it, it will be then old one.
3.with data backs up the userdata partition, basically all of your user installed apps and their appdata.
Sent from my Amazon Tate using Tapatalk

Full image backup without unlocking bootloader?

Hi,
Pls pardon my noob questions...
I just gotten my 3T about a week now and after spending over 3 days setting up everything from scratch (eg installing numerous apps and configuring them one by one, setup emails, sms, contacts, icons packs, settings, etc) and finally gotten the phone to a state where I am very satisfied, a question dawn on me - How can I do a full image backup so that if anything happens, I can do a full image recovery and get back the "perfect" state?
After doing so much reading, it seemed the full image backup is called a "nandroid" backup and I need to first unlock the bootloader and flash TWRP in-order to perform this backup. But my predicament is, if I proceed to unlock bootloader, then all my configurations, setups and data will be wiped. So it became a chicken and egg scenario.
And the 2nd problem is that, worst comes to worst I decide to bite the bullet and proceed with unlocking and flashing TWRP, when booting into TWRP can I select "read only" and not agree with modified system since I have no intention to root. Will this cause boot loop problem if it is "read only"?
Can "read only" state in TWRP allows me to perform nandroid backup and restoration later on?
May I skip the next step of flashing anti dm verity file / root? I don't really want to go root since I am very happy with stock OOS at the moment.
So the big question is, is there anyway out there in the universe where I can do as close as possible to a nandroid backup without going bootloader unlocking route as that is not an option for me as I can't afford to have all the data, settings and configurations wiped. I heard about Helium app which can backup app data but that's about it. Everything else has to be setup from scratch.
Zegnalabel said:
Hi,
Pls pardon my noob questions...
I just gotten my 3T about a week now and after spending over 3 days setting up everything from scratch (eg installing numerous apps and configuring them one by one, setup emails, sms, contacts, icons packs, settings, etc) and finally gotten the phone to a state where I am very satisfied, a question dawn on me - How can I do a full image backup so that if anything happens, I can do a full image recovery and get back the "perfect" state?
After doing so much reading, it seemed the full image backup is called a "nandroid" backup and I need to first unlock the bootloader and flash TWRP in-order to perform this backup. But my predicament is, if I proceed to unlock bootloader, then all my configurations, setups and data will be wiped. So it became a chicken and egg scenario.
Click to expand...
Click to collapse
Yes, a Nandroid backup is what you want, and yes, you need an unlocked bootloader for that, and yes, you need to wipe your data to do that. That's why it's highly recommended that unlocking your bootloader is the first thing you do as soon as you get your phone (though that's obviously too late for you). To help ease the pain, you can do an adb backup as described at http://forum.xda-developers.com/showthread.php?t=1678239. This will preserve most but not all of your stuff, and doesn't need an unlocked bootloader. Once you do that, you can unlock the bootloader, restore the adb backup, then take a nandroid backup.
Zegnalabel said:
And the 2nd problem is that, worst comes to worst I decide to bite the bullet and proceed with unlocking and flashing TWRP, when booting into TWRP can I select "read only" and not agree with modified system since I have no intention to root. Will this cause boot loop problem if it is "read only"?
Can "read only" state in TWRP allows me to perform nandroid backup and restoration later on?
May I skip the next step of flashing anti dm verity file / root? I don't really want to go root since I am very happy with stock OOS at the moment.
So the big question is, is there anyway out there in the universe where I can do as close as possible to a nandroid backup without going bootloader unlocking route as that is not an option for me as I can't afford to have all the data, settings and configurations wiped. I heard about Helium app which can backup app data but that's about it. Everything else has to be setup from scratch.
Click to expand...
Click to collapse
Yes, you should mount /system read-only. You don't need to root or disable dm-verity as long as you do that. (By the way, Helium is pretty much just a nice wrapper around adb backup.)
josephcsible said:
Yes, a Nandroid backup is what you want, and yes, you need an unlocked bootloader for that, and yes, you need to wipe your data to do that. That's why it's highly recommended that unlocking your bootloader is the first thing you do as soon as you get your phone (though that's obviously too late for you). To help ease the pain, you can do an adb backup as described at http://forum.xda-developers.com/showthread.php?t=1678239. This will preserve most but not all of your stuff, and doesn't need an unlocked bootloader. Once you do that, you can unlock the bootloader, restore the adb backup, then take a nandroid backup.
Click to expand...
Click to collapse
Many thanks Joseph for your advice! I really appreciate it! You're totally right, I'll do an adb backup followed by bootloader unlocking and TWRP installation. :good:
Yes, you should mount /system read-only. You don't need to root or disable dm-verity as long as you do that. (By the way, Helium is pretty much just a nice wrapper around adb backup.)
Click to expand...
Click to collapse
May I further check with you what are the limitation bring about when choosing "read only" when first enter TWRP? As in won't be able to flash ROM, flash supersu, etc thereafter?
Once again, thanks for your help, Joseph!
Zegnalabel said:
May I further check with you what are the limitation bring about when choosing "read only" when first enter TWRP? As in won't be able to flash ROM, flash supersu, etc thereafter?
Click to expand...
Click to collapse
All it means is that you won't be able to modify /system with file manager or the shell. Flashable zips almost all contain code that remounts /system read-write (as the TWRP screen warns you about). Also, you can always change your mind and make it read-write later (though the reverse is not true; once you mount it read-write, putting it back to read-only doesn't fix anything unless you reflash the ROM).
Many thanks Joseph for your sound advice.
After taking some time to read through all the links and sub-links getting to know the varied means of backups available, I have decided that my backup strategy will be as follows since non of the methods offer comprehensive backup and a mixed of the lots will be required to get as fool-proof as possible, before embarking on a data wiping journey with bootloader unlocking.
(i) I first perform a backup using google native backup and restore function under setting no matter how limited it is, to be use as a safety net.
(ii) Next, adb backup. The limitation with adb backup is that since Android 6.0, it obeys AndroidManifest.xml and will not backup data of those apps which has android:allowBackup set to false. The challenge is, I will be held in the dark which app falls into this category when performing adb backup and won't know until after I had done the actual restoration. Its like a blackbox you won't know what you gonna face until the aftermath had hit. Therefore to get around this, I'll be using Helium app (a wrapper around adb backup) instead of the actual adb backup since both methods refer to AndroidManifest.xml when deciding which app data it can or cannot backup. And Helium shows exactly which app it can backup vs that which it can't. Good info there for a start.
After installing Helium and activating it via PC client, I found out it does backup:
A) SMS and call logs
B) User dictionary
C) Accounts
D) Bunch of apps and their data
List of apps and data it can't backup:
1) Contacts
2) browser bookmarks
3) Calender
4) System settings
5) APNs
6) Homescreen shortcuts
7) Widgets
8) Alarms
9) Photos
10) Music
11) Videos
12) MMS
13) Google AUTHENTICATOR!!! - I have over 15 profiles that I'll have to re-setup one by one... what a nightmare.
14) Line
15) Whatsapp
16) wechat
17) Signal
18) Nova launcher - luckily its setting can be exported and backup via the app's functionality.
19) QQMusic - all my thousands of songs! - even if I back this up manually using ES explorer the app's internal linkage between playlist to songs will be broken. Will have to re-download all the songs to repair linkage and this means wasting another month of subscription fees for songs re-download. This is one of the most problematic app but it has DTS plagin which makes your music sound fantastic even with cheap earpiece, so I am putting up with it.
20) Skype - not much chat in there so that's fine to start over.
(iii) After backing up the limited stuff using Helium, I shall proceed to use another app to backup (1) to (12). And that app will be "MyBackup" (https://play.google.com/store/apps/details?id=com.rerware.android.MyBackup&hl=en). The app developer confirmed in its app's features that (1) to (12) are supported. Note "MyBackup" does not backup any app data at all when device is not rooted therefore step one using Helium is still necessary.
(iv) Next, to circumvent the limitation with failure to backup app & data for (13) to (20), my initial thought were to patch each app's manifest using this method (https://forum.xda-developers.com/an...g/guide-how-to-enable-adb-backup-app-t3495117). But then, as I studied further, I realized another chicken and egg scenario. That is, the decompiling, editing, recompiling and signing of the patched apk would need to take place first before using the app and not after. So in another word this method with each newly patched app will not seemlessly replace the existing app but rather the existing app will first have to be uninstall before the patched app can be installed, and that very act would mean losing existing data altogether.
To install on android the patched apk, you must first uninstall your previous version, and this is because the key used to sign the apk is different. If you try to install one app itself with a different signing key, you will get this error: [INSTALL_FAILED_ALREADY_EXISTS] [Unquote]
Given this ****ty situation, I guess I am still hesitant and not ready to move forward with bootloader unlocking. Sigh...
Click to expand...
Click to collapse

With TWRP + Backups Working Now - Which partitions make sense to backup regularly?

Until now, no my rooted Samsung Note 3 I have automatic TWRP backups running every night. This just mirrors my paranoia that I will manage to screw up something and recovery via TWRP restore is often faster/easier/more complete than trying to do anything else. I do this using the OpenRecoveryScript and have always used this backup command:
backup DSBCR DailyBackup
Which gets data, system, boot, cache, and recovery. I plan to do the same now that I know to put the OpenRecoveryScript into /data/cache/recovery instead of /cache/recovery on my Note 3.
So my question here is what partitions make sense to backup on the V40? And by "sense" I mean something likely to change or get broken (by errant apps or, more likely, my own doing) AND having the ability to restore using TWRP restore from backup.
There are a ton of partitions on this device - most of which I know little/nothing about. I do know that the system and vendor partitions have duplicates and so those are not needed, I guess. And it seems that the OpenRecoveryScript backup command has no way to handle anything except the following anyway:
S: system,
D: data,
C: cache,
R: recovery,
B: boot,
A: and-sec,
E: sd-ext (I don't need the external SD)
So there would seem to be no way to get modem and all the others I don't know much about anyhow.
When I tried to use the same command as above, I ended up with only boot and data - which is a great start! I think I saw an error that system was not mounted so maybe that explains its absence - perhaps I need to mount it first in my script (which I never have had to do on my Note 3)? Even though my V40 is rooted with Magisk, I am making changes to system so I do want to back that up (so long as I can use it during a restore).
Does it make sense to try and backup recovery since things seem really different recovery-wise on this device? Same question for cache and boot?
Thanks for your tolerance of my newbie questions.
Well from empirical experience, it seems that there is no way to backup anything save boot and data. I was able to mount /system_root but that had no impact on backing up system. And I was unable to mount cache or recovery explicitly so those are out as well.
PS - for anyone using the old 123 special partition for backups, they are no longer supported. I have never used them but decided to try and see what happened - only messages that they are no longer supported.
Perhaps there is some other way to accomplish this? Suggestions welcome. Thanks
Thanks.
That I'm aware of recovery should backup as part of the boot partition....I could be wrong tho
Ainz_Ooal_Gown said:
That I'm aware of recovery should backup as part of the boot partition....I could be wrong tho
Click to expand...
Click to collapse
I guess that does make sense. Thanks. I am still trying to get my mind around the whole new situation (compared to my old Note 3).

Question Backup partitions from different GSI ROMs

Would it be possible to backup different images from different GSI ROMs to be able to test and restore each one without losing all the apps, configuration, etc. in the process.
For example:
1. Install "GSI name1" configure it, install apps, my Google account, etc.
2. Somehow, make a backup of the required partitions "backup name1" (At the computer?)
3. Install "GSI name2" configure it, install apps, my Google account, etc. (Not necessarily the same apps than before).
4. Somehow make a backup of the required partitions "backup name2".
5. Continue testing other GSI or restoring one of the previous ones from the backups and be able to use the phone as it was before, including apps, configuration, etc.
I can imagine two ways to face this task:
A. Using a custom recovery to backup partitions to SD card.
B. Using fastboot or mtk_client to backup partitions to the PC.
Would be easy? Possible? Not recommendable for some reason?
I am new on this flashing-bricking-sweating-unbricking thing, so I would appreciate feedback.
Thank you!
Hi
If your goal is to test the GSIs, it's easier to use the DSU-sideloader instead of the backup.
This app enables you to dual boot.
You will be able to move back and forth between images. Even if you get into a boot loop, you can return to the original image just by rebooting. 
If you have root, this app will be easier because there will be less operations.
https://github.com/VegaBobo/DSU-Sideloader
I have been taking a look to the DSU concept. It is interesting, but not what I want. Also, it requires the main ROM to be stock ROM (maybe in future is fine to use with custom ROMs).
DSU would be perfect if you want to keep romA and romB working in parallel in your daily life (for example, one for work and business and the other one for gaming and social apps).
What I want to do is to test romA for a while, move to romB for a while, if I prefer romA, reinstall it and forget about romB (literally, delete it). Maybe in few months, backup romA again and check romC for a while...
As I do not want to be swapping from one to another in daily life, it does not make sense to reserve space for having both simultaneously ready to work on the phone.
By now I have been learning about adb and recovery backup options. I need to check more during the next days, but I noticed that from Recovery, I can also use adb (it says not authorized device, but that is for not being rooted yet, I suppose). If it is possible to use adb from recovery after rooting, it would be easy to have a PC software for backing up ROMs easily (system, data and userdata partitions?).
I will keep researching about it...
The DSU does not have to be a stock rom.
It's just desirable.
Currently I have crdroid GSI as the first OS and the second OS is trying several OSs.
If you try it, you'll notice how easy it is.
Currently, TWRP does not support backup or encryption on Android 12. It is the same even if it is the official latest of other models.
I have a 128GB model, so it took too long to back up using mtkclient and I quit halfway through.
The problem is time and encryption, keep them in mind.
Currently, TWRP does not support backup or encryption on Android 12. It is the same even if it is the official latest of other models
Click to expand...
Click to collapse
Well, definitely untrue now as most devices have got it sorted out with decryption, Android 12 being a pain some devices got 13 done before 12, but as of the time you wrote this post my device Motorola stylus 22 5g Qualcomm, we hadn't figured out the decryption yet but you could definitely just patch your fstab in vendor either by hand or with DFE neo, to disable the encryption and TWRP would run fine. You would just have to make that first format reboot back to recovery immediately and while it still stays the data from a fresh format flash the other handy RO2RW re zip and DFE neo. Honestly the boot times are so much better without decryption I don't think I would go back as long as I've got a password on orange fox or whatever.

Categories

Resources