-
Notifications
You must be signed in to change notification settings - Fork 194
Support J327AP devices #37
Comments
Ayyyeee, Yes, the missing patch was made to specifically address this issue. I don't really see any usage for supporting a display though. Does that even run apps or something? This, in fact, made me go to Apple's website to check. |
No, it cannot run non-apple code (when not hacked) |
It could be useful for security research.... |
well, it's small in size and fast to setup so it is desirable in a CI environment as long as you don't need anything from the 'big' iOS (also I have been thinking about USB networking for some time, probably ssh port forwarding + iproxy + vpn server in linux vm) |
@TrungNguyen1909 Actually it happens with 15.4 iPhone 11 kernels as well, so it is more of an iOS 15.4 problem than AppleDisplay problem. In addition it doesn't even boot now (both display and iphone kernel) This is the log of the iphone kernel:
iOS 15.3.1 also crashes with this panic, iOS 14.3 is fine. |
the temp fix here until iOS 15.4 is fixed is to use the iOS 15.3.1 kernel + devicetree + 15.4 ramdisk to do the restore but of course iOS 15.3.1 restores still does not work fully due to #31 . but at least it can boot from NAND. |
the hardware difference between the two devices are negligible right now (aside from RAM(?) as it may only have 3GiB like iPad 9 (also means that T8030 machines could actually support 3 GiB RAM)), so this is mostly about controling the last string in line 317 and line 319 of hw/arm/xnu.c Line 317 in ff04a57
to J327DEV\0AppleDisplay2,1\0AppleARM\0$ or J327AP\0AppleDisplay2,1\0AppleARM\0$ as well as adding into Line 39 in ff04a57
of course this is just cosmetics the restore error at the start of the issue is just a coincidence for iOS 15.4, that should really be filed separately... |
@asdfugil, frankly, I don't see any practical point emulating a AppleDisplay, given that we haven't even emulated any kind of proper display yet... |
The only practical use for this might be to reverse engineer Apple’s color calibration and audio software or something like that. It’s much less useful than an iPhone due to it not being a fully featured device. Most people want this simply because they are Apple enthusiasts. |
...none of which is emulated yet, so really is not useful. |
Include the qtest reproducer provided by Alexander Bulekov in https://gitlab.com/qemu-project/qemu/-/issues/542. Without the previous commit, we get: $ make check-qtest-i386 ... Running test tests/qtest/intel-hda-test AddressSanitizer:DEADLYSIGNAL ================================================================= ==1580408==ERROR: AddressSanitizer: stack-overflow on address 0x7ffc3d566fe0 #0 0x63d297cf in address_space_translate_internal softmmu/physmem.c:356 TrungNguyen1909#1 0x63d27260 in flatview_do_translate softmmu/physmem.c:499:15 TrungNguyen1909#2 0x63d27af5 in flatview_translate softmmu/physmem.c:565:15 TrungNguyen1909#3 0x63d4ce84 in flatview_write softmmu/physmem.c:2850:10 TrungNguyen1909#4 0x63d4cb18 in address_space_write softmmu/physmem.c:2950:18 TrungNguyen1909#5 0x63d4d387 in address_space_rw softmmu/physmem.c:2960:16 TrungNguyen1909#6 0x62ae12f2 in dma_memory_rw_relaxed include/sysemu/dma.h:89:12 TrungNguyen1909#7 0x62ae104a in dma_memory_rw include/sysemu/dma.h:132:12 TrungNguyen1909#8 0x62ae6157 in dma_memory_write include/sysemu/dma.h:173:12 TrungNguyen1909#9 0x62ae5ec0 in stl_le_dma include/sysemu/dma.h:275:1 TrungNguyen1909#10 0x62ae5ba2 in stl_le_pci_dma include/hw/pci/pci.h:871:1 TrungNguyen1909#11 0x62ad59a6 in intel_hda_response hw/audio/intel-hda.c:372:12 TrungNguyen1909#12 0x62ad2afb in hda_codec_response hw/audio/intel-hda.c:107:5 TrungNguyen1909#13 0x62aec4e1 in hda_audio_command hw/audio/hda-codec.c:655:5 TrungNguyen1909#14 0x62ae05d9 in intel_hda_send_command hw/audio/intel-hda.c:307:5 TrungNguyen1909#15 0x62adff54 in intel_hda_corb_run hw/audio/intel-hda.c:342:9 TrungNguyen1909#16 0x62adc13b in intel_hda_set_corb_wp hw/audio/intel-hda.c:548:5 TrungNguyen1909#17 0x62ae5942 in intel_hda_reg_write hw/audio/intel-hda.c:977:9 TrungNguyen1909#18 0x62ada10a in intel_hda_mmio_write hw/audio/intel-hda.c:1054:5 TrungNguyen1909#19 0x63d8f383 in memory_region_write_accessor softmmu/memory.c:492:5 TrungNguyen1909#20 0x63d8ecc1 in access_with_adjusted_size softmmu/memory.c:554:18 TrungNguyen1909#21 0x63d8d5d6 in memory_region_dispatch_write softmmu/memory.c:1504:16 TrungNguyen1909#22 0x63d5e85e in flatview_write_continue softmmu/physmem.c:2812:23 TrungNguyen1909#23 0x63d4d05b in flatview_write softmmu/physmem.c:2854:12 TrungNguyen1909#24 0x63d4cb18 in address_space_write softmmu/physmem.c:2950:18 TrungNguyen1909#25 0x63d4d387 in address_space_rw softmmu/physmem.c:2960:16 TrungNguyen1909#26 0x62ae12f2 in dma_memory_rw_relaxed include/sysemu/dma.h:89:12 #27 0x62ae104a in dma_memory_rw include/sysemu/dma.h:132:12 TrungNguyen1909#28 0x62ae6157 in dma_memory_write include/sysemu/dma.h:173:12 TrungNguyen1909#29 0x62ae5ec0 in stl_le_dma include/sysemu/dma.h:275:1 TrungNguyen1909#30 0x62ae5ba2 in stl_le_pci_dma include/hw/pci/pci.h:871:1 TrungNguyen1909#31 0x62ad59a6 in intel_hda_response hw/audio/intel-hda.c:372:12 TrungNguyen1909#32 0x62ad2afb in hda_codec_response hw/audio/intel-hda.c:107:5 TrungNguyen1909#33 0x62aec4e1 in hda_audio_command hw/audio/hda-codec.c:655:5 TrungNguyen1909#34 0x62ae05d9 in intel_hda_send_command hw/audio/intel-hda.c:307:5 TrungNguyen1909#35 0x62adff54 in intel_hda_corb_run hw/audio/intel-hda.c:342:9 TrungNguyen1909#36 0x62adc13b in intel_hda_set_corb_wp hw/audio/intel-hda.c:548:5 TrungNguyen1909#37 0x62ae5942 in intel_hda_reg_write hw/audio/intel-hda.c:977:9 TrungNguyen1909#38 0x62ada10a in intel_hda_mmio_write hw/audio/intel-hda.c:1054:5 TrungNguyen1909#39 0x63d8f383 in memory_region_write_accessor softmmu/memory.c:492:5 TrungNguyen1909#40 0x63d8ecc1 in access_with_adjusted_size softmmu/memory.c:554:18 TrungNguyen1909#41 0x63d8d5d6 in memory_region_dispatch_write softmmu/memory.c:1504:16 TrungNguyen1909#42 0x63d5e85e in flatview_write_continue softmmu/physmem.c:2812:23 TrungNguyen1909#43 0x63d4d05b in flatview_write softmmu/physmem.c:2854:12 TrungNguyen1909#44 0x63d4cb18 in address_space_write softmmu/physmem.c:2950:18 TrungNguyen1909#45 0x63d4d387 in address_space_rw softmmu/physmem.c:2960:16 TrungNguyen1909#46 0x62ae12f2 in dma_memory_rw_relaxed include/sysemu/dma.h:89:12 TrungNguyen1909#47 0x62ae104a in dma_memory_rw include/sysemu/dma.h:132:12 TrungNguyen1909#48 0x62ae6157 in dma_memory_write include/sysemu/dma.h:173:12 ... SUMMARY: AddressSanitizer: stack-overflow softmmu/physmem.c:356 in address_space_translate_internal ==1580408==ABORTING Broken pipe Aborted (core dumped) Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by: Thomas Huth <thuth@redhat.com> Message-Id: <20211218160912.1591633-4-philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
J327AP
isAppleDisplay2,1
aka Studio DisplayCurrently, the kernel can boot to restored (not
restored_external
), and such a restore could be attempted.There is a failed kernel patch:
qemu-system-aarch64: Missing patch: AKSUC_handle
, which is probably related to the problem below.Anyways, the system successfully boots to ramdisk with
bash
running.The firmware can be obtained from here, which is
DarwinOS 15.4
, although sw_vers still outputs iPhone OS.Now, this is an OTA update, but the AssetData/ directory in it is the structure of an IPSW.
The problem
Stuck trying to create protecteted filesystems
To reproduce
display.der
withcreate_apticket.py
, the board config should bej327ap
SupportedProductTypes
, changeAppleDisplay12,1
toiPhone12,1
DeviceClass
, changeJ327AP
toN104AP
FactoryRamDisk
as the otherFactorySupportRamDisk
does not seem to have restored. The following is my boot command:Apple Inc.,
idevicerestore -P -d --erase --restore-mode -i 0x1122334455667788 display.ipsw -T display.der
Related restored log:
idevicerestore log:
Full serial output
Full idevicerestore log
The text was updated successfully, but these errors were encountered: