title: Installing an APK on /system/priv-app
body: <p>I have a rooted TV Box with Android 7.1.2 which didn't come with the <code>Files</code> app (<code>com.android.documentsui</code>), so I can't give write access to external drives. </p>
  
  <p>I tried the following steps to install <code>DocumentsUI.apk</code>:</p>
  
  <ul>
  <li>move <code>DocumentsUI.apk</code> to <code>/system/priv-app/DocumentsUI/DocumentsUI.apk</code></li>
  <li><code>chmod 744 /system/priv-app/DocumentsUI</code></li>
  <li><code>chmod 644 /system/priv-app/DocumentsUI/DocumentsUI.apk</code></li>
  <li><code>chown 0.0 /system/priv-app/DocumentsUI</code></li>
  <li><code>chown 0.0 /system/priv-app/DocumentsUI/DocumentsUI.apk</code></li>
  <li><code>chcon u:object_r:system_file:s0 /system/priv-app/DocumentsUI</code></li>
  <li><code>chcon u:object_r:system_file:s0 /system/priv-app/DocumentsUI/DocumentsUI.apk</code></li>
  <li>reboot</li>
  </ul>
  
  <p>Even so, when I try to launch the app, it always force closes with the following error message on logcat:
  <code>Neither user 10072 nor current process has android.permission.CACHE_CONTENT</code></p>
  
  <p>Any idea if I'm missing something?</p>
  
  <p>Please note I'm not on Android 8+ so as far as I know I don't have to add an XML on <code>/system/etc/permissions</code>.</p>