Cannot run Android app through adb or Appium server because of SecurityException: Permission Denial


java.lang.SecurityException: Permission Denial: starting Intent { flg=0x10000000 } from null (pid=19756, uid=2000) not exported from uid 10209

I have added App package and App activity names to desired capabilities. I have checked for correct App activity on APK info App, There is more than one app activity available. Which app activity I should select. Below are my desired capabilities. Can you anyone suggest a workaround for this?

    DesiredCapabilities cap = new DesiredCapabilities();
    cap.setCapability("deviceName", "SM-G950U");
    cap.setCapability("udid", "988d91474b4e373156");
    cap.setCapability("platformName", "Android");
    cap.setCapability("platformVersion", "8.0.0");          
    cap.setCapability("appPackage", "");
    cap.setCapability("appActivity", "");
    cap.setCapability("waitForQuiescence", false);
    cap.setCapability("shouldUseSingletonTestManager", false);
    cap.setCapability(MobileCapabilityType.AUTOMATION_NAME, "uiautomator2");
    cap.setCapability("JSONSource", true);
    cap.setCapability(MobileCapabilityType.NO_RESET, false);
    cap.setCapability("noReset", "true");  

    URL url = new URL("");

    driver = new AppiumDriver<MobileElement>(url, cap);

    System.out.println("Application Started....");
asked on Stack Overflow Apr 2, 2020 by jamp ani • edited Apr 2, 2020 by Mohamed Nageh

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0