亚洲开发银行接收广播BOOT_COMPLETE亚洲、开发银行、BOOT_COMPLETE

由网友(伤,原来是这样)分享简介:我要等到Android手机已经开始并且MediaScanner完成I want to wait until the android mobile phone has started and the MediaScanner is done.后来我想用亚洲开发银行执行的操作。Afterwards I want...

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

I want to wait until the android mobile phone has started and 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'
阅读全文

相关推荐

最新文章