├── .gitattributes ├── META-INF └── com │ └── google │ └── android │ ├── update-binary │ └── updater-script ├── README.md ├── common ├── file_contexts_image ├── post-fs-data.sh ├── service.sh └── system.prop ├── config.sh ├── module.prop └── system └── priv-app └── SystemLauncher └── MiuiHome.apk /.gitattributes: -------------------------------------------------------------------------------- 1 | # Declare files that will always have LF line endings on checkout. 2 | META-INF/** text eol=lf 3 | common/** text eol=lf 4 | module.prop text eol=lf 5 | changelog.txt text eol=lf 6 | 7 | # Denote all files that are truly binary and should not be modified. 8 | system/** binary 9 | -------------------------------------------------------------------------------- /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 v19.0+! " 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 19000 ] && require_new_magisk 31 | 32 | if [ $MAGISK_VER_CODE -ge 20400 ]; then 33 | # New Magisk have complete installation logic within util_functions.sh 34 | install_module 35 | exit 0 36 | fi 37 | 38 | ################# 39 | # Legacy Support 40 | ################# 41 | 42 | TMPDIR=/dev/tmp 43 | PERSISTDIR=/sbin/.magisk/mirror/persist 44 | 45 | is_legacy_script() { 46 | unzip -l "$ZIPFILE" install.sh | grep -q install.sh 47 | return $? 48 | } 49 | 50 | print_modname() { 51 | local len 52 | len=`echo -n $MODNAME | wc -c` 53 | len=$((len + 2)) 54 | local pounds=`printf "%${len}s" | tr ' ' '*'` 55 | ui_print "$pounds" 56 | ui_print " $MODNAME " 57 | ui_print "$pounds" 58 | ui_print "*******************" 59 | ui_print " Powered by Magisk " 60 | ui_print "*******************" 61 | } 62 | 63 | # Override abort as old scripts have some issues 64 | abort() { 65 | ui_print "$1" 66 | $BOOTMODE || recovery_cleanup 67 | [ -n $MODPATH ] && rm -rf $MODPATH 68 | rm -rf $TMPDIR 69 | exit 1 70 | } 71 | 72 | rm -rf $TMPDIR 2>/dev/null 73 | mkdir -p $TMPDIR 74 | 75 | # Preperation for flashable zips 76 | setup_flashable 77 | 78 | # Mount partitions 79 | mount_partitions 80 | 81 | # Detect version and architecture 82 | api_level_arch_detect 83 | 84 | # Setup busybox and binaries 85 | $BOOTMODE && boot_actions || recovery_actions 86 | 87 | ############## 88 | # Preparation 89 | ############## 90 | 91 | # Extract prop file 92 | unzip -o "$ZIPFILE" module.prop -d $TMPDIR >&2 93 | [ ! -f $TMPDIR/module.prop ] && abort "! Unable to extract zip file!" 94 | 95 | $BOOTMODE && MODDIRNAME=modules_update || MODDIRNAME=modules 96 | MODULEROOT=$NVBASE/$MODDIRNAME 97 | MODID=`grep_prop id $TMPDIR/module.prop` 98 | MODPATH=$MODULEROOT/$MODID 99 | MODNAME=`grep_prop name $TMPDIR/module.prop` 100 | 101 | # Create mod paths 102 | rm -rf $MODPATH 2>/dev/null 103 | mkdir -p $MODPATH 104 | 105 | ########## 106 | # Install 107 | ########## 108 | 109 | if is_legacy_script; then 110 | unzip -oj "$ZIPFILE" module.prop install.sh uninstall.sh 'common/*' -d $TMPDIR >&2 111 | 112 | # Load install script 113 | . $TMPDIR/install.sh 114 | 115 | # Callbacks 116 | print_modname 117 | on_install 118 | 119 | # Custom uninstaller 120 | [ -f $TMPDIR/uninstall.sh ] && cp -af $TMPDIR/uninstall.sh $MODPATH/uninstall.sh 121 | 122 | # Skip mount 123 | $SKIPMOUNT && touch $MODPATH/skip_mount 124 | 125 | # prop file 126 | $PROPFILE && cp -af $TMPDIR/system.prop $MODPATH/system.prop 127 | 128 | # Module info 129 | cp -af $TMPDIR/module.prop $MODPATH/module.prop 130 | 131 | # post-fs-data scripts 132 | $POSTFSDATA && cp -af $TMPDIR/post-fs-data.sh $MODPATH/post-fs-data.sh 133 | 134 | # service scripts 135 | $LATESTARTSERVICE && cp -af $TMPDIR/service.sh $MODPATH/service.sh 136 | 137 | ui_print "- Setting permissions" 138 | set_permissions 139 | else 140 | print_modname 141 | 142 | unzip -o "$ZIPFILE" customize.sh -d $MODPATH >&2 143 | 144 | if ! grep -q '^SKIPUNZIP=1$' $MODPATH/customize.sh 2>/dev/null; then 145 | ui_print "- Extracting module files" 146 | unzip -o "$ZIPFILE" -x 'META-INF/*' -d $MODPATH >&2 147 | 148 | # Default permissions 149 | set_perm_recursive $MODPATH 0 0 0755 0644 150 | fi 151 | 152 | # Load customization script 153 | [ -f $MODPATH/customize.sh ] && . $MODPATH/customize.sh 154 | fi 155 | 156 | # Handle replace folders 157 | for TARGET in $REPLACE; do 158 | ui_print "- Replace target: $TARGET" 159 | mktouch $MODPATH$TARGET/.replace 160 | done 161 | 162 | if $BOOTMODE; then 163 | # Update info for Magisk Manager 164 | mktouch $NVBASE/modules/$MODID/update 165 | cp -af $MODPATH/module.prop $NVBASE/modules/$MODID/module.prop 166 | fi 167 | 168 | # Copy over custom sepolicy rules 169 | if [ -f $MODPATH/sepolicy.rule -a -e $PERSISTDIR ]; then 170 | ui_print "- Installing custom sepolicy patch" 171 | PERSISTMOD=$PERSISTDIR/magisk/$MODID 172 | mkdir -p $PERSISTMOD 173 | cp -af $MODPATH/sepolicy.rule $PERSISTMOD/sepolicy.rule 174 | fi 175 | 176 | # Remove stuffs that don't belong to modules 177 | rm -rf \ 178 | $MODPATH/system/placeholder $MODPATH/customize.sh \ 179 | $MODPATH/README.md $MODPATH/.git* 2>/dev/null 180 | 181 | ############# 182 | # Finalizing 183 | ############# 184 | 185 | cd / 186 | $BOOTMODE || recovery_cleanup 187 | rm -rf $TMPDIR 188 | 189 | ui_print "- Done" 190 | exit 0 191 | -------------------------------------------------------------------------------- /META-INF/com/google/android/updater-script: -------------------------------------------------------------------------------- 1 | #MAGISK 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MiUI System Launcher for POCO phones 2 | *Adds native System Launcher of MiUI in POCO Phones* 3 | 4 | ## Description 5 | POCO Phones including Poco F1 and POCO X2 ships POCO Launcher with their phones 6 | and doesn't include the default MiUI System Launcher that comes with the MiUI. 7 | The problem with POCO Launcher is it doesn't support many reactive animations as 8 | the default System Launcher does such as unlocked animation, gesture animations and 9 | some other animations. Poco Launcher also fails to trigger some animations after 10 | reboot until it is set to default launcher again after replacing it. Overall POCO 11 | Launcher does not integrate well with MiUI and it's outright bad. 12 | 13 | This module fixes these problems by adding the native MiUI System Launcher into the 14 | `/system/priv-app` in such phones that runs on MiUI but don't include the native launcher. 15 | 16 | ## Stats 17 | 18 | [![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2FHamza417%2FSystemLauncher&count_bg=%23FF6824&title_bg=%23555555&icon=pinboard.svg&icon_color=%23E7E7E7&title=Total+Visits&edge_flat=false)](https://hits.seeyoufarm.com) [![Release](https://img.shields.io/github/downloads/Hamza417/SystemLauncher/total?color=green&label=Total%20Downloads&logo=github)](https://github.com/Hamza417/SystemLauncher/releases) 19 | 20 | ## Instructions 21 | 22 | Download the **ZIP** from the [Releases](https://github.com/Hamza417/SystemLauncher/releases) 23 | section and install as a Magisk Module. 24 | 25 | MiUI 14 is not supported at the moment ([See #5](https://github.com/Hamza417/SystemLauncher/issues/5)). 26 | 27 | ## Notes 28 | This module doesn't add any extra modifications to the system and after installing 29 | it the launcher updates can be installed just as regular apps. 30 | 31 | ## Issues 32 | Found a problem? create an issue [here](https://github.com/Hamza417/SystemLauncher/here) 33 | -------------------------------------------------------------------------------- /common/file_contexts_image: -------------------------------------------------------------------------------- 1 | /magisk(/.*)? u:object_r:system_file:s0 2 | -------------------------------------------------------------------------------- /common/post-fs-data.sh: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | # Please don't hardcode /magisk/modname/... ; instead, please use $MODDIR/... 3 | # This will make your scripts compatible even if Magisk change its mount point in the future 4 | MODDIR=${0%/*} 5 | 6 | # This script will be executed in post-fs-data mode 7 | # More info in the main Magisk thread 8 | -------------------------------------------------------------------------------- /common/service.sh: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | # Please don't hardcode /magisk/modname/... ; instead, please use $MODDIR/... 3 | # This will make your scripts compatible even if Magisk change its mount point in the future 4 | MODDIR=${0%/*} 5 | 6 | # This script will be executed in late_start service mode 7 | # More info in the main Magisk thread 8 | -------------------------------------------------------------------------------- /common/system.prop: -------------------------------------------------------------------------------- 1 | # This file will be read by resetprop 2 | # Example: Change dpi 3 | # ro.sf.lcd_density=320 4 | -------------------------------------------------------------------------------- /config.sh: -------------------------------------------------------------------------------- 1 | ########################################################################################## 2 | # 3 | # Magisk 4 | # by topjohnwu 5 | # 6 | # This is a template zip for developers 7 | # 8 | ########################################################################################## 9 | ########################################################################################## 10 | # 11 | # Instructions: 12 | # 13 | # 1. Place your files into system folder (delete the placeholder file) 14 | # 2. Fill in your module's info into module.prop 15 | # 3. Configure the settings in this file (common/config.sh) 16 | # 4. For advanced features, add shell commands into the script files under common: 17 | # post-fs-data.sh, service.sh 18 | # 5. For changing props, add your additional/modified props into common/system.prop 19 | # 20 | ########################################################################################## 21 | 22 | ########################################################################################## 23 | # Defines 24 | ########################################################################################## 25 | 26 | # NOTE: This part has to be adjusted to fit your own needs 27 | 28 | # This will be the folder name under /magisk 29 | # This should also be the same as the id in your module.prop to prevent confusion 30 | MODID=Miui System Launcher 31 | 32 | # Set to true if you need to enable Magic Mount 33 | # Most mods would like it to be enabled 34 | AUTOMOUNT=true 35 | 36 | # Set to true if you need to load system.prop 37 | PROPFILE=false 38 | 39 | # Set to true if you need post-fs-data script 40 | POSTFSDATA=false 41 | 42 | # Set to true if you need late_start service script 43 | LATESTARTSERVICE=false 44 | 45 | ########################################################################################## 46 | # Installation Message 47 | ########################################################################################## 48 | 49 | # Set what you want to show when installing your mod 50 | 51 | print_modname() { 52 | ui_print "*******************************" 53 | ui_print " MiUI System Launcher " 54 | ui_print " for Poco F1/Poco X2 " 55 | ui_print " " 56 | ui_print " by Hamza417@xda " 57 | ui_print "*******************************" 58 | } 59 | 60 | ########################################################################################## 61 | # Replace list 62 | ########################################################################################## 63 | 64 | # List all directories you want to directly replace in the system 65 | # By default Magisk will merge your files with the original system 66 | # Directories listed here however, will be directly mounted to the correspond directory in the system 67 | 68 | # You don't need to remove the example below, these values will be overwritten by your own list 69 | # This is an example 70 | REPLACE=" 71 | /system/app/Youtube 72 | /system/priv-app/SystemUI 73 | /system/priv-app/Settings 74 | /system/framework 75 | " 76 | 77 | # Construct your own list here, it will overwrite the example 78 | # !DO NOT! remove this if you don't need to replace anything, leave it empty as it is now 79 | REPLACE=" 80 | /system/priv-app/SystemLauncher 81 | " 82 | 83 | ########################################################################################## 84 | # Permissions 85 | ########################################################################################## 86 | 87 | # NOTE: This part has to be adjusted to fit your own needs 88 | 89 | set_permissions() { 90 | # Default permissions, don't remove them 91 | set_perm_recursive $MODPATH 0 0 0755 0644 92 | 93 | # Only some special files require specific permissions 94 | # The default permissions should be good enough for most cases 95 | 96 | # Some templates if you have no idea what to do: 97 | 98 | # set_perm_recursive (default: u:object_r:system_file:s0) 99 | # set_perm_recursive $MODPATH/system/lib 0 0 0755 0644 100 | 101 | # set_perm (default: u:object_r:system_file:s0) 102 | # set_perm $MODPATH/system/bin/app_process32 0 2000 0755 u:object_r:zygote_exec:s0 103 | # set_perm $MODPATH/system/bin/dex2oat 0 2000 0755 u:object_r:dex2oat_exec:s0 104 | # set_perm $MODPATH/system/lib/libart.so 0 0 0644 105 | } 106 | -------------------------------------------------------------------------------- /module.prop: -------------------------------------------------------------------------------- 1 | id=miuisystemlauncher 2 | name=MiUI System Launcher 3 | version=v- RELEASE-4.39.5.5832-12261744 4 | versionCode=5 5 | author=Hamza Rizwan 6 | description=Systemless-ly installs Miui System Launcher in Poco F1/Poco X2 and maybe other MiUI based phones that doesn't have System Launcher pre-included 7 | -------------------------------------------------------------------------------- /system/priv-app/SystemLauncher/MiuiHome.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hamza417/SystemLauncher/dd561eb45d2c84d2c9d33c136e245c6ebce48034/system/priv-app/SystemLauncher/MiuiHome.apk --------------------------------------------------------------------------------