title: Android system doesn't go to recovery mode
body: <p>I wrote some code</p>
  
  <pre><code>public boolean installPackage(Context context, File packageFile) {
      Log.d(LOG_TAG, "installPackage()");
      try {
          RecoverySystem.installPackage(context, packageFile);
      } catch (IOException e) {
          Log.e(LOG_TAG, "InstallPackageException", e);
          return false;
      }
  
      Log.d(LOG_TAG, "installPackage return true");
      return true;
  }
  </code></pre>
  
  <p>This line: <code>RecoverySystem.installPackage(context, packageFile);</code> should reboot system in recovery mode and install ota package.</p>
  
  <p>But sometimes system doesnt boot in recovery mode, system only do reboot and update file is not installed.</p>
  
  <p>How can I fix it?</p>