Libimobiledevice: ERROR: Could not connect to lockdownd: Invalid HostID (-21)

Created on 10 Mar 2020  ·  6Comments  ·  Source: libimobiledevice/libimobiledevice

This error appears when a host which has previously been trusted by the device has had its trust reset (Settings: General: Reset: Reset Location & Privacy) and is plugged in again.

The work-around is to delete the existing trust file in the lockdown directory and re-pair.

It would be nice if this could happen automatically.

Most helpful comment

You don't have ti nuke it from orbit, you can unpair it, or delete the trust file.
I would like the message changed though (though happy to have a text error string!)
"Invalid HostID" isn't a good description. The HostID is valid, the error is in the relationship.

All 6 comments

you can manually call unpair

Seeing this too and confirmed that deleting the existing trust file in the lockdown directory does force the the re-paring / trust process to work again.

You don't have ti nuke it from orbit, you can unpair it, or delete the trust file.
I would like the message changed though (though happy to have a text error string!)
"Invalid HostID" isn't a good description. The HostID is valid, the error is in the relationship.

@jhihn can you point me to the function that does the unpair action? Or an example of how you would invoke it

I had this issue; I don't remember ever resetting the trust. I didn't even have to unpair, calling "idevicepair pair" worked.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

truonggiang0710 picture truonggiang0710  ·  3Comments

dreamerblue picture dreamerblue  ·  6Comments

iOSShohrab picture iOSShohrab  ·  6Comments

mrPsycho picture mrPsycho  ·  6Comments

lianzisong picture lianzisong  ·  4Comments