In Android, how can I find out at runtime the ROM and kernel that the phone is running?

StackOverflow https://stackoverflow.com/questions/12587177

  •  03-07-2021
  •  | 
  •  

Question

Basically, I know that a specific kernel running on a CM10-based ROM has a problem with my app, and I would like to detect that at runtime, and send the user an alert to change kernels. How can I find out the kernel and ROM from within my app?

Était-ce utile?

La solution

http://developer.android.com/reference/android/os/Build.html

[EDIT]

If Build doesn't give you what you need, try System.getProperty("os.version"). I've tested on 3 devices and it gives the kernel string. You should be able to get anything that Build does not give you.

http://developer.android.com/reference/java/lang/System.html#getProperties()

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top