[Android command post]getprop SetProp

Source: Internet
Author: User
Tags get ip

http://blog.csdn.net/lincyang/article/details/44198189

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Directory (?) [-]

    1. A Getprop
    2. Two Dumpsys

After the Android device is connected to the PC, we can do most of the work with the ADB command. Here are some information about the system with Getprop, Dumpsys.

First, Getprop

The simple principle of this command is to read information from various configuration files in the system. Then these files are easy to find after you enter the device inside the ADB shell:

init.rc default . Prop/system/build.prop

This information can also be displayed by using the Cat command directly.
More commonly used information is listed below
1. Get IP

$ adb shell Getprop dhcp.wlan0.ipaddress 192.168. 0.107

2. Phone Name

$ adb shell getprop ro.product.deviceulike2$ adb shell getprop ro.product.modelu705t$ adb shell Getprop Ro.product.nameopp o17_12035

3.serial number

D:\ADB>ADB Shell Getprop Ro.serialno
9410519008004c22098b

4. Screen density

$ adb shell Getprop ro.sf.lcd_density240

  

Well, just use the ADB shell Getprop to print out all the information. You can use the SetProp command to make the corresponding settings.

Second, Dumpsys

When the Android system starts up with a large number of services, we can use the Dumpsys command to see how each service is running. As an Android developer, we should at least understand the presence of these service:

Currently running services:dmagent nvramagent Surfaceflinger accessibility account activity alarm Appwidget Audi o audioprofile Backup battery batteryinfo bluetooth BLUETOOTH_A2DP bluetooth_profile_manager bluetooth_socket CLI Pboard connectivity Content Country_detector cpuinfo device_policy devicestoragemonitor diskstats DRM. Drmmanager Dropbox entropy Gfxinfo hardware Input_method iphonesubinfo isms location Media. Audio_flinger Media. Audio_policy media.mdp_service media.player Meminfo memory. dumper Mount Mtk-ag PS mtk-epo-client netpolicy netstats network_management notification oppo. com. Irutils Package Permission Phone Power Samplingprofiler search Sensorservice simphonebook statusbar telephony. Registry telephony. Registry2 textservices Throttle uimode usagestats usb Vibrator Wallpaper WiFi wifip2p window

When you know the resolution of your device, you can use the following command:

$ adb Shell dumpsys window Displayswindow MANAGER DISPLAY CONTENTS (dumpsys window displays) display:mdisplayid=0init=720x 320dpi cur=720x1280 app=720x1280 rng=720x670-1280x1230layoutneeded=falseor$ adb shell dumpsys window ... display:init=540x960 base=540x960 cur=540x960 app=540x888 raw=540x960

  

Refer to:
http://blog.csdn.net/wangjia55/article/details/7446772
http://blog.csdn.net/kevinx_xu/article/details/11846289
http://blog.csdn.net/z_guijin/article/details/8203028

[Android command post]getprop SetProp

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.