native: Remove custom package and cert validation

Remove support for custom/repackaged manager package names
(su_manager / repackaged_pkg) and secondary certificate verification
(repackaged_cert) from the native daemon and database.

- Remove SuManager from DbEntryKey in CXX bridge and db.rs.
- Remove unused get_db_string and rm_db_string methods from MagiskD.
- Delete check_dyn and check_stub in package.rs.
- Remove repackaged_* fields from ManagerInfo and derive Default.
- Simplify find_apk_path, get_package_uid, and get_manager to target
  APP_PACKAGE_NAME and verify against TRUSTED_CERT.
- Bump SQLite DB_VERSION to 13, drop strings table on migration, and
  remove create_strings from new database initialization.
- Remove obsolete hidden/stub app sections from FAQ documentation.

Assisted-by: Gemini 4 Argon
This commit is contained in:
topjohnwu
2026-10-22 14:06:48 -07:00
committed by John Wu
parent 7d9b0dfb3e
commit 5f2faee618
5 changed files with 34 additions and 185 deletions
+8 -8
View File
@@ -6,8 +6,8 @@
using namespace std;
#define DB_VERSION 12
#define DB_VERSION_STR "12"
#define DB_VERSION 13
#define DB_VERSION_STR "13"
// SQLite APIs
@@ -211,11 +211,6 @@ sqlite3 *open_and_init_db() {
"CREATE TABLE IF NOT EXISTS settings "
"(key TEXT, value INT, PRIMARY KEY(key))");
};
auto create_strings = [&] {
return sql_exec_impl(db.get(),
"CREATE TABLE IF NOT EXISTS strings "
"(key TEXT, value TEXT, PRIMARY KEY(key))");
};
auto create_denylist = [&] {
return sql_exec_impl(db.get(),
"CREATE TABLE IF NOT EXISTS denylist "
@@ -232,11 +227,11 @@ sqlite3 *open_and_init_db() {
// 10: remove table `logs`
// 11: remove table `hidelist` and create table `denylist` (same data structure)
// 12: rebuild table `policies` to drop column `package_name`
// 13: remove table `strings`
if (/* 0, 1, 2, 3, 4, 5, 6 */ ver <= 6) {
sql_chk_log(create_policy);
sql_chk_log(create_settings);
sql_chk_log(create_strings);
sql_chk_log(create_denylist);
// Directly jump to latest
@@ -295,6 +290,11 @@ sqlite3 *open_and_init_db() {
ver = 12;
upgrade = true;
}
if (ver == 12) {
sql_chk_log(sql_exec_impl, db.get(), "DROP TABLE IF EXISTS strings;");
ver = 13;
upgrade = true;
}
if (upgrade) {
// Set version