Latest article

Android NDK Get IMEI Natively

26 Nov 2012

Here's how you can get the phone's IMEI directly via (NDK) Native C code:

#include <sys/system_properties.h>

      char imei[64];
      int ret = __system_property_get("ro.gsm.imei", imei);           
      // __system_property_get returns the string length of the value.

This worked on HTC OneS... haven't tried on other phones yet...

[Permalink]



Recent articles by category:



Software HOWTOs



Programming - Software Development



Ethics - Moral philosophy



Giving thanks and praises to God/Nature



Other topics - Uncategorized



This ClearEvo.com blog is powered by Debian GNU/Linux, running lighttpd, generated using jekyll on Ubuntu.

Subscribe for new updates