Skip to content

Instantly share code, notes, and snippets.

@alximw
Created October 23, 2019 15:22
Show Gist options
  • Save alximw/fd434b56574338bb84f9a09a2ab1eed0 to your computer and use it in GitHub Desktop.
Save alximw/fd434b56574338bb84f9a09a2ab1eed0 to your computer and use it in GitHub Desktop.
int __fastcall enablePackage(char *serviceName, int size)
{
char *serviceName_1; // r5
int v3; // r4
int result; // r0
char v5; // [sp+4h] [bp-114h]
serviceName_1 = serviceName;
v3 = size;
if ( (unsigned int)(checkSystemProperties() - 1) > 0xF )
{
result = am_start_com_wifi_sdcard_hbre_ProviderService(serviceName_1, v3);
if ( !result )
{
memset(&v5, 0, 256u);
sprintf(&v5, "/system/bin/pm enable %s", com_wifi_sdcard_hbre);
readFile((int)&v5, 0, 0, 60);
result = startService(0, 0);
}
}
else
{
result = startService(serviceName_1, v3);
if ( !result )
{
memset(&v5, 0, 256u);
sprintf(&v5, "/system/bin/pm enable %s", com_wifi_sdcard_hbre);
readFile((int)&v5, 0, 0, 60);
result = am_start_com_wifi_sdcard_hbre_ProviderService(0, 0);
}
}
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment