Installing Android SDK cmd line tools on bookworm64

Installing Android SDK cmd line tools on bookworm64…

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 yet to unzip it, unsure how to set that up. (sdk first?)

Has anyone tried this? Ideas welcome…

export ANDROID_SDK=... ?

export ANDROID_SDK_ROOT=... ?

export ANDROID_SDK_HOME=... ?

Thanks,
I did try quite a few variations of paths. According to this:

https://developer.android.com/tools/variables

ANDROID_SDK_ROOT is deprecated for ANDROID_HOME (set to “/root/Android/Sdk”). But you maybe right, it might just be the right combo of paths. Shouldnt the sdkmanager set this up, or at least give clear prompts when incorrect? Anyway, It seems that online guides are saying to use sdkmanager to set it all up, ie see:

I notice the Windows version of sdkmanager is a GUI tool, and seems a bit more advanced than the linux version. I might try that under wine64 if all else fails.