The "--ni-regen-all-app" option performs AOTC again for all installed apps.
If the "--ni-regen-all-app" option is performed after FOTA (OTN),
an error may occur or unnecessary AOTC may be performed by running AOTC for an app installed in the RO area.
To avoid this situation, the "--skip-ro-app" option is added.
If this option is set, native image regenration for apps installed in the RO area is skipped.
Note! this option works with "--ni-regen-all-app" option only.
#define NI_FLAGS_NO_PIPELINE 0x0080
#define NI_FLAGS_MIBC 0x0100
#define NI_FLAGS_PRINT_CMD 0x0200
+#define NI_FLAGS_SKIP_RO_APP 0x0400
typedef std::function<void (std::string)> afterCreate;
" (If not set, default system paths are used.)\n"
" --no-pipeline - Compile the dlls individually\n"
" --print-cmd - Print command and options\n"
+ " --skip-ro-app - Skip re-generate NI for apps installed RO area\n"
+ " (This option works with --ni-regen-all-app only)\n"
"\n"
"Usage: dotnettool [options] [command] [arguments]\n"
"\n"
opt->flags |= NI_FLAGS_NO_PIPELINE;
} else if (arg == "--print-cmd") {
opt->flags |= NI_FLAGS_PRINT_CMD;
+ } else if (arg == "--skip-ro-app") {
+ opt->flags |= NI_FLAGS_SKIP_RO_APP;
} else if (arg == "--ibc-dir") {
++i;
if (i >= argc) {
int ret = 0;
NIOption **pOptions = (NIOption**)userData;
+ if ((*pOptions)->flags & NI_FLAGS_SKIP_RO_APP) {
+ bool isSystem = false;
+ int ret = pkgmgrinfo_appinfo_is_system(handle, &isSystem);
+ if (ret != PMINFO_R_OK) {
+ _SERR("Failed to check that app is System or not\n");
+ return -1;
+ }
+ if (isSystem) {
+ return 0;
+ }
+ }
+
ret = pkgmgrinfo_appinfo_get_pkgid(handle, &pkgId);
if (ret != PMINFO_R_OK) {
_SERR("Failed to get pkgid");
PATH=/usr/bin:/bin:/usr/sbin:/sbin
/usr/bin/dotnettool --tac-regen-all
-/usr/bin/dotnettool --ni-regen-all-app
+/usr/bin/dotnettool --ni-regen-all-app --skip-ro-app
/usr/bin/dotnettool --resolve-all-app
/usr/bin/dotnettool --rm-all-app-profile