Mobile Dev Moment

Authored at 13:24:24 on 2026-06-19
Modified at 13:24:24 on 2026-06-19

This week a friend of mine asked me to review an app that he generated called triptrac. It's purpose is to catalog substance use and effects for oneself. I've not done much android development, so I am kind of going in blind here, but I compile software pretty frequently so I at least have a baseline understanding of what will be required.

Hiccup 1: Installing the android SDK

Upon cloning the repo I found a pretty standard looking gradle setup as I'd expect for building an android app. I don't have gradle installed on my machine, so I went ahead and just ran the gradlew wrapper script, which generated the following error:

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> SDK location not found. Define a valid SDK location with an ANDROID_HOME environment variable or by setting the sdk.dir path in your project's local properties file at '~/code/triptrac/local.properties'.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to generate a Build Scan (<Ad Text Redacted>).
> Get more help at https://help.gradle.org.

BUILD FAILED in 935ms
Configuration cache entry stored.

Why I even tried to run the build script without the android SDK installed is a mystery to me. I guess I just hoped that if we're wrapping up build scripts we might as well be wrapping up the SDK installation as well. Silly assumption by me, but c'est la vie.

Armed with knowledge of what I lack, I sought to go and find it such that I may make myself whole again. I know that android studio exists and also that I don't want to install and use it if I don't have to, so I opted to install the command line tools. I unzipped them into ~/opt, added the created cmdline-tools/bin directory to my PATH, and set ANDROID_HOME to ~/opt/cmdline-tools, but the error persisted.

At the bottom of the "Command line tools only" section there is a note that one can run sdkmanager to download SDK packages. The help text for sdkmanager says you can use sdkmanager --list to show installed and available packages, so that seemed a good next step to take. What I found upon running said command was the following error:

Error: Could not determine SDK root.
Error: Either specify it explicitly with --sdk_root= or move this package into its expected location: /cmdline-tools/latest/
Rather than continuing on about my efforts to battle my own incompetence, I will simply note here that the proper configuration looked like this:

Hiccup 2: Electric Boogaloo (Running The App)

I mostly only use devices running iOS as far as mobile technology goes. I have an old Lenovo Tab A10 that is all but dead. I am pretty certain that the trust store(s) for TLS are now out of date as I cannot connect to any google services for updates or networking. That's not super surprising to me since the thing is ancient by mobile device standards. I briefly considered rooting the device and seeing if I could get a custom ROM with a later android version running on it, but that yak was a bit too hairy for running a single app in my estimation, so I looked for a way to run it directly on my desktop. A cursory search led me to Waydroid, which I found conveniently in the fedora repositories and installed with dnf.

Upon first running Waydroid, one is prompted for system and vendor OTA URLs. I went ahead and threw in the ones listed in the Waydroid documentation since I don't know enough to have a need for an alternative. I pressed download and... it hung waiting for the waydroid container service. I confirmed that waydroid-container.service was running under systemd with systemctl status waydroid-container and then followed the logs with journalctl -f -u waydroid-container but the logs revealed nothing. I found references online to other people having this issue, with some saying they had to use a VPN and some saying the issue was to do with IPv6. I have my network card configured to use both IPv4 and IPv6, so I ended up solving the issue by disabling IPv6 and then disconnecting and reconnecting my network connection.

Out Of The Woods

From there everything worked as I'd hoped it would. I went ahead and installed the apk with waydroid app install <apk> and it appeared in my Waydroid install and ran just how I'd hoped it would.

Conclusion

I can't help but feel like the tooling could have been more helpful or more explicit about what was needed, especially in the realm of the command line tools for android, but I suppose that is just a byproduct of the fact that google would prefer you use Android Studio than to use the command line tools directly. Oh well, at least it's working now so I can have a reference for what I'm looking at as I review my friend's code.