Can not build DFU

Hi, this is not directly Fedora related but I had a dual boot going with macOS and ALARM. In preparation to install Fedora next month, I decided to delete my existing Asahi Linux APFS container and volumes to free up the space. I saw on reddit that marcan said to not use the wipe-linux script so I was going through the process manually. Somewhere along the line I mistyped and ended messing up my recovery partition and now my M1 MBA is no longer bootable.

No big deal, Partitioning cheatsheet · AsahiLinux/docs Wiki · GitHub states “Apple Silicon machines cannot be bricked” so I tried the double tap method first but that didn’t work so the next step is to install DFU to reflash the whole machine. I had Debian 11 installed on a spare SSD so I booted into that and followed the quick guide to install it but got stuck trying to build the first package “libimobiledevice-glue” as that requires libplist 2.3 but I can only install libplist 2.2 from the repo. Maybe I needed to upgrade my distro so I checked which version is in the Debian sid and Ubuntu 23.10 repos and those also only have 2.2. This is where I’m stuck at so I would be very appreciative if anyone advise how I should proceed, thank you very much.

I managed to progress futher by building idevicerestore using these commands:

apt update
apt install -y build-essential git autoconf automake libtool-bin libreadline-dev libusb-1.0-0-dev libplist-dev libcurl4-openssl-dev libssl-dev libzip-dev zlib1g-dev libusbmuxd-dev python3 cython3 gawk pkg-config

ln -s /usr/bin/python3 /usr/bin/python
git clone https://github.com/libimobiledevice/libplist.git && \
    cd libplist && \
    ./autogen.sh && \
    make -j && \
    make install && \
    cd ..
git clone https://github.com/libimobiledevice/libimobiledevice-glue.git && \
    cd libimobiledevice-glue/ && \
    ./autogen.sh && \
    make -j && \
    make install && \
    cd ..
git clone https://github.com/libimobiledevice/libimobiledevice.git && \
    cd libimobiledevice/ && \
    ./autogen.sh && \
    make -j && \
    make install && \
    cd ..
git clone https://github.com/libimobiledevice/libirecovery.git && \
    cd libirecovery && \
    ./autogen.sh && \
    make -j && \
    make install && \
    cd ..
git clone https://github.com/libimobiledevice/idevicerestore.git && \
    cd idevicerestore && \
    ./autogen.sh && \
    make -j && \
    make install && \
    cd ..
ldconfig

but now when trying to flash am getting this error: https://i.imgur.com/Y3rPNon.png

Here is full debug log: irecv_event_cb: device 00053062018a001e (udid: N/A) connected in Recovery mode - Pastebin.com

It is possible to recover from a deleted recovery partition without a DFU restore if there’s still an bootable linux installation. I guess that’s not the case here anymore.
I can’t really say much about the errors but you might have more luck with a macOS 12.x based IPSW. If not the issues might be fixed by this idevicerestore pull request: https://github.com/libimobiledevice/idevicerestore/pull/586

You already got idevicerestore running, but for future reference: we do have the latest idevicerestore and related stack in Fedora, but it’s only available on Rawhide at the moment, not in Fedora Linux 38: Overview - rpms/idevicerestore - src.fedoraproject.org

I compiled idevicerestore from kaizensparc’s mac-mini-m2-pro fork and used UniversalMac_12.0.1_21A559_Restore.ipsw but still getting errors like

ERROR: Unable to send iBootData component: Invalid input
ERROR: Unable to send iBootData to device.
ERROR: Unable to send component 'iBootData' to device.
ERROR: Unable to send components supposed to be loaded by iBoot
ERROR: Unable to place device into restore mode

I think I may have to go to Apple for them to fix this?

well I went to my local Apple store, told them about recoveryos and it not booting and they’ll be fixing it in 2 days free of change so I guess this is now resolved.