Is there a way of installing an apk from downloads folder without user input on a rooted device?
You can simply use adb install command to install/update APK silently. Sample code is below
public static void InstallAPK(String filename){ File file = new File(filename); if(file.exists()){ try { String command; command = "adb install -r " + filename; Process proc = Runtime.getRuntime().exec(new String[] { "su", "-c", command }); proc.waitFor(); } catch (Exception e) { e.printStackTrace(); } } }
You can simply use adb install command to install/update APK silently. Sample code is below