I noticed that the CMDL installation of the build-tools package using sdkmanager (version 3.0) installs emulator and platform-tools packages.
sdkmanager --verbose "build-tools;30.0.3"
Info: Preparing "Install SDK Patch Applier v4 (revision: 1)".
Info: "Install SDK Patch Applier v4 (revision: 1)" ready.
Info: Installing SDK Patch Applier v4 in /opt/android/patcher/v4
Info: "Install SDK Patch Applier v4 (revision: 1)" complete.
Info: "Install SDK Patch Applier v4 (revision: 1)" finished.
Info: Preparing "Install Android Emulator (revision: 30.4.5)".
Info: "Install Android Emulator (revision: 30.4.5)" ready.
Info: Installing Android Emulator in /opt/android/emulator
Info: "Install Android Emulator (revision: 30.4.5)" complete.
Info: "Install Android Emulator (revision: 30.4.5)" finished.
Info: Preparing "Install Android SDK Platform-Tools (revision: 31.0.0)".
Info: "Install Android SDK Platform-Tools (revision: 31.0.0)" ready.
Info: Installing Android SDK Platform-Tools in /opt/android/platform-tools
Info: "Install Android SDK Platform-Tools (revision: 31.0.0)" complete.
Info: "Install Android SDK Platform-Tools (revision: 31.0.0)" finished.
Info: Preparing "Install Android SDK Tools (revision: 26.1.1)".
Info: "Install Android SDK Tools (revision: 26.1.1)" ready.
Info: Installing Android SDK Tools in /opt/android/tools
Info: "Install Android SDK Tools (revision: 26.1.1)" complete.
Info: "Install Android SDK Tools (revision: 26.1.1)" finished.
Info: Preparing "Install Android SDK Build-Tools 30.0.3 (revision: 30.0.3)".
Info: "Install Android SDK Build-Tools 30.0.3 (revision: 30.0.3)" ready.
Info: Installing Android SDK Build-Tools 30.0.3 in /opt/android/build-tools/30.0.3
Info: "Install Android SDK Build-Tools 30.0.3 (revision: 30.0.3)" complete.
Info: "Install Android SDK Build-Tools 30.0.3 (revision: 30.0.3)" finished.
Execution of following command actually ends up with multiple platform-tools installation:
sdkmanager --verbose "platform-tools" "build-tools;30.0.3"
...
Warning: Package "com.android.repository.impl.generated.v1.RemotePackage@5f56a566" (platform-tools) should be installed in "/opt/android/platform-tools" but it already exists. Installing in "/opt/android/platform-tools-2" instead.
...
Do you know about any reason of such behavior and is there any way how to skip emulator package installation?
--verbose
) shows "Info: Failed to sort dependencies, returning partially-sorted list." which is probably the cause of the issue. I haven't found a workaround. – Cowpea