mirror of
https://github.com/tihmstar/futurerestore.git
synced 2025-01-02 19:25:31 +00:00
using device boardconfig to get a ticket with tsschecker
This commit is contained in:
parent
78fac4174a
commit
7c34c55a86
|
@ -537,6 +537,21 @@ const char *futurerestore::getDeviceModelNoCopy(){
|
|||
return _client->device->product_type;
|
||||
}
|
||||
|
||||
const char *futurerestore::getDeviceBoardNoCopy(){
|
||||
if (!_client->device || !_client->device->hardware_model){
|
||||
|
||||
int mode = getDeviceMode(true);
|
||||
if (mode != MODE_NORMAL && mode != MODE_RECOVERY)
|
||||
reterror(-20, "unexpected device mode=%d\n",mode);
|
||||
|
||||
if (check_hardware_model(_client) == NULL || _client->device == NULL)
|
||||
reterror(-2,"ERROR: Unable to discover device model\n");
|
||||
}
|
||||
|
||||
return _client->device->hardware_model;
|
||||
}
|
||||
|
||||
|
||||
char *futurerestore::getLatestManifest(){
|
||||
if (!__latestManifest){
|
||||
loadFirmwareTokens();
|
||||
|
|
|
@ -64,6 +64,7 @@ public:
|
|||
|
||||
void loadFirmwareTokens();
|
||||
const char *getDeviceModelNoCopy();
|
||||
const char *getDeviceBoardNoCopy();
|
||||
char *getLatestManifest();
|
||||
char *getLatestFirmwareUrl();
|
||||
void loadLatestBaseband();
|
||||
|
|
|
@ -169,6 +169,7 @@ int main(int argc, const char * argv[]) {
|
|||
goto error;
|
||||
}
|
||||
devVals.deviceModel = (char*)client.getDeviceModelNoCopy();
|
||||
devVals.deviceBoard = (char*)client.getDeviceBoardNoCopy();
|
||||
|
||||
if (flags & FLAG_LATEST_SEP){
|
||||
info("user specified to use latest signed sep\n");
|
||||
|
|
Loading…
Reference in a new issue