Mobile House Arrest service fails to start with error 12 LOCKDOWN_E_MISSING_VALUE

Author: cmublitzCreated Jul 11, 2018Updated Aug 20, 2026

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>': 1

The 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 client

The typical sequence I use to connect/write the file:

  1. idevice_new
  2. lockdownd_client_new_with_handshake
  3. lockdownd_start_service_with_escrow_bag ("com.apple.mobile.house_arrest")
  4. house_arrest_client_new
  5. house_arrest_send_command("VendDocuments")
  6. house_arrest_get_result
  7. afc_client_new_from_house_arrest_client
  8. afc_file_open
  9. afc_file_write
  10. afc_file_close
  11. afc_client_free
  12. house_arrest_client_free
  13. lockdownd_service_descriptor_free
  14. lockdownd_client_free
  15. 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