Skip to content
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

+android-commandlinetools-9477386 #359

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

quad
Copy link
Collaborator

@quad quad commented Jul 18, 2023

A second attempt at #281. Inspired by @psymoon and motivated by @swankjesse.

@quad
Copy link
Collaborator Author

quad commented Jul 18, 2023

@psymoon I went on another deep dive. This PR "works" insofar as:

  • sdkmanager installs packages
  • avdmanager is super confused about image locations … but muddles along with warnings
  • … I donno! 🤷 Help wanted testing it out!

@quad quad force-pushed the ssr/20230718/android-commandlinetools branch 2 times, most recently from 4074b64 to a5b789a Compare July 18, 2023 11:34

symlink {
from = "${root}/NOTICE.txt"
to = "${HERMIT_ENV}/.hermit/android/cmdline-tools/${version}/NOTICE.txt"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't really work as you hope: if the package is already unpacked, and a new env is cloned with this package, these hooks will not execute in that new env.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know. 😭 What would you recommend?

@quad quad force-pushed the ssr/20230718/android-commandlinetools branch from a5b789a to cbe9297 Compare July 18, 2023 11:40
@quad
Copy link
Collaborator Author

quad commented Jul 18, 2023

:trollface: Fuck, am I going to have to make jre a runtime dependency?! 😭

+ hermit test -t android-commandlinetools-9.0
fatal: app/test_cmd.go:36: env.go:513: Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/android/prefs/AndroidLocationsProvider has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
	at java.lang.ClassLoader.defineClass1(Native Method)

@quad quad force-pushed the ssr/20230718/android-commandlinetools branch from cbe9297 to 7210ba8 Compare July 18, 2023 11:46
Copy link

@swankjesse swankjesse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neato. I expect for this to be most useful we’ll need adb and aapt. (There’s probably more?)

@quad
Copy link
Collaborator Author

quad commented Jul 19, 2023

@swankjesse adb, at least, is got by running sdkmanager platform-tools. This still needs work around setting up the PATH correctly.

@quad
Copy link
Collaborator Author

quad commented Jul 19, 2023

@swankjesse And aapt is got via sdkmanager build-tools;<version>

Copy link

@psymoon psymoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants