From 82fed66a8a9c72de476d5a95e2cf3797a5195c7c Mon Sep 17 00:00:00 2001 From: Peter Serwylo Date: Tue, 19 Aug 2014 08:12:47 +0930 Subject: [PATCH] Increase root installer timeout from 5 to 30s. Fixes Issue #74. The superuser shell has a timeout that can be specified. The timeout was set to 5 seconds, thus the exit code from the shell is -1 (a reserved exit code used by libsuperuse to indicate timeout). By my estimate, it is more likely that a user will hit this error message and get annoyed, compared to actually hitting a genuine timeout because of some issue with superuser. Especially when we factor in slow devices and large apps to install. Thus, the timeout has been bumped to a more generous 30 seconds. --- src/org/fdroid/fdroid/installer/RootInstaller.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/org/fdroid/fdroid/installer/RootInstaller.java b/src/org/fdroid/fdroid/installer/RootInstaller.java index ca6fb683b..dd8f6c009 100644 --- a/src/org/fdroid/fdroid/installer/RootInstaller.java +++ b/src/org/fdroid/fdroid/installer/RootInstaller.java @@ -19,15 +19,15 @@ package org.fdroid.fdroid.installer; -import java.io.File; -import java.util.ArrayList; -import java.util.List; - -import eu.chainfire.libsuperuser.Shell; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.util.Log; +import eu.chainfire.libsuperuser.Shell; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; /** * Installer using a root shell and "pm install", "pm uninstall" commands @@ -45,8 +45,8 @@ public class RootInstaller extends Installer { Shell.Builder shellBuilder = new Shell.Builder() .useSU() .setWantSTDERR(true) - .setWatchdogTimeout(5) - .setMinimalLogging(true); + .setWatchdogTimeout(30) + .setMinimalLogging(false); return shellBuilder; }