Unable to start the appium with real device (android)

I’m getting below error while start the new session

An unknown server-side error occurred while processing the command. Original error: Error getting device API level. Original error: Error executing adbExec. Original error: ‘Command ‘C:\swinst\AndroidSDKAppData\Local\Android\sdk\platform-tools\adb.exe -P 5037 -s 26b56640 shell getprop ro.build.version.sdk’ exited with code 3221226356’; Stderr: ‘’; Code: ‘3221226356’

Here the slash appeared in incorrect location so invalid command appeared. How resolve this problem

devices is not recognized by appium.

If I try adb devices command the device is listed. @chetan_thummar. How can we solve this issue?

Encountered internal error running command: Error: Error getting device API level. Original error: Error executing adbExec. Original error: ‘Command ‘C:\Android\Sdk\platform-tools\adb.exe -P 5037 -s C1NGA2E7B0200704 shell getprop ro.build.version.sdk’ exited with code 3221226356’; Stderr: ‘’; Code: ‘3221226356’

I have the same problem,the slash is put in on the incorrect position,if I type adb devices in the cmd ,I can get the device list,how can we slove the problem

Try this separately, if you get the same error then Appium has nothing to do with it.

@arockiaraj13

adb -P 5037 -s 26b56640 shell getprop ro.build.version.sdk

@as931260115

adb -P 5037 -s C1NGA2E7B0200704 shell getprop ro.build.version.sdk

I try the code in the cmd ,and it works,does it mean that my device has connected to the PC?So, how can I solve this , I have tried for over a day,:rofl:

it could be in charging mode only.

What about this one?

An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: ‘Command ‘C:\Users\Bob\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 21de53b11220 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 255’;

It is not so hard. First link in google ->