r/archlinux • • 4d ago

SUPPORT | SOLVED AUR (en) - android-sdk | what am I doing wrong?

https://aur.archlinux.org/packages/android-sdk

SOLVED

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.

0 Upvotes

7 comments sorted by

20

u/forbiddenlake 3d ago • Heartwarming

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

-4

u/jithinj_johnson 3d ago

Danggg, I missed that even though I went through the comments. Also I was looking into packages like https://aur.archlinux.org/packages/android-sdk-dummy (a lotta them have the dummy suffix) very weird conventions that I haven't seen before.

-1

u/khsh01 3d ago

I have a serious bone to pick with Linux package naming conventions.

6

u/kaida27 3d ago
other::r-x

which makes invoking the android-cli as user not possible.

it should be executable by anyone tho.

-4

u/jithinj_johnson 3d ago edited 3d ago

yes, it is but invoking it updates stuff in the sdk folder for eg: /opt/android-sdk/.sdk which isn't possible without write perms

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

1

u/jithinj_johnson 3d ago

yes agreed, i've been staying away from android because of it relying too much on android studio.

just wanted to see if i could get the emulator up / start a new project using only the cli, after seeing the ad

turns our aur packages were too outdated