AACS icon indicating copy to clipboard operation
AACS copied to clipboard

anbox build issues

Open drderiv opened this issue 3 years ago • 3 comments

After a lengthy shipping delay allegedly due to the chip shortage, I just took delivery of an Odroid N2+ 2GB. In addition to having an issue getting a Wifi Module 5A working with the Ubuntu image shown in step 1 of the installation document (still unresolved, so using Ethernet for now), step 19 essentially causes a hang during the make when the job limit is 4. Load factors are in the high teens, well over 90% of CPU time is going to kswapd0, and the image runs out of space (df -h shows 100% full during make). Doubling the image size shown in step 7 isn't enough to fix the issue. I added 2GB of swap and lowered the job limit to 2 and was able to move on to the next step. Note however that anbox tests don't compile so I had to ignore them (got the exact same set of errors detailed here). I'm not sure if that's just an issue with testing that makes no difference, or if it's a sign that something's wrong so that anbox itself won't function as it it needs to.

I'm not sure what changed since the installation document was last updated, and I'd be happy to submit a PR with the changes I made to image size, but I wanted to first confirm that, given the symptoms, I didn't make some obvious error in following the instructions.

Also, if anyone has any helpful advice on getting a working driver for the 5A while utilizing the 20200715 Ubuntu image, I'd appreciate it.

drderiv avatar Apr 13 '21 00:04 drderiv

As for number of parallel jobs - for development I often need to use just one job (-j 1), but that is also due to clangd consuming quite a lot of memory. As for disk space - point 7 (talking about image resize) is somewhat inconclusive as to what should be the intermediate image size :-) as I wasn't executing the steps enough time to find it out - feel free to suggest what the size should be.

Note that at the same time it would be great to have yocto image for AACS and work has already started (https://github.com/adrianalin/meta-aacs/). My plan is to put some more effort there once I'm done with my private matters.

Unfortunately no ideas for Wifi from me :-(

tomasz-grobelny avatar Apr 14 '21 12:04 tomasz-grobelny

Thank you for the reply. I've spent the last few days noting build errors and have kept a log of what I believe are necessary changes to the install instructions in order to make a current build without errors. I will submit a PR for the installation document with such changes.

Additionally, I have successfully built a driver for the Wifi Module 5A. However, there appears to be code in AAClient that knocks off any USB device that doesn't match the vednor/product ids for Android, so my WiFi dongle starts up fine but quickly stops working once AAClient is invoked. I haven't plowed through the code to figure out how to exempt the 5A from being stopped and was wondering if you could suggest where to make such a change. I will then test and make a PR if successful. I would think others would be interested in this as well, as it allows for easier maintenance of a device that's installed in a vehicle. Thanks in advance.

drderiv avatar Apr 18 '21 20:04 drderiv

AAClient goes through all devices and calls Device::switchToAOA() - this would be my starting point for investigation. First try excluding the switchToAOA call for you WiFi module and if that works try checking what happens exactly in this method and how does it differ between WiFi module and android device. Maybe one needs to actually check what command 51 returns (version variable)?

tomasz-grobelny avatar Apr 18 '21 21:04 tomasz-grobelny