Update boot signing in InstallMagisk

This commit is contained in:
topjohnwu
2017-10-31 16:31:58 +08:00
parent adf930f126
commit fdd700f3e5
7 changed files with 75 additions and 58 deletions
@@ -28,6 +28,9 @@ import com.topjohnwu.magisk.components.SnackbarMaker;
import com.topjohnwu.magisk.receivers.DownloadReceiver;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
@@ -215,4 +218,13 @@ public class Utils {
return null;
}
}
public static void inToOut(InputStream in, OutputStream out) throws IOException {
int read;
byte buffer[] = new byte[4096];
while ((read = in.read(buffer)) > 0) {
out.write(buffer, 0, read);
}
out.flush();
}
}