Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get codename of android device

Tags:

android

How can I get the device specific codename?

For example:

  • nexus 5 > hammerhead
  • OnePlus One > bacon

I searched already in the android.os.Build constants. The build.prop file contains a property called ro.build.NAME, which is (in my case) bacon. But there is not an android.os.Build.NAME constant. Where can i get it?

like image 614
Timo Schwarzer Avatar asked Oct 23 '25 14:10

Timo Schwarzer


1 Answers

I found it:

android.os.Build.HARDWARE
like image 189
Timo Schwarzer Avatar answered Oct 27 '25 01:10

Timo Schwarzer