Failed to open connection to the adb: Redmi 4: Failed to init device controller

My Redmi 4 device was connected successfully to the appium studio but when i am trying to open the device it is showing me the following error.

Kindly suggest a solution for this. It starts with showing installing UIAutomator and just gets stuck there only and doesn’t move ahead and then gives the attached error.
Does this by any chance have to do with that UiAutomator is already separately installed in my system. I earlier installed appium server desktop application before installing appium studio could that be causing these problems?

Please suggest.

Hi @Tej,

Please attach your logs, to help identify the issue.

Appium server installation will interfere only if the two apps are working in parallel, please close appium server before launching Appium Studio.
Furthermore, Please view device screen while appium studio is opening the reflection, if you see an installation approval request then you need to follow the guide in https://docs.experitest.com/display/TD/Connect+Xiaomi+Device.

Regards

Thanks Khaleda

That helped. Thanks a lot.

Inside Developer Options, if you uncheck the Verify USB Applications (not sure about english name) it would never ask you to install the agent.

I discovered it because AS 1.6 always requested to install the agent in my HuaweiP8 on every test I launched, turning this off worked fine.