Coder Social home page Coder Social logo

Loaded function names about provision HOT 7 CLOSED

dadoum avatar dadoum commented on September 27, 2024
Loaded function names

from provision.

Comments (7)

Dadoum avatar Dadoum commented on September 27, 2024

Yes, Apple obfuscate names of the ADI functions. These functions are 1:1 equivalent to AKADIProxy functions on iOS, and they are quite consistent on the naming, since these function names does not change neither across versions nor across different Apple apps. On Android, you can call with their obfuscate name even if an alias would be preferable for readability.

libstoreservicescore automatically tries to load libCoreADI from the standard paths when you initialize it. You can specify a custom path if you want libCoreADI to be stored somewhere else. If it's already loaded in the memory it will be able to use it without complaining, so I load it to be sure before loading libstoreservicescore.

On Android and arm devices you can use the Apple TV app's libCoreADI. It directly exports the functions with the same mangled names, reducing even further the size required on the disk.

from provision.

JJTech0130 avatar JJTech0130 commented on September 27, 2024

Something like this would work as a header, right?:

// libstoreservicescore.h

// Obfuscated symbols
#define LoadLibraryWithPath kq56gsgHG6
#define SetAndroidID Sph98paBcz
#define SetProvisioningPath nf92ngaK92

#define ProvisioningErase p435tmhbla
#define Synchronize tn46gtiuhw
#define ProvisioningDestroy fy34trz2st
#define ProvisioningEnd uv5t6nhkui
#define ProvisioningStart rsegvyrt87
#define GetLoginCode aslgmuibau
#define Dispose jk24uiwqrg
#define OTPRequest qi864985u0
#define SetIDMSRouting ksbafgljkb
#define GetIDMSRouting madsvsfvjk

// Android-specific symbols
int LoadLibraryWithPath(const char*);
int SetAndroidID(const char*, uint);
int SetProvisioningPath(const char*);

// ADI symbols
int ProvisioningErase(ulong);
int Synchronize(uint, ubyte*, uint, ubyte**, uint*, ubyte**, uint*);
int ProvisioningDestroy(uint);
int ProvisioningEnd(uint, ubyte*, uint, ubyte*, uint);
int ProvisioningStart(ulong, ubyte*, uint, ubyte**, uint*, uint*);
int GetLoginCode(ulong);
int Dispose(void*);
int OTPRequest(ulong, ubyte**, uint*, ubyte**, uint*);
int SetIDMSRouting(ulong, ulong);
int GetIDMSRouting(ulong*, ulong);

from provision.

Dadoum avatar Dadoum commented on September 27, 2024

Yes, here is one with params names and types corrected:

// libstoreservicescore.h

// Obfuscated symbols
#define LoadLibraryWithPath kq56gsgHG6
#define SetAndroidID Sph98paBcz
#define SetProvisioningPath nf92ngaK92

#define ProvisioningErase p435tmhbla
#define Synchronize tn46gtiuhw
#define ProvisioningDestroy fy34trz2st
#define ProvisioningEnd uv5t6nhkui
#define ProvisioningStart rsegvyrt87
#define GetLoginCode aslgmuibau
#define Dispose jk24uiwqrg
#define OTPRequest qi864985u0
#define SetIDMSRouting ksbafgljkb
#define GetIDMSRouting madsvsfvjk

// Android-specific symbols
int LoadLibraryWithPath(const char *libraryPath);
int SetAndroidID(const char *identifier, unsigned int length);
int SetProvisioningPath(const char *provisioningPath);

// ADI symbols
int ProvisioningErase(unsigned long long dsId);
int Synchronize(unsigned long long dsId, const char *SIM, unsigned int SIMLength, char **outMID, unsigned int *outMIDLength, char **outSRM, unsigned int *outSRMLength);
int ProvisioningDestroy(unsigned int session);
int ProvisioningEnd(unsigned int session, const char *PTM, unsigned int PTMLength, const char *TK, unsigned int TKLength);
int ProvisioningStart(unsigned long long dsId, const char *SPIM, unsigned int SPIMLength, char **CPIM, unsigned int *CPIMLength, unsigned int *session);
int GetLoginCode(unsigned long long dsId);
int Dispose(void *data);
int OTPRequest(unsigned long long dsId, char **outMID, unsigned int *outMIDSize, char **outOTP, unsigned int *outOTPSize);
int SetIDMSRouting(unsigned long long routingInfo, unsigned long long dsId);
int GetIDMSRouting(unsigned long long *routingInfo, unsigned long long dsId);

from provision.

JJTech0130 avatar JJTech0130 commented on September 27, 2024

Thanks! I totally forgot about adding names lol, I just put your code in a comment and had Copilot fill it in.

from provision.

JJTech0130 avatar JJTech0130 commented on September 27, 2024

One thing I'm noticing, is that you have a function called int GetLoginCode(unsigned long long dsId);, wheras the original has + (int)isMachineProvisioned:(unsigned long long)arg1;. I'm assuming they're different? or are they the same thing

from provision.

Dadoum avatar Dadoum commented on September 27, 2024

They are the same function, but ADIGetLoginCode is its internal name in the C API while isMachineProvisioned is its name in Objective-C.

from provision.

Dadoum avatar Dadoum commented on September 27, 2024

If you need more assistance you can contact me on Discord Dadoum#9690

from provision.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.