Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to detect the chipset info in android device? [closed]

How to detect the chipset info of the android device?

For instance, to disable certain functionality on MediaTek chipset. (1080p encoding as discussed in this question MediaCodec Encoded video has green bar at bottom and chrominance screwed up)

I have taken a look at http://developer.android.com/reference/android/os/Build.html, but nothing seems relevant.

like image 371
Vinayak Garg Avatar asked Jan 27 '16 06:01

Vinayak Garg


2 Answers

In addition to the Android API, you can use the proc call cpuinfo to gain information about CPU name (ex, you can get it as mediatek,mt6589). An example of this is at How to get specific information of an Android device from "/proc/cpuinfo" flie? . But specific SOC related bugs will need SOC level identification as future revisions might remove the bugs but retain the same name/partnumber.

like image 164
Prabindh Avatar answered Oct 08 '22 14:10

Prabindh


There's no really good and straightforward solution, but there's a number of things you can check. It all depends on what you really want to do though - do you want to avoid all MediaTek chipsets, or just one specific one? In some cases, these kinds of issues can also change across different generations of the driver for the encoder.

You can check Build.BOARD, and hope that it is the same across multiple devices with the same chipset. In most cases it's probably not, though.

You can also try to read the ro.board.platform system property - it's not publicly available within the Build class, but you can try to access the android.os.SystemProperties.get method (via reflection, to make sure to fail safely in case it has changed).

You can also try to decide based on the encoder name, as exposed via MediaCodec.getName() and MediaCodecInfo.getName(). This is probably the most straightforward way to do what you want. For some chipset manufacturers, the encoder has got the same name regardless of chipset, while some may have slightly different names in different chipset generations.

like image 44
mstorsjo Avatar answered Oct 08 '22 13:10

mstorsjo