adb shell getprop 获取系统属性
adb shell getprop
以华为p30为例:
[gsm.default.apn]:
[gsm.defaultpdpcontext.active]: true
[gsm.dualcards.switch]: false
[gsm.huawei.RemindDataService]: false
[gsm.huawei.RemindDataService_1]: false
[gsm.hw.cust.ecclist0]: 000,08,118,110,119,120,122,999
[gsm.hw.matchnum]: 11
[gsm.hw.matchnum.short]: 11
[gsm.hw.matchnum.short0]: 11
[gsm.hw.matchnum.short1]: 11
[gsm.hw.matchnum.vmn_shortcode]: 0
[gsm.hw.matchnum0]: 11
[gsm.hw.matchnum1]: 11
[gsm.hw.operator.iso-country]: cn
[gsm.hw.operator.isroaming]: false
[gsm.hw.operator.numeric]: 46000
[gsm.hw.operator.numeric.old]: 46000
[gsm.modem.version.baseband]: 21C20B392S000C000,21C20B392S000C000
[gsm.national_roaming.apn]: 46003
[gsm.network.type]: LTE,LTE
[gsm.nitz.time]: 1656677057007
[gsm.nitz.timereference]: 676363254
[gsm.nvcfg.resetrild]: 0
[gsm.nvcfg.rildrestarting]: 0
[gsm.operator.alpha]: 中国移动,中国电信
[gsm.operator.alpha0]: 中国移动
[gsm.operator.alpha1]: 中国电信
[gsm.operator.idpstring]: 00
[gsm.operator.iso-country]: cn,cn
[gsm.operator.isroaming]: false,false
[gsm.operator.numeric]: 46000,46011
[gsm.rssi.sim1]: -94
[gsm.rssi.sim2]: -86
[gsm.sigcust.configured]: true
[gsm.sim.c_card.plmn]: 46003,1
[gsm.sim.hw_atr]: 3B9F95801FC78031E073FE211B5737866083A0800091
[gsm.sim.hw_atr1]: 3B9F94801FC78031E073FE211357378660A60080120F
[gsm.sim.num.pin]: 3
[gsm.sim.num.pin2]: 3
[gsm.sim.num.puk]: 10
[gsm.sim.num.puk2]: 10
[gsm.sim.num.simlock]: -1,-1,-1,-1
[gsm.sim.operator.alpha]: CMCC,中国电信
[gsm.sim.operator.iso-country]: cn,cn
[gsm.sim.operator.numeric]: 46002,46003
[gsm.sim.state]: LOADED,LOADED
[gsm.sim.updatenitz]: -1
[gsm.sim1.c_card.plmn]: 46003
[gsm.sim1.num.simlock]: -1,-1,-1,-1
[gsm.sim1.type]: 20
[gsm.sim2.type]: 43
[gsm.singlepdp.hplmn.matched0]: false
[gsm.singlepdp.hplmn.matched1]: false
[gsm.slot1.num.pin1]: 3
[gsm.slot1.num.pin2]: 3
[gsm.slot1.num.puk1]: 10
[gsm.slot1.num.puk2]: 10
[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.max.message.size]: 0
[gsm.sms.to.mms.textthreshold]: 0
[gsm.version.baseband]: 21C20B379S000C000,21C20B379S000C000
[gsm.version.ril-impl]: [CommRil 5.0]
[persist.mygote.build.id]: [ELE-AL00 2.0.0.230(C00E230R2P4)]
[persist.radio.nsa_display_config]:
[persist.radio.nvcfg_file]: CMCC_CN.bin
[persist.radio.optimized_for_config_d]: 64,720
[persist.radio.previousopcode0]: 46002
[persist.radio.previousopcode1]: 46011
[persist.radio.procsetdata]: com.huawei.systemserver
[persist.radio.rat_changed_delay_timer]: 10,10
[persist.radio.request_shutdown]: true
[persist.radio.smart.card]: true
[persist.radio.usersetdata]: true
[persist.service.hdb.enable]: true
[persist.service.tm2.tofile]: false
[persist.sys.addview.config]: 1
[persist.sys.adoptable]: force_on
[persist.sys.appstart.enable]: true
[persist.sys.appstart.sync]: false
[persist.sys.aps.defaultWidth]: 1080
[persist.sys.aps.firstboot]: 0
[persist.sys.audio_mode]: 0
[persist.sys.aware.compile.prop.num]: 1
[persist.sys.aware.compile.prop.time]: 1654141941
[persist.sys.boost.byeachfling]: true
[persist.sys.boost.durationms]: 1000
[persist.sys.boost.skipframe]: 3
[persist.sys.boot.reason]:
[persist.sys.boot.reason.history]: recovery,1656000698
reboot,hwarmi_reboot,1654179413
recovery,1652033808
reboot,,1649009848]
[persist.sys.hiview.base_version]: [ELE-LGRP1-CHN 2.0.0.230]
[persist.sys.hiview.cota_version]:
[persist.sys.hiview.cust_version]: [ELE-AL00-CUST 2.0.0.230(C00)]
[persist.sys.hiview.ecota_version]:
[persist.sys.hiview.module_version]: SYS.MOD2.0.0.17(G0H17)
[persist.sys.hiview.onekeycaptur]: 0
[persist.sys.hiview.preload_version]: [ELE-AL00-PRELOAD 2.0.0.4(C00R2)]
[persist.sys.hwpms_error_log]:
[persist.sys.hwpms_error_reboot_count]: 0
[persist.sys.hyperhold.rom.open]: 1
[persist.sys.iaware.appboost.click_duration]: 1000
[persist.sys.iaware.appboost.click_times]: 3
[persist.sys.iaware.appboost.slide_duration]: 5000
[persist.sys.iaware.appboost.slide_times]: 16
[persist.sys.iaware.appboost.switch]: true
[persist.sys.iaware.appscenerecog.switch]: true
[persist.sys.iaware.appsdk]: true
[persist.sys.iaware.blitparallel]: true
[persist.sys.iaware.cpuenable]: true
[persist.sys.iaware.input_in_advance]: 1000000
[persist.sys.iaware.intelliclean]: true
[persist.sys.iaware.jpg_sample_adapt]: 1
[persist.sys.iaware.preloadoptenable]: 1
[persist.sys.iaware.previoushigh]: -1
[persist.sys.iaware.profile]: true
[persist.sys.iaware.size.BitmapDeocodeCache]: 2048
[persist.sys.iaware.switch.BitmapDeocodeCache]: true
[persist.sys.iaware.topa.train]: 10
[persist.sys.iaware.topimcn]: com.tencent.mm
[persist.sys.iaware.touchdownpreloadenable]: 0
[persist.sys.iaware.use_pi_mutex]: false
[persist.sys.iaware.vsyncfirst]: true
[persist.sys.iaware_config_cust]: iaware_cust_ELE-AL00_CN_9_9.1.0.226C00.xml
[persist.sys.iaware_config_ver]: iaware_config_ELE-AL00_CN_9_9.1.0.226C00.xml
[persist.sys.iaware_google_conn]: [1639417205, 0]
[persist.sys.shut_alarm]: [1 1656939660000]
[ro.bootimage.build.date]: [Mon Mar 14 17:08:29 CST 2022]
[ro.build.date]: [Mon Mar 14 15:36:23 CST 2022]
[ro.build.description]: [ELE-AL00-user 102.0.0 HUAWEIELE-AL00 230-CHN-LGRP1 release-keys]
[ro.build.display.id]: [ELE-AL00 10.1.0.162(C00E160R2P11)]
[ro.build.hide.settings]: [8;1.8 GHz;2.0GB;11.00 GB;16.00 GB;1920 x 1080;10;4.14.116;11.0.0]
[ro.build.ver.physical]: [ELE-AL00 102.0.0.230(C00E230R2P4)]
[ro.build.version.base_os]:
[ro.build.version.codename]: REL
[ro.build.version.emui]: EmotionUI_12.0.0
[ro.build.version.incremental]: 10.1.0.162C00
[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-07-01
[ro.camera.sound.not_forced]: true
[ro.camera.video_fps_default]: 30
[ro.camera.warm_start_fadeout_enable]: false
[ro.carrier]: unknown
[ro.cdma.home.operator.numeric]: 46003
[ro.channel.cn.wps.moffice_eng]: oem00172
[ro.channel.com.sina.weibo]: 20004_90028
[ro.channel.koubei_client]: huawei_preinstall
[ro.channel.red]: HuaweiPreloadV2
[ro.channel.tianyancha]: HUAWEI-MATE40-TYC-PRELOAD
[ro.channelId.com.ctrip.appmarket]: 9156
[ro.channelId.com.meituan]: /preload/ELE-AL00/all/cn/xml/mtconfig.ini
[ro.channelId.com.wuba]: 1169
[ro.channelId.taobao]: /preload/ELE-AL00/all/cn/xml/sjtbconfig.ini
[ro.channelId.vipshop]: preload/ELE-AL00/all/cn/xml
[ro.channelid.ucbrowser]: /preload/ELE-AL00/all/cn/xml/uconfig.ini
[ro.check.modem_network]: true
[ro.com.baidu.searchbox]: /preload/ELE-AL00/all/cn/lib64/
[ro.com.google.clientidbase]: android-huawei
[ro.com.google.gmsversion]: 10_202005
[ro.com.sina.news]: /preload/ELE-AL00/all/cn/xml/newsConfig.properties
[ro.com.ss.android.ugc.aweme]: /preload/ELE-AL00/all/cn/xml/huawei_aweme_400_pre_install.config
[ro.com.ximalaya.ting.android.yz-huawei]: yz-huawei
[ro.comp.cust_version]: [Cust-CHN 102.0.0.1(0002)]
[ro.comp.hl.product_base_version]: [ELE-LGRP1-CHN 2.0.0.230]
[ro.comp.hl.product_base_version.real]: [ELE-LGRP1-CHN 102.0.0.230]
[ro.comp.hl.product_cust_version]: [ELE-AL00-CUST 2.0.0.230(C00)]
[ro.comp.hl.product_cust_version.real]: [ELE-AL00-CUST 102.0.0.230(C00)]
[ro.comp.hl.product_preload_version]: [ELE-AL00-PRELOAD 2.0.0.4(C00R2)]
[ro.comp.hl.product_preload_version.real]: [ELE-AL00-PRELOAD 102.0.0.4(C00R2)]
[ro.comp.preas_version]: [Preas-CHN 10.1.0(0000)]
[ro.comp.preas_version.full]: [Preas-CHN 10.1.0(Q)]
[ro.comp.preavs_version]: [Preavs 10.1.0(0000)]
[ro.comp.prets_version]: [Prets 102.0.0(0000)]
[ro.comp.prets_version.full]: [Prets 102.0.0(X)]
[ro.comp.pretvs_version]: [Pretvs 102.0.0(0000)]
[ro.comp.pretvs_version.full]: [Pretvs 102.0.0(X)]
[ro.comp.product_version]: [Product-ELE 102.0.0(0000)]
[ro.comp.sys_support_vndk]:
[ro.comp.system_version]: [System 102.0.0.51(3CWP)]
[ro.comp.version_version]: [Version-ELE-AL00-000001 102.0.0(000F)]
[ro.confg.hw_systemversion]: [System 102.0.0.51(3CWP)]
[ro.config.marketing_name]: [HUAWEI P30]
[ro.gpu_turbo]: [GPU Turbo]
[ro.huawei.build.date]: [Mon Mar 14 15:36:23 CST 2022]
[ro.huawei.build.display.id]: [ELE-AL00 2.0.0.230(C00E230R2P4)]
[ro.hwui.use_vulkan]:
[ro.iconnect.trustpair]: true
[ro.iorapd.enable]: false
[ro.launcher.icon_size_narrow]: 165
[ro.logd.kernel]: false
[ro.logd.size.stats]: 64K
[ro.logsystem.usertype]: 1
[ro.magic.api.version]: 0.1
[ro.maple.enable]: 1
[ro.maple.ss.only]: 1
[ro.oba.version]: 20220314173404_OBA_VERSION
[ro.odm.build.date.utc]: 1594181882
[ro.odm.build.fingerprint]: Huawei/Atlanta/Atlanta_ELE-AL00:10/QP1A.190711.020/20200708121818:user/release-keys
[ro.odm.ca_product_version]: ELE-AL00
[ro.odm.radio.nvcfg_normalization]: true
[ro.oem.key1]: C00R2
[ro.oem_unlock_supported]: 1
[ro.opa.eligible_device]: true
[ro.opengles.version]: 196610
[ro.patch.baseline.version]: 2.0
[ro.patchversion]: patch03
[ro.postinstall.fstab.prefix]: /system
[ro.powersavemode.backlight_ratio]: 80
[ro.product.CustCVersion]: C00
[ro.product.board]: ELE
[ro.product.brand]: HUAWEI
[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.device]: HWELE
[ro.product.fingerprintName]: HUAWEI-Z123
[ro.product.first_api_level]: 28
[ro.product.hardwareversion]: HL2ELLEM
[ro.product.locale]: zh-Hans-CN
[ro.product.locale.language]: zh
[ro.product.locale.region]: CN
[ro.product.manufacturer]: HUAWEI
[ro.product.member.level]: 10011
[ro.product.model]: ELE-AL00
[ro.product.name]: ELE-AL00
[ro.product.odm.brand]: Huawei
[ro.product.odm.device]: Atlanta
[ro.product.odm.name]: Atlanta
[ro.product.system.brand]: Huawei
[ro.product.system.device]: generic_a15
[ro.product.system.manufacturer]: unknown
[ro.product.system.model]: generic_a15
[ro.product.system.name]: generic_a15
[ro.product.type]:
[ro.product.vendor.brand]: kirin980
[ro.product.vendor.device]: kirin980
[ro.product.vendor.manufacturer]: HUAWEI
[ro.product.vendor.model]: kirin980
[ro.product.vendor.name]: kirin980
[ro.product.wallet.nfc]: 01|01|HUAWEI|01|02|01
[ro.prop.hwkeychain_switch]: true
[ro.property_service.version]: 2
[ro.quick_broadcast_cardstatus]: false
[ro.radio.vsim_modem_count]: 4
[ro.radio.vsim_support]: true
[ro.readfastboot]: 0
[ro.revision]: 0
[ro.ril.ecclist]: 112,911,#911,*911
[ro.runmode]: normal
[ro.secure]: 1
[ro.serialno]: 8KE5T19911022895
[ro.settings.use_dts_hwversion]: true
[ro.setupwizard.mode]: DISABLED
[ro.setupwizard.rotation_locked]: true
[ro.sf.enable_backpressure_opt]: 0
[ro.sf.lcd_density]: 480
[ro.sys.pg_nfb_kill]: true
[ro.sys.ping_bf_dorecovery]: true
[ro.sys.powerup_reason]: NORMAL
[ro.syssvccallrecord.enable]: true
[ro.system.build.date]: [Mon Mar 14 15:36:23 CST 2022]
[ro.vendor.build.date]: [Mon Mar 14 17:08:29 CST 2022]
[ro.wifi.channels]:
[ro.zygote]: zygote64_32
[security.perf_harden]: 1
[selinux.restorecon_recursive]: /data/misc_ce/0
[service.bootanim.exit]: 1
[service.bootanim.stop]: 1
[service.pgnss.download_time]: 892945314
[service.sf.present_timestamp]: 1
[setupwizard.theme]: glif_v3_light
[sys.accelerator.smartcare.sample.open]: true
[sys.agp.init]: 1
[sys.aps.defaultmaxfps]: 60
[sys.aps.maxFlingVelocity]: 75
[sys.aps.power_mode]: 2
[sys.aps.powermodefps]: 55
[sys.aps.sdr.always_switchable]: 1
[sys.aps.support]: 101286913
[sys.aps.version]: 11.0.0.4
[sys.bms.profilemgr.initcount]: 1
[sys.bms_limit_mode]: normal
[sys.boot.reason]: recovery
[sys.boot.reason.last]: recovery
[sys.boot_completed]: 1
[sys.check.usbupdate]: start
[sys.com.huawei.profile.boot_completed]: 1
[sys.defaultapn.enabled]: true
[sys.distributedfile_feature.enable]: true
[sys.dubai.sece.enabled]: true
[sys.email.smartcare.sample.open]: false
[sys.fingerprint.deviceId]: 0
[sys.game.smartcare.sample.open]: true
[sys.huawei.thermal.enable]: true
[sys.hw_boot_success]: 1
[sys.hw_multiwin_for_camera]: -1
[sys.hw_sc.pg.user_mode]: unsleep
[sys.hw_sc.pg.user_mode_not_care_charge]: wake_up;-1;0
[sys.hwiaware.started]: true
[sys.iaware.cpuset.screenoff.bg]: 0-3
[sys.iaware.cpuset.screenoff.boost]: 0-7
[sys.iaware.cpuset.screenoff.fg]: 0-7
[sys.iaware.cpuset.screenoff.kbg]: 0-3
[sys.iaware.cpuset.screenoff.sysbg]: 0-3
[sys.iaware.cpuset.screenoff.taboost]:
[sys.iaware.cpuset.screenoff.topapp]: 0-7
[sys.iaware.cpuset.screenon.bg]: 2-3
[sys.iaware.cpuset.screenon.boost]: 4-7
[sys.iaware.cpuset.screenon.fg]: 0-7
[sys.iaware.cpuset.screenon.kbg]: 2-3,5
[sys.iaware.cpuset.screenon.sysbg]: 0-3
[sys.iaware.cpuset.screenon.taboost]: 4-7
[sys.iaware.cpuset.screenon.topapp]: 0-7
[sys.iaware.eas.on]: true
[sys.iaware.empty_app_percent]: 50
[sys.iaware.filteredType]: 28
[sys.iaware.switch_set_success]: true
[sys.iaware.type]: 28
[sys.isolated_storage_snapshot]: true
[sys.iswifihotspoton]: false
[sys.logbootcomplete]: 1
[sys.nvcfg_errorno0]:
[sys.nvcfg_errorno1]:
[sys.pg.nat_status]: 300000
[sys.pg.pre_rescue_boot_count]: 1
[sys.rescue_boot_count]: 1
[sys.resettype]: normal:COLDBOOT
[sys.retaildemo.enabled]: 0
[sys.runtime_data.hiddenapi.enable]: true
[sys.samgr.coresa.initready]: 1
[sys.sched.rtg.current]: pid=25271;appType=28
[sys.settingsprovider_ready]: 1
[sys.show_google_nlp]: false
[sys.super_power_save]: false
[sys.sysctl.extra_free_kbytes]: 61440
[sys.sysctl.tcp_def_init_rwnd]: 60
[sys.system_server.start_count]: 1
[sys.system_server.start_elapsed]: 7651
[sys.system_server.start_uptime]: 7651
[sys.thermal.vr_fps]: 0
[sys.thermal.vr_ratio_height]: 0
[sys.thermal.vr_ratio_width]: 0
[sys.thermal.vr_warning_level]: 0
[sys.trigger_bms_heating]: 0
[sys.update.state]: true
[sys.usb.config]: hisuite,mtp,mass_storage,adb,hdb
[sys.usb.configfs]: 1
[sys.usb.controller]: ff100000.dwc3
[sys.usb.ffs.ready]: 1
[sys.usb.ffs_hdb.ready]: 1
[sys.usb.mtp.device_type]: 3
[sys.usb.set_default]: true
[sys.usb.state]: hisuite,mtp,mass_storage,adb,hdb
[sys.use_memfd]: false
[sys.user.0.ce_available]: true
[sys.video.smartcare.sample.open]: false
[sys.wechat.smartcare.sample.open]: false
[sys.wifitracing.started]: 1
[system_init.hwextdeviceservice]: 1
[vold.crypto_unencrypt_updatedir]: /data/update
[vold.cryptsd.keystate]: lock
[vold.has_adoptable]: 0
[vold.has_quota]: 0
[vold.has_reserved]: 1
[vold.post_fs_data_done]: 1
[wifi.direct.interface]: p2p0
[wifi.interface]: wlan0
可以通过反射的形式获取对应的值:
private static String getProperty(String key) {
try {
Class<?> c = Class.forName("android.os.SystemProperties");
Method method = c.getMethod("get", String.class, String.class);
return (String) method.invoke(c, key, "");
} catch (Throwable e) {
Log.i("getProperty:", e.getMessage());
}
return "";
}