You can read the serial number of the device. It’s not imei
This was discussed in your previous post Carlos Deviceid function of the phone manager extension no longer returns the id
It is not possible on devices higher than Android 9 to use an extension like the Phone Manager extension to get the device id (or possibly any device at all), probably due to Google’s latest security protections.
I need to read the serial number.
it is unfortunately not possible anymore starting from Android 10
see here why this is not possible anymore in Android 10
Restriction on non-resettable device identifiers
Starting in Android 10, apps must have the
READ_PRIVILEGED_PHONE_STATE privileged permission in order to access the device’s non-resettable identifiers, which include both IMEI and serial number.
Caution: Third-party apps installed from the Google Play Store cannot declare privileged permissions.
Affected methods include the following:
If your app doesn’t have the permission and you try asking for information about non-resettable identifiers anyway, the platform’s response varies based on target SDK version: