android adb shell getprop

有时候需要判断手机系统的ROM的版本,判断ROM是MIUI、EMUI还是Flyme,就可以使用getprop命令,或者在系统build.prop文件查找是否有对应属性来判断是什么ROM版本

小米

小米官方文档:如何识别小米设备/MIUI系统 判断小米设备 Build.MANUFACTURER是否为Xiaomi 查询build.prop是否有ro.miui.ui.version.name属性 ps:Build.MODEL是机器型号,小米2是MI 2

判断MIUI版本

adb shell getprop ro.miui.ui.version.name

ro.miui.ui.version.name返回V9表示是MIUI V9系统,V10表示MIUI V10系统

华为

adb shell getprop ro.build.version.emui

OPPO

adb shell getprop ro.build.version.opporom

VIVO

adb shell getprop ro.vivo.os.version

锤子

adb shell getprop ro.smartisan.version

魅族

Build.DISPLAY是否包含“FLYME”字符串

360

Build.MANUFACTURER为“QIKU”或“360”

乐视

如果官方没有给出用哪个属性判断,就要自己来决定了,一般系统ROM登记都有一个内部版本号,是个不错的选择,例如小米ro.miui.ui.version.code,华为ro.build.hw_emui_api_level

MIUI getprop

> adb shell getprop
[DEVICE_PROVISIONED]: [1]
[audio.offload.buffer.size.kb]: [32]
[audio.offload.disable]: [1]
[audio.offload.gapless.enabled]: [false]
[audio.offload.pcm.enable]: [false]
[audio.offload.video]: [true]
[av.debug.disable.pers.cache]: [true]
[bluetooth.hfp.client]: [1]
[camera2.portability.force_api]: [1]
[dalvik.vm.dex2oat-Xms]: [64m]
[dalvik.vm.dex2oat-Xmx]: [512m]
[dalvik.vm.dex2oat-threads]: [3]
[dalvik.vm.heapgrowthlimit]: [128m]
[dalvik.vm.heapmaxfree]: [32m]
[dalvik.vm.heapminfree]: [8m]
[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]: [krait]
[dalvik.vm.lockprof.threshold]: [1000]
[dalvik.vm.stack-trace-file]: [/data/anr/traces.txt]
[debug.atrace.tags.enableflags]: [0]
[debug.composition.type]: [c2d]
[debug.egl.hw]: [1]
[debug.force_rtl]: [0]
[debug.mdpcomp.4k2kSplit]: [1]
[debug.mdpcomp.logs]: [0]
[debug.sf.hw]: [1]
[dev.bootcomplete]: [1]
[dev.pm.dyn_samplingrate]: [1]
[events.cpu]: [true]
[fw.max_users]: [5]
[gsm.apn.sim.operator.numeric]: []
[gsm.current.phone-type]: [1]
[gsm.network.type]: [Unknown]
[gsm.operator.alpha]: []
[gsm.operator.iso-country]: []
[gsm.operator.isroaming]: [false]
[gsm.operator.numeric]: []
[gsm.operator.orig.alpha]: []
[gsm.sim.operator.alpha]: []
[gsm.sim.operator.iso-country]: []
[gsm.sim.operator.numeric]: []
[gsm.sim.state]: [ABSENT]
[gsm.version.baseband]: [MPSS.DI.4.0-eaa9d90]
[gsm.version.ril-impl]: [Qualcomm RIL 1.0]
[hw.ad.mode]: [1]
[hw.cabl.version]: [1.1.20130401]
[hw.cabl.yuv]: [0]
[hw.pp.cfg]: [/data/misc/display/pp_data.cfg]
[init.svc.adbd]: [stopping]
[init.svc.adsprpcd]: [running]
[init.svc.atfwd]: [stopped]
[init.svc.audiod]: [running]
[init.svc.bootanim]: [stopped]
[init.svc.changepowermode]: [stopped]
[init.svc.charger_monitor]: [running]
[init.svc.checkpath]: [stopped]
[init.svc.checksdkpath]: [stopped]
[init.svc.cnd]: [running]
[init.svc.config_bluetooth]: [stopped]
[init.svc.debuggerd]: [running]
[init.svc.displayfeature]: [running]
[init.svc.dpmd]: [running]
[init.svc.drm]: [running]
[init.svc.fdpp]: [running]
[init.svc.flash_recovery]: [stopped]
[init.svc.gatekeeperd]: [running]
[init.svc.healthd]: [running]
[init.svc.hvdcp]: [running]
[init.svc.imsdatadaemon]: [running]
[init.svc.imsqmidaemon]: [running]
[init.svc.installd]: [running]
[init.svc.irsc_util]: [stopped]
[init.svc.keystore]: [running]
[init.svc.lmkd]: [running]
[init.svc.loc_launcher]: [running]
[init.svc.logd]: [running]
[init.svc.logd-reinit]: [stopped]
[init.svc.mcd_init]: [stopped]
[init.svc.mcd_service]: [running]
[init.svc.media]: [running]
[init.svc.miui-early-boot]: [stopped]
[init.svc.miui-post-boot]: [stopped]
[init.svc.modem_dump]: [running]
[init.svc.mpdecision]: [running]
[init.svc.mqsasd]: [running]
[init.svc.netd]: [running]
[init.svc.netmgrd]: [running]
[init.svc.p2p_supplicant]: [running]
[init.svc.ppd]: [running]
[init.svc.qcamerasvr]: [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.qcom-usb-sh]: [stopped]
[init.svc.qcomsysd]: [running]
[init.svc.qmuxd]: [running]
[init.svc.qseecomd]: [running]
[init.svc.qti-testscripts]: [stopped]
[init.svc.rfs_access]: [running]
[init.svc.ril-daemon]: [running]
[init.svc.rmt_storage]: [running]
[init.svc.sensors]: [running]
[init.svc.servicemanager]: [running]
[init.svc.setlockstate]: [stopped]
[init.svc.shelld]: [running]
[init.svc.ssr_setup]: [stopped]
[init.svc.surfaceflinger]: [running]
[init.svc.system_perf_init]: [stopped]
[init.svc.thermal-engine]: [running]
[init.svc.thermal-perf]: [stopped]
[init.svc.time_daemon]: [running]
[init.svc.ueventd]: [running]
[init.svc.usf-post-boot]: [stopped]
[init.svc.vold]: [running]
[init.svc.wcnss-service]: [running]
[init.svc.zygote]: [running]
[keyguard.no_require_sim]: [true]
[mcd.extra.params]: []
[media.aac_51_output_enabled]: [true]
[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.use-awesome]: [true]
[mm.enable.qcom_parser]: [37491]
[mm.enable.smoothstreaming]: [true]
[mmp.enable.3g2]: [true]
[net.bt.name]: [Android]
[net.change]: [net.dns3]
[net.dns1]: [fe80::2ec:acff:fecd:64ef%wlan0]
[net.dns2]: [192.168.1.1]
[net.dns3]: [114.114.114.114]
[net.hostname]: [MI4LTE-xiaomishouji]
[net.qtaguid_enabled]: [1]
[net.tcp.buffersize.default]: [4096,87380,110208,4096,16384,110208]
[net.tcp.buffersize.edge]: [4093,26280,35040,4096,16384,35040]
[net.tcp.buffersize.evdo]: [4094,87380,262144,4096,16384,262144]
[net.tcp.buffersize.gprs]: [4092,8760,11680,4096,8760,11680]
[net.tcp.buffersize.hsdpa]: [4094,87380,1220608,4096,16384,1220608]
[net.tcp.buffersize.hspa]: [4094,87380,1220608,4096,16384,1220608]
[net.tcp.buffersize.hspap]: [4094,87380,1220608,4096,16384,1220608]
[net.tcp.buffersize.hsupa]: [4094,87380,1220608,4096,16384,1220608]
[net.tcp.buffersize.lte]: [524288,1048576,2097152,262144,524288,1048576]
[net.tcp.buffersize.umts]: [4094,87380,110208,4096,16384,110208]
[net.tcp.buffersize.wifi]: [524288,2097152,4194304,262144,524288,1048576]
[net.tcp.default_init_rwnd]: [60]
[net.tcp.delack.default]: [1]
[net.tcp.delack.lte]: [8]
[net.tcp.delack.wifi]: [20]
[net.tcp.usercfg.default]: [0]
[net.tcp.usercfg.lte]: [1]
[net.tcp.usercfg.wifi]: [1]
[persist.added_boot_bgservices]: [4]
[persist.audio.dirac.speaker]: [true]
[persist.audio.fluence.speaker]: [true]
[persist.audio.fluence.voicecall]: [true]
[persist.audio.fluence.voicerec]: [false]
[persist.audio.hifi.volume]: [0]
[persist.cne.feature]: [1]
[persist.data.netmgrd.qos.enable]: [true]
[persist.data.tcp_rst_drop]: [true]
[persist.debug.wfd.enable]: [1]
[persist.demo.hdmirotationlock]: [false]
[persist.enable_task_snapshots]: [false]
[persist.env.fastdorm.enabled]: [true]
[persist.fastboot.enable]: [0]
[persist.fd.scroff.timer]: [3000]
[persist.fd.scron.timer]: [10000]
[persist.fuse_sdcard]: [true]
[persist.gps.qc_nlp_in_use]: [1]
[persist.hwc.mdpcomp.enable]: [true]
[persist.loc.nlp_name]: [com.qualcomm.location]
[persist.logd.prunelist]: [1013]
[persist.logd.size]: []
[persist.logd.size.crash]: [1M]
[persist.logd.size.radio]: [4M]
[persist.logd.size.system]: [4M]
[persist.power.useautobrightadj]: [true]
[persist.radio.adb_log_on]: [0]
[persist.radio.apm_sim_not_pwdn]: [0]
[persist.radio.custom_ecc]: [1]
[persist.radio.data_no_toggle]: [1]
[persist.radio.eons.enabled]: [false]
[persist.radio.force_on_dc]: [true]
[persist.radio.ignore_dom_time]: [5]
[persist.radio.imei]: [867323027708435]
[persist.radio.imei1]: [867323027708435]
[persist.radio.modem]: [LTE-CMCC]
[persist.radio.operating_mode]: [0]
[persist.radio.ramdump_sdcard]: [1]
[persist.radio.rat_on]: [combine]
[persist.radio.ril_payload_on]: [0]
[persist.radio.sglte_target]: [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.security.adbinstall]: [1]
[persist.speaker.prot.enable]: [true]
[persist.sys.apply_miui_browser]: [false]
[persist.sys.aries.power_profile]: [middle]
[persist.sys.button_headset_hook]: [media]
[persist.sys.button_jack_profile]: [volume]
[persist.sys.button_jack_switch]: [0]
[persist.sys.cnd.iwlan]: [1]
[persist.sys.country]: []
[persist.sys.dalvik.vm.lib.2]: [libart.so]
[persist.sys.display_cabc]: [1]
[persist.sys.display_eyecare]: [0]
[persist.sys.dpmd.nsrm]: [2]
[persist.sys.dpmd.tcm]: [2]
[persist.sys.enable_inputopts]: [true]
[persist.sys.enable_ioprefetch]: [true]
[persist.sys.enable_pinfile]: [true]
[persist.sys.frozenKernel]: [true]
[persist.sys.job_delay]: [true]
[persist.sys.klo]: [on]
[persist.sys.klo.rec_start]: [1551234420]
[persist.sys.labtest_flag]: [false]
[persist.sys.language]: []
[persist.sys.locale]: [zh-CN]
[persist.sys.localevar]: []
[persist.sys.mcd_config_file]: [/system/etc/mcd_default.conf]
[persist.sys.memctrl]: [on]
[persist.sys.mitalk.enable]: [true]
[persist.sys.notification_device]: [611]
[persist.sys.notification_num]: [4]
[persist.sys.notification_rank]: [3]
[persist.sys.notification_ver]: [1]
[persist.sys.opt_accessibility]: [false]
[persist.sys.perf.debug]: [true]
[persist.sys.profiler_ms]: [0]
[persist.sys.released]: [true]
[persist.sys.rtc.wakeup_record]: [on]
[persist.sys.sc_allow_conn]: [true]
[persist.sys.screenshot_mode]: [1]
[persist.sys.shutdown_state]: [3]
[persist.sys.silent]: [0]
[persist.sys.smartcover_mode]: [0]
[persist.sys.ssr.restart_level]: [ALL_ENABLE]
[persist.sys.strict_op_enable]: [false]
[persist.sys.support_fakecell]: [false]
[persist.sys.task_isolation]: [true]
[persist.sys.timezone]: [Asia/Shanghai]
[persist.sys.uflc]: [1]
[persist.sys.usb.config]: [mtp,adb]
[persist.sys.usb.config.extra]: [none]
[persist.sys.watchdog_enhanced]: [true]
[persist.sys.wfd.virtual]: [0]
[persist.sys.whitelist]: [/system/etc/whitelist_appops.xml]
[persist.timed.enable]: [true]
[persist.usb.hvdcp.detect]: [true]
[qc.izat.gtp.wifi.low_power]: [DISABLED]
[qcom.hw.aac.encoder]: [flase]
[radio.atfwd.start]: [false]
[ril.ecclist]: [*911,#911,000,08,110,999,118,119,120,122,911,112]
[ril.limit_service_mnc]: [GSM_460]
[ril.qcril_pre_init_lock_held]: [0]
[ril.slot0_imsi]: []
[ril.slot0_srv]: [limit]
[ril.subscription.types]: [RUIM]
[rild.libargs]: [-d /dev/smd0]
[rild.libpath]: [/vendor/lib/libril-qc-qmi-1.so]
[ro.adb.secure]: [1]
[ro.allow.mock.location]: [0]
[ro.baseband]: [msm]
[ro.bluetooth.alwaysbleon]: [true]
[ro.bluetooth.dun]: [true]
[ro.bluetooth.hfp.ver]: [1.7]
[ro.bluetooth.sap]: [true]
[ro.board.platform]: [msm8974]
[ro.boot.baseband]: [msm]
[ro.boot.bootdevice]: [msm_sdcc.1]
[ro.boot.emmc]: [true]
[ro.boot.hardware]: [qcom]
[ro.boot.hwversion]: [45]
[ro.boot.serialno]: [353b3128]
[ro.bootimage.build.date]: [Fri Jun 8 21:02:58 CST 2018]
[ro.bootimage.build.date.utc]: [1528462978]
[ro.bootimage.build.fingerprint]: [Xiaomi/cancro/cancro:6.0.1/MMB29M/8.4.28:user/release-keys]
[ro.bootloader]: [unknown]
[ro.bootmode]: [unknown]
[ro.btconfig.chip]: [WCN3680]
[ro.btconfig.dev]: [/dev/smd3]
[ro.btconfig.if]: [smd]
[ro.btconfig.vendor]: [qcom]
[ro.build.characteristics]: [nosdcard]
[ro.build.date]: [Fri Jun  8 20:51:15 CST 2018]
[ro.build.date.utc]: [1528462275]
[ro.build.description]: [cancro-user 6.0.1 MMB29M 8.4.28 release-keys]
[ro.build.display.id]: [MMB29M]
[ro.build.fingerprint]: [Xiaomi/cancro_wc_lte/cancro:6.0.1/MMB29M/8.4.28:user/release-keys]
[ro.build.flavor]: [cancro-user]
[ro.build.host]: [c3-miui-ota-bd146.bj]
[ro.build.id]: [MMB29M]
[ro.build.product]: [cancro]
[ro.build.software.version]: [Android6.0.1_9]
[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]: [8.4.28]
[ro.build.version.preview_sdk]: [0]
[ro.build.version.release]: [6.0.1]
[ro.build.version.sdk]: [23]
[ro.build.version.security_patch]: [2017-06-01]
[ro.carrier]: [unknown]
[ro.cit.nonrootbuild]: [true]
[ro.com.android.dataroaming]: [false]
[ro.com.android.mobiledata]: [false]
[ro.com.google.clientidbase]: [android-xiaomi]
[ro.com.widevine.cachesize]: [16777216]
[ro.config.alarm_alert]: [Alarm_Classic.ogg]
[ro.config.elder-ringtone]: [Angel.mp3]
[ro.config.max_starting_bg]: [4]
[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.crypto.state]: [unencrypted]
[ro.dalvik.vm.native.bridge]: [0]
[ro.data.large_tcp_window_size]: [true]
[ro.debuggable]: [0]
[ro.expect.recovery_id]: [0xdb36a2f19b41c198c73dd34a2bdaf54bf76a86d5000000000000000000000000]
[ro.fota.oem]: [Xiaomi]
[ro.gps.agps_provider]: [1]
[ro.hardware]: [qcom]
[ro.hdmi.enable]: [true]
[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.hwversion]: [45]
[ro.malloc.impl]: [jemalloc]
[ro.miui.cust_variant]: [cn]
[ro.miui.has_handy_mode_sf]: [1]
[ro.miui.has_real_blur]: [1]
[ro.miui.mcc]: [9460]
[ro.miui.mnc]: [9999]
[ro.miui.region]: [CN]
[ro.miui.ui.version.code]: [7]
[ro.miui.ui.version.name]: [V9]
[ro.miui.version.code_time]: [1528387200]
[ro.nfc.port]: [I2C]
[ro.opengles.version]: [196608]
[ro.product.board]: [MSM8974]
[ro.product.brand]: [Xiaomi]
[ro.product.cpu.abi]: [armeabi-v7a]
[ro.product.cpu.abi2]: [armeabi]
[ro.product.cpu.abilist]: [armeabi-v7a,armeabi]
[ro.product.cpu.abilist32]: [armeabi-v7a,armeabi]
[ro.product.cpu.abilist64]: []
[ro.product.cuptsm]: [XIAOMI|ESE|02|01]
[ro.product.device]: [cancro]
[ro.product.locale]: [zh-CN]
[ro.product.manufacturer]: [Xiaomi]
[ro.product.model]: [MI 4LTE]
[ro.product.name]: [cancro_wc_lte]
[ro.qc.sdk.audio.fluencetype]: [fluence]
[ro.qc.sdk.audio.ssr]: [false]
[ro.qc.sdk.camera.facialproc]: [false]
[ro.qc.sdk.gestures.camera]: [false]
[ro.qc.sdk.sensors.gestures]: [true]
[ro.qc.sdk.us.digitalpen]: [1]
[ro.qcom.ad]: [1]
[ro.qcom.ad.calib.data]: [/system/etc/calib.cfg]
[ro.qcom.ad.sensortype]: [2]
[ro.qualcomm.bluetooth.ftp]: [true]
[ro.qualcomm.bluetooth.hfp]: [true]
[ro.qualcomm.bluetooth.hsp]: [true]
[ro.qualcomm.bluetooth.map]: [true]
[ro.qualcomm.bluetooth.nap]: [true]
[ro.qualcomm.bluetooth.opp]: [true]
[ro.qualcomm.bluetooth.pbap]: [true]
[ro.qualcomm.bt.hci_transport]: [smd]
[ro.qualcomm.cabl]: [0]
[ro.qualcomm.perf.cores_online]: [2]
[ro.revision]: [0]
[ro.ril.ftm_mode]: [0]
[ro.ril.miui.imei0]: [867323027708435]
[ro.ril.oem.imei]: [867323027708435]
[ro.ril.oem.imei1]: [867323027708435]
[ro.ril.svdo]: [false]
[ro.ril.svlte1x]: [false]
[ro.rom.zone]: [1]
[ro.runtime.firstboot]: [1551234430309]
[ro.secure]: [1]
[ro.serialno]: [353b3128]
[ro.sf.lcd_density]: [480]
[ro.ss.nohidden]: [true]
[ro.ss.version]: [5.3.005-M32]
[ro.sys.display.support]: [31]
[ro.sys.ft_whole_anim]: [true]
[ro.sys.oem.sno]: [6D5429A03300]
[ro.syspart]: [system]
[ro.telephony.call_ring.multiple]: [false]
[ro.telephony.default_cdma_sub]: [0]
[ro.telephony.default_network]: [17]
[ro.use_data_netmgrd]: [true]
[ro.vendor.extension_library]: [libqti-perfd-client.so]
[ro.wifi.channels]: []
[ro.zygote]: [zygote32]
[runtime.akm.resetdoe]: [0]
[security.perf_harden]: [1]
[selinux.reload_policy]: [1]
[service.bootanim.exit]: [1]
[sys.boot_completed]: [1]
[sys.dump_progress]: [1000]
[sys.fake_bs_flag0]: [FALSE:38490]
[sys.ims.QMI_DAEMON_STATUS]: [1]
[sys.is_keyguard_showing]: [0]
[sys.keyguard.bleunlock]: [true]
[sys.keyguard.screen_off_by_lid]: [false]
[sys.keymaster.loaded]: [true]
[sys.listeners.registered]: [true]
[sys.mem.reclaim_on_launcher]: [120]
[sys.mem.swappiness_on_launcher]: [200]
[sys.miui.shutdown.waittime]: [500]
[sys.miui.user_authenticated]: [true]
[sys.net.support.netprio]: [true]
[sys.power.starttimes]: [1]
[sys.settings_global_version]: [22]
[sys.settings_secure_version]: [36]
[sys.settings_system_version]: [38]
[sys.sysctl.extra_free_kbytes]: [24300]
[sys.sysctl.tcp_def_init_rwnd]: [60]
[sys.usb.config]: [mtp,adb]
[sys.usb.configfs]: [0]
[sys.usb.state]: [mtp,adb]
[telephony.lteOnCdmaDevice]: [1]
[tunnel.audio.encode]: [false]
[use.voice.path.for.pcm.voip]: [true]
[vidc.debug.level]: [1]
[vold.has_adoptable]: [0]
[vold.post_fs_data_done]: [1]
[wifi.interface]: [wlan0]
[wlan.driver.ath]: [0]
[wlan.driver.status]: [ok]