ADB

来源:互联网 发布:java内部类 编辑:程序博客网 时间:2024/06/06 17:16

how to send message by cmd

adb shell am broadcast -a "Intent-filter" 
adb shell am broadcast -a "Intent-filter" --es sms_body "message content"

e.g. adb shell am broadcast -a com.htc.android.test_service

how to start a service by cmd

adb shell am startservice -a com.nero.android.neroconnect.INIT_SERVICE

how to get current sdk version

adb shell getprop ro.build.version.release


export information to file

adb shell getprop ro.build.version.release >> 1.txt


get Serial Number

adb get-serialno


adb shell getprop can use for some other info in file:ro

ro.product.board]: [herring]
[ro.product.brand]: [google]
[ro.product.cpu.abi2]: [armeabi]
[ro.product.cpu.abi]: [armeabi-v7a]
[ro.product.device]: [crespo]
[ro.product.locale.language]: [en]
[ro.product.locale.region]: [US]
[ro.product.manufacturer]: [samsung]
[ro.product.model]: [Nexus S]
[ro.product.name]: [soju]


ultimate command

adb shell getprop>>1.txt
yes! we can find all of information from 1.txt


install apk

e.g. adb install /Users/VFang/Desktop/android_app/anzhuoshichang_85.apk
adb install /Users/VFang/Desktop/android_app/rewjglq_1417414653667.apk

adb install -r /Users/VFang/Desktop/AndroidHtcSync.apk //覆盖安装

get log from eclipse

adb logcat>>1.txt

push apk

e.g. adb push /Users/VFang/Desktop/AndroidHtcSync.apk /system/priv-app/AndroidHtcSync/AndroidHtcSync.apk

other

adb remount
adb reboot

0 0
原创粉丝点击