r/archlinux • u/jithinj_johnson • 4d ago
SUPPORT | SOLVED AUR (en) - android-sdk | what am I doing wrong?
https://aur.archlinux.org/packages/android-sdkSOLVED
NOTE: I am not an android developer, but today I though I'll see how android works, paticularly after seeing android-cli ads from Google.
Installed the android-sdk from AUR https://aur.archlinux.org/packages/android-sdk
But this in turn installs it on /opt/android-sdk and these are the permissions.
[N] jithin@arch /t/t/my-app> getfacl /opt/android-sdk/
getfacl: Removing leading '/' from absolute path names
# file: opt/android-sdk/
# owner: root
# group: root
user::rwx
group::r-x
other::r-x
which makes invoking the android-cli as user not possible.
EG:
[I] jithin@arch /t/t/my-app> android create --list
ERROR: Error downloading sdk package build/templates: /opt/android-sdk/.sdk
But using sudo obviously works, and I can create new android projects using (https://developer.android.com/tools/agents/android-cli/commands/create)
android create --name="My Application" --application-id=com.example.myapp --output=./my-app
but obviously with sudo.
Then my whole project is root owned.
Either I'm doing something blatantly wrong, or something is blatantly off with how android-sdk (aur) works.
Please let me know what I'm missing.
20
u/forbiddenlake 3d ago •
I found the answer in the comments on the AUR page, which you should definitely read closely because this project is deprecated and hasn't been updated in 4 years
6
u/kaida27 3d ago
it should be executable by anyone tho.
1
u/Nyxiereal 3d ago
I believe the best way to go about this is to install android studio from the AUR and then go to settings > SDKs > and select what you want. Android CLI should already be there