fails on arm64

I'm trying to build an Android app on my ARM 64 phone. I'm using a Debian 11 chroot via an app called Linux Deploy on my phone. I think I have all the required binaries such as build tools, platform tools, etc. I did not get these from the sdkmanager, but through Debian repos. I am stuck on not being able to use the build tools - it says I haven't accepted some licenses. I got this Python sdkmanager because I couldn't find any sdkmanager from official channels for ARM 64.

This program seems to have a lot of problems.

a@localhost:~$ sdkmanager --licenses                                              Downloading https://fdroid.gitlab.io/android-sdk-transparency-log/checksums.json.asc into /home/a/.cache/sdkmanager/checksums.json.asc                              Traceback (most recent call last):
  File "/home/a/.local/bin/sdkmanager", line 8, in <module>
    sys.exit(main())
  File "/home/a/.local/lib/python3.9/site-packages/sdkmanager.py", line 1149, in main
    build_package_list(use_net=True)
  File "/home/a/.local/lib/python3.9/site-packages/sdkmanager.py", line 823, in build_package_list                                                                      download_file(checksums_url + '.asc')
  File "/home/a/.local/lib/python3.9/site-packages/sdkmanager.py", line 566, in download_file
    raise RuntimeError('304 Not Modified: ' + url)
RuntimeError: 304 Not Modified: https://fdroid.gitlab.io/android-sdk-transparency-log/checksums.json.asc
a@localhost:~$ sdkmanager --update
Traceback (most recent call last):
  File "/home/a/.local/bin/sdkmanager", line 8, in <module>                           sys.exit(main())
  File "/home/a/.local/lib/python3.9/site-packages/sdkmanager.py", line 1144, in main
    raise NotImplementedError('Command "--%s" not implemented' % command)
NotImplementedError: Command "--update" not implemented
a@localhost:~$ sdkmanager --licenses
Downloading https://f-droid.github.io/android-sdk-transparency-log/signed/checksums.json.asc into /home/a/.cache/sdkmanager/checksums.json.asc                      Downloading https://f-droid.github.io/android-sdk-transparency-log/signed/checksums.json into /home/a/.cache/sdkmanager/checksums.json                              5 of 6 SDK package licenses not accepted.                                         Review licenses that have not been accepted (y/N)? y
                                                                                  Traceback (most recent call last):
  File "/home/a/.local/bin/sdkmanager", line 8, in <module>                           sys.exit(main())
  File "/home/a/.local/lib/python3.9/site-packages/sdkmanager.py", line 1150, in main
    method()                                                                        File "/home/a/.local/lib/python3.9/site-packages/sdkmanager.py", line 932, in licenses
    with (licenses_dir / license_file).open('w') as fp:
  File "/usr/lib/python3.9/pathlib.py", line 1241, in open
    return io.open(self, mode, buffering, encoding, errors, newline,
  File "/usr/lib/python3.9/pathlib.py", line 1109, in _opener
    return self._accessor.open(self, flags, mode)
PermissionError: [Errno 13] Permission denied: '/usr/lib/android-sdk/licenses/android-sdk-preview-license-old'
a@localhost:~$ sdkmanager --version
25.2.0```
Edited by Ghost User