├── .github
├── FUNDING.yml
└── workflows
│ └── main.yml
├── .gitignore
├── README.md
├── files.txt
├── module
├── META-INF
│ └── com
│ │ └── google
│ │ └── android
│ │ ├── update-binary
│ │ └── updater-script
├── QuickSwitch.apk
├── common
│ ├── aapt2_arm64-v8a
│ ├── aapt2_armeabi-v7a
│ ├── aapt2_x86
│ └── aapt2_x86_64
├── customize.sh
├── overlays
│ ├── AndroidManifest.xml
│ └── overlay
│ │ └── values
│ │ └── bools.xml
├── quickswitch
├── sepolicy.rule
├── service.sh
├── system.prop
├── system
│ └── placeholder
├── uninstall.sh
├── zipsigner
└── zipsigner-3.0-dexed.jar
├── release.sh
├── webui
├── CHANGELOG.md
├── module.prop
├── update.json
└── webroot
│ ├── index.html
│ ├── modules
│ ├── dashboard.js
│ ├── exec.js
│ ├── kernelsu.js
│ ├── launchers.js
│ ├── loader.js
│ ├── navbar.js
│ └── process.js
│ ├── scripts
│ └── genQuickstepList.sh
│ └── style.css
└── withoutui
├── CHANGELOG.md
├── module.prop
└── update.json
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: [Skittles9823]
4 | patreon: # Replace with a single Patreon username
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: # 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: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | otechie: # Replace with a single Otechie username
12 | custom: ['paypal.me/Skittles2398', 'paypal.me/Paphonb']
13 |
--------------------------------------------------------------------------------
/.github/workflows/main.yml:
--------------------------------------------------------------------------------
1 | name: CI
2 |
3 | on: [push]
4 |
5 | jobs:
6 | build:
7 | runs-on: ubuntu-latest
8 |
9 | steps:
10 | - name: Checkout
11 | uses: actions/checkout@v4
12 |
13 | - name: Rebuild apk
14 | if: endsWith(github.ref, '/master')
15 | env:
16 | DRONE_SERVER: ${{ secrets.DRONE_SERVER }}
17 | DRONE_TOKEN: ${{ secrets.DRONE_TOKEN }}
18 | DRONE_REPO: ${{ secrets.DRONE_REPO }}
19 | run: |
20 | bash ./restartbuild.sh
21 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.zip
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # QuickSwitch fork
2 |
3 | This is a fork of QuickSwitch.
4 | QuickSwitch is a Magisk/KernelSU/Apatch module which systemlessly allows supported launchers to access the recents (QuickStep) APIs.
5 |
6 | To learn about the original, see [here](https://github.com/skittles9823/QuickSwitch).
7 | Also, please do not report bugs in forked versions upstream.
8 |
9 | ## Requirements:
10 |
11 | - Latest version of Magisk or KernelSU or Apatch
12 | - Android 9+
13 |
14 | ## ⚠Warning⚠
15 | This module operates the system using Root privileges.
16 | Please use it with extreme caution.
17 | Also, many users in the Telegram community have encountered trouble without reading the Readme.
18 | Please read the Readme carefully before using this module.
19 |
20 | This is not limited to this module,
21 | When you operate the system, you need to understand how to use it and manage the risk.
22 |
23 | ## Installation:
24 |
25 | ## Magisk/KSU/APatch:
26 | 1. Install the latest QuickSwitch zip from the [GitHub releases](https://github.com/j7b3y/QuickSwitch/releases/latest).
27 | 2. `su -c /data/adb/modules/quickswitch/quickswitch --ch=launcher.package.name`
28 | 3. Reboot.
29 | 4. Verify your new recents provider is correct.
30 | 5. Set the new recents provider as the default launcher.
31 | 6. Profit.
32 |
33 | ※ Please run it in a terminal application (termux, etc.) with root access.
34 | ※ Replace launcher.package.name with the name of your launcher. For example app.lawnchair.debug.
35 |
36 | ## Web Interface
37 | This is not complete but may help users who are having trouble with command line operations.
38 | If you are a magisk user, you will need the following apps.
39 | - [KsuWebUIStandalone](https://github.com/5ec1cff/KsuWebUIStandalone)
40 |
41 | ## Support:
42 | If you encounter any problems, you may find some hints in the github issues or [Telegram Group](https://t.me/QuickstepSwitcherSupport).
43 |
44 | ## Branches
45 | - master
46 | Original source.
47 | - anyfix/*
48 | It was to be used for pull requests.
49 | - WIP/*
50 | With incomplete new elements.
--------------------------------------------------------------------------------
/files.txt:
--------------------------------------------------------------------------------
1 | common*
2 | META-INF*
3 | overlays*
4 | system*
5 | customize.sh
6 | quickswitch
7 | QuickSwitch.apk
8 | sepolicy.rule
9 | service.sh
10 | system.prop
11 | uninstall.sh
12 | zipsigner
13 | zipsigner-3.0-dexed.jar
--------------------------------------------------------------------------------
/module/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 |
--------------------------------------------------------------------------------
/module/META-INF/com/google/android/updater-script:
--------------------------------------------------------------------------------
1 | #MAGISK
2 |
--------------------------------------------------------------------------------
/module/QuickSwitch.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/j7b3y/QuickSwitch/7f08bdbca7075c5ae29848c885808c5f82db402f/module/QuickSwitch.apk
--------------------------------------------------------------------------------
/module/common/aapt2_arm64-v8a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/j7b3y/QuickSwitch/7f08bdbca7075c5ae29848c885808c5f82db402f/module/common/aapt2_arm64-v8a
--------------------------------------------------------------------------------
/module/common/aapt2_armeabi-v7a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/j7b3y/QuickSwitch/7f08bdbca7075c5ae29848c885808c5f82db402f/module/common/aapt2_armeabi-v7a
--------------------------------------------------------------------------------
/module/common/aapt2_x86:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/j7b3y/QuickSwitch/7f08bdbca7075c5ae29848c885808c5f82db402f/module/common/aapt2_x86
--------------------------------------------------------------------------------
/module/common/aapt2_x86_64:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/j7b3y/QuickSwitch/7f08bdbca7075c5ae29848c885808c5f82db402f/module/common/aapt2_x86_64
--------------------------------------------------------------------------------
/module/customize.sh:
--------------------------------------------------------------------------------
1 | SKIPUNZIP=1
2 | # @Skittles9823 made this ascii and is way to proud of it
3 | ui_print " "
4 | ui_print " _____ "
5 | ui_print " __ | | __ "
6 | ui_print " | || || | "
7 | ui_print " | || || | "
8 | ui_print " |__|| ||__| "
9 | ui_print " |_____| "
10 | ui_print " QuickSwitch "
11 | ui_print " "
12 | ui_print " The Lawnchair Team"
13 | ui_print " "
14 |
15 | [ $BOOTMODE == "false" ] && abort "Installation failed! QuickSwitch must be installed via Magisk/KernelSU Manager!"
16 | [ $API -lt "28" ] && abort "QuickSwitch is for Android Pie+ only"
17 |
18 | VEN=/system/vendor
19 | [ -L /system/vendor ] && VEN=/vendor
20 | if [ -f $VEN/build.prop ]; then BUILDS="/system/build.prop $VEN/build.prop"; else BUILDS="/system/build.prop"; fi
21 | # Thanks Narsil/Sauron for the huge props list for various android systems
22 | # Far easier to look there then ask users for their build.props
23 | MIUI=$(grep "ro.miui.ui.version.*" $BUILDS)
24 | if [ $MIUI ] && [ $API -lt "30" ]; then
25 | ui_print " MIUI 12 or lower is not supported"
26 | abort " Aborting..."
27 | fi
28 | ui_print "- Extracting module files"
29 |
30 | unzip -o "$ZIPFILE" 'overlays/*' 'system/*' 'common/*' 'module.prop' 'system.prop' 'sepolicy.rule' 'zipsigner*' 'uninstall.sh' 'quickswitch' 'service.sh' 'webroot/*' -d $MODPATH >&2
31 | chmod +x $MODPATH/common/*
32 |
33 | AAPT2=aapt2_$(getprop ro.product.cpu.abi)
34 | cp -af $MODPATH/common/$AAPT2 $MODPATH/aapt2 || abort "Unsupported Arch!"
35 | rm -rf $MODPATH/common
36 | rm -rf /data/adb/service.d/quickswitch.sh
37 | rm -rf /data/adb/service.d/quickswitch-service.sh
38 | rm -rf /data/adb/post-fs-data.d/quickswitch-post.sh
39 |
40 | # Custom install stuffs
41 | rm -rf /data/resource-cache/overlays.list
42 | find /data/resource-cache/ -name "*QuickstepSwitcherOverlay*" -exec rm -rf {} \;
43 | find /data/resource-cache/ -name "*QuickSwitchOverlay*" -exec rm -rf {} \;
44 | MODULEDIR="/data/adb/modules/$MODID"
45 | MODVER=$(grep_prop versionCode $MODULEDIR/module.prop)
46 |
47 | # Check for root solution
48 | if [ -z "$KSU" ]; then
49 | sed -i "/KSU=true*/d" $MODPATH/quickswitch
50 | fi
51 |
52 | if [ -z "$APATCH" ]; then
53 | sed -i "/APATCH=true*/d" $MODPATH/quickswitch
54 | fi
55 |
56 | if [ -n "$KSU" ] || [ -n "$APATCH" ]; then
57 | NOAPK=true
58 | ln -s $(which busybox) $MODPATH/busybox
59 | if ( [ -n "$KSU" ] && [ -e "/data/adb/ksu/modules.img" ] ) || ( [ -n "$APATCH" ] && [ -z "$APATCH_BIND_MOUNT" ] ) ; then
60 | sed -i "/MAGIC_MOUNT=true*/d" $MODPATH/quickswitch
61 | fi
62 | else
63 | ln -s /data/adb/magisk/busybox $MODPATH/busybox
64 | fi
65 |
66 |
67 | if [ -z "$NOAPK" ]; then
68 | unzip -o "$ZIPFILE" 'QuickSwitch.apk' -d /data/local/tmp >&2
69 | ui_print "- installing QuickSwitch.apk"
70 | pm install -r "/data/local/tmp/QuickSwitch.apk"
71 | rm -rf /data/local/tmp/QuickSwitch.apk
72 | fi
73 |
74 | rm -rf /data/adb/modules/quickstepswitcher # yeet old module dir
75 |
76 | if [ -d $MODULEDIR ]; then
77 | if [ $MODVER -ge 3300 ]; then # Been a minute since we've made people clean the install dir, prolly should do it now
78 | ui_print "- Module updating - retaining current provider"
79 | for i in $(find $MODULEDIR/system/* -type d -maxdepth 0); do
80 | cp -rf "$i" $MODPATH/system/
81 | done
82 | else
83 | for i in $(find $MODULEDIR/* -maxdepth 0 | sed "/^module.prop/ d"); do
84 | rm -rf "$i"
85 | done
86 | ui_print "- Major upgrade! clearing out all old files and directories."
87 | fi
88 | fi
89 |
90 | # Nobody reads it anyway Sadge
91 |
92 | set_perm_recursive $MODPATH 0 0 0755 0644
93 | set_perm $MODPATH/aapt2 2000 2000 0755
94 | set_perm $MODPATH/busybox 2000 2000 0755
95 | set_perm $MODPATH/quickswitch 2000 2000 0777
96 | set_perm $MODPATH/zipsigner 0 0 0755
97 | set_perm $MODPATH/zipsigner-3.0-dexed.jar 0 0 0644
98 |
--------------------------------------------------------------------------------
/module/overlays/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/module/overlays/overlay/values/bools.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | true
4 | true
5 |
--------------------------------------------------------------------------------
/module/quickswitch:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 | # Terminal Magisk Mod Template
3 | # by veez21 @ xda-developers
4 | # Slimmed down for use as an app backend by @Skittles9823
5 |
6 | # Module ID
7 | ID="quickswitch"
8 |
9 | # Mod Directory
10 | MODDIR=${0%/*}
11 |
12 | KSU=true # removed during install if false
13 | APATCH=true # removed during install if false
14 | MAGIC_MOUNT=true # removed during install if false
15 |
16 | if [ "$APATCH" ]; then
17 | APATCH_VER=$(cat /data/adb/ap/version)
18 | fi
19 |
20 | BBDIR="$MODDIR/busybox"
21 |
22 | cd $MODDIR
23 |
24 | # Set Log Files
25 | mkdir -p $MODDIR/logs
26 | # > Verbose output goes here
27 | VERLOG=$MODDIR/logs/$ID-verbose.log
28 | oldVERLOG=$MODDIR/logs/$ID-verbose-old.log
29 |
30 | # Start Logging verbosely
31 | mv -f $VERLOG $oldVERLOG 2>/dev/null
32 | mv -f $LOG $oldLOG 2>/dev/null
33 | set -x 2>$VERLOG
34 |
35 | ########
36 | # Main #
37 | ########
38 | API=$(getprop ro.build.version.sdk)
39 | PATH="$BBDIR:/sbin/:$PATH"
40 | alias aapt2='$MODDIR/aapt2'
41 | alias sign='$MODDIR/zipsigner'
42 | OVERLAYDIR=$MODDIR/overlays
43 | RAND=$(echo $RANDOM | sed -r 's|^(...).*|\1|')
44 | DID_MOUNT_RW=
45 | defaultlauncherPackage=$(aapt2 d strings /system/framework/framework-res.apk | grep -m 1 "com.android.quickstep.RecentsActivity" | awk '{ print $3 }' | sed "s|/.*||")
46 | defaultlauncherPath=$(grep -m1 -E "$defaultlauncherPackage.*codePath.*app" /data/system/packages.xml | sed -r "s/.*codePath=(.*)/\1/; s/\"//g" | awk '{ print $1 }')
47 | if [ ! $(echo $defaultlauncherPath | grep "/system/") ]; then
48 | defaultlauncherPath="/system${defaultlauncherPath}"
49 | fi
50 |
51 | abort() {
52 | echo "qsError: $1"
53 | }
54 |
55 | abortexit() {
56 | echo "qsError: $1"
57 | get_logs
58 | exit 1
59 | }
60 |
61 | # Functions to check if dirs is mounted
62 | is_mounted() {
63 | grep " $(readlink -f $1) " /proc/mounts 2>/dev/null
64 | return $?
65 | }
66 |
67 | is_mounted_rw() {
68 | grep " $(readlink -f $1) " /proc/mounts | grep " rw," 2>/dev/null
69 | return $?
70 | }
71 |
72 | mount_rw() {
73 | mount -o remount,rw $1
74 | DID_MOUNT_RW=$1
75 | }
76 |
77 | unmount_rw() {
78 | if [ "x$DID_MOUNT_RW" = "x$1" ]; then
79 | mount -o remount,ro $1
80 | fi
81 | }
82 |
83 | set_perms() {
84 | echo "\nSetting permissions..."
85 | chmod 644 $STEPDIR/*
86 | chown 0:2000 $STEPDIR
87 | if [ ! "$1" == "com.android.systemui" ]; then
88 | chmod 755 $MODDIR/system/etc/
89 | chmod 644 $PERMISSIONXMLDIR/*
90 | chmod 644 $WHITELISTXMLDIR/*
91 | chmod 755 $SYSTEMIZE_TARGET/*
92 | chmod 644 $SYSTEMIZE_TARGET/*/*
93 | fi
94 | }
95 |
96 | get_logs() {
97 | echo "$(cmd overlay dump)" >$MODDIR/logs/$ID-overlays.log
98 | echo "---Device Info---" >$MODDIR/logs/$ID-vars.log
99 | grep "^ro.product.device[^#]" /system/build.prop |
100 | sed 's/ro.product.device/DeviceCode/g' >>$MODDIR/logs/$ID-vars.log
101 | grep "^ro.product.model[^#]" /system/build.prop |
102 | sed 's/ro.product.model/DeviceName/g' >>$MODDIR/logs/$ID-vars.log
103 | grep "^ro.build.type[^#]" /system/build.prop |
104 | sed 's/ro.build.type/BuildType/g' >>$MODDIR/logs/$ID-vars.log
105 | grep "^ro.build.version.security_patch[^#]" /system/build.prop |
106 | sed 's/ro.build.version.security_patch/SecurityPatch/g' \
107 | >>$MODDIR/logs/$ID-vars.log
108 | grep "^ro.product.cpu.abilist[^#]" /system/build.prop |
109 | sed 's/ro.product.cpu.abilist/Arch/g' >>$MODDIR/logs/$ID-vars.log
110 | grep "^ro.build.version.sdk[^#]" /system/build.prop |
111 | sed 's/ro.build.version.sdk/APIVer/g' >>$MODDIR/logs/$ID-vars.log
112 | grep "^ro.build.flavor[^#]" /system/build.prop |
113 | sed 's/ro.build.flavor/BuildFlavor/g' >>$MODDIR/logs/$ID-vars.log
114 | echo "\n---ROM Info---" >>$MODDIR/logs/$ID-vars.log
115 | grep "^ro.build.host[^#]" /system/build.prop |
116 | sed 's/ro.build.host/Host/g' >>$MODDIR/logs/$ID-vars.log
117 | grep "^ro.*.device[^#]" /system/build.prop >>$MODDIR/logs/$ID-vars.log
118 | echo -e "\n---Variables---" >>$MODDIR/logs/$ID-vars.log
119 | (
120 | set -o posix
121 | set
122 | ) >>$MODDIR/logs/$ID-vars.log
123 | if [ -z "$KSU" ] && [ -z "$APATCH" ]; then
124 | echo -e "\n---Magisk Version---" >>$MODDIR/logs/$ID-vars.log
125 | echo $(grep "MAGISK_VER_CODE=" /data/adb/magisk/util_functions.sh |
126 | sed "s/MAGISK_VER_CODE/MagiskVersion/") >>$MODDIR/logs/$ID-vars.log
127 | elif [ "$APATCH" ]; then
128 | echo -e "\n---APATCH Version---\nAPVersion=$APATCH_VER" >>$MODDIR/logs/$ID-vars.log
129 | else
130 | echo -e "\n---KSU Version---\nKSUVersion=$KSU_VER" >>$MODDIR/logs/$ID-vars.log
131 | fi
132 | echo -e "\n---Module Version---" >>$MODDIR/logs/$ID-vars.log
133 | echo $(grep "versionCode=" $MODDIR/module.prop) >>$MODDIR/logs/$ID-vars.log
134 | find $MODDIR >$MODDIR/logs/find.log
135 |
136 | rm -rf /storage/emulated/0/Documents/$ID/*
137 | mkdir -p /storage/emulated/0/Documents/$ID
138 | cp -rf $MODDIR/logs/* /storage/emulated/0/Documents/$ID/
139 | echo "\nLogs copied to /sdcard/Documents/$ID..."
140 | }
141 |
142 | setvars() {
143 | if [ -z "$MAGIC_MOUNT" ]; then
144 | STEPDIRPREFIX=$MODDIR
145 | else
146 | STEPDIRPREFIX=$MODDIR/system
147 | fi
148 | SUFFIX="/overlay/QuickSwitchOverlay"
149 | if [ "$API" -ge 29 ]; then
150 | STEPDIR=$STEPDIRPREFIX/product$SUFFIX
151 | case "$(getprop ro.product.brand) $(getprop ro.product.manufacturer)" in
152 | *samsung*)
153 | if [ ! -d /product/overlay ]; then
154 | STEPDIR=$STEPDIRPREFIX/vendor$SUFFIX
155 | fi
156 | ;;
157 | *OnePlus*)
158 | if [ "$API" -ge 31 ]; then
159 | if [ -d /system_ext/oplus ]; then
160 | STEPDIR=$STEPDIRPREFIX/vendor$SUFFIX
161 | else
162 | STEPDIR=$STEPDIRPREFIX/product$SUFFIX
163 | fi
164 | fi
165 | ;;
166 | *)
167 | PRODUCT=true
168 | if [ -z "$KSU" ] && [ -z "$APATCH" ]; then
169 | # Yay, magisk supports bind mounting /product now
170 | MAGISK_VER_CODE=$(grep "MAGISK_VER_CODE=" /data/adb/magisk/util_functions.sh | awk -F = '{ print $2 }')
171 | if [ $MAGISK_VER_CODE -ge "20000" ]; then
172 | STEPDIR=$STEPDIRPREFIX/product$SUFFIX
173 | else
174 | abort "Magisk v20 is required for users on Android 10"
175 | abortexit "Please update Magisk and try again."
176 | fi
177 | else
178 | STEPDIR=$STEPDIRPREFIX/product$SUFFIX
179 | fi
180 | ;;
181 | esac
182 | else
183 | SUFFIX="/overlay"
184 | if [ -d /oem/OP -o -d /OP ]; then
185 | case "$(getprop ro.product.manufacturer)" in
186 | LGE)
187 | OEM=true
188 | mkdir -p $MODDIR/$defaultlauncherPath
189 | touch $MODDIR/$defaultlauncherPath/.replace
190 | if [ -d /oem/OP ]; then
191 | STEPDIR=/oem/OP/OPEN_*/overlay/framework
192 | is_mounted " /oem" || mount /oem
193 | is_mounted_rw " /oem" || mount_rw /oem
194 | is_mounted " /oem/OP" || mount /oem/OP
195 | is_mounted_rw " /oem/OP" || mount_rw /oem/OP
196 | elif [ -d /OP ]; then
197 | STEPDIR=/OP/OPEN_*/overlay/framework
198 | is_mounted " /OP" || mount /OP
199 | is_mounted_rw " /OP" || mount_rw /OP
200 | fi
201 | # globs don't like to be quoted so we have to set the variable again without quotes first.
202 | STEPDIR=$STEPDIR
203 | ;;
204 | esac
205 | else
206 | PRODUCT=
207 | OEM=
208 | STEPDIR=$STEPDIRPREFIX/vendor$SUFFIX
209 | fi
210 | fi
211 |
212 | # Assign misc variables
213 | PERMISSIONXMLDIR=$MODDIR/system/etc/permissions
214 | WHITELISTXMLDIR=$MODDIR/system/etc/sysconfig
215 | SYSTEMIZE_TARGET=$MODDIR/system/priv-app
216 | }
217 |
218 | reset_provider() {
219 | setvars
220 | if [ "$OEM" ]; then
221 | rm -rf $STEPDIR/QuickSwitchOverlay.apk
222 | fi
223 | rm -rf $MODDIR/system
224 | if [ "$KSU" ] || [ "$APATCH" ] ; then
225 | [ -d $MODDIR/product ] && rm -rf $MODDIR/product
226 | [ -d $MODDIR/vendor ] && rm -rf $MODDIR/vendor
227 | fi
228 | rm -rf /data/resource-cache/overlays.list
229 | find /data/resource-cache/ -name "*QuickstepSwitcherOverlay*" -exec rm -rf {} \;
230 | find /data/resource-cache/ -name "*QuickSwitchOverlay*" -exec rm -rf {} \;
231 | sed -i 's/\(description=\[ Quickstep : \)[^]]*\]/\1Default ]/' $MODDIR/module.prop
232 | }
233 |
234 | unmount_rw_stepdir() {
235 | if [ "$OEM" ]; then
236 | is_mounted_rw " /oem" && unmount_rw /oem
237 | is_mounted_rw " /oem/OP" && unmount_rw /oem/OP
238 | is_mounted_rw " /OP" && unmount_rw /OP
239 | fi
240 | }
241 |
242 | check_package() {
243 | if [[ $(pm path $1 2>/dev/null) == "" ]]; then #Check that output of pm path is not empty, /dev/null because java throws an exception when it is empty.
244 | abortexit "\nPackagename is not correct or empty \nPlease enter it in the format --ch={packagename} \nFor example, for Lawnchair Beta3... \n/data/adb/modules/quickswitch/quickswitch --ch=app.lawnchair"
245 | fi
246 | }
247 |
248 | switch_providers() {
249 | reset_provider
250 |
251 | echo "\nThe overlay will be copied to $STEPDIR..."
252 |
253 | APKPATH=$(pm path $1 | sed "s|package:||" | sed -n '/base\.apk/p' )
254 |
255 | # Create needed dirs
256 | while [ ! -d "$STEPDIR" ]; do
257 | setvars
258 | mkdir -p $STEPDIR
259 | done
260 |
261 | if [ ! "$1" == "com.android.systemui" ]; then
262 | mkdir -p $SYSTEMIZE_TARGET/QuickSwitch-${1}-${RAND}
263 | mkdir -p $MODDIR/system/etc/permissions
264 | mkdir -p $MODDIR/system/etc/sysconfig
265 | if [ ! -z "$DATAAPKPATH" ]; then
266 | # if this yeets /data/app this time then its @paphonb's fault xdd
267 | rm -rf $DATAAPKPATH
268 | fi
269 | if [ ! -z "$REPLACEPATH" ]; then
270 | mkdir -p ${MODDIR}${REPLACEPATH}/
271 | touch ${MODDIR}${REPLACEPATH}/.replace
272 | fi
273 | cp -rf $APKPATH \
274 | $SYSTEMIZE_TARGET/QuickSwitch-"${1}"-"${RAND}"/QuickSwitch-"${1}"-"${RAND}".apk
275 |
276 | perms=$(aapt2 d permissions $APKPATH | grep "uses-permission:" |
277 | sed -r "s|.*='(.*)'|\1|")
278 | permissions=$(echo "$perms" |
279 | sed -re "s| ||g; s|^| |")
280 |
281 | echo "
282 |
283 |
284 | $permissions
285 |
286 | " >$PERMISSIONXMLDIR/privapp-permissions-$1.xml
287 |
288 | echo "
289 |
290 |
291 | " >$WHITELISTXMLDIR/$1-hiddenapi-package-whitelist.xml
292 |
293 | # Get logs for the patching process if the selected launcher is OnePlus Launcher
294 | # If more launchers get patch functionality I'll make the package name a variable array which can easily be added to.
295 | if [ "$1" == "net.oneplus.launcher" ]; then
296 | echo $(logcat -d | grep "I Patcher") >$MODDIR/logs/$ID-Patcher.log
297 | elif [ -f "$MODDIR/logs/$ID-Patcher.log" ]; then
298 | rm $MODDIR/logs/$ID-Patcher.log
299 | fi
300 | fi
301 |
302 | echo "
303 |
304 | $1/com.android.quickstep.RecentsActivity
305 | " >$OVERLAYDIR/overlay/values/strings.xml
306 |
307 | if [ ! -z "$PLATFORMSIGNATURE" ]; then
308 | cat "$PLATFORMSIGNATURE" >$OVERLAYDIR/overlay/values/arrays.xml
309 | fi
310 |
311 | rm -rf ${MODDIR}/compiled
312 | mkdir ${MODDIR}/compiled
313 | aapt2 compile -v --dir ${OVERLAYDIR}/overlay/ -o ${MODDIR}/compiled && \
314 | aapt2 link -o ${MODDIR}/unsigned.apk -I /system/framework/framework-res.apk \
315 | --manifest ${OVERLAYDIR}/AndroidManifest.xml ${MODDIR}/compiled/* \
316 | &>$MODDIR/logs/aapt2.log
317 | rm -rf ${MODDIR}/compiled
318 |
319 | if [ -s ${MODDIR}/unsigned.apk ]; then
320 | sign ${MODDIR}/unsigned.apk ${MODDIR}/signed.apk
321 | cp -rf ${MODDIR}/signed.apk ${STEPDIR}/QuickSwitchOverlay.apk
322 | [ ! -s ${MODDIR}/signed.apk ] && cp -rf ${MODDIR}/unsigned.apk ${STEPDIR}/QuickSwitchOverlay.apk
323 | rm -rf ${MODDIR}/signed.apk ${MODDIR}/unsigned.apk
324 | else
325 | abort "Overlay not created!"
326 | abort "This is generally a rom incompatibility,"
327 | abortexit "currently I'm unsure how to fix this."
328 | fi
329 |
330 | if [ -s ${STEPDIR}/QuickSwitchOverlay.apk ]; then
331 | echo "\nOverlay successfully copied..."
332 | sed -i "s/\(description=\[ Quickstep : \)[^]]*\]/\1✅$1 ]/" $MODDIR/module.prop
333 | else
334 | abortexit "The overlay was not copied, please send logs to the developer."
335 | fi
336 |
337 | set_perms $1
338 |
339 | # Lets save this for a rainy day
340 | # SDK=$(getprop ro.build.version.sdk)
341 | # SAMMY=$(getprop ro.product.brand)
342 |
343 | # if [[ "$SDK" = 29 ]] && \
344 | # [[ "$SAMMY" == *"samsung"* ]]; then
345 | # for i in $(cmd overlay list | grep navbar | awk '{print $NF}' | \
346 | # egrep -v com.samsung.internal.systemui.navbar.gestural_no_hint); do
347 | # cmd overlay disable $i
348 | # done
349 | # cmd overlay enable com.samsung.internal.systemui.navbar.gestural_no_hint
350 | # fi
351 |
352 | # lets not add this just yet as it can cause crashes in certain circumstances
353 | # if [ ! "$1" == "com.android.systemui" ]; then
354 | # echo "pm set-home-activity $1" > $MODDIR/service.sh
355 | # echo 'rm -rf $0' >> $MODDIR/service.sh
356 | # fi
357 | }
358 |
359 | print_modname() {
360 | # @Skittles9823 made this ascii and is way to proud of it
361 | echo " "
362 | echo " _____ "
363 | echo " __ | | __ "
364 | echo " | || || | "
365 | echo " | || || | "
366 | echo " |__|| ||__| "
367 | echo " |_____| "
368 | echo " QuickSwitch "
369 | echo " "
370 | echo " The Lawnchair Team"
371 | echo " "
372 | }
373 |
374 | print_modname
375 |
376 | resetprop ro.recents.grid false
377 | sed -i "/ro.recents.grid*/d" $MODDIR/system.prop
378 |
379 | for arg in $(echo ${@}); do
380 | args=$(echo $arg | tr '=' ' ')
381 | opt1=$(echo $args | awk '{ print $1 }')
382 | opt2=$(echo $args | awk '{ print $2 }')
383 | case "$opt1" in
384 | --reset)
385 | reset_provider
386 | echo "The recents provider has been reset to default."
387 | continue
388 | ;;
389 | --uninstall)
390 | reset_provider
391 | continue
392 | ;;
393 | --grid)
394 | resetprop ro.recents.grid true
395 | echo "ro.recents.grid=true" >>$MODDIR/system.prop
396 | continue
397 | ;;
398 | -ch|--ch)
399 | check_package "$opt2"
400 | switch_providers "$opt2"
401 | continue
402 | ;;
403 | esac
404 | done
405 |
406 | # If the script is called, then there is no reason for the module to be disabled.
407 | # Let's make sure the module is enabled.
408 | rm -rf $MODDIR/disable
409 |
410 | unmount_rw_stepdir
411 |
412 | get_logs
413 |
414 | echo "\nPlease reboot for changes to take effect."
415 |
416 | exit $?
417 |
--------------------------------------------------------------------------------
/module/sepolicy.rule:
--------------------------------------------------------------------------------
1 | allow system_server untrusted_app_all_devpts chr_file { read write }
2 |
--------------------------------------------------------------------------------
/module/service.sh:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 |
3 | # Late props which must be set after boot_completed
4 | {
5 | until [[ "$(getprop sys.boot_completed)" == "1" ]]; do
6 | sleep 1
7 | done
8 |
9 | # avoid breaking OnePlus display modes/fingerprint scanners
10 | resetprop vendor.boot.verifiedbootstate green
11 | }&
12 |
--------------------------------------------------------------------------------
/module/system.prop:
--------------------------------------------------------------------------------
1 | ro.boot.vendor.overlay.static=false
2 |
--------------------------------------------------------------------------------
/module/system/placeholder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/j7b3y/QuickSwitch/7f08bdbca7075c5ae29848c885808c5f82db402f/module/system/placeholder
--------------------------------------------------------------------------------
/module/uninstall.sh:
--------------------------------------------------------------------------------
1 | ./$(dirname $0)/quickswitch --uninstall
2 |
--------------------------------------------------------------------------------
/module/zipsigner:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 | # zipsigner: wrapper to set up and run zipsigner.jar from terminal
3 | # osm0sis @ xda-developers
4 |
5 | case $# in
6 | 1 | 3 | 5)
7 | # when one argument less than needed assume the output name is missing and automatically set it to *-signed.*
8 | eval n=\${$#}
9 | set -- "$@" "$(echo $n | sed 's/\(.*\)\./\1-signed\./')"
10 | ;;
11 | esac
12 |
13 | if [ "$USER" == "root" ]; then
14 | dir="$(
15 | cd "$(dirname "$0")"
16 | pwd
17 | )"
18 | /apex/com.android.art/bin/dalvikvm -Djava.io.tmpdir=. -Xnodex2oat -Xnoimage-dex2oat -cp $dir/zipsigner-*.jar com.topjohnwu.utils.ZipSigner "$@" 2>/dev/null \
19 | || /apex/com.android.art/bin/dalvikvm -Djava.io.tmpdir=. -Xnoimage-dex2oat -cp $dir/zipsigner-*.jar com.topjohnwu.utils.ZipSigner "$@"
20 | else
21 | echo "zipsigner: need root permissions"
22 | fi
23 |
--------------------------------------------------------------------------------
/module/zipsigner-3.0-dexed.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/j7b3y/QuickSwitch/7f08bdbca7075c5ae29848c885808c5f82db402f/module/zipsigner-3.0-dexed.jar
--------------------------------------------------------------------------------
/release.sh:
--------------------------------------------------------------------------------
1 | cd module && zip -r ../QuickSwitch-fork.zip $(cat ../files.txt)
2 | cd ../withoutui && zip -r -u ../QuickSwitch-fork.zip module.prop
3 |
4 | cd ../module && zip -r ../QuickSwitch-fork-webui $(cat ../files.txt)
5 | cd ../webui && zip -r -u ../QuickSwitch-fork-webui module.prop webroot*
--------------------------------------------------------------------------------
/webui/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # QuickSwitch - Quickstep enabler for supported launchers
2 |
3 | QuickSwitch is a Magisk module which systemlessly allows supported launchers to access the recents (QuickStep) APIs
4 |
5 | ## Changelog:
6 |
7 | ### 4.0.4
8 |
9 | - Add WebUI
10 | - Compatible with Magic Mount(Apatch,KernelSU Next)
--------------------------------------------------------------------------------
/webui/module.prop:
--------------------------------------------------------------------------------
1 | id=quickswitch
2 | name=QuickSwitch Fork(WebUI)
3 | version=v4.0.4f-webui
4 | versionCode=4040
5 | author=The Lawnchair team
6 | description=[ Quickstep : Default ] Quickstep enabler for supported launchers
7 | updateJson=https://raw.githubusercontent.com/j7b3y/QuickSwitch/refs/heads/anyfix/master/wiwebui/update.json
--------------------------------------------------------------------------------
/webui/update.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "v4.0.4f-webui",
3 | "versionCode": 4040,
4 | "zipUrl": "https://github.com/j7b3y/QuickSwitch/releases/latest/download/QuickSwitch-fork-webui.zip",
5 | "changelog": "https://raw.githubusercontent.com/j7b3y/QuickSwitch/refs/heads/anyfix/master/webui/CHANGELOG.md"
6 | }
--------------------------------------------------------------------------------
/webui/webroot/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
17 |
Dashboard
18 |
19 |
20 | Module Version
21 | Loading...
22 |
23 |
24 | Root
25 | Loading...
26 |
27 |
28 | Set Launcher
29 | Loading...
30 |
31 |
32 |
33 |
34 |