Command line “Android update sdk” on headless Linux

You can use the --no-ui option:

android update sdk --no-ui

If you’d like to automate it, you could accept all licenses by using the expect tool with this hack (the --accept-license option is currently not fully integrated in the android tool):

expect -c '
set timeout -1;
spawn android - update sdk --no-ui;
expect {
    "Do you accept the license" { exp_send "y\r" ; exp_continue }
    eof
}
'

Leave a Comment