stf-device-db is a JSON-based database of smartphones, tablets and wearables. The database includes thumbnails for each device and some basic information about the default model at the time of release. It is not complete; currently it mainly covers devices sold in the Japanese market. Data is added as required.
This database is currently being used in STF.
For each device, the following information is provided:
- Model code (e.g. "SCV31")
- Product name (e.g. "Galaxy S6 edge")
- Larger image
- Carrier (most devices in the Japanese market are carrier-specific models)
- Disk space (if multiple sizes, lowest)
- Release date (on the Japanese market)
- Display size
The model code can usually be retrieved from a device quite easily, which then allows fairly straightforward mapping to the device data. Note that some carriers may sometimes prefix models numbers with their own code, which you must strip first.
The data in this repository is updated regularly from various sources.
- ULTRAZONE's Japanese smartphone database is currently our main provider for phone data. While their data is not open source, we have asked and obtained a permission to use it. The database is unfortunately limited to phones and does not currently offer useful data for tablets or other devices.
- Official press releases. We try to keep model-specific sources in CREDITS.md.
- Manual investigation especially for tablets.
On OS X, you can install the last three with:
brew install jq jpegoptim graphicsmagick
make at the top of the repo after making sure you have the requirements installed. You will then have a complete list of resized icons and photos in the
Install via NPM:
npm install --save stf-device-db
The module is prebuilt before publishing, so you don't need the build requirements if you just want to use the library.
Then you must find your device's model number and possibly the internal product name. On Android, this can be done with:
adb shell getprop ro.product.modeladb shell getprop ro.product.name
The internal product name is not required, but helps make a more specific match for some devices (mainly Nexus devices which reuse the model code for newer models of the same size).
For example, for a Nexus 5 these values would be:
You can then require the database and use it to find matching data based on the above values:
var db =var data = db
data would then be:
carrier: code: 'e' name: 'イー・モバイル'cpu: cores: 4 freq: 226 name: 'Qualcomm Snapdragon 800 MSM8974'date: '2013-11-14T15:00:00.000Z'display: h: 1920 s: 5 w: 1080maker: code: 'l' name: 'LG'memory: ram: 2048 rom: 32768name: id: 'Nexus 5' long: 'EM01L'os: type: 'android' ver: '5.1'image: 'Nexus_5.jpg'
If no match is found,
Device thumbnails and photos are provided in the
dist folder. It can be served as a static folder.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.