Monitor /data/system/packages.xml

Reinstalling system apps as data creates tons of issues.
Calling pm path <pkg> is extremely expensive and doesn't work in post-fs-data.
Parse through packages.xml to get APK path and UID at the same time.
As a bonus, we don't need to traverse /data/app for packages anymore.
This commit is contained in:
topjohnwu
2019-02-18 03:05:13 -05:00
parent 14aa6041ec
commit 692f893e1f
5 changed files with 78 additions and 117 deletions

View File

@@ -201,6 +201,8 @@ int exec_command_sync(Args &&...args) {
return exec_command_sync(exec, args...);
}
bool ends_with(const std::string_view &s1, const std::string_view &s2);
#endif
#endif