本文介绍了如何创建Android Things的捆绑包并将其通过OTA推送?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人成功创建了Android Things Bundle,并通过OTA推送了它吗?

Anyone succeeded creating Android Things Bundle and pushing it over OTA?

在Android Things控制台上,有一个页面可以创建捆绑包 OTA.

On the Android Things' Console, there's a page to Create a Bundle for the OTA.

我正试图弄清楚该怎么做.我只将一个APK文件main.apk添加到了ZIP文件中.然后,我尝试将其推到附近的RPi.但是main.apk不会在设备上启动.

I'm trying to figure out how to do that. I've adding just a single APK file main.apk to a ZIP file. Then I've tried to push it to a RPi which is sitting nearby. But the main.apk would not be launched on the device.

我尝试过/完成的事情:

Things I've tried/done:

  • 使用Things Build ID = NIH40K
  • 下载Empty bundle
  • 创建捆绑并将其通过OTA UPDATES推送到设备
  • 使用该新创建的捆绑包创建新的FACTORY IMAGE
  • 仍然无法启动我的应用
  • 我已经检查过,我的应用程序的MainActivity具有 action = MAIN和category = IOT_CATEGORY
  • 尝试通过adb connect Andorid.local从我的笔记本电脑运行应用程序,并且按设计运行
  • Download Empty bundle with Things Build ID=NIH40K
  • Creating a Bundle and pushing it to devices through OTA UPDATES
  • Creating a new FACTORY IMAGE with that newly created bundle
  • Still my app would not be started
  • I've checked, my app's MainActivity has action=MAIN and category=IOT_CATEGORY
  • Tried running app from my laptop via adb connect Andorid.local and it works as designed

但是我无法进行OTA更新.有人成功吗?

But I couldn't make an OTA update. Anyone succeeded doing so?

这是我在Github上的项目: https://github.com/ViliusKraujutis/Android-Things-Demo

Here's my project on Github:https://github.com/ViliusKraujutis/Android-Things-Demo

谢谢

推荐答案

在您的android Things控制台中创建新产品后,以下是使OTA更新成为可能的所有步骤:

Here are all the steps necessary to make OTA update possible after creating a new product in your android things console :

1-从控制台中的空捆绑包或从您添加的个人捆绑包创建您的第一个构建配置.

1 - Create your first build configuration, either from the empty bundle in the console or from a personnal bundle you added.

2-下载此构建配置的构建.您将获得一个Android Things图像.像刷新Android Things常规映像一样,将其刷新到RPi. https://developer.android.com/things/hardware/raspberrypi.html#flashing_the_image

2 - Download build of this build configuration. You will get an Android Things image. Flash it to your RPi as you did when you flashed the Android Things regular image. https://developer.android.com/things/hardware/raspberrypi.html#flashing_the_image

从现在开始,您的RPi将检查是否已从控制台推送了其他版本的产品.该检查每5或6个小时进行一次,因此您可能需要耐心等待.另外,您的RPi还需要访问互联网.

From now on, your RPi will check if a different version of your product has been pushed from the console. The check happens every 5 or 6 hours so you might have to be patient. Also your RPi needs to have internet access.

3-将另一个捆绑包上传到您的控制台,为其创建构建配置,然后通过控制台的OTA更新面板将其推送到您的设备.

3 - Upload another bundle to your console, create a build configuration for it and then push it to your devices via the OTA updates panel of your console.

4-您需要手动重新启动RPi才能应用更新.

4 - You will need to manually reboot the RPi to apply the update.

我认为Dave McKelvie的这篇文章就是一个很好的例子: http://android.geek.nz/hello-android-things-developer-console/

This article from Dave McKelvie is a good example in my opinion : http://android.geek.nz/hello-android-things-developer-console/

这篇关于如何创建Android Things的捆绑包并将其通过OTA推送?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-12 17:56