0

For updating purposes without using the Playstore and without additional user input I am trying to replace the shared library file in the lib/arm directory, however I am having trouble with permissions. Is this even possible? If not, what other way would be possible to make it work?

I am developing with Delphi, but am now searching for a more general answer. I can't seem to find anything related to that topic. I know that this is a security risk, but the devices the app is supposed to be running on are not easily accessible to users to confirm the regular apk-update dialogue later and they are aware of the trade-off.

As far as I can tell, it may be that I need to execute shell commands for superuser access, but I am not sure, if this is the right approach or how to accomplish it in-app.

  • 1
    Generally speaking everything that's installed via an APK is read-only. I *guess* your best bet is to install a new APK via `pm`, but if you don't want user-interaction that seems to require a rooted device. See [this question](https://stackoverflow.com/questions/26926274/install-android-apk-without-prompt). – Joachim Sauer Mar 22 '22 at 10:05
  • Thank you, I'll read through it. I am a bit confused about the read-only part, since I was able to replace the so-file with Total Commander without issue. Because that worked I thought there was a way to do that in a different app, too. How might Total Commander accomplish it? – Nils Eilers Mar 22 '22 at 10:27
  • Is your phone rooted? That way TC could achieve it. But it's also possible that I misremembered it, but that would surprise me. – Joachim Sauer Mar 22 '22 at 10:47
  • I needed to update the device with a new image I got and now it no longer works. I'll try rooting it again. – Nils Eilers Mar 22 '22 at 10:59

0 Answers0