Sharing Android SDK Installation Across Multiple Users

July 29, 2019 Android

Create a directory for Android SDK installation outside of home directory:

$ sudo mkdir /opt/android-sdk

Move existing Android SDK to the new location:

$ sudo mv Sdk /opt/android-sdk/

Create a new group that will have permissions to access the SDK:

$ sudo groupadd androidsdk

Add users to the group:

$ sudo usermod -a -G androidsdk user1
$ sudo usermod -a -G androidsdk user2

Make androidsdk group an owner of the SDK directory:

$ sudo chown -R root:androidsdk /opt/android-sdk

Check permissions:

$ ls -l /opt/android-sdk/
total 4
drwxrwxr-x 15 root androidsdk 4096 Jun 23 23:19 Sdk
$ ls -l /opt/android-sdk/Sdk/
total 48
drwxrwxr-x 4 root androidsdk 4096 Jun 16 16:34 build-tools
drwxrwxr-x 7 root androidsdk 4096 Jun 16 16:35 emulator
drwxrwxr-x 4 root androidsdk 4096 Apr  5 17:17 extras
drwxrwxr-x 3 root androidsdk 4096 Jun 16 16:50 fonts
drwxrwxr-x 2 root androidsdk 4096 Jun 23 23:19 licenses
drwxrwxr-x 3 root androidsdk 4096 Apr  5 17:13 patcher
drwxrwxr-x 4 root androidsdk 4096 Jun 16 16:38 platforms
drwxrwxr-x 5 root androidsdk 4096 Jun 16 16:34 platform-tools
drwxrwxr-x 3 root androidsdk 4096 Jun 16 16:38 skins
drwxrwxr-x 3 root androidsdk 4096 Apr  5 17:15 sources
drwxrwxr-x 4 root androidsdk 4096 Jun 16 16:35 system-images
drwxrwxr-x 6 root androidsdk 4096 Apr  5 17:13 tools
comments powered by Disqus