Nothing that I have tried works on android 11 and earlier versions.
Because I tried using different approach but it doesn't seem to be able to work on android 11 and earlier versions.
Even if is something that can only work on debug mode...
From the docs: https://developer.android.com/about/versions/10/privacy/changes#non-resettable-device-ids Even with a library, the ID will be null due to privacy reasons, consider resettable identifiers like Firebase App Installation Id if you need to track the app instance instead of the user.