#asahi-dev · 2022-12-02 19:10
svennicolas17: i'd start with idevicerestore first and if there's nothing there go to AC2 :D#asahi-dev · 2022-12-02 19:09
dsharshakovsven: great idea to do before nuking a test machine#asahi-dev · 2022-12-02 19:09
nicolas17sven: you mean while running AC2, in case this is actually a missing idevicerestore feature :P#asahi-dev · 2022-12-02 19:09
dsharshakovyeah, but to restore the machine AC2 needs to grab the ECID and somehow match it to the machine data#asahi-dev · 2022-12-02 19:09
sveni mean.. maybe just dump all traffic while running idevicerestore and check if there's NOR calibration data in there#asahi-dev · 2022-12-02 19:09
amarioguythese are thousand dollar+ machines there's a reason almost no one wants to do it :P#asahi-dev · 2022-12-02 19:08
nicolas17did anyone *actually* screw up the NOR contents including serial number, and do a DFU restore, and the restore tool recovered the data from Apple based on the ECID (exclusive chip ID)? there were theories that it worked that way but idk if anyone took the risk and tried it#asahi-dev · 2022-12-02 19:08
amarioguynicolas17: yep#asahi-dev · 2022-12-02 19:08
dsharshakovBefore enabling users to nuke the NOR somebody has to be sure to know how to restore that#asahi-dev · 2022-12-02 19:08
nicolas17syscfg?#asahi-dev · 2022-12-02 19:07
amarioguySN is part of that region i told you earlier#asahi-dev · 2022-12-02 19:07
amarioguyi don't think this pertains to backups tho#asahi-dev · 2022-12-02 19:07
amarioguyit's part of the update personalization process#asahi-dev · 2022-12-02 19:07
amarioguythink like a ID unique to every soc that comes off the factory line#asahi-dev · 2022-12-02 19:06
dsharshakovECID is what, sorry?#asahi-dev · 2022-12-02 19:06
nicolas17dsharshakov: I'm not sure if that was actually *tested*#asahi-dev · 2022-12-02 19:06
amarioguywhat they have is an 'ECID' burned in#asahi-dev · 2022-12-02 19:06
amarioguySoCs don't have the SN burned in#asahi-dev · 2022-12-02 19:06
dsharshakovThere's a burned-in SN in the SoC itself so restore tool can just grab backups from the Apple online?#asahi-dev · 2022-12-02 19:06
amarioguy(this is from an nvram -p run on macos, entirely possible i missed something) #asahi-dev · 2022-12-02 19:05
amarioguyfwiw it doesn't look like nvram has any property that can't be restored with a DFU restore#asahi-dev · 2022-12-02 19:04
dsharshakovWell, since nvram has more use cases, this makes more sense than working around to receive the bt pairing data from ADT. Also this way devices paired in Linux could be made working with macOS/recoveryOS#asahi-dev · 2022-12-02 19:02
jannauyes#asahi-dev · 2022-12-02 19:02
dsharshakovSo it'll be read from NOR, not using the ADT proxied data?#asahi-dev · 2022-12-02 19:01
jannauthere is a nvram driver under development#asahi-dev · 2022-12-02 19:01
jannauonly in sysfs, ls -ld /proc/device-tree: "/proc/device-tree -> /sys/firmware/devicetree/base"#asahi-dev · 2022-12-02 19:00
dsharshakovwell, then it's likely to be considered public to the apps. Well, maybe there're some examples of passing sorta secret data from bootloader to Linux in other OF systems?#asahi-dev · 2022-12-02 18:59
j`eydsharshakov: DT is in sysfs and proc#asahi-dev · 2022-12-02 18:58
dsharshakovjannau: how can non-root user read the DT info?#asahi-dev · 2022-12-02 18:57
dsharshakovamarioguy: got your msg. IIRC marcan had the same findings, that ID info loss will likely break DFU as well, so will likely need employees regenerating the data#asahi-dev · 2022-12-02 18:56
sven*sigh*#asahi-dev · 2022-12-02 18:56
dsharshakovBut how to do it (pass ADT pairing to bluetoothd) sanely? Reserved memory page created by m1n1, copy adt pairing data there and then expose the page as a virtual device from the kernel?#asahi-dev · 2022-12-02 18:56
amarioguyyep#asahi-dev · 2022-12-02 18:55
sventhe bt stack needs the keys in plaintext#asahi-dev · 2022-12-02 18:55
svenamarioguy: I know, it makes no sense at all to use sep for this#asahi-dev · 2022-12-02 18:54
dsharshakov"it would be readable by every user" might be the case if you simply place it there. But if it's an nvram device node, user cannot access it. `cat /dev/nvram` gives me permission error on my AMD machine#asahi-dev · 2022-12-02 18:53
dsharshakov"do you mind hopping in asahi-re" - no problem, write there, I might just read from logs if I have no questions#asahi-dev · 2022-12-02 18:53
jannauI thought of transferring the bt keys to the devicetree but as far as I can see it would be readable by every user#asahi-dev · 2022-12-02 18:52
dsharshakov"in the nvram proxy data in the ADT" seems someone needs to expose the adt node as a efuse-like node in OF DT and then as a nvram device to userspace so that bluez can get it either directly or using our initramfs scripts#asahi-dev · 2022-12-02 18:51
amarioguyi'd rather not say it here due to well people wanting to avoid binary re talk#asahi-dev · 2022-12-02 18:51
amarioguydsharshakov: do you mind hopping in asahi-re#asahi-dev · 2022-12-02 18:51
dsharshakovamarioguy: what it is? Is there a map or description of what is in the NOR?#asahi-dev · 2022-12-02 18:51
amarioguyoh#asahi-dev · 2022-12-02 18:51
jannaukeys of paired bt devices are in nvram and in the nvram proxy data in the ADT#asahi-dev · 2022-12-02 18:51
amarioguydo you mean hardware pairing keys?#asahi-dev · 2022-12-02 18:50
dsharshakovamarioguy: well, that was not a surprise. I just supposed sep could be involved in storing the pairing keys as they're sorta secure material. however, not to that extent#asahi-dev · 2022-12-02 18:49
amarioguybut yes, there is one part of NOR you really don't want to touch#asahi-dev · 2022-12-02 18:46
amarioguysven, dsharshakov: i have it on fairly good authority BT pairing is not sep#asahi-dev · 2022-12-02 08:13
ChaosPrincessI have already "tested" corrupting nvram, just interested in what happens if the rest of the nor is corrupted#asahi-dev · 2022-12-02 07:56
dsharshakovspeakers are one of those, and nvram might be so as well (needs testing). Anything else seems to be unbreakable thanks to SMC and other hardware handlers of critical things