title: Unable to Run Appium Test both emulator and real mobile devices
body: <p>I have basic appium automation test which just  launches the app on mobile device and has to perform some operations.
  The same code is running on others machine while I am facing issues running it.</p>
  
  <p>I am getting this error:</p>
  
  <blockquote>
    <p>org.openqa.selenium.SessionNotCreatedException: Unable to create a new
    remote session. Please check the server log for more details. Original
    error: An unknown server-side error occurred while processing the
    command. Original error: Error executing adbExec. Original error:
    'Command '/Users/xyz/Library/Android/sdk/platform-tools/adb -P 5037 -s
    2d5c1222 shell pm clear com.android.calculator2' exited with code 1';
    Stderr: 'Error: java.lang.SecurityException: adb clearing user data is
    forbidden.'; Code: '1' Build info: version: '3.141.59', revision:
    'e82be7d358', time: '2018-11-14T08:17:03' System info: host:
    'xyz.local', ip: 'xxxx:x:x:x:xxxx:xxxx:xxxx:xxxx%en0', os.name: 'Mac
    OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version:
    '11.0.3' Driver info: driver.version: AppiumDriver</p>
  </blockquote>
  
  <p>Other details:</p>
  
  <ul>
  <li>appium version: 1.14.2</li>
  <li>node:12.6</li>
  <li>adb: 1.0.41</li>
  </ul>
  
  <p>Unable to resolve the error. </p>
  
  <pre><code>capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, "UiAutomator2");
  capabilities.setCapability(MobileCapabilityType.DEVICE_NAME,"Android");
  capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME,"Android");
  capabilities.setCapability(MobileCapabilityType.UDID,udid);
  capabilities.setCapability("appPackage","com.android.calculator2");
  capabilities.setCapability("appActivity", ".Calculator");
  AppiumDriver&lt;AndroidElement&gt; appiumDriver = new AppiumDriver&lt;&gt;(new URL(APPIUM_SERVER_URL.replace("port", appiumPort)), capabilities);
  </code></pre>