-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
Update Dockerfile for Ubuntu 24.04 #80
Conversation
First of all, a big thanks to @satmandu! Sencondly, I'd prefer to split the upgrade of other tools/dependencies into a different PR, to keep it safe (in terms of troubleshooting) and organized. The biggest change here, apart from the Ubuntu base image change, is the removal of i386 architecture support. The reason of including it was to support 32-bit tools. I remember that, back in time, quite some Android SDK tools (command-line binaries) were compiled as 32-bit. Now it's getting better, many components of the Android SDK have transitioned to 64-bit, but I'll need to double check if any remainings are still 32-bit. |
Just downloaded a fresh copy of Android SDK (commandlinetools-linux-11076708_latest.zip), and checked with below command: |
As a proof that the command is working: Executed this command in the ./tools/mksdcard: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=119b9b83c17fa0228acfd582e951ea8b050e1229, not stripped
./tools/lib/monitor-x86/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.200.v20120913-144807/eclipse_1502.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped
./tools/lib/monitor-x86/libcairo-swt.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped
./tools/lib/monitor-x86/monitor: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.2.5, not stripped |
I couldn't find any explicit statement from Google confirming a complete transition to 64-bit tools. I remember that the emulator tool and some functions previously required 32-bit support. I'll check if that's still the case, along with a few other major tools and packages that aren't included in the default SDK zip file. |
I have installed below tools/packages: sdkmanager --list_installed
[=======================================] 100% Fetch remote repository...
Installed packages:
Path | Version | Description | Location
------- | ------- | ------- | -------
build-tools;35.0.0 | 35.0.0 | Android SDK Build-Tools 35 | build-tools/35.0.0
emulator | 34.2.16 | Android Emulator | emulator
extras;android;m2repository | 47.0.0 | Android Support Repository | extras/android/m2repository
extras;google;google_play_services | 49 | Google Play services | extras/google/google_play_services
extras;google;instantapps | 1.9.0 | Google Play Instant Development SDK | extras/google/instantapps
extras;google;m2repository | 58 | Google Repository | extras/google/m2repository
extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.2 | 1 | Solver for ConstraintLayout 1.0.2 | extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.2
extras;m2repository;com;android;support;constraint;constraint-layout;1.0.2 | 1 | ConstraintLayout for Android 1.0.2 | extras/m2repository/com/android/support/constraint/constraint-layout/1.0.2
platform-tools | 35.0.1 | Android SDK Platform-Tools | platform-tools
platforms;android-35 | 1 | Android SDK Platform 35 | platforms/android-35
system-images;android-35;google_apis;arm64-v8a | 7 | Google APIs ARM 64 v8a System Image | system-images/android-35/google_apis/arm64-v8a
system-images;android-35;google_apis;x86_64 | 7 | Google APIs Intel x86_64 Atom System Image | system-images/android-35/google_apis/x86_64 And then I checked those executables: # Input
apt-get update && apt-get install -y file
find . -type f -exec file {} + | grep '32-bit'
# Output
./build-tools/35.0.0/renderscript/lib/blas/armeabi-v7a/libblasV8.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[md5/uuid]=504954468547c529aa6f64fe6d73f557, stripped
./build-tools/35.0.0/renderscript/lib/blas/x86/libblasV8.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[md5/uuid]=dffe3ff152f24ec58f0b2cfd85e79a90, stripped
./build-tools/35.0.0/renderscript/lib/packaged/armeabi-v7a/libRSSupport.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[md5/uuid]=b21cdeeafcc117a5d0c1dd686f88690a, stripped
./build-tools/35.0.0/renderscript/lib/packaged/armeabi-v7a/librsjni_androidx.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[md5/uuid]=73fd493eb10ccb74d82cfcda4a4f1c91, stripped
./build-tools/35.0.0/renderscript/lib/packaged/armeabi-v7a/librsjni.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[md5/uuid]=b23c23135fbe112c85fa7a7f808fcca2, stripped
./build-tools/35.0.0/renderscript/lib/packaged/x86/libRSSupport.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[md5/uuid]=620efa41ed90dc1f0d304a8f6d9e3efa, stripped
./build-tools/35.0.0/renderscript/lib/packaged/x86/librsjni_androidx.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[md5/uuid]=78069a723d44158b736d7409f79a4f32, stripped
./build-tools/35.0.0/renderscript/lib/packaged/x86/librsjni.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[md5/uuid]=48a25a3b2511323f6ab34303515c2963, stripped
./build-tools/35.0.0/renderscript/lib/intermediates/armeabi-v7a/libm.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[md5/uuid]=83ebcd3d3eef99c94df3f3fb644af65d, stripped
./build-tools/35.0.0/renderscript/lib/intermediates/armeabi-v7a/libc.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[md5/uuid]=77aa6999864032a9b1b63a4749dbbb74, not stripped
./build-tools/35.0.0/renderscript/lib/intermediates/x86/libm.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[md5/uuid]=3641c54897fe47729d050c79daf73e21, stripped
./build-tools/35.0.0/renderscript/lib/intermediates/x86/libc.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[md5/uuid]=8be40d53c19c1a89313e0334e325a812, not stripped You can tell based on the above info, there are still several 32-bit binaries present in the latest Android SDK, specifically related to the RenderScript component. Therefore, before removing the 32-bit support, @satmandu could you pleasea build the image locally with the removal change applied, and test it if you can still build your Android project with |
I was building using this Docker file and started using this command to build:
I was then building https://github.com/jellyfin/jellyfin-android using the command That works fine, but that I think uses the v34 tools... (The app works fine.) |
Thank you for checking it out promptly. I'm not an expert on this topic. But I believe if you can build such an Android app with even build-tools v34 (older than v35), it should be fine. There might be some corner cases, but we don't know as of now. I'd say let's just test a few things and apply the change to the latest image, if it doesn't work out, folks can still pull the previous released version. WDYT? Could you please help me test especially the emulator part, to make sure the emulator could be launched and run without any problem? Thank you. |
just tested, our app/dev environment seems to be working fine on this image. I'm good with it if there are no other concerns 👍 |
I just tested building and running other sub-images built based on this, and got some errors: docker build --no-cache -t android-sdk-vnc android-sdk/vnc
docker run -p 5901:5901 -p 2222:22 android-sdk-vnc
#=> output
/usr/lib/python3/dist-packages/supervisor/options.py:474: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
self.warnings.warn(
2024-07-22 22:38:26,244 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.
2024-07-22 22:38:26,244 INFO Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing
2024-07-22 22:38:26,244 INFO Included extra file "/etc/supervisor/conf.d/supervisord_vncserver.conf" during parsing
2024-07-22 22:38:26,248 INFO RPC interface 'supervisor' initialized
2024-07-22 22:38:26,249 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2024-07-22 22:38:26,249 INFO supervisord started with pid 1
2024-07-22 22:38:27,251 INFO spawnerr: can't find command 'adb'
2024-07-22 22:38:27,254 INFO spawned: 'sshd' with pid 7
2024-07-22 22:38:27,257 INFO spawned: 'vncserver' with pid 8
2024-07-22 22:38:27,259 INFO spawned: 'watchdog' with pid 9
2024-07-22 22:38:28,289 INFO spawnerr: can't find command 'adb'
2024-07-22 22:38:28,289 INFO success: sshd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-07-22 22:38:28,289 INFO success: vncserver entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-07-22 22:38:28,289 INFO success: watchdog entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-07-22 22:38:28,307 INFO exited: vncserver (exit status 0; expected)
2024-07-22 22:38:30,311 INFO spawnerr: can't find command 'adb'
2024-07-22 22:38:33,317 INFO spawnerr: can't find command 'adb'
2024-07-22 22:38:33,318 INFO gave up: adb entered FATAL state, too many start retries too quickly @satmandu could you please remove other package/tool upgrade (JDK, gradle, Kotlin), and fix this issue? Thanks. |
Python issues could be due to Ubuntu 24.04 using Python 3.12. does anything have a dependency on that? |
Signed-off-by: Satadru Pramanik <satadru@gmail.com>
JFK, Gradle, and Kotlin updates reverted. |
Thank you @satmandu for the new commit. Still we need to do a couple of things before the merge:
Could you please help check and fix them? I'll also try on my end. Thank you. |
Any movement on this? We essentially been building our own base image off this branch for a few months now with no issues. |
@mcmah309 thank you for letting me know that the main image is working well. Is the emulator also working for you? |
We use real devices for testing. So haven't tried emulators. |
Hey everyone, good news 🎉 I made it work and tested it - both VNC and emulator work well with the new Docker image (based on Ubuntu 24.04). Please see attached screenshot as proof. I'll merge the PR later today and add all my local fixes related to the VNC part. Thanks again for your patience. Feedback is always welcome. 😊 |
Done releasing v10.0 Changelog is here Please let me know if it works for you guys, thank you. |
closes: #78
This also adds to the changes in #79 by removing the i386 multiarch stuff that isn't available in current Ubuntu releases while also updating the openjdk, gradle, and kotlin versions.