Update app by calling CLI from application

How to call update Filename from Legato application to install another app. For instance, system(update --filename)?

If I understand correctly, you want one app to install or update another app.

system() is always the wrong solution. A better solution is to use the le_update.api as described in the Legato documentation of the le_update API.

The sample code shows an update via stdin, but you could just as easily use a file descriptor obtained using open().