1. Android Device信息知多少:

通常,一个设备的信息包含下面这几类:

(1)厂商相关信息,例如手机制造商,主板厂商;

(2)硬件相关信息,例如cpu型号,cpu指令集,主板型号,显示屏参数,蓝牙参数,GPS参数,硬件序列号,无线固件版本;

(3)编译相关信息,例如编译时间,编译类型;

(4)入网相关信息,例如IMEI,IMSI;

(5)虚拟机相关信息,入art虚拟机信息;

(6)其它,例如启动程序版本号(即bootloader编译版本)。

2. 设备信息的获取:

可以使用Android系统提供的API接口来获取,也可以使用诸如getProp的命令来获取,还可以使用__system_property_get等属性获取函数来获取。。

API接口获取device信息:

public static String getDeviceInfo() {
        StringBuffer sb = new StringBuffer();
        sb.append("主板:" + Build.BOARD);
        sb.append("\n系统启动程序版本号:" + Build.BOOTLOADER);
        sb.append("\n系统定制商:" + Build.BRAND);
        sb.append("\ncpu指令集:" + Build.CPU_ABI);
        sb.append("\ncpu指令集2:" + Build.CPU_ABI2);
        sb.append("\n设置参数:" + Build.DEVICE);
        sb.append("\n显示屏参数:" + Build.DISPLAY);
        sb.append("\n无线电固件版本:" + Build.getRadioVersion());
        sb.append("\n硬件识别码:" + Build.FINGERPRINT);
        sb.append("\n硬件名称:" + Build.HARDWARE);
        sb.append("\nHOST:" + Build.HOST);
        sb.append("\n修订版本列表:" + Build.ID);
        sb.append("\n硬件制造商:" + Build.MANUFACTURER);
        sb.append("\n版本:" + Build.MODEL);
        sb.append("\n硬件序列号:" + Build.SERIAL);
        sb.append("\n手机制造商:" + Build.PRODUCT);
        sb.append("\n描述Build的标签:" + Build.TAGS);
        sb.append("\nTIME:" + Build.TIME);
        sb.append("\nbuilder类型:" + Build.TYPE);
        sb.append("\nUSER:" + Build.USER);

        return sb.toString();
    }

getProp来获取设备信息:

$ adb shell
127|raphael:/ $ getprop
[DEVICE_PROVISIONED]: [1]
[aaudio.hw_burst_min_usec]: [2000]
[aaudio.mmap_exclusive_policy]: [2]
[aaudio.mmap_policy]: [2]
[af.fast_track_multiplier]: [1]
[audio.deep_buffer.media]: [true]
[audio.offload.buffer.size.kb]: [32]
[audio.offload.gapless.enabled]: [true]
[audio.offload.video]: [true]
[av.offload.enable]: [true]
[cache.trigger]: [1]
[camera.disable_zsl_mode]: [true]
[config.disable_rtt]: [true]
[dalvik.vm.appimageformat]: [lz4]
[dalvik.vm.bg-dex2oat-threads]: [8]
[dalvik.vm.boot-dex2oat-threads]: [6]
[dalvik.vm.dex2oat-Xms]: [64m]
[dalvik.vm.dex2oat-Xmx]: [512m]
[dalvik.vm.dex2oat-max-image-block-size]: [524288]
[dalvik.vm.dex2oat-minidebuginfo]: [true]
[dalvik.vm.dex2oat-resolve-startup-strings]: [true]
[dalvik.vm.dex2oat-threads]: [6]
[dalvik.vm.dexopt.secondary]: [true]
[dalvik.vm.heapgrowthlimit]: [256m]
[dalvik.vm.heapmaxfree]: [8m]
[dalvik.vm.heapminfree]: [512k]
[dalvik.vm.heapsize]: [512m]
[dalvik.vm.heapstartsize]: [8m]
[dalvik.vm.heaptargetutilization]: [0.75]
[dalvik.vm.image-dex2oat-Xms]: [64m]
[dalvik.vm.image-dex2oat-Xmx]: [64m]
[dalvik.vm.isa.arm.features]: [default]
[dalvik.vm.isa.arm.variant]: [cortex-a9]
[dalvik.vm.isa.arm64.features]: [default]
[dalvik.vm.isa.arm64.variant]: [generic]
[dalvik.vm.minidebuginfo]: [true]
[dalvik.vm.usejit]: [true]
[dalvik.vm.usejitprofiles]: [true]
[debug.atrace.tags.enableflags]: [0]
[debug.egl.force_msaa]: [false]
[debug.egl.hw]: [0]
[debug.force_rtl]: [false]
[debug.hwui.show_dirty_regions]: []
[debug.hwui.show_layers_updates]: []
[debug.layout]: [false]
[debug.mdpcomp.logs]: [0]
[debug.sf.disable_backpressure]: [1]
[debug.sf.enable_hwc_vds]: [1]
[debug.sf.hw]: [0]
[debug.sf.latch_unsignaled]: [1]
[debug.stagefright.ccodec]: [1]
[debug.stagefright.omx_default_rank]: [0]
[debug.stagefright.omx_default_rank.sw-audio]: [1]
[dev.bootcomplete]: [1]
[dev.mnt.blk.cache]: [sda]
[dev.mnt.blk.cust]: [sda]
[dev.mnt.blk.data]: [sda]
[dev.mnt.blk.dev.logfs]: [sda]
[dev.mnt.blk.mnt.vendor.persist]: [sda]
[dev.mnt.blk.root]: [dm-0]
[dev.mnt.blk.vendor]: [dm-1]
[dev.mnt.blk.vendor.bt_firmware]: [sde]
[dev.mnt.blk.vendor.dsp]: [sde]
[dev.mnt.blk.vendor.firmware_mnt]: [sde]
[dev.pm.dyn_samplingrate]: [1]
[drm.service.enabled]: [true]
[events.cpu]: [true]
[gsm.apn.sim.operator.numeric]: [,]
[gsm.current.phone-type]: [1,2]
[gsm.network.type]: [Unknown,Unknown]
[gsm.operator.alpha]: []
[gsm.operator.iso-country]: [cn]
[gsm.operator.isroaming]: [false,false]
[gsm.operator.numeric]: []
[gsm.operator.orig.alpha]: []
[gsm.sim.state]: [ABSENT,ABSENT]
[gsm.version.baseband]: [1.0.c3-00147-0920_2310_facf960,1.0.c3-00147-0920_2310_facf960]
[gsm.version.ril-impl]: [Qualcomm RIL 1.0]
[hwservicemanager.ready]: [true]
[init.svc.adbd]: [running]
[init.svc.alarm-hal-1-0]: [running]
[init.svc.apexd]: [running]
[init.svc.apexd-bootstrap]: [stopped]
[init.svc.ashmemd]: [running]
[init.svc.audioserver]: [running]
[init.svc.audioshell_service]: [stopped]
[init.svc.batteryd]: [running]
[init.svc.batterysecret]: [running]
[init.svc.bootanim]: [stopped]
[init.svc.bpfloader]: [stopped]
[init.svc.cameraserver]: [running]
[init.svc.charge_logger]: [running]
[init.svc.checknv]: [stopped]
[init.svc.citsensor-hal-1-1]: [running]
[init.svc.cnss-daemon]: [running]
[init.svc.cnss_diag]: [running]
[init.svc.crashdata-sh]: [stopped]
[init.svc.cryptfshw-1-0]: [running]
[init.svc.cvphalservice]: [running]
[init.svc.display-color-hal-1-0]: [running]
[init.svc.displaycount]: [running]
[init.svc.displayfeature]: [running]
[init.svc.displayfeature-hal-1-0]: [running]
[init.svc.dpmQmiMgr]: [running]
[init.svc.dpmd]: [running]
[init.svc.drm]: [running]
[init.svc.fdpp]: [running]
[init.svc.flash_recovery]: [stopped]
[init.svc.gatekeeper-1-0]: [running]
[init.svc.gatekeeperd]: [running]
[init.svc.gnss_service]: [running]
[init.svc.gpu]: [running]
[init.svc.gsid]: [stopped]
[init.svc.health-hal-2-0]: [running]
[init.svc.hidl_memory]: [running]
[init.svc.hostapd]: [stopped]
[init.svc.hostapd_fst]: [stopped]
[init.svc.hwservicemanager]: [running]
[init.svc.idmap2d]: [running]
[init.svc.incidentd]: [running]
[init.svc.installd]: [running]
[init.svc.iop-hal-2-0]: [running]
[init.svc.iorapd]: [stopped]
[init.svc.irsc_util]: [stopped]
[init.svc.kernellog]: [stopped]
[init.svc.keymaster-4-0]: [running]
[init.svc.keystore]: [running]
[init.svc.leds-sh]: [stopped]
[init.svc.lmkd]: [running]
[init.svc.loc_launcher]: [running]
[init.svc.logcatkernel]: [stopped]
[init.svc.logcatlog]: [stopped]
[init.svc.logd]: [running]
[init.svc.logd-auditctl]: [stopped]
[init.svc.logd-reinit]: [stopped]
[init.svc.mcd_init]: [stopped]
[init.svc.mcd_service]: [running]
[init.svc.mdnsd]: [running]
[init.svc.media]: [running]
[init.svc.media.swcodec]: [running]
[init.svc.mediadrm]: [running]
[init.svc.mediaextractor]: [running]
[init.svc.mediametrics]: [running]
[init.svc.mi_thermald]: [running]
[init.svc.millet_binder]: [running]
[init.svc.millet_pkg]: [running]
[init.svc.millet_sig]: [running]
[init.svc.minidump64]: [stopped]
[init.svc.miui-early-boot]: [stopped]
[init.svc.miuibooster]: [running]
[init.svc.mlid]: [running]
[init.svc.mqsasd]: [running]
[init.svc.netd]: [running]
[init.svc.neuralnetworks_hal_service]: [running]
[init.svc.nqnfc_1_2_hal_service]: [running]
[init.svc.nqnfcinfo]: [stopped]
[init.svc.nv_mac]: [stopped]
[init.svc.objectTracker]: [running]
[init.svc.panel-info-sh]: [stopped]
[init.svc.panorama]: [running]
[init.svc.pasr-hal-1-0]: [running]
[init.svc.perf-hal-2-0]: [running]
[init.svc.poweroffm64]: [stopped]
[init.svc.qadaemon]: [running]
[init.svc.qcom-c_core-sh]: [stopped]
[init.svc.qcom-c_main-sh]: [stopped]
[init.svc.qcom-post-boot]: [stopped]
[init.svc.qcom-sh]: [stopped]
[init.svc.qdutils_disp-1-0]: [running]
[init.svc.qseecom-service]: [running]
[init.svc.qseelogd]: [stopped]
[init.svc.qteeconnector-hal-1-0]: [running]
[init.svc.qti-testscripts]: [stopped]
[init.svc.qti_esepowermanager_service]: [running]
[init.svc.qvrd]: [running]
[init.svc.remosaic_daemon]: [running]
[init.svc.secureelement-hal]: [running]
[init.svc.sensorscal-hal-1-0]: [running]
[init.svc.servicemanager]: [running]
[init.svc.setlockstate]: [stopped]
[init.svc.shelld]: [running]
[init.svc.soter-1-0]: [running]
[init.svc.statsd]: [running]
[init.svc.storaged]: [running]
[init.svc.surfaceflinger]: [running]
[init.svc.system_perf_init]: [stopped]
[init.svc.system_suspend]: [running]
[init.svc.tcpdump]: [running]
[init.svc.time_daemon]: [running]
[init.svc.tombstoned]: [running]
[init.svc.touchfeature-hal-1-0]: [running]
[init.svc.tui_comm-1-0]: [running]
[init.svc.ueventd]: [running]
[init.svc.usbd]: [stopped]
[init.svc.vendor-qti-media-c2-hal-1-0]: [running]
[init.svc.vendor-sensor-sh]: [stopped]
[init.svc.vndservicemanager]: [running]
[init.svc.vold]: [running]
[init.svc.wait_for_keymaster]: [stopped]
[init.svc.wfdhdcphalservice]: [running]
[init.svc.wfdvndservice]: [running]
[init.svc.wificond]: [running]
[init.svc.wifidisplayhalservice]: [running]
[init.svc.wpa_supplicant]: [running]
[init.svc.zygote]: [running]
[init.svc.zygote_secondary]: [running]
[keyguard.no_require_sim]: [true]
[log.tag.APM_AudioPolicyManager]: [D]
[log.tag.stats_log]: [I]
[mcd.extra.params]: []
[media.aac_51_output_enabled]: [true]
[media.settings.xml]: [/vendor/etc/media_profiles_vendor.xml]
[media.stagefright.enable-aac]: [true]
[media.stagefright.enable-fma2dp]: [true]
[media.stagefright.enable-http]: [true]
[media.stagefright.enable-player]: [true]
[media.stagefright.enable-qcp]: [true]
[media.stagefright.enable-scan]: [true]
[media.stagefright.thumbnail.prefer_hw_codecs]: [true]
[miui.usb.dialog]: [1]
[mmp.enable.3g2]: [true]
[net.bt.name]: [Android]
[net.hostname]: [RedmiK20Pro-RedmiK20]
[net.qtaguid_enabled]: [1]
[net.tcp.2g_init_rwnd]: [10]
[net.tcp.default_init_rwnd]: [60]
[nfc.firm_gpio.enable]: []
[nfc.fw.downloadmode_force]: [0]
[nfc.initialized]: [true]
[persist.audio.button_jack.profile]: [volume]
[persist.audio.button_jack.switch]: [0]
[persist.audio.fluence.speaker]: [true]
[persist.audio.fluence.voicecall]: [true]
[persist.audio.fluence.voicerec]: [false]
[persist.camera.dualcal.state]: [0]
[persist.camera.module.info]: [back_camera=_ofilm_Sony_imx586;front_camera=_sunny_Samsung_s5k3t2;]
[persist.camera.module.infoext]: [back_camera_aux=_ofilm_OV_ov8856;back_camera_aux=_ofilm_Samsung_s5k3l6;]
[persist.camera.sat.fallback.dist]: [40]
[persist.camera.sat.fallback.dist.d]: [10]
[persist.camera.sat.fallback.lux.d]: [50]
[persist.camera.sat.fallback.luxindex]: [330]
[persist.dalvik.vm.dex2oat-threads]: [6]
[persist.data.df.agg.dl_pkt]: [10]
[persist.data.df.agg.dl_size]: [4096]
[persist.data.df.dev_name]: [rmnet_usb0]
[persist.data.df.dl_mode]: [5]
[persist.data.df.iwlan_mux]: [9]
[persist.data.df.mux_count]: [8]
[persist.data.df.ul_mode]: [5]
[persist.data.wda.enable]: [true]
[persist.debug.coresight.config]: [stm-events]
[persist.debug.wfd.enable]: [1]
[persist.displayfeature.dc_backlight.enable]: [false]
[persist.displayfeature.dc_backlight.threshold]: [610]
[persist.enable_task_snapshots]: [false]
[persist.fod.modified.dc_status]: [false]
[persist.fuse_sdcard]: [true]
[persist.logd.size]: []
[persist.logd.size.crash]: [1M]
[persist.logd.size.radio]: [4M]
[persist.logd.size.system]: [4M]
[persist.miui.density_v2]: [440]
[persist.mm.enable.prefetch]: [true]
[persist.power.useautobrightadj]: [true]
[persist.quick.charge.detect]: [1]
[persist.radio.NO_STAPA]: [1]
[persist.radio.VT_HYBRID_ENABLE]: [1]
[persist.radio.apm_sim_not_pwdn]: [1]
[persist.radio.autosms_dmok]: [yes]
[persist.radio.default.data]: [1]
[persist.radio.default.voice]: [-1]
[persist.radio.dynamic_sar]: [false]
[persist.radio.goldencopy_flag]: [true]
[persist.radio.imei]: [867600042423771]
[persist.radio.imei1]: [867600042423771]
[persist.radio.imei2]: [867600042423789]
[persist.radio.meid]: [99001394121189]
[persist.radio.mtbf_flag]: [false]
[persist.radio.multisim.config]: [dsds]
[persist.radio.operating_mode]: [0]
[persist.radio.sar_sar_sensor]: [true]
[persist.rcs.supported]: [0]
[persist.rild.nitz_long_ons_0]: []
[persist.rild.nitz_long_ons_1]: []
[persist.rild.nitz_long_ons_2]: []
[persist.rild.nitz_long_ons_3]: []
[persist.rild.nitz_plmn]: []
[persist.rild.nitz_short_ons_0]: []
[persist.rild.nitz_short_ons_1]: []
[persist.rild.nitz_short_ons_2]: []
[persist.rild.nitz_short_ons_3]: []
[persist.rmnet.data.enable]: [true]
[persist.security.adbinput]: [1]
[persist.security.adbinstall]: [1]
[persist.sys.ai_preload_cloud]: [0]
[persist.sys.apply_miui_browser]: [false]
[persist.sys.boot.reason]: []
[persist.sys.boot.reason.history]: [reboot,1614257099
shutdown,,1614244701
reboot,,1562225113
shutdown,,1562131143]
[persist.sys.dalvik.vm.lib.2]: [libart.so]
[persist.sys.device_name]: [Redmi K20 Pro]
[persist.sys.device_provisioned]: [1]
[persist.sys.displayinset.top]: [0]
[persist.sys.enable_inputopts]: [true]
[persist.sys.enable_ioprefetch]: [false]
[persist.sys.enable_miui_booster]: [1]
[persist.sys.enable_pinfile]: [true]
[persist.sys.force_sw_gles]: [1]
[persist.sys.gps.lpp]: [0]
[persist.sys.hang]: [false]
[persist.sys.hang.logname]: []
[persist.sys.hardcoder.name]: [miui_booster]
[persist.sys.isolated_storage]: [true]
[persist.sys.labtest_flag]: [false]
[persist.sys.locale]: [zh-CN]
[persist.sys.mcd_config_file]: [/system/etc/mcd_default.conf]
[persist.sys.mem_cgated]: [1]
[persist.sys.mem_fgated]: [1]
[persist.sys.memctrl]: [on]
[persist.sys.mibridge_auth_uids]: [1000,10062,10032]
[persist.sys.miconnect.running]: [1]
[persist.sys.mispeed_auth_uids]: []
[persist.sys.mitalk.enable]: [true]
[persist.sys.miui_animator_sched.bigcores]: [4-7]
[persist.sys.miui_optimization]: [true]
[persist.sys.miuibooster.name]: [miui_booster]
[persist.sys.notification_rank]: [3]
[persist.sys.notification_ver]: [2]
[persist.sys.offlinelog.kernel]: [false]
[persist.sys.offlinelog.logcat]: [false]
[persist.sys.offlinelog.logcatkernel]: [false]
[persist.sys.opt_accessibility]: [false]
[persist.sys.powmillet.enable]: [true]
[persist.sys.qseelogd]: [true]
[persist.sys.released]: [true]
[persist.sys.sf.color_saturation]: [1.0]
[persist.sys.sf.native_mode]: [0]
[persist.sys.shutdown_state]: [2]
[persist.sys.smartcover_mode]: [0]
[persist.sys.strictmode.disable]: [true]
[persist.sys.strictmode.visual]: []
[persist.sys.support_detect_fc]: [false]
[persist.sys.support_fakecell]: [true]
[persist.sys.task_isolation]: [true]
[persist.sys.timezone]: [Asia/Shanghai]
[persist.sys.usb.config]: [adb]
[persist.sys.usb.ffbm-02.func]: [adb]
[persist.sys.watchdog_enhanced]: [true]
[persist.sys.webview.vmsize]: [133386016]
[persist.sys.wfd.virtual]: [0]
[persist.timed.enable]: [true]
[persist.vendor.camera.enableNCSService]: [TRUE]
[persist.vendor.camera.enableTOFInterface]: [TRUE]
[persist.vendor.camera.frontMain.info]: [/vendor/lib64/camera/com.qti.sensormodule.raphael_sunny_s5k3t2.bin]
[persist.vendor.camera.frontMain.vendorID]: [01]
[persist.vendor.camera.mi.module.info]: [back_camera=_ofilm_Sony_imx586;back_camera_aux=_ofilm_OV_ov8856;]
[persist.vendor.camera.mi.module.infoext]: [front_camera=_sunny_Samsung_s5k3t2;back_camera_aux=_ofilm_Samsung_s5k3l6;]
[persist.vendor.camera.mi.module.infoext2]: []
[persist.vendor.camera.rearMain.info]: [/vendor/lib64/camera/com.qti.sensormodule.raphael_ofilm_imx586.bin]
[persist.vendor.camera.rearMain.vendorID]: [07]
[persist.vendor.camera.rearTele.info]: [/vendor/lib64/camera/com.qti.sensormodule.raphael_ofilm_ov8856.bin]
[persist.vendor.camera.rearTele.vendorID]: [07]
[persist.vendor.camera.rearUltra.info]: [/vendor/lib64/camera/com.qti.sensormodule.raphael_ofilm_s5k3l6.bin]
[persist.vendor.camera.rearUltra.vendorID]: [07]
[persist.vendor.df.color.temp]: [2]
[persist.vendor.df.extcolor.proc]: [0]
[persist.vendor.dpm.feature]: [1]
[persist.vendor.dpm.loglevel]: [0]
[persist.vendor.dpm.nsrm.bkg.evt]: [3955]
[persist.vendor.max.brightness]: [430]
[persist.vendor.sys.cyclecount]: [2]
[persist.vendor.sys.pay.fido]: [0058#0001]
[persist.vendor.sys.pay.ifaa]: [1]
[persist.vendor.sys.prechargefull]: [3979000]
[persist.vendor.sys.preresistance]: [177245]
[persist.vendor.sys.provision.status]: [true]
[persist.vm.stackdump.threshold]: [0]
[pm.dexopt.ab-ota]: [speed-profile]
[pm.dexopt.bg-dexopt]: [speed-profile]
[pm.dexopt.boot]: [verify]
[pm.dexopt.first-boot]: [quicken]
[pm.dexopt.inactive]: [verify]
[pm.dexopt.install]: [speed-profile]
[pm.dexopt.is_upgrade]: [false]
[pm.dexopt.shared]: [speed]
[qcom.hw.aac.encoder]: [true]
[qemu.hw.mainkeys]: [0]
[radio.dataroaming.enable.suffix.subid]: [true]
[ril.ecclist]: [911,122,112,000,110,08,999,120,119,118]
[ril.ecclist1]: [911,122,112,000,110,08,999,120,119,118]
[ril.fake_bs_flag0]: [FALSE:0]
[ril.limit_service_mnc]: [WCDMA_460]
[ril.mcc.mnc0]: []
[ril.mcc.mnc1]: []
[ril.subscription.types]: [RUIM]
[rild.libpath]: [/vendor/lib64/libril-qc-hal-qmi.so]
[ro.actionable_compatible_property.enabled]: [true]
[ro.adb.secure]: [1]
[ro.af.client_heap_size_kbyte]: [7168]
[ro.allow.mock.location]: [0]
[ro.apex.updatable]: [false]
[ro.baseband]: [msm]
[ro.bluetooth.emb_wp_mode]: [false]
[ro.bluetooth.library_name]: [libbluetooth_qti.so]
[ro.bluetooth.wipower]: [false]
[ro.board.platform]: [msmnile]
[ro.boot.avb_version]: [1.1]
[ro.boot.baseband]: [msm]
[ro.boot.bootdevice]: [1d84000.ufshc]
[ro.boot.bootreason]: [reboot]
[ro.boot.console]: [ttyMSM0]
[ro.boot.cpuid]: [0x44fc25eb]
[ro.boot.dp]: [0x0]
[ro.boot.dtb_idx]: [2]
[ro.boot.dtbo_idx]: [1]
[ro.boot.flash.locked]: [1]
[ro.boot.hardware]: [qcom]
[ro.boot.hwc]: [CN]
[ro.boot.hwlevel]: [MP]
[ro.boot.hwversion]: [4.9.0]
[ro.boot.hypvm]: [disable]
[ro.boot.keymaster]: [1]
[ro.boot.memcg]: [1]
[ro.boot.ramdump]: [disable]
[ro.boot.secureboot]: [1]
[ro.boot.serialno]: [c1109e86]
[ro.boot.usbcontroller]: [a600000.dwc3]
[ro.boot.vbmeta.avb_version]: [1.0]
[ro.boot.vbmeta.device_state]: [locked]
[ro.boot.vbmeta.digest]: [7a1ce5a47105983c0b8c02aa035fbbbe1f8d0e88a2ad1856f2b8a76f6099546e]
[ro.boot.vbmeta.hash_alg]: [sha256]
[ro.boot.vbmeta.invalidate_on_error]: [yes]
[ro.boot.vbmeta.size]: [5184]
[ro.boot.verifiedbootstate]: [green]
[ro.boot.veritymode]: [enforcing]
[ro.bootimage.build.date]: [Mon Sep 21 00:48:57 CST 2020]
[ro.bootimage.build.date.utc]: [1600620537]
[ro.bootimage.build.fingerprint]: [Xiaomi/raphael/raphael:10/QKQ1.190825.002/V12.0.4.0.QFKCNXM:user/release-keys]
[ro.bootloader]: [unknown]
[ro.bootmode]: [unknown]
[ro.build.characteristics]: [nosdcard]
[ro.build.date]: [Mon Sep 21 00:48:57 CST 2020]
[ro.build.date.utc]: [1600620537]
[ro.build.description]: [raphael-user 10 QKQ1.190825.002 V12.0.4.0.QFKCNXM release-keys]
[ro.build.display.id]: [QKQ1.190825.002 test-keys]
[ro.build.fingerprint]: [Xiaomi/raphael/raphael:10/QKQ1.190825.002/V12.0.4.0.QFKCNXM:user/release-keys]
[ro.build.flavor]: [raphael-user]
[ro.build.hardware.version]: [V1]
[ro.build.host]: [c5-miui-ota-bd149.bj]
[ro.build.id]: [QKQ1.190825.002]
[ro.build.keys]: [test-keys]
[ro.build.product]: [raphael]
[ro.build.system_root_image]: [true]
[ro.build.tags]: [release-keys]
[ro.build.type]: [user]
[ro.build.user]: [builder]
[ro.build.version.all_codenames]: [REL]
[ro.build.version.base_os]: []
[ro.build.version.codename]: [REL]
[ro.build.version.incremental]: [V12.0.4.0.QFKCNXM]
[ro.build.version.min_supported_target_sdk]: [23]
[ro.build.version.preview_sdk]: [0]
[ro.build.version.preview_sdk_fingerprint]: [REL]
[ro.build.version.release]: [10]
[ro.build.version.sdk]: [29]
[ro.build.version.security_patch]: [2020-09-01]
[ro.carrier]: [unknown]
[ro.colorpick_adjust]: [true]
[ro.com.android.dataroaming]: [false]
[ro.com.android.mobiledata]: [false]
[ro.com.google.clientidbase]: [android-xiaomi]
[ro.config.alarm_alert]: [Alarm_Classic.ogg]
[ro.config.elder-ringtone]: [Angel.mp3]
[ro.config.media_vol_default]: [10]
[ro.config.notification_sound]: [pixiedust.ogg]
[ro.config.ringtone]: [Ring_Synth_04.ogg]
[ro.config.sms_delivered_sound]: [MessageComplete.ogg]
[ro.config.sms_received_sound]: [FadeIn.ogg]
[ro.config.vc_call_vol_steps]: [11]
[ro.control_privapp_permissions]: [enforce]
[ro.crypto.allow_encrypt_override]: [true]
[ro.crypto.state]: [encrypted]
[ro.crypto.type]: [file]
[ro.crypto.volume.filenames_mode]: [aes-256-cts]
[ro.dalvik.vm.native.bridge]: [0]
[ro.debuggable]: [0]
[ro.device_owner]: [false]
[ro.display.type]: [oled]
[ro.displayfeature.histogram.enable]: [true]
[ro.eyecare.brightness.level]: [5]
[ro.eyecare.brightness.threshold]: [11]
[ro.fod.dimlayer.enable]: [true]
[ro.fota.oem]: [Xiaomi]
[ro.frp.pst]: [/dev/block/bootdevice/by-name/frp]
[ro.hardware]: [qcom]
[ro.hardware.egl]: [adreno]
[ro.hardware.keystore_desede]: [true]
[ro.hardware.vulkan]: [adreno]
[ro.hist.brightness.threshold]: [7]
[ro.hwui.drop_shadow_cache_size]: [6]
[ro.hwui.gradient_cache_size]: [1]
[ro.hwui.layer_cache_size]: [48]
[ro.hwui.path_cache_size]: [32]
[ro.hwui.r_buffer_cache_size]: [8]
[ro.hwui.text_large_cache_height]: [1024]
[ro.hwui.text_large_cache_width]: [2048]
[ro.hwui.text_small_cache_height]: [1024]
[ro.hwui.text_small_cache_width]: [1024]
[ro.hwui.texture_cache_flushrate]: [0.4]
[ro.hwui.texture_cache_size]: [72]
[ro.hwui.use_vulkan]: []
[ro.iorapd.enable]: [false]
[ro.kernel.qemu.gles]: [0]
[ro.logd.size]: [2M]
[ro.logd.size.stats]: [64K]
[ro.malloc.impl]: [jemalloc]
[ro.mi.development]: [false]
[ro.minui.pixel_format]: [RGBX_8888]
[ro.miui.cust_hardware]: [V1]
[ro.miui.cust_variant]: [cn]
[ro.miui.has_cust_partition]: [true]
[ro.miui.has_gmscore]: [1]
[ro.miui.has_handy_mode_sf]: [1]
[ro.miui.has_real_blur]: [1]
[ro.miui.has_security_keyboard]: [1]
[ro.miui.mcc]: [9460]
[ro.miui.mnc]: [9999]
[ro.miui.pm.movedtodata.apps]: [com.google.android.apps.photos,com.google.android.apps.docs,com.google.android.music,com.google.android.videos,com.google.android.apps.tachyon]
[ro.miui.region]: [CN]
[ro.miui.support_miui_ime_bottom]: [1]
[ro.miui.ui.font.theme_apply]: [true]
[ro.miui.ui.fonttype]: [mipro]
[ro.miui.ui.version.code]: [10]
[ro.miui.ui.version.name]: [V12]
[ro.miui.version.code_time]: [1570636800]
[ro.netflix.bsp_rev]: [Q855-16947-1]
[ro.nfc.port]: [I2C]
[ro.odm.build.date]: [Mon Sep 21 00:48:57 CST 2020]
[ro.odm.build.date.utc]: [1600620537]
[ro.odm.build.fingerprint]: [Xiaomi/raphael/raphael:10/QKQ1.190825.002/V12.0.4.0.QFKCNXM:user/release-keys]
[ro.oem_unlock_supported]: [1]
[ro.opengles.version]: [196610]
[ro.postinstall.fstab.prefix]: [/system]
[ro.product.board]: [raphael]
[ro.product.brand]: [Xiaomi]
[ro.product.cert]: [M1903F11A]
[ro.product.cpu.abi]: [arm64-v8a]
[ro.product.cpu.abilist]: [arm64-v8a,armeabi-v7a,armeabi]
[ro.product.cpu.abilist32]: [armeabi-v7a,armeabi]
[ro.product.cpu.abilist64]: [arm64-v8a]
[ro.product.cuptsm]: [XIAOMI|ESE|02|01]
[ro.product.device]: [raphael]
[ro.product.first_api_level]: [28]
[ro.product.locale]: [zh-CN]
[ro.product.manufacturer]: [Xiaomi]
[ro.product.model]: [Redmi K20 Pro]
[ro.product.name]: [raphael]
[ro.product.odm.brand]: [Xiaomi]
[ro.product.odm.device]: [raphael]
[ro.product.odm.manufacturer]: [Xiaomi]
[ro.product.odm.model]: [Redmi K20 Pro]
[ro.product.odm.name]: [raphael]
[ro.product.system.brand]: [Xiaomi]
[ro.product.system.device]: [raphael]
[ro.product.system.manufacturer]: [Xiaomi]
[ro.product.system.model]: [Redmi K20 Pro]
[ro.product.system.name]: [raphael]
[ro.product.vendor.brand]: [Xiaomi]
[ro.product.vendor.device]: [raphael]
[ro.product.vendor.manufacturer]: [Xiaomi]
[ro.product.vendor.model]: [Redmi K20 Pro]
[ro.product.vendor.name]: [raphael]
[ro.property_service.version]: [2]
[ro.qc.sdk.audio.fluencetype]: [none]
[ro.qc.sdk.audio.ssr]: [false]
[ro.revision]: [0]
[ro.ril.factory_id]: [1]
[ro.ril.miui.imei0]: [867600042423771]
[ro.ril.miui.imei1]: [867600042423789]
[ro.ril.nal]: []
[ro.ril.oem.imei]: [867600042423771]
[ro.ril.oem.imei1]: [867600042423771]
[ro.ril.oem.imei2]: [867600042423789]
[ro.ril.oem.meid]: [99001394121189]
[ro.ril.oem.psno]: [23763/29U500393]
[ro.ril.oem.sno]: [25926F032851]
[ro.ril.operator]: []
[ro.ril.region]: []
[ro.rom.zone]: [1]
[ro.se.type]: [eSE,HCE,UICC]
[ro.secure]: [1]
[ro.secureboot.devicelock]: [1]
[ro.secureboot.lockstate]: [locked]
[ro.serialno]: [c1109e86]
[ro.sf.lcd_density]: [440]
[ro.surface_flinger.has_HDR_display]: [true]
[ro.surface_flinger.has_wide_color_display]: [true]
[ro.surface_flinger.use_color_management]: [true]
[ro.surface_flinger.wcg_composition_dataspace]: [143261696]
[ro.system.build.date]: [Mon Sep 21 00:48:57 CST 2020]
[ro.system.build.date.utc]: [1600620537]
[ro.system.build.fingerprint]: [Xiaomi/raphael/raphael:10/QKQ1.190825.002/V12.0.4.0.QFKCNXM:user/release-keys]
[ro.system.build.id]: [QKQ1.190825.002]
[ro.system.build.tags]: [release-keys]
[ro.system.build.type]: [user]
[ro.system.build.version.incremental]: [V12.0.4.0.QFKCNXM]
[ro.system.build.version.release]: [10]
[ro.system.build.version.sdk]: [29]
[ro.telephony.call_ring.multiple]: [false]
[ro.telephony.default_cdma_sub]: [0]
[ro.telephony.default_network]: [22,22]
[ro.telephony.iwlan_operation_mode]: [legacy]
[ro.treble.enabled]: [true]
[ro.vendor.build.date]: [Mon Sep 21 00:48:57 CST 2020]
[ro.vendor.build.date.utc]: [1600620537]
[ro.vendor.build.fingerprint]: [Xiaomi/raphael/raphael:10/QKQ1.190825.002/V12.0.4.0.QFKCNXM:user/release-keys]
[ro.vendor.build.security_patch]: [2020-09-01]
[ro.vendor.df.effect.conflict]: [1]
[ro.vendor.miui.cust_hardware]: [V1]
[ro.vendor.miui.cust_variant]: [cn]
[ro.vendor.miui.mcc]: [9460]
[ro.vendor.miui.mnc]: [9999]
[ro.vendor.miui.region]: [CN]
[ro.vendor.qti.va_aosp.support]: [1]
[ro.vendor.qti.va_odm.support]: [1]
[ro.vendor.soft_backlight.enable]: [true]
[ro.vndk.version]: [29]
[ro.whitepoint_calibration_enable]: [false]
[ro.wifi.channels]: []
[ro.wlan.chip]: [39xx]
[ro.wlan.mimo]: [1]
[ro.wlan.vendor]: [qcom]
[ro.xiaomi.bl.poll]: [true]
[ro.zygote]: [zygote64_32]
[security.perf_harden]: [1]
[selinux.restorecon_recursive]: [/data/misc_ce/0]
[service.bootanim.exit]: [1]
[service.sf.present_timestamp]: [1]
[sys.boot.reason]: [reboot]
[sys.boot.reason.last]: [reboot]
[sys.boot_completed]: [1]
[sys.displayfeature.hbm.enable]: [true]
[sys.displayfeature_hidl]: [true]
[sys.dump_progress]: [1000]
[sys.haptic.down.normal]: [30]
[sys.haptic.down.strong]: [60]
[sys.haptic.down.weak]: [18]
[sys.haptic.runin]: [13]
[sys.is_mem_low_level]: [0]
[sys.isolated_storage_snapshot]: [true]
[sys.kernel.firstboot]: [1614257110045]
[sys.keyguard.screen_off_by_lid]: [false]
[sys.logbootcomplete]: [1]
[sys.miui.runtime.reboot]: [0]
[sys.miui.screenshot]: [false]
[sys.miui.shutdown.waittime]: [500]
[sys.miui.user_authenticated]: [true]
[sys.mtp.device_type]: [2]
[sys.net.support.netprio]: [true]
[sys.oem_unlock_allowed]: [0]
[sys.power.starttimes]: [3]
[sys.qca1530]: [detect]
[sys.rescue_boot_count]: [1]
[sys.retaildemo.enabled]: [0]
[sys.sysctl.extra_free_kbytes]: [29615]
[sys.sysctl.tcp_def_init_rwnd]: [60]
[sys.system_server.start_count]: [1]
[sys.system_server.start_elapsed]: [6813]
[sys.system_server.start_uptime]: [6813]
[sys.tp.grip_enable]: [0]
[sys.usb.config]: [mtp,adb]
[sys.usb.configfs]: [1]
[sys.usb.controller]: [a600000.dwc3]
[sys.usb.ffs.ready]: [1]
[sys.usb.state]: [mtp,adb]
[sys.use_memfd]: [false]
[sys.user.0.ce_available]: [true]
[sys.vendor.shutdown.waittime]: [500]
[sys.wifitracing.started]: [1]
[telephony.lteOnCdmaDevice]: [1]
[tunnel.audio.encode]: [true]
[use.voice.path.for.pcm.voip]: [true]
[vendor.camera.boot_complete]: [true]
[vendor.camera.sensor.frontMain.fuseID]: [sunn001200586036ADF800000000000000000000000000000000000000000000]
[vendor.camera.sensor.rearMain.fuseID]: [ofil00229160586B831601656101000000000000000000000000000000000000]
[vendor.camera.sensor.rearTele.fuseID]: [ofil00320088560A19012006060100171A080003000000000000000000000000]
[vendor.camera.sensor.rearUltra.fuseID]: [ofil00164083218EADD800000000000000000000000000000000000000000000]
[vendor.gralloc.disable_ubwc]: [0]
[vendor.otrp.time]: [ok]
[vendor.sys.listeners.registered]: [true]
[vendor.sys.rpmb_state]: [23]
[vold.has_adoptable]: [0]
[vold.has_quota]: [1]
[vold.has_reserved]: [1]
[vold.post_fs_data_done]: [1]
[wifi.interface]: [wlan0]

底层接口:
 
另外,在程序中,你可以用__system_property_get函数获取build.prop中的具体属性值,例如:
    __system_property_get("ro.build.version.release", version_release); 
得到的是手机采用的Android版本,最常见的有: 2.1, 2.2, 2.3 。


充分了解设备的相关信息,也是非常重要的。

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐