In my usecase, I need to manage the LWM2M update process.
I have to be able to know which app is being updated. I found in legato documentation I could use the api le_avc_GetAppUpdateName but this function always return LE_FAULT because this function is “not implemented”. (cf: legato-af/avcServer.c at master · legatoproject/legato-af · GitHub)
How can I retrieve this app name ?
It doesn’t matter if I have to modify sources of legato framework.
Do you want to know the name of the app before “accepting download”? It is not be possible to know the app name till the install process. i.e we need to unzip the package and read the headers to figure out the app name.
It is not supported. But if you are modifying legato source code for this feature, take a look at avcAppUpdate.c file. The downloaded package should be under /legato/download/download.update
The download part is handled within the avcService app. The install is handled by the updateDaemon which is part of legato framework. Take a look at le_update_Start() & le_update_Install() apis to see how the package is parsed on installed to the target. You may be also interested in looking at the security-pack / security-unpack feature in legato. This is a hook to run a script after a download is done. If you make a custom package, you may be able to extract some information by running a script after download is complete.