Android Device Chooser — device not showing up

First, make sure that the Android ADB can “talk to” your device. Open a Windows Command Prompt (cmd.exe)/Mac Terminal. Go to the folder (via cd) where ADB.exe is in, e.g, C:\Android\android-sdk\platform-tools. Type adb devices If your device is listed (serial number is displayed), go to the second check. Otherwise, this means ADB currently can’t talk … Read more

Detect the specific iPhone/iPod touch model [duplicate]

You can get the device model number using uname from sys/utsname.h. For example: #import <sys/utsname.h> NSString* machineName() { struct utsname systemInfo; uname(&systemInfo); return [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding]; } The result should be: @”i386″ on the simulator @”iPod1,1″ on iPod Touch @”iPod2,1″ on iPod Touch Second Generation @”iPod3,1″ on iPod Touch Third Generation @”iPod4,1″ on iPod Touch … Read more

Look up manufacturer based on Mac Address?

The first half (24 bits) of your mac-address is called an OUI (Organizationally Unique Identifier), and identifies the company. The list is available on ieee.org: http://standards.ieee.org/develop/regauth/oui/oui.txt They are formatted like this: 00-03-93 (hex) Apple Computer, Inc. 000393 (base 16) Apple Computer, Inc. 20650 Valley Green Dr. Cupertino CA 95014 UNITED STATES The gaps between sequential … Read more

Why is there both character device and block device for nvme?

The character device /dev/nvme0 is the NVME device controller, and block devices like /dev/nvme0n1 are the NVME storage namespaces: the devices you use for actual storage, which will behave essentially as disks. In enterprise-grade hardware, there might be support for several namespaces, thin provisioning within namespaces and other features. For now, you could think namespaces … Read more

iOS detect if user is on an iPad

There are quite a few ways to check if a device is an iPad. This is my favorite way to check whether the device is in fact an iPad: if ( UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ) { return YES; /* Device is iPad */ } The way I use it #define IDIOM UI_USER_INTERFACE_IDIOM() #define IPAD UIUserInterfaceIdiomPad … Read more