判断 Android rom是不是 EMUI(Emotion UI)

1、定义一个可以获取系统属性的方法

    public static  String getProperty(String key, String defaultValue) {
        String value = defaultValue;
        try {
            Class<?> c = Class.forName("android.os.SystemProperties");
            Method get = c.getMethod("get", String.class, String.class);
            value = (String)(get.invoke(c, key, "unknown" ));
        } catch (Exception e) {
            e.printStackTrace();
        }finally {
            return value;
        }
    }

2、从系统属性中找到Emotion UI的key值
通过adb进入到shell下,运行命令getprop会得到类似下面的结果(荣耀6上的结果):

[af.resampler.quality]: [4]
[androidboot.longpress]: [false]
[audioril.lib]: [libhuawei-audio-ril.so]
[dalvik.vm.checkjni]: [false]
[dalvik.vm.heapgrowthlimit]: [192m]
[dalvik.vm.heapmaxfree]: [8m]
[dalvik.vm.heapminfree]: [2m]
[dalvik.vm.heapsize]: [512m]
[dalvik.vm.heapstartsize]: [8m]
[dalvik.vm.heaptargetutilization]: [0.75]
[dalvik.vm.stack-trace-file]: [/data/anr/traces.txt]
[debug.force_rtl]: [0]
[debug.hwc_dump_en]: [1]
[dev.bootcomplete]: [1]
[dhcp.wlan0.dns1]: [192.168.1.1]
[dhcp.wlan0.dns2]: []
[dhcp.wlan0.dns3]: []
[dhcp.wlan0.dns4]: []
[dhcp.wlan0.domain]: []
[dhcp.wlan0.gateway]: [192.168.1.1]
[dhcp.wlan0.ipaddress]: [192.168.1.94]
[dhcp.wlan0.leasetime]: [86400]
[dhcp.wlan0.mask]: [255.255.252.0]
[dhcp.wlan0.mtu]: []
[dhcp.wlan0.pid]: [29034]
[dhcp.wlan0.reason]: [BOUND]
[dhcp.wlan0.result]: [ok]
[dhcp.wlan0.server]: [192.168.1.1]
[dhcp.wlan0.vendorInfo]: []
[gsm.current.phone-type]: [1,1]
[gsm.data.gsm_only_not_allow_ps]: [false]
[gsm.esmflag.plmn.matched]: [false]
[gsm.huawei.RemindDataService]: [false]
[gsm.hw.cust.ecclist]: [110,119,120,122]
[gsm.hw.matchnum.short]: [11]
[gsm.hw.matchnum.vmn_shortcode]: [0]
[gsm.hw.matchnum]: [11]
[gsm.multipdp.plmn.matched]: [false]
[gsm.network.type]: [Unknown,Unknown]
[gsm.operator.alpha]: [null,null]
[gsm.operator.iso-country]: []
[gsm.operator.isroaming]: [false,false]
[gsm.operator.numeric]: [null,null]
[gsm.sim.fdnvalue]: [true]
[gsm.sim.hw_atr1]: [3B9E94801FC78031E073FE211B66D0FE97D17300]
[gsm.sim.hw_atr]: [null]
[gsm.sim.num.pin2]: [3]
[gsm.sim.num.pin]: [3]
[gsm.sim.num.puk2]: [10]
[gsm.sim.num.puk]: [10]
[gsm.sim.num.simlock]: [-1,-1,-1]
[gsm.sim.operator.alpha]: [,]
[gsm.sim.operator.iso-country]: [,cn]
[gsm.sim.operator.numeric]: [,46001]
[gsm.sim.state]: [NOT_READY,DEACTIVED]
[gsm.slot2.num.pin1]: [3]
[gsm.slot2.num.pin2]: [3]
[gsm.slot2.num.puk1]: [10]
[gsm.slot2.num.puk2]: [10]
[gsm.sms.7bit.enabled]: [0]
[gsm.sms.coding.national]: [0]
[gsm.sms.max.message.size]: [0]
[gsm.sms.to.mms.textthreshold]: [0]
[gsm.temp.defapn.state]: [false]
[gsm.version.baseband]: [21.236.00.00.031,21.236.00.00.031]
[gsm.version.ril-impl]: [android infineon balong-ril 1.0]
[huawei.check_root.adbd]: [safe]
[huawei.check_root.hotapermit]: [risk]
[huawei.check_root.mount]: [safe]
[huawei.check_root.oldstate]: [risk]
[huawei.check_root.prop]: [safe]
[huawei.check_root.setids]: [safe]
[huawei.check_root.su]: [risk]
[hw.lcd.density.scale]: [500]
[hw.lcd.density]: [480]
[init.svc.adbd]: [running]
[init.svc.applogcat]: [running]
[init.svc.bootanim]: [stopped]
[init.svc.chargelogcat]: [running]
[init.svc.check_longpress]: [stopped]
[init.svc.check_root]: [stopped]
[init.svc.debuggerd]: [running]
[init.svc.device-monitor]: [running]
[init.svc.dhcpcd_wlan0]: [running]
[init.svc.diagserver]: [running]
[init.svc.drm]: [running]
[init.svc.filebackup]: [running]
[init.svc.flash_recovery]: [stopped]
[init.svc.fuse_sdcard1]: [running]
[init.svc.gpsd]: [running]
[init.svc.hdmi-daemon]: [running]
[init.svc.healthd]: [running]
[init.svc.hw_ueventd]: [running]
[init.svc.hwnffserver]: [running]
[init.svc.hwpged]: [running]
[init.svc.immvibed]: [stopped]
[init.svc.installd]: [running]
[init.svc.jankservice]: [running]
[init.svc.keystore]: [running]
[init.svc.kmsgcat_cp]: [running]
[init.svc.kmsglogcat]: [running]
[init.svc.logserver]: [running]
[init.svc.macaddr]: [stopped]
[init.svc.media]: [running]
[init.svc.netd]: [running]
[init.svc.oeminfo_nvm]: [running]
[init.svc.p2p_supplicant]: [running]
[init.svc.ril-daemon1]: [running]
[init.svc.ril-daemon]: [running]
[init.svc.rillogcat]: [running]
[init.svc.servicemanager]: [running]
[init.svc.sleeplogcat]: [running]
[init.svc.storedefaultkey]: [stopped]
[init.svc.surfaceflinger]: [running]
[init.svc.teecd]: [running]
[init.svc.thermal-daemon]: [running]
[init.svc.ueventd]: [running]
[init.svc.vold]: [running]
[init.svc.zygote]: [running]
[install.frobidden]: [false]
[keyguard.no_require_sim]: [true]
[media.LowPowerPlay]: [no]
[modify_ram_show]: [true]
[net.bt.name]: [Android]
[net.change]: [net.ntp.timereference]
[net.dns1]: [192.168.1.1]
[net.dns2]: []
[net.hostname]: [android-c994b2b1dc301b84]
[net.ntp.time]: [1479782922753]
[net.ntp.timereference]: [3145372]
[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,262144,4096,16384,262144]
[net.tcp.buffersize.hspa]: [4094,87380,262144,4096,16384,262144]
[net.tcp.buffersize.hspap]: [4094,87380,1220608,4096,16384,1220608]
[net.tcp.buffersize.hsupa]: [4094,87380,262144,4096,16384,262144]
[net.tcp.buffersize.lte]: [524288,4194304,8388608,262144,524288,1048576]
[net.tcp.buffersize.umts]: [4094,87380,110208,4096,16384,110208]
[net.tcp.buffersize.wifi]: [524288,1048576,2097152,262144,524288,1048576]
[persist.alarm.enable.uhb]: [0]
[persist.config.hw.lca.region]: [inland]
[persist.dsds.enabled]: [true]
[persist.hw.power.shutdown]: [0]
[persist.radio.1sthwlauncher]: [1]
[persist.radio.apm_sim_not_pwdn]: [1]
[persist.radio.lte_enabled]: [true]
[persist.radio.nitz_hw_name]: []
[persist.radio.previousiccid]: [89860114831011314020]
[persist.radio.previousopcode]: [46001]
[persist.radio.sim.iccid]: [0]
[persist.radio.sim1.insert]: [1]
[persist.radio.sim2.insert]: [1]
[persist.radio.supp.notification]: [false]
[persist.service.imcs.enable]: [false]
[persist.service.tm2.tofile]: [false]
[persist.sys.actualpoweron]: [true]
[persist.sys.alarm.enable.uhb]: [1]
[persist.sys.country]: [CN]
[persist.sys.dalvik.vm.lib]: [libdvm.so]
[persist.sys.datacrash]: [0]
[persist.sys.default.res.xres]: [1080]
[persist.sys.default.res.yres]: [1920]
[persist.sys.hdcp_checking]: [always]
[persist.sys.hispeed_freq]: [1209600]
[persist.sys.hmp_boost_down]: [448]
[persist.sys.hmp_boost_up]: [871]
[persist.sys.hmp_default_down]: [512]
[persist.sys.hmp_default_up]: [978]
[persist.sys.huawei.debug.on]: [0]
[persist.sys.language]: [zh]
[persist.sys.lcd_density]: [480]
[persist.sys.localevar]: []
[persist.sys.logsystem.coredump]: [off]
[persist.sys.logsystem.modem]: [0]
[persist.sys.logsystem.neversend]: [1]
[persist.sys.logsystem.protohint]: [0]
[persist.sys.phb.debug.enable]: [1]
[persist.sys.phb.enable]: [1]
[persist.sys.powersystem.enable]: [1]
[persist.sys.powerup_reason]: [NORMAL]
[persist.sys.profiler_ms]: [0]
[persist.sys.res.icon_size]: [-1]
[persist.sys.res.level]: [0]
[persist.sys.res.levelchanged]: [0]
[persist.sys.ring.index]: [0]
[persist.sys.ringmode.index]: [0]
[persist.sys.smart_power]: [2]
[persist.sys.strictmode.disable]: [true]
[persist.sys.strictmode.visual]: []
[persist.sys.thermal]: [false]
[persist.sys.timezone]: [Asia/Shanghai]
[persist.sys.ui.hw]: [false]
[persist.sys.usb.config]: [hisuite,mtp,mass_storage,adb]
[persist.sys.wfd.sound]: [false]
[ril.balong_cid]: [0]
[ril.ecclist1]: [112,911,112,110,120,122,999,119]
[ril.ecclist]: [112,911,000,08,110,118,119,999,120,122]
[ril.hw_modem0.rssi]: [-140]
[ril.hw_modem1.rssi]: [-140]
[ril.modem.balong_nvm_server]: [true]
[ril.modem.timedwait_cpstate]: [60]
[ril.operator.numeric]: [fffff]
[rild.libargs1]: [-m modem1]
[rild.libargs]: [-m modem0]
[rild.libpath1]: [/system/lib/libbalong-ril.so]
[rild.libpath]: [/system/lib/libbalong-ril.so]
[rild.rild1_ready_to_start]: [true]
[ro.adb.secure]: [1]
[ro.ads.bootanim]: [true]
[ro.allow.mock.location]: [0]
[ro.audio.flinger_standbytime_ms]: [10000]
[ro.baseband]: [unknown]
[ro.board.boardid]: [17]
[ro.board.boardname]: [Mogolia_UL+G_V3]
[ro.board.modemid]: [3fb51000]
[ro.board.platform]: [hi3630]
[ro.boardid.product]: [71424]
[ro.boot.serialno]: [DU2NKM152D032358]
[ro.bootloader]: [unknown]
[ro.bootmode]: [unknown]
[ro.bt.bdaddr_path]: [/data/misc/bluedroid/macbt]
[ro.build.characteristics]: [default]
[ro.build.date.utc]: [1440786072]
[ro.build.date]: [Sat Aug 29 02:21:12 CST 2015]
[ro.build.description]: [hi3630-user 4.4.2 KOT49H eng.jenkins.20150829.021909 test-keys]
[ro.build.display.id]: [H60-L12V100R001CHNC00B317]
[ro.build.fingerprint]: [Huawei/H60-L12/hwH60:4.4.2/HDH60-L12/CHNC00B317:user/ota-rel-keys,release-keys]
[ro.build.hide.matchers]: [H60-L01;H60-L02;H60-L03;H60-L11;H60-L12;Huawei;Mali-T624]
[ro.build.hide.replacements]: [H300;H300;H300;H300;H300;Unknown;Unknown]
[ro.build.hide]: [false]
[ro.build.host]: [shacidculx1387]
[ro.build.id]: [HDH60-L12]
[ro.build.product]: [hi3630]
[ro.build.push_time.boot]: []
[ro.build.push_time.system]: []
[ro.build.tag_id.boot]: [tag_K3V300R001C00B272SP05]
[ro.build.tag_id.system]: [tag_K3V300R001C00B272SP05]
[ro.build.tag_time.boot]: [2014-08-13-0659]
[ro.build.tag_time.system]: [2014-08-13-0659]
[ro.build.tags]: [ota-rel-keys,release-keys]
[ro.build.type]: [user]
[ro.build.update.settings_info]: [B272SP05_p3038]
[ro.build.user]: [jenkins]
[ro.build.version.codename]: [REL]


[ro.build.version.emui]: [EmotionUI_3.0]


[ro.build.version.incremental]: [CHNC00B317]
[ro.build.version.release]: [4.4.2]
[ro.build.version.sdk]: [19]
[ro.camera.sound.forced]: [1]
[ro.carrier]: [unknown]
[ro.cellbroadcast.emergencyids]: [0-65534]
[ro.com.android.dateformat]: [MM-dd-yyyy]
[ro.com.google.clientidbase]: [android-huawei]
[ro.com.google.gmsversion]: [4.4.2_r5]
[ro.confg.hw_bootversion]: [H60-L12V100R001CHNC00B317_BOOT]
[ro.confg.hw_fastbootversion]: [H60-L12V100R001CHNC00B317_FASTBOOT]
[ro.confg.hw_systemversion]: [H60-L12V100R001CHNC00B317_SYSTEM]
[ro.config.AM_PM_STYLE]: [1]
[ro.config.ROG]: [true]
[ro.config.RoamingNetwork]: [true]
[ro.config.SupportSdcard]: [true]
[ro.config.addAct]: [false]
[ro.config.alarm_alert]: [Creamy.ogg]
[ro.config.always_animation]: [true]
[ro.config.app_big_icon_size]: [180]
[ro.config.auth.timeout]: [true]
[ro.config.autoconnect.swich]: [true]
[ro.config.bg_call_twinking]: [true]
[ro.config.browser_def_hw_nav]: [true]
[ro.config.browser_hw_nav_switch]: [true]
[ro.config.calendarsound]: [Step.ogg]
[ro.config.callrecord.enabled]: [1]
[ro.config.callwait_vibrator]: [true]
[ro.config.cmccCustmccmnc]: [true]
[ro.config.cmcc_forbidden_net]: [true]
[ro.config.cmdm_apn_not_display]: [true]
[ro.config.colorTemperature_K3]: [true]
[ro.config.compatibility_enable]: [1]
[ro.config.conn_diagnose]: [true]
[ro.config.cpu_info_display]: [Hisilicon Kirin 920]
[ro.config.delay_alarm_in_call]: [true]
[ro.config.delay_send_signal]: [true]
[ro.config.devicecolor]: [white]
[ro.config.disable_tapandpay]: [true]
[ro.config.disablesmbacklinght]: [true]
[ro.config.do_sdcard_upgrade]: [true]
[ro.config.ds_verbose_log_on]: [true]
[ro.config.dsds_mode]: [umts_gsm]
[ro.config.emailsound]: [Letter.ogg]
[ro.config.enable.telecom_epush]: [false]
[ro.config.fast_dormancy]: [false]
[ro.config.fm_type]: [libbcmfm_if]
[ro.config.gpstype]: [tlg]
[ro.config.helix_enable]: [true]
[ro.config.hide_sipcall]: [true]
[ro.config.hspap_hsdpa_open]: [1]
[ro.config.huawei_smallwindow]: [573,260,1069,1337]
[ro.config.hw.VIS]: [true]
[ro.config.hw.logsystem.send]: [0]
[ro.config.hw.security_volume]: [10]
[ro.config.hw_GSensorOptimize]: [true]
[ro.config.hw_ReduceSARParam]: [vdf]
[ro.config.hw_ReduceSAR]: [false]
[ro.config.hw_RemindWifiToPdp]: [true]
[ro.config.hw_accesscontrol]: [true]
[ro.config.hw_activity_state]: [true]
[ro.config.hw_addsettingsdbex]: [1]
[ro.config.hw_allow_rs_mms]: [true]
[ro.config.hw_allow_ums_and_mtp]: [true]
[ro.config.hw_always_allow_mms]: [false]
[ro.config.hw_battery_percent]: [true]
[ro.config.hw_blacklist]: [true]
[ro.config.hw_browser_operator]: [4]
[ro.config.hw_cmcc_emerg_invisi]: [1]
[ro.config.hw_custverdisplay]: [true]
[ro.config.hw_delapchannel]: [true]
[ro.config.hw_dolby]: [false]
[ro.config.hw_dsda]: [true]
[ro.config.hw_dts]: [true]
[ro.config.hw_ecclist_nocard]: [+120,+122]
[ro.config.hw_ecclist_withcard]: [+112]
[ro.config.hw_emerg]: [on]
[ro.config.hw_enable_merge]: [true]
[ro.config.hw_enable_preset_num]: [false]
[ro.config.hw_fake_ecc_list]: [110,120,122,999,119]
[ro.config.hw_flashless]: [true]
[ro.config.hw_gcf]: [false]
[ro.config.hw_globalEcc]: [false]
[ro.config.hw_glovemode_enabled]: [1]
[ro.config.hw_hightLightValue]: [200]
[ro.config.hw_hightLight]: [true]
[ro.config.hw_incall_report_on]: [true]
[ro.config.hw_ipv6_support]: [true]
[ro.config.hw_lockscreen]: [true]
[ro.config.hw_menu_unlockscreen]: [false]
[ro.config.hw_multiscreen]: [true]
[ro.config.hw_navigationbar]: [true]
[ro.config.hw_nlp]: [com.baidu.map.location]
[ro.config.hw_noti_expand]: [true]
[ro.config.hw_novoicesignal]: [true]
[ro.config.hw_omacp]: [1]
[ro.config.hw_opta]: [630]
[ro.config.hw_optb]: [156]
[ro.config.hw_power_saving]: [true]
[ro.config.hw_privacymode]: [true]
[ro.config.hw_proximitySensor]: [true]
[ro.config.hw_proximity]: [true]
[ro.config.hw_rightsmgr]: [1]
[ro.config.hw_sensorhub]: [true]
[ro.config.hw_showTestInfo]: [false]
[ro.config.hw_show_alert_dialog]: [true]
[ro.config.hw_show_number]: [false]
[ro.config.hw_shownavisettings]: [false]
[ro.config.hw_sim2airplane]: [true]
[ro.config.hw_simpleui_enable]: [1]
[ro.config.hw_singlehand]: [2]
[ro.config.hw_smartcardservice]: [true]
[ro.config.hw_subtitle_support]: [true]
[ro.config.hw_support_callbar]: [true]
[ro.config.hw_support_ipcall]: [true]
[ro.config.hw_testingsettings]: [true]
[ro.config.hw_toolbox]: [true]
[ro.config.hw_touchplus_enabled]: [true]
[ro.config.hw_upload_cp_log]: [true]
[ro.config.hw_useCtrlSocket]: [true]
[ro.config.hw_use_browser_ua]: [http://wap1.huawei.com/uaprof/HUAWEI_H60_L02_UAProfile.xml]
[ro.config.hw_vcardBase64]: [true]
[ro.config.hw_vdf_fastdormancy]: [true]
[ro.config.hw_virtual_key]: [true]
[ro.config.hw_voicerecord]: [true]
[ro.config.hw_wifi_frequency]: [0]
[ro.config.hw_wifitrafc]: [true]
[ro.config.hw_wirenetcontrol]: [true]
[ro.config.hwft_PinPukUnlockscr]: [true]
[ro.config.hwft_emerCallDefNum]: [""]
[ro.config.hwscope]: [true]
[ro.config.hwtheme]: [1]
[ro.config.incall_notify_mms]: [true]
[ro.config.isNeedApList]: [false]
[ro.config.keypasstouser]: [true]
[ro.config.launcher_matchcard]: [0]
[ro.config.messagesound]: [Whisper.ogg]
[ro.config.mmu_en]: [1]
[ro.config.modem_hsic]: [true]
[ro.config.networkmodeset]: [true]
[ro.config.norog.mulan_emui3_0]: [0]
[ro.config.notification_sound]: [Bongo.ogg]
[ro.config.overlay_path]: [/vendor/overlay/app/HD4X5/]
[ro.config.protocol_errors]: [false]
[ro.config.readBtAddress]: [true]
[ro.config.rebootAfterUnlockPUK]: [true]
[ro.config.ringtone2]: [Huawei_Tune.ogg]
[ro.config.ringtone]: [Honor.ogg]
[ro.config.show2846]: [true]
[ro.config.showBatteryCharge]: [true]
[ro.config.sprd_refresh_rsp]: [true]
[ro.config.support_ca]: [false]
[ro.config.switchPrimaryVolume]: [true]
[ro.config.themecolor]: [true]
[ro.config.toolbox_land_column]: [8]
[ro.config.toolbox_land_row]: [2]
[ro.config.toolbox_port_column]: [4]
[ro.config.toolbox_port_row]: [3]
[ro.config.updatelocation]: [true]
[ro.config.widevine_level3]: [true]
[ro.config.wifiManager_k3]: [true]
[ro.crypto.fuse_sdcard]: [true]
[ro.crypto.state]: [unsupported]
[ro.cust.cdrom]: [/cust/preinstalled/public/cdrom/autorun.iso]
[ro.debuggable]: [0]
[ro.dual.sim.phone]: [true]
[ro.factorytest]: [0]
[ro.gsm.systemui.carriericon]: [true]
[ro.hardware.alter]: [Kirin920]
[ro.hardware]: [hi3630]
[ro.huawei.cust.toolbox_airwifi]: [true]
[ro.hwcamera.sound.muteable]: [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.shape_cache_size]: [2]
[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.modem.type]: [sprd]
[ro.multi.rild]: [true]
[ro.networkstatus.delaytimer]: [20]
[ro.opengles.version]: [196608]
[ro.poweroff_alarm]: [true]
[ro.product.CustCVersion]: [C00]
[ro.product.CustDVersion]: [D317]
[ro.product.alert_time]: [true]
[ro.product.board]: [H60-L12]
[ro.product.brand]: [Huawei]
[ro.product.canplaypause]: [true]
[ro.product.cmcc.rtspcon]: [true]
[ro.product.cpu.abi2]: [armeabi]
[ro.product.cpu.abi]: [armeabi-v7a]
[ro.product.cucc.rtsplive]: [true]
[ro.product.device]: [hwH60]
[ro.product.ft.rtspeos]: [true]
[ro.product.hardwareversion]: [HL1UH60L02M]
[ro.product.locale.language]: [zh]
[ro.product.locale.region]: [CN]
[ro.product.manufacturer]: [HUAWEI]
[ro.product.model]: [H60-L12]
[ro.product.name]: [H60-L12]
[ro.product.only_2Gnetwork]: [false]
[ro.product.platform.pseudonym]: [1ARB9CV]
[ro.product.playreq.range]: [true]
[ro.product.streaming.custom]: [true]
[ro.revision]: [0]
[ro.ril.ecclist]: [112,911,#911,*911]
[ro.runmode]: [normal]
[ro.runtime.firstboot]: [1479779826214]
[ro.secure]: [1]
[ro.serialno]: [DU2NKM152D032358]
[ro.setupwizard.mode]: [OPTIONAL]
[ro.sf.lcd_density]: [480]
[ro.systemui.mobileinoutextra]: [true]
[ro.telephony.default_network]: [9]
[ro.wifi.channels]: []
[service.bootanim.exit]: [1]
[service.hdmi-daemon.exit]: [0]
[sys.boot_completed]: [1]
[sys.emergency.mountdata]: [0]
[sys.gps_provider_enabled]: [false]
[sys.hwsholder.count]: [0]
[sys.iswifihotspoton]: [false]
[sys.nsd.support]: [2]
[sys.refresh.dirty]: [1]
[sys.settings_system_version]: [123]
[sys.settings_systemex_version]: [4]
[sys.show_google_nlp]: [false]
[sys.super_power_save]: [false]
[sys.sysctl.extra_free_kbytes]: [24300]
[sys.usb.config]: [hisuite,mtp,mass_storage,adb]
[sys.usb.state]: [hisuite,mtp,mass_storage,adb]
[trustedcore_sfs_property]: [1]
[viatel.device.asci]: [uart.0.ttyAMA]
[viatel.device.at]: [spi.10.ttySPI]
[viatel.device.data]: [spi.0.ttySPI]
[viatel.device.fls]: [spi.2.ttySPI]
[viatel.device.gps]: [spi.5.ttySPI]
[viatel.device.pcv]: [spi.4.ttySPI]
[vold.post_fs_data_done]: [1]
[wifi.interface]: [wlan0]
[wlan.driver.status]: [ok]

可以看到上面空行隔开的那里就是我们要找的key-value了,这样我们知道Emotion UI属性的key(就是:ro.build.version.emui)了

3、调用第1步那个方法获取它就是了
getProperty(“ro.build.version.emui”,”“),这里荣耀6得到的结果是EmotionUI_3.0,荣耀4x上得到的结果:EmotionUI_4.0。
4、最后,知道rom类型了自然知道怎么判断是不是咯


题外话,其他rom按照上面的方法应该都可以,如果不行你有行的方法欢迎教我。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值