Set the application as a system App/obtain the SN number of the Android device

1. Consistent with the system signature; (signature setting + signature file)

2. Configure Manifest

 So far, your app is a system app, and you can perform some operations only available to system apps, such as obtaining the machine SN number:

public String getSerialNumber() {
        String serialNumber = null;
        if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
            serialNumber = Build.getSerial();
        }

        return serialNumber;
    }

Guess you like

Origin blog.csdn.net/Goals1989/article/details/132206877