more detail about adb shell start, stop and reboot
2011-05-07 11:37
337 查看
Introduction
adb is the sdk tool to manage the state of emulator or powerd device.
start & stop are tools under /system/bin (system.img) . It can be called by "adb shell <command>"
reboot is one parameter supported by adb which can be used directly by "adb reboot"
the officially description for start, stop, reboot is
start : Starts (restarts) an emulator/device instance.
stop : Stops execution of an emulator/device instance.
reboot : reboots the devices
What's the difference between them ?
Let's start from checking the process list of device:
from the ps list , we can draw out the boot proces of android device into 2 period:2. zygotegote)
1. start linux kernal
, pid from 1 to 72.
2. start android framework
, pid after 72 which parent is pid31. (pid31, the zygote process. :)
now let,s try to see what happen by calling adb shell stop:
All Processes that created by the 2nd process (start android framework
) has gone.
Now Let's see what happen is we call adb shell start:
Several processes are created after calling to adb shell start including:
1. a new zygote process , pid=385
2. android frameword processes created by zygote , pid later than 389 with parent=385
now we can conclude the function of start/stop, both they deal with the processes running on android dalvik
start:
invoke the pid1 process to create a zygote process ;
invoke zygote process to launch all other android framework processe
Stop:
kill all processes created by zygote process
kill zygote process
.
Start&Stop do not kill processes relatated with linux kernal. But adb reboot will cause the linux restart
adb reboot:
reboot linux
Why need adb shell start/stop?
I think at lease one senario is the best case to use them: that is during framework development. You have to use adb shell stop to kill currently running framework processes so that you can install your new framework apk and then use adb shell start to launch your frash framework apks. for example:
adb remount
adb shell stop
adb sync
adb shell top
adb is the sdk tool to manage the state of emulator or powerd device.
start & stop are tools under /system/bin (system.img) . It can be called by "adb shell <command>"
reboot is one parameter supported by adb which can be used directly by "adb reboot"
the officially description for start, stop, reboot is
start : Starts (restarts) an emulator/device instance.
stop : Stops execution of an emulator/device instance.
reboot : reboots the devices
What's the difference between them ?
Let's start from checking the process list of device:
from the ps list , we can draw out the boot proces of android device into 2 period:2. zygotegote)
1. start linux kernal
, pid from 1 to 72.
2. start android framework
, pid after 72 which parent is pid31. (pid31, the zygote process. :)
now let,s try to see what happen by calling adb shell stop:
All Processes that created by the 2nd process (start android framework
) has gone.
Now Let's see what happen is we call adb shell start:
Several processes are created after calling to adb shell start including:
1. a new zygote process , pid=385
2. android frameword processes created by zygote , pid later than 389 with parent=385
now we can conclude the function of start/stop, both they deal with the processes running on android dalvik
start:
invoke the pid1 process to create a zygote process ;
invoke zygote process to launch all other android framework processe
Stop:
kill all processes created by zygote process
kill zygote process
.
Start&Stop do not kill processes relatated with linux kernal. But adb reboot will cause the linux restart
adb reboot:
reboot linux
Why need adb shell start/stop?
I think at lease one senario is the best case to use them: that is during framework development. You have to use adb shell stop to kill currently running framework processes so that you can install your new framework apk and then use adb shell start to launch your frash framework apks. for example:
adb remount
adb shell stop
adb sync
adb shell top
相关文章推荐
- 输入adb shell 时 提示error: more than one device and emulator
- 输入adb shell 时 提示error: more than one device and emulator
- 输入adb shell 时 提示error: more than one device and emulator
- 输入adb shell 时 提示error: more than one device and emulator
- 输入adb shell 时 提示error: more than one device and emulator
- 输入adb shell 时 提示error: more than one device and emulator
- 输入adb shell 时 提示error: more than one device and emulator
- Start and Stop Oracle Weblogic NodeManager Via Shell Alias
- 输入adb shell 时 提示error: more than one device and emulator
- adb shell error: more than one device and emulator
- 输入adb shell 时 提示error: more than one device and emulator
- 输入adb shell 时 提示error: more than one device and emulator
- 输入adb shell 时 提示error: more than one device and emulator
- 输入adb shell 时 提示error: more than one device and emulator
- 输入adb shell 时,提示error: more than one device and emulator
- 输入adb shell 时 提示error: more than one device and emulator
- 输入adb shell 时 提示error: more than one device and emulator
- ADB not responding. You can wait more,or kill"abd.exe" process manually and click 'Restart'
- 03. Understanding More about Events and PostBack
- More Detail On Workspaces And SmartParts (Introduction To The CAB/SCSF Part 16)