Here is a good post about updating Android SDK from the command line – https://developer.android.com/studio/command-line/sdkmanager.
Very useful when you are running your tests in headless mode on virtual machine and you have to update SDKs from time to time.