title: java.lang.SecurityException: adb clearing user data is forbidden.'; Code: '1'
body: <p>I'm hitting this error:</p>
  
  <p><code>java.lang.SecurityException: adb clearing user data is forbidden.'; Code: '1'</code></p>
  
  <p>while running the below mentioned code on <code>appium</code> server in <code>android 8.1.0 (oreo)</code> but the same code is running fine in <code>android 5.1 (lollipop)</code>. USB debugging is already on in mobile. Anyone having any idea why I'm hitting this error?`</p>
  
  <pre><code>package appium;
  @BeforeTest
  
          public void setcapbilities() throws Exception
  {
  
      DesiredCapabilities cap = new DesiredCapabilities();
      cap.setCapability("deviceName","Vipul");
      cap.setCapability(CapabilityType.VERSION,"8.1");
      cap.setCapability("platformName","Android");
      cap.setCapability("appPackage","com.android.calculator2");
      cap.setCapability("appActivity","com.android.calculator2.Calculator");
      driver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"),cap);
      driver.manage().timeouts().implicitlyWait(5,TimeUnit.SECONDS);
  }
  
  @Test
  public void  firstt()
  {
      driver.findElement(By.xpath("//android.widget.Button")).click();
      driver.findElement(By.xpath("7")).click();
      driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
  }
  
  @AfterTest
  public void kill()
  {
      driver.manage().timeouts().implicitlyWait(5,TimeUnit.SECONDS);
      driver.quit();
  }
  </code></pre>