Chronic-Dev / libirecovery

Console library for iBoot/iBSS used by iPhone & iPod touch
GNU Lesser General Public License v2.1
158 stars 71 forks source link

Whats the client? #19

Closed WHots closed 4 years ago

WHots commented 4 years ago

irecv_open_with_ecid(irecv_client_t* client, unsigned long long ecid); In irecv_client_t* client what type is client? like how do we get that? because it doesn't seem like it's using usbmuxd

I know how to get ecid & udid, but how do i get client?

nikias commented 4 years ago

libirecovery is now officially at https://github.com/libimobiledevice/libirecovery - to answer your question: you don't need to know the type because it is returned in that parameter. Just use an irecv_client_t client and then pass &client as the parameter. When the function successfully returns it will point to an irecv_client_t 'handle' that you can use for the rest of the API.

WHots commented 4 years ago

What i'm trying to do, for a basic understanding is just reboot the device via usb. irecv_client_t client; irecv_open_with_ecid(&client, (unsigned long long)"PHONE ECID"); irecv_reboot(client);

but at irecv_reboot(client); i'm getting a access violation

Is there a quick example of doing this?

nikias commented 4 years ago

Casting the phone ecid from a string to unsigned long long will not work. You need it as a numerical value. Also check for errors, I bet that client is NULL before calling irecv_reboot in your case.

WHots commented 4 years ago

irecv_client_t client; irecv_open_with_ecid(&client, (unsigned long long)0xMY_ECID); if (client == NULL) printf("WE got nothing"); else irecv_reboot(client);

at irecv_reboot(client); still getting access violation, i have the right ECID copied from 3uTools & its in recovery 0x1281

nikias commented 4 years ago

Can you please move to the official repo, and try with the latest code https://github.com/libimobiledevice/libirecovery Thanks.