Prioritize retrieving the application UID from /data/user_de. If this fails, fall back to retrieving it from packages.list.
Fix unstable application UID acquisition
Signed-off-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com>
* On newer kernel for some reason -Wno-strict-prototypes still does not fix the errors or warnings.
* To fix it, we just need to add void type.
Signed-off-by: rsuntk <rsuntk@yukiprjkt.my.id>
* The coding format is too messy, reformat to improve readability
and get closer to Linux kernel coding style.
* While at it, update .clang-format file to linux-mainline state.
Skip directories that does NOT have the same magic as /data/app.
This is to avoid scanning incfs and any other stacked filesystems.
While this is way dumber, it's way cheaper.
no kern_path(), no missable path_put(), no ref handling.
This is a workaround for Ultra-Legacy kernels where upstream's
method fails.
Seems doing 50+ kern_path() calls is a bad meme.
This supercedes `throne_tracker: avoid cross fs access (tiann#2626)`
- upstream 0b6998b474
Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
- We don't know if KPM can run on arm32-bit devices, so to avoid some problems, add a dependency on 64-bit architectures
kernel/throne_tracker: we just uninstalled the manager, stop looking for it
When the manager UID disappears from packages.list, we correctly
invalidate it — good. But, in the very next breath, we start scanning
/data/app hoping to find it again?
Skip the scan — we’ll catch the reinstall next time packages.list updates.
Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
Signed-off-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com>
Hi,
This PR fixes deadlocks that I've noticed within my kernel, with some
minor optimizations around it.
Thanks.
---------
Signed-off-by: Juhyung Park <qkrwngud825@gmail.com>
The original logic was wrong and used 3 strlen()s for every file found,
wasting cpu.
Optimize it by first comparing only the filename length, given we
already know it,
and then strncmp() to compare with "base.apk"
Tested successfully on my Bandido Kernel (4.19)