Installing Android SDK cmd line tools for building SDL2 apps..

I have been trying to install Android Studio on BookWorm64 puppy linux, (to compile SDL2 apps to Android) but its large (8gb) and problematic..

So I decided to setup a new copy of BookWorm64 with just the command line build tools. If you look at:

https://developer.android.com/studio

You will see the linux build tools zip is 160mb. (it downloads more later, but you can be selective)

So with a new bw64+devx, i first install latest java (apt install default-jdk), unzip tools to “/root/Android/Sdk/cmdline-tools” then run

  bin/sdkmanager --list

but whatever commands i give, it says
Error: could not determine SDK root.
I have tried
bin/sdkmanager --sdk_root=“/root/Android/Sdk”
and many more, but to no avail. Surely this is the tool to INITIATE the sdk!? There is no sdk root set yet! This is Androids doc on it:
https://developer.android.com/tools/sdkmanager

I have also downloaded the NDK, but have to yet unzipped it, unsure how to set that up. (sdk first?)

Has anyone tried this? Ideas welcome..

This is the location of sdkmanager on my system (created through Android Studio a long time ago):

~/Android/Sdk/cmdline-tools/latest/bin/sdkmanager

The instructions tell me the directory structure has not changed.

I think the latest directory is missing on your system.