Appium error on MAC, error executing ADB exec. Original error
Error message: error executing adbexec. Original error: ‘command’/users/noogler/library/Android/SDK/platform tools/ADB – P 5037 – s clb7n18528000446 shell ‘settings delete global hidden_ api_ policy_ pre_ p_ apps; settings delete global hidden_ api_ policy_ p_ apps; settings delete global hidden_ api_ policy” exited with code 1
Process summary
Error information
: Error executing adbExec. Original error: ‘Command ‘/Users/noogler/Library/Android/sdk/platform-tools/adb -P 5037 -s CLB7N18528000446 shell ‘settings delete global hidden_ api_ policy_ pre_ p_ apps; settings delete global hidden_ api_ policy_ p_ apps; settings delete global hidden_ api_ policy’’ exited with code 1
Process
After clicking the start session
button in appium, you can enter the page without screenshot and throw an error. After a long time in Google, stackworkflow, CSDN and GitHub failed to solve the problem for a long time. After updating the bundle tools
of Android studio to the Android 11 version, it still has no effect. The SDK version of Android studio has 29 30 31. The Android device version connected to the computer is 10. The calling of the third-party Android SDK has been modified, but there is no solution.
adb shell settings put global hidden_ api_ policy_ p_ apps 1
*adb shell settings put global hidden_ api_ policy_ pre_ p_ Apps 1
reduces the version of appium desktop from 1.21 to 1.17!! So I tried to use version 1.21 on another iMac, and it also started successfully! The result of appium doctor is that all required and optional are installed. The Java SDK version is also 1.8. Try to find the appium configuration file to see if the configuration of 1.21 is different from that of 1.17. Finally, the ADB stopped responding, and the kill – server didn’t respond. It’s better to restart. Fortunately, after the restart, appium version 1.21 also successfully started the session, and no error was reported. 😂😂
Summary
If the results of appium doctor are all installed, there are also versions of Android SDK, JDK version is also 1.8, and so on. Direct suggestion
adb kill-server
adb start-server
adb shell
Maybe it can be solved. If there is no solution, you are welcome to throw out the mistakes and discuss them together. Even if I agree, it is not allowed to reprint