Samgisaninja / SuccessionRestore

Restore iOS devices without updating via rootfilesystem DMG
GNU General Public License v3.0
406 stars 90 forks source link

Truncated rfs.dmg file being created and used causes "stuck on attaching" issue #114

Closed valentine closed 4 years ago

valentine commented 4 years ago

I am using the latest release, 1.4.12, and am aware of https://github.com/Samgisaninja/SuccessionRestore/issues/84 and https://github.com/Samgisaninja/SuccessionRestore/issues/89.

I tried doing an "only restore system data" on my iPhone XS 64GB earlier and was stuck on the "Attaching" screen. After a few tries at debugging and manually mounting the rfs.dmg file on my Mac, I found out that it was only 189.1MB and did not contain any usable APFS partitions. Succession still allowed me to mount the DMG without validating it.

I've had luck manually extracting the filesystem DMG from the IPSW, renaming it, and doing the restore (I believe a proper rfs.dmg for an iPhone XS should be around 3.5GB), but there's probably a bug allowing for the truncated rfs.dmg to be created. My iPhone has around ~4GB of space free before I copied the IPSW over, so that could explain why the DMG was truncated.

This is my succession.log:

[SUCCESSIONLOG 1.4.12~b1: 2020-01-31 00:11:38 +0000] Line 209: I am: 501
[SUCCESSIONLOG 1.4.12~b1: 2020-01-31 00:11:38 +0000] Line 217: changedDevContents: 
[SUCCESSIONLOG 1.4.12~b1: 2020-01-31 00:12:22 +0000] Line 92: Mountpoint exists, continuing
[SUCCESSIONLOG 1.4.12~b1: 2020-01-31 00:12:22 +0000] Line 167: attachDiskImage called!
[SUCCESSIONLOG 1.4.12~b1: 2020-01-31 00:12:22 +0000] Line 170: using hdik to attach disk image
[SUCCESSIONLOG 1.4.12~b1: 2020-01-31 00:12:22 +0000] Line 175: hdik /private/var/mobile/Media/Succession/rfs.dmg
[SUCCESSIONLOG 1.4.12~b1: 2020-01-31 00:12:22 +0000] Line 183: hdik completed with
hdik: must be run by root
Samgisaninja commented 4 years ago

You're currently using 1.4.12~b1, you should update to the latest version of succession, 1.4.12. The issue that's shown in your log will be fixed by the update.

As for "truncated DMGs don't work".... well duh they don't work. Succession has checks for that, see -(BOOL) isMounted in RestoreViewController's implementation