Using adb's built-in device wait command.