-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
temp fix for users bootstrapping their device without having a rootfs snapshot #41
base: master
Are you sure you want to change the base?
Conversation
… snapshot, without this fix the device is first bootstrapped and then snappy creates a new snapshot instead of renaming because it can't find it. (this fix just moves the snappy commands to before disk0s1s1 is mounted r/w) i don't really know snappy's syntax so that's why i didn't actually fix it, that might come another time if i can get my hands on a snapshotless unbootstrapped checkra1n device to test things
Yes, the intention of snapshot part in the original code (that you propose to patch) is not entirely clear. IIUC the script can be initially launched from:
Assuming jailbreak procedures always create a snapshot, updating the snapshot as done here by the script shouldn't be needed in case 1 nor 2. It could be useful in case 3. But since @m1stadev / @coolstar what's your opinion on this topic? -- |
Back when I made this PR there was an issue of users futurerestoring their FaceID device to iOS 14 with iOS 15 SEP, since that combination is partially incompatible on FaceID devices you'd have to interrupt the restore when it gets stuck on installing FaceID firmware. However the snapshot of the rootfs is created after this so it wouldn't get created in this case. As i said in the PR description that is a problem since Checkra1n doesn't do anything with the snapshot until you bootstrap Elucubratus which we don't want. I am not up-to-date with the snapshot issue on faceID devices with partially incompatible SEP so I don't know if this is still relevant (the issue should be fixed regardless imo but in that case properly). I'm not sure what your intent was with this comment, do you have any question? Anyways I hope this clears up some confusion. |
Thanks for your comment. I was not aware of the context your provided.
My intention was twofold: 1) try to get some attention to this issue because your patch made sense to me, yet it had not received any comment (I do not understand the rationale behind the code currently in It'd be interesting to know what do the maintainers think about this part of the code |
Ohh now you comment makes sense! The script is for odysseyra1n so you can basically take the situation checkra1n creates for granted. So, rootfs is nit bootstrapped but there is a basic bootstrap including snappy in a ramdisk that's mounted. But checkra1n doesn't do anything with the snapshot. So I think this is just an oversight. Someone without a snapshot is quite rare anyways.
|
Thanks for your comment. I think I confused the intent of your patch with my own doubts about where/when is the snapshot being made; checkra1n's code would be helpful but I could not find it, do you know who (what tool) creates the initial snapshot and when? Since this script is naming the snapshot |
The snapshot is usually madeby the restore/update process. Stock iOS mounts the snapshot as root instead of the actual underlying fs. However since some people have to interrupt the restore you can end up without one. The reason checkra1n doesn't do this is because checkra1n doesn't force you to bootstrap. This is precisely why odysseyra1n works. If you bootstrap with elucubratus in the checkra1n loader app instead, it does fix the snapshot for you. |
Thanks for the insights. For what is worth, I continued trying to figure out this and came across this comment too: checkra1n/BugTracker#1052 (comment) which together with your explanations helped me understand this better. Sorry if this kind of sidetracked your PR 😬 |
Glad to help! Hehe it's okay, I hastily made this PR because I thought this was an issue that would occur a lot and should be fixed asap. (If checkra1n even comes out for iOS 15 then it might become a bigger issue again.) I should actually redo this fix properly some time. |
without this fix the device is first bootstrapped and then snappy creates a new snapshot instead of renaming because it can't find it. this will cause orig-fs to have procursus's bootstrap in it thus making it impossible to properly restore rootfs to stock. (this fix just moves the snappy commands to before disk0s1s1 is mounted r/w) i don't really know snappy's syntax so that's why i didn't actually fix it, that might come another time if i can get my hands on a snapshotless unbootstrapped checkra1n device to test things