├── LICENSE ├── META-INF └── com │ └── google │ └── android │ ├── update-binary │ └── updater-script ├── README.md ├── common ├── install.sh ├── post-fs-data.sh ├── ramdiskinstall.sh ├── ramdiskuninstall.sh ├── service.sh ├── system.prop ├── uninstall.sh └── unityfiles.tar.xz ├── config.sh ├── custom ├── Lawnstep │ ├── ch.deletescape.lawnchair.apk │ ├── ch.deletescape.lawnchair.ci.apk │ ├── ch.deletescape.lawnchair.dev.apk │ └── ch.deletescape.lawnchair.plah.apk └── etc │ ├── permissions │ └── privapp-permissions-lawnchair.xml │ └── sysconfig │ └── lawnchair-hiddenapi-package-whitelist.xml └── module.prop /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /META-INF/com/google/android/update-binary: -------------------------------------------------------------------------------- 1 | #!/sbin/sh 2 | ########################################################################################## 3 | # 4 | # Unity Installer 5 | # by ahrion & zackptg5 6 | # 7 | ########################################################################################## 8 | 9 | ########################################################################################## 10 | # PREP WORK 11 | ########################################################################################## 12 | 13 | # PRELIMINARY DETECTION OF BOOTMODE 14 | ps | grep zygote | grep -qv grep >/dev/null && BOOTMODE=true || BOOTMODE=false 15 | $BOOTMODE || ps -A 2>/dev/null | grep zygote | grep -qv grep >/dev/null && BOOTMODE=true 16 | 17 | # TEMP INSTALLER PATH 18 | TMPDIR=/dev/tmp 19 | INSTALLER=$TMPDIR/install 20 | MOUNTPATH=$TMPDIR/magisk_img 21 | 22 | # OTHER VARIABLES 23 | OUTFD=$2 24 | ZIP=$3 25 | MAGISK=true 26 | DYNAMICOREO=false 27 | DYNAMICAPP=false 28 | SYSOVERRIDE=false 29 | RAMDISK=false 30 | DEBUG=false 31 | case $(basename $ZIP) in 32 | *debug*|*Debug*|*DEBUG*) DEBUG=true;; 33 | *sysover*|*Sysover*|*SYSOVER*) SYSOVERRIDE=true;; 34 | esac 35 | 36 | # DEFAULT PERMISSIONS 37 | umask 022 38 | 39 | # INITIAL CLEANUP 40 | rm -rf $TMPDIR 2>/dev/null 41 | mkdir -p $INSTALLER 42 | 43 | # GET OUTFD 44 | if [ -z $OUTFD ] || readlink /proc/$$/fd/$OUTFD | grep -q /tmp; then 45 | # We will have to manually find out OUTFD 46 | for FD in `ls /proc/$$/fd`; do 47 | if readlink /proc/$$/fd/$FD | grep -q pipe; then 48 | if ps | grep -v grep | grep -q " 3 $FD "; then 49 | OUTFD=$FD 50 | break 51 | fi 52 | fi 53 | done 54 | fi 55 | 56 | # NEEDED BEFORE UTIL_FUNCTIONS IS LOADED 57 | ui_print() { 58 | $BOOTMODE && echo "$1" || echo -e "ui_print $1\nui_print" >> /proc/self/fd/$OUTFD 59 | } 60 | 61 | ########################################################################################## 62 | # SETUP (UN)/INSTALL 63 | ########################################################################################## 64 | 65 | # UNZIP FILES 66 | ui_print " " 67 | ui_print "Unzipping files..." 68 | unzip -oq "$ZIP" -d $INSTALLER 2>/dev/null 69 | [ ! -f $INSTALLER/config.sh ] && { ui_print "! Unable to extract zip file !"; exit 1; } 70 | 71 | # LOAD FUNCTIONS 72 | tar -xf $INSTALLER/common/unityfiles.tar.xz -C $INSTALLER/common 2>/dev/null 73 | . $INSTALLER/common/unityfiles/util_functions.sh 74 | setup_flashable 75 | 76 | [ "$(grep_prop id $INSTALLER/module.prop)" == "UnityTemplate" ] && { ui_print "! Unity Template is not a separate module !"; abort "! This template is for devs only !"; } 77 | 78 | # INSERT MODULE INFO INTO CONFIG.SH 79 | ( 80 | for TMP in version name author; do 81 | NEW=$(grep_prop $TMP $INSTALLER/module.prop) 82 | [ "$TMP" == "author" ] && NEW="by ${NEW}" 83 | CHARS=$((${#NEW}-$(echo "$NEW" | tr -cd "©®™" | wc -m))) 84 | SPACES="" 85 | if [ $CHARS -le 41 ]; then 86 | for i in $(seq $(((41-$CHARS) / 2))); do 87 | SPACES="${SPACES} " 88 | done 89 | fi 90 | if [ $(((41-$CHARS) % 2)) == 1 ]; then sed -i "s/<$TMP>/$SPACES$NEW${SPACES} /" $INSTALLER/config.sh; else sed -i "s/<$TMP>/$SPACES$NEW$SPACES/" $INSTALLER/config.sh; fi 91 | done 92 | ) 93 | 94 | . $INSTALLER/config.sh 95 | 96 | # PRINT MOD NAME 97 | print_modname 98 | 99 | # MOUNT DATA AND CACHE 100 | ui_print "- Mounting /data, /cache" 101 | is_mounted /data || mount /data || is_mounted /cache || mount /cache || { ui_print "! Unable to mount partitions"; exit 1; } 102 | 103 | # INSTALL 104 | unity_install() { 105 | ui_print " " 106 | ui_print "- Installing" 107 | 108 | # MAKE INFO FILE 109 | rm -f $INFO 110 | mktouch $INFO 111 | 112 | # RUN USER INSTALL SCRIPT 113 | [ -f "$INSTALLER/common/install.sh" ] && . $INSTALLER/common/install.sh 114 | 115 | # INSTALL SCRIPTS 116 | ui_print " Installing scripts for $ROOTTYPE..." 117 | if $MAGISK; then 118 | # AUTO MOUNT 119 | $AUTOMOUNT && ! $SYSOVERRIDE && mktouch $MODPATH/auto_mount 120 | # UPDATE INFO FOR MAGISK MANAGER 121 | if $BOOTMODE; then 122 | mktouch /sbin/.core/img/$MODID/update 123 | cp_ch -n $INSTALLER/module.prop $MODPATH/module.prop 124 | fi 125 | elif [ "$ROOTTYPE" == "LineageOS SU" ] || [ "$ROOTTYPE" == "other root or rootless" ]; then 126 | ui_print " " 127 | ui_print " ! This root method has no boot script support !" 128 | ui_print " ! You will need to add init.d support !" 129 | ui_print " " 130 | fi 131 | if $MAGISK && $SYSOVERRIDE; then 132 | cp -f $INSTALLER/common/unityfiles/modidsysover.sh $INSTALLER/common/unityfiles/$MODID-sysover.sh 133 | sed -i -e "/# CUSTOM USER SCRIPT/ r $INSTALLER/common/uninstall.sh" -e '/# CUSTOM USER SCRIPT/d' $INSTALLER/common/unityfiles/$MODID-sysover.sh 134 | install_script -p $INSTALLER/common/unityfiles/$MODID-sysover.sh 135 | elif ! $MAGISK || $SYSOVERRIDE; then 136 | # INSTALL ROM BACKUP SCRIPT 137 | if [ -d /system/addon.d ]; then 138 | ui_print " Installing addon.d backup script..." 139 | sed -i "s//$MODID/" $INSTALLER/common/unityfiles/addon.sh 140 | cp_ch -n $INSTALLER/common/unityfiles/addon.sh /system/addon.d/$MODID.sh 0755 141 | else 142 | ui_print " ! Addon.d not detected. Backup script not installed..." 143 | fi 144 | fi 145 | 146 | # HANDLE REPLACE FOLDERS 147 | for TARGET in $REPLACE; do 148 | if $MAGISK; then mktouch $MODPATH$TARGET/.replace; else rm -rf $TARGET; fi 149 | done 150 | 151 | # PROP FILES - add prop function for system installs 152 | $PROPFILE && { prop_process $INSTALLER/common/system.prop; $MAGISK || echo $PROP >> $INFO; } 153 | 154 | # MODULE INFO 155 | cp_ch -n $INSTALLER/module.prop $MOD_VER 156 | 157 | #INSTALL POST-FS-DATA MODE SCRIPTS 158 | $POSTFSDATA && install_script -p $INSTALLER/common/post-fs-data.sh 159 | 160 | # SERVICE MODE SCRIPTS 161 | $LATESTARTSERVICE && install_script -l $INSTALLER/common/service.sh 162 | 163 | # INSTALL FILES 164 | ui_print " Installing files for $ARCH SDK $API device..." 165 | rm -f $INSTALLER/system/placeholder $INSTALLER/ramdisk/placeholder 166 | $IS64BIT || rm -rf $INSTALLER/system/lib64 $INSTALLER/system/vendor/lib64 167 | for FILE in $(find $INSTALLER/system -type f 2>/dev/null | sed "s|$INSTALLER||" 2>/dev/null); do 168 | if $DYNAMICAPP; then 169 | if $OLDAPP; then FILE2=$(echo $FILE | sed 's|/system/app/.*/|/system/app/|'); else FILE2=$(echo $FILE | sed 's|/system/app/|/system/priv-app/|'); fi 170 | else 171 | FILE2=$FILE 172 | fi 173 | if $DYNAMICOREO && [ $API -ge 26 ]; then 174 | case $FILE in 175 | /system/lib*/modules/*) FILE2=$FILE;; 176 | /system/lib*/*) FILE2=$(echo $FILE | sed "s|/system/|$VEN/|");; 177 | esac 178 | fi 179 | cp_ch $INSTALLER$FILE $UNITY$FILE2 180 | done 181 | 182 | # ADD BLANK LINE TO END OF ALL PROP/SCRIPT FILES IF NOT ALREADY PRESENT 183 | for FILE in $MODPATH/*.sh $MODPATH/*.prop; do 184 | [ -f $FILE ] && { [ "$(tail -1 $FILE)" ] && echo "" >> $FILE; } 185 | done 186 | 187 | # REMOVE INFO FILE IF NOT NEEDED 188 | [ ! -s $INFO ] && rm -f $INFO 189 | 190 | # RAMDISK PATCHES 191 | if $RAMDISK; then 192 | [ -d "$RD" ] || unpack_ramdisk "late" 193 | # REMOVE RAMDISK MOD IF EXISTS 194 | if [ "$(grep "#$MODID-UnityIndicator" $RD/init.rc 2>/dev/null)" ]; then 195 | ui_print " ! Mod detected in ramdisk!" 196 | ui_print " ! Upgrading mod ramdisk modifications..." 197 | uninstall_files $INFORD 198 | sed -i "/#$MODID-UnityIndicator/d" $RD/init.rc 199 | [ -f "$INSTALLER/common/ramdiskuninstall.sh" ] && . $INSTALLER/common/ramdiskuninstall.sh 200 | fi 201 | # SCRIPT TO REMOVE MOD FROM SYSTEM/MAGISK IN EVENT MOD IS ONLY REMOVED FROM RAMDISK (LIKE DIRTY FLASHING) 202 | cp -f $INSTALLER/common/unityfiles/modidramdisk.sh $INSTALLER/common/unityfiles/$MODID-ramdisk.sh 203 | sed -i -e "/# CUSTOM USER SCRIPT/ r $INSTALLER/common/uninstall.sh" -e '/# CUSTOM USER SCRIPT/d' $INSTALLER/common/unityfiles/$MODID-ramdisk.sh 204 | install_script -p $INSTALLER/common/unityfiles/$MODID-ramdisk.sh 205 | # USE COMMENT AS INSTALL INDICATOR 206 | echo "#$MODID-UnityIndicator" >> $RD/init.rc 207 | [ -f "$INSTALLER/common/ramdiskinstall.sh" ] && . $INSTALLER/common/ramdiskinstall.sh 208 | for FILE in $(find $INSTALLER/ramdisk -type f 2>/dev/null | sed "s|$INSTALLER||" 2>/dev/null); do 209 | cp_ch $INSTALLER$FILE $INSTALLER/common/unityfiles/boot$FILE 210 | done 211 | [ ! -s $INFORD ] && rm -f $INFORD 212 | fi 213 | 214 | # SET PERMISSIONS 215 | ui_print " " 216 | ui_print "- Setting Permissions" 217 | set_permissions 218 | } 219 | 220 | # UNINSTALL 221 | unity_uninstall() { 222 | ui_print " " 223 | ui_print "- Uninstalling" 224 | 225 | # RUN USER INSTALL SCRIPT 226 | [ -f "$INSTALLER/common/uninstall.sh" ] && . $INSTALLER/common/uninstall.sh 227 | 228 | # REMOVE FILES 229 | uninstall_files $INFO 230 | 231 | $MAGISK && { rm -rf $MODPATH /sbin/.core/img/$MODID; rm -f $MOUNTPATH/.core/post-fs-data.d/$MODID-sysover.sh; } 232 | 233 | # RAMDISK PATCHES 234 | if $RAMDISK; then 235 | [ -d "$RD" ] || unpack_ramdisk "late" 236 | uninstall_files $INFORD 237 | sed -i "/#$MODID-UnityIndicator/d" $RD/init.rc 238 | [ -f "$INSTALLER/common/ramdiskuninstall.sh" ] && . $INSTALLER/common/ramdiskuninstall.sh 239 | fi 240 | 241 | ui_print " " 242 | ui_print "- Completing uninstall -" 243 | } 244 | 245 | ########################################################################################## 246 | # (UN)INSTALL 247 | ########################################################################################## 248 | # CHECK FOR OLD MAGISK, DETERMINE IF SYSTEM INSTALL OR MAGISK INSTALL, CHECK MAGISK VERSION (IF APPLICABLE) 249 | MINMAGISK=$(grep_prop minMagisk $INSTALLER/module.prop) 250 | if [ -f /data/adb/magisk/util_functions.sh ]; then 251 | MAGISKBIN=/data/adb/magisk 252 | elif [ -f /data/magisk/util_functions.sh ]; then 253 | MAGISKBIN=/data/magisk 254 | fi 255 | if $BOOTMODE; then IMG=/data/adb/magisk_merge.img; else IMG=$(dirname $MAGISKBIN)/magisk.img; fi 256 | 257 | if [ -z $MAGISKBIN ]; then 258 | MAGISK=false 259 | ui_print "- System install detected" 260 | else 261 | ui_print "- Magisk install detected" 262 | cp -f $MAGISKBIN/util_functions.sh $INSTALLER/common/unityfiles/util_functions_mag.sh 263 | if $SYSOVERRIDE; then 264 | ui_print "- Overriding paths for system install" 265 | $BOOTMODE && { ui_print " ! Magisk manager isn't supported!"; abort " ! Install in recovery !"; } 266 | sed -i "s/-o ro/-o rw/g" $INSTALLER/common/unityfiles/util_functions_mag.sh 267 | sysover_partitions 268 | fi 269 | . $INSTALLER/common/unityfiles/util_functions_mag.sh 270 | [ ! -z $MAGISK_VER_CODE -a $MAGISK_VER_CODE -ge $MINMAGISK ] || require_new_magisk 271 | fi 272 | 273 | # MOUNT PARTITIONS AND DETECT VERSION/ARCHITECTURE 274 | mount_partitions 275 | api_level_arch_detect 276 | 277 | if $MAGISK; then 278 | # SETUP BUSYBOX AND BINARIES 279 | $BOOTMODE && boot_actions_unity || recovery_actions 280 | # GET THE VARIABLE REQSIZEM 281 | request_zip_size_check "$ZIP" 282 | # THIS FUNCTION WILL MOUNT $IMG TO $MOUNTPATH, AND RESIZE THE IMAGE BASED ON $REQSIZEM 283 | mount_magisk_img 284 | else 285 | # SETUP BUSYBOX AND BINARIES 286 | recovery_actions 287 | fi 288 | 289 | # CHECK FOR MIN & MAX API VERSION 290 | [ -z $MINAPI ] || { [ $API -lt $MINAPI ] && require_new_api 'minimum'; } 291 | [ -z $MAXAPI ] || { [ $API -gt $MAXAPI ] && require_new_api 'maximum'; } 292 | 293 | # SET MODID and MODPATH variables 294 | [ -z $MODID ] && MODID=`grep_prop id $INSTALLER/module.prop` 295 | MODPATH=$MOUNTPATH/$MODID 296 | 297 | # INSERT MODID AND CUSTOM USER SCRIPT INTO MOD SCRIPT 298 | cp -f $INSTALLER/common/unityfiles/modid.sh $INSTALLER/common/unityfiles/post-fs-data.sh 299 | cp -f $INSTALLER/common/unityfiles/modid.sh $INSTALLER/common/unityfiles/service.sh 300 | sed -i -e "s//$MODID/" -e "/# CUSTOM USER SCRIPT/ r $INSTALLER/common/post-fs-data.sh" -e '/# CUSTOM USER SCRIPT/d' $INSTALLER/common/unityfiles/post-fs-data.sh 301 | sed -i -e "s//$MODID/" -e "/# CUSTOM USER SCRIPT/ r $INSTALLER/common/service.sh" -e '/# CUSTOM USER SCRIPT/d' $INSTALLER/common/unityfiles/service.sh 302 | mv -f $INSTALLER/common/unityfiles/post-fs-data.sh $INSTALLER/common/post-fs-data.sh 303 | mv -f $INSTALLER/common/unityfiles/service.sh $INSTALLER/common/service.sh 304 | 305 | # SET VARIABLES 306 | set_vars 307 | 308 | # ADD BLANK LINE TO END OF ALL COMMON FILES IF NOT ALREADY PRESENT 309 | for FILE in $INSTALLER/common/*.sh $INSTALLER/common/*.prop; do 310 | [ "$(tail -1 $FILE)" ] && echo "" >> $FILE 311 | done 312 | 313 | # REMOVE OLD AML & MODS 314 | [ -f "$OLD_AML_VER" ] && remove_old_aml 315 | 316 | # UNPACK RAMDISK 317 | $RAMDISK && unpack_ramdisk 318 | 319 | #DEBUG 320 | if $DEBUG; then 321 | ui_print " " 322 | ui_print "- Debug mode" 323 | ui_print " Debug log will be written to:" 324 | ui_print " - /sdcard/Documents/$MODID/logs/$MODID-debug.tar" 325 | ui_print " - /cache/$MODID-debug.tar" 326 | if $BOOTMODE; then exec 2>/storage/emulated/0/$MODID-debug.log; else exec 2>/data/media/0/$MODID-debug.log; fi 327 | set -x 328 | fi 329 | 330 | # LOAD USER VARS/FUNCTIONS 331 | unity_custom 332 | 333 | # UNPACK RAMDISK IF CHANGED TO TRUE IN UNITY_CUSTOM 334 | $RAMDISK && [ ! -d "$RD" ] && unpack_ramdisk "late" 335 | 336 | # DETERMINE MOD INSTALLATION STATUS 337 | if $RAMDISK && [ "$(grep "#$MODID-UnityIndicator" $RD/init.rc 2>/dev/null)" ] && [ ! -f "$MOD_VER" ]; then 338 | ui_print " " 339 | ui_print " ! Mod present in ramdisk but not in system!" 340 | ui_print " ! Ramdisk modifications will be uninstalled!" 341 | rm -f $INSTALLER/common/uninstall.sh 342 | unity_uninstall 343 | elif $MAGISK && ! $SYSOVERRIDE && [ -f "/system/addon.d/$MODID-files" -o -f "/system/etc/$MODID-files" ]; then 344 | ui_print " " 345 | ui_print " ! Previous system override install detected!" 346 | ui_print " ! Removing...!" 347 | $BOOTMODE && { ui_print " ! Magisk manager isn't supported!"; abort " ! Install in TWRP !"; } 348 | mount -o rw,remount /system 349 | [ -L /system/vendor ] && mount -o rw,remount /vendor 350 | sysover_partitions 351 | SYSOVERRIDE=true 352 | set_vars 353 | unity_uninstall 354 | SYSOVERRIDE=false 355 | set_vars 356 | unity_install 357 | elif [ -f "$MOD_VER" ]; then 358 | if $RAMDISK && [ ! "$(grep "#$MODID-UnityIndicator" $RD/init.rc 2>/dev/null)" ]; then 359 | ui_print " " 360 | ui_print " ! Mod present in system but not in ramdisk!" 361 | ui_print " ! Running upgrade..." 362 | unity_uninstall 363 | unity_install 364 | elif [ $(grep_prop versionCode $MOD_VER) -ge $(grep_prop versionCode $INSTALLER/module.prop) ]; then 365 | ui_print " " 366 | ui_print " ! Current or newer version detected!" 367 | unity_uninstall 368 | else 369 | ui_print " " 370 | ui_print " ! Older version detected! Upgrading..." 371 | unity_uninstall 372 | unity_install 373 | fi 374 | else 375 | unity_install 376 | fi 377 | 378 | # COMPLETE (UN)INSTALL 379 | cleanup 380 | -------------------------------------------------------------------------------- /META-INF/com/google/android/updater-script: -------------------------------------------------------------------------------- 1 | #MAGISK 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Lawnstep - Lawnchair Quickstep enabler 2 | Lawnstep is a magisk module which systemlessly enables Pie recents (Quickstep) in Lawnchair 3 | 4 | ## Donations: 5 | - If you wish to donate to Till for creating Lawnchair you can do so by purchasing [Donut Donation](https://play.google.com/store/apps/details?id=ch.deletescape.donut) or via his [Paypal](https://paypal.me/Deletescape). 6 | - Or if you wish to donate to Skittles9823 for making the module you can do so [here](https://paypal.me/Skittles2398). 7 | 8 | ## Compatibility: 9 | - Magisk v17+ 10 | - SuperSU 11 | - Init.d support if not using Magisk or SuperSU (Try [Init.d Injector](https://forum.xda-developers.com/android/software-hacking/mod-universal-init-d-injector-wip-t3692105)) 12 | 13 | ## Requirements: 14 | - A compatible root/no root solution 15 | - Android 9.0 Pie 16 | - Lawnchair v2 - v551+ 17 | 18 | ## Sources and used/needed tools: 19 | - [Module Source](https://github.com/LawnchairLauncher/LawnstepModule) 20 | - [Lawnchair](https://github.com/LawnchairLauncher/Lawnchair) 21 | - [Unity](https://github.com/Zackptg5/Unity) by [Zackptg5](https://github.com/Zackptg5) 22 | - [Magisk](https://github.com/topjohnwu/Magisk) by [topjohnwu](https://forum.xda-developers.com/member.php?u=4470081) 23 | - [Magisk Module Template](https://github.com/topjohnwu/magisk-module-template) by [topjohnwu](https://forum.xda-developers.com/member.php?u=4470081) 24 | 25 | ## Changelog: 26 | ### v1.1.1 27 | - make the module easily portable for other launchers 28 | - if /product is detected but cannot be mounted, abort, and display an error message 29 | - basically make everything in install.sh a variable so it's easier for me maintain more than one quickstep module 30 | - also copy lawnstep-debug.tar to /cache in case of edge cases where internal storage is unavalable \*cough\* thanks huawei \*cough\* 31 | - rename all files once placed to **NOT** have the variant (dev, ci, plah) this should make it easier for other modules to find lawnstep 32 | - remove the battery optimization whitelist flag, the insane lag is fixed in the internal builds 33 | - add code to prevent clashes between Hypestep and Lawnstep (pls don't install multiple quickstep modules at once kthnks) 34 | - set minMagisk back to 17000 (if it still causes issues for users below 17.2 i'll change it back) 35 | 36 | ### v1.0.7 37 | - fix install for users with /product/overlay 38 | 39 | ### v1.0.6 40 | - fix logging 41 | 42 | ### v1.0.5 43 | - add Lawnchair to battery optimisation whitelist (should prevent Lawnchair from getting killed in the background) 44 | - format code in install.sh 45 | - add formatted debugging logs 46 | - change log output to /sdcard/Documents/Lawnchair/logs/Lawnstep-logs.tar 47 | 48 | ### v1.0.4 49 | - fix permissions for the overlay 50 | - add changelog to README.md due to contemplating submitting the module to the Magisk repo 51 | - set minMagisk to 17200 so Magisk 17.2 must be used to install the module 52 | - prepare for packaging the module with Lawnchair 53 | - Cleanup unused code 54 | 55 | ### v1.0.3 56 | - fix Lawnfeed breaking the install 57 | 58 | ### v1.0.2 59 | - rm /data/resource-cache/overlays.list on install too 60 | - Always delete /data/resource-cache/overlays.list on uninstall to attempt to prevent bootloops 61 | - Remove the backup script as the script doesn't delete the user app anymore 62 | - Fix lawnfeed breaking the module 63 | 64 | ### v1.0.1 65 | - don't delete lawnchair from /data/app on install 66 | 67 | ### v1.0.0 68 | - Initial release 69 | -------------------------------------------------------------------------------- /common/install.sh: -------------------------------------------------------------------------------- 1 | for VAR in $VARS; do 2 | if [ -f $DATADIR/$VAR-*/base.apk ] \ 3 | || [ -f $SYSDIR/$LAUNCHER*/$LAUNCHER*.apk ]; then 4 | STEPAPK=$(grep -Fo -m 1 "$VAR" "$FILE") 5 | STEPAPK=$(echo $STEPAPK | sed "s| .*||") 6 | if [ ! -z $STEPAPK ]; then 7 | SUCCESS=true 8 | ui_print " " 9 | ui_print " $VAR detected!" 10 | ui_print " " 11 | if [ -d $DATADIR/$VAR* ]; then 12 | cp_ch $DATADIR/$VAR*/*.apk $APPDIR/$LAUNCHER/$LAUNCHER.apk 13 | elif [ -d $SYSDIR/$LAUNCHER -a ! -f $STEPDIR/$QUICKSTEP.apk ]; then 14 | systemapp_warn 15 | fi 16 | cp_ch $STEP/$STEPAPK.apk $STEPDIR/$QUICKSTEP.apk 17 | sed -i "s||$VAR|" $PERM/$PERMXML 18 | sed -i "s||$VAR|" $CONF/$CONFXML 19 | cp_ch $PERM/$PERMXML $PERMDIR/$PERMXML 20 | cp_ch $CONF/$CONFXML $CONFDIR/$CONFXML 21 | rm /data/resource-cache/overlays.list 22 | for ALT in $ALTSTEPS; do 23 | case $(find $ALTDIR/$ALT*) in 24 | *$ALT*) 25 | rm -rf $ALTDIR/$ALT* 26 | ui_print " " 27 | ui_print " Alternate quickstep overlay found!" 28 | ui_print " Deleting $ALTDIR/$ALT " 29 | ui_print " ";; 30 | esac 31 | done 32 | break 33 | fi 34 | fi 35 | done 36 | if [ -z $SUCCESS ]; then launcher_abort; fi -------------------------------------------------------------------------------- /common/post-fs-data.sh: -------------------------------------------------------------------------------- 1 | # This script will be executed in post-fs-data mode 2 | # More info in the main Magisk thread 3 | -------------------------------------------------------------------------------- /common/ramdiskinstall.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LawnchairLauncher/LawnstepModule/0928e489528ea59c4749ce1e6e4ef39509be580b/common/ramdiskinstall.sh -------------------------------------------------------------------------------- /common/ramdiskuninstall.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LawnchairLauncher/LawnstepModule/0928e489528ea59c4749ce1e6e4ef39509be580b/common/ramdiskuninstall.sh -------------------------------------------------------------------------------- /common/service.sh: -------------------------------------------------------------------------------- 1 | # This script will be executed in late_start service mode 2 | # More info in the main Magisk thread 3 | if [ "$SEINJECT" != "/sbin/sepolicy-inject" ]; then 4 | $SEINJECT --live "allow priv_app device file { read open }" 5 | else 6 | $SEINJECT -Z priv_app -l 7 | fi 8 | -------------------------------------------------------------------------------- /common/system.prop: -------------------------------------------------------------------------------- 1 | # This file will be read by resetprop 2 | # Example: Change dpi 3 | # ro.sf.lcd_density=320 4 | -------------------------------------------------------------------------------- /common/uninstall.sh: -------------------------------------------------------------------------------- 1 | rm /data/resource-cache/overlays.list -------------------------------------------------------------------------------- /common/unityfiles.tar.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LawnchairLauncher/LawnstepModule/0928e489528ea59c4749ce1e6e4ef39509be580b/common/unityfiles.tar.xz -------------------------------------------------------------------------------- /config.sh: -------------------------------------------------------------------------------- 1 | ########################################################################################## 2 | # 3 | # Magisk Module Template Config Script 4 | # by topjohnwu 5 | # 6 | ########################################################################################## 7 | ########################################################################################## 8 | # 9 | # Instructions: 10 | # 11 | # 1. Place your files into system folder (delete the placeholder file) 12 | # 2. Fill in your module's info into module.prop 13 | # 3. Configure the settings in this file (config.sh) 14 | # 4. If you need boot scripts, add them into common/post-fs-data.sh or common/service.sh 15 | # 5. Add your additional or modified system properties into common/system.prop 16 | # 17 | ########################################################################################## 18 | 19 | ########################################################################################## 20 | # Defines 21 | ########################################################################################## 22 | 23 | # NOTE: This part has to be adjusted to fit your own needs 24 | 25 | # Set to true if you need to enable Magic Mount 26 | # Most mods would like it to be enabled 27 | AUTOMOUNT=true 28 | 29 | # Set to true if you need to load system.prop 30 | PROPFILE=false 31 | 32 | # Set to true if you need post-fs-data script 33 | POSTFSDATA=false 34 | 35 | # Set to true if you need late_start service script 36 | LATESTARTSERVICE=true 37 | 38 | # Unity Variables 39 | # Uncomment and change 'MINAPI' and 'MAXAPI' to the minimum and maxium android version for your mod (note that magisk has it's own minimum api: 21 (lollipop)) 40 | # Uncomment DYNAMICOREO if you want libs installed to vendor for oreo and newer and system for anything older 41 | # Uncomment DYNAMICAPP if you want anything in $INSTALLER/system/app to be installed to the optimal app directory (/system/priv-app if it exists, /system/app otherwise) 42 | # Uncomment SYSOVERRIDE if you want the mod to always be installed to system (even on magisk) 43 | # Uncomment RAMDISK if you have ramdisk modifications. If you only want ramdisk patching as part of a conditional, just keep this commented out and set RAMDISK=true in that conditional. 44 | # Uncomment DEBUG if you want full debug logs (saved to SDCARD if in twrp, part of regular log if in magisk manager (user will need to save log after flashing) 45 | MINAPI=28 46 | #MAXAPI=25 47 | #SYSOVERRIDE=true 48 | #DYNAMICOREO=true 49 | #DYNAMICAPP=true 50 | #RAMDISK=true 51 | DEBUG=true 52 | 53 | # Custom Variables for Install AND Uninstall - Keep everything within this function 54 | unity_custom() { 55 | if [ -f /storage/emulated/0/Documents/Lawnchair/lawnstep ]; then 56 | FILE=/storage/emulated/0/Documents/Lawnchair/lawnstep 57 | else 58 | FILE=/data/system/packages.xml 59 | fi 60 | # Package name(s) for the launcher 61 | VARS=" 62 | ch.deletescape.lawnchair.dev 63 | ch.deletescape.lawnchair.ci 64 | ch.deletescape.lawnchair.plah 65 | ch.deletescape.lawnchair 66 | " 67 | # Alternate Quickstep overlays to delete on install (without .apk) 68 | ALTSTEPS=" 69 | Hypestep 70 | " 71 | ### User defined variables ### 72 | # The directory and filename of the systemised launcher apk (without .apk) 73 | LAUNCHER=Lawnchair 74 | # The filename of the overlay to be placed in $STEPDIR (without .apk) 75 | QUICKSTEP=Lawnstep 76 | # Filename of the xml to go in /system/etc/sysconfig/ 77 | CONFXML=lawnchair-hiddenapi-package-whitelist.xml 78 | # Filename of the xml to go in /system/etc/permissions/ 79 | PERMXML=privapp-permissions-lawnchair.xml 80 | # Directory for the overlays in this module 81 | STEP=$INSTALLER/custom/Lawnstep 82 | # The warning to display if the launcher is already detected as a system app 83 | systemapp_warn() { 84 | ui_print " " 85 | ui_print " $LAUNCHER is already systemised. " 86 | ui_print " " 87 | ui_print " If $LAUNCHER came with your rom its recommended " 88 | ui_print " to have $QUICKSTEP built into the rom as well. " 89 | ui_print " If you have issues with the module, ask the rom " 90 | ui_print " developer to incorpirate $QUICKSTEP. " 91 | ui_print " " 92 | } 93 | 94 | ### Don't touch the variables below here ### 95 | CONF=$INSTALLER/custom/etc/sysconfig 96 | PERM=$INSTALLER/custom/etc/permissions 97 | if [ -d /product/overlay ]; then 98 | STEPDIR=/product/overlay 99 | ALTDIR=/product/overlay 100 | else 101 | STEPDIR=$INSTALLER$VEN/overlay 102 | ALTDIR=$VEN/overlay 103 | fi 104 | APPDIR=$INSTALLER$SYS/priv-app 105 | PERMDIR=$INSTALLER$SYS/etc/permissions 106 | CONFDIR=$INSTALLER$SYS/etc/sysconfig 107 | DATADIR=/data/app 108 | SYSDIR=/system/priv-app 109 | 110 | launcher_abort() { 111 | ui_print "*********************************************" 112 | ui_print "* $QUICKSTEP could not be installed *" 113 | ui_print "* Due to $LAUNCHER not being installed *" 114 | ui_print "* *" 115 | ui_print "* Please install $LAUNCHER, then try again *" 116 | ui_print "*********************************************" 117 | abort 118 | } 119 | product_abort() { 120 | ui_print "***************************************" 121 | ui_print "* $QUICKSTEP could not be installed *" 122 | ui_print "* Due to /product not being mountable *" 123 | ui_print "* *" 124 | ui_print "* A solution is being looked into *" 125 | ui_print "***************************************" 126 | abort 127 | } 128 | 129 | if [ $STEPDIR == "/product/overlay" ]; then mount -o remount,rw /product || product_abort; fi 130 | } 131 | 132 | # Custom Functions for Install AND Uninstall - You can put them here 133 | 134 | ########################################################################################## 135 | # Installation Message 136 | ########################################################################################## 137 | 138 | # Set what you want to show when installing your mod 139 | 140 | print_modname() { 141 | ui_print " " 142 | ui_print " _____ " 143 | ui_print " __ | | __ " 144 | ui_print " | || || | " 145 | ui_print " | || ⋋² || | " 146 | ui_print " |__|| ||__| " 147 | ui_print " |_____| " 148 | ui_print " Lawnstep " 149 | ui_print " " 150 | ui_print " The Lawnchair Team" 151 | ui_print " " 152 | } 153 | 154 | ########################################################################################## 155 | # Replace list 156 | ########################################################################################## 157 | 158 | # List all directories you want to directly replace in the system 159 | # By default Magisk will merge your files with the original system 160 | # Directories listed here however, will be directly mounted to the correspond directory in the system 161 | 162 | # You don't need to remove the example below, these values will be overwritten by your own list 163 | # This is an example 164 | REPLACE=" 165 | /system/app/Youtube 166 | /system/priv-app/SystemUI 167 | /system/priv-app/Settings 168 | /system/framework 169 | " 170 | 171 | # Construct your own list here, it will overwrite the example 172 | # !DO NOT! remove this if you don't need to replace anything, leave it empty as it is now 173 | REPLACE=" 174 | " 175 | 176 | ########################################################################################## 177 | # Permissions 178 | ########################################################################################## 179 | 180 | # NOTE: This part has to be adjusted to fit your own needs 181 | 182 | set_permissions() { 183 | # DEFAULT PERMISSIONS, DON'T REMOVE THEM 184 | $MAGISK && set_perm_recursive $MODPATH 0 0 0755 0644 185 | 186 | # CUSTOM PERMISSIONS 187 | 188 | set_perm_recursive $UNITY$VEN/overlay 0 2000 0755 0644 189 | set_perm $UNITY$VEN/overlay/* 0 0 0644 190 | 191 | # Some templates if you have no idea what to do: 192 | # Note that all files/folders have the $UNITY prefix - keep this prefix on all of your files/folders 193 | # Also note the lack of '/' between variables - preceding slashes are already included in the variables 194 | # Use $SYS for system and $VEN for vendor (Do not use $SYS$VEN, the $VEN is set to proper vendor path already - could be /vendor, /system/vendor, etc.) 195 | 196 | # set_perm_recursive (default: u:object_r:system_file:s0) 197 | # set_perm_recursive $UNITY$SYS/lib 0 0 0755 0644 198 | # set_perm_recursive $UNITY$VEN/lib/soundfx 0 0 0755 0644 199 | 200 | # set_perm (default: u:object_r:system_file:s0) 201 | # set_perm $UNITY$SYS/lib/libart.so 0 0 0644 202 | 203 | if $DEBUG; then 204 | if $BOOTMODE; then SDCARD=/storage/emulated/0; else SDCARD=/data/media/0; fi 205 | echo "---Device Info---" > $SDCARD/$MODID-debug-formatted.log 206 | grep "^ro.product.device[^#]" /system/build.prop | sed 's/ro.product.device/Device/g' >> $SDCARD/$MODID-debug-formatted.log 207 | grep "^ro.build.type[^#]" /system/build.prop | sed 's/ro.build.type/Buildtype/g' >> $SDCARD/$MODID-debug-formatted.log 208 | grep "^ro.build.version.security_patch[^#]" /system/build.prop | sed 's/ro.build.version.security_patch/SecurityPatch/g' >> $SDCARD/$MODID-debug-formatted.log 209 | grep "^ro.product.cpu.abilist[^#]" /system/build.prop | sed 's/ro.product.cpu.abilist/Arch/g' >> $SDCARD/$MODID-debug-formatted.log 210 | echo -e "\n---Variables---" >> $SDCARD/$MODID-debug-formatted.log 211 | ( set -o posix ; set ) >> $SDCARD/$MODID-debug-formatted.log 212 | echo -e "\n---Installed Files---" >> $SDCARD/$MODID-debug-formatted.log 213 | grep "^+ cp_ch" $SDCARD/$MODID-debug.log | sed 's/.* //g' >> $SDCARD/$MODID-debug-formatted.log 214 | echo -e "\n---Errors---" >> $SDCARD/$MODID-debug-formatted.log 215 | grep "^[^+'(ch.)]" $SDCARD/$MODID-debug.log >> $SDCARD/$MODID-debug-formatted.log 216 | $MAGISK && echo -e "\n---Magisk Version---\n$MAGISK_VER_CODE" >> $SDCARD/$MODID-debug-formatted.log 217 | echo -e "\n---Module Version---" >> $SDCARD/$MODID-debug-formatted.log 218 | grep "^versionCode" $INSTALLER/module.prop | sed 's/versionCode/ModuleVersion/g' >> $SDCARD/$MODID-debug-formatted.log 219 | tar cvf $SDCARD/$MODID-debug.tar -C $SDCARD $MODID-debug.log $MODID-debug-formatted.log > /dev/null 220 | mkdir -p $SDCARD/Documents/$MODID/logs 221 | cp -rf $SDCARD/$MODID-debug.tar $SDCARD/Documents/$MODID/logs/ 222 | cp -rf $SDCARD/$MODID-debug.tar /cache/ 223 | rm $SDCARD/$MODID*.log 224 | rm $SDCARD/$MODID*.tar 225 | fi 226 | } 227 | -------------------------------------------------------------------------------- /custom/Lawnstep/ch.deletescape.lawnchair.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LawnchairLauncher/LawnstepModule/0928e489528ea59c4749ce1e6e4ef39509be580b/custom/Lawnstep/ch.deletescape.lawnchair.apk -------------------------------------------------------------------------------- /custom/Lawnstep/ch.deletescape.lawnchair.ci.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LawnchairLauncher/LawnstepModule/0928e489528ea59c4749ce1e6e4ef39509be580b/custom/Lawnstep/ch.deletescape.lawnchair.ci.apk -------------------------------------------------------------------------------- /custom/Lawnstep/ch.deletescape.lawnchair.dev.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LawnchairLauncher/LawnstepModule/0928e489528ea59c4749ce1e6e4ef39509be580b/custom/Lawnstep/ch.deletescape.lawnchair.dev.apk -------------------------------------------------------------------------------- /custom/Lawnstep/ch.deletescape.lawnchair.plah.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LawnchairLauncher/LawnstepModule/0928e489528ea59c4749ce1e6e4ef39509be580b/custom/Lawnstep/ch.deletescape.lawnchair.plah.apk -------------------------------------------------------------------------------- /custom/etc/permissions/privapp-permissions-lawnchair.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /custom/etc/sysconfig/lawnchair-hiddenapi-package-whitelist.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /module.prop: -------------------------------------------------------------------------------- 1 | id=lawnstep 2 | name=Lawnstep 3 | version=v1.1.1 4 | versionCode=111 5 | author=The Lawnchair team 6 | description=Pie recents for Lawnchair v2. 7 | minMagisk=17000 8 | --------------------------------------------------------------------------------