From 52d92bde7518de1d240dd1da63e2ead61a240af9 Mon Sep 17 00:00:00 2001 From: Tucker Date: Wed, 6 Dec 2023 17:04:47 -0600 Subject: [PATCH] allow SCSI medium removal after the restore process in order to reboot the iPod post-restore, you have to first allow medium removal (SCSI `0x1e`) before stopping it (SCSI `0x1b`). after a firmware payload is sent, this reliably restarts the iPod. I haven't been able to reboot the iPod post-upgrade without it. tested on n3g. --- pkg/usbms/ipod.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/usbms/ipod.go b/pkg/usbms/ipod.go index 8a09942..68dec08 100644 --- a/pkg/usbms/ipod.go +++ b/pkg/usbms/ipod.go @@ -175,6 +175,14 @@ func (h *Host) IPodFinalize(reset bool) error { } if reset { + cbd = &CommandDataBuffer{ + OperationCode: 0x1e, + Request: []byte{0, 0, 0, 0}, + } + if err := h.RawCommand(cbd); err != nil { + return err + } + cbd = &CommandDataBuffer{ OperationCode: 0x1b, Request: []byte{0, 0, 0, 2},