How do I create an Android Things bundle and route it to OTA?

Has anyone been able to create an Android Things Bundle and push it over the OTA?

The Android Things' Console has a Create Package for OTA page .

I am trying to figure out how to do this. I only add one APK main.apk

file per file ZIP

. Then I tried to nudge him towards the RPi that sits next to it. But main.apk won't run on the device.

Things I've tried / did:

  • Download Empty bundle

    with Things Build ID

    =NIH40K

  • Create a package and transfer it to devices via OTA UPDATES

  • Creating a new one FACTORY IMAGE

    with this newly created package
  • However, my application will not start
  • I checked, my MainActivity app has action = MAIN and category = IOT_CATEGORY
  • Tried running the app from my laptop via adb connect Andorid.local

    and it works as designed

But I was unable to do the OTA update. Has anyone succeeded in this?

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

thank

+2


source to share


2 answers


Below are all the steps required to update OTA after creating a new product in Android console.

1 - Create your first build config, either from an empty pool in the console or from an added package.

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

From now on, your RPi will check if another version of your product was clicked from the console. The check happens every 5 or 6 hours, so you may need to be patient. Also, your RPi must have Internet access.



3 - Download another package to the console, create a build config for it and then push it to your devices using the OTA update panel on the console.

4 - You will need to manually restart the RPi in order to apply the update.

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

+7


source


I am having a problem launching the main apk. It turns out that if your custom animation is misconfigured, the main apk will not be able to load and will never run. I solved the problem by installing an assembly with an empty package. Using adb to connect and get existing animation. Then I used this animation along with my main apk to create the package. I downloaded this image to my device and my main app loaded just fine.



+2


source







All Articles