Thanks for your answers @wreed @amitjaincoer191,
This works fine,
Runtime.getRuntime().exec(“adb shell echo $EXTERNAL_STORAGE”);
but my problem is that my pc is not directly connected to the Android device, so at this point i can use JSch to execute the command line remote but i hoped that the appium server has something implemented to perform the adb commands.
Thanks