DeviceLibray

Get Android device details

Step 1. Add the JitPack repository to your build file

allprojects {
	repositories {         ~~~~
		...
		maven { url 'https://jitpack.io' }
	}
}
Copy the code

Step 2. Add the dependency

Dependencies {implementation 'com. Making. Z244370114: DeviceLibray: 1.0.3'}Copy the code

3. Instructions

(1) Call UtilsApp. Init (this) in Application onCreate() to initialize the context (2) It should be noted that fileutils.getsdDevicetxt (), which obtains the unique device_id according to the algorithm, determines the uniqueness of the deviceCopy the code

The hardware (hardware)

The field name type instructions
model String Equipment model
brand String The equipment brand
product String The product name
release String System version
sdk_version_code String The SDK version number
physical_size String Physical size
cpu_type String CPU name
cpu_min String Minimum CPU frequency
cpu_max String Maximum CPU frequency
cpu_cur String Current CPU frequency
manufacturer_name String manufacturers
board String The name of the mainboard
serial_number String Equipment serial number
display String Display screen parameters
id String Revised Version List
bootloader String System boot loader version number
finger_print String Device fingerprinting
host String The Host value that executes the code compilation
hardware String Hardware,
device String The equipment parameters
user String The User value that performs code compilation
radio_version String Radio firmware version
tags String Tags that describe builds
time String Compile time
type String Builder type
base_os String Build The basic operating system
baseband_ver String Baseband version
resolution String Device resolution
screen_density String Screen density (Pixel ratio: 0.75/1.0/1.5/2.0)
screen_density_dpi String Screen density (pixels per inch: 120/160/240/320)
cpu_abi String Gets the device instruction set name
cpu_abi2 String Gets the second instruction set name
abis String Mobile CPU architecture, supported instruction set
is_tablet int Is it a tablet (1: yes; 0: No)

General_data (general data)

The field name type instructions
and_id String Android ID
gaid String GAID
network_operator_name String Network Operator Name
network_operator String Digital name of the current registered carrier (MCC + MNC)
network_type String Current network type:

NETWORK_2G

NETWORK_3G

NETWORK_4G

NETWORK_5G

NETWORK_WIFI
phone_type String
mcc String Mcc/IMSI (Mobile Country Code)
bluetooth_mac String Bluetooth MAC Address
mnc String Mnc/IMSI Mnc (Mobile Network code)
locale_iso_3_language String A three-letter acronym for locale
locale_iso_3_country String Abbreviation for the country/territory in this region
time_zone_id String Time zone ID
locale_display_language String The name of the locale language displayed by the user
cid String Base station number
dns String
uuid String Device IDENTIFIER UUID
slot_count int Number of supported card slots (the value is 0 only when sdk_version>=23)
meid String Mobile device ID, card slot Mobile device ID 1(Not available for Android 10 and above)
imei2 String Card slot Mobile device ID 2(Android 10 and above cannot be obtained)
mac String The MAC address
language String The local language
ui_mode_type String UI type supported by the device

UI_MODE_TYPE_UNDEFINED

UI_MODE_TYPE_NORMAL

UI_MODE_TYPE_DESK

UI_MODE_TYPE_CAR

UI_MODE_TYPE_TELEVISION

UI_MODE_TYPE_APPLIANCE

UI_MODE_TYPE_WATCH

UI_MODE_TYPE_VR_HEADSET
security_patch String Date of security patch update

sim_card

The field name type instructions
sim_count int Number of SIM cards on the device
imsi1 String Sim card 1 Mobile user identity
sim_country_iso1 String The SIM card 1ISO country code is the same as the COUNTRY code of the SIM provider
sim_serial_number1 String Serial number of SIM card 1
number1 String Sim card 1 corresponds to the mobile phone number
imsi2 String Sim card 2 Mobile user identity
sim_country_iso2 String The SIM 2ISO country code is equivalent to the country code of the SIM provider
sim_serial_number2 String Serial number of SIM card 2
number2 String Sim card 2 corresponds to the mobile phone number

Storage (storage)

The field name type instructions
device_id String DeviceId in the associated device table
ram_total_size long Total size of running memory (byte)
ram_usable_size long Available running memory size (byte)
internal_storage_total long Total internal storage space (byte)
internal_storage_usable long Available space of internal storage (byte)
memory_card_size long Total SD card space (byte)
memory_card_size_use long Used SD card space (byte)

Other_data (other data)

The field name type instructions
root_jailbreak Int Root (0: No; 1: is)
simulator Int Whether it is a simulator (0: no; 1: is)
keyboard String Whether there is a physical button at the bottom: Yes: 1; No: 0
dbm String Cell phone signal strength (>-90, the higher the signal, the stronger the signal; “Means not received.
last_boot_time Long Last boot time, in milliseconds
is_using_vpn Int Whether to use VPN (0: No; 1: is)
vpn_address String VPN Proxy Address
is_using_proxy_port Int Whether to use a proxy (0: no; 1: is)
http_proxy_host_port String HTTP proxy host: port
is_usb_debug Int Whether to enable debugging (0: No; 1: is)
is_mock_location Int Whether position emulation is allowed (0: no; 1: is)
ringer_mode Int
0: RINGER_MODE_SILENT (Silent mode)

1: RINGER_MODE_VIBRATE (Vibrate mode)

2: RINGER_MODE_NORMAL (ring tone mode)
is_airplane_mode Int Whether to enable flight mode (0: no; 1: is)

Installation of applist (app)

The field name type instructions
app_name String Installed application: APP name
package_name String Installed application: Package name
in_time Long Installed applications: Installation time
up_time Long Installed applications: last updated
version_name String The name of the version
version_code Int The version number
flags Int Apply labels
app_type Int System application (1: system application; 0: non-system application)
special_permisson_list List Obtain app special permission items

Contact person

The field name type instructions
contact_display_name String Contact Name
number String Contact list: Phone number
up_time Long Contact list: Update time
last_time_contacted Long Last contact time with the contact person
times_contacted int Contact number
starred int Whether to collect contacts (1: Collect contacts; 0: uncollected)
email String Email address

GPS(Location)- Client changes

The field name type instructions
latitude String The dimension
longitude String longitude
addressDetails String GPS details

Media_files (Media files)

The field name type instructions
audio_internal Int Number of internal audio files
audio_external Int Number of external audio files
images_internal Int Number of internal files in the image
images_external Int Image number of external files
video_internal Int Number of internal video files
video_external Int Number of external video files
download_files Int Number of files downloaded
contact_group int Number of contact groups (the default base is large and the group name is included)

The network (network)

The field name type instructions
ip String The router IP
router_name String Router name (Server based on bSSID of current wifi)
current_wifi[].bssid String Current WIFI BSSID
current_wifi[].ssid String Current WIFI SSID
current_wifi[].name String The name of the wifi
current_wifi[].mac String Current wifi MAC address
configured_wifi[].bssid String BSSID/Configure wifi BSSID
configured_wifi[].ssid String SSID/Configure wifi SSID
configured_wifi[].name String The name of the wifi

Battery_status (battery)

The field name type instructions
is_charging int Whether the battery is being charged (1: unknown; 2: charging; 3: in discharge; 4: not charged; 5: Full of)
battery_pct Double Percentage of batteries (0-100)
charge_type int 1:BATTERY_PLUGGED_AC

2: BATTERY_PLUGGED_USB

4: BATTERY_PLUGGED_ANY (other)
battery_health int 1:BATTERY_HEALTH_UNKNOWN (unknown)

2: BATTERY_HEALTH_GOOD

3: BATTERY_HEALTH_OVERHEAT

4: BATTERY_HEALTH_DEAD

5: BATTERY_HEALTH_OVER_VOLTAGE

6: BATTERY_HEALTH_UNSPECIFIED_FAILURE (unknown error)

7: BATTERY_HEALTH_COLD (too low temperature)
battery_temperature Double Battery temperature (unit: 0.1, e.g. 359 represents 35.9°C)
screen_brightness Double Screen brightness (0-255)

Sensor []

The field name type instructions
sensor_lists[].type int Type of sensor
sensor_lists[].name String Name of sensor
sensor_lists[].version int Sensor version number
sensor_lists[].vendor String Vendor name
sensor_lists[].max_range float Maximum sensor
sensor_lists[].min_delay float The minimum value of a sensor
sensor_lists[].power float Sensor power
sensor_lists[].resolution float Sensor accuracy