Android oaid get based on MSA oaid_ sdk_ 1.0.25. zip


brief introduction

Link to this article:…

According to the technical requirements of “mobile intelligent terminal supplementary equipment identification system”, Huawei, Xiaomi, oppo, vivo, ZTE, Nubia, Meizu, Lenovo, Samsung and other equipment manufacturers will gradually realize this identification system. The alliance plans to develop and release a unified supplementary equipment identification call SDK supporting multiple manufacturers, Assist mobile application developers to access mobile intelligent terminals more conveniently, supplement device identification system and promote relevant services.

The full name of oaid is open anonymous device identifier, which is an identifier that can connect all application data. It is generated immediately after the mobile terminal system is started for the first time and can be used for advertising business. The generation parameters can include the device unique identifier parameters.

IMEI belongs to personal privacy. Now IMEI cannot be obtained, so oaid needs to be used instead. This article will use the latest version of SDK 1.0.25 provided by MSA (as of 2021-02-01)

SDK Download

Here are the resources shared by a big man on GitHub’ve been looking for it for a long time. Thank you.
oaid_ sdk_ 1.0.25. Zip dial link code: we54
The official website download needs to be registered in the name of the company and needs to be reviewed. It’s troublesome. The SDK download found online still needs to be charged.
Official website:Mobile security alliance MSA

Supported version

Manufacturer name Supported version
Huawei HMS 2.6.2 and above
millet MIUI 10.2 and above
vivo Android 9 and above
OPPO Color OS 7.0 and above
Lenovo Zui 11.4 and above
Samsung Android 10 version
Meizu Android 10 version
Nubia Android 10 version
ZTE Android 10 version
ASUS Android 10 version
One plus Android 10 version
Black Shark Android 10 version
Motorola Android 10 version
Freeme OS Android 10 version

Start using

Be sure to use the latest version!
Be sure to use the latest version!
Be sure to use the latest version!
I started with the old version and encountered many problems. MSA has been improving the SDK, so please be sure to use the latest version!
I tested this version on Xiaomi of Android 11

Put oaid_ sdk_ 1.0.25. Copy AAR to the LIBS directory of the item and set the dependency.

implementation files('libs/oaid_sdk_1.0.25.aar')

Set supplierconfig Copy JSON to the project assets directory, and modify the corresponding content of the edge, especially the part where the appid needs to be set. The part that needs to set appid needs to register its own app in the app store of the corresponding manufacturer. It should be noted that there is no need to modify the label part.
Android oaid get based on MSA oaid_ sdk_ 1.0.25. zip
Core code, from the official demo

public class MainActivity extends AppCompatActivity implements IIdentifierListener {
    private TextView tvContent;
    String oaid;
    String vaid;
    String aaid;
    protected void onCreate(Bundle savedInstanceState) {
        tvContent = findViewById(;
        MdidSdkHelper.InitSdk(getApplicationContext(), true,this);
        //The result is returned asynchronously. If it is empty, you can sleep for a few seconds first
        try {
        } catch (InterruptedException e) {
        System.out.println("OAID: "+oaid);
        System.out.println("VAID: "+vaid);
        System.out.println("AAID: "+aaid);

    public void OnSupport(boolean b, IdSupplier idSupplier) {
        if(idSupplier==null) {

        StringBuilder builder=new StringBuilder();
        builder.append("support: ").append(idSupplier.isSupported()?"true":"false").append("\n");
        builder.append("OAID: ").append(oaid).append("\n");
        builder.append("VAID: ").append(vaid).append("\n");
        builder.append("AAID: ").append(aaid).append("\n");

        String idstext=builder.toString();
        Log.d("SdkDemo: ", idstext);

    public void onIdsAvalid(@NonNull final String ids) {
        runOnUiThread(new Runnable() {
            public void run() {

Possible problems

The return of oaid is asynchronous, so sometimes it may not be returned after execution. At this time, there will be problems in use. It is recommended to judge it empty before use. If it is empty, sleep for a while


Here are two alternatives recommended

Apk Download

Here is a compiled APK. You can try the effect on the machine. It has passed the test on my android 11 Xiaomi mobile phone. You can install it without any permission. code: 2gr9
Android oaid get based on MSA oaid_ sdk_ 1.0.25. zip

Write at the end

If you have any questions, you are welcome to point out in the comment area. The follow-up will also be continuously updated with the new version of the SDK. If you think this blog is helpful to you, you might as well like it before you go.

Recommended Today

Could not get a resource from the pool when the springboot project starts redis; nested exception is io. lettuce. core.

resolvent: Find your redis installation path: Start redis server Exe After successful startup: Restart project resolution. ———————————————————————->Here’s the point:<——————————————————————- Here, if you close the redis command window, the project console will report an error. If you restart the project, the same error will be reported at the beginning, The reason is: It is inconvenient to […]