License switch by terminal

Hello.
Need a little help. Unity 5.2.0f3
There are two licenses:

  • Unity 5 pro IOS
  • Unity 5 pro Android

Unity is activate Pro IOS

Try activate Unity from the Terminal by typing
/Applications/Unity/Unity.app/Contents/MacOS/Unity -quit -batchmode -serial “Android serial”

Open Unity. License has not changed.

From License Management license is switches

Thanks for the answer.

Add username and password to your command line arguments.

Resolved Jenkins shell command

echo $ADMIN_PASSWORD | sudo -S $UNITY_PATCH -quit -batchmode -serial $IOS_LICENSE -username $UNITY_USER_NAME -password $UNITY_USER_PASSWORD -projectPath $PATH_PROJECT