-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[windows] Docker APK build #1338
Comments
Thanks Kennard, Is this build using the latest code? We do not currently use debian:latest https://github.com/exokitxr/exokit/blob/master/android.Dockerfile#L1 |
Hi - thanks for your help. Yes I downloaded the Windows EXE release and found docs/guides/exportOculusAPK.md in there. That's what I was following. Should I just download github.com/exokitxr/exokit/archive/master.zip directly instead? If I do that, where can I find the docs/guides folder? |
That documentation comes from old releases, which are out of date. That is why this documentation was removed in master. The way we currently build is to run this script: https://github.com/exokitxr/exokit/blob/master/scripts/oculusmobile/build-android.sh This is done on CI with the following Dockerfile environment: https://github.com/exokitxr/exokit/blob/master/android.Dockerfile Other references from older code are likely to not work, because there has been an incompatible Debian version released in the last short while. |
Okay trying that we get:
Is that normal? |
Yes that might indeed be working. The ci extracts the apk from the build here: https://github.com/exokitxr/exokit/blob/master/.travis.yml#L37 |
Hmmm. APK fails to install (using SideQuest on Quest): INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION: Failed to parse /data/app/vmdl244302174.tmp/base.apk: AndroidManifest.xml |
Thanks, are you able to extract the apk (it is a zip file) and post the AndroidManifest.xml from inside of it? |
Thanks for sticking with me. I appreciate all your help. I actually can't seem to unzip the APK. I assume because it didn't build correctly (possibly because of the error I mentioned above). Would you like me to upload the whole APK somewhere? Do you have a built one I can try? |
Sure, I can provide an APK if no frontend is needed and the intent is to access from ADB command line args. |
Could you upload the built APK on your end somewhere like https://transfer.sh? |
I have uploaded it here: https://drive.google.com/file/d/1jSHGDY9nNBoI-FbdGMtenOUmNtVRM0MW/view?usp=sharing |
Perfect, thank you! |
Yes I am happy to try running it from ADB command line args. How would I do that?
Or something? |
Here's the install script:
Additionally, all launches need to be via passing arguments to
|
@kennardconsulting I managed to successfully build with Docker and extract with our existing scripts. I see that the APK provided was corrupted. Can you provide the system setup you are using for Docker, and the full Docker log files? I'd like to understand why it's failing on that system. |
Here is a master build APK from today: https://transfer.sh/ErXjp/app-debug.apk Since this isn't a release, there are no guarantees or support. |
"Can you provide the system setup you are using for Docker, and the full Docker log files?" Sure. Here is the Docker setup:
|
I see, I suspect Windows does not support There are probably other ways to extract files out out of the Windows container, but we do all of our builds on Linux. |
Console log of (Windows) build: |
It is possible that gradle is crashing here during the build. https://github.com/exokitxr/exokit/blob/master/scripts/oculusmobile/build-android.sh#L70 |
That's entirely possible. I don't have experience with the vagaries of Windows Docker and what resource limits it imposes. I do know what gradle is resource intensive and prone to errors on unexpected file properties. If we end up supporting the build process, it probably won't include Docker on Windows. |
The alternative might be to repurpose the android build script to run on windows and use the Android SDK native toolchain in something like Powershell. Would welcome a PR that does this. |
Okay I was able to upload the APK you provided but I'm unclear how to run it with a website address? I tried:
But I just got a black screen inside the headset |
You can check the logs with |
I see. But is that the correct syntax?
|
The arguments are passed straight through to So those arguments will probably pause node and prevent anything from loading, due to Additionally, there is not multiple arguments accepted for the domain/address. The first argument is the node main JS file to load, and the second argument is the URL passed to it. |
An example start command I use:
|
Hurrah that works! Thanks. Just to confirm, I understand Exokit is not a browser, but can it display a non-VR HTML 'landing page' with a button that you click to start VR? |
That is the browser frontend we were discussing, which is at https://github.com/exokitxr/exokit-frontend/tree/white. That behaves much more like a multi-page browser environment, with 2D page support as well. |
Oh awesome. Okay hurry up and release that :) |
FYI: linux build crashed too (running linux on AWS). Log here:
|
That’s interesting; looks like clang++ is being killed by the system (out of memory?) |
Describe the bug
I ran:
docker pull debian:latest
docker build -f android.Dockerfile -t exokit .
docker run exokit cat exokit.apk >exokit.apk
As instructed.
The full error log was:
Step 1/12 : FROM debian:latest
---> 00bf7fdd8baf
Step 2/12 : RUN apt-get update -y && apt-get install -y build-essential wget python git unzip default-jdk
---> Using cache
---> 84a026d7b00a
Step 3/12 : RUN groupadd -g 999 appuser && useradd -r -u 999 -g appuser appuser
---> Using cache
---> 0431fe293649
Step 4/12 : ENV HOME /home/appuser
---> Using cache
---> e03eb1e0a52e
Step 5/12 : ADD . $HOME/app
---> b8c07fba40aa
Step 6/12 : WORKDIR $HOME/app
---> Running in 0a86d0caa1f0
Removing intermediate container 0a86d0caa1f0
---> 5a17f368f268
Step 7/12 : RUN echo $HOME
---> Running in f81a11f8cf5e
/home/appuser
Removing intermediate container f81a11f8cf5e
---> fa9f3c4f46a9
Step 8/12 : RUN chown -R appuser:appuser $HOME && chmod -R 777 $HOME
---> Running in 32b96fb9fd76
Removing intermediate container 32b96fb9fd76
---> 32ff829c0b8a
Step 9/12 : USER appuser
---> Running in 80d2cdae055c
Removing intermediate container 80d2cdae055c
---> 0e3717eef25a
Step 10/12 : RUN wget "https://nodejs.org/dist/v11.6.0/node-v11.6.0-linux-x64.tar.gz" -O node.tar.gz -q && tar -zxf node.tar.gz > /dev/null && rm node.tar.gz && mv node-v11.6.0-linux-x64 node
---> Running in 2c028081b16a
Removing intermediate container 2c028081b16a
---> 0b58a7e3cf41
Step 11/12 : RUN wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip -q && unzip sdk-tools-linux-4333796.zip > /dev/null && rm sdk-tools-linux-4333796.zip && mkdir android-sdk && export ANDROID_HOME=$(pwd)/android-sdk && mv tools android-sdk/tools && yes | $ANDROID_HOME/tools/bin/sdkmanager --licenses > /dev/null && $ANDROID_HOME/tools/bin/sdkmanager "platform-tools" "platforms;android-28" > /dev/null && $ANDROID_HOME/tools/bin/sdkmanager "ndk-bundle" > /dev/null && export PATH="$PATH:$(pwd)/node/bin" && scripts/make-toolchain-android.sh && scripts/build-android.sh
---> Running in ac614095cdca
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 5 more
The command '/bin/sh -c wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip -q && unzip sdk-tools-linux-4333796.zip > /dev/null && rm sdk-tools-linux-4333796.zip && mkdir android-sdk && export ANDROID_HOME=$(pwd)/android-sdk && mv tools android-sdk/tools && yes | $ANDROID_HOME/tools/bin/sdkmanager --licenses > /dev/null && $ANDROID_HOME/tools/bin/sdkmanager "platform-tools" "platforms;android-28" > /dev/null && $ANDROID_HOME/tools/bin/sdkmanager "ndk-bundle" > /dev/null && export PATH="$PATH:$(pwd)/node/bin" && scripts/make-toolchain-android.sh && scripts/build-android.sh' returned a non-zero code: 1
The text was updated successfully, but these errors were encountered: