Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jhihn opened this issue Mar 10, 2020 · 9 comments
Open

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

jhihn opened this issue Mar 10, 2020 · 9 comments

Comments

@jhihn
Copy link

jhihn commented Mar 10, 2020

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.

@mexmer
Copy link

mexmer commented Mar 12, 2020

you can manually call unpair

@shaun-mills
Copy link

shaun-mills commented Jun 10, 2020

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.

@jhihn
Copy link
Author

jhihn commented Jun 10, 2020

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.

@shaun-mills
Copy link

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

@jhihn
Copy link
Author

jhihn commented Jun 10, 2020

idevicepair is a binary: implemented here:
https://github.com/libimobiledevice/libimobiledevice/blob/master/tools/idevicepair.c

@lmamane
Copy link

lmamane commented Sep 22, 2020

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

@rootkittt
Copy link

where can i find the trust file?

@mailinglists35
Copy link

you don't have to delete any file.
just run
idevicepair pair
and that's all

@ryanjkemper
Copy link

Ran into the issue today and can confirm running idevicepair pair does resolve this issue when it occurred for me.

I see the security advantage of keeping the current functionality and forcing a re-pair. I am building re-try logic into my script that utilizes this library for backups. I do like @RJVB's idea to at least improve the error message by suggesting to re-pair the device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants