With Appium 1.6.3 : BootStrap Socket Crashed execution encountered when Adb Command is sent manually or via code

Hi,

I just upgraded to Appium 1.6.3 & running Appium with port-4723 & bootstrap-4823. Everything works perfectly till i send some ADB command either from commandline or from my Code. Exception is encounter is “BootStrap Socket Crashed”

My Appium version is : 1.6.3
Java-Client Appium Version:4.1.2/5.0.0-BETA1
ADB Version : 1.0.36
Windows: Windows 10

Is this some sort of Bug with latest Appium? Viewed other blogs also as some people faced similar exception but it did not help

Hi,
How to send adb commands through test scripts, using java language.
I want to turn enable/disable wifi in java client 3.1.2 Network connectionsetting is depricated, i can not update java client due to framework issue. please help me

@Kishore_v
You can the below code

Runtime.getRuntime().exec(“adb shell am start -a android.intent.action.MAIN -n com.android.settings/.wifi.WifiSettings”);
Thread.sleep(3000);
driver.findElement(By.xpath("//android.widget.Switch[@text=‘ON’]")).click();

//3G DOWN
Runtime.getRuntime().exec(“adb shell svc data disable”);

//3G UP
Runtime.getRuntime().exec(“adb shell svc data enable”);

@Vibhu_Kinger Can u help me.
Is the problem reported by you is fixed/still observing?

I am also seeing same issue when ever i run adb commands via cod like mentioned below:

Here is my code
Runtime.getRuntime().exec(“adb shell svc data enable”);
when ever i run this code, app server stops and shows below error.
"
uncaughtException: Android bootstrap socket crashed: Error: read ECONNRESET
Error: Android bootstrap socket crashed: Error: read ECONNRESET
at Socket.socketClient.on.err (C:\Users\jsyamsundar\AppData\Roaming\npm\node_modules\appium\node
_modules\appium-android-driver\lib\bootstrap.js:97:21)
at Socket.emit (events.js:189:13)
at emitErrorNT (internal/streams/destroy.js:82:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
[Logcat] Logcat terminated with code 0, signal null
[UiAutomator] UiAutomator exited unexpectedly with code 0, signal null
"