I have done next changes during image build to proceed on less capable (4 cores x HT2, 8GiB RAM) machine:
- limited top level make to not use parallel builds
anbox-image-builder/data/anbox-build.sh
+make -j1
-make -j9
- extended memory used by JACK server, I have tried to do that some more clean way but it has not propagated to the server start commands, so I have taken big hammer solution
anbox-image-builder/anbox-work/prebuilts/sdk/tools/jack-admin
anbox-image-builder/anbox-work/out/host/linux-x86/bin/jack-admin
+JACK_SERVER_COMMAND="java -XX:MaxJavaStackTraceDepth=-1 -Xmx4g -Djava.io.tmpdir=$TMPDIR $JACK_SERVER_VM_ARGUMENTS -cp $LAUNCHER_JAR $LAUNCHER_NAME"
-JACK_SERVER_COMMAND="java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=$TMPDIR $JACK_SERVER_VM_ARGUMENTS -cp $LAUNCHER_JAR $LAUNCHER_NAME"
Even in this setup build failed multiple times but when restarted then continued. It took something like 6 hours or more and 61GiB of storage on my remote computer at university. It seems to became really weak from Google’s perspective even that it drivers our open-design CAN bus projects https://canbus.pages.fel.cvut.cz/ and their continuous builds for our MZ_APO Xilinx Zynq based boards which run with automatically build bitstream and drivers testing to HW level each night when design, driver and or Vivado integration changes in repo.
anbox-container-manager
is not enabled after Anbox install on Librem 5 directly. In the fact, I prefer it leave that way and I have started it for experiment manually
sudo -i systemctl start anbox-container-manager
Then Andbox runs and launcher with calc, Fdroid and others is show. Some simple applications run some not. The main problem seems to be that when the Android application is closed from posh the focus, activation is not transferred to another selected Android application. So it seems like screen of closed/deactivated application is only hidden but Android or some other problem that Android runtime does not detect its close and request to transfer the focus.
I am not sure how it is with licenses to share the android.img
without the full source archives. I can send it though some file-sender service if somebody really wants it. But I think that for consumers only it has not big value yet and may it be something is broken more than usual because of multiple interruptions of the build.
So the result, Anbox runs on Librem 5, it seems that long term goal to run Android applications on GNU/Linux phones is doable but it requires lot of manpower/funding to be generally usable. Even more to move from Android version 7 up… There is hope that people from more communities join forces on mainline Anbox. I would be really happy if community moves more to Posh and may id be Anbox direction than to stuck on Google and chip-makers crippled kernels, libhybris and “open” Android builds…
I am leaving for friends cottage without Internet today so do not expect reply till Sunday and generally this experiment has low priority in my actual work…
Best wishes, strong heath and enjoy your lives in 2022,
Pavel