You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Fix F2FS crashes on SQLite 3.21.0
This commit is contained in:
@@ -3,17 +3,28 @@ sudb_clean() {
|
||||
local DIR="/sbin/.core/db-${USERID}"
|
||||
umount -l /data/user*/*/*/databases/su.db $DIR $DIR/*
|
||||
rm -rf $DIR
|
||||
[ "$USERID" = "*" ] && rm -f /data/adb/magisk.db
|
||||
}
|
||||
|
||||
sudb_init() {
|
||||
ADB_CONTEXT=`/system/bin/ls -dZ /data/adb | awk '{print $1}'`
|
||||
chcon u:object_r:su_file:s0 /data/adb
|
||||
chmod 777 /data/adb
|
||||
}
|
||||
|
||||
sudb_restore() {
|
||||
chcon $ADB_CONTEXT /data/adb
|
||||
chmod 700 /data/adb
|
||||
}
|
||||
|
||||
sudb_setup() {
|
||||
local USER=$1
|
||||
local GLOBAL_DB=$2
|
||||
local USERID=$(($USER / 100000))
|
||||
local DIR=/sbin/.core/db-${USERID}
|
||||
touch $GLOBAL_DB
|
||||
mkdir -p $DIR
|
||||
touch $DIR/magisk.db
|
||||
mount -o bind $GLOBAL_DB $DIR/magisk.db
|
||||
mount -o bind /data/adb/magisk.db $DIR/magisk.db
|
||||
rm -f /data/adb/magisk.db-journal
|
||||
chcon u:object_r:su_file:s0 $DIR $DIR/*
|
||||
chmod 700 $DIR
|
||||
chown $USER.$USER $DIR
|
||||
|
||||
Reference in New Issue
Block a user