Mobile House Arrest service fails to start with error 12 LOCKDOWN_E_MISSING_VALUE
I'm writing files into the sandbox space of custom apps. Everything worked great through iOS9, however, on iOS11 (I don't have an iOS10 device), I am starting to get failures to start "com.apple.mobile.house_arrest" with the lockdownd_start_service_with_escrow_bag function with error code 12 LOCKDOWN_E_MISSING_VALUE. It will essentially always work after a reboot+unlock cycle, but then when it fails, it will always fail with that error. Additionally, iTunes will also be unable to access the sandbox files after the device gets into the failed state.
The idevicesyslog has these messages when it fails:
mobile_house_arrest(liblockdown.dylib)[267] <Notice>: accept_with_timeout: <private>
mobile_house_arrest(liblockdown.dylib)[267] <Notice>: Could not check in with lockdown at '<private>': 1The idevicesyslog has these when it works:
mobile_house_arrest(liblockdown.dylib)[341] <Notice>: unlock_with_escrow: <private>
mobile_house_arrest(MobileKeyBag)[341] <Notice>: MKBKeyBagUnlock: unlocked bag 2
mobile_house_arrest(Foundation)[341] <Notice>: Write (Async) options: 8 -- URL: <private> -- ...
mobile_house_arrest(Foundation)[341] <Notice>: Claim ... granted in client
mobile_house_arrest(Foundation)[341] <Notice>: Claim ... invoked in clientThe typical sequence I use to connect/write the file:
- idevice_new
- lockdownd_client_new_with_handshake
- lockdownd_start_service_with_escrow_bag ("com.apple.mobile.house_arrest")
- house_arrest_client_new
- house_arrest_send_command("VendDocuments")
- house_arrest_get_result
- afc_client_new_from_house_arrest_client
- afc_file_open
- afc_file_write
- afc_file_close
- afc_client_free
- house_arrest_client_free
- lockdownd_service_descriptor_free
- lockdownd_client_free
- idevice_free
Running on: macOS High Sierra 10.13.3 libimobiledevice, libusbmuxd, libplist master as of today (July 11, 2018).
Any assistance to help fix this would be appreciated!
Source: libimobiledevice/libimobiledevice