diff --git a/src/dfuhelper.c b/src/dfuhelper.c index b512103..2110b9d 100644 --- a/src/dfuhelper.c +++ b/src/dfuhelper.c @@ -202,12 +202,16 @@ void* connected_recovery_mode(struct irecv_device_info* info) { return NULL; } +extern bool force_usbdevice; void* connected_dfu_mode(struct irecv_device_info* info) { if (get_ecid_wait_for_dfu() == info->ecid) { set_ecid_wait_for_dfu(0); puts(""); LOG(LOG_INFO, "Device entered DFU mode successfully"); } + unsigned int bdid = info->bdid; + unsigned int cpid = info->cpid; + if (IS_APPLE_TV_4K) force_usbdevice = true; set_spin(0); unsubscribe_cmd(); pthread_exit(NULL); diff --git a/src/pongo_helper.c b/src/pongo_helper.c index 74f5d43..f8bc44b 100644 --- a/src/pongo_helper.c +++ b/src/pongo_helper.c @@ -14,6 +14,7 @@ #include bool device_has_booted = 0; +bool force_usbdevice = 0; int pongo_thr_running = 0; #define ERR(...) LOG(LOG_VERBOSE, __VA_ARGS__) @@ -52,7 +53,7 @@ void *pongo_usb_callback(stuff_t *arg) { if (ramdisk_dmg_lzma_len != 0) #endif { - // strncat(xargs_cmd, " rootdev=md0", 0x270 - strlen(xargs_cmd) - 1); + if (force_usbdevice) strncat(xargs_cmd, " AppleEmbeddedUSBArbitrator-force-usbdevice=1", 0x270 - strlen(xargs_cmd) - 1); upload_pongo_file(handle, **ramdisk_to_upload, ramdisk_dmg_lzma_len); if ((*ramdisk_to_upload) == &ramdisk_dmg_lzma) issue_pongo_command(handle, "ramdisk " RAMDISK_UNCOMPRESSED_SIZE);