Conversation
baltpeter
left a comment
There was a problem hiding this comment.
Enabling and removing supervision did work in my tests, but SSH doesn't come back afterwards (#81 (comment)).
|
With my iOS 15 on palera1n-c, SSH does now come back after the userspace restart but I am still getting an error in Removing supervision doesn't throw an error, but that's only because it doesn't wait for the device to come back. If I wanted to run another command afterwards, it would fail. |
|
Curiously, on the other iPhone with iOS 16 (still on palera1n-legacy), it just hangs after removing supervision, even after the process is already done. Afterwards, I need to do "" in the palera1n app to get SSH back. Enabling supervision also hangs after the phone has "rebooted". |
|
Also, I wouldn't consider this ready to merge unless the device is actually ready to be used again automatically (i.e. unlocked) after enabling or removing supervision. |
|
I have researched a bit into how to unlock devices automatically, and I would like to finish this, but I am unsure of how much time I should poor into this now. I could try to get it done in 5 hours and if that works out fine we merge and if not, we move on for now. |
|
Five hours is a lot… |
| : never; | ||
|
|
||
| /** Simulates key presses to unlock the screen. This only works if no passcode is set on the device. */ | ||
| unlockScreen: () => Promise<void>; |
There was a problem hiding this comment.
Screen unlocking seems like something worthy of inclusion in the README feature list.
| python('pymobiledevice3', ['processes', 'ps', '--no-color']).then(({ stdout }) => | ||
| Object.values(JSON.parse(stdout) as Record<string, Record<string, string>>).some( | ||
| (p) => p['ProcessName'] === 'assistivetouchd' | ||
| ) | ||
| ), |
There was a problem hiding this comment.
Why not use Frida's device.enumerateProcesses() since we need Frida here anyway?
| Object.getOwnPropertyNames(atServer) | ||
| atServer._home() |
There was a problem hiding this comment.
| Object.getOwnPropertyNames(atServer) | |
| atServer._home() | |
| Object.getOwnPropertyNames(atServer); | |
| atServer._home(); |
| ); | ||
| // TODO: Enable AssistiveTouch automatically. This can be done via lockdownd, but is not supported by pymobiledevice3, yet. | ||
| }); | ||
| // Since assistivetouchd always crashes after the simulated home button press, we need to wait for it to restart. |
There was a problem hiding this comment.
I can't reproduce that crashing on either of my iPhones. But I guess if you want to keep the waiting, you should also wait after the second home button press. Otherwise, I would two unlockScreen() calls to fail1 on your device.
Footnotes
-
With a prompt to enable Assistive Touch, which is wrong in that case. ↩
| */ | ||
| setupEnvironment: () => Promise<void>; | ||
| ensureFrida: () => Promise<void>; | ||
| /** |
There was a problem hiding this comment.
You should advertise enabling and disabling supervision without resetting on rooted devices in the feature list as well.
| ('supervision' extends Capability | ||
| ? { | ||
| /** | ||
| * The password of the private key of the supervision certificate, defaults to `appstraction` if | ||
| * not set. | ||
| */ | ||
| supervisionKeyPassword?: string; | ||
| } | ||
| : unknown); |
There was a problem hiding this comment.
Didn't we say we wanted to disable the capability until it is actually needed for anything?
|
I'm still getting ECONNRESET in the supervision operations during the reboot: And I'm pretty sure you've already spent a lot more than 5 hours… |
No description provided.