├── .github └── workflows │ ├── Infabranch.yml │ ├── infa.yml │ ├── infa_private.yml │ └── testrelease.yml ├── LICENSE ├── META-INF └── com │ └── google │ └── android │ ├── update-binary │ └── updater-script ├── README.md ├── changelog.md ├── common ├── post-fs-data.sh ├── repo.json └── service.sh ├── customize.sh ├── infamick ├── module.prop ├── uninstall.sh ├── update-binary ├── update.json └── updater-script /.github/workflows/Infabranch.yml: -------------------------------------------------------------------------------- 1 | name: Update Main from Infatest 2 | 3 | on: 4 | workflow_dispatch: # Allows manual workflow execution 5 | 6 | jobs: 7 | update_main: 8 | runs-on: ubuntu-latest 9 | permissions: 10 | contents: write 11 | steps: 12 | - name: Checkout code 13 | uses: actions/checkout@v2 14 | with: 15 | fetch-depth: 0 # Assicurati di ottenere tutti i branch 16 | 17 | - name: Clone files from infatest to main branch and update version 18 | env: 19 | MAIL: ${{ secrets.MAIL }} 20 | run: | 21 | git config user.name "Infamousmick" 22 | git config user.email "$MAIL" 23 | 24 | # Assicuriamoci di avere l'ultimo stato di entrambi i branch 25 | git fetch origin 26 | 27 | # Passiamo al branch main 28 | git checkout main 29 | 30 | # Copiamo i file da infatest a main, escludendo .github/workflows 31 | git checkout origin/infatest -- $(git ls-tree -r origin/infatest --name-only | grep -v '^.github/workflows/') 32 | 33 | # Leggiamo la nuova versione da update.json DOPO aver copiato i file 34 | NEW_VERSION=$(jq -r .version update.json) 35 | 36 | # Verifichiamo se ci sono modifiche da committare 37 | if git diff --staged --quiet; then 38 | echo "No changes to commit" 39 | else 40 | git commit -m "$NEW_VERSION RELEASE" 41 | git push origin main 42 | fi 43 | 44 | - name: Set version output 45 | id: set_version 46 | run: echo "::set-output name=version::$(jq -r .version update.json)" 47 | 48 | - name: Print version 49 | run: echo "Updated to version ${{ steps.set_version.outputs.version }}" 50 | -------------------------------------------------------------------------------- /.github/workflows/infa.yml: -------------------------------------------------------------------------------- 1 | name: Upload to Telegram and Latest Release 2 | 3 | on: 4 | workflow_dispatch: # Allows manual workflow execution 5 | 6 | jobs: 7 | upload_and_notify: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Checkout code 11 | uses: actions/checkout@v2 12 | 13 | - name: Get latest release 14 | id: get_release 15 | uses: actions/github-script@v6 16 | with: 17 | github-token: ${{secrets.GITHUB_TOKEN}} 18 | script: | 19 | const release = await github.rest.repos.getLatestRelease({ 20 | owner: context.repo.owner, 21 | repo: context.repo.repo 22 | }); 23 | console.log(release.data); 24 | return release.data; 25 | 26 | - name: Create Magisk ZIP file 27 | run: | 28 | zip -r Infamick-script-${{ fromJson(steps.get_release.outputs.result).tag_name }}_MAGISK.zip \ 29 | changelog.md common customize.sh infamick META-INF module.prop README.md uninstall.sh 30 | 31 | - name: Upload Magisk ZIP to latest release 32 | uses: actions/upload-release-asset@v1 33 | env: 34 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 35 | with: 36 | upload_url: ${{ fromJson(steps.get_release.outputs.result).upload_url }} 37 | asset_path: ./Infamick-script-${{ fromJson(steps.get_release.outputs.result).tag_name }}_MAGISK.zip 38 | asset_name: Infamick-script-${{ fromJson(steps.get_release.outputs.result).tag_name }}_MAGISK.zip 39 | asset_content_type: application/zip 40 | 41 | - name: Notify Telegram 42 | uses: appleboy/telegram-action@master 43 | with: 44 | to: ${{ secrets.TELEGRAM_CHAT_ID }} 45 | token: ${{ secrets.TELEGRAM_TOKEN }} 46 | format: html 47 | disable_web_page_preview: true 48 | message: | 49 | New Infamick Script ${{ fromJson(steps.get_release.outputs.result).tag_name }} MAGISK Update...! 🎉 50 | 51 | CHANGELOG: 52 |
${{ fromJson(steps.get_release.outputs.result).body }}
53 | 54 | Repository: ${{ github.repository }} 55 | 56 | Commit SHA: Click here 57 | 58 | Installation : Click here 59 | 60 | Usage: Click here 61 | 62 | Download: Latest Release 63 | 64 | InfaChannel: Join here -------------------------------------------------------------------------------- /.github/workflows/infa_private.yml: -------------------------------------------------------------------------------- 1 | name: Private to Telegram and Latest Release 2 | 3 | on: 4 | workflow_dispatch: # Allows manual workflow execution 5 | 6 | jobs: 7 | upload_and_notify: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Checkout code 11 | uses: actions/checkout@v2 12 | 13 | - name: Get latest release 14 | id: get_release 15 | uses: actions/github-script@v6 16 | with: 17 | github-token: ${{secrets.GITHUB_TOKEN}} 18 | script: | 19 | const release = await github.rest.repos.getLatestRelease({ 20 | owner: context.repo.owner, 21 | repo: context.repo.repo 22 | }); 23 | console.log(release.data); 24 | return release.data; 25 | 26 | - name: Create Magisk ZIP file 27 | run: | 28 | zip -r Infamick-script-${{ fromJson(steps.get_release.outputs.result).tag_name }}_MAGISK.zip \ 29 | changelog.md common customize.sh infamick META-INF module.prop README.md uninstall.sh 30 | 31 | 32 | - name: Notify Telegram 33 | uses: appleboy/telegram-action@master 34 | with: 35 | to: ${{ secrets.TELEGRAM_PRIVATE_ID }} 36 | token: ${{ secrets.TELEGRAM_TOKEN }} 37 | format: html 38 | disable_web_page_preview: true 39 | message: | 40 | New Infamick Script ${{ fromJson(steps.get_release.outputs.result).tag_name }} MAGISK Update...! 🎉 41 | 42 | CHANGELOG: 43 |
${{ fromJson(steps.get_release.outputs.result).body }}
44 | 45 | Repository: ${{ github.repository }} 46 | 47 | Commit SHA: Click here 48 | 49 | Installation : Click here 50 | 51 | Usage: Click here 52 | 53 | Download: Latest Release 54 | 55 | InfaChannel: Join here -------------------------------------------------------------------------------- /.github/workflows/testrelease.yml: -------------------------------------------------------------------------------- 1 | name: Upload Test Release 2 | on: 3 | workflow_dispatch: # Allows manual workflow execution 4 | 5 | jobs: 6 | upload_and_notify: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - name: Checkout code 10 | uses: actions/checkout@v2 11 | 12 | - name: Get version from update.json 13 | id: get_version 14 | run: | 15 | VERSION=$(jq -r .version update.json) 16 | echo "VERSION=$VERSION" >> $GITHUB_OUTPUT 17 | 18 | - name: Set changelog 19 | id: set_changelog 20 | run: | 21 | echo "CHANGELOG<> $GITHUB_OUTPUT 22 | echo "## ${{ steps.get_version.outputs.VERSION }} - Samsung Tweaks (July 26, 2024) 23 | - Added Samsung Tweaks 24 | 1. CSC changer 25 | - Change current CSC 26 | 2. Deknoxer 27 | - Disable or Enable knox packages 28 | 3. Extra Dim 29 | - Open hidden Extra Dim menu 30 | 4. Gesture 31 | - Open hidden Gestures menu 32 | 5. Change Network Bands 33 | - Open 5G Network Bands guide 34 | 6. Lock Network Bands 35 | - Open Network Bands settings" >> $GITHUB_OUTPUT 36 | echo "EOF" >> $GITHUB_OUTPUT 37 | 38 | - name: Create and push tag 39 | run: | 40 | git config user.name github-actions 41 | git config user.email github-actions@github.com 42 | git tag -a "Test-${{ steps.get_version.outputs.VERSION }}" -m "Test release ${{ steps.get_version.outputs.VERSION }}" 43 | git push origin "Test-${{ steps.get_version.outputs.VERSION }}" 44 | 45 | - name: Create Magisk ZIP file 46 | run: | 47 | zip -r Infamick-script-${{ steps.get_version.outputs.VERSION }}_MAGISK_TEST.zip \ 48 | changelog.md common customize.sh infamick META-INF module.prop README.md uninstall.sh 49 | 50 | - name: Create Test Release 51 | id: create_release 52 | uses: actions/create-release@v1 53 | env: 54 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 55 | with: 56 | tag_name: Test-${{ steps.get_version.outputs.VERSION }} 57 | release_name: Test Release ${{ steps.get_version.outputs.VERSION }} 58 | body: ${{ steps.set_changelog.outputs.CHANGELOG }} 59 | draft: false 60 | prerelease: true 61 | 62 | - name: Upload Release Asset 63 | uses: actions/upload-release-asset@v1 64 | env: 65 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 66 | with: 67 | upload_url: ${{ steps.create_release.outputs.upload_url }} 68 | asset_path: ./Infamick-script-${{ steps.get_version.outputs.VERSION }}_MAGISK_TEST.zip 69 | asset_name: Infamick-script-${{ steps.get_version.outputs.VERSION }}_MAGISK_TEST.zip 70 | asset_content_type: application/zip 71 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /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 " Supports only Magisk v20.0+" 14 | ui_print "*******************************" 15 | ui_print " Please install Magisk v20.0+! " 16 | ui_print "*******************************" 17 | exit 1 18 | } 19 | 20 | ######################### 21 | # Load util_functions.sh 22 | ######################### 23 | 24 | OUTFD=$2 25 | ZIPFILE=$3 26 | 27 | mount /data 2>/dev/null 28 | 29 | [ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk 30 | . /data/adb/magisk/util_functions.sh 31 | [ $MAGISK_VER_CODE -lt 20000 ] && require_new_magisk 32 | 33 | if [ $MAGISK_VER_CODE -ge 20400 ]; then 34 | # New Magisk have complete installation logic within util_functions.sh 35 | install_module 36 | exit 0 37 | fi 38 | 39 | ################# 40 | # Legacy Support 41 | ################# 42 | 43 | TMPDIR=/dev/tmp 44 | PERSISTDIR=/sbin/.magisk/mirror/persist 45 | 46 | is_legacy_script() { 47 | unzip -l "$ZIPFILE" install.sh | grep -q install.sh 48 | return $? 49 | } 50 | 51 | print_modname() { 52 | local authlen len namelen pounds 53 | namelen=`echo -n $MODNAME | wc -c` 54 | authlen=$((`echo -n $MODAUTH | wc -c` + 3)) 55 | [ $namelen -gt $authlen ] && len=$namelen || len=$authlen 56 | len=$((len + 2)) 57 | pounds=$(printf "%${len}s" | tr ' ' '*') 58 | ui_print "$pounds" 59 | ui_print " $MODNAME " 60 | ui_print " by $MODAUTH " 61 | ui_print "$pounds" 62 | ui_print "----------------------------------" 63 | ui_print " Powered by Magisk" 64 | ui_print "----------------------------------" 65 | } 66 | 67 | # Override abort as old scripts have some issues 68 | abort() { 69 | ui_print "$1" 70 | $BOOTMODE || recovery_cleanup 71 | [ -n $MODPATH ] && rm -rf $MODPATH 72 | rm -rf $TMPDIR 73 | exit 1 74 | } 75 | 76 | rm -rf $TMPDIR 2>/dev/null 77 | mkdir -p $TMPDIR 78 | 79 | # Preperation for flashable zips 80 | setup_flashable 81 | 82 | # Mount partitions 83 | mount_partitions 84 | 85 | # Detect version and architecture 86 | api_level_arch_detect 87 | 88 | # Setup busybox and binaries 89 | $BOOTMODE && boot_actions || recovery_actions 90 | 91 | ############## 92 | # Preparation 93 | ############## 94 | 95 | # Extract prop file 96 | unzip -o "$ZIPFILE" module.prop -d $TMPDIR >&2 97 | [ ! -f $TMPDIR/module.prop ] && abort "! Unable to extract zip file!" 98 | 99 | $BOOTMODE && MODDIRNAME=modules_update || MODDIRNAME=modules 100 | MODULEROOT=$NVBASE/$MODDIRNAME 101 | MODID=`grep_prop id $TMPDIR/module.prop` 102 | MODNAME=`grep_prop name $TMPDIR/module.prop` 103 | MODAUTH=`grep_prop author $TMPDIR/module.prop` 104 | MODPATH=$MODULEROOT/$MODID 105 | 106 | # Create mod paths 107 | rm -rf $MODPATH 2>/dev/null 108 | mkdir -p $MODPATH 109 | 110 | ########## 111 | # Install 112 | ########## 113 | 114 | if is_legacy_script; then 115 | unzip -oj "$ZIPFILE" module.prop install.sh uninstall.sh 'common/*' -d $TMPDIR >&2 116 | 117 | # Load install script 118 | . $TMPDIR/install.sh 119 | 120 | # Callbacks 121 | print_modname 122 | on_install 123 | 124 | # Custom uninstaller 125 | [ -f $TMPDIR/uninstall.sh ] && cp -af $TMPDIR/uninstall.sh $MODPATH/uninstall.sh 126 | 127 | # Skip mount 128 | $SKIPMOUNT && touch $MODPATH/skip_mount 129 | 130 | # prop file 131 | $PROPFILE && cp -af $TMPDIR/system.prop $MODPATH/system.prop 132 | 133 | # Module info 134 | cp -af $TMPDIR/module.prop $MODPATH/module.prop 135 | 136 | # post-fs-data scripts 137 | $POSTFSDATA && cp -af $TMPDIR/post-fs-data.sh $MODPATH/post-fs-data.sh 138 | 139 | # service scripts 140 | $LATESTARTSERVICE && cp -af $TMPDIR/service.sh $MODPATH/service.sh 141 | 142 | ui_print " - Setting permissions" 143 | set_permissions 144 | else 145 | print_modname 146 | 147 | unzip -o "$ZIPFILE" customize.sh -d $MODPATH >&2 148 | 149 | if ! grep -q '^SKIPUNZIP=1$' $MODPATH/customize.sh 2>/dev/null; then 150 | ui_print " - Extracting module files" 151 | unzip -o "$ZIPFILE" -x 'META-INF/*' -d $MODPATH >&2 152 | 153 | # Default permissions 154 | set_perm_recursive $MODPATH 0 0 0755 0644 155 | fi 156 | 157 | # Load customization script 158 | [ -f $MODPATH/customize.sh ] && . $MODPATH/customize.sh 159 | fi 160 | 161 | # Handle replace folders 162 | for TARGET in $REPLACE; do 163 | ui_print " - Replace target: $TARGET" 164 | mktouch $MODPATH$TARGET/.replace 165 | done 166 | 167 | if $BOOTMODE; then 168 | # Update info for Magisk Manager 169 | mktouch $NVBASE/modules/$MODID/update 170 | cp -af $MODPATH/module.prop $NVBASE/modules/$MODID/module.prop 171 | fi 172 | 173 | # Copy over custom sepolicy rules 174 | if [ -f $MODPATH/sepolicy.rule -a -e $PERSISTDIR ]; then 175 | ui_print " - Installing custom sepolicy patch" 176 | # Remove old recovery logs (which may be filling partition) to make room 177 | rm -f $PERSISTDIR/cache/recovery/* 178 | PERSISTMOD=$PERSISTDIR/magisk/$MODID 179 | mkdir -p $PERSISTMOD 180 | cp -af $MODPATH/sepolicy.rule $PERSISTMOD/sepolicy.rule || abort "! Insufficient partition size" 181 | fi 182 | 183 | # Remove stuffs that don't belong to modules 184 | rm -rf \ 185 | $MODPATH/system/placeholder $MODPATH/customize.sh \ 186 | $MODPATH/README.md $MODPATH/.git* 2>/dev/null 187 | 188 | ############# 189 | # Finalizing 190 | ############# 191 | 192 | cd / 193 | $BOOTMODE || recovery_cleanup 194 | rm -rf $TMPDIR 195 | 196 | ui_print " - Done" 197 | exit 0 -------------------------------------------------------------------------------- /META-INF/com/google/android/updater-script: -------------------------------------------------------------------------------- 1 | #MAGISK 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Infamick Script 2 | ![Android](https://img.shields.io/badge/Android-3DDC84?logo=android&logoColor=white) 3 | ![Magisk](https://img.shields.io/badge/Magisk-red?logo=magisk) 4 | [![GitHub Release](https://img.shields.io/github/v/release/Infamousmick/Infamick-script?display_name=tag&color=%23ac53db)](https://github.com/InfamousMick/Infamick-script/releases) 5 | [![GitHub Downloads](https://img.shields.io/github/downloads/InfamousMick/Infamick-script/total?color=%67f0ab)](https://github.com/InfamousMick/Infamick-script/releases) 6 | [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](/LICENSE) 7 | [![Telegram](https://img.shields.io/badge/Telegram-2CA5E0?logo=telegram&logoColor=white)](https://t.me/InfaScript) 8 | 9 | ## Overview 10 | Infamick is a powerful system utility script for rooted Android devices. It provides easy access to various system information and settings, making it an essential tool for all users. 11 | 12 | ## Features 13 | - **Battery Health**: Check battery health status and charging cycles 14 | - **Battery optimizations settings**: Open Battery optimizations settings 15 | - **Bixby Remapper** Show current Bixby button action and remap it 16 | - **Boost Battery**: Improves battery draining 17 | - **Boost Performance**: Boost the performance of each app 18 | - **Boot Count Reset**: Reset system boot counters 19 | - **Button Mapper**: Show current Power, Volume Up and Volume Down buttons action and remap them 20 | - **Cache cleaner**: Trim caches multiple times 21 | - **Change Network Bands**: Open 5G Network Bands guide 22 | - **Charging settings**: Disable, Enable and show current charging status 23 | - **CSC Changer**: Change current CSC 24 | - **DD Backup**: Backup all possible partitions chosing a name 25 | - **Display commands**: Show, Set and Reset current display size and dpi 26 | - **Deknoxer**: Disable or Enable knox packages 27 | - **Drain Fixer**: Fixes various drain settings 28 | - **Extra Dim**: Open hidden Extra Dim menu 29 | - **Gesture**: Open hidden Gestures menu 30 | - **GMS services** : Disable or Enable GMS services 31 | - **Lock Network Bands**: Open Network Band settings 32 | - **SELinux state**: Mod to Permissive/Enforcing or show current SELinux state 33 | - **SOT Calculator**: Calculate the SOT with 100% battery 34 | - **Temperature Monitoring**: Real-time display of battery, CPU, and GPU temperatures 35 | - **User-Friendly Interface**: Color-coded output for better readability 36 | 37 | ## Installation 38 | This script is designed to be flashed as a module using Magisk, KernelSU, or APatch. 39 | 40 | 1. Download the latest release zip file [here](https://github.com/Infamousmick/Infamick-script/releases). 41 | 2. Flash the zip file through Magisk, KernelSU, or APatch. 42 | 3. Reboot your device. 43 | 4. To update check into Magisk/KSU/Apatch app 44 | 45 | ## Usage 46 | After installation, you can use the script by running `infamick` in a terminal with root access. 47 | 48 | Available commands: 49 | - `infamick batt boost`: Improves Battery draining 50 | - `infamick batt info`: Display battery health and charging cycles 51 | - `infamick batt opt`: Open battery optimizations setting 52 | - `infamick batt start`: Enable battery charging 53 | - `infamick batt status`: Show if charging is disabled/enabled 54 | - `infamick batt stop`: Disable battery charging 55 | - `infamick boot`: Reset boot count settings 56 | - `infamick btmap `: Show current Power, Volume Up and Volume Down buttons action and remap them 57 | - `infamick cache`: Trim cache multiple times 58 | - `infamick dd`: Backup all possible partitions chosing a name 59 | - `infamick dsp rs`: Reset current display size and dpi 60 | - `infamick dsp set`: Change display size and dpi 61 | - `infamick dsp sw`: Show current display size and dpi 62 | - `infamick fix datausage`: Fix data usage settings drain 63 | - `infamick fix gms`: Fix GMS drain 64 | - `infamick fix oneui`: Fix Oneui drain 65 | - `infamick fix smgcare`: Fix general apps drain in Samsung Device Care 66 | - `infamick gms disable`: Disable GMS services 67 | - `infamick gms enable`: Enable GMS services 68 | - `infamick gms fix home`: Fixes Google Home 'device not avaiable on the network' error 69 | - `infamick gms fix oneui7`: Fixes Google Home crashing on ONEUI7 after gms disable 70 | - `infamick gms fix wallet`: Fixes Google Wallet crashing/not adding new cards 71 | - `infamick info`: Show help and usage information 72 | - `infamick perf`: Boost Apps perfomances 73 | - `infamick selinux 0`: Set SELinux state to Permissive 74 | - `infamick selinux 1`: Set SELinux state to Enforcing 75 | - `infamick selinux get`: Show current SELinux state 76 | - `infamick smg bx`: Show current Bixby button action and remap it 77 | - `infamick smg csc`: Change current CSC 78 | - `infamick smg dex_d`: Disable knox packages 79 | - `infamick smg dex_e`: Enable knox packages 80 | - `infamick smg dim`: Open hidden Extra Dim menu 81 | - `infamick smg gest`: Open hidden Gestures menu 82 | - `infamick smg ntw_b`: Open 5G Network Bands guide 83 | - `infamick smg ntw_l`: Open Network Bands settings 84 | - `infamick sot` : Calculate the estimate of the sot with 100% battery 85 | - `infamick temp`: Monitor system temperatures 86 | 87 | ## Examples 88 | ```bash 89 | infamick batt stop 90 | infamick gmsd 91 | infamick exdim 92 | infamick perf 93 | infamick smg dim 94 | infamick smg ntw_l 95 | infamick temp 96 | ``` 97 | 98 | ## Contacts 99 | [@InfamousMick](https://t.me/InfamousMick) 100 | [@InfaChannel](https://t.me/InfaScript) 101 | -------------------------------------------------------------------------------- /changelog.md: -------------------------------------------------------------------------------- 1 | # Changelog for Infamick Script 2 | ## V3.2 - New Google Home ONEUI7 Fix (April 28, 25) 3 | - New `infamick gms fix oneui7` command 4 | 1. Fixes Google Home crashing on ONEUI 7 after gms disable 5 | ## V3.1 - Small improvements (April 19, 25) 6 | - Minor bug fix 7 | ## V3.0 - Infamick NEW V3 (April 18, 25) 8 | - Update customize.sh script 9 | 1. Not needed to reboot after infamick installation 10 | 2. After installation/update you can now (without reboot) run the command: `/data/local/tmp/infamick` 11 | 3. After reboot simply use `infamick` command to run the script. 12 | - GMS fixes 13 | 1. Changed `infamick gmsd` to `infamick gms disable` 14 | 2. Changed `infamick gmse` to `infamick gms enable` 15 | 3. Enabled "Fix Google HOME 'device not avaiable on the network' error as command `infamick gms fix home` 16 | 4. New `infamick gms fix wallet` command 17 | ## V2.8 - GMS Disable/Enable update (April 17, 25) 18 | - Added activities number state 19 | - Added cleaner output with error/success 20 | ## V2.7 - Google Home "device not avaiable on the network" FIX (March 13, 25) 21 | - Added fix inside GMS Disable script 22 | ## V2.6 - Fixes (August 24, 24) 23 | - Fix Magisk installation 24 | - Fix Battery info 25 | 1. Added new battery info (health and cycles) directory 26 | - Fix some Drain Fixer issues 27 | ## V2.5 - Fixes (August 19, 24) 28 | - Added SELinux info 29 | - Updated Display commands 30 | 1. Changed `infamick dsp_rs` to `infamick dsp rs` 31 | 2. Changed `infamick dsp_set` to `infamick dsp set` 32 | 3. Changed `infamick dsp_sw` to `infamick dsp sw` 33 | ## V2.4 - SELinux (August 18, 24) 34 | - Added SELinux function 35 | 1. Set SELinux state to Permissive 36 | 2. Set SELinux state to Enforcing 37 | 3. Show current SELinux state 38 | ## V2.3 - Bixby Button Remapper (August 18, 24) 39 | - Added WINK option in Bixby Button Remapper 40 | ## V2.2 - Drain Fixer (August 18, 24) 41 | - Added Drain Fixer 42 | 1. Fix data usage settings drain 43 | 2. Fix GMS drain 44 | 3. Fix Oneui drain 45 | 4. Fix general apps drain in Samsung Device Care 46 | ## V2.1 - SOT Calculator fix (August 07, 24) 47 | - Fixed SOT Calculator input 48 | - Calculate SOT with hours and minutes 49 | ## V2.0 - Button Mapper and Charging Settings (August 06, 24) 50 | - Added Button Mapper 51 | 1. Show current actions and remap for: 52 | - Volume Up 53 | - Volume Down 54 | - Power button 55 | - Added Charging Settings 56 | 1. Disable, Enable and show if charging is enabled/disabled 57 | - Battery comands: 58 | 1. Changed `batt_b` to `batt boost` 59 | 2. Changed `batt_i` to `batt info` 60 | 3. Changed `batt_s` to `batt opt` 61 | ## V1.6 - New Features (July 29, 2024) 62 | - Added Bixby Button Remapper 63 | 1. Show current Bixby Button action 64 | 2. Remap Bixby Button 65 | - Added DD Backup 66 | 1. Show all possible partitions to backup 67 | 2. Backup a chosen partition with a chosen name 68 | ## V1.5 - New Features (July 27, 2024) 69 | - Added Display commands: 70 | 1. Reset current display size and dpi 71 | 2. Change display size and dpi 72 | 3. Show current display size and dpi 73 | - Battery commands: 74 | 1. Changed `boostb` to `batt_b` 75 | 2. Changed `battery` to `batt_i` 76 | 3. New `batt_s` command to open Battery optimizations settings 77 | - Samsung Tweaks commands 78 | 1. Changed `smg exdim` to `smg dim` 79 | - Fixed help info 80 | - Fixed alignment and other stuff 81 | ## V1.4 - Samsung Tweaks (July 26, 2024) 82 | - Added Samsung Tweaks 83 | 1. CSC changer 84 | - Change current CSC 85 | 2. Deknoxer 86 | - Disable or Enable knox packages 87 | 3. Extra Dim 88 | - Open hidden Extra Dim menu 89 | 4. Gesture 90 | - Open hidden Gestures menu 91 | 5. Change Network Bands 92 | - Open 5G Network Bands guide 93 | 6. Lock Network Bands 94 | - Open Network Bands settings 95 | ## V1.3 - Autoupdate in Magisk (July 25, 2024) 96 | - Added autoupdate in Magisk 97 | - Added minutes in sot_calculator 98 | ## V1.2 - New SOT calculator (July 24, 2024) 99 | - Added Cache Cleaner 100 | 1. Trim cache multiple times 101 | - Added SOT calculator 102 | 1. Calculate the SOT with 100% battery 103 | Requires 104 | - Current SOT minutes value 105 | - Discharged percentage value 106 | ## v1.1 - First Update (July 24, 2024) 107 | - Added Boost Performance 108 | 1. Boost the performance of each app 109 | - Added Boost Battery 110 | 1. Improves battery draining 111 | - Added GMS services features 112 | 1. Disable GMS services 113 | 2. Enable GMS services 114 | ## v1.0 - Initial Release (July 24, 2024) 115 | 116 | ### System Requirements 117 | - Rooted Android device 118 | - Magisk, KernelSU, or APatch installed 119 | 120 | ### Known Issues 121 | - None reported yet. Please submit issues on my GitHub page. 122 | 123 | ### Coming Soon 124 | - Additional system information displays 125 | - Performance tweaking options 126 | - More customization features 127 | 128 | --- 129 | 130 | For full commit history, please see the [GitHub Repository](https://github.com/Infamousmick/Infamick-script). 131 | -------------------------------------------------------------------------------- /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/repo.json: -------------------------------------------------------------------------------- 1 | { 2 | "homepage": "https://github.com/Infamousmick/Infamick-script", 3 | "support": "https://github.com/Infamousmick/", 4 | "readme": "https://raw.githubusercontent.com/Infamousmick/Infamick-script/main/README.md" 5 | } 6 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /customize.sh: -------------------------------------------------------------------------------- 1 | #!/data/adb/magisk/busybox sh 2 | set -o standalone 3 | 4 | set -x 5 | # Check root environment 6 | VER=`grep_prop version $MODPATH/module.prop` 7 | VERCODE=`grep_prop versionCode $MODPATH/module.prop` 8 | 9 | ui_print " ID: $MODID" 10 | ui_print " Version: $VER" 11 | ui_print " VersionCode: $VERCODE" 12 | 13 | if [ "$KSU" = "true" ]; then 14 | ui_print " KernelSUVersion=$KSU_KERNEL_VER_CODE (kernel) + $KSU_VER_CODE (ksud)" 15 | elif [ "$APATCH" = "true" ]; then 16 | APATCH_VER=$(cat "/data/adb/ap/version") 17 | ui_print " APatchVersion=$APATCH_VER" 18 | else 19 | ui_print " Magisk=Installed" 20 | ui_print " suVersion=$(su -v)" 21 | ui_print " MagiskVersion=$(magisk -v)" 22 | ui_print " MagiskVersionCode=$(magisk -V)" 23 | fi 24 | ui_print " " 25 | 26 | # Check Android API 27 | [ $API -ge 23 ] || 28 | abort "- Unsupported API version: $API" 29 | 30 | # Patch the XML and place the modified one to the original directory 31 | { 32 | NULL="/dev/null" 33 | } 34 | 35 | # Additional add-on for check gms status 36 | ADDON() { 37 | ui_print "- Installing Infamick script" 38 | mkdir -p $MODPATH/system/bin 39 | mv -f $MODPATH/infamick $MODPATH/system/bin/infamick 40 | 41 | # Temporary symlink to use infamick immediately without reboot 42 | ln -sf $MODPATH/system/bin/infamick /data/local/tmp/infamick 43 | chmod 755 /data/local/tmp/infamick 44 | ui_print " -> You can run it immediately via: /data/local/tmp/infamick" 45 | 46 | } 47 | 48 | FINALIZE() { 49 | ui_print "- Finalizing installation" 50 | 51 | # Clean up 52 | ui_print " Cleaning obsolete files" 53 | find $MODPATH/* -maxdepth 0 \ 54 | ! -name 'module.prop' \ 55 | ! -name 'post-fs-data.sh' \ 56 | ! -name 'service.sh' \ 57 | ! -name 'system' \ 58 | -exec rm -rf {} \; 59 | 60 | # Settings dir and file permission 61 | ui_print " Settings permissions" 62 | set_perm_recursive $MODPATH 0 0 0755 0755 63 | set_perm $MODPATH/system/bin/infamick 0 2000 0755 64 | } 65 | 66 | # Final adjustment 67 | ADDON && FINALIZE 68 | 69 | ui_print "Installation completed!" 70 | ui_print "You can now (without reboot) run the command:" 71 | ui_print " /data/local/tmp/infamick" 72 | ui_print "After reboot use 'infamick' command to run the script." 73 | ui_print " " 74 | ui_print "Enjoy!" 75 | -------------------------------------------------------------------------------- /infamick: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | RED='\033[0;31m' 3 | BLUE='\033[1;34m' 4 | GREEN='\033[0;32m' 5 | YELLOW='\033[1;33m' 6 | BOLD='\033[1m' 7 | RESET='\033[0m' 8 | BOLD_WHITE='\033[1;37m' 9 | LIGHT_YELLOW='\033[1;93m' 10 | brand=$(getprop ro.product.system.brand) 11 | model=$(getprop ro.product.system.model) 12 | INDENT=" " 13 | INDENTN="\n " 14 | CHARGING_PATH="/sys/class/power_supply/battery/charging_enabled" 15 | Mod_Version=$(grep '^version=' /data/adb/modules/Infamick_script/module.prop | cut -d= -f2) 16 | Mod_VersionCode=$(grep '^versionCode=' /data/adb/modules/Infamick_script/module.prop | cut -d= -f2) 17 | 18 | reboot_quest() { 19 | read -n 1 confirm_choice 20 | case $confirm_choice in 21 | [Yy]*) 22 | printf "${INDENTN}${YELLOW}[i] Rebooting.. ${RESET}" 23 | sleep 2 24 | reboot 25 | ;; 26 | [nN]) 27 | printf "${INDENTN}${GREEN}[i] No reboot${RESET}\n" 28 | ;; 29 | *) 30 | printf "${INDENTN}${RED}Error: Wrong option '$confirm_choice'${RESET}\n" 31 | ;; 32 | esac 33 | } 34 | smg_check() { 35 | if echo "$brand" | grep -iq "samsung"; then 36 | export IS_SAMSUNG=1 37 | export brand="$brand" 38 | export model="$model" 39 | else 40 | export IS_SAMSUNG=0 41 | export brand="$brand" 42 | fi 43 | 44 | if echo "$IS_SAMSUNG" | grep -iq "1"; then 45 | printf "\n${LIGHT_YELLOW}[+] Your Device is : ${BOLD_WHITE}${model}${RESET}\n${LIGHT_YELLOW}[i] Starting Samsung Tweaks...${RESET}\n" 46 | sleep 2 47 | return 0 48 | else 49 | printf "\n${RED}[x] 'Samsung Tweaks' are not supported in a '${brand}' model 🤨\n${RESET}" 50 | sleep 1 51 | printf "${LIGHT_YELLOW}\n[i] Returning to Start..\n${RESET}" 52 | return 1 53 | fi 54 | } 55 | 56 | temp_check() { 57 | while true; do 58 | # Ottieni la temperatura della batteria 59 | battery_temp_file="/sys/class/power_supply/battery/temp" 60 | if [ -f "$battery_temp_file" ]; then 61 | battery_temp=$(cat "$battery_temp_file") 62 | battery_temp=$((battery_temp / 10)) 63 | else 64 | battery_temp="N/A" 65 | fi 66 | 67 | # Ottieni la temperatura della CPU 68 | cpu_temp_file="/sys/class/thermal/thermal_zone1/temp" 69 | if [ -f "$cpu_temp_file" ]; then 70 | cpu_temp=$(cat "$cpu_temp_file") 71 | cpu_temp=$((cpu_temp / 1000)) 72 | else 73 | cpu_temp="N/A" 74 | fi 75 | 76 | # Ottieni la temperatura della GPU 77 | gpu_temp_file="/sys/class/thermal/thermal_zone3/temp" 78 | if [ -f "$gpu_temp_file" ]; then 79 | gpu_temp=$(cat "$gpu_temp_file") 80 | gpu_temp=$((gpu_temp / 1000)) 81 | else 82 | gpu_temp="N/A" 83 | fi 84 | 85 | # Usa \033[1A per muoversi su una riga e \033[K per pulire la riga 86 | for i in $(seq 1 $line_count); do 87 | echo -ne "\033[1A\033[K" 88 | done 89 | 90 | # Stampa le nuove temperature 91 | echo -ne "${INDENTN}${BOLD}Battery temperature: ${YELLOW}${battery_temp}°C${RESET}" 92 | echo -ne "${INDENTN}${BOLD}CPU temperature: ${YELLOW}${cpu_temp}°C${RESET}" 93 | echo -ne "${INDENTN}${BOLD}GPU temperature: ${YELLOW}${gpu_temp}°C${RESET}" 94 | echo -ne "${INDENTN}${GREEN}${BOLD}Press ${RED}CTRL+C${GREEN} to exit temperature monitoring${RESET}\n" 95 | sleep 2 96 | clear 97 | done 98 | } 99 | 100 | services=( 101 | "com.google.android.gms/com.google.android.gms.nearby.messages.service.NearbyMessagesService" 102 | "com.google.android.gms/com.google.android.gms.nearby.discovery.service.DiscoveryService" 103 | "com.google.android.gms/.chimera.GmsIntentOperationService" 104 | "com.google.android.gms/com.google.android.gms.nearby.messages.service.NearbyMessagesService" 105 | "com.google.android.gms/com.google.android.gms.nearby.discovery.service.DiscoveryService" 106 | "com.google.android.gms/.chimera.GmsIntentOperationService" 107 | "com.google.android.gms/.kids.KidSetupActivity" 108 | "com.google.android.gms/.kids.LockscreenActivity" 109 | "com.google.android.gms/.kids.LockscreenActivityV2" 110 | "com.google.android.gms/.kids.LockscreenUnlockActivity" 111 | "com.google.android.gms/.kids.ParentAccessActivity" 112 | "com.google.android.gms/.kids.SyncTailTrapperActivity" 113 | "com.google.android.gms/.kids.TransparencyActivity" 114 | "com.google.android.gms/.kids.chimera.RegisterProfileOwnerActivityProxy" 115 | "com.google.android.gms/.kids.settings.KidsSettingsActivity" 116 | "com.google.android.gms/.kids.settings.KidsSettingsActivityAliasSuw" 117 | "com.google.android.gms/.nearby.discovery.devices.DevicesListActivity" 118 | "com.google.android.gms/.nearby.discovery.devices.FindDeviceActivity" 119 | "com.google.android.gms/.nearby.discovery.fastpair.AtvConnectActivity" 120 | "com.google.android.gms/.nearby.discovery.fastpair.CompanionAppInstallActivity" 121 | "com.google.android.gms/.nearby.discovery.fastpair.HalfSheetActivity" 122 | "com.google.android.gms/.nearby.exposurenotification.settings.SettingsActivity" 123 | "com.google.android.gms/.nearby.exposurenotification.settings.SettingsActivityAlias" 124 | "com.google.android.gms/.nearby.exposurenotification.settings.SettingsCheckerActivity" 125 | "com.google.android.gms/.nearby.exposurenotification.settings.SettingsCollapsingToolbarActivity" 126 | "com.google.android.gms/.nearby.messages.settings.NearbyMessagesAppOptInActivity" 127 | "com.google.android.gms/.nearby.setup.ui.WifiConsentActivity" 128 | "com.google.android.gms/.nearby.sharing.ConsentsActivity" 129 | "com.google.android.gms/.nearby.sharing.DeviceVisibilityActivity" 130 | "com.google.android.gms/.nearby.sharing.InternalReceiveSurfaceActivity" 131 | "com.google.android.gms/.nearby.sharing.InternalShareSheetActivity" 132 | "com.google.android.gms/.nearby.sharing.QuickSettingsActivity" 133 | "com.google.android.gms/.nearby.sharing.ReceiveSurfaceActivity" 134 | "com.google.android.gms/.nearby.sharing.SettingsActivity" 135 | "com.google.android.gms/.nearby.sharing.SettingsActivityAlias" 136 | "com.google.android.gms/.nearby.sharing.SettingsCollapsingToolbarActivity" 137 | "com.google.android.gms/.nearby.sharing.SettingsCollapsingToolbarActivityAlias" 138 | "com.google.android.gms/.nearby.sharing.SettingsPreferenceActivity" 139 | "com.google.android.gms/.nearby.sharing.SettingsPreferenceActivityAlias" 140 | "com.google.android.gms/.nearby.sharing.SetupActivity" 141 | "com.google.android.gms/.nearby.sharing.ShareSheetActivity" 142 | "com.google.android.gms/.nearby.sharing.ShareSheetActivityAlias" 143 | "com.google.android.gms/.nearby.sharing.ShareSheetActivityAliasSamsungGallery" 144 | "com.google.android.gms/.nearby.sharing.ShareSheetActivityAliasSamsungMyFiles" 145 | "com.google.android.gms/.fitness.settings.FitnessSettingsActivity" 146 | "com.google.android.gms/.wearable.consent.PrivacySettingsActivity" 147 | "com.google.android.gms/.wearable.consent.TermsOfServiceActivity" 148 | "com.google.android.gms/.wearable.playsetup.ui.AppInstallActivity" 149 | "com.google.android.gms/.wearable.ui.WearableManageSpaceActivity" 150 | "com.google.android.gms/.feedback.FeedbackActivity" 151 | "com.google.android.gms/.feedback.IntentListenerFeedbackActivity" 152 | "com.google.android.gms/.feedback.PreviewActivity" 153 | "com.google.android.gms/.feedback.PreviewScreenshotActivity" 154 | "com.google.android.gms/.feedback.ShowTextActivity" 155 | "com.google.android.gms/.feedback.SuggestionsActivity" 156 | "com.google.android.gms/.googlehelp.contact.chat.ChatConversationActivity" 157 | "com.google.android.gms/.googlehelp.helpactivities.DeviceSignalsExportActivity" 158 | "com.google.android.gms/.googlehelp.helpactivities.ExitActivity" 159 | "com.google.android.gms/.googlehelp.helpactivities.HelpActivity" 160 | "com.google.android.gms/.googlehelp.helpactivities.OpenHelpActivity" 161 | "com.google.android.gms/.googlehelp.helpactivities.OpenHelpRtcActivity" 162 | "com.google.android.gms/.googlehelp.helpactivities.SystemAppTrampolineActivity" 163 | "com.google.android.gms/.googlehelp.webview.GoogleHelpRenderingApiWebViewActivity" 164 | "com.google.android.gms/.googlehelp.webview.GoogleHelpWebViewActivity" 165 | "com.google.android.gms/.ads.settings.AdsSettingsActivity" 166 | "com.google.android.gms/.plus.activity.AccountSignUpActivity" 167 | "com.google.android.gms/.plus.apps.ListAppsActivity" 168 | "com.google.android.gms/.plus.apps.ManageAppActivity" 169 | "com.google.android.gms/.plus.apps.ManageDeviceActivity" 170 | "com.google.android.gms/.plus.apps.ManageMomentActivity" 171 | "com.google.android.gms/.plus.audience.AclSelectionActivity" 172 | "com.google.android.gms/.plus.audience.AudienceSearchActivity" 173 | "com.google.android.gms/.plus.audience.CircleCreationActivity" 174 | "com.google.android.gms/.plus.audience.CircleSelectionActivity" 175 | "com.google.android.gms/.plus.audience.FaclSelectionActivity" 176 | "com.google.android.gms/.plus.audience.UpdateActionOnlyActivity" 177 | "com.google.android.gms/.plus.audience.UpdateCirclesActivity" 178 | "com.google.android.gms/.plus.circles.AddToCircleConsentActivity" 179 | "com.google.android.gms/.plus.oob.PlusActivity" 180 | "com.google.android.gms/.plus.oob.UpgradeAccountActivity" 181 | "com.google.android.gms/.plus.oob.UpgradeAccountInfoActivity" 182 | "com.google.android.gms/.plus.plusone.PlusOneActivity" 183 | "com.google.android.gms/.plus.sharebox.AddToCircleActivity" 184 | "com.google.android.gms/.plus.sharebox.ReplyBoxActivity" 185 | "com.google.android.gms/.plus.sharebox.ShareBoxActivity" 186 | "com.google.android.gms/.plus.ui.DpadNavigableWebViewActivity" 187 | "com.google.android.gms/.games.AddAccountActivity" 188 | "com.google.android.gms/.games.InstallPlayGamesActivity" 189 | "com.google.android.gms/.games.PlayGamesUpgradeActivity" 190 | "com.google.android.gms/.games.ui.ingame.FeatureNotAvailableActivity" 191 | "com.google.android.gms/.games.ui.profile.CreateProfileActivity" 192 | "com.google.android.gms/.games.ui.promotions.InGamePromotionsActivity" 193 | "com.google.android.gms/.games.ui.settings.GamesSettingsActivity" 194 | "com.google.android.gms/.games.ui.settingsv2.GamesSettingsActivity" 195 | "com.google.android.gms/.games.ui.signinflow.SignInActivity" 196 | "com.google.android.gms/.games.ui.upsell.InGameUiProxyActivity" 197 | "com.google.android.gms/.games.ui.upsell.InstallPlayGamesActivity" 198 | "com.google.android.gms/.games.ui.video.ScreenCaptureRequestActivity" 199 | "com.google.android.gms/.cast.activity.CastPopupActivity" 200 | "com.google.android.gms/.findmydevice.spot.deeplinks.DeepLinkActivity" 201 | "com.google.android.gms/.mdm.settings.FindMyDeviceSettingsActivity" 202 | "com.google.android.gms/.mdm.services.MdmPhoneWearableListenerService" 203 | "com.google.android.gms/.usagereporting.settings.UsageReportingActivity" 204 | "com.google.android.gms/.usagereporting.ui.UsageReportingDebugActivity" 205 | "com.google.android.gms/.usagereporting.ui.UsageReportingDialogActivity" 206 | "com.google.android.gms/.pay.deeplink.AliasAddSignUpValuablesDeepLinkActivity" 207 | "com.google.android.gms/.pay.deeplink.AliasSaveValuablesDeepLinkActivity" 208 | "com.google.android.gms/.pay.deeplink.AliasViewValuablesDetailsDeepLinkActivity" 209 | "com.google.android.gms/.pay.deeplink.DeepLinkActivity" 210 | "com.google.android.gms/.pay.main.PayActivity" 211 | "com.google.android.gms/.pay.main.PayOptionalActivity" 212 | "com.google.android.gms/.tapandpay.account.SelectAccountActivity" 213 | "com.google.android.gms/.tapandpay.admin.DeviceAdminPromptActivity" 214 | "com.google.android.gms/.tapandpay.diagnostics.TapDiagnosticsActivity" 215 | "com.google.android.gms/.tapandpay.issuer.RequestDeleteTokenActivity" 216 | "com.google.android.gms/.tapandpay.issuer.RequestSelectTokenActivity" 217 | "com.google.android.gms/.tapandpay.issuer.RequestTokenizeActivity" 218 | "com.google.android.gms/.tapandpay.keyguard.KeyguardSecurityInfoActivity" 219 | "com.google.android.gms/.tapandpay.settings.NotificationSettingsActivity" 220 | "com.google.android.gms/.tapandpay.settings.SelectOtherPaymentMethodActivity" 221 | "com.google.android.gms/.tapandpay.settings.SelectUntokenizedCardActivity" 222 | "com.google.android.gms/.tapandpay.settings.TapAndPaySettingsActivity" 223 | "com.google.android.gms/.tapandpay.tap.TapKeyguardActivity" 224 | "com.google.android.gms/.tapandpay.tap.TapUiActivity" 225 | "com.google.android.gms/.tapandpay.tokenization.AcceptGooglePayTosActivity" 226 | "com.google.android.gms/.tapandpay.tokenization.AcceptTosActivity" 227 | "com.google.android.gms/.tapandpay.tokenization.AddNewCardForTokenizationActivity" 228 | "com.google.android.gms/.tapandpay.tokenization.AddNewCardThroughBrowserActivity" 229 | "com.google.android.gms/.tapandpay.tokenization.EnableNfcActivity" 230 | "com.google.android.gms/.tapandpay.tokenization.EnterVerificationCodeActivity" 231 | "com.google.android.gms/.tapandpay.tokenization.NameResolutionActivity" 232 | "com.google.android.gms/.tapandpay.tokenization.SelectVerificationMethodActivity" 233 | "com.google.android.gms/.tapandpay.tokenization.SummaryActivity" 234 | "com.google.android.gms/.tapandpay.tokenization.TokenizePanActivity" 235 | "com.google.android.gms/.tapandpay.tokenization.UnsupportedCardActivity" 236 | "com.google.android.gms/.tapandpay.transaction.WalletTransactionDetailsActivity" 237 | "com.google.android.gms/.tapandpay.ui.EnableSecureKeyguardActivity" 238 | "com.google.android.gms/.tapandpay.ui.PromptSetupActivity" 239 | "com.google.android.gms/.tapandpay.ui.SecureDeviceActivity" 240 | "com.google.android.gms/.tapandpay.ui.ShowSecurityPromptActivity" 241 | "com.google.android.gms/.tapandpay.ui.TokenizationSuccessActivity" 242 | "com.google.android.gms/.tapandpay.ui.WarmWelcomeActivity" 243 | "com.google.android.gms/.tapandpay.wear.WearProxyActivity" 244 | "com.google.android.gms/.tapandpay.wear.WearProxyCompanionActivity" 245 | "com.google.android.gms/.tapandpay.wear.dialog.WearSecureKeyguardDialogActivity" 246 | "com.google.android.gms/.tapandpay.wear.dialog.WearTapAndPayDialogActivity" 247 | "com.google.android.gms/.wallet.activity.GenericDelegatorActivity" 248 | "com.google.android.gms/.wallet.activity.OrchestrationDelegatorActivity" 249 | "com.google.android.gms/.wallet.bender3.Bender3FinishRedirectProxyActivity" 250 | "com.google.android.gms/.wallet.common.ui.UpdateCallingAppActivity" 251 | "com.google.android.gms/.wallet.ib.IbPaymentRequestCompatActivity" 252 | "com.google.android.gms/.wallet.idcredit.IdCreditActivity" 253 | "com.google.android.gms/.wallet.im.ImRootActivity" 254 | "com.google.android.gms/.wallet.ow.ChooseAccountShimActivity" 255 | "com.google.android.gms/.wallet.ow.ChooseAccountShimInternalActivity" 256 | "com.google.android.gms/.wallet.paymentmethods.PaymentMethodsActivity" 257 | "com.google.android.gms/.wallet.pm.pmRootActivity" 258 | "com.google.android.gms/.wallet.redirect.FinishAndroidAppRedirectProxyActivity" 259 | "com.google.android.gms/.wallet.selector.InitializeGenericSelectorRootActivity" 260 | "com.google.android.gms/.wallet.setupwizard.PaymentsSetupWizardActivity" 261 | "com.google.android.gms/.wallet.setupwizard.PaymentsSetupWizardMainActivity" 262 | "com.google.android.gms/.wallet.setupwizard.PaymentsSetupWizardPortalActivity" 263 | "com.google.android.gms/.wallet.setupwizard.PaymentsSetupWizardReactivationActivity" 264 | "com.google.android.gms/.wallet.setupwizard.PaymentsSetupWizardTokenEligibleActivity" 265 | "com.google.android.gms/.wallet.timelineview.TimeLineViewActivity" 266 | "com.google.android.gms/.walletp2p.feature.completion.CompleteMoneyTransferActivity" 267 | "com.google.android.gms/.walletp2p.feature.transfer.TransferMoneyActivity" 268 | # Providers 269 | "com.google.android.gms/.nearby.discovery.fastpair.slice.FastPairContextualCardProvider" 270 | "com.google.android.gms/.nearby.discovery.fastpair.slice.FastPairSliceProvider" 271 | "com.google.android.gms/.nearby.sharing.SharingSliceProvider" 272 | "com.google.android.gms/.fitness.sync.FitnessContentProvider" 273 | "com.google.android.gms/.ads.adinfo.AdvertisingInfoContentProvider" 274 | "com.google.android.gms/.games.chimera.GamesContentProviderProxy" 275 | "com.google.android.gms/.games.provider.NotificationStubContentProvider" 276 | "com.google.android.gms/.plus.provider.PlusProvider" 277 | "com.google.android.gms/.phenotype.provider.ConfigurationProvider" 278 | "com.google.android.gms/.wallet.setupwizard.PaymentsSetupWizardSuggestionStateProvider" 279 | # Receivers 280 | "com.google.android.gms/.kids.account.receiver.ProfileOwnerReceiver" 281 | "com.google.android.gms/.nearby.discovery.fastpair.slice.FastPairContextualCardProvider" 282 | "com.google.android.gms/.googlehelp.GcmBroadcastReceiver" 283 | "com.google.android.gms/.ads.config.FlagsReceiver" 284 | "com.google.android.gms/.analytics.AnalyticsReceiver" 285 | "com.google.android.gms/.games.chimera.GamesSystemBroadcastReceiverProxy" 286 | "com.google.android.gms/.games.chimera.InternalIntentReceiverProxy" 287 | "com.google.android.gms/.phenotype.service.FlagOverrideReceiver" 288 | "com.google.android.gms/com.google.android.libraries.phenotype.client.stable.AccountRemovedBroadcastReceiver" 289 | "com.google.android.gms/.pay.notifications.GcmBroadcastReceiver" 290 | "com.google.android.gms/.tapandpay.admin.TpDeviceAdminReceiver" 291 | "com.google.android.gms/.tapandpay.notifications.GcmBroadcastReceiver" 292 | "com.google.android.gms/.stats.service.DropBoxEntryAddedReceiver" 293 | # Services 294 | "com.google.android.gms/.kids.GcmReceiverService" 295 | "com.google.android.gms/.kids.JobService" 296 | "com.google.android.gms/.kids.SecondaryLockscreenService" 297 | "com.google.android.gms/.kids.SupervisionService" 298 | "com.google.android.gms/.kids.chimera.KidsServiceProxy" 299 | "com.google.android.gms/.nearby.bootstrap.service.NearbyBootstrapService" 300 | "com.google.android.gms/.nearby.connection.service.NearbyConnectionsAndroidService" 301 | "com.google.android.gms/.nearby.discovery.service.DiscoveryService" 302 | "com.google.android.gms/.nearby.exposurenotification.WakeUpService" 303 | "com.google.android.gms/.nearby.exposurenotification.service.ExposureMatchingService" 304 | "com.google.android.gms/.nearby.exposurenotification.service.ExposureMatchingTriggerService" 305 | "com.google.android.gms/.nearby.exposurenotification.service.ExposureNotificationInternalService" 306 | "com.google.android.gms/.nearby.fastpair.service.WearableDataListenerService" 307 | "com.google.android.gms/.nearby.mediums.nearfieldcommunication.NfcAdvertisingService" 308 | "com.google.android.gms/.nearby.messages.debug.DebugPokeService" 309 | "com.google.android.gms/.nearby.messages.offline.OfflineCachingService" 310 | "com.google.android.gms/.nearby.messages.service.NearbyMessagesService" 311 | "com.google.android.gms/.nearby.sharing.DirectShareService" 312 | "com.google.android.gms/.nearby.sharing.ReceiveSurfaceService" 313 | "com.google.android.gms/.nearby.sharing.SharingSyncService" 314 | "com.google.android.gms/.nearby.sharing.SharingTileService" 315 | "com.google.android.gms/.chimera.CarBoundBrokerService" 316 | "com.google.android.gms/.chimera.CastPersistentBoundBrokerService" 317 | "com.google.android.gms/.fitness.cache.DataUpdateListenerCacheService" 318 | "com.google.android.gms/.fitness.sensors.sample.CollectSensorService" 319 | "com.google.android.gms/.fitness.service.ble.FitBleBroker" 320 | "com.google.android.gms/.fitness.service.config.FitConfigBroker" 321 | "com.google.android.gms/.fitness.service.goals.FitGoalsBroker" 322 | "com.google.android.gms/.fitness.service.history.FitHistoryBroker" 323 | "com.google.android.gms/.fitness.service.internal.FitInternalBroker" 324 | "com.google.android.gms/.fitness.service.proxy.FitProxyBroker" 325 | "com.google.android.gms/.fitness.service.recording.FitRecordingBroker" 326 | "com.google.android.gms/.fitness.service.sensors.FitSensorsBroker" 327 | "com.google.android.gms/.fitness.service.sessions.FitSessionsBroker" 328 | "com.google.android.gms/.fitness.service.wearable.WearableSyncAccountService" 329 | "com.google.android.gms/.fitness.service.wearable.WearableSyncConfigService" 330 | "com.google.android.gms/.fitness.service.wearable.WearableSyncConnectionService" 331 | "com.google.android.gms/.fitness.service.wearable.WearableSyncMessageService" 332 | "com.google.android.gms/.fitness.sync.FitnessSyncAdapterService" 333 | "com.google.android.gms/.fitness.sync.SyncGcmTaskService" 334 | "com.google.android.gms/.fitness.wearables.WearableSyncService" 335 | "com.google.android.gms/.wearable.service.WearableService" 336 | "com.google.android.gms/.feedback.FeedbackAsyncService" 337 | "com.google.android.gms/.feedback.LegacyBugReportService" 338 | "com.google.android.gms/.feedback.OfflineReportSendTaskService" 339 | "com.google.android.gms/.googlehelp.contact.chat.ChatRequestAndConversationService" 340 | "com.google.android.gms/.googlehelp.gcm.InvalidateGcmTokenGcmTaskService" 341 | "com.google.android.gms/.googlehelp.metrics.ReportBatchedMetricsGcmTaskService" 342 | "com.google.android.gms/.googlehelp.service.GoogleHelpService" 343 | "com.google.android.gms/.ads.AdRequestBrokerService" 344 | "com.google.android.gms/.ads.GservicesValueBrokerService" 345 | "com.google.android.gms/.ads.cache.CacheBrokerService" 346 | "com.google.android.gms/.ads.identifier.service.AdvertisingIdNotificationService" 347 | "com.google.android.gms/.ads.identifier.service.AdvertisingIdService" 348 | "com.google.android.gms/.ads.jams.NegotiationService" 349 | "com.google.android.gms/.ads.measurement.GmpConversionTrackingBrokerService" 350 | "com.google.android.gms/.ads.social.GcmSchedulerWakeupService" 351 | "com.google.android.gms/.analytics.AnalyticsService" 352 | "com.google.android.gms/.analytics.AnalyticsTaskService" 353 | "com.google.android.gms/.analytics.internal.PlayLogReportingService" 354 | "com.google.android.gms/.analytics.service.AnalyticsService" 355 | "com.google.android.gms/.plus.service.DefaultIntentService" 356 | "com.google.android.gms/.plus.service.ImageIntentService" 357 | "com.google.android.gms/.plus.service.OfflineActionSyncAdapterService" 358 | "com.google.android.gms/.plus.service.PlusService" 359 | "com.google.android.gms/.games.chimera.GamesAndroidServiceProxy" 360 | "com.google.android.gms/.games.chimera.GamesAsyncServiceProxy" 361 | "com.google.android.gms/.games.chimera.GamesSignInIntentServiceProxy" 362 | "com.google.android.gms/.games.chimera.GamesSignInServiceProxy" 363 | "com.google.android.gms/.games.chimera.GamesSyncServiceMainProxy" 364 | "com.google.android.gms/.games.chimera.GamesSyncServiceNotificationProxy" 365 | "com.google.android.gms/.games.chimera.GamesUploadServiceProxy" 366 | "com.google.android.gms/.games.chimera.RoomAndroidServiceProxy" 367 | "com.google.android.gms/.games.chimera.SnapshotEventServiceProxy" 368 | "com.google.android.gms/.photos.autobackup.service.AutoBackupService" 369 | "com.google.android.gms/.measurement.service.MeasurementBrokerService" 370 | "com.google.android.gms/.cast.media.CastMediaRoute2ProviderService" 371 | "com.google.android.gms/.cast.media.CastMediaRoute2ProviderService_Isolated" 372 | "com.google.android.gms/.cast.media.CastMediaRoute2ProviderService_Persistent" 373 | "com.google.android.gms/.cast.media.CastMediaRouteProviderService" 374 | "com.google.android.gms/.cast.media.CastMediaRouteProviderService_Isolated" 375 | "com.google.android.gms/.cast.media.CastMediaRouteProviderService_Persistent" 376 | "com.google.android.gms/.cast.media.CastRemoteDisplayProviderService" 377 | "com.google.android.gms/.cast.media.CastRemoteDisplayProviderService_Isolated" 378 | "com.google.android.gms/.cast.media.CastRemoteDisplayProviderService_Persistent" 379 | "com.google.android.gms/.cast.service.CastPersistentService" 380 | "com.google.android.gms/.cast.service.CastPersistentService_Isolated" 381 | "com.google.android.gms/.cast.service.CastPersistentService_Persistent" 382 | "com.google.android.gms/.cast.service.CastSocketMultiplexerLifeCycleService" 383 | "com.google.android.gms/.cast.service.CastSocketMultiplexerLifeCycleService_Isolated" 384 | "com.google.android.gms/.cast.service.CastSocketMultiplexerLifeCycleService_Persistent" 385 | "com.google.android.gms/.chimera.GmsIntentOperationService ## bug log flood" 386 | "com.google.android.gms/.common.config.PhenotypeCheckinService" 387 | "com.google.android.gms/.phenotype.gcm.GcmReceiverService" 388 | "com.google.android.gms/.phenotype.service.sync.PackageUpdateTaskService" 389 | "com.google.android.gms/.phenotype.service.sync.PhenotypeConfigurator" 390 | "com.google.android.gms/com.google.android.libraries.phenotype.registration.PhenotypeMetadataHolderService" 391 | "com.google.android.gms/.usagereporting.service.UsageReportingIntentService" 392 | "com.google.android.gms/.pay.gcmtask.PayGcmTaskService" 393 | "com.google.android.gms/.pay.hce.service.PayHceService" 394 | "com.google.android.gms/.pay.notifications.PayNotificationService" 395 | "com.google.android.gms/.pay.security.storagekey.service.StorageKeyCacheService" 396 | "com.google.android.gms/.tapandpay.gcmtask.TapAndPayGcmTaskService" 397 | "com.google.android.gms/.tapandpay.globalactions.QuickAccessWalletService" 398 | "com.google.android.gms/.tapandpay.hce.service.TpHceService" 399 | "com.google.android.gms/.tapandpay.security.StorageKeyCacheService" 400 | "com.google.android.gms/.tapandpay.tokenization.TokenizePanService" 401 | "com.google.android.gms/.tapandpay.wear.WearProxyService" 402 | "com.google.android.gms/.wallet.service.PaymentService" 403 | "com.google.android.gms/.wallet.service.WalletGcmTaskService" 404 | "com.google.android.gms/.wallet.service.address.AddressService" 405 | "com.google.android.gms/.backup.stats.BackupStatsService" 406 | "com.google.android.gms/.common.stats.StatsUploadService" 407 | "com.google.android.gms/.common.stats.net.NetworkReportService" 408 | "com.google.android.gms/.stats.PlatformStatsCollectorService" 409 | "com.google.android.gms/.stats.service.DropBoxEntryAddedService" 410 | "com.google.android.gms/.chimera.GmsIntentOperationService" 411 | ) 412 | services_gmshome=( 413 | "com.google.android.gms/com.google.android.location.network.NetworkLocationService" 414 | "com.google.android.gms/.cast.media.CastMediaRoute2ProviderService_Persistent" 415 | ) 416 | services_gmshomeui7=( 417 | "com.google.android.gms/.phenotype.provider.ConfigurationProvider" 418 | ) 419 | services_gmswallet=( 420 | "com.google.android.gms/.pay.main.PayActivity" 421 | ) 422 | help_menu() { 423 | echo 424 | printf "\n${BOLD}infamick - System Utility Script${RESET}" 425 | printf "\n${RED}${BOLD}${Mod_Version} (${Mod_VersionCode})" 426 | echo 427 | printf "\n${GREEN}Usage:${RESET} infamick ${BOLD} ${BLUE}${BOLD}<2ndcommand>${RESET}" 428 | echo 429 | printf "\n${YELLOW}Available commands:${RESET}" 430 | printf "\n ${BOLD}batt${RESET} ${BLUE}${BOLD}boost${RESET} - Improves battery draining" 431 | printf "\n Run only while charging at 100" 432 | printf "\n ${BOLD}batt${RESET} ${BLUE}${BOLD}info${RESET} - Display battery health and" 433 | printf "\n charging cycles" 434 | printf "\n ${BOLD}batt${RESET} ${BLUE}${BOLD}opt${RESET} - Open battery optimizations setting" 435 | printf "\n ${BOLD}batt${RESET} ${BLUE}${BOLD}start${RESET} - Enable battery charging" 436 | printf "\n ${BOLD}batt${RESET} ${BLUE}${BOLD}status${RESET} - Show if charging is disabled/enabled" 437 | printf "\n ${BOLD}batt${RESET} ${BLUE}${BOLD}stop${RESET} - Disable battery charging" 438 | echo 439 | printf "\n ${BOLD}boot${RESET} - Reset boot count settings" 440 | printf "\n Sets global boot_count and" 441 | printf "\n Phenotype_boot_count to 0" 442 | echo 443 | printf "\n ${BOLD}btmap${RESET} - Show current Power, Volume Up and Volume" 444 | printf "\n Down buttons action and remap them" 445 | echo 446 | printf "\n ${BOLD}cache${RESET} - Trim cache multiple times" 447 | echo 448 | printf "\n ${BOLD}dd${RESET} - Backup all possible partitions" 449 | printf "\n chosing a name" 450 | echo 451 | printf "\n ${BOLD}dsp ${BLUE}${BOLD}rs${RESET} - Reset current display size and dpi" 452 | printf "\n ${BOLD}dsp ${BLUE}${BOLD}set${RESET} - Change display size and dpi " 453 | printf "\n ${BOLD}dsp ${BLUE}${BOLD}sw${RESET} - Show current display size and dpi" 454 | echo 455 | printf "\n ${BOLD}fix${RESET} ${BLUE}${BOLD}datausage${RESET} - Fix data usage settings drain" 456 | printf "\n ${BOLD}fix${RESET} ${BLUE}${BOLD}gms${RESET} - Fix GMS drain" 457 | printf "\n ${BOLD}fix${RESET} ${BLUE}${BOLD}oneui${RESET} - Fix Oneui drain" 458 | printf "\n ${BOLD}fix${RESET} ${BLUE}${BOLD}smgcare${RESET} - Fix general apps drain in" 459 | printf "\n Samsung Device Care" 460 | echo 461 | printf "\n ${BOLD}gms${RESET} ${BLUE}${BOLD}disable${RESET} - Disables GMS services" 462 | printf "\n ${BOLD}gms${RESET} ${BLUE}${BOLD}enable${RESET} - Enables GMS services" 463 | printf "\n ${BOLD}gms${RESET} ${BLUE}${BOLD}fix ${RED}home${RESET} - Fixes Google Home device not avaiable on" 464 | printf "\n the network error" 465 | printf "\n ${BOLD}gms${RESET} ${BLUE}${BOLD}fix ${RED}oneui7${RESET} - Fixes Google Home crashing on" 466 | printf "\n ONEUI 7 after gms disable" 467 | printf "\n ${BOLD}gms${RESET} ${BLUE}${BOLD}fix ${RED}wallet${RESET} - Fixes Google Wallet crashing/not adding" 468 | printf "\n new cards" 469 | echo 470 | printf "\n ${BOLD}info${RESET} - Display this help message" 471 | printf "\n ${BOLD}--help${RESET} - Alias for info" 472 | printf "\n ${BOLD}-h${RESET} - Alias for info" 473 | echo 474 | printf "\n ${BOLD}perf${RESET} - Boost all apps" 475 | echo 476 | printf "\n ${BOLD}selinux${RESET} ${BLUE}${BOLD}0${RESET} - Set SELinux state to Permissive" 477 | printf "\n ${BOLD}selinux${RESET} ${BLUE}${BOLD}1${RESET} - Set SELinux state to Enforcing" 478 | printf "\n ${BOLD}selinux${RESET} ${BOLD}${BLUE}get${RESET} - Show current SELinux state" 479 | echo 480 | printf "\n ${BOLD}smg${RESET} ${BLUE}${BOLD}<2ndcommand>${RESET} ${YELLOW}${BOLD}Samsung Tweaks${RESET}" 481 | echo 482 | printf "\n ${BOLD}smg${RESET} ${BLUE}${BOLD}bx${RESET} - Show current Bixby button action and" 483 | printf "\n remap it" 484 | echo 485 | printf "\n ${BOLD}smg${RESET} ${BLUE}${BOLD}csc${RESET} - Change current CSC" 486 | echo 487 | printf "\n ${BOLD}smg${RESET} ${BLUE}${BOLD}dex_d${RESET} - Disable knox packages" 488 | echo 489 | printf "\n ${BOLD}smg${RESET} ${BLUE}${BOLD}dex_e${RESET} - Enable knox packages" 490 | echo 491 | printf "\n ${BOLD}smg${RESET} ${BLUE}${BOLD}dim${RESET} - Open hidden Extra Dim menu" 492 | echo 493 | printf "\n ${BOLD}smg${RESET} ${BLUE}${BOLD}gest${RESET} - Open hidden Gestures menu" 494 | echo 495 | printf "\n ${BOLD}smg${RESET} ${BLUE}${BOLD}ntw_b${RESET} - Open 5G Network Bands guide" 496 | echo 497 | printf "\n ${BOLD}smg${RESET} ${BLUE}${BOLD}ntw_l${RESET} - Open Network Bands settings" 498 | echo 499 | printf "\n ${BOLD}sot${RESET} - Calculate how SOT is possible with 100" 500 | printf "\n battery" 501 | printf "\n Requires:" 502 | printf "\n - Current SOT hours and minutes values" 503 | printf "\n - Discharged percentage value" 504 | echo 505 | printf "\n ${BOLD}temp${RESET} - Monitor system temperatures" 506 | printf "\n Displays real-time temperatures for" 507 | printf "\n Battery, CPU, and GPU" 508 | printf "\n Press CTRL+C to exit temperature monitoring" 509 | echo 510 | printf "\n${GREEN}Examples:${RESET}" 511 | printf "\n infamick batt stop" 512 | printf "\n infamick gmsd" 513 | printf "\n infamick exdim" 514 | printf "\n infamick perf" 515 | printf "\n infamick smg dim" 516 | printf "\n infamick smg ntw_l" 517 | printf "\n infamick temp" 518 | echo 519 | printf "\n${YELLOW}Note:${RESET} This script requires root access to function properly.\n" 520 | } 521 | 522 | boot() { 523 | settings put global boot_count 0 524 | settings put global Phenotype_boot_count 0 525 | printf "${INDENTN}${GREEN}[i]Boot count resetted successfully.${RESET}\n" 526 | } 527 | 528 | boost_app() { 529 | printf "${INDENTN}${YELLOW}[i]Boosting apps${RESET}\n" 530 | cmd package compile -m speed-profile -a 531 | printf "${INDENT}${GREEN}[i]Done${RESET}\n" 532 | } 533 | 534 | boost_battery() { 535 | printf "${INDENTN}${YELLOW}[i]Boosting battery${RESET}\n" 536 | if cmd package bg-dexopt-job >/dev/null 2>&1; then 537 | printf "${INDENTN}${GREEN}[i]Done${RESET}\n" 538 | else 539 | printf "${INDENTN}${RED}[!]Failure${RESET}\n" 540 | printf "${INDENTN}${YELLOW}[i]Please charge your phone to 100%%${RESET}\n" 541 | fi 542 | } 543 | 544 | battinfo() { 545 | # Cerca prima la percentuale in /sec/FactoryApp/bsoh 546 | if [ -f "/sec/FactoryApp/bsoh" ]; then 547 | health=$(cat /sec/FactoryApp/bsoh) 548 | else 549 | # Se il file non esiste, usa dumpsys battery 550 | battery_info=$(/system/bin/dumpsys battery) 551 | health=$(echo "$battery_info" | sed -n 's/.*mSavedBatteryAsoc: \([^,]*\).*/\1/p') 552 | fi 553 | 554 | # Cerca i cicli di carica in /efs/FactoryApp/batt_discharge_level 555 | if [ -f "/efs/FactoryApp/batt_discharge_level" ]; then 556 | cycles_raw=$(cat /efs/FactoryApp/batt_discharge_level) 557 | cycles=$((cycles_raw / 100)) 558 | else 559 | # Se il file non esiste, usa dumpsys battery 560 | battery_info=${battery_info:-$(/system/bin/dumpsys battery)} 561 | cycles_raw=$(echo "$battery_info" | sed -n 's/.*mSavedBatteryUsage: \([^,]*\).*/\1/p') 562 | cycles=$((cycles_raw / 100)) 563 | fi 564 | 565 | printf "${INDENTN}${GREEN}[i] Your Battery health is ${RED}${BOLD}$health${RESET}" 566 | printf "${INDENTN}${GREEN}[i] Your battery charging cycles are ${RED}${BOLD}$cycles${RESET}\n" 567 | exit 0 568 | } 569 | gms_homefix() { 570 | printf "${INDENTN}${LIGHT_YELLOW}[i]This will fix Google Home 'device not" 571 | printf "${INDENTN}${LIGHT_YELLOW}avaiable on the network' error" 572 | i=0 573 | printf "\n${INDENTN}${BLUE}Total Google Activities to enable ${#services_gmshome[@]}${RESET}" 574 | printf "${INDENTN}${YELLOW}[i] Fixing.. \n${RESET}" 575 | sleep 2 576 | 577 | while [ $i -lt ${#services_gmshome[@]} ]; do 578 | service_number=$((i + 1)) 579 | service="${services_gmshome[$i]}" 580 | printf "${INDENTN}${BLUE}[$service_number/${#services_gmshome[@]}] Enabling the activity: $service\n" 581 | pm enable "$service" > /dev/null 2>&1 582 | status=$? 583 | 584 | if [ $status -eq 0 ]; then 585 | printf "${INDENT}${BOLD}${GREEN}[+] Activity enabled successfully.\n" 586 | else 587 | printf "${INDENT}${RED}${BOLD}[!] Error: Unable to enable the activity.\n" 588 | fi 589 | i=$((i + 1)) 590 | done 591 | printf "\n${INDENT}${GREEN}[i]Google Home FIX process completed.${RESET}\n" 592 | } 593 | gms_homeui7fix() { 594 | printf "${INDENTN}${LIGHT_YELLOW}[i]This will fix Google Home crashing on" 595 | printf "${INDENTN}${LIGHT_YELLOW}ONEUI 7 after gms disable" 596 | i=0 597 | printf "\n${INDENTN}${BLUE}Total Google Activities to enable ${#services_gmshomeui7[@]}${RESET}" 598 | printf "${INDENTN}${YELLOW}[i] Fixing.. \n${RESET}" 599 | sleep 2 600 | 601 | while [ $i -lt ${#services_gmshomeui7[@]} ]; do 602 | service_number=$((i + 1)) 603 | service="${services_gmshomeui7[$i]}" 604 | printf "${INDENTN}${BLUE}[$service_number/${#services_gmshomeui7[@]}] Enabling the activity: $service\n" 605 | pm enable "$service" > /dev/null 2>&1 606 | status=$? 607 | 608 | if [ $status -eq 0 ]; then 609 | printf "${INDENT}${BOLD}${GREEN}[+] Activity enabled successfully.\n" 610 | else 611 | printf "${INDENT}${RED}${BOLD}[!] Error: Unable to enable the activity.\n" 612 | fi 613 | i=$((i + 1)) 614 | done 615 | printf "\n${INDENT}${GREEN}[i]Google Home ONEUI 7 process completed.${RESET}\n" 616 | } 617 | gms_walletfix() { 618 | printf "${INDENTN}${LIGHT_YELLOW}[i]This will fix Google Wallet crashing/not" 619 | printf "${INDENTN}${LIGHT_YELLOW}adding new cards" 620 | i=0 621 | printf "\n${INDENTN}${BLUE}Total Google Activities to enable ${#services_gmswallet[@]}${RESET}" 622 | printf "${INDENTN}${YELLOW}[i] Fixing.. \n${RESET}" 623 | sleep 2 624 | 625 | while [ $i -lt ${#services_gmswallet[@]} ]; do 626 | service_number=$((i + 1)) 627 | service="${services_gmswallet[$i]}" 628 | printf "${INDENTN}${BLUE}[$service_number/${#services_gmswallet[@]}] Enabling the activity: $service\n" 629 | pm enable "$service" > /dev/null 2>&1 630 | status=$? 631 | 632 | if [ $status -eq 0 ]; then 633 | printf "${INDENT}${BOLD}${GREEN}[+] Activity enabled successfully.\n" 634 | else 635 | printf "${INDENT}${RED}${BOLD}[!] Error: Unable to enable the activity.\n" 636 | fi 637 | i=$((i + 1)) 638 | done 639 | printf "\n${INDENT}${GREEN}[i]Google Wallet FIX process completed.${RESET}\n" 640 | } 641 | gms_disable() { 642 | i=0 643 | printf "${INDENTN}${YELLOW}[i]This operation will disable most Google features and" 644 | printf "${INDENTN}${YELLOW}break some of them${RESET}\n" 645 | 646 | printf "${INDENTN}${BLUE}Total Google Activities to disable ${#services[@]}${RESET}" 647 | 648 | printf "${INDENTN}${YELLOW}[i]Disabling GMS${RESET}\n" 649 | sleep 2 650 | 651 | while [ $i -lt ${#services[@]} ]; do 652 | service_number=$((i + 1)) 653 | service="${services[$i]}" 654 | printf "${INDENTN}${BLUE}[$service_number/${#services[@]}] Disabling the activity: $service\n" 655 | pm disable "$service" > /dev/null 2>&1 656 | status=$? 657 | 658 | if [ $status -eq 0 ]; then 659 | printf "${INDENT}${BOLD}${GREEN}[+] Activity disabled successfully.\n" 660 | else 661 | printf "${INDENT}${RED}${BOLD}[!] Error: Unable to disable the activity.\n" 662 | fi 663 | i=$((i + 1)) 664 | done 665 | printf "\n${INDENT}${GREEN}[i]GMS disable process completed.${RESET}\n" 666 | 667 | } 668 | 669 | gms_enable() { 670 | i=0 671 | printf "${INDENTN}${BLUE}Total Google Activities to enable ${#services[@]}${RESET}" 672 | 673 | printf "${INDENTN}${YELLOW}[i]Enabling GMS${RESET}\n" 674 | sleep 2 675 | 676 | while [ $i -lt ${#services[@]} ]; do 677 | service_number=$((i + 1)) 678 | service="${services[$i]}" 679 | printf "${INDENTN}${BLUE}[$service_number/${#services[@]}] Enabling the activity: $service\n" 680 | pm enable "$service" > /dev/null 2>&1 681 | status=$? 682 | 683 | if [ $status -eq 0 ]; then 684 | printf "${INDENT}${BOLD}${GREEN}[+] Activity enabled successfully.\n" 685 | else 686 | printf "${INDENT}${RED}${BOLD}[!] Error: Unable to enable the activity.\n" 687 | fi 688 | i=$((i + 1)) 689 | done 690 | printf "\n${INDENT}${GREEN}[i]GMS enable process completed.${RESET}\n" 691 | } 692 | 693 | sot_calculator() { 694 | while true; do 695 | printf "${INDENTN}${GREEN}${BOLD}Enter hours of your current SOT:${RESET}${INDENTN}" 696 | read hours 697 | case $hours in 698 | ''|*[!0-9]*) echo "${INDENT}${RED}${BOLD}[!] Error: Please enter a valid number for hours.${RESET}" ;; 699 | *) break ;; 700 | esac 701 | done 702 | 703 | while true; do 704 | printf "${INDENT}${GREEN}${BOLD}Enter minutes of your current SOT:${RESET}${INDENTN}" 705 | read minutes 706 | case $minutes in 707 | ''|*[!0-9]*) echo "${INDENT}${RED}${BOLD}[!] Error: Please enter a valid number for minutes.${RESET}" ;; 708 | *) break ;; 709 | esac 710 | done 711 | 712 | while true; do 713 | printf "${INDENT}${GREEN}${BOLD}Enter the discharged percentage:${RESET}${INDENTN}" 714 | read percentage 715 | case $percentage in 716 | ''|*[!0-9.]*) echo "${INDENT}${RED}${BOLD}[!] Error: Please enter a valid percentage (0-100).${RESET}" ;; 717 | *) 718 | if [ $(echo "$percentage > 0 && $percentage <= 100" | bc -l) -eq 1 ]; then 719 | break 720 | else 721 | echo "${INDENT}${RED}${BOLD}[!] Error: Percentage must be between 0 and 100.${RESET}" 722 | fi 723 | ;; 724 | esac 725 | done 726 | 727 | # Calculate total minutes 728 | total_minutes=$(( hours * 60 + minutes )) 729 | 730 | # Calculate estimated SOT in hours 731 | result=$(echo "scale=2; ($total_minutes * 100) / ($percentage * 60)" | bc) 732 | 733 | # Convert result to integer hours and minutes 734 | estimated_hours=${result%.*} 735 | decimal_part=${result#*.} 736 | estimated_minutes=$(echo "scale=0; ($decimal_part * 60) / 100" | bc) 737 | 738 | # Calculate harshrate 739 | harshrate=$(echo "scale=2; 100 / $result" | bc) 740 | 741 | echo "${INDENT}${BOLD}Estimated SOT with 100% battery: ${YELLOW}${BOLD}${estimated_hours}h and ${estimated_minutes}m${RESET}" 742 | echo "${INDENT}${BOLD}Harshrate: ${YELLOW}${BOLD}${harshrate}%/hr${RESET}" 743 | } 744 | 745 | clear_cache() { 746 | num_iterations=44 747 | error_occurred=false 748 | printf "${INDENTN}${YELLOW}[i]Clearing cache\n" 749 | for i in $(seq 1 $num_iterations); do 750 | pm trim-caches 999999999999999999 751 | 752 | # Check if the command was successful 753 | if [ $? -ne 0 ]; then 754 | # An error occurred while executing the command 755 | printf "${INDENT}${RED}Error: Command pm trim-caches failed.${RESET}" 756 | error_occurred=true 757 | break 758 | fi 759 | 760 | if [ $i -eq 22 ]; then 761 | printf "${INDENT}${YELLOW}[i]Please wait ...${RESET}\n" 762 | fi 763 | 764 | # Progress counter 765 | progress=$((100 * i / num_iterations)) 766 | # Print the progress counter 767 | echo -n -e "\r ${GREEN}[" 768 | for j in $(seq 1 $((progress / 2))); do 769 | echo -n "=" 770 | done 771 | printf ">%02d%%]${RESET}" $progress 772 | done 773 | 774 | if [ "$error_occurred" = false ]; then 775 | sleep 2 776 | clear 777 | printf "${INDENT}${GREEN}${BOLD}\n[+] Execution Succeed..! \n${RESET}" 778 | fi 779 | } 780 | smg_ntw() { 781 | printf "${INDENTN}${YELLOW}[i] This will redirect you to the 'Service mode'${RESET}" 782 | printf "${INDENTN}${YELLOW}menu.${RESET}" 783 | sleep 2 784 | printf "${INDENTN}${YELLOW}[i] Refer to the guide below for better ${RESET}" 785 | printf "${INDENTN}${YELLOW}understanding, then come back again.${RESET}" 786 | sleep 2 787 | nohup am start -a android.intent.action.VIEW -d https://t.me/SamsungTweaks/221 >/dev/null 2>&1 & 788 | printf "${INDENTN}${YELLOW}[i] Press ENTER when you are ready${RESET}" 789 | read -r a 790 | am broadcast -a com.samsung.android.action.SECRET_CODE -d android_secret_code://27663368378 -n com.sec.android.RilServiceModeApp/.SecKeyStringBroadcastReceiver > /dev/null 2>&1 791 | printf "${INDENT}${GREEN}${BOLD}\n[+] Execution Succeed..! \n${RESET}" 792 | } 793 | smg_band() { 794 | printf "${INDENTN}${YELLOW}[i] This will redirect you to the 'Service mode'${RESET}\n" 795 | printf "${INDENT}${YELLOW}menu.${RESET}" 796 | sleep 2 797 | printf "${INDENTN}${YELLOW}[i] Press ENTER when you are ready${RESET}" 798 | read -r a 799 | am start com.samsung.android.app.telephonyui/.hiddennetworksetting.MainActivity > /dev/null 2>&1 800 | printf "${INDENT}${GREEN}${BOLD}\n[+] Execution Succeed..! \n${RESET}" 801 | } 802 | 803 | extradim() { 804 | printf "${INDENTN}${YELLOW}[i] This will redirect you to the 'Extra Dim' menu.${RESET}\n" ; sleep 1 805 | printf "${INDENT}${YELLOW}[i] Press ENTER when you are ready${RESET}" 806 | read -r a 807 | am force-stop com.android.settings > /dev/null 2>&1 808 | am start -n com.android.settings/.Settings\$ReduceBrightColorsSettingsActivity > /dev/null 2>&1 809 | printf "${INDENT}${GREEN}${BOLD}\n[+] Execution Succeed..! \n${RESET}" 810 | } 811 | gestures() { 812 | printf "${INDENTN}${YELLOW}[i] This will redirect you to the 'Gesture Settigns'${RESET}\n" 813 | printf "${INDENT}${YELLOW}menu.${RESET}" 814 | sleep 1 815 | printf "${INDENTN}${YELLOW}[i] Press ENTER when you are ready${RESET}" 816 | read -r a 817 | am force-stop com.android.settings > /dev/null 2>&1 818 | am start -n com.android.settings/.Settings\$GestureNavigationSettingsActivity > /dev/null 2>&1 819 | printf "${INDENT}${GREEN}${BOLD}\n[+] Execution Succeed..! \n${RESET}" 820 | } 821 | # Example usage: 822 | # infamick_sot 30 50 823 | 824 | disable_package() { 825 | package_name="$1" 826 | if pm disable-user --user 0 "$package_name" > /dev/null 2>&1; then 827 | printf "${INDENT}${BOLD}${GREEN}[+] Successfully disabled: ${package_name}${RESET}\n" 828 | else 829 | printf "${INDENT}${BOLD}${RED}[-] Failed to disable: ${package_name}${RESET}\n" 830 | fi 831 | } 832 | 833 | 834 | enable_package() { 835 | package_name="$1" 836 | if pm enable "$package_name" > /dev/null 2>&1; then 837 | printf "${INDENT}${BOLD}${GREEN}[+] Successfully enabled: ${package_name}${RESET}\n" 838 | else 839 | printf "${INDENT}${BOLD}${RED}[-] Failed to enable: ${package_name}${RESET}\n" 840 | fi 841 | } 842 | 843 | deknox_disable() { 844 | knox_packages=( 845 | "com.samsung.android.knox.analytics.uploader" 846 | "com.samsung.android.bbc.bbcagent" 847 | "com.knox.vpn.proxyhandler" 848 | "com.samsung.android.knox.containercore" 849 | "com.samsung.knox.keychain" 850 | "com.sec.enterprise.knox.attestation" 851 | "com.sec.enterprise.knox.cloudmdm.smdms" 852 | "com.samsung.android.knox.kpecore" 853 | "com.samsung.android.knox.pushmanager" 854 | "com.samsung.knox.securefolder" 855 | ) 856 | 857 | printf "${INDENTN}${YELLOW}[i] Starting Knox disable process...${RESET}\n" 858 | 859 | for package in "${knox_packages[@]}"; do 860 | disable_package "$package" 861 | done 862 | 863 | printf "${INDENTN}${YELLOW}[i] Knox disable process completed.${RESET}\n" 864 | } 865 | 866 | deknox_enable() { 867 | knox_packages=( 868 | "com.samsung.android.knox.analytics.uploader" 869 | "com.samsung.android.bbc.bbcagent" 870 | "com.knox.vpn.proxyhandler" 871 | "com.samsung.android.knox.containercore" 872 | "com.samsung.knox.keychain" 873 | "com.sec.enterprise.knox.attestation" 874 | "com.sec.enterprise.knox.cloudmdm.smdms" 875 | "com.samsung.android.knox.kpecore" 876 | "com.samsung.android.knox.pushmanager" 877 | "com.samsung.knox.securefolder" 878 | ) 879 | 880 | printf "${INDENTN}${YELLOW}[i] Starting Knox enable process...${RESET}\n" 881 | 882 | for package in "${knox_packages[@]}"; do 883 | enable_package "$package" 884 | done 885 | 886 | printf "${INDENTN}${YELLOW}[i] Knox enable process completed.${RESET}\n" 887 | } 888 | change_csc() { 889 | printf "${INDENTN}${YELLOW}[i] Always check /optics or /product to ensure${RESET}" 890 | printf "${INDENTN}${YELLOW}the required CSC folder is available.${RESET}" 891 | printf "${INDENTN}${YELLOW}[i] If you choose the wrong CSC code, the entire CSC${RESET}" 892 | printf "${INDENTN}${YELLOW}features will break.${RESET}" 893 | printf "${INDENTN}${RED}[i] DO AT YOUR OWN RISK..!${RESET}\n" 894 | printf "${INDENTN}${YELLOW}[i] Press ENTER when you are ready${RESET}" 895 | read -r a 896 | current_csc=$(cat /efs/imei/mps_code.dat) 897 | printf "${INDENTN}${YELLOW}[*] Your Current CSC : ${BOLD_WHITE}%s${RESET}\n" "$current_csc" 898 | printf "${INDENT}${YELLOW}[?] Enter your Desired CSC: ${RESET}" 899 | read -r csc_code 900 | if [ -z "$csc_code" ] || [[ "$csc_code" == *" "* ]]; then 901 | printf "${INDENT}${RED}[!] Error: Invalid CSC code. Please enter a valid code.${RESET}\n\n" 902 | exit 1 903 | return 904 | fi 905 | 906 | # Check for simple letters in CSC code 907 | if [[ "$csc_code" != *[!\ ]* ]]; then 908 | printf "${INDENT}${RED}[!] Error: CSC code should contain at least one non-space character.${RESET}\n\n" 909 | exit 1 910 | return 911 | fi 912 | 913 | # Update the CSC code 914 | printf "${INDENT}" 915 | 916 | # To printf "\n%.0s" {1..100} ; clear the current values 917 | > /efs/imei/mps_code.dat ; > /efs/imei/omcnw_code.dat 918 | echo "$csc_code" > /efs/imei/mps_code.dat ; echo "$csc_code" > /efs/imei/omcnw_code.dat 919 | printf "${INDENT}${GREEN}[+] CSC has been updated to: ${BOLD_WHITE}%s${RESET}\n\n" "$csc_code" 920 | printf "${INDENT}${YELLOW}[i] Execution Succeed..! ${RESET}\n" 921 | } 922 | 923 | bixby_mapper() { 924 | printf "${INDENTN}${YELLOW}[i] This function will remap the Bixby button${RESET}" 925 | printf "${INDENTN}${YELLOW}[i] in Generic.kl, Generic_internal.kl, or${RESET}" 926 | printf "${INDENTN}${YELLOW}gpio_keys.kl${RESET}" 927 | printf "${INDENTN}${RED}[i] DO AT YOUR OWN RISK..!${RESET}" 928 | printf "${INDENTN}${YELLOW}[i] Press ENTER when you are ready${RESET}" 929 | read -r a 930 | 931 | file1="/system/usr/keylayout/Generic.kl" 932 | file2="/system/usr/keylayout/Generic_internal.kl" 933 | file3="/system/usr/keylayout/gpio_keys.kl" 934 | value="" 935 | file="" 936 | 937 | # Cerca nei file 938 | for f in "$file1" "$file2" "$file3"; do 939 | if [ -f "$f" ]; then 940 | value=$(grep "key 703" "$f" | awk '{print $3}') 941 | if [ -n "$value" ]; then 942 | file="$f" 943 | break 944 | fi 945 | fi 946 | done 947 | 948 | if [ -n "$value" ]; then 949 | printf "${INDENTN}${YELLOW}[*] Current value for Bixby button: ${BOLD_WHITE}%s${RESET}" "$value" 950 | else 951 | printf "${INDENTN}${RED}[!] Value not found for Bixby button${RESET}" 952 | return 953 | fi 954 | 955 | printf "${INDENTN}${YELLOW}[?] Choose new value for Bixby button:${RESET}" 956 | printf "${INDENTN}${BOLD_WHITE}1. APP_SWITCH - Recent apps button" 957 | printf "${INDENTN}${WHITE_BOLD}2. BACK - back gesture " 958 | printf "${INDENTN}${BOLD_WHITE}3. CALCULATOR - open calculator app" 959 | printf "${INDENTN}${WHITE_BOLD}4. CALENDAR - open calendar app" 960 | printf "${INDENTN}${BOLD_WHITE}5. CALL - open call app" 961 | printf "${INDENTN}${BOLD_WHITE}6. CAMERA - starts camera app" 962 | printf "${INDENTN}${BOLD_WHITE}7. CONTACTS - open contacts app" 963 | printf "${INDENTN}${BOLD_WHITE}8. HOME - Homebutton" 964 | printf "${INDENTN}${BOLD_WHITE}9. EXPLORER - Internet-browser" 965 | printf "${INDENTN}${BOLD_WHITE}10. MENU - menu" 966 | printf "${INDENTN}${BOLD_WHITE}11. MESSAGE - open message app" 967 | printf "${INDENTN}${BOLD_WHITE}12. MEDIA_NEXT - next track" 968 | printf "${INDENTN}${BOLD_WHITE}13. MEDIA_PLAY_PAUSE - play/pause" 969 | printf "${INDENTN}${BOLD_WHITE}14. MEDIA_PREVIOUS - previous track " 970 | printf "${INDENTN}${BOLD_WHITE}15. MUSIC - starts your favorite music player" 971 | printf "${INDENTN}${BOLD_WHITE}16. PAGE_UP - page up" 972 | printf "${INDENTN}${BOLD_WHITE}17. PAGE_DOWN - page down" 973 | printf "${INDENTN}${BOLD_WHITE}18. POWER - Powermenu" 974 | printf "${INDENTN}${BOLD_WHITE}19. QPANEL_ON_OFF - Notification panel" 975 | printf "${INDENTN}${BOLD_WHITE}20. SEARCH - search" 976 | printf "${INDENTN}${BOLD_WHITE}21. SLEEP - sleep phone" 977 | printf "${INDENTN}${BOLD_WHITE}22. SYSRQ - screenshot" 978 | printf "${INDENTN}${BOLD_WHITE}23. VOICE_ASSIST - default voice assistant" 979 | printf "${INDENTN}${WHITE_BOLD}24. VOLUME_DOWN - sets volume down" 980 | printf "${INDENTN}${WHITE_BOLD}25. VOLUME_MUTE - volume on/off" 981 | printf "${INDENTN}${BOLD_WHITE}26. VOLUME_UP - sets volume up" 982 | printf "${INDENTN}${BOLD_WHITE}27. WAKEUP - wakeup phone" 983 | printf "${INDENTN}${BOLD_WHITE}28. WINK - Default" 984 | printf "${INDENTN}${YELLOW}Enter your choice (1-28): ${RESET}" 985 | read -r choice 986 | 987 | case $choice in 988 | 1) new_value="APP_SWITCH" ;; 989 | 2) new_value="BACK" ;; 990 | 3) new_value="CALCULATOR" ;; 991 | 4) new_value="CALENDAR" ;; 992 | 5) new_value="CALL" ;; 993 | 6) new_value="CAMERA" ;; 994 | 7) new_value="CONTACTS" ;; 995 | 8) new_value="HOME" ;; 996 | 9) new_value="EXPLORER" ;; 997 | 10) new_value="MENU" ;; 998 | 11) new_value="MESSAGE" ;; 999 | 12) new_value="MEDIA_NEXT" ;; 1000 | 13) new_value="MEDIA_PLAY_PAUSE" ;; 1001 | 14) new_value="MEDIA_PREVIOUS" ;; 1002 | 15) new_value="MUSIC" ;; 1003 | 16) new_value="PAGE_UP" ;; 1004 | 17) new_value="PAGE_DOWN" ;; 1005 | 18) new_value="POWER" ;; 1006 | 19) new_value="QPANEL_ON_OFF" ;; 1007 | 20) new_value="SEARCH" ;; 1008 | 21) new_value="SLEEP" ;; 1009 | 22) new_value="SYSRQ" ;; 1010 | 23) new_value="VOICE_ASSIST" ;; 1011 | 24) new_value="VOLUME_DOWN" ;; 1012 | 25) new_value="VOLUME_MUTE" ;; 1013 | 26) new_value="VOLUME_UP" ;; 1014 | 27) new_value="WAKEUP" ;; 1015 | 28) new_value="WINK" ;; 1016 | 1017 | *) 1018 | printf "${INDENTN}${RED}[!] Error: Invalid choice. Please enter${RESET}" 1019 | printf "${INDENTN}${RED}a number between 1 and 28.${RESET}\n" 1020 | return 1021 | ;; 1022 | esac 1023 | 1024 | # Update the value 1025 | temp_file="/data/local/tmp/temp_key_file" 1026 | grep -v "key 703" "$file" > "$temp_file" 1027 | echo "key 703 $new_value" >> "$temp_file" 1028 | 1029 | # Check if we have write permission 1030 | if ! touch "$file" 2>/dev/null; then 1031 | printf "${INDENTN}${YELLOW}[!] No write permission. Trying with 'su' command...${RESET}\n" 1032 | su -c "cp $temp_file $file && chmod 644 $file" 1033 | else 1034 | cp "$temp_file" "$file" 1035 | chmod 644 "$file" 1036 | fi 1037 | 1038 | rm "$temp_file" 1039 | 1040 | printf "${INDENTN}${GREEN}[+] Value for Bixby Button has been updated${RESET}" 1041 | printf "${INDENTN}${GREEN}to: ${BOLD_WHITE}%s${RESET}" "$new_value" 1042 | printf "${INDENTN}${YELLOW}[i] Execution Succeed..! ${RESET}\n" 1043 | printf "${INDENTN}${BLUE}[!] Reboot to apply the changes? (Y/n): ${RESET}" 1044 | reboot_quest 1045 | } 1046 | 1047 | battsettings() { 1048 | printf "${INDENTN}${YELLOW}[i] This will redirect you to the Battery${RESET}" 1049 | printf "${INDENTN}${YELLOW}Optimizations settings.${RESET}" ; sleep 1 1050 | printf "${INDENTN}${YELLOW}[i] Press ENTER when you are ready${RESET}" 1051 | read -r a 1052 | am force-stop com.android.settings > /dev/null 2>&1 1053 | am start -n com.android.settings/.Settings\$HighPowerApplicationsActivity > /dev/null 2>&1 1054 | printf "${INDENTN}${GREEN}${BOLD}[+] Execution Succeed..! \n${RESET}" 1055 | } 1056 | display_reset() { 1057 | printf "${INDENTN}${YELLOW}[i] This will reset your dislay settings.${RESET}" ; sleep 1 1058 | printf "${INDENTN}${YELLOW}[i] Press ENTER when you are ready${RESET}" 1059 | read -r a 1060 | wm size reset 1061 | wm density reset 1062 | printf "${INDENT}${GREEN}${BOLD}\n[+] Execution Succeed..! \n${RESET}" 1063 | } 1064 | display_see() { 1065 | wm_size_physycal=$(wm size | awk '/Physical size:/ {print $3}') 1066 | wm_size_override=$(wm size | awk '/Override size:/ {print $3}') 1067 | dpi=$(wm density | awk '{print $3}') 1068 | printf "${INDENTN}${GREEN}[i]Your screen resolution is" 1069 | printf "${INDENTN}${BLUE}${BOLD}Physical size: $wm_size_physycal${RESET}" 1070 | printf "${INDENTN}${BLUE}${BOLD}Override size: $wm_size_override${RESET}" 1071 | printf "${INDENTN}${BLUE}${BOLD}Dpi: $dpi${RESET}\n" 1072 | } 1073 | display_set() { 1074 | printf "${INDENT}${YELLOW}[i] Choose Screen resolution ${BLUE}${BOLD}width${WHITE} x ${BLUE}height${RESET}${INDENT}" 1075 | read -r screenres 1076 | printf "${INDENT}${YELLOW}[i] Choose Dpi${RESET}${INDENT}" 1077 | read -r dpisize 1078 | printf "${INDENT}${YELLOW}[i] Press ENTER to apply new Screen Resolution${RESET}\n" 1079 | wm size $screenres 1080 | wm density $dpisize 1081 | } 1082 | 1083 | dd_backup() { 1084 | printf "${INDENTN}${YELLOW}[i] This script will backup a partition.${RESET}" 1085 | printf "${INDENTN}${YELLOW}[i] Make sure you have enough space on /sdcard.${RESET}" 1086 | printf "${INDENTN}${YELLOW}[i] Press ENTER when you are ready${RESET}" 1087 | read -r a 1088 | 1089 | # List of possible partition directories 1090 | possible_partitions="/dev/block/by-name /dev/block/sdcard /dev/block/by-num /dev/block/bootdevice/by-name /dev/block/bootdevice/sdcard /dev/block/bootdevice/by-num /dev/block/platform/soc/1da4000.ufshc/by-name" 1091 | 1092 | # Function to find partitions 1093 | find_partitions() { 1094 | for dir in $possible_partitions; do 1095 | if [ -d "$dir" ]; then 1096 | ls "$dir" 1097 | fi 1098 | done 1099 | } 1100 | 1101 | # Find all partitions 1102 | all_partitions=$(find_partitions) 1103 | 1104 | # Check if partitions were found 1105 | if [ -z "$all_partitions" ]; then 1106 | printf "${INDENTN}${RED}[!] Error: No partitions found in the specified directories.${RESET}" 1107 | return 1 1108 | fi 1109 | 1110 | # Show found partitions 1111 | printf "${INDENTN}${YELLOW}[*] Partitions found:${RESET}" 1112 | printf "${INDENT}${BOLD_WHITE}%s${RESET}\n" "$all_partitions" 1113 | 1114 | # Ask user which partition to backup 1115 | printf "${INDENTN}${YELLOW}[?] Enter the name of the partition" 1116 | printf "${INDENTN}you want to backup: ${RESET}" 1117 | read -r partition_name 1118 | 1119 | # Find the full path of the partition 1120 | partition_path="" 1121 | for dir in $possible_partitions; do 1122 | if [ -e "$dir/$partition_name" ]; then 1123 | partition_path="$dir/$partition_name" 1124 | break 1125 | fi 1126 | done 1127 | 1128 | if [ -z "$partition_path" ]; then 1129 | printf "${INDENT}${RED}[!] Error: Partition not found.${RESET}\n\n" 1130 | return 1 1131 | fi 1132 | 1133 | # Ask user for the backup file name 1134 | printf "${INDENT}${YELLOW}[?] Enter the name for the backup file" 1135 | printf "${INDENTN}(without extension): ${RESET}" 1136 | read -r backup_name 1137 | 1138 | # Execute the backup 1139 | backup_file="/sdcard/${backup_name}.img" 1140 | printf "${INDENT}${YELLOW}[*] Backing up ${BOLD_WHITE}$partition_name${YELLOW}" 1141 | printf "${INDENTN}to ${BOLD_WHITE} $backup_file${RESET}\n" 1142 | dd if="$partition_path" of="$backup_file" bs=4M >/dev/null 2>&1 1143 | 1144 | printf "${INDENT}${GREEN}[+] Backup completed.${RESET}\n\n" 1145 | printf "${INDENT}${YELLOW}[i] Execution Successful..! ${RESET}\n" 1146 | 1147 | } 1148 | button_mapper() { 1149 | printf "${INDENTN}${YELLOW}[i] This function will remap universal Android" 1150 | printf "${INDENTN}buttons${RESET}" 1151 | printf "${INDENTN}${YELLOW}[i] in Generic.kl, Generic_internal.kl, or${RESET}" 1152 | printf "${INDENTN}${YELLOW}gpio_keys.kl${RESET}" 1153 | printf "${INDENTN}${RED}[i] DO AT YOUR OWN RISK..!${RESET}" 1154 | printf "${INDENTN}${YELLOW}[i] Press ENTER when you are ready${RESET}" 1155 | read -r a 1156 | 1157 | file1="/system/usr/keylayout/Generic.kl" 1158 | file2="/system/usr/keylayout/Generic_internal.kl" 1159 | file3="/system/usr/keylayout/gpio_keys.kl" 1160 | value="" 1161 | file="" 1162 | 1163 | # Chiedi all'utente quale tasto vuole rimappare 1164 | printf "${INDENTN}${YELLOW}[?] Which button do you want to remap:${RESET}" 1165 | printf "${INDENTN}${BOLD_WHITE}1. Power" 1166 | printf "${INDENTN}${BOLD_WHITE}2. Volume Up" 1167 | printf "${INDENTN}${BOLD_WHITE}3. Volume Down" 1168 | printf "${INDENTN}${YELLOW}Enter your choice (1-3): ${RESET}" 1169 | read -r button_choice 1170 | 1171 | case $button_choice in 1172 | 1) key_code="116" 1173 | buttonc="Power" ;; 1174 | 2) key_code="115" 1175 | buttonc="Volume Up" ;; 1176 | 3) key_code="114" 1177 | buttonc="Volume Down" ;; 1178 | *) 1179 | printf "${INDENTN}${RED}[!] Error: Invalid choice. Please enter${RESET}" 1180 | printf "${INDENTN}${RED}a number between 1 and 3.${RESET}\n" 1181 | return 1182 | ;; 1183 | esac 1184 | 1185 | # Cerca nei file, dando priorità a Generic_internal.kl 1186 | if [ -f "$file2" ]; then 1187 | file="$file2" 1188 | value=$(grep "key $key_code" "$file2" | awk '{print $3}') 1189 | fi 1190 | 1191 | if [ -z "$value" ] && [ -f "$file1" ]; then 1192 | file="$file1" 1193 | value=$(grep "key $key_code" "$file1" | awk '{print $3}') 1194 | fi 1195 | 1196 | if [ -z "$value" ] && [ -f "$file3" ]; then 1197 | file="$file3" 1198 | value=$(grep "key $key_code" "$file3" | awk '{print $3}') 1199 | fi 1200 | 1201 | if [ -n "$value" ]; then 1202 | printf "${INDENTN}${YELLOW}[*] Current value for $buttonc: ${BOLD_WHITE}%s${RESET}" "$value" 1203 | else 1204 | printf "${INDENTN}${RED}[!] Value not found for key $key_code${RESET}" 1205 | return 1206 | fi 1207 | 1208 | printf "${INDENTN}${YELLOW}[?] Choose new value for the $buttonc button:${RESET}" 1209 | printf "${INDENTN}${BOLD_WHITE}1. APP_SWITCH - Recent apps button" 1210 | printf "${INDENTN}${WHITE_BOLD}2. BACK - back gesture " 1211 | printf "${INDENTN}${BOLD_WHITE}3. CALCULATOR - open calculator app" 1212 | printf "${INDENTN}${WHITE_BOLD}4. CALENDAR - open calendar app" 1213 | printf "${INDENTN}${BOLD_WHITE}5. CALL - open call app" 1214 | printf "${INDENTN}${BOLD_WHITE}6. CAMERA - starts camera app" 1215 | printf "${INDENTN}${BOLD_WHITE}7. CONTACTS - open contacts app" 1216 | printf "${INDENTN}${BOLD_WHITE}8. HOME - Homebutton" 1217 | printf "${INDENTN}${BOLD_WHITE}9. EXPLORER - Internet-browser" 1218 | printf "${INDENTN}${BOLD_WHITE}10. MENU - menu" 1219 | printf "${INDENTN}${BOLD_WHITE}11. MESSAGE - open message app" 1220 | printf "${INDENTN}${BOLD_WHITE}12. MEDIA_NEXT - next track" 1221 | printf "${INDENTN}${BOLD_WHITE}13. MEDIA_PLAY_PAUSE - play/pause" 1222 | printf "${INDENTN}${BOLD_WHITE}14. MEDIA_PREVIOUS - previous track " 1223 | printf "${INDENTN}${BOLD_WHITE}15. MUSIC - starts your favorite music player" 1224 | printf "${INDENTN}${BOLD_WHITE}16. PAGE_UP - page up" 1225 | printf "${INDENTN}${BOLD_WHITE}17. PAGE_DOWN - page down" 1226 | printf "${INDENTN}${BOLD_WHITE}18. POWER - Powermenu" 1227 | printf "${INDENTN}${BOLD_WHITE}19. QPANEL_ON_OFF - Notification panel" 1228 | printf "${INDENTN}${BOLD_WHITE}20. SEARCH - search" 1229 | printf "${INDENTN}${BOLD_WHITE}21. SLEEP - sleep phone" 1230 | printf "${INDENTN}${BOLD_WHITE}22. SYSRQ - screenshot" 1231 | printf "${INDENTN}${BOLD_WHITE}23. VOICE_ASSIST - default voice assistant" 1232 | printf "${INDENTN}${WHITE_BOLD}24. VOLUME_DOWN - sets volume down" 1233 | printf "${INDENTN}${WHITE_BOLD}25. VOLUME_MUTE - volume on/off" 1234 | printf "${INDENTN}${BOLD_WHITE}26. VOLUME_UP - sets volume up" 1235 | printf "${INDENTN}${BOLD_WHITE}27. WAKEUP - wakeup phone" 1236 | printf "${INDENTN}${YELLOW}Enter your choice (1-27): ${RESET}" 1237 | read -r choice 1238 | 1239 | case $choice in 1240 | 1) new_value="APP_SWITCH" ;; 1241 | 2) new_value="BACK" ;; 1242 | 3) new_value="CALCULATOR" ;; 1243 | 4) new_value="CALENDAR" ;; 1244 | 5) new_value="CALL" ;; 1245 | 6) new_value="CAMERA" ;; 1246 | 7) new_value="CONTACTS" ;; 1247 | 8) new_value="HOME" ;; 1248 | 9) new_value="EXPLORER" ;; 1249 | 10) new_value="MENU" ;; 1250 | 11) new_value="MESSAGE" ;; 1251 | 12) new_value="MEDIA_NEXT" ;; 1252 | 13) new_value="MEDIA_PLAY_PAUSE" ;; 1253 | 14) new_value="MEDIA_PREVIOUS" ;; 1254 | 15) new_value="MUSIC" ;; 1255 | 16) new_value="PAGE_UP" ;; 1256 | 17) new_value="PAGE_DOWN" ;; 1257 | 18) new_value="POWER" ;; 1258 | 19) new_value="QPANEL_ON_OFF" ;; 1259 | 20) new_value="SEARCH" ;; 1260 | 21) new_value="SLEEP" ;; 1261 | 22) new_value="SYSRQ" ;; 1262 | 23) new_value="VOICE_ASSIST" ;; 1263 | 24) new_value="VOLUME_DOWN" ;; 1264 | 25) new_value="VOLUME_MUTE" ;; 1265 | 26) new_value="VOLUME_UP" ;; 1266 | 27) new_value="WAKEUP" ;; 1267 | *) 1268 | printf "${INDENTN}${RED}[!] Error: Invalid choice. Please enter${RESET}" 1269 | printf "${INDENTN}${RED}a number between 1 and 27.${RESET}\n" 1270 | return 1271 | ;; 1272 | esac 1273 | 1274 | # Update the value 1275 | temp_file="/data/local/tmp/temp_key_file" 1276 | grep -v "key $key_code" "$file" > "$temp_file" 1277 | echo "key $key_code $new_value" >> "$temp_file" 1278 | 1279 | # Check if we have write permission 1280 | if ! touch "$file" 2>/dev/null; then 1281 | printf "${INDENTN}${YELLOW}[!] No write permission. Trying with 'su' command...${RESET}\n" 1282 | su -c "cp $temp_file $file && chmod 644 $file" 1283 | else 1284 | cp "$temp_file" "$file" 1285 | chmod 644 "$file" 1286 | fi 1287 | 1288 | rm "$temp_file" 1289 | 1290 | printf "${INDENTN}${GREEN}[+] Value for key $buttonc has been updated${RESET}" 1291 | printf "${INDENTN}${GREEN}to: ${BOLD_WHITE}%s${RESET}" "$new_value" 1292 | printf "${INDENTN}${YELLOW}[i] Execution Succeed..! ${RESET}\n" 1293 | printf "${INDENTN}${BLUE}[!] Reboot to apply the changes? (Y/n): ${RESET}" 1294 | reboot_quest 1295 | } 1296 | 1297 | check_charging() { 1298 | if [ -f "$CHARGING_PATH" ]; then 1299 | status=$(cat "$CHARGING_PATH") 1300 | if [ "$status" -eq 1 ]; then 1301 | printf "${INDENTN}${GREEN}[i] Charging is currently enabled.${RESET}\n" 1302 | else 1303 | printf "${INDENTN}${RED}[i] Charging is currently disabled.${RESET}\n" 1304 | fi 1305 | else 1306 | printf "${INDENTN}${RED}[!] Error: Charging status file not found." 1307 | exit 1 1308 | fi 1309 | } 1310 | 1311 | set_charging() { 1312 | if [ -f "$CHARGING_PATH" ]; then 1313 | echo "$1" > "$CHARGING_PATH" 1314 | if [ $? -eq 0 ]; then 1315 | printf "${INDENTN}${GREEN}[+] Charging has been $2.${RESET}\n" 1316 | else 1317 | printf "${INDENTN}${RED}[!] Error: Failed to $2 charging.${RESET}\n" 1318 | fi 1319 | else 1320 | printf "[!] Error: Charging control file not found." 1321 | exit 1 1322 | fi 1323 | } 1324 | fix_datausage() { 1325 | #Access data usage 1326 | printf "${INDENTN}${YELLOW}[i]As first I'll redirect u to Access Data" 1327 | printf "${INDENTN}${YELLOW}Usage settings" 1328 | printf "${INDENTN}${YELLOW}U have to:" 1329 | printf "\n${INDENTN}${YELLOW}[1] Untick all apps" 1330 | printf "${INDENTN}${YELLOW}[2] Tick only those apps: 'Shell'," 1331 | printf "${INDENTN}${YELLOW}'Telephone services','Samsung Device" 1332 | printf "${INDENTN}${YELLOW}Health Manager Service', 'Media Storage','Package" 1333 | printf "${INDENTN}${YELLOW}installation','User Settings'" 1334 | printf "${INDENTN}${YELLOW}'Permission checker app'." 1335 | printf "${INDENTN}${YELLOW}[i]Press ENTER to redirect...${RESET}" 1336 | read -r a 1337 | am force-stop com.android.settings > /dev/null 2>&1 1338 | am start -n com.android.settings/.Settings\$UsageAccessSettingsActivity -a android.intent.action.VIEW -d package:com.samsung.android.app.routines > /dev/null 2>&1 1339 | printf "${INDENTN}${YELLOW}Enjoy :)${RESET}\n" 1340 | read -r a 1341 | } 1342 | 1343 | fix_smgdrain(){ 1344 | #Samsung Device Care 1345 | printf "${INDENTN}${YELLOW}[i] As first I'll redirect u to Samsung Device Care" 1346 | printf "${INDENTN}${YELLOW}app info. U have to:" 1347 | printf "\n${INDENTN}${YELLOW}[1] Clear app cache" 1348 | printf "${INDENTN}${YELLOW}[2] Clear app data" 1349 | printf "${INDENTN}${YELLOW}[3] Uninstall updates" 1350 | printf "${INDENTN}${YELLOW}[4] Force stop the app" 1351 | printf "${INDENTN}${YELLOW}[i]Press ENTER to redirect...${RESET}" 1352 | read -r a 1353 | am force-stop com.android.settings > /dev/null 2>&1 1354 | if [ -z $(am start -n com.android.settings/.applications.InstalledAppDetailsTop -a android.intent.action.VIEW -d package:com.samsung.android.lool > /dev/null 2>&1) ]; then 1355 | am start -n com.android.settings/.applications.InstalledAppDetailsTop -a android.intent.action.VIEW -d package:com.samsung.android.sm_cn > /dev/null 2>&1 1356 | fi 1357 | printf "${INDENTN}${GREEN}[i]Press ENTER when u have done${RESET}" 1358 | read -r a 1359 | #Samsung Device Health Service 1360 | printf "${INDENTN}${YELLOW}[i]As second I'll redirect u to Samsung Device" 1361 | printf "${INDENTN}${YELLOW}Health Service app info. U have to:" 1362 | printf "\n${INDENTN}${YELLOW}[1] Clear app cache" 1363 | printf "${INDENTN}${YELLOW}[2] Clear app data" 1364 | printf "${INDENTN}${YELLOW}[3] Force stop the app" 1365 | printf "${INDENTN}${YELLOW}[i]Press ENTER to redirect...${RESET}" 1366 | read -r a 1367 | am force-stop com.android.settings > /dev/null 2>&1 1368 | am start -n com.android.settings/.applications.InstalledAppDetailsTop -a android.intent.action.VIEW -d package:com.sec.android.sdhms > /dev/null 2>&1 1369 | printf "${INDENTN}${GREEN}[i]Press ENTER when u have done${RESET}" 1370 | read -r a 1371 | #After steps 1372 | printf "${INDENTN}${YELLOW}[i]Now do this steps:" 1373 | printf "\n${INDENTN}${YELLOW}[1] Reboot to recovery" 1374 | printf "${INDENTN}${YELLOW}[2] Clear the cache in the recovery" 1375 | printf "${INDENTN}${YELLOW}[3a] If u are on the stock Recovery do Repair apps" 1376 | printf "${INDENTN}${YELLOW}[3b] If u are on TWRP clear also dalvick cache" 1377 | printf "${INDENTN}${YELLOW}[3a] and reboot system" 1378 | printf "${INDENTN}${YELLOW}[4] Check for updates for Samsung Device Care." 1379 | #Samsung Device care settings 1380 | printf "\n${INDENTN}${YELLOW}[i]I'll show u what to do next redirecting" 1381 | printf "${INDENTN}${YELLOW}you to Samsung Device Health Service app info." 1382 | printf "${INDENTN}${YELLOW}U have to:" 1383 | printf "\n${INDENTN}${YELLOW}[1] Put in NORMAL sleep all the apps that u want" 1384 | printf "${INDENTN}${YELLOW}to receive notifications" 1385 | printf "${INDENTN}${YELLOW}[2] Put to DEEP sleep all the apps that u don't need" 1386 | printf "${INDENTN}${YELLOW}to receive notifications" 1387 | printf "${INDENTN}${YELLOW}[3] Disable Adaptive Battery" 1388 | printf "\n${INDENTN}${YELLOW}Enjoy :)${RESET}\n" 1389 | read -r a 1390 | am force-stop com.android.settings > /dev/null 2>&1 1391 | if [ -z $( am start -n com.samsung.android.lool/com.samsung.android.sm.battery.ui.BatteryActivity > /dev/null 2>&1) ]; then 1392 | am start -n com.samsung.android.sm_cn/com.samsung.android.sm.battery.ui.BatteryActivity > /dev/null 2>&1 1393 | fi 1394 | } 1395 | 1396 | fix_gms(){ 1397 | #Google PLay Services 1398 | printf "${INDENTN}${YELLOW}[i] As first I'll redirect u to Google Play Services" 1399 | printf "${INDENTN}app info. U have to:" 1400 | printf "\n${INDENTN}[1] Clear app cache" 1401 | printf "${INDENTN}[2] Clear app data" 1402 | printf "${INDENTN}[3] Uninstall updates" 1403 | printf "${INDENTN}[4] Force stop the app" 1404 | printf "${INDENTN}${YELLOW}[i]Press ENTER to redirect...${RESET}" 1405 | read -r a 1406 | am force-stop com.android.settings > /dev/null 2>&1 1407 | am start -n com.android.settings/.applications.InstalledAppDetailsTop -a android.intent.action.VIEW -d package:com.google.android.gms > /dev/null 2>&1 1408 | printf "${INDENTN}${GREEN}[i]Press ENTER when u have done${RESET}" 1409 | read -r a 1410 | #Googlee Services Framework 1411 | printf "${INDENTN}${YELLOW}[i]As second I'll redirect u to Google Services" 1412 | printf "${INDENTN}${YELLOW}Framework app info. U have to:" 1413 | printf "\n${INDENTN}${YELLOW}[1] Clear app cache" 1414 | printf "${INDENTN}${YELLOW}[2] Clear app data" 1415 | printf "${INDENTN}${YELLOW}[3] Force stop the app" 1416 | printf "${INDENTN}${YELLOW}[i]Press ENTER to redirect...${RESET}" 1417 | read -r a 1418 | am force-stop com.android.settings > /dev/null 2>&1 1419 | am start -n com.android.settings/.applications.InstalledAppDetailsTop -a android.intent.action.VIEW -d package:com.google.android.gsf > /dev/null 2>&1 1420 | printf "${INDENTN}${GREEN}[i]Press ENTER when u have done${RESET}" 1421 | read -r a 1422 | #Android System Webview 1423 | printf "${INDENTN}${YELLOW}[i]As last I'll redirect u to Android System" 1424 | printf "${INDENTN}${YELLOW}Webview app info. U have to:" 1425 | printf "\n${INDENTN}${YELLOW}[1] Clear app cache2" 1426 | printf "${INDENTN}${YELLOW}[2] Clear app data" 1427 | printf "${INDENTN}${YELLOW}[3] Uninstall updates" 1428 | printf "${INDENTN}${YELLOW}[4] Force stop the app" 1429 | printf "${INDENTN}${YELLOW}[i]Press ENTER to redirect...${RESET}" 1430 | read -r a 1431 | am force-stop com.android.settings > /dev/null 2>&1 1432 | am start -n com.android.settings/.applications.InstalledAppDetailsTop -a android.intent.action.VIEW -d package:com.google.android.webview > /dev/null 2>&1 1433 | printf "${INDENTN}${GREEN}[i]Press ENTER when u have done${RESET}" 1434 | read -r a 1435 | printf "${INDENTN}${YELLOW}[i]Now do this steps:" 1436 | printf "\n${INDENTN}${YELLOW}[1] Reboot to recovery" 1437 | printf "${INDENTN}${YELLOW}[2] Clear the cache in the recovery" 1438 | printf "${INDENTN}${YELLOW}[3a] If u are on the stock Recovery do Repair apps" 1439 | printf "${INDENTN}${YELLOW}[3b] If u are on TWRP clear also dalvick cache" 1440 | printf "${INDENTN}${YELLOW}and reboot system" 1441 | printf "${INDENTN}${YELLOW}[4] Check for updates for Google Play Services," 1442 | printf "${INDENTN}${YELLOW}Google Play Store and Android System webview" 1443 | printf "\n${INDENTN}${YELLOW}Enjoy :)${RESET}\n" 1444 | } 1445 | fix_oneui() { 1446 | #Oneui Launcher 1447 | printf "${INDENTN}${YELLOW}[i] As first I'll redirect u to Oneui" 1448 | printf "${INDENTN}${YELLOW}Launcher app info. U have to:" 1449 | printf "\n${INDENTN}${YELLOW}[1] Clear app cache" 1450 | printf "${INDENTN}${YELLOW}[2] Clear app data" 1451 | printf "${INDENTN}${YELLOW}[3] Uninstall updates" 1452 | printf "${INDENTN}${YELLOW}[4] Force stop the app" 1453 | printf "${INDENTN}${YELLOW}[i]Press ENTER to redirect...${RESET}" 1454 | read -r a 1455 | am force-stop com.android.settings > /dev/null 2>&1 1456 | am force-stop com.android.settings > /dev/null 2>&1 1457 | am start -n com.android.settings/.applications.InstalledAppDetailsTop -a android.intent.action.VIEW -d package:com.sec.android.app.launcher > /dev/null 2>&1 1458 | printf "${INDENTN}${GREEN}[i]Press ENTER when u have done${RESET}" 1459 | read -r a 1460 | #After steps 1461 | printf "${INDENTN}${YELLOW}Now do this steps:" 1462 | printf "\n${INDENTN}${YELLOW}[1] Reboot to recovery" 1463 | printf "${INDENTN}${YELLOW}[2] Clear the cache in the recovery" 1464 | printf "${INDENTN}${YELLOW}[3a] If u are on the stock Recovery do Repair apps" 1465 | printf "${INDENTN}${YELLOW}[3b] If u are on TWRP clear also dalvick cache" 1466 | printf "${INDENTN}${YELLOW}and reboot system" 1467 | printf "${INDENTN}${YELLOW}[4] Check for updates for OneUI in Galaxy store" 1468 | printf "\n${INDENTN}${YELLOW}Enjoy :)${RESET}\n" 1469 | } 1470 | 1471 | manage_selinux() { 1472 | printf "${INDENTN}${YELLOW}[i] In stock exynos kernels we cant change SELinux ${INDENTN} to permissive by default cause in exynos SELinux${INDENTN} status is forced to enforcing.\n${INDENTN}[i] You should install a kernel which has${INDENTN} a switchable SELinux\n" 1473 | case "$1" in 1474 | 0) 1475 | printf "${INDENTN}${YELLOW}[i] Setting SELinux to Permissive...${RESET}" 1476 | setenforce 0 1477 | printf "${INDENTN}${GREEN}[+] SELinux has been set to Permissive.${RESET}\n" 1478 | ;; 1479 | 1) 1480 | printf "${INDENTN}${YELLOW}[i] Setting SELinux to Enforcing...${RESET}" 1481 | setenforce 1 1482 | printf "${INDENTN}${GREEN}[+] SELinux has been set to Enforcing.${RESET}\n" 1483 | ;; 1484 | get) 1485 | printf "${INDENTN}${YELLOW}[*] Current SELinux status: ${BOLD_WHITE}%s${RESET}" "$(getenforce)" 1486 | ;; 1487 | *) 1488 | printf "${INDENTN}${RED}[!] Error: Invalid SELinux option. Please use 0, 1, or 'get'.${RESET}\n" 1489 | exit 1 1490 | ;; 1491 | esac 1492 | 1493 | printf "${INDENTN}${YELLOW}[i] Operation completed successfully.${RESET}\n" 1494 | } 1495 | 1496 | #Main logic 1497 | case "$1" in 1498 | batt) 1499 | if [ -z "$2" ]; then 1500 | printf "${INDENT}${RED}Error: Need second argument '$1' '$2'${RESET}" 1501 | printf "${INDENTN}Use '${BOLD}infamick info${RESET}' for usage information.\n" 1502 | exit 1 1503 | fi 1504 | case "$2" in 1505 | boost) 1506 | boost_battery 1507 | ;; 1508 | info) 1509 | battinfo 1510 | ;; 1511 | opt) 1512 | battsettings 1513 | ;; 1514 | start) 1515 | set_charging 1 "enabled" 1516 | ;; 1517 | status) 1518 | check_charging 1519 | ;; 1520 | stop) 1521 | set_charging 0 "disabled" 1522 | ;; 1523 | *) 1524 | printf "${INDENT}${RED}Error: Unknown command '$1' '$2'${RESET}" 1525 | printf "${INDENTN}Use '${BOLD}infamick info${RESET}' for usage information.\n" 1526 | exit 1 1527 | ;; 1528 | esac 1529 | ;; 1530 | boot) 1531 | boot 1532 | ;; 1533 | btmap) 1534 | button_mapper 1535 | ;; 1536 | cache) 1537 | clear_cache 1538 | ;; 1539 | dd) 1540 | dd_backup 1541 | ;; 1542 | dsp) 1543 | if [ -z "$2" ]; then 1544 | printf "${INDENT}${RED}Error: Need second argument '$1' '$2'${RESET}" 1545 | printf "${INDENTN}Use '${BOLD}infamick info${RESET}' for usage information.\n" 1546 | exit 1 1547 | fi 1548 | case "$2" in 1549 | rs) 1550 | display_reset 1551 | ;; 1552 | set) 1553 | display_reset;; 1554 | sw) 1555 | display_see 1556 | ;; 1557 | *) 1558 | printf "${INDENT}${RED}Error: Unknown command '$1' '$2'${RESET}" 1559 | printf "${INDENTN}Use '${BOLD}infamick info${RESET}' for usage information.\n" 1560 | exit 1 1561 | ;; 1562 | esac 1563 | ;; 1564 | fix) 1565 | if [ -z "$2" ]; then 1566 | printf "${INDENT}${RED}Error: Need second argument '$1' '$2'${RESET}" 1567 | printf "${INDENTN}Use '${BOLD}infamick info${RESET}' for usage information.\n" 1568 | exit 1 1569 | fi 1570 | case "$2" in 1571 | datausage) 1572 | smg_check || return 1573 | fix_datausage 1574 | ;; 1575 | gms) 1576 | fix_gms 1577 | ;; 1578 | oneui) 1579 | smg_check || return 1580 | fix_oneui 1581 | ;; 1582 | smgcare) 1583 | smg_check || return 1584 | fix_smgdrain 1585 | ;; 1586 | *) 1587 | printf "${INDENT}${RED}Error: Unknown command '$1' '$2'${RESET}" 1588 | printf "${INDENTN}Use '${BOLD}infamick info${RESET}' for usage information.\n" 1589 | exit 1 1590 | ;; 1591 | esac 1592 | ;; 1593 | gms) 1594 | if [ -z "$2" ]; then 1595 | printf "${INDENT}${RED}Error: Need second argument '$1' '$2'${RESET}" 1596 | printf "${INDENTN}Use '${BOLD}infamick info${RESET}' for usage information.\n" 1597 | exit 1 1598 | fi 1599 | case "$2" in 1600 | disable) 1601 | gms_disable 1602 | ;; 1603 | enable) 1604 | gms_enable 1605 | ;; 1606 | fix) 1607 | if [ -z "$3" ]; then 1608 | printf "${INDENT}${RED}Error: Missing fix target ('home' or 'wallet')${RESET}" 1609 | printf "${INDENTN}Usage: ${BOLD}infamick gms fix home${RESET}" 1610 | printf "${INDENTN}Usage: ${BOLD}infamick gms fix oneui7${RESET}" 1611 | printf "${INDENTN}Usage: ${BOLD}infamick gms fix wallet${RESET}\n" 1612 | exit 1 1613 | fi 1614 | case "$3" in 1615 | home) 1616 | gms_homefix 1617 | ;; 1618 | oneui7) 1619 | gms_homeui7fix 1620 | ;; 1621 | wallet) 1622 | gms_walletfix 1623 | ;; 1624 | *) 1625 | printf "${INDENT}${RED}Unknown fix target: '$3'${RESET}\n" 1626 | exit 1 1627 | ;; 1628 | esac 1629 | ;; 1630 | *) 1631 | printf "${INDENT}${RED}Error: Unknown command '$1' '$2'${RESET}" 1632 | printf "${INDENTN}Use '${BOLD}infamick info${RESET}' for usage information.\n" 1633 | exit 1 1634 | ;; 1635 | esac 1636 | ;; 1637 | perf) 1638 | boost_app 1639 | ;; 1640 | selinux) 1641 | manage_selinux "$2" 1642 | ;; 1643 | smg) 1644 | if [ -z "$2" ]; then 1645 | printf "${INDENT}${RED}Error: Need second argument '$1' '$2'${RESET}" 1646 | printf "${INDENTN}Use '${BOLD}infamick info${RESET}' for usage information.\n" 1647 | exit 1 1648 | fi 1649 | case "$2" in 1650 | bx) 1651 | smg_check || return 1652 | bixby_mapper 1653 | ;; 1654 | csc) 1655 | smg_check || return 1656 | change_csc 1657 | ;; 1658 | dex_d) 1659 | smg_check || return 1660 | deknox_disable 1661 | ;; 1662 | dex_e) 1663 | smg_check || return 1664 | deknox_enable 1665 | ;; 1666 | dim) 1667 | smg_check || return 1668 | extradim 1669 | ;; 1670 | gest) 1671 | smg_check || return 1672 | gestures 1673 | ;; 1674 | ntw_b) 1675 | smg_check || return 1676 | smg_ntw 1677 | ;; 1678 | ntw_l) 1679 | smg_check || return 1680 | smg_band 1681 | ;; 1682 | *) 1683 | printf "${INDENT}${RED}Error: Unknown command '$1' '$2'${RESET}" 1684 | printf "${INDENTN}Use '${BOLD}infamick info${RESET}' for usage information.\n" 1685 | exit 1 1686 | ;; 1687 | esac 1688 | ;; 1689 | sot) 1690 | sot_calculator 1691 | ;; 1692 | temp) 1693 | temp_check 1694 | ;; 1695 | info|--help|-h) 1696 | help_menu 1697 | ;; 1698 | *) 1699 | printf "${INDENT}${RED}Error: Unknown command '$1'${RESET}" 1700 | printf "${INDENTN}Use '${BOLD}infamick info${RESET}' for usage information.\n" 1701 | exit 1 1702 | ;; 1703 | esac 1704 | -------------------------------------------------------------------------------- /module.prop: -------------------------------------------------------------------------------- 1 | id=Infamick_script 2 | name=Infamick Script 3 | version=v3.2 4 | versionCode=202504281 5 | author=@Infamousmick 6 | description=A powerful system utility script for rooted Android devices 7 | changeBoot=false 8 | needRamdisk=false 9 | updateJson=https://raw.githubusercontent.com/Infamousmick/Infamick-script/main/update.json 10 | support=https://github.com/Infamousmick 11 | -------------------------------------------------------------------------------- /uninstall.sh: -------------------------------------------------------------------------------- 1 | # Don't modify anything after this 2 | if [ -f $INFO ]; then 3 | while read LINE; do 4 | if [ "$(echo -n $LINE | tail -c 1)" == "~" ]; then 5 | continue 6 | elif [ -f "$LINE~" ]; then 7 | mv -f $LINE~ $LINE 8 | else 9 | rm -f $LINE 10 | while true; do 11 | LINE=$(dirname $LINE) 12 | [ "$(ls -A $LINE 2>/dev/null)" ] && break 1 || rm -rf $LINE 13 | done 14 | fi 15 | done < $INFO 16 | rm -f $INFO 17 | fi -------------------------------------------------------------------------------- /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 -------------------------------------------------------------------------------- /update.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "v3.2", 3 | "versionCode": 202504281, 4 | "zipUrl": "https://github.com/Infamousmick/Infamick-script/releases/download/v3.2/Infamick-script-v3.2_MAGISK.zip", 5 | "changelog": "https://raw.githubusercontent.com/Infamousmick/Infamick-script/main/changelog.md" 6 | } 7 | -------------------------------------------------------------------------------- /updater-script: -------------------------------------------------------------------------------- 1 | #MAGISK --------------------------------------------------------------------------------