├── .github └── FUNDING.yml ├── LICENSE ├── META-INF └── com │ └── google │ └── android │ ├── update-binary │ └── updater-script ├── README.md ├── action.sh ├── arm64-v8a └── libmagiskpolicy.so ├── armeabi-v7a └── libmagiskpolicy.so ├── cleaner.sh ├── customize.sh ├── function.sh ├── module.prop ├── package.txt ├── post-fs-data.sh ├── sepolicy.rule ├── service.sh ├── system.prop ├── system ├── etc │ ├── default-permissions │ │ └── default-net.dinglisch.android.taskerm.xml │ ├── permissions │ │ └── privapp-net.dinglisch.android.taskerm.xml │ └── sysconfig │ │ └── config-net.dinglisch.android.taskerm.xml └── priv-app │ └── Tasker │ ├── Tasker.apk │ └── extract ├── uninstall.sh ├── x86 └── libmagiskpolicy.so └── x86_64 └── libmagiskpolicy.so /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: reiryuki # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: reiryuki # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: reiryuki # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 | custom: https://www.paypal.me/reiryuki # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 reiryuki 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /META-INF/com/google/android/update-binary: -------------------------------------------------------------------------------- 1 | #!/sbin/sh 2 | 3 | ################# 4 | # Initialization 5 | ################# 6 | 7 | umask 022 8 | 9 | # echo before loading util_functions 10 | ui_print() { echo "$1"; } 11 | 12 | require_new_magisk() { 13 | ui_print "*******************************" 14 | ui_print " Please install Magisk v20.4+! " 15 | ui_print "*******************************" 16 | exit 1 17 | } 18 | 19 | ######################### 20 | # Load util_functions.sh 21 | ######################### 22 | 23 | OUTFD=$2 24 | ZIPFILE=$3 25 | 26 | mount /data 2>/dev/null 27 | 28 | [ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk 29 | . /data/adb/magisk/util_functions.sh 30 | [ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk 31 | 32 | install_module 33 | exit 0 34 | -------------------------------------------------------------------------------- /META-INF/com/google/android/updater-script: -------------------------------------------------------------------------------- 1 | #MAGISK 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Tasker Privileged Magisk Module 2 | 3 | ## Descriptions 4 | - Fixes some unfunctional tasks and profiles in Tasker app due to restrictions in newer Android API versions like "Set Light" task, "Settings Panel" task, "Connect to WiFi" task, "Application Services" profile, and any other else. 5 | - Access some permissions through priv-app whitelist permissions instead of root permission so it can work faster. 6 | - What app is this? Tap here: https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm. Tap the "About this app" there. 7 | 8 | ## Sources 9 | - https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm 10 | - libmagiskpolicy.so: Kitsune Mask R6687BB53 11 | 12 | ## Requirements 13 | - Android 5 (SDK 21) and up 14 | - Paid Tasker app installed as user app 15 | - Magisk or KernelSU installed 16 | 17 | ## Installation Guide & Download Link 18 | - Install paid Tasker app first at Play Store: https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm 19 | - Install this module https://www.pling.com/p/1532327/ via Magisk app or KernelSU app only 20 | - If you are using KernelSU, you need to disable Unmount Modules by Default in KernelSU app settings 21 | - Reboot 22 | - If you are using KernelSU, you need to allow superuser list manually all package name listed in package.txt (and your home launcher app also) (enable show system apps) and reboot afterwards 23 | - If you are using SUList, you need to allow list manually your home launcher app (enable show system apps) and reboot afterwards 24 | 25 | ## Optionals 26 | - Global: https://t.me/ryukinotes/35 27 | 28 | ## Troubleshootings 29 | - Global: https://t.me/ryukinotes/34 30 | 31 | ## Support & Bug Report 32 | - https://t.me/ryukinotes/54 33 | - If you don't do above, issues will be closed immediately 34 | 35 | ## Channel 36 | - https://www.facebook.com/groups/taskerandroid 37 | 38 | ## Credits and Contributors 39 | - https://t.me/androidryukimodsdiscussions 40 | - You can contribute ideas about this Magisk Module here: https://t.me/androidappsportdevelopment 41 | 42 | ## Sponsors 43 | - https://t.me/ryukinotes/25 44 | 45 | ## Other 46 | - My xml projects/tasks that can be imported to your Tasker app: https://www.pling.com/p/1538840/ 47 | 48 | 49 | -------------------------------------------------------------------------------- /action.sh: -------------------------------------------------------------------------------- 1 | MODPATH=${0%/*} 2 | 3 | # info 4 | echo "- Apps caches from this module will be re-cleaned" 5 | echo " at the next boot." 6 | echo " " 7 | 8 | # rename 9 | FILE=$MODPATH/cleaner.sh 10 | if [ -f $FILE.txt ]; then 11 | mv -f $FILE.txt $FILE 12 | fi 13 | 14 | 15 | -------------------------------------------------------------------------------- /arm64-v8a/libmagiskpolicy.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reiryuki/Tasker-Privileged-Magisk-Module/33cf3c1b287503933c6a0effc4f425ff93f01515/arm64-v8a/libmagiskpolicy.so -------------------------------------------------------------------------------- /armeabi-v7a/libmagiskpolicy.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reiryuki/Tasker-Privileged-Magisk-Module/33cf3c1b287503933c6a0effc4f425ff93f01515/armeabi-v7a/libmagiskpolicy.so -------------------------------------------------------------------------------- /cleaner.sh: -------------------------------------------------------------------------------- 1 | [ ! "$MODPATH" ] && MODPATH=${0%/*} 2 | UID=`id -u` 3 | 4 | # run 5 | . $MODPATH/function.sh 6 | 7 | # cleaning 8 | remove_cache 9 | PKGS=`cat $MODPATH/package.txt` 10 | for PKG in $PKGS; do 11 | rm -rf /data/user*/"$UID"/$PKG/cache/* 12 | done 13 | 14 | 15 | -------------------------------------------------------------------------------- /customize.sh: -------------------------------------------------------------------------------- 1 | # space 2 | ui_print " " 3 | 4 | # var 5 | UID=`id -u` 6 | [ ! "$UID" ] && UID=0 7 | FIRARCH=`grep_get_prop ro.bionic.arch` 8 | SECARCH=`grep_get_prop ro.bionic.2nd_arch` 9 | ABILIST=`grep_get_prop ro.product.cpu.abilist` 10 | if [ ! "$ABILIST" ]; then 11 | ABILIST=`grep_get_prop ro.system.product.cpu.abilist` 12 | fi 13 | if [ "$FIRARCH" == arm64 ]\ 14 | && ! echo "$ABILIST" | grep -q arm64-v8a; then 15 | if [ "$ABILIST" ]; then 16 | ABILIST="$ABILIST,arm64-v8a" 17 | else 18 | ABILIST=arm64-v8a 19 | fi 20 | fi 21 | if [ "$FIRARCH" == x64 ]\ 22 | && ! echo "$ABILIST" | grep -q x86_64; then 23 | if [ "$ABILIST" ]; then 24 | ABILIST="$ABILIST,x86_64" 25 | else 26 | ABILIST=x86_64 27 | fi 28 | fi 29 | if [ "$SECARCH" == arm ]\ 30 | && ! echo "$ABILIST" | grep -q armeabi; then 31 | if [ "$ABILIST" ]; then 32 | ABILIST="$ABILIST,armeabi" 33 | else 34 | ABILIST=armeabi 35 | fi 36 | fi 37 | if [ "$SECARCH" == arm ]\ 38 | && ! echo "$ABILIST" | grep -q armeabi-v7a; then 39 | if [ "$ABILIST" ]; then 40 | ABILIST="$ABILIST,armeabi-v7a" 41 | else 42 | ABILIST=armeabi-v7a 43 | fi 44 | fi 45 | if [ "$SECARCH" == x86 ]\ 46 | && ! echo "$ABILIST" | grep -q x86; then 47 | if [ "$ABILIST" ]; then 48 | ABILIST="$ABILIST,x86" 49 | else 50 | ABILIST=x86 51 | fi 52 | fi 53 | ABILIST32=`grep_get_prop ro.product.cpu.abilist32` 54 | if [ ! "$ABILIST32" ]; then 55 | ABILIST32=`grep_get_prop ro.system.product.cpu.abilist32` 56 | fi 57 | if [ "$SECARCH" == arm ]\ 58 | && ! echo "$ABILIST32" | grep -q armeabi; then 59 | if [ "$ABILIST32" ]; then 60 | ABILIST32="$ABILIST32,armeabi" 61 | else 62 | ABILIST32=armeabi 63 | fi 64 | fi 65 | if [ "$SECARCH" == arm ]\ 66 | && ! echo "$ABILIST32" | grep -q armeabi-v7a; then 67 | if [ "$ABILIST32" ]; then 68 | ABILIST32="$ABILIST32,armeabi-v7a" 69 | else 70 | ABILIST32=armeabi-v7a 71 | fi 72 | fi 73 | if [ "$SECARCH" == x86 ]\ 74 | && ! echo "$ABILIST32" | grep -q x86; then 75 | if [ "$ABILIST32" ]; then 76 | ABILIST32="$ABILIST32,x86" 77 | else 78 | ABILIST32=x86 79 | fi 80 | fi 81 | if [ ! "$ABILIST32" ]; then 82 | [ -f /system/lib/libandroid.so ] && ABILIST32=true 83 | fi 84 | 85 | # log 86 | if [ "$BOOTMODE" != true ]; then 87 | FILE=/data/media/"$UID"/$MODID\_recovery.log 88 | ui_print "- Log will be saved at $FILE" 89 | exec 2>$FILE 90 | ui_print " " 91 | fi 92 | 93 | # optionals 94 | OPTIONALS=/data/media/"$UID"/optionals.prop 95 | if [ ! -f $OPTIONALS ]; then 96 | touch $OPTIONALS 97 | fi 98 | 99 | # debug 100 | if [ "`grep_prop debug.log $OPTIONALS`" == 1 ]; then 101 | ui_print "- The install log will contain detailed information" 102 | set -x 103 | ui_print " " 104 | fi 105 | 106 | # recovery 107 | if [ "$BOOTMODE" != true ]; then 108 | MODPATH_UPDATE=`echo $MODPATH | sed 's|modules/|modules_update/|g'` 109 | rm -f $MODPATH/update 110 | rm -rf $MODPATH_UPDATE 111 | fi 112 | 113 | # run 114 | . $MODPATH/function.sh 115 | 116 | # info 117 | MODVER=`grep_prop version $MODPATH/module.prop` 118 | MODVERCODE=`grep_prop versionCode $MODPATH/module.prop` 119 | ui_print " ID=$MODID" 120 | ui_print " Version=$MODVER" 121 | ui_print " VersionCode=$MODVERCODE" 122 | if [ "$KSU" == true ]; then 123 | ui_print " KSUVersion=$KSU_VER" 124 | ui_print " KSUVersionCode=$KSU_VER_CODE" 125 | ui_print " KSUKernelVersionCode=$KSU_KERNEL_VER_CODE" 126 | sed -i 's|#k||g' $MODPATH/post-fs-data.sh 127 | else 128 | ui_print " MagiskVersion=$MAGISK_VER" 129 | ui_print " MagiskVersionCode=$MAGISK_VER_CODE" 130 | fi 131 | ui_print " " 132 | 133 | # sdk 134 | NUM=21 135 | if [ "$API" -lt $NUM ]; then 136 | ui_print "! Unsupported SDK $API." 137 | ui_print " You have to upgrade your Android version" 138 | ui_print " at least SDK $NUM to use this module." 139 | abort 140 | else 141 | ui_print "- SDK $API" 142 | ui_print " " 143 | fi 144 | 145 | # sepolicy 146 | FILE=$MODPATH/sepolicy.rule 147 | DES=$MODPATH/sepolicy.pfsd 148 | if [ "`grep_prop sepolicy.sh $OPTIONALS`" == 1 ]\ 149 | && [ -f $FILE ]; then 150 | mv -f $FILE $DES 151 | fi 152 | 153 | # cleaning 154 | ui_print "- Cleaning..." 155 | remove_sepolicy_rule 156 | ui_print " " 157 | 158 | # function 159 | permissive_2() { 160 | sed -i 's|#2||g' $MODPATH/post-fs-data.sh 161 | } 162 | permissive() { 163 | FILE=/sys/fs/selinux/enforce 164 | SELINUX=`cat $FILE` 165 | if [ "$SELINUX" == 1 ]; then 166 | if ! setenforce 0; then 167 | echo 0 > $FILE 168 | fi 169 | SELINUX=`cat $FILE` 170 | if [ "$SELINUX" == 1 ]; then 171 | ui_print " Your device can't be turned to Permissive state." 172 | ui_print " Using Magisk Permissive mode instead." 173 | permissive_2 174 | else 175 | if ! setenforce 1; then 176 | echo 1 > $FILE 177 | fi 178 | sed -i 's|#1||g' $MODPATH/post-fs-data.sh 179 | fi 180 | else 181 | sed -i 's|#1||g' $MODPATH/post-fs-data.sh 182 | fi 183 | } 184 | 185 | # permissive 186 | if [ "`grep_prop permissive.mode $OPTIONALS`" == 1 ]; then 187 | ui_print "- Using device Permissive mode." 188 | rm -f $MODPATH/sepolicy.rule 189 | permissive 190 | ui_print " " 191 | elif [ "`grep_prop permissive.mode $OPTIONALS`" == 2 ]; then 192 | ui_print "- Using Magisk Permissive mode." 193 | rm -f $MODPATH/sepolicy.rule 194 | permissive_2 195 | ui_print " " 196 | fi 197 | 198 | # function 199 | extract_lib() { 200 | for APP in $APPS; do 201 | FILE=`find $MODPATH/system -type f -name $APP.apk` 202 | if [ -f `dirname $FILE`/extract ]; then 203 | ui_print "- Extracting..." 204 | DIR=`dirname $FILE`/lib/"$ARCHLIB" 205 | mkdir -p $DIR 206 | rm -rf $TMPDIR/* 207 | DES=lib/"$ABILIB"/* 208 | unzip -d $TMPDIR -o $FILE $DES 209 | cp -f $TMPDIR/$DES $DIR 210 | ui_print " " 211 | fi 212 | done 213 | } 214 | 215 | # extract 216 | APPS="`ls $MODPATH/system/priv-app` 217 | `ls $MODPATH/system/app`" 218 | ARCHLIB=arm64 219 | ABILIB=arm64-v8a 220 | extract_lib 221 | ARCHLIB=arm 222 | if echo "$ABILIST" | grep -q armeabi-v7a; then 223 | ABILIB=armeabi-v7a 224 | extract_lib 225 | elif echo "$ABILIST" | grep -q armeabi; then 226 | ABILIB=armeabi 227 | extract_lib 228 | else 229 | ABILIB=armeabi-v7a 230 | extract_lib 231 | fi 232 | ARCHLIB=x64 233 | ABILIB=x86_64 234 | extract_lib 235 | ARCHLIB=x86 236 | ABILIB=x86 237 | extract_lib 238 | rm -f `find $MODPATH/system -type f -name extract` 239 | 240 | # function 241 | copy_odex() { 242 | DIR=`find /data/adb/modules/"$MODID"/system -type d -name "$APP"` 243 | ui_print "- Current app versionCode: $CURRENT" 244 | ui_print " New app versionCode: $NEW" 245 | if [ "$CURRENT" == "$NEW" ]; then 246 | if [ -f $DIR/oat/$APP.odex ]; then 247 | ui_print " Copying oat..." 248 | cp -rf $DIR/oat $MODPATH/$DIR 249 | elif [ -f $DIR/odex/$APP.odex ]; then 250 | ui_print " Copying odex..." 251 | cp -rf $DIR/odex $MODPATH/$DIR 252 | elif [ -f $DIR/$APP.odex ]; then 253 | ui_print " Copying odex..." 254 | cp -f $DIR/$APP.odex $MODPATH/$DIR 255 | fi 256 | fi 257 | ui_print " " 258 | } 259 | install_apk() { 260 | FILE=`find $MODPATH/system -type f -name $APP.apk` 261 | if [ "$CURRENT" -lt "$NEW" ] || [ ! "$CURRENT" ]; then 262 | ui_print "- Installing $APP as a user app and granting all" 263 | ui_print " runtime permissions..." 264 | ui_print " This will keep the app installed even you disable" 265 | ui_print " or uninstall the module." 266 | pm install -g -i com.android.vending $FILE 267 | ui_print " " 268 | fi 269 | } 270 | 271 | # install 272 | APP=Tasker 273 | PKG=net.dinglisch.android.taskerm 274 | NEW=5409 275 | if [ "$BOOTMODE" == true ]; then 276 | CURRENT=`pm list packages --show-versioncode | grep $PKG | sed "s|package:$PKG versionCode:||g"` 277 | copy_odex 278 | install_apk 279 | fi 280 | 281 | # power save 282 | PKGS=`cat $MODPATH/package.txt` 283 | FILE=$MODPATH/system/etc/sysconfig/* 284 | if [ "`grep_prop power.save $OPTIONALS`" == 1 ]; then 285 | ui_print "- $MODNAME will not be allowed in power save." 286 | ui_print " It may save your battery but decreasing $MODNAME performance." 287 | for PKG in $PKGS; do 288 | sed -i "s|||g" $FILE 289 | sed -i "s|||g" $FILE 290 | done 291 | ui_print " " 292 | fi 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | -------------------------------------------------------------------------------- /function.sh: -------------------------------------------------------------------------------- 1 | # function 2 | remove_cache() { 3 | FILES=`find $MODPATH -type f -name *.apk | sed 's|.apk||g'` 4 | APPS=`for FILE in $FILES; do basename $FILE; done` 5 | for APP in $APPS; do 6 | rm -f `find /data/system/package_cache\ 7 | /data/dalvik-cache /data/resource-cache\ 8 | -type f -name *$APP*` 9 | done 10 | } 11 | remove_sepolicy_rule() { 12 | rm -rf /metadata/magisk/"$MODID"\ 13 | /mnt/vendor/persist/magisk/"$MODID"\ 14 | /persist/magisk/"$MODID"\ 15 | /data/unencrypted/magisk/"$MODID"\ 16 | /cache/magisk/"$MODID"\ 17 | /cust/magisk/"$MODID" 18 | } 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /module.prop: -------------------------------------------------------------------------------- 1 | id=TaskerPrivileged 2 | name=Tasker Privileged 3 | version=v2.16 4 | versionCode=26 5 | author=Rei Ryuki the Fixer 6 | description=Fixes some missing functionalities of Tasker app due to restrictions in newer Android API versions. 7 | 8 | 9 | -------------------------------------------------------------------------------- /package.txt: -------------------------------------------------------------------------------- 1 | net.dinglisch.android.taskerm 2 | -------------------------------------------------------------------------------- /post-fs-data.sh: -------------------------------------------------------------------------------- 1 | mount -o rw,remount /data 2 | MODPATH=${0%/*} 3 | 4 | # log 5 | exec 2>$MODPATH/debug-pfsd.log 6 | set -x 7 | 8 | # var 9 | ABI=`getprop ro.product.cpu.abi` 10 | 11 | # function 12 | permissive() { 13 | if [ "$SELINUX" == Enforcing ]; then 14 | if ! setenforce 0; then 15 | echo 0 > /sys/fs/selinux/enforce 16 | fi 17 | fi 18 | } 19 | magisk_permissive() { 20 | if [ "$SELINUX" == Enforcing ]; then 21 | if [ -x "`command -v magiskpolicy`" ]; then 22 | magiskpolicy --live "permissive *" 23 | else 24 | $MODPATH/$ABI/libmagiskpolicy.so --live "permissive *" 25 | fi 26 | fi 27 | } 28 | sepolicy_sh() { 29 | if [ -f $FILE ]; then 30 | if [ -x "`command -v magiskpolicy`" ]; then 31 | magiskpolicy --live --apply $FILE 2>/dev/null 32 | else 33 | $MODPATH/$ABI/libmagiskpolicy.so --live --apply $FILE 2>/dev/null 34 | fi 35 | fi 36 | } 37 | 38 | # selinux 39 | SELINUX=`getenforce` 40 | chmod 0755 $MODPATH/*/libmagiskpolicy.so 41 | #1permissive 42 | #2magisk_permissive 43 | #kFILE=$MODPATH/sepolicy.rule 44 | #ksepolicy_sh 45 | FILE=$MODPATH/sepolicy.pfsd 46 | sepolicy_sh 47 | 48 | # cleaning 49 | FILE=$MODPATH/cleaner.sh 50 | if [ -f $FILE ]; then 51 | . $FILE 52 | mv -f $FILE $FILE.txt 53 | fi 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /sepolicy.rule: -------------------------------------------------------------------------------- 1 | # debug 2 | allow system_server system_file file write 3 | 4 | # context 5 | create { system_lib_file vendor_file vendor_configs_file } 6 | allow { system_file system_lib_file vendor_file vendor_configs_file } labeledfs filesystem associate 7 | allow init { system_file system_lib_file vendor_file vendor_configs_file } { dir file } relabelfrom 8 | 9 | # file 10 | allow system_server { sdcardfs vfat fuse } file { read write getattr } 11 | allow { system_app priv_app platform_app untrusted_app_29 untrusted_app_27 untrusted_app } { sysfs_leds vendor_file } file { read getattr } 12 | allow { system_app priv_app platform_app untrusted_app_29 untrusted_app_27 untrusted_app } apk_data_file file setattr 13 | allow { system_app priv_app platform_app untrusted_app_29 untrusted_app_27 untrusted_app } proc_filesystems file read 14 | allow magisk_client vendor_file file { read getattr } 15 | 16 | # dir 17 | allow { system_app priv_app platform_app untrusted_app_29 untrusted_app_27 untrusted_app } { sysfs_leds sysfs rootfs } dir { read open } 18 | allow magisk_client { vendor_file system_data_file } dir read 19 | allow hal_wifi_default vendor_tombstone_data_file dir { search read open } 20 | 21 | 22 | -------------------------------------------------------------------------------- /service.sh: -------------------------------------------------------------------------------- 1 | MODPATH=${0%/*} 2 | 3 | # log 4 | exec 2>$MODPATH/debug.log 5 | set -x 6 | 7 | # var 8 | API=`getprop ro.build.version.sdk` 9 | 10 | # wait 11 | until [ "`getprop sys.boot_completed`" == 1 ]; do 12 | sleep 10 13 | done 14 | 15 | # list 16 | PKGS="`cat $MODPATH/package.txt` 17 | net.dinglisch.android.taskerm:playcore_missing_splits_activity" 18 | for PKG in $PKGS; do 19 | magisk --denylist rm $PKG 2>/dev/null 20 | magisk --sulist add $PKG 2>/dev/null 21 | done 22 | if magisk magiskhide sulist; then 23 | for PKG in $PKGS; do 24 | magisk magiskhide add $PKG 25 | done 26 | else 27 | for PKG in $PKGS; do 28 | magisk magiskhide rm $PKG 29 | done 30 | fi 31 | 32 | # grant 33 | PKG=net.dinglisch.android.taskerm 34 | pm grant $PKG android.permission.READ_EXTERNAL_STORAGE 35 | pm grant $PKG android.permission.WRITE_EXTERNAL_STORAGE 36 | if [ "$API" -ge 29 ]; then 37 | pm grant $PKG android.permission.ACCESS_MEDIA_LOCATION 2>/dev/null 38 | appops set $PKG ACCESS_MEDIA_LOCATION allow 39 | fi 40 | if [ "$API" -ge 33 ]; then 41 | pm grant $PKG android.permission.READ_MEDIA_AUDIO 42 | pm grant $PKG android.permission.READ_MEDIA_VIDEO 43 | pm grant $PKG android.permission.READ_MEDIA_IMAGES 44 | pm grant $PKG android.permission.POST_NOTIFICATIONS 45 | appops set $PKG ACCESS_RESTRICTED_SETTINGS allow 46 | fi 47 | appops set $PKG LEGACY_STORAGE allow 48 | appops set $PKG READ_EXTERNAL_STORAGE allow 49 | appops set $PKG WRITE_EXTERNAL_STORAGE allow 50 | appops set $PKG READ_MEDIA_AUDIO allow 51 | appops set $PKG READ_MEDIA_VIDEO allow 52 | appops set $PKG READ_MEDIA_IMAGES allow 53 | appops set $PKG WRITE_MEDIA_AUDIO allow 54 | appops set $PKG WRITE_MEDIA_VIDEO allow 55 | appops set $PKG WRITE_MEDIA_IMAGES allow 56 | if [ "$API" -ge 30 ]; then 57 | appops set $PKG MANAGE_EXTERNAL_STORAGE allow 58 | appops set $PKG NO_ISOLATED_STORAGE allow 59 | appops set $PKG AUTO_REVOKE_PERMISSIONS_IF_UNUSED ignore 60 | fi 61 | if [ "$API" -ge 31 ]; then 62 | appops set $PKG MANAGE_MEDIA allow 63 | fi 64 | if [ "$API" -ge 34 ]; then 65 | appops set $PKG READ_MEDIA_VISUAL_USER_SELECTED allow 66 | fi 67 | appops set $PKG TAKE_AUDIO_FOCUS allow 68 | appops set $PKG SYSTEM_ALERT_WINDOW allow 69 | appops set $PKG GET_USAGE_STATS allow 70 | appops set $PKG TURN_SCREEN_ON allow 71 | appops set $PKG MANAGE_ONGOING_CALLS allow 72 | if [ "$API" -ge 35 ]; then 73 | appops set $PKG RECEIVE_SENSITIVE_NOTIFICATIONS allow 74 | fi 75 | PKGOPS=`appops get $PKG` 76 | UID=`dumpsys package $PKG 2>/dev/null | grep -m 1 Id= | sed -e 's| userId=||g' -e 's| appId=||g'` 77 | if [ "$UID" ] && [ "$UID" -gt 9999 ]; then 78 | appops set --uid "$UID" LEGACY_STORAGE allow 79 | appops set --uid "$UID" READ_EXTERNAL_STORAGE allow 80 | appops set --uid "$UID" WRITE_EXTERNAL_STORAGE allow 81 | if [ "$API" -ge 29 ]; then 82 | appops set --uid "$UID" ACCESS_MEDIA_LOCATION allow 83 | fi 84 | if [ "$API" -ge 34 ]; then 85 | appops set --uid "$UID" READ_MEDIA_VISUAL_USER_SELECTED allow 86 | fi 87 | UIDOPS=`appops get --uid "$UID"` 88 | fi 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /system.prop: -------------------------------------------------------------------------------- 1 | # prevent bootloop 2 | ro.control_privapp_permissions=log 3 | -------------------------------------------------------------------------------- /system/etc/default-permissions/default-net.dinglisch.android.taskerm.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /system/etc/permissions/privapp-net.dinglisch.android.taskerm.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /system/etc/sysconfig/config-net.dinglisch.android.taskerm.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /system/priv-app/Tasker/Tasker.apk: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /system/priv-app/Tasker/extract: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /uninstall.sh: -------------------------------------------------------------------------------- 1 | mount -o rw,remount /data 2 | [ ! "$MODPATH" ] && MODPATH=${0%/*} 3 | [ ! "$MODID" ] && MODID=`basename "$MODPATH"` 4 | UID=`id -u` 5 | [ ! "$UID" ] && UID=0 6 | 7 | # log 8 | exec 2>/data/adb/$MODID\_uninstall.log 9 | set -x 10 | 11 | # run 12 | . $MODPATH/function.sh 13 | 14 | # cleaning 15 | remove_cache 16 | remove_sepolicy_rule 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /x86/libmagiskpolicy.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reiryuki/Tasker-Privileged-Magisk-Module/33cf3c1b287503933c6a0effc4f425ff93f01515/x86/libmagiskpolicy.so -------------------------------------------------------------------------------- /x86_64/libmagiskpolicy.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reiryuki/Tasker-Privileged-Magisk-Module/33cf3c1b287503933c6a0effc4f425ff93f01515/x86_64/libmagiskpolicy.so --------------------------------------------------------------------------------