title: Sliently install .apk programmatically
body: <p>OK,</p>
  
  <p>I know there are are a fair number of questions similar to this, but non have given me the answer I'm looking for. </p>
  
  <p>I have a custom rooted ROM (without play store). It's a android stick pc (So I don't have the system key to sign my app with, unless I've missed something in the kernel docs). I want my app to check nightly for updates from my server. If there is a new version I want it to download and install it without user interaction.</p>
  
  <p>I know I can trigger the update screen with </p>
  
  <pre><code>Intent intent = new Intent(Intent.ACTION_VIEW);
  Uri uri = Uri.fromFile(new File(pathToApk));
  intent.setDataAndType(uri, "application/vnd.android.package-archive");
  startActivity(intent);
  </code></pre>
  
  <p>But as I said it's not what I want. SU and busybox are on the device. Anyone know of a way to do this?</p>