Hey, thanks!!!!
Worked fine on G2. This is the code i used:
#include "sys/system_properties.h"
char buf[32];
buf[0] = 0;
__system_property_get("ro.serialno",buf);
Interestingly enough, i also tried this:
char buf[2048];
if ((in = open("/proc/cpuinfo", O_RDONLY)) < 0)
debug("can't open"); // 2mb at least, or some litebase tests
will just skip over.
else
{
if (read(in, buf, sizeof(buf)) < 4)
debug("can't read");
else
close(in);
and it outputs:
can't read
Processor : ARMv6-compatible processor rev 2 (v6l)
BogoMIPS : 383.38
Features : swp half thumb fastmult edsp java
CPU implementer : 0x41
CPU architecture: 6TEJ
CPU variant : 0x1
CPU part : 0xb36
CPU revision : 2
Hardware : sapphire
Revision : 0080
Serial : 0000000000000000
The interesting thing is that Serial is 0!
cheers, guich
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en