[Q] Cloning the /data partition between devices

NeverGone\RU

Senior Member
Oct 10, 2008
561
665
0
26
Moscow

Hi there!
What I'm trying to do is to "pre-configure" 70 devices (you read that right, 70) to have identical software/wallpaper/security settings/etc.
All devices are identical GT-N5100 with 4.1.2 (JZO54K.N5100XXBMD1) Android version.
The thing is, we absolutely _should_ keep the warranty and OTAs, therefore flipping the "System state" flag is definitely not what I want here.
I already tried backing up the device with adb backup, but this kind of backup doesn't contain all applications (specifically, those with android:allowBackup=false are not exported) and most of the settings (disabled apps' list or security settings)
So I came to a point that I _need_ to replace the whole /data partition. Which, obviously, requires custom recovery.
The main concern is, how to avoid triggering that "System state"?
Let's say I'll flash an alternate recovery image, backup/restore the system, then restore the original recovery, without booting into Android. Would that work, or since we change the flash counter, it will also cause the flag to change to "Modified"?
If it changes, could TriangleAway restore it back? Mind that I won't be able to wipe /data at this point, it defeats the purpose.
Again, I don't need root access on these tablets at all, I only need to have identical /data partition between them.
Any ideas?
Did anyone check that "recovery trick" I described?
Thanks in advance.
 

gooberdude

Senior Member
Oct 27, 2010
795
200
0

Hi there!
What I'm trying to do is to "pre-configure" 70 devices (you read that right, 70) to have identical software/wallpaper/security settings/etc.
All devices are identical GT-N5100 with 4.1.2 (JZO54K.N5100XXBMD1) Android version.
The thing is, we absolutely _should_ keep the warranty and OTAs, therefore flipping the "System state" flag is definitely not what I want here.
I already tried backing up the device with adb backup, but this kind of backup doesn't contain all applications (specifically, those with android:allowBackup=false are not exported) and most of the settings (disabled apps' list or security settings)
So I came to a point that I _need_ to replace the whole /data partition. Which, obviously, requires custom recovery.
The main concern is, how to avoid triggering that "System state"?
Let's say I'll flash an alternate recovery image, backup/restore the system, then restore the original recovery, without booting into Android. Would that work, or since we change the flash counter, it will also cause the flag to change to "Modified"?
If it changes, could TriangleAway restore it back? Mind that I won't be able to wipe /data at this point, it defeats the purpose.
Again, I don't need root access on these tablets at all, I only need to have identical /data partition between them.
Any ideas?
Did anyone check that "recovery trick" I described?
Thanks in advance.
Gosh your spinning your wheels on something so simple.

Install saferoot.zip on all 70 devices

On the completed master clone device
create a admin google account for system apps
add the admin google account and make sure play store has the admin account selected.
pay for Ti Backup Pro and install
set google account back to original google account if available.
setup Ti Backup to save on SD, etc... note: Ti Backup has a lot of options in pro, you will have to make sure things are set to your needs.
For example, remove Google store from apps, so you have control over updates.
Remove admin google account
Do a full backup on SD
Remove Ti Backup Pro from backed up apps

Copy SD to spare 2GB (minimum) SD chip(s)
Insert SD chip in each device to be slave cloned
If each device has already gone through initial setup, do a factory reset.
When google account is needed use the admin account for syncing the Ti backup Pro
Start Ti Backup Pro and do not change system ID by ignoring.
Set Ti Backup pro to use the SD card and do a restore missing apps + system data.
When prompted after starting... select XML.
Be sure to deselect the check box for ignore system...
Reboot and make sure everything looks good, if not you may need to restore again using Snapshot.
remove Ti Backup, and uninstall root within SuperSu as a wipe for reinstall.
Reboot again and you are done.

All wallpaper, Icons and folders, along with app settings will all be the same.

This is a 90% accurate way to do it, as I have no idea what apps you are using, custom or paid. You will need to fine tune what options you may need to add in the procedures given.
 

NeverGone\RU

Senior Member
Oct 10, 2008
561
665
0
26
Moscow
Gosh your spinning your wheels on something so simple.

Install saferoot.zip on all 70 devices

On the completed master clone device
create a admin google account for system apps
add the admin google account and make sure play store has the admin account selected.
pay for Ti Backup Pro and install
set google account back to original google account if available.
setup Ti Backup to save on SD, etc... note: Ti Backup has a lot of options in pro, you will have to make sure things are set to your needs.
For example, remove Google store from apps, so you have control over updates.
Remove admin google account
Do a full backup on SD
Remove Ti Backup Pro from backed up apps

Copy SD to spare 2GB (minimum) SD chip(s)
Insert SD chip in each device to be slave cloned
If each device has already gone through initial setup, do a factory reset.
When google account is needed use the admin account for syncing the Ti backup Pro
Start Ti Backup Pro and do not change system ID by ignoring.
Set Ti Backup pro to use the SD card and do a restore missing apps + system data.
When prompted after starting... select XML.
Be sure to deselect the check box for ignore system...
Reboot and make sure everything looks good, if not you may need to restore again using Snapshot.
remove Ti Backup, and uninstall root within SuperSu as a wipe for reinstall.
Reboot again and you are done.

All wallpaper, Icons and folders, along with app settings will all be the same.

This is a 90% accurate way to do it, as I have no idea what apps you are using, custom or paid. You will need to fine tune what options you may need to add in the procedures given.
I would do exactly this, but I need to keep devices "stock" for warranty purposes — I won't see any of them after sending them to customer. Hence, having root = "System state: modified" = no warranty. Yea I can unroot afterwards, but it might also fail and keep the "System modified" flag in place. Risky.
Thanks anyway, let's see how it goes.
 

gooberdude

Senior Member
Oct 27, 2010
795
200
0
I would do exactly this, but I need to keep devices "stock" for warranty purposes — I won't see any of them after sending them to customer. Hence, having root = "System state: modified" = no warranty. Yea I can unroot afterwards, but it might also fail and keep the "System modified" flag in place. Risky.
Thanks anyway, let's see how it goes.
I don't have any system state modified on my tablet. Saferoot does not flash. And will allow OTA and Kies to update without issues. You should at least look up the thread for saferoot and see its function. It installs the root not flashes it. The flash counter is what you are worried about. Though triangle away will reset the counter, and once cleared can be removed, if flashing a root. What keeps the counter coming back is the use of flashed custom ROMs.

I use to follow the popular threads on flashing and found that saferoot is exactly what it says, and I will not do any other rooting without it. That is how good it is.