亚洲开发银行接收广播BOOT

亚洲开发银行接收广播BOOT

本文介绍了亚洲开发银行接收广播BOOT_COMPLETE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要等到Android手机已经开始并且MediaScanner完成

I want to wait until the android mobile phone has startedand the MediaScanner is done.

后来我想用亚洲开发银行执行的操作。

Afterwards I want to perform an action using adb.

ADB等待换设备将完成大部分手机的开机顺序之前完成。

adb wait-for-device will finish much before the boot sequence of the cell phone is done.

如何捕获如通过ADB BOOT_COMPLETE广播?喜欢的东西:等待换引导完成。我不知道这是否是可能的?

How to capture e.g. BOOT_COMPLETE Broadcast via ADB?Something like: wait-for-boot-complete.I don know whether this is possible?

推荐答案

您可以保留轮询 sys.boot_completed dev.bootcomplete 系统属性。

You can keep polling for sys.boot_completed or dev.bootcomplete system properties.

对于code,我不知道什么样的环境和/或脚本语言所使用。这是pretty的简单。首先,你需要找到该物业是由手机的软件设置为1上启动完成。比方说,这是 dev.bootcomplete 。那么下面的命令后,手机被启动了控制返回到您的脚本

As for the code, I do not know what environment and/or scripting language you are using. It's pretty straightforward. First you need to find which property is being set to "1" up on boot completion by your phone's software. Let's say it is dev.bootcomplete. Then the following command would return control back to your script after the phone is booted up

adb wait-for-device shell 'while [ "$(getprop dev.bootcomplete)" != "1" ] ; do sleep 1; done'

这篇关于亚洲开发银行接收广播BOOT_COMPLETE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 01:58