├── src
├── system
│ ├── placeholder
│ └── placeholder.sha512
├── webroot
│ ├── action.prop
│ ├── action.prop.sha512
│ ├── index.html.sha512
│ ├── main.js.sha512
│ ├── classifications
│ │ ├── classificationB.txt.sha512
│ │ ├── classificationC.txt.sha512
│ │ ├── classificationD.txt.sha512
│ │ ├── classificationC.txt
│ │ ├── classificationD.txt
│ │ └── classificationB.txt
│ ├── index.html
│ └── main.js
├── META-INF
│ └── com
│ │ └── google
│ │ └── android
│ │ ├── updater-script
│ │ ├── update-binary.sha512
│ │ ├── updater-script.sha512
│ │ └── update-binary
├── webroot.zip
├── action.sh.sha512
├── actionA.sh.sha512
├── actionB.sh.sha512
├── customize.sh.sha512
├── module.prop.sha512
├── service.sh.sha512
├── uninstall.sh.sha512
├── post-fs-data.sh.sha512
├── module.prop
├── webroot.zip.sha512
├── service.sh
├── uninstall.sh
├── post-fs-data.sh
├── action.sh
├── customize.sh
└── actionA.sh
├── Release
├── Bypasser_v2025010900.zip
├── Bypasser_v2025010920.zip
├── Bypasser_v2025010922.zip
├── Bypasser_v2025011022.zip
├── Bypasser_v2025011023.zip
├── Bypasser_v2025011223.zip
├── Bypasser_v2025011505.zip
├── Bypasser_v2025012422.zip
├── Bypasser_v2025012523.zip
├── Bypasser_v2025012617.zip
├── Bypasser_v2025021723.zip
├── Bypasser_v2025021823.zip
├── Bypasser_v2025022022.zip
├── Bypasser_v2025022023.zip
├── Bypasser_v2025022219.zip
├── Bypasser_v2025042223.zip
├── Bypasser_v2025052503.zip
├── Bypasser_v2025052822.zip
├── Bypasser_v2025070916.zip
└── Bypasser_v2025122018.zip
├── Changelog
├── Bypasser_v2025010922.md
├── Bypasser_v2025011022.md
├── Bypasser_v2025122018.md
├── Bypasser_v2025010900.md
├── Bypasser_v2025010920.md
├── Bypasser_v2025011023.md
├── Bypasser_v2025011505.md
├── Bypasser_v2025021823.md
├── Bypasser_v2025011223.md
├── Bypasser_v2025012422.md
├── Bypasser_v2025052503.md
├── Bypasser_v2025022022.md
├── Bypasser_v2025021723.md
├── Bypasser_v2025022219.md
├── Bypasser_v2025052822.md
├── Bypasser_v2025022023.md
├── Bypasser_v2025070916.md
├── Bypasser_v2025012617.md
├── Bypasser_v2025042223.md
└── Bypasser_v2025012523.md
├── Update.json
├── README.md
├── updateClassifications.py
└── LICENSE
/src/system/placeholder:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/webroot/action.prop:
--------------------------------------------------------------------------------
1 | A
--------------------------------------------------------------------------------
/src/META-INF/com/google/android/updater-script:
--------------------------------------------------------------------------------
1 | #MAGISK
2 |
--------------------------------------------------------------------------------
/src/webroot.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LRFP-Team/Bypasser/HEAD/src/webroot.zip
--------------------------------------------------------------------------------
/Release/Bypasser_v2025010900.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LRFP-Team/Bypasser/HEAD/Release/Bypasser_v2025010900.zip
--------------------------------------------------------------------------------
/Release/Bypasser_v2025010920.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LRFP-Team/Bypasser/HEAD/Release/Bypasser_v2025010920.zip
--------------------------------------------------------------------------------
/Release/Bypasser_v2025010922.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LRFP-Team/Bypasser/HEAD/Release/Bypasser_v2025010922.zip
--------------------------------------------------------------------------------
/Release/Bypasser_v2025011022.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LRFP-Team/Bypasser/HEAD/Release/Bypasser_v2025011022.zip
--------------------------------------------------------------------------------
/Release/Bypasser_v2025011023.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LRFP-Team/Bypasser/HEAD/Release/Bypasser_v2025011023.zip
--------------------------------------------------------------------------------
/Release/Bypasser_v2025011223.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LRFP-Team/Bypasser/HEAD/Release/Bypasser_v2025011223.zip
--------------------------------------------------------------------------------
/Release/Bypasser_v2025011505.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LRFP-Team/Bypasser/HEAD/Release/Bypasser_v2025011505.zip
--------------------------------------------------------------------------------
/Release/Bypasser_v2025012422.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LRFP-Team/Bypasser/HEAD/Release/Bypasser_v2025012422.zip
--------------------------------------------------------------------------------
/Release/Bypasser_v2025012523.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LRFP-Team/Bypasser/HEAD/Release/Bypasser_v2025012523.zip
--------------------------------------------------------------------------------
/Release/Bypasser_v2025012617.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LRFP-Team/Bypasser/HEAD/Release/Bypasser_v2025012617.zip
--------------------------------------------------------------------------------
/Release/Bypasser_v2025021723.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LRFP-Team/Bypasser/HEAD/Release/Bypasser_v2025021723.zip
--------------------------------------------------------------------------------
/Release/Bypasser_v2025021823.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LRFP-Team/Bypasser/HEAD/Release/Bypasser_v2025021823.zip
--------------------------------------------------------------------------------
/Release/Bypasser_v2025022022.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LRFP-Team/Bypasser/HEAD/Release/Bypasser_v2025022022.zip
--------------------------------------------------------------------------------
/Release/Bypasser_v2025022023.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LRFP-Team/Bypasser/HEAD/Release/Bypasser_v2025022023.zip
--------------------------------------------------------------------------------
/Release/Bypasser_v2025022219.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LRFP-Team/Bypasser/HEAD/Release/Bypasser_v2025022219.zip
--------------------------------------------------------------------------------
/Release/Bypasser_v2025042223.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LRFP-Team/Bypasser/HEAD/Release/Bypasser_v2025042223.zip
--------------------------------------------------------------------------------
/Release/Bypasser_v2025052503.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LRFP-Team/Bypasser/HEAD/Release/Bypasser_v2025052503.zip
--------------------------------------------------------------------------------
/Release/Bypasser_v2025052822.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LRFP-Team/Bypasser/HEAD/Release/Bypasser_v2025052822.zip
--------------------------------------------------------------------------------
/Release/Bypasser_v2025070916.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LRFP-Team/Bypasser/HEAD/Release/Bypasser_v2025070916.zip
--------------------------------------------------------------------------------
/Release/Bypasser_v2025122018.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LRFP-Team/Bypasser/HEAD/Release/Bypasser_v2025122018.zip
--------------------------------------------------------------------------------
/Changelog/Bypasser_v2025010922.md:
--------------------------------------------------------------------------------
1 | ## Bypasser_v2025010922
2 |
3 | Updating via the Magisk Manager has been tested.
4 |
--------------------------------------------------------------------------------
/Changelog/Bypasser_v2025011022.md:
--------------------------------------------------------------------------------
1 | ## Bypasser_v2025011022
2 |
3 | The configuration generation for HMA/HMAL is supported.
4 |
--------------------------------------------------------------------------------
/Changelog/Bypasser_v2025122018.md:
--------------------------------------------------------------------------------
1 | ## Bypasser_v2025122018
2 |
3 | - Updated the suggestions.
4 | - Bumped TMLP to LRFP.
5 |
--------------------------------------------------------------------------------
/Changelog/Bypasser_v2025010900.md:
--------------------------------------------------------------------------------
1 | ## Bypasser_v2025010900
2 |
3 | The module has its own name and direction from now on.
4 |
--------------------------------------------------------------------------------
/Changelog/Bypasser_v2025010920.md:
--------------------------------------------------------------------------------
1 | ## Bypasser_v2025010920
2 |
3 | The module has a basic framework and is ready for the future.
4 |
--------------------------------------------------------------------------------
/Changelog/Bypasser_v2025011023.md:
--------------------------------------------------------------------------------
1 | ## Bypasser_v2025011023
2 |
3 | The configuration generation for the tricky store target file is supported.
4 |
--------------------------------------------------------------------------------
/src/action.sh.sha512:
--------------------------------------------------------------------------------
1 | 1b38934c7ae7c10e069262c324648b49229feec212ff92e79cd54849de4125fd7f663f50f4d01e70856641d3f244c40d6333bbca1229061945cb7a918367dae6
--------------------------------------------------------------------------------
/src/actionA.sh.sha512:
--------------------------------------------------------------------------------
1 | f6076323dca7a43e465b2cfa446b54e771ff5cadc29b2fff3b7efa04b34e12de1f768d42758c7f1fe2adb8035934a2c4283a7d258724ac6a0208aadc70830a05
--------------------------------------------------------------------------------
/src/actionB.sh.sha512:
--------------------------------------------------------------------------------
1 | 9d781755de2130b321f358c7250361c3d0a6b2e2632c13529d558d38c7fa70f1f5370a2475cd85d9a4cdd11a884280016bde33acc4ef05ce9be2be78e95bd3d8
--------------------------------------------------------------------------------
/src/customize.sh.sha512:
--------------------------------------------------------------------------------
1 | 96dc16d9fa0636b33fce5b8b1713b6b783a19d38b8fc50ef15fbab51b4b58d5997b98070052bd3950a9a63954d4f620bd12cff845c61f759799494c51f566f36
--------------------------------------------------------------------------------
/src/module.prop.sha512:
--------------------------------------------------------------------------------
1 | 85a91f44f8151280082c0d65c472a66b175e5013d031aad313e8f280e02aa8caa9eee496fd4d526bfb0418c664367e732a679f48f2cfa18892d3142a40ab5cbb
--------------------------------------------------------------------------------
/src/service.sh.sha512:
--------------------------------------------------------------------------------
1 | 6426672579caef0b7a173345fce58611b274005aca0b9673bba56f8fb7c9a775d987d8dc89884a1c47280d4fd3d304e8fd3197001d7f64b906c2a37aab29a925
--------------------------------------------------------------------------------
/src/uninstall.sh.sha512:
--------------------------------------------------------------------------------
1 | 6426672579caef0b7a173345fce58611b274005aca0b9673bba56f8fb7c9a775d987d8dc89884a1c47280d4fd3d304e8fd3197001d7f64b906c2a37aab29a925
--------------------------------------------------------------------------------
/src/post-fs-data.sh.sha512:
--------------------------------------------------------------------------------
1 | 6426672579caef0b7a173345fce58611b274005aca0b9673bba56f8fb7c9a775d987d8dc89884a1c47280d4fd3d304e8fd3197001d7f64b906c2a37aab29a925
--------------------------------------------------------------------------------
/src/system/placeholder.sha512:
--------------------------------------------------------------------------------
1 | cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
--------------------------------------------------------------------------------
/src/webroot/action.prop.sha512:
--------------------------------------------------------------------------------
1 | 21b4f4bd9e64ed355c3eb676a28ebedaf6d8f17bdc365995b319097153044080516bd083bfcce66121a3072646994c8430cc382b8dc543e84880183bf856cff5
--------------------------------------------------------------------------------
/src/webroot/index.html.sha512:
--------------------------------------------------------------------------------
1 | 040e39c1fe173cf7e63aa3838f010b800ab8007608363e8d73d2257681c6f84370055878ac683692a47630baa685e28da53920756f11567c011c9ef979bacfaa
--------------------------------------------------------------------------------
/src/webroot/main.js.sha512:
--------------------------------------------------------------------------------
1 | 1f0a26c3f50dd10c1ae2251af25ee77cfe9fcb326514f8f7a0f5a986f69b79c45d48dffcf227e23c5d6cbd7a14481a89081bbe1be2b169fac4999375a42ffb55
--------------------------------------------------------------------------------
/Changelog/Bypasser_v2025011505.md:
--------------------------------------------------------------------------------
1 | ## Bypasser_v2025011505
2 |
3 | - Optimized the logic of the script `action`.sh.
4 | - Designed the script `customize.sh`.
5 |
--------------------------------------------------------------------------------
/Changelog/Bypasser_v2025021823.md:
--------------------------------------------------------------------------------
1 | ## Bypasser_v2025021823
2 |
3 | - Support updating the web UI dynamically.
4 | - Adjust the logic of the ``action.sh``.
5 |
--------------------------------------------------------------------------------
/src/META-INF/com/google/android/update-binary.sha512:
--------------------------------------------------------------------------------
1 | f440d0e297d2a39f81309b6df40b0ca239b90ff9d07f9d365498ecafd6922519847da8cf8a02c50bd9291fcd8e030ef7cb0e0cbeef76c5facf8447cf5c18e308
--------------------------------------------------------------------------------
/src/META-INF/com/google/android/updater-script.sha512:
--------------------------------------------------------------------------------
1 | a5c6a06ffd023af1294478b0d20d8211ecf33f3e0fe6ae60e610a02935acdc5a984acc2fcc5e952701ad47c6471522121c3a0b204290406b0417f92b3f1414bb
--------------------------------------------------------------------------------
/src/webroot/classifications/classificationB.txt.sha512:
--------------------------------------------------------------------------------
1 | 8cc67c25d028eb651bfee26db688631e60d10e5eaf0af786419fc211d9abbb583477852370616d1c49f624a5e5e296f6cc0ca27837c65bfd2686e413bde68966
--------------------------------------------------------------------------------
/src/webroot/classifications/classificationC.txt.sha512:
--------------------------------------------------------------------------------
1 | 21be2c94395a2664ca8341e5aff1395d7a8bed83fbe9c477fd1fd80200d39da0621426ab1eef808be5f4a2b95b3ba3ffc5b2b02c9f32c2f349b8c5d82f267c34
--------------------------------------------------------------------------------
/src/webroot/classifications/classificationD.txt.sha512:
--------------------------------------------------------------------------------
1 | 4c46d35753d60a9d5459a960a6dbab5e3e325f85d0bdc5e9c0200a18f17a2f914de4e5fb5b28ef48686da19b41737701dd24ffea2a92753be8beefe693b00e38
--------------------------------------------------------------------------------
/Changelog/Bypasser_v2025011223.md:
--------------------------------------------------------------------------------
1 | ## Bypasser_v2025011223
2 |
3 | - Creating shamiko whitelist configuration file is supported.
4 | - Automatic updating ``action.sh`` is implemented.
5 |
--------------------------------------------------------------------------------
/Changelog/Bypasser_v2025012422.md:
--------------------------------------------------------------------------------
1 | ## Bypasser_v2025012422
2 |
3 | - Support checking the manager version before installation.
4 | - Support checking SHA-512 values before installation.
5 |
--------------------------------------------------------------------------------
/Changelog/Bypasser_v2025052503.md:
--------------------------------------------------------------------------------
1 | ## Bypasser_v2025052503
2 |
3 | - Optimize the logic of handling the Zygisk traces.
4 | - Adjust the exit codes of the scripts related to ``action.sh``.
5 |
--------------------------------------------------------------------------------
/Changelog/Bypasser_v2025022022.md:
--------------------------------------------------------------------------------
1 | ## Bypasser_v2025022022
2 |
3 | - Improve the loop logic.
4 | - Further adapt to the module installer of Apatch.
5 | - Support showing the action slot in the web UI.
6 |
--------------------------------------------------------------------------------
/Changelog/Bypasser_v2025021723.md:
--------------------------------------------------------------------------------
1 | ## Bypasser_v2025021723
2 |
3 | - Implement the web UI though there is nothing to display at this time.
4 | - Add configuration codes for Zygisk Next.
5 | - Adapt to the shell interpreter of Apatch better.
6 |
--------------------------------------------------------------------------------
/Changelog/Bypasser_v2025022219.md:
--------------------------------------------------------------------------------
1 | ## Bypasser_v2025022219
2 |
3 | - Make printing, cache clearing, working directory changing, and permission setting systematic based on the stack thought.
4 | - Optimize the logic of the scripts and the web UI.
5 |
--------------------------------------------------------------------------------
/Changelog/Bypasser_v2025052822.md:
--------------------------------------------------------------------------------
1 | ## Bypasser_v2025052822
2 |
3 | - Store the classification cache files locally to avoid no network connection.
4 | - Support showing the classifications in the web UI.
5 | - Make the prompts in the web UI colorful.
6 |
--------------------------------------------------------------------------------
/Changelog/Bypasser_v2025022023.md:
--------------------------------------------------------------------------------
1 | ## Bypasser_v2025022023
2 |
3 | - Further adapt the ``action.sh`` to Apatch.
4 | - Users using earlier versions must update ``action.sh`` by flashing this version of the module to make the dynamic updating for ``action.sh`` available.
5 |
--------------------------------------------------------------------------------
/Update.json:
--------------------------------------------------------------------------------
1 | {
2 | "version":"v2025122018",
3 | "versionCode":2025122018,
4 | "zipUrl":"https://raw.githubusercontent.com/LRFP-Team/Bypasser/main/Release/Bypasser_v2025122018.zip",
5 | "changelog":"https://raw.githubusercontent.com/LRFP-Team/Bypasser/main/Changelog/Bypasser_v2025122018.md"
6 | }
7 |
--------------------------------------------------------------------------------
/Changelog/Bypasser_v2025070916.md:
--------------------------------------------------------------------------------
1 | ## Bypasser_v2025070916
2 |
3 | - Adjusted the order and the exit code of each bypassing block.
4 | - Optimized the logic of wiping the Zygisk traces.
5 | - Added more shell functions.
6 | - Optimized the logic of the permission setting.
7 | - Optimized the plain string searching.
8 |
--------------------------------------------------------------------------------
/Changelog/Bypasser_v2025012617.md:
--------------------------------------------------------------------------------
1 | ## Bypasser_v2025012617
2 |
3 | - Perform local shell syntax checks in the builder and the installer.
4 | - Support asking users for the local scanning willingness before executing the ``action.sh`` in Magisk installer.
5 | - Better time consumption computation is made.
6 | - Adjust the exit codes of the scripts.
7 |
--------------------------------------------------------------------------------
/Changelog/Bypasser_v2025042223.md:
--------------------------------------------------------------------------------
1 | ## Bypasser_v2025042223
2 |
3 | - Adjust logic of the ``action`` for Zygisk traces.
4 | - Change the location of the action configuration file.
5 | - Enhance the robustness of the ``action.sh``.
6 | - Users using earlier versions must flash this version of the module to make the dynamic updating for ``action.sh`` and web UI available.
7 |
--------------------------------------------------------------------------------
/src/module.prop:
--------------------------------------------------------------------------------
1 | id=bypasser
2 | name=Bypasser
3 | version=v2025122018
4 | versionCode=2025122018
5 | author=LRFP Team
6 | description=This is a developing rooting-layer system module for systematically bypassing environment detection related to LRFP for Android devices, where the abbreviation "LRFP" stands for Low-level, Rooting, Frameworks, and Plugins.
7 | updateJson=https://raw.githubusercontent.com/LRFP-Team/Bypasser/main/Update.json
8 |
--------------------------------------------------------------------------------
/Changelog/Bypasser_v2025012523.md:
--------------------------------------------------------------------------------
1 | ## Bypasser_v2025012523
2 |
3 | - Format commit messages.
4 | - Change updating behaviors in ``action.sh``.
5 | - Manage permissions in a serious way.
6 | - Download the latest version of ``action`` only when the SHA-512 value of the local ``action.sh`` is different from that in the latest SHA-512 file.
7 | - Use SHA-512 file to verify the dynamic update of ``action.sh``.
8 | - Optimize the exit codes of ``action.sh``.
9 | - Local application scanning is made optional.
10 | - Adjust the format of the function declaration in all the scripts.
11 | - Users using earlier versions must update ``action.sh`` by flashing this version of the module to make the dynamic updating for ``action.sh`` available.
12 |
--------------------------------------------------------------------------------
/src/webroot.zip.sha512:
--------------------------------------------------------------------------------
1 | 040e39c1fe173cf7e63aa3838f010b800ab8007608363e8d73d2257681c6f84370055878ac683692a47630baa685e28da53920756f11567c011c9ef979bacfaa webroot/index.html
2 | 1f0a26c3f50dd10c1ae2251af25ee77cfe9fcb326514f8f7a0f5a986f69b79c45d48dffcf227e23c5d6cbd7a14481a89081bbe1be2b169fac4999375a42ffb55 webroot/main.js
3 | 21be2c94395a2664ca8341e5aff1395d7a8bed83fbe9c477fd1fd80200d39da0621426ab1eef808be5f4a2b95b3ba3ffc5b2b02c9f32c2f349b8c5d82f267c34 webroot/classifications/classificationC.txt
4 | 4c46d35753d60a9d5459a960a6dbab5e3e325f85d0bdc5e9c0200a18f17a2f914de4e5fb5b28ef48686da19b41737701dd24ffea2a92753be8beefe693b00e38 webroot/classifications/classificationD.txt
5 | 8cc67c25d028eb651bfee26db688631e60d10e5eaf0af786419fc211d9abbb583477852370616d1c49f624a5e5e296f6cc0ca27837c65bfd2686e413bde68966 webroot/classifications/classificationB.txt
--------------------------------------------------------------------------------
/src/webroot/classifications/classificationC.txt:
--------------------------------------------------------------------------------
1 | chunqiu.safe
2 | com.OrangeEnvironment.Detector
3 | com.android.nativetest
4 | com.androidfung.drminfo
5 | com.byxiaorun.detector
6 | com.henrikherzig.playintegritychecker
7 | com.lingqing.detector
8 | com.reveny.nativecheck
9 | com.sefu.vmessfree
10 | com.studio.duckdetector
11 | com.thend.integritychecker
12 | com.tsng.applistdetector
13 | com.zhenxi.hunter
14 | gr.nikolasspyr.integritycheck
15 | icu.nullptr.applistdetector
16 | icu.nullptr.nativetest
17 | id.my.pjm.qbcd_okr_dvii
18 | io.github.a13e300.dsf_detector
19 | io.github.huskydg.memorydetector
20 | io.github.rabehx.securify
21 | io.github.vvb2060.keyattestation
22 | io.github.vvb2060.magiskdetector
23 | io.github.vvb2060.mahoshojo
24 | io.github.vvb2060.xposeddetector
25 | luna.safe.luna
26 | me.garfieldhan.hiapatch
27 | me.garfieldhan.holmes
28 | ml.w568w.checkxposed
29 | org.akanework.checker
30 | rikka.safetynetchecker
31 | wu.Rookie.Detector
--------------------------------------------------------------------------------
/src/service.sh:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 | readonly EXIT_SUCCESS=0
3 | readonly EXIT_FAILURE=1
4 | readonly EOF=255
5 | readonly moduleName="Bypasser"
6 | readonly moduleId="bypasser"
7 | readonly moduleFolderPath="$(dirname "$0")"
8 |
9 | function clearCaches
10 | {
11 | sync && echo 3 > /proc/sys/vm/drop_caches
12 | return $?
13 | }
14 |
15 | function setPermissions
16 | {
17 | returnCode=${EXIT_SUCCESS}
18 | if [[ -n "$(find . -type d -exec chmod 555 {} \; 2>&1)" ]];
19 | then
20 | returnCode=${EXIT_FAILURE}
21 | fi
22 | if [[ -n "$(find . -type f ! -name "*.sh" -exec chmod 444 {} \; 2>&1)" ]];
23 | then
24 | returnCode=${EXIT_FAILURE}
25 | fi
26 | if [[ -n "$(find . -type f -name "*.sh" -exec chmod 544 {} \; 2>&1)" ]];
27 | then
28 | returnCode=${EXIT_FAILURE}
29 | fi
30 | if ! chown -R root:root ".";
31 | then
32 | returnCode=${EXIT_FAILURE}
33 | fi
34 | return ${returnCode}
35 | }
36 |
37 | clearCaches &> /dev/null
38 | chmod 755 "${moduleFolderPath}" 2>/dev/null && cd "${moduleFolderPath}" 2>/dev/null
39 | if [[ $? -eq ${EXIT_SUCCESS} && "$(basename "$(pwd)")" == "${moduleId}" ]];
40 | then
41 | setPermissions &> /dev/null
42 | # TODO #
43 | setPermissions &> /dev/null 2>/dev/null && chmod 755 "${moduleFolderPath}" 2>/dev/null
44 | else
45 | exit ${EXIT_FAILURE}
46 | fi
47 | clearCaches &> /dev/null
48 | exit ${EXIT_SUCCESS}
49 |
--------------------------------------------------------------------------------
/src/uninstall.sh:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 | readonly EXIT_SUCCESS=0
3 | readonly EXIT_FAILURE=1
4 | readonly EOF=255
5 | readonly moduleName="Bypasser"
6 | readonly moduleId="bypasser"
7 | readonly moduleFolderPath="$(dirname "$0")"
8 |
9 | function clearCaches
10 | {
11 | sync && echo 3 > /proc/sys/vm/drop_caches
12 | return $?
13 | }
14 |
15 | function setPermissions
16 | {
17 | returnCode=${EXIT_SUCCESS}
18 | if [[ -n "$(find . -type d -exec chmod 555 {} \; 2>&1)" ]];
19 | then
20 | returnCode=${EXIT_FAILURE}
21 | fi
22 | if [[ -n "$(find . -type f ! -name "*.sh" -exec chmod 444 {} \; 2>&1)" ]];
23 | then
24 | returnCode=${EXIT_FAILURE}
25 | fi
26 | if [[ -n "$(find . -type f -name "*.sh" -exec chmod 544 {} \; 2>&1)" ]];
27 | then
28 | returnCode=${EXIT_FAILURE}
29 | fi
30 | if ! chown -R root:root ".";
31 | then
32 | returnCode=${EXIT_FAILURE}
33 | fi
34 | return ${returnCode}
35 | }
36 |
37 | clearCaches &> /dev/null
38 | chmod 755 "${moduleFolderPath}" 2>/dev/null && cd "${moduleFolderPath}" 2>/dev/null
39 | if [[ $? -eq ${EXIT_SUCCESS} && "$(basename "$(pwd)")" == "${moduleId}" ]];
40 | then
41 | setPermissions &> /dev/null
42 | # TODO #
43 | setPermissions &> /dev/null 2>/dev/null && chmod 755 "${moduleFolderPath}" 2>/dev/null
44 | else
45 | exit ${EXIT_FAILURE}
46 | fi
47 | clearCaches &> /dev/null
48 | exit ${EXIT_SUCCESS}
49 |
--------------------------------------------------------------------------------
/src/post-fs-data.sh:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 | readonly EXIT_SUCCESS=0
3 | readonly EXIT_FAILURE=1
4 | readonly EOF=255
5 | readonly moduleName="Bypasser"
6 | readonly moduleId="bypasser"
7 | readonly moduleFolderPath="$(dirname "$0")"
8 |
9 | function clearCaches
10 | {
11 | sync && echo 3 > /proc/sys/vm/drop_caches
12 | return $?
13 | }
14 |
15 | function setPermissions
16 | {
17 | returnCode=${EXIT_SUCCESS}
18 | if [[ -n "$(find . -type d -exec chmod 555 {} \; 2>&1)" ]];
19 | then
20 | returnCode=${EXIT_FAILURE}
21 | fi
22 | if [[ -n "$(find . -type f ! -name "*.sh" -exec chmod 444 {} \; 2>&1)" ]];
23 | then
24 | returnCode=${EXIT_FAILURE}
25 | fi
26 | if [[ -n "$(find . -type f -name "*.sh" -exec chmod 544 {} \; 2>&1)" ]];
27 | then
28 | returnCode=${EXIT_FAILURE}
29 | fi
30 | if ! chown -R root:root ".";
31 | then
32 | returnCode=${EXIT_FAILURE}
33 | fi
34 | return ${returnCode}
35 | }
36 |
37 | clearCaches &> /dev/null
38 | chmod 755 "${moduleFolderPath}" 2>/dev/null && cd "${moduleFolderPath}" 2>/dev/null
39 | if [[ $? -eq ${EXIT_SUCCESS} && "$(basename "$(pwd)")" == "${moduleId}" ]];
40 | then
41 | setPermissions &> /dev/null
42 | # TODO #
43 | setPermissions &> /dev/null 2>/dev/null && chmod 755 "${moduleFolderPath}" 2>/dev/null
44 | else
45 | exit ${EXIT_FAILURE}
46 | fi
47 | clearCaches &> /dev/null
48 | exit ${EXIT_SUCCESS}
49 |
--------------------------------------------------------------------------------
/src/webroot/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Bypasser
7 |
34 |
35 |
36 |
37 |
38 | Welcome to the web UI of the Bypasser Magisk Module!
39 |
40 |
41 |
The dynamic update procedure relies on the A/B swap architecture.
42 |
Error: Cannot fetch the current action slot.
43 |
44 |
45 |
46 |
Three stored classification files are listed as follows.
47 |
48 |
49 |
50 |
51 |
52 |
71 |
72 |
73 |
--------------------------------------------------------------------------------
/src/webroot/main.js:
--------------------------------------------------------------------------------
1 | ! function ()
2 | {
3 | function getAttr()
4 | {
5 | let scripts = document.getElementsByTagName("script"), len = scripts.length, script = scripts[len - 1];
6 | return {
7 | length:len,
8 | z:script.getAttribute("zIndex") || -1,
9 | opacity:script.getAttribute("opacity") || 0.5,
10 | color:script.getAttribute("color") || "0,0,0",
11 | count:script.getAttribute("count") || 99
12 | }
13 | }
14 | function getWindowWH()
15 | {
16 | W = canvas.width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,
17 | H = canvas.height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
18 | }
19 | function draw()
20 | {
21 | context.clearRect(0, 0, W, H);
22 | var w = [mouse].concat(squares);
23 | var x, v, A, B, z, y;
24 | squares.forEach(function (i) {
25 | i.x += i.xa;
26 | i.y += i.ya;
27 | i.xa = i.xa * (i.x > W || i.x < 0 ? -1 : 1);
28 | i.ya = i.ya * (i.y > H || i.y < 0 ? -1 : 1);
29 | context.fillRect(i.x - 0.5, i.y - 0.5, 1, 1);
30 | for (let n = 0; n < w.length; ++n)
31 | {
32 | x = w[n];
33 | if (i !== x && null !== x.x && null !== x.y)
34 | {
35 | x_diff = i.x - x.x;
36 | y_diff = i.y - x.y;
37 | distance = x_diff * x_diff + y_diff * y_diff;
38 | if (distance < x.max)
39 | {
40 | if (x === mouse && distance > x.max / 2)
41 | {
42 | i.x = i.x - 0.03 * x_diff;
43 | i.y = i.y - 0.03 * y_diff;
44 | }
45 | A = (x.max - distance) / x.max;
46 | context.beginPath();
47 | context.lineWidth = A / 2;
48 | context.strokeStyle = "rgba(" + attr.color + "," + (A + 0.2) + ")";
49 | context.moveTo(i.x, i.y);
50 | context.lineTo(x.x, x.y);
51 | context.stroke();
52 | }
53 | }
54 | }
55 | w.splice(w.indexOf(i), 1);
56 | });
57 | animation(draw);
58 | }
59 |
60 | var canvas = document.createElement("canvas"), context = canvas.getContext("2d"), attr = getAttr();
61 | canvas.id = "c_n" + attr.length;
62 | canvas.style.cssText = "position:fixed;top:0;left:0;z-index:" + attr.z + ";opacity:" + attr.opacity;
63 | document.getElementsByTagName("body")[0].appendChild(canvas);
64 | getWindowWH();
65 | window.onresize = getWindowWH;
66 | var random = Math.random, squares = [];
67 | for (let p = 0; p < attr.count; ++p)
68 | {
69 | var square_x = random() * W, square_y = random() * H, square_xa = 2 * random() - 1, square_ya = 2 * random() - 1;
70 | squares.push({
71 | x:square_x,
72 | y:square_y,
73 | xa:square_xa,
74 | ya:square_ya,
75 | max:6000
76 | })
77 | }
78 | var mouse = {
79 | x:null,
80 | y:null,
81 | max:20000
82 | };
83 | window.onmousemove = function(i) {
84 | i = i || window.event;
85 | mouse.x = i.clientX;
86 | mouse.y = i.clientY;
87 | }
88 | window.onmouseout = function() {
89 | mouse.x = null;
90 | mouse.y = null;
91 | }
92 | var animation = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (i) {
93 | window.setTimeout(i, 1000 / 45)
94 | };
95 | setTimeout(
96 | function() {
97 | draw();
98 | }, 100
99 | )
100 | }();
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Bypasser
2 |
3 | This is a developing rooting-layer module for systematically bypassing environment detection related to LRFP for Android devices, where the abbreviation "LRFP" stands for Low-level, Rooting, Frameworks, and Plugins.
4 |
5 | This module will only take effect when users install it or click the ``action`` button. The current supported features are as follows.
6 |
7 | - Welcome (0b00000X): Perform built-in configurations for this module.
8 | - Zygisk Traces (0b0000X0): Deploy correct configurations for different Zygisk solutions according to the Zygisk implementation, Shamiko, NoHello, and Zygisk Assistant modules used.
9 | - HMA(L) (0b000X00): Generate HMA(L) configurations based on cloud libraries (along with the web UI updating) and local packages. Users are required to manually import the configurations via HMA(L). Networks to GitHub are optional.
10 | - Tricky Store (0b00X000): Generate Tricky Store configurations directly based on cloud libraries and local packages. The configurations will be written to the Tricky Store configuration folder directly. Networks to GitHub are optional.
11 | - Shell (0b0X0000): Perform some shell commands. Please check ``actionA.sh`` for details.
12 | - Disable sensitive applications automatically installed by Google.
13 | - Remove sensitive policies.
14 | - Handle properties.
15 | - Enforce SELinux.
16 | - Check the existence of applications in Classifications $B$ and $C$ as a non-root user.
17 | - Check whether the system release version has been banned.
18 | - Patch ``/etc/compatconfig/services-platform-compat-config.xml``
19 | - Enable the feature of hiding desktop icons on devices running Android 10 or above.
20 | - Update (0bX00000): Perform regular dynamic updates for ``action.sh`` and the web UI (processed in the HMA(L) stage). Networks to GitHub are required.
21 |
22 | Please kindly be aware that this module will only optimize the rooting and injection environments based on the current environments. It will not include, install, disable, or uninstall any other modules or plugins.
23 | The implementation and bypassing of these environments should be challenging and complex procedures. Users should learn related knowledge before taking these actions.
24 | Relying on one-key solutions or paying others for remote deployment without knowing the principles is incorrect.
25 |
26 | ## Compilation
27 |
28 | If you want to build the module for testing purposes on your own, please use ``git clone`` to clone this repository to your local device.
29 |
30 | Execute ``./build.sh`` in the root folder of the local repository after you check carefully and grant suitable execution permissions.
31 |
32 | Submit modifications via a pull request (PR) if you wish to.
33 |
34 | ## Acknowledgement
35 |
36 | Here, we express our faithful gratitude to all the LRFP-related developers, especially the developers of the rooting solutions and the detailed guidelines for rooting-layer system module development.
37 |
38 | We also sincerely thank [@pumPCin](https://github.com/pumPCin) for providing old HMA(L) configuration folders in [https://github.com/pumPCin/HMAL/issues/50](https://github.com/pumPCin/HMAL/issues/50).
39 |
40 | ## Licensing
41 |
42 | This repository is under the ``GPL-3.0`` license. You can also regard this repository as an alternative rooting-layer system module template or a template GitHub repository for rooting-layer system module development. The A/B architecture is implemented for the dynamic updating of ``action``.
43 |
44 | ## Warning
45 |
46 | Since the project is still developing, please do not install the module here until this warning is removed in the future.
47 |
48 | We are rearranging the name of the team and the classifications of the applications. Please keep up with us until January 2026.
49 |
--------------------------------------------------------------------------------
/src/webroot/classifications/classificationD.txt:
--------------------------------------------------------------------------------
1 | app.earn.money.online.bharat.cash
2 | app.imps.unity
3 | chuxin.shimo.shimowendang
4 | cn.cyberIdentity.certification
5 | cn.dict.android.pro
6 | cn.gov.pbc.dcep
7 | cn.gov.tax.its
8 | cn.myflv.monitor.noactive
9 | cn.wch.bledemo
10 | cn.wps.moffice_eng
11 | cn.xuexi.android
12 | com.ChinaMobile
13 | com.MobileTicket
14 | com.adityabirlacapitaldigital.OneApp
15 | com.alibaba.aliyun
16 | com.alibaba.android.rimet
17 | com.amazon.appmanager
18 | com.anqmobileapp
19 | com.asw.moneyback
20 | com.authy.authy
21 | com.autonavi.minimap
22 | com.axis.mobile
23 | com.azure.authenticator
24 | com.baidu.input
25 | com.baidu.netdisk
26 | com.bankmandiri.mandiripay
27 | com.bnb.paynearby
28 | com.bochk.app.aos
29 | com.bochk.bocpay
30 | com.cainiao.wireless
31 | com.carrot.carrotfantasy
32 | com.carrot.iceworld
33 | com.cgt.bharatgas
34 | com.chaoxing.mobile
35 | com.cheq.retail
36 | com.chinamworld.bocmbci
37 | com.cimb.cimbocto
38 | com.cisco.anyconnect.vpn.android.avf
39 | com.csam.icici.bank.imobile
40 | com.digilocker.android
41 | com.digitalgd.dgyss
42 | com.disney.wheresmywater2_goo
43 | com.dragon.read
44 | com.edkey.quicktakes
45 | com.eg.android.AlipayGphone
46 | com.feiyu.carrot3
47 | com.feiyu.carrot3.huawei
48 | com.feiyu.carrot3.nearme.gamecenter
49 | com.feiyu.luobo4
50 | com.feiyu.luobo4.huawei
51 | com.feiyu.luobo4.nearme.gamecenter
52 | com.finshell.wallet
53 | com.flipkart.android
54 | com.google.android.apps.maps
55 | com.google.android.apps.messaging
56 | com.google.android.apps.youtube.music
57 | com.google.android.contactkeys
58 | com.google.android.gm
59 | com.google.android.googlequicksearchbox
60 | com.google.android.safetycore
61 | com.google.android.youtube
62 | com.hdfcbank.payzapp
63 | com.heytap.browser
64 | com.heytap.health
65 | com.heytap.htms
66 | com.heytap.market
67 | com.heytap.vip
68 | com.hicorenational.antifraud
69 | com.hike.rush
70 | com.hike.speedludo
71 | com.huawei.hwid
72 | com.icbc
73 | com.icicibank.m2i
74 | com.icicibank.m2iEuropenew
75 | com.idfcfirstbank.optimus
76 | com.instagram.android
77 | com.jazibkhan.equalizer
78 | com.kotak.neo
79 | com.kreditpe.android.app
80 | com.legendsec.sslvpn
81 | com.leiting.aobi
82 | com.leiting.aobi.huawei
83 | com.leiting.aobi.nearme.gamecenter
84 | com.lgeha.nuts
85 | com.lite.lanxin
86 | com.mada.madapay
87 | com.mcdonalds.mobileapp
88 | com.microsoft.office.outlook
89 | com.mtr.mtrmobile
90 | com.netease.cloudmusic
91 | com.netease.edu.ucmooc
92 | com.nextbillion.groww
93 | com.noctuasoftware.stellarium_free
94 | com.nsdlpb.jiffy
95 | com.octopuscards.nfc_reader
96 | com.oneplus.backuprestore
97 | com.oneplus.bbs
98 | com.oneplus.calculator
99 | com.oneplus.canvasresources
100 | com.oneplus.iconpack.oneplush2
101 | com.oneplus.iconpack.onepluso2
102 | com.oneplus.note
103 | com.oneplus.soundrecorder
104 | com.oneplus.twspods
105 | com.oppo.market
106 | com.oppo.store
107 | com.ovunque.parkwheels
108 | com.parknshop.parknshopapp
109 | com.phonepe.app
110 | com.popclub.android
111 | com.prudential.iiqe
112 | com.pupumall.customer
113 | com.pv.scr.pancardreader
114 | com.revolut.revolut
115 | com.rovio.angrybirdsspace.ads
116 | com.samsung.android.sm.devicesecurity
117 | com.samsung.knox.securefolder
118 | com.sankuai.meituan
119 | com.sankuai.meituan.takeoutnew
120 | com.sbi.lotusintouch
121 | com.secure.secid
122 | com.smp.musicspeed
123 | com.softin.copydata
124 | com.sraoss.dmrc
125 | com.ss.android.ugc.aweme.lite
126 | com.taobao.taobao
127 | com.tastegourmetgroup.app
128 | com.tatadigital.tcp
129 | com.tencent.androidqqmail
130 | com.tencent.edu
131 | com.tencent.mm
132 | com.tencent.mobileqq
133 | com.tencent.token
134 | com.tencent.wemeet.app
135 | com.tencent.wework
136 | com.tmri.app.main
137 | com.transitfe
138 | com.ubercab.driver
139 | com.unionpay
140 | com.unionpay.tsmservice
141 | com.vnpay.vpbankonline
142 | com.webank.wemoney
143 | com.wemade.wemixplay
144 | com.wepie.snake.nearme.gamecenter
145 | com.whatsapp
146 | com.xingin.xhs
147 | com.xunlei.downloadprovider
148 | com.xunmeng.pinduoduo
149 | com.yiban.app
150 | com.yitong.mbank.psbc
151 | com.yuurewards.app
152 | com.zeptolab.ctr.ads
153 | com.zwfw.YueZhengYi
154 | hk.gov.immd.contactless
155 | hk.gov.immd.mobileapps
156 | hk.gov.ogcio.iamsmart
157 | hk.hku.its.attendance
158 | hk.hku.its.hkuapp
159 | id.bmri.livin
160 | in.gokiwi.kiwitpap
161 | in.org.npci.upiapp
162 | indwin.c3.shareapp
163 | io.cloudwalk.infinitepaydash
164 | it.pagopa.io.app
165 | jemuillot.ContactNumberFixer
166 | mk.telekom.telekomtv
167 | mo.gov.ssm.Macao_Health_Codev2
168 | net.one97.paytm
169 | net.oneplus.weather
170 | net.oneplus.widget
171 | net.xmind.doughnut
172 | org.chromium.webapk.afd51ebf603ffca6b_v2
173 | org.npci.erupeeFEDERAL
174 | org.telegram.messenger
175 | paymob.cib.smartwallet
176 | ph.com.bdo.retail
177 | ph.com.gotyme
178 | us.zoom.videomeetings
179 | windinfo.android
180 | youqu.android.todesk
--------------------------------------------------------------------------------
/src/action.sh:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 | readonly EXIT_SUCCESS=0
3 | readonly EXIT_FAILURE=1
4 | readonly EOF=255
5 | readonly VK_POWER=13
6 | readonly VK_SCREEN=20
7 | readonly VK_UP=38
8 | readonly VK_DOWN=40
9 | readonly moduleName="Bypasser"
10 | readonly moduleId="bypasser"
11 | readonly defaultTimeout=5
12 | readonly actionFolderPath="$(dirname "$0")"
13 | readonly webrootName="webroot"
14 | readonly webrootFolderPath="${webrootName}"
15 | readonly actionPropFileName="action.prop"
16 | readonly actionPropFilePath="${webrootFolderPath}/${actionPropFileName}"
17 | exitCode=${EXIT_SUCCESS}
18 |
19 | function clearCaches
20 | {
21 | sync && echo 3 > /proc/sys/vm/drop_caches
22 | return $?
23 | }
24 |
25 | function setPermissions
26 | {
27 | returnCode=${EXIT_SUCCESS}
28 | if [[ -n "$(find . -type d -exec chmod 555 {} \; 2>&1)" ]];
29 | then
30 | returnCode=${EXIT_FAILURE}
31 | fi
32 | if [[ -n "$(find . -type f ! -name "*.sh" -exec chmod 444 {} \; 2>&1)" ]];
33 | then
34 | returnCode=${EXIT_FAILURE}
35 | fi
36 | if [[ -n "$(find . -type f -name "*.sh" -exec chmod 544 {} \; 2>&1)" ]];
37 | then
38 | returnCode=${EXIT_FAILURE}
39 | fi
40 | if ! chown -R root:root ".";
41 | then
42 | returnCode=${EXIT_FAILURE}
43 | fi
44 | return ${returnCode}
45 | }
46 |
47 | function getTheKeyPressed
48 | {
49 | if echo "$1" | grep -qE '^[1-9][0-9]*$';
50 | then
51 | timeout=$1
52 | else
53 | timeout=${defaultTimeout}
54 | fi
55 | read -r -t ${timeout} pressString < <(getevent -ql)
56 | pressCode=$?
57 | if [[ ${EXIT_SUCCESS} == ${pressCode} ]];
58 | then
59 | if [[ "${pressString}" == *KEY_VOLUMEUP* ]];
60 | then
61 | echo "The [+] was pressed. "
62 | return ${VK_UP}
63 | elif [[ "${pressString}" == *KEY_VOLUMEDOWN* ]];
64 | then
65 | echo "The [-] was pressed. "
66 | return ${VK_DOWN}
67 | elif [[ "${pressString}" == *KEY_POWER* ]];
68 | then
69 | echo "The power key was pressed. "
70 | return ${VK_POWER}
71 | elif [[ "${pressString}" == *ABS_MT_TRACKING_ID* ]];
72 | then
73 | echo "The screen was pressed. "
74 | return ${VK_SCREEN}
75 | else
76 | echo "The following unknown event occurred. "
77 | echo "${pressString}" | sed 's/^/\t/'
78 | return ${EXIT_FAILURE}
79 | fi
80 | else
81 | echo "Users did not respond within ${timeout} second(s). "
82 | return ${EOF}
83 | fi
84 | }
85 |
86 | clearCaches &> /dev/null
87 | chmod 755 "${actionFolderPath}" 2>/dev/null && cd "${actionFolderPath}" 2>/dev/null
88 | if [[ $? == ${EXIT_SUCCESS} && "$(basename "$(pwd)")" == "${moduleId}" ]];
89 | then
90 | setPermissions &> /dev/null
91 | if [[ ! -f "${actionPropFilePath}" ]];
92 | then
93 | mkdir -p "${webrootFolderPath}" && echo "A" > "${actionPropFilePath}"
94 | if [[ $? -eq ${EXIT_SUCCESS} ]];
95 | then
96 | echo "The action configuration file \"${actionPropFilePath}\" was missing and recovered successfully. "
97 | else
98 | echo "The action configuration file \"${actionPropFilePath}\" was missing and could not be recovered. "
99 | fi
100 | setPermissions &> /dev/null
101 | fi
102 | if [[ -f "${actionPropFilePath}" ]];
103 | then
104 | target="$(cat "${actionPropFilePath}")";
105 | if [[ "A" == "${target}" || "B" == "${target}" ]];
106 | then
107 | actionPath="action${target}.sh"
108 | if [[ -f "${actionPath}" ]];
109 | then
110 | if [[ -x "${actionPath}" ]];
111 | then
112 | if sh -n "${actionPath}";
113 | then
114 | sh "${actionPath}" "$@"
115 | exitCode=$?
116 | else
117 | echo "Failed to execute \`\`action.sh\`\` since the necessary script \`\`${actionPath}\`\` failed to pass the local shell syntax check (sh). "
118 | echo "Please try to flash the latest version of the ${moduleName} Magisk Module. "
119 | exitCode=${EXIT_FAILURE}
120 | fi
121 | else
122 | echo "Failed to execute \`\`action.sh\`\` since the necessary script \`\`${actionPath}\`\` was not executable. "
123 | echo "Please try to flash the latest version of the ${moduleName} Magisk Module. "
124 | exitCode=${EXIT_FAILURE}
125 | fi
126 | else
127 | echo "Failed to execute \`\`action.sh\`\` since the necessary script \`\`${actionPath}\`\` was missing. "
128 | echo "Please try to flash the latest version of the ${moduleName} Magisk Module. "
129 | exitCode=${EXIT_FAILURE}
130 | fi
131 | else
132 | echo "Failed to execute \`\`action.sh\`\` since an improper action configuration file was detected. "
133 | echo "Please try to flash the latest version of the ${moduleName} Magisk Module. "
134 | exitCode=${EXIT_FAILURE}
135 | fi
136 | else
137 | echo "Failed to execute \`\`action.sh\`\` since the action configuration file \"${actionPropFilePath}\" was missing and unrecoverable. "
138 | echo "Please try to flash the latest version of the ${moduleName} Magisk Module. "
139 | exitCode=${EXIT_FAILURE}
140 | fi
141 | setPermissions &> /dev/null 2>/dev/null && chmod 755 "${actionFolderPath}" 2>/dev/null
142 | else
143 | echo "Failed to execute \`\`action.sh\`\` since the working directory \"$(pwd)\" is unexpected. "
144 | echo "Please try to flash the latest version of the ${moduleName} Magisk Module. "
145 | exitCode=${EOF}
146 | fi
147 | clearCaches &> /dev/null
148 | if [[ "${APATCH}" == "true" || "${KSU}" == "true" ]];
149 | then
150 | if [[ $# -lt 1 ]];
151 | then
152 | echo "Please press the [+] or [-] key to exit. "
153 | vk=0
154 | while [[ ${VK_UP} -ne ${vk} && ${VK_DOWN} -ne ${vk} ]]
155 | do
156 | content="$(getTheKeyPressed)"
157 | vk=$?
158 | done
159 | fi
160 | fi
161 | exit ${exitCode}
162 |
--------------------------------------------------------------------------------
/src/META-INF/com/google/android/update-binary:
--------------------------------------------------------------------------------
1 | #!/sbin/sh
2 |
3 | # Detect whether in boot mode
4 | ps | grep zygote | grep -v grep >/dev/null && BOOTMODE=true || BOOTMODE=false
5 |
6 | # Default permissions
7 | umask 022
8 |
9 | ##########################################################################################
10 | # Functions
11 | ##########################################################################################
12 |
13 | ui_print() {
14 | if $BOOTMODE; then
15 | echo "$1"
16 | else
17 | echo -n -e "ui_print $1\n" >> /proc/self/fd/$OUTFD
18 | echo -n -e "ui_print\n" >> /proc/self/fd/$OUTFD
19 | fi
20 | }
21 |
22 | grep_prop() {
23 | REGEX="s/^$1=//p"
24 | shift
25 | FILES=$@
26 | if [ -z "$FILES" ]; then
27 | FILES='/system/build.prop'
28 | fi
29 | cat $FILES 2>/dev/null | sed -n "$REGEX" | head -n 1
30 | }
31 |
32 | is_mounted() {
33 | if [ ! -z "$2" ]; then
34 | cat /proc/mounts | grep $1 | grep $2, >/dev/null
35 | else
36 | cat /proc/mounts | grep $1 >/dev/null
37 | fi
38 | return $?
39 | }
40 |
41 | mount_image() {
42 | if [ ! -d "$2" ]; then
43 | mount -o rw,remount rootfs /
44 | mkdir -p $2 2>/dev/null
45 | ($BOOTMODE) && mount -o ro,remount rootfs /
46 | [ ! -d "$2" ] && return 1
47 | fi
48 | if (! is_mounted $2); then
49 | LOOPDEVICE=
50 | for LOOP in 0 1 2 3 4 5 6 7; do
51 | if (! is_mounted $2); then
52 | LOOPDEVICE=/dev/block/loop$LOOP
53 | if [ ! -f "$LOOPDEVICE" ]; then
54 | mknod $LOOPDEVICE b 7 $LOOP 2>/dev/null
55 | fi
56 | losetup $LOOPDEVICE $1
57 | if [ "$?" -eq "0" ]; then
58 | mount -t ext4 -o loop $LOOPDEVICE $2
59 | if (! is_mounted $2); then
60 | /system/bin/toolbox mount -t ext4 -o loop $LOOPDEVICE $2
61 | fi
62 | if (! is_mounted $2); then
63 | /system/bin/toybox mount -t ext4 -o loop $LOOPDEVICE $2
64 | fi
65 | fi
66 | if (is_mounted $2); then
67 | ui_print "- Mounting $1 to $2"
68 | break;
69 | fi
70 | fi
71 | done
72 | fi
73 | }
74 |
75 | set_perm() {
76 | chown $2:$3 $1 || exit 1
77 | chmod $4 $1 || exit 1
78 | if [ ! -z "$5" ]; then
79 | chcon $5 $1 2>/dev/null
80 | else
81 | chcon 'u:object_r:system_file:s0' $1 2>/dev/null
82 | fi
83 | }
84 |
85 | set_perm_recursive() {
86 | find $1 -type d 2>/dev/null | while read dir; do
87 | set_perm $dir $2 $3 $4 $6
88 | done
89 | find $1 -type f 2>/dev/null | while read file; do
90 | set_perm $file $2 $3 $5 $6
91 | done
92 | }
93 |
94 | mktouch() {
95 | mkdir -p ${1%/*}
96 | if [ -z "$2" ]; then
97 | touch $1
98 | else
99 | echo $2 > $1
100 | fi
101 | chmod 644 $1
102 | }
103 |
104 | request_size_check() {
105 | reqSizeM=`unzip -l "$1" 2>/dev/null | tail -n 1 | awk '{ print $1 }'`
106 | reqSizeM=$((reqSizeM / 1048576 + 1))
107 | }
108 |
109 | image_size_check() {
110 | e2fsck -yf $1
111 | curBlocks=`e2fsck -n $1 2>/dev/null | grep $1 | cut -d, -f3 | cut -d\ -f2`;
112 | curUsedM=`echo "$curBlocks" | cut -d/ -f1`
113 | curSizeM=`echo "$curBlocks" | cut -d/ -f1`
114 | curFreeM=$(((curSizeM - curUsedM) * 4 / 1024))
115 | curUsedM=$((curUsedM * 4 / 1024 + 1))
116 | curSizeM=$((curSizeM * 4 / 1024))
117 | }
118 |
119 | ##########################################################################################
120 | # Flashable update-binary preparation
121 | ##########################################################################################
122 |
123 | OUTFD=$2
124 | ZIP=$3
125 |
126 | readlink /proc/$$/fd/$OUTFD 2>/dev/null | grep /tmp >/dev/null
127 | if [ "$?" -eq "0" ]; then
128 | OUTFD=0
129 |
130 | for FD in `ls /proc/$$/fd`; do
131 | readlink /proc/$$/fd/$FD 2>/dev/null | grep pipe >/dev/null
132 | if [ "$?" -eq "0" ]; then
133 | ps | grep " 3 $FD " | grep -v grep >/dev/null
134 | if [ "$?" -eq "0" ]; then
135 | OUTFD=$FD
136 | break
137 | fi
138 | fi
139 | done
140 | fi
141 |
142 | if $BOOTMODE && ! is_mounted /magisk; then
143 | ui_print "! Magisk is not activated!... abort"
144 | exit 1
145 | fi
146 |
147 | # Fix SuperSU.....
148 | $BOOTMODE && $BINDIR/sepolicy-inject --live "allow fsck * * *"
149 |
150 | # This path should work in any cases
151 | TMPDIR=/dev/tmp
152 |
153 | MOUNTPATH=/magisk
154 | IMGNAME=magisk.img
155 |
156 | if $BOOTMODE; then
157 | MOUNTPATH=/dev/magisk_merge
158 | IMGNAME=magisk_merge.img
159 | fi
160 |
161 | mkdir -p $TMPDIR 2>/dev/null
162 | cd $TMPDIR
163 | unzip -o "$ZIP" config.sh
164 |
165 | if [ ! -f "config.sh" ]; then
166 | ui_print "! Failed: Unable to extract zip file!"
167 | exit 1
168 | fi
169 |
170 | source config.sh
171 |
172 | INSTALLER=$TMPDIR/$MODID
173 | MODPATH=$MOUNTPATH/$MODID
174 |
175 | mkdir -p $INSTALLER
176 | cd $INSTALLER
177 | unzip -o "$ZIP" "common/*" module.prop
178 |
179 | ##########################################################################################
180 | # Main
181 | ##########################################################################################
182 |
183 | # Print mod name
184 | print_modname
185 |
186 | # Please leave this message in your flashable zip for credits :)
187 | ui_print "******************************"
188 | ui_print "Powered by Magisk (@topjohnwu)"
189 | ui_print "******************************"
190 |
191 | ui_print "- Mounting /system(ro), /vendor(ro), /data, /cache"
192 | mount -o ro /system 2>/dev/null
193 | mount -o ro /vendor 2>/dev/null
194 | mount /data 2>/dev/null
195 | mount /cache 2>/dev/null
196 |
197 | if [ ! -f '/system/build.prop' ]; then
198 | ui_print "! Failed: /system could not be mounted!"
199 | exit 1
200 | fi
201 |
202 | API=`grep_prop ro.build.version.sdk`
203 | ABI=`grep_prop ro.product.cpu.abi | cut -c-3`
204 | ABI2=`grep_prop ro.product.cpu.abi2 | cut -c-3`
205 | ABILONG=`grep_prop ro.product.cpu.abi`
206 |
207 | ARCH=arm
208 | IS64BIT=false
209 | if [ "$ABI" = "x86" ]; then ARCH=x86; fi;
210 | if [ "$ABI2" = "x86" ]; then ARCH=x86; fi;
211 | if [ "$ABILONG" = "arm64-v8a" ]; then ARCH=arm64; IS64BIT=true; fi;
212 | if [ "$ABILONG" = "x86_64" ]; then ARCH=x64; IS64BIT=true; fi;
213 |
214 | # You can get the Android API version from $API, the CPU architecture from $ARCH
215 | # Useful if you are creating Android version / platform dependent mods
216 |
217 | if is_mounted /data; then
218 | IMG=/data/$IMGNAME
219 | if [ ! -f "/data/magisk.img" ]; then
220 | ui_print "! Magisk is not installed!"
221 | ui_print "! Magisk is required for this mod!"
222 | exit 1
223 | fi
224 | else
225 | IMG=/cache/magisk.img
226 | ui_print " "
227 | ui_print "***********************************"
228 | ui_print "* !! Data unavailible !! *"
229 | ui_print "* Magisk detection is impossible *"
230 | ui_print "* Installation will still proceed *"
231 | ui_print "* But please make sure you have *"
232 | ui_print "* Magisk installed!! *"
233 | ui_print "***********************************"
234 | ui_print " "
235 | fi
236 |
237 | request_size_check "$ZIP"
238 |
239 | if [ -f "$IMG" ]; then
240 | ui_print "- $IMG detected!"
241 | image_size_check $IMG
242 | if [ "$reqSizeM" -gt "$curFreeM" ]; then
243 | SIZE=$(((reqSizeM + curUsedM) / 32 * 32 + 64))
244 | ui_print "- Resizing $IMG to ${SIZE}M..."
245 | resize2fs $IMG ${SIZE}M
246 | fi
247 | else
248 | SIZE=$((reqSizeM / 32 * 32 + 64));
249 | ui_print "- Creating $IMG with size ${SIZE}M"
250 | make_ext4fs -l ${SIZE}M -a /magisk -S $INSTALLER/common/file_contexts_image $IMG
251 | fi
252 |
253 | mount_image $IMG $MOUNTPATH
254 | if ! is_mounted $MOUNTPATH; then
255 | ui_print "! $IMG mount failed... abort"
256 | exit 1
257 | fi
258 |
259 | # Create mod paths
260 | rm -rf $MODPATH 2>/dev/null
261 | mkdir -p $MODPATH
262 |
263 | # Copy files
264 | ui_print "- Copying files"
265 | unzip -o "$ZIP" "system/*" -d $MODPATH
266 |
267 | # Handle replace folders
268 | for TARGET in $REPLACE; do
269 | mktouch $MODPATH$TARGET/.replace
270 | done
271 |
272 | # Auto Mount
273 | if $AUTOMOUNT; then
274 | mktouch $MODPATH/auto_mount
275 | fi
276 |
277 | # prop files
278 | if $PROPFILE; then
279 | cp -af $INSTALLER/common/system.prop $MODPATH/system.prop
280 | fi
281 |
282 | # Module info
283 | cp -af $INSTALLER/module.prop $MODPATH/module.prop
284 | if $BOOTMODE; then
285 | # Update info for Magisk Manager
286 | mktouch /magisk/$MODID/update
287 | cp -af $INSTALLER/module.prop /magisk/$MODID/module.prop
288 | fi
289 |
290 | # post-fs-data mode scripts
291 | if $POSTFSDATA; then
292 | cp -af $INSTALLER/common/post-fs-data.sh $MODPATH/post-fs-data.sh
293 | fi
294 |
295 | # service mode scripts
296 | if $LATESTARTSERVICE; then
297 | cp -af $INSTALLER/common/service.sh $MODPATH/service.sh
298 | fi
299 |
300 | ui_print "- Setting permissions"
301 | set_permissions
302 |
303 | ui_print "- Unmounting partitions"
304 |
305 | umount $MOUNTPATH
306 | losetup -d $LOOPDEVICE
307 | rmdir $MOUNTPATH
308 |
309 | # Shrink the image if possible
310 | image_size_check $IMG
311 | NEWDATASIZE=$((curUsedM / 32 * 32 + 32))
312 | if [ "$curSizeM" -gt "$NEWDATASIZE" ]; then
313 | ui_print "- Shrinking $IMG to ${NEWDATASIZE}M..."
314 | resize2fs $IMG ${NEWDATASIZE}M
315 | fi
316 |
317 | if ! $BOOTMODE; then
318 | umount /system
319 | umount /vendor 2>/dev/null
320 | fi
321 |
322 | ui_print "- Done"
323 | exit 0
324 |
--------------------------------------------------------------------------------
/src/customize.sh:
--------------------------------------------------------------------------------
1 | #/system/bin/sh
2 | # Welcome #
3 | readonly EXIT_SUCCESS=0
4 | readonly EXIT_FAILURE=1
5 | readonly EOF=255
6 | readonly VK_POWER=13
7 | readonly VK_SCREEN=20
8 | readonly VK_UP=38
9 | readonly VK_DOWN=40
10 | readonly moduleName="Bypasser"
11 | readonly moduleId="bypasser"
12 | readonly defaultTimeout=5
13 | readonly outerSymbolCount=200
14 | readonly innerSymbolCount=100
15 | readonly startTime=$(date +%s%N)
16 |
17 | function clearCaches
18 | {
19 | sync && echo 3 > /proc/sys/vm/drop_caches
20 | return $?
21 | }
22 |
23 | function setPermissions
24 | {
25 | returnCode=${EXIT_SUCCESS}
26 | if [[ -n "$(find . -type d -exec chmod 555 {} \; 2>&1)" ]];
27 | then
28 | returnCode=${EXIT_FAILURE}
29 | fi
30 | if [[ -n "$(find . -type f ! -name "*.sh" -exec chmod 444 {} \; 2>&1)" ]];
31 | then
32 | returnCode=${EXIT_FAILURE}
33 | fi
34 | if [[ -n "$(find . -type f -name "*.sh" -exec chmod 544 {} \; 2>&1)" ]];
35 | then
36 | returnCode=${EXIT_FAILURE}
37 | fi
38 | if ! chown -R root:root ".";
39 | then
40 | returnCode=${EXIT_FAILURE}
41 | fi
42 | return ${returnCode}
43 | }
44 |
45 | ui_print ""
46 | ui_print $(yes "#" | head -n ${outerSymbolCount} | tr -d '\n')
47 | ui_print "Welcome to the installer of the ${moduleName} Magisk Module! "
48 | ui_print "The absolute path to this script is \"$(cd "$(dirname "$0")" && pwd)/$(basename "$0")\". "
49 | clearCaches
50 | if [[ $? -eq ${EXIT_SUCCESS} ]];
51 | then
52 | ui_print "Successfully cleared caches. "
53 | else
54 | ui_print "Warning: Failed to clear caches. "
55 | fi
56 | chmod 755 "${MODPATH}" && cd "${MODPATH}"
57 | if [[ $? -eq ${EXIT_SUCCESS} && "$(basename "$(pwd)")" == "${moduleId}" ]];
58 | then
59 | ui_print "The current working directory is \"$(pwd)\". "
60 | else
61 | abort "Error: The working directory \"$(pwd)\" is unexpected. "
62 | fi
63 | setPermissions
64 | if [[ $? -eq ${EXIT_SUCCESS} ]];
65 | then
66 | ui_print "Successfully set permissions. "
67 | else
68 | ui_print "Warning: Failed to set permissions. "
69 | fi
70 |
71 | # Manager #
72 | readonly MIN_APATCH_VER_CODE=10927
73 | readonly MIN_KSU_VER_CODE=11981
74 | readonly MIN_MAGISK_VER_CODE=28000
75 |
76 | if $BOOTMODE;
77 | then
78 | if [[ "${APATCH}" == "true" ]];
79 | then
80 | if [[ ${APATCH_VER_CODE} -ge ${MIN_APATCH_VER_CODE} ]];
81 | then
82 | ui_print "The action button is supported (Apatch ${APATCH_VER_CODE} >= ${MIN_APATCH_VER_CODE}). "
83 | else
84 | ui_print "Warning: The action button is not supported (Apatch ${APATCH_VER_CODE}). You can update dynamic configurations only by flashing this module. Please try to use the latest Apatch (>= ${MIN_APATCH_VER_CODE}). "
85 | fi
86 | elif [[ "${KSU}" == "true" ]];
87 | then
88 | if [[ ${KSU_VER_CODE} -ge ${MIN_KSU_VER_CODE} ]];
89 | then
90 | ui_print "The action button is supported (KSU ${KSU_VER_CODE} >= ${MIN_KSU_VER_CODE}). "
91 | else
92 | ui_print "Warning: The action button is not supported (KSU ${KSU_VER_CODE}). You can update dynamic configurations only by flashing this module. Please try to use the latest KSU (>= ${MIN_KSU_VER_CODE}). "
93 | fi
94 | elif [[ -n "${MAGISK_VER_CODE}" ]];
95 | then
96 | if [[ ${MAGISK_VER_CODE} -ge ${MIN_MAGISK_VER_CODE} ]];
97 | then
98 | ui_print "The action button is supported (Magisk ${MAGISK_VER_CODE} >= ${MIN_MAGISK_VER_CODE}). "
99 | else
100 | ui_print "Warning: The action button is not supported (Magisk ${MAGISK_VER_CODE}). You can update dynamic configurations only by flashing this module. Please try to use the latest Magisk (>= ${MIN_MAGISK_VER_CODE}). "
101 | fi
102 | else
103 | ui_print "Warning: Cannot guarantee whether the action button is supported. You may need to update dynamic configurations by flashing this module. "
104 | fi
105 | else
106 | ui_print "Warning: Installing from recovery does not make sense currently. You may need to update dynamic configurations by flashing this module. "
107 | fi
108 |
109 | # Hash #
110 | sha512SuccessCount=0
111 | sha512TotalCount=0
112 |
113 | for filePath in $(find . -type f ! -name "*.sha512");
114 | do
115 | sha512TotalCount=$(expr ${sha512TotalCount} + 1)
116 | if [[ ${sha512TotalCount} -ge 1 && ${sha512TotalCount} -le 9 ]];
117 | then
118 | sha512TotalCountString="0${sha512TotalCount}"
119 | else
120 | sha512TotalCountString="${sha512TotalCount}"
121 | fi
122 | sha512Computed=$(sha512sum "${filePath}" | cut -d " " -f1)
123 | sha512FilePath="${filePath}.sha512"
124 | if [[ -f "${sha512FilePath}" ]];
125 | then
126 | sha512Expected="$(cat "${sha512FilePath}")"
127 | if [[ "${sha512Computed}" == "${sha512Expected}" ]];
128 | then
129 | if [[ "${filePath}" =~ \.sh$ ]];
130 | then
131 | if sh -n "${filePath}";
132 | then
133 | sha512SuccessCount=$(expr ${sha512SuccessCount} + 1)
134 | ui_print "[${sha512TotalCountString}] Successfully verified \"${filePath}\" and it successfully passed the local shell syntax check (sh). "
135 | else
136 | ui_print "[${sha512TotalCountString}] Successfully verified \"${filePath}\" but it failed to pass the local shell syntax check (sh). "
137 | fi
138 | else
139 | sha512SuccessCount=$(expr ${sha512SuccessCount} + 1)
140 | ui_print "[${sha512TotalCountString}] Successfully verified \"${filePath}\". "
141 | fi
142 | else
143 | ui_print "[${sha512TotalCountString}] Failed to verify \"${filePath}\". "
144 | fi
145 | else
146 | ui_print "[${sha512TotalCountString}] Failed to find the corresponding SHA-512 value file to verify \"${filePath}\". "
147 | fi
148 | done
149 | ui_print "Finished checking ${sha512SuccessCount} / ${sha512TotalCount} file(s). "
150 | if [[ ${sha512TotalCount} == ${sha512SuccessCount} ]];
151 | then
152 | ui_print "Successfully verified all the files and they all passed the local shell syntax check (sh). "
153 | find . -type f -name "*.sha512" -delete
154 | if [[ $? -eq ${EXIT_SUCCESS} ]];
155 | then
156 | ui_print "Successfully removed all the SHA-512 value files. "
157 | else
158 | ui_print "Warning: Failed to remove all the SHA-512 value files. "
159 | fi
160 | else
161 | abort "Error: Failed to verify all the files or some of the scripts failed to pass the local shell syntax check (sh). "
162 | fi
163 |
164 | # Action #
165 | readonly actionFilePath="action.sh"
166 | gapTime=0
167 |
168 | function getTheKeyPressed
169 | {
170 | if echo "$1" | grep -qE '^[1-9][0-9]*$';
171 | then
172 | timeout=$1
173 | else
174 | timeout=${defaultTimeout}
175 | fi
176 | read -r -t ${timeout} pressString < <(getevent -ql)
177 | pressCode=$?
178 | if [[ ${EXIT_SUCCESS} == ${pressCode} ]];
179 | then
180 | if [[ "${pressString}" == *KEY_VOLUMEUP* ]];
181 | then
182 | echo "The [+] was pressed. "
183 | return ${VK_UP}
184 | elif [[ "${pressString}" == *KEY_VOLUMEDOWN* ]];
185 | then
186 | echo "The [-] was pressed. "
187 | return ${VK_DOWN}
188 | elif [[ "${pressString}" == *KEY_POWER* ]];
189 | then
190 | echo "The power key was pressed. "
191 | return ${VK_POWER}
192 | elif [[ "${pressString}" == *ABS_MT_TRACKING_ID* ]];
193 | then
194 | echo "The screen was pressed. "
195 | return ${VK_SCREEN}
196 | else
197 | echo "The following unknown event occurred. "
198 | echo "${pressString}" | sed 's/^/\t/'
199 | return ${EXIT_FAILURE}
200 | fi
201 | else
202 | echo "Users did not respond within ${timeout} second(s). "
203 | return ${EOF}
204 | fi
205 | }
206 |
207 | if [[ -f "${actionFilePath}" ]];
208 | then
209 | if [[ -x "${actionFilePath}" ]];
210 | then
211 | if ! sh -n "${actionFilePath}";
212 | then
213 | abort "Error: The \`\`"${actionFilePath}"\`\` failed to pass the local shell syntax check (sh). "
214 | fi
215 | else
216 | abort "Error: The \`\`"${actionFilePath}"\`\` was not executable. "
217 | fi
218 | else
219 | abort "Error: The \`\`"${actionFilePath}"\`\` was missing. "
220 | fi
221 | ui_print "Please press the [+] or [-] key in ${defaultTimeout} seconds if you want to perform the local scanning (\`\`/data\`\`). Otherwise, you may touch the screen to skip the timing. "
222 | startGapTime=$(date +%s%N)
223 | keyMessage="$(getTheKeyPressed)"
224 | keyCode=$?
225 | endGapTime=$(date +%s%N)
226 | gapTime=$(expr ${endGapTime} - ${startGapTime})
227 | ui_print "${keyMessage}"
228 | ui_print $(yes "=" | head -n ${innerSymbolCount} | tr -d '\n')
229 | actionStrings="$(sh "${actionFilePath}" ${keyCode})"
230 | exitCode=$?
231 | ui_print "${actionStrings}"
232 | ui_print $(yes "=" | head -n ${innerSymbolCount} | tr -d '\n')
233 | if [[ ${EXIT_SUCCESS} == ${exitCode} ]];
234 | then
235 | ui_print "Successfully executed the \`\`"${actionFilePath}"\`\` (${exitCode}). "
236 | else
237 | ui_print "Warning: The execution of \`\`"${actionFilePath}"\`\` returned a non-zero exit code (${exitCode}). "
238 | fi
239 |
240 | # Finish #
241 | readonly endTime=$(date +%s%N)
242 | readonly timeDelta=$(expr ${endTime} - ${startTime} - ${gapTime})
243 |
244 | setPermissions && chmod 755 "${MODPATH}"
245 | if [[ $? -eq ${EXIT_SUCCESS} ]];
246 | then
247 | ui_print "Successfully set permissions. "
248 | else
249 | ui_print "Warning: Failed to set permissions. "
250 | fi
251 | clearCaches
252 | if [[ $? -eq ${EXIT_SUCCESS} ]];
253 | then
254 | ui_print "Successfully cleared caches. "
255 | else
256 | ui_print "Warning: Failed to clear caches. "
257 | fi
258 | ui_print "Finished executing the \`\`customize.sh\`\` in $(expr ${timeDelta} / 1000000000).$(expr ${timeDelta} % 1000000000) second(s). "
259 | ui_print $(yes "#" | head -n ${outerSymbolCount} | tr -d '\n')
260 | ui_print ""
261 |
--------------------------------------------------------------------------------
/updateClassifications.py:
--------------------------------------------------------------------------------
1 | import os
2 | from sys import exit
3 | from datetime import datetime
4 | from hashlib import sha512
5 | from json import loads
6 | from re import findall
7 | from subprocess import PIPE, Popen
8 | from zipfile import ZipFile
9 | try:
10 | from requests import get
11 | except:
12 | def get(url:str, *parameters:None) -> None:
13 | return None
14 | print("Cannot import ``get`` from the ``requests`` library. Fetching from URLs will be unavailable. ")
15 | print("Please try to install the ``requests`` library correctly via ``python -m pip install requests`` or ``apt-get install python3-requests``. ")
16 | try:
17 | os.chdir(os.path.abspath(os.path.dirname(__file__)))
18 | except:
19 | pass
20 | EXIT_SUCCESS = 0
21 | EXIT_FAILURE = 1
22 | EOF = (-1)
23 |
24 |
25 | class SortedUniqueList(list):
26 | def __init__(self:object, s:object = None, exclusion:object = {"com.google.android.gsf", "com.google.android.gms", "com.android.vending"}) -> object:
27 | super().__init__()
28 | self.__exclusion = set(exclusion) if isinstance(exclusion, (tuple, list, set, str, SortedUniqueList)) else set()
29 | if isinstance(s, (tuple, list, set, str, SortedUniqueList)):
30 | for value in s:
31 | if value not in self and value not in self.__exclusion:
32 | super().append(value)
33 | self.sort()
34 | def add(self, value:object) -> None:
35 | return self.append(value)
36 | def append(self, value:object) -> None:
37 | if value not in self and value not in self.__exclusion:
38 | super().append(value)
39 | self.sort()
40 | def extend(self, s:object) -> None:
41 | if isinstance(s, (tuple, list, set, str, SortedUniqueList)):
42 | for value in s:
43 | if value not in self and value not in self.__exclusion:
44 | super().append(value)
45 | self.sort()
46 | def update(self:object, s:object) -> object:
47 | if isinstance(s, (tuple, list, set, str, SortedUniqueList)):
48 | return self.extend(s)
49 | def intersection(self:object, other:object) -> object:
50 | if isinstance(other, (tuple, list, set, str, SortedUniqueList)):
51 | return set(self).intersection(other)
52 |
53 | class Classification:
54 | urlCache = {}
55 | timeout = 10
56 | def __init__(self:object, name:str = 'S', s:object = None, exclusion:object = {"com.google.android.gsf", "com.google.android.gms", "com.android.vending"}) -> object:
57 | if isinstance(s, (tuple, list, set, str, SortedUniqueList)):
58 | self.__s = SortedUniqueList(s, exclusion = exclusion if isinstance(exclusion, (tuple, list, set, str, SortedUniqueList)) else None)
59 | else:
60 | self.__s = SortedUniqueList(exclusion = exclusion if isinstance(exclusion, (tuple, list, set, str, SortedUniqueList)) else None)
61 | self.__name = name if isinstance(name, str) and len(name) == 1 and ('A' <= name <= 'Z' or 'a' <= name <= 'z') else 'S'
62 | self.__pattern = "^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)+$"
63 | def __getTxt(self:object, filePath:str) -> str|None: # get ``*.txt`` content
64 | for coding in ("utf-8", "ANSI", "utf-16", "gbk"): # codings (add more codings here if necessary)
65 | try:
66 | with open(filePath, "r", encoding = coding) as f:
67 | content = f.read()
68 | return content[1:] if content.startswith("\ufeff") else content # if utf-8 with BOM, remove BOM
69 | except (UnicodeError, UnicodeDecodeError):
70 | continue
71 | except:
72 | return None
73 | return None
74 | def __getUrl(self:object, url:str, forceUpdate:bool = False) -> tuple: # get URL content
75 | if isinstance(url, str) and isinstance(forceUpdate, bool):
76 | if forceUpdate or url not in Classification.urlCache:
77 | try:
78 | r = get(url, timeout = Classification.timeout)
79 | if r is None:
80 | return (False, "The ``get`` is currently unavailable. ")
81 | elif 200 == r.status_code:
82 | Classification.urlCache[url] = r.text
83 | return (True, r.text)
84 | else:
85 | return (False, r)
86 | except BaseException as e:
87 | return (False, str(e))
88 | else:
89 | return (True, Classification.urlCache[url])
90 | else:
91 | return (False, "At least one of the parameters passed is invalid. ")
92 | def configureSet(self:object, s:set|tuple|list, updateSwitch:bool = True) -> bool:
93 | if isinstance(s, (set, tuple, list)) and isinstance(updateSwitch, bool):
94 | if not updateSwitch:
95 | self.__s.clear()
96 | originalSize = len(self.__s)
97 | self.__s.update(s)
98 | currentSize = len(self.__s)
99 | sizeDelta = currentSize - originalSize
100 | print("Successfully updated {0} package name(s). ".format(sizeDelta))
101 | return True
102 | else:
103 | print("The parameters passed are in wrong types. ")
104 | return False
105 | def configureFile(self:object, filePath:str, updateSwitch:bool = True) -> bool:
106 | if isinstance(filePath, str) and isinstance(updateSwitch, bool):
107 | content = self.__getTxt(filePath)
108 | if isinstance(content, str):
109 | if not updateSwitch:
110 | self.__s.clear()
111 | originalSize = len(self.__s)
112 | for line in content.splitlines():
113 | self.__s.update(findall(self.__pattern, line))
114 | currentSize = len(self.__s)
115 | sizeDelta = currentSize - originalSize
116 | print("Successfully updated {0} package name(s) for Classification ${1}$ from the file \"{2}\". ".format(sizeDelta, self.__name, filePath))
117 | return True
118 | else:
119 | print("Failed to update for Classification ${0}$ from the file \"{1}\" due to file reading failures. ".format(self.__name, filePath))
120 | else:
121 | print("The parameters passed are in wrong types. ")
122 | return False
123 | def configureUrl(self:object, url:str, isDesktop:bool = False, updateSwitch:bool = True) -> bool:
124 | if isinstance(url, str) and isinstance(isDesktop, bool) and isinstance(updateSwitch, bool):
125 | status, content = self.__getUrl(url)
126 | if status:
127 | if not updateSwitch:
128 | self.__s.clear()
129 | originalSize = len(self.__s)
130 | vector = loads(content)
131 | if isinstance(vector, list):
132 | for v in vector:
133 | if isinstance(v, dict) and "name" in v:
134 | self.__s.update(findall(self.__pattern, v["name"]))
135 | elif isinstance(vector, dict) and "Detectors" in vector and isinstance(vector["Detectors"], list):
136 | if isDesktop:
137 | for v in vector["Detectors"]:
138 | if isinstance(v, dict) and "packageName" in v and "sourceStatus" in v and "D" in v["sourceStatus"] and "developingPurpose" in v and "D" in v["developingPurpose"]:
139 | if isinstance(v["packageName"], (tuple, list, set)):
140 | for pkg in v["packageName"]:
141 | self.__s.update(findall(self.__pattern, pkg))
142 | else:
143 | self.__s.update(findall(self.__pattern, v["packageName"]))
144 | else:
145 | for v in vector["Detectors"]:
146 | if isinstance(v, dict) and "packageName" in v and "sourceStatus" in v and "D" not in v["sourceStatus"] and "developingPurpose" in v and "D" not in v["developingPurpose"]:
147 | if isinstance(v["packageName"], (tuple, list, set)):
148 | for pkg in v["packageName"]:
149 | self.__s.update(findall(self.__pattern, pkg))
150 | else:
151 | self.__s.update(findall(self.__pattern, v["packageName"]))
152 | else:
153 | print("Failed to update from the URL \"{0}\" due to the unrecognized data structure. ".format(url))
154 | return False
155 | currentSize = len(self.__s)
156 | sizeDelta = currentSize - originalSize
157 | print("Successfully updated {0} package name(s) for Classification ${1}$ from the URL \"{2}\". ".format(sizeDelta, self.__name, url))
158 | return True
159 | else:
160 | print("Failed to update for Classification ${0}$ from the URL \"{1}\". Details are as follows. \n\t{2}".format(self.__name, url, content))
161 | return False
162 | else:
163 | print("The parameters passed are in wrong types. ")
164 | return False
165 | def intersection(self:object, other:object) -> set:
166 | return other.intersection(self.__s)
167 | def writeTo(self:object, filePath:str, encoding:str = "utf-8") -> bool:
168 | try:
169 | with open(filePath, "w", encoding = encoding) as f:
170 | f.write(str(self))
171 | print("Successfully wrote {0} lines to the file \"{1}\" for Classification ${2}$. ".format(len(self), filePath, self.__name))
172 | return True
173 | except BaseException as e:
174 | print("Failed to write to the file \"{0}\" for Classification ${1}$ due to exceptions. Details are as follows. \n\t{2}".format(filePath, self.__name, e))
175 | return False
176 | def __len__(self:object) -> int:
177 | return len(self.__s)
178 | def __str__(self:object) -> str:
179 | return "\n".join(sorted(self.__s))
180 |
181 |
182 | def updateSHA512(srcFp:str, encoding:str = "utf-8") -> bool:
183 | if isinstance(srcFp, str) and os.path.isdir(srcFp) and isinstance(encoding, str):
184 | successCnt, filePaths = 0, []
185 | for root, dirs, files in os.walk(srcFp):
186 | for fileName in files:
187 | filePath = os.path.join(root, fileName)
188 | if os.path.splitext(fileName)[1] == ".sha512":
189 | try:
190 | os.remove(filePath)
191 | except:
192 | pass
193 | else:
194 | filePaths.append(filePath)
195 | totalCnt = len(filePaths)
196 | length = len(str(totalCnt))
197 | for i, filePath in enumerate(filePaths):
198 | try:
199 | if filePath == os.path.join(srcFp, "webroot.zip"):
200 | digests = []
201 | for root, dirs, files in os.walk(os.path.join(srcFp, "webroot")):
202 | for fileName in files:
203 | if os.path.splitext(fileName)[1].lower() not in (".prop", ".sha512"):
204 | fileP = os.path.join(root, fileName)
205 | with open(fileP, "rb") as f:
206 | digests.append(sha512(f.read()).hexdigest() + " " + os.path.relpath(fileP, srcFp))
207 | digests.sort()
208 | digest = "\n".join(digests)
209 | else:
210 | with open(filePath, "rb") as f:
211 | digest = sha512(f.read()).hexdigest()
212 | except BaseException as e:
213 | print("[{{0:0>{0}}}] \"{{1}}\" -> {{2}}".format(length).format(i + 1, filePath, e))
214 | continue
215 | try:
216 | with open(filePath + ".sha512", "w", encoding = encoding) as f:
217 | f.write(digest)
218 | successCnt += 1
219 | print("[{{0:0>{0}}}] \"{{1}}\" -> {{2}}".format(length).format(i + 1, filePath, digest if digest.isalnum() else digest.split("\n")))
220 | except BaseException as e:
221 | print("[{{0:0>{0}}}] \"{{1}}\" -> {{2}}".format(length).format(i + 1, filePath, e))
222 | print("Successfully generated {0} / {1} SHA-512 value file(s) at the success rate of {2:.2f}%. ".format(successCnt, totalCnt, successCnt * 100 / totalCnt) if totalCnt else "No SHA-512 value files were generated. ")
223 | return successCnt == totalCnt
224 | else:
225 | return False
226 |
227 | def compress(zipFolderPath:str, zipFilePath:str, extensionsExcluded:tuple|list|set) -> bool:
228 | if isinstance(zipFolderPath, str) and os.path.isdir(zipFolderPath) and isinstance(zipFilePath, str) and isinstance(extensionsExcluded, (tuple, list, set)):
229 | try:
230 | with ZipFile(zipFilePath, "w") as zipf:
231 | for root, _, files in os.walk(zipFolderPath):
232 | for fileName in files:
233 | if os.path.splitext(fileName)[1] not in extensionsExcluded:
234 | filePath = os.path.join(root, fileName)
235 | zipf.write(filePath, os.path.relpath(filePath, zipFolderPath))
236 | print("Successfully compressed the web UI folder \"{0}\" to \"{1}\". ".format(zipFolderPath, zipFilePath))
237 | return True
238 | except BaseException as e:
239 | print("Failed to compress the web UI folder \"{0}\" to \"{1}\" due to \"{2}\". ".format(zipFolderPath, zipFilePath, e))
240 | else:
241 | return False
242 |
243 | def gitPush(filePathA:str, filePathB:str, encoding:str = "utf-8") -> bool:
244 | commitMessage = "Regular Update ({0})".format(datetime.now().strftime("%Y%m%d%H%M%S"))
245 | print("The commit message is \"{0}\". ".format(commitMessage))
246 | if __import__("platform").system().upper() == "WINDOWS":
247 | commandlines = []
248 | print("Cannot guarantee whether permission or syntax issues are solved due to the platform. ")
249 | else:
250 | commandlines = [ \
251 | "find . -type d -exec chmod 755 {} \\;", \
252 | "find . -type f ! -name \"LICENSE\" ! -name \"build.sh\" ! -name \"*.sha512\" -exec chmod 644 {} \\;", \
253 | "find . -type f -name \"*.sha512\" -exec chmod 444 {} \\;", \
254 | "chmod 444 \"LICENSE\"", \
255 | "chmod 744 \"build.sh\"", \
256 | "find . -name \"*.sh\" -exec bash -n {} \\;" \
257 | ]
258 | for commandline in commandlines:
259 | with Popen(commandline, stdout = PIPE, stderr = PIPE, shell = True) as process:
260 | output, error = process.communicate()
261 | if output or error:
262 | print("Abort ``git`` operations due to the following issue. ")
263 | print({"commandline":commandline, "output":output.decode(), "error":error.decode()})
264 | return False
265 | try:
266 | with open(filePathA, "r", encoding = encoding) as f:
267 | contentA = f.read()
268 | with open(filePathB, "r", encoding = encoding) as f:
269 | contentB = f.read()
270 | except BaseException as e:
271 | print("Cannot verify the differences between \"{0}\" and \"{1}\" due to exceptions. Details are as follows. \n\t{2}".format(filePathA, filePathB, e))
272 | return False
273 | if contentA.replace("readonly currentAB=\"A\"", "readonly currentAB=\"B\"").replace("readonly targetAB=\"B\"", "readonly targetAB=\"A\"") == contentB:
274 | print("Successfully verified the differences between \"{0}\" and \"{1}\"".format(filePathA, filePathB))
275 | else:
276 | print("Failed to verify the differences between \"{0}\" and \"{1}\"".format(filePathA, filePathB))
277 | return False
278 | commandlines = ["git add .", "git commit -m \"{0}\"".format(commitMessage), "git push"]
279 | for commandline in commandlines:
280 | if os.system(commandline) != EXIT_SUCCESS:
281 | return False
282 | return True
283 |
284 | def main() -> int:
285 | # Parameters #
286 | folderPath = "src/webroot/classifications"
287 | fileNameB, fileNameC, fileNameD = "classificationB.txt", "classificationC.txt", "classificationD.txt"
288 | filePathB, filePathC, filePathD = os.path.join(folderPath, fileNameB), os.path.join(folderPath, fileNameC), os.path.join(folderPath, fileNameD)
289 | urlB = "https://modules.lsposed.org/modules.json"
290 | urlCD = "https://raw.githubusercontent.com/LRFP-Team/LRFP-Detectors-and-Bypassers/main/Detectors/README.json"
291 | srcFolderPath = "src"
292 | webrootName = "webroot"
293 | webrootFolderPath = os.path.join(srcFolderPath, webrootName)
294 | webrootFilePath = os.path.join(srcFolderPath, webrootName + ".zip")
295 | extensionsExcluded = [".prop", ".sha512"]
296 | actionAFileName, actionBFileName = "actionA.sh", "actionB.sh"
297 | actionAFilePath, actionBFilePath = os.path.join(srcFolderPath, actionAFileName), os.path.join(srcFolderPath, actionBFileName)
298 | bRet = True
299 |
300 | # Update $B$ #
301 | classificationB, classificationC, classificationD = Classification('B'), Classification('C'), Classification('D')
302 | bRet = classificationB.configureFile(filePathB) and bRet
303 | bRet = classificationB.configureUrl(urlB) and bRet
304 | bRet = classificationB.writeTo(filePathB) and bRet
305 |
306 | # Update $C$ #
307 | bRet = classificationC.configureFile(filePathC) and bRet
308 | bRet = classificationC.configureUrl(urlCD, isDesktop = False) and bRet
309 | bRet = classificationC.writeTo(filePathC) and bRet
310 |
311 | # Update $D$ #
312 | bRet = classificationD.configureFile(filePathD) and bRet
313 | bRet = classificationD.configureUrl(urlCD, isDesktop = True) and bRet
314 | bRet = classificationD.writeTo(filePathD) and bRet
315 |
316 | # Compute Intersections #
317 | setBC = classificationB.intersection(classificationC)
318 | setBD = classificationB.intersection(classificationD)
319 | setCD = classificationC.intersection(classificationD)
320 | if setBC:
321 | print("There {0} in both Classification $B$ and Classification $C$. ".format("are {0} elements".format(len(setBC)) if len(setBC) > 1 else "is {0} element".format(len(setBC))))
322 | print(setBC)
323 | bRet = False
324 | if setBD:
325 | print("There {0} in both Classification $B$ and Classification $D$. ".format("are {0} elements".format(len(setBD)) if len(setBD) > 1 else "is {0} element".format(len(setBD))))
326 | print(setBD)
327 | bRet = False
328 | if setCD:
329 | print("There {0} in both Classification $C$ and Classification $D$. ".format("are {0} elements".format(len(setCD)) if len(setCD) > 1 else "is {0} element".format(len(setCD))))
330 | print(setCD)
331 | bRet = False
332 |
333 | # Update the Web UI #
334 | bRet = updateSHA512(srcFolderPath) and compress(webrootFolderPath, webrootFilePath, extensionsExcluded)
335 |
336 | # Git Push #
337 | if bRet:
338 | try:
339 | choice = input("Would you like to upload the files to GitHub via ``git`` [Yn]? ").upper() not in ("N", "NO", "0", "FALSE")
340 | except:
341 | choice = True
342 | if choice:
343 | bRet = gitPush(actionAFilePath, actionBFilePath)
344 |
345 | # Exit #
346 | iRet = EXIT_SUCCESS if bRet else EXIT_FAILURE
347 | print("Please press the enter key to exit ({0}). ".format(iRet))
348 | try:
349 | input()
350 | except:
351 | print()
352 | return iRet
353 |
354 |
355 |
356 | if "__main__" == __name__:
357 | exit(main())
--------------------------------------------------------------------------------
/src/webroot/classifications/classificationB.txt:
--------------------------------------------------------------------------------
1 | Cai_Ming_Yu.CacheCleaner
2 | Cleaner.Royall
3 | Fuck.RollingSky.Pay
4 | Hook.JiuWu.Xp
5 | It.dhd.oxygencustomizer
6 | Telegram.Speed.Hook
7 | XP.fuck.MI
8 | admin.vsetting
9 | ai.noads.ozon
10 | akhil.alltrans
11 | android.xiaolan.ppxshare.tools
12 | androidx.top.hyperos.dynamic.notify
13 | app.neonorbit.chatheadenabler
14 | app.revanced.manager.flutter
15 | balti.xposed.pixelifygooglephotos
16 | be.mygod.oplus.batterywaster
17 | be.mygod.unmeteredvpn
18 | bilibili.helper
19 | bin.mt.plus
20 | bin.mt.termex
21 | cat.app.bicleaner
22 | cc.aoeiuv020.hookcimoc
23 | cc.aoeiuv020.hookfanqie
24 | cc.aoeiuv020.hookpicacg
25 | cc.aoeiuv020.iamnotdisabled.hook
26 | cc.godhook
27 | cc.hicore.qtool
28 | chili.xposed.chimi
29 | cl.coders.faketraveler
30 | club.youppgd.adhook
31 | cn.ac.lz233.tarnhelm
32 | cn.amamiya.douyurepeat
33 | cn.amamiya.hupublacklist
34 | cn.android.x
35 | cn.aodlyric.xiaowine
36 | cn.buffcow.hyper5g
37 | cn.buffcow.hyperaodzen
38 | cn.buffcow.hypersc
39 | cn.coderstory.miui.water
40 | cn.cyanc.xposed.noregionlimits
41 | cn.dreamn.qianji_auto
42 | cn.enaium.bb
43 | cn.enaium.fuckmarket
44 | cn.fuckhome.xiaowine
45 | cn.fyyr.noguardpls
46 | cn.geektang.privacyspace
47 | cn.jackuxl.boarddeephook
48 | cn.kwaiching.hook
49 | cn.liuyi.hyper_freeform_x
50 | cn.lliiooll.ppbuff
51 | cn.lliiooll.pphelper
52 | cn.lovesykun.miui_force_fps
53 | cn.lyric.getter
54 | cn.martinkay.autocheckinplugin
55 | cn.myflv.noactive
56 | cn.tinyhai.ban_uninstall
57 | cn.unicorn369.HookEuicc
58 | cn.wankkoree.xp.portrait2landscape
59 | cn.wankkoree.xp.webviewpp
60 | cn.wankkoree.xposed.enablewebviewdebugging
61 | cn.wankkoree.xposed.portrait2landscape
62 | cn.wwl.xposed.hook
63 | cn.xihan.qdds
64 | cn.xyner.tools
65 | cn.yhfcn.mipushfaker
66 | cn.yhfcn.samsung_clockfix
67 | coloros.pagelimits.mod
68 | com.agoines.relaxhelp
69 | com.ailr.SeemNetOfTranslate
70 | com.akari.ppx
71 | com.alex193a.checkblue
72 | com.alex193a.gmdtenabler
73 | com.alex193a.ivdisabler
74 | com.alex193a.larryonx
75 | com.alex193a.opacextender
76 | com.alex193a.opcameradebug
77 | com.alex193a.paextender
78 | com.alex193a.pixelthermometerbtenabler
79 | com.alex193a.tguseridviewer
80 | com.alex193a.watweaker
81 | com.alex193a.xdowngrader
82 | com.alphi.activitystartmanager
83 | com.alphi.actvityopenmanager
84 | com.amanoteam.kanni
85 | com.amanoteam.nai
86 | com.amanoteam.nel
87 | com.amanoteam.sunny
88 | com.android.patch
89 | com.android.shell
90 | com.android1500.androidfaker
91 | com.android1500.gpssetter
92 | com.anony.keyguardrotation
93 | com.api.yandexmusicxposed
94 | com.app.catsmoker
95 | com.asameer.killappnow
96 | com.asdf51.friend
97 | com.asyjaiz.a12blur
98 | com.berdik.letmedowngrade
99 | com.berdik.macsposed
100 | com.bit747.clipboardfilter
101 | com.bit747.smobajump
102 | com.blanke.diaomao163
103 | com.bubiu.counter
104 | com.bug.gamehook
105 | com.bug.hookvip
106 | com.bug.zqq
107 | com.byyoung.setting
108 | com.cataclysm.i
109 | com.catsmoker.app
110 | com.ceco.oreo.gravitybox
111 | com.ceco.pie.gravitybox
112 | com.ceco.q.gravitybox
113 | com.ceco.r.gravitybox
114 | com.chacha.igexperiments
115 | com.chacha.matrixrain
116 | com.chacha.notigif
117 | com.chacha.samsungmusiccustomiser
118 | com.chacha.smessagescustom
119 | com.chenyue404.gboardhook
120 | com.chrxw.justenablednotification
121 | com.chrxw.purenga
122 | com.close.hook.ads
123 | com.coderstory.flyme
124 | com.coderstory.flyme10
125 | com.coderstory.flyme9
126 | com.coderstory.toolkit
127 | com.coolest.toolbox
128 | com.crossbowffs.quotelock
129 | com.darkeyes.tricks
130 | com.daxiaamu.op7mutools
131 | com.demo.serendipity
132 | com.demo.tl_ing
133 | com.dergoogler.mmrl.wx
134 | com.dingda.adfree
135 | com.dingtalk.recall
136 | com.dorian15.greendothide
137 | com.douban.fuckad
138 | com.dr8.xposed.saax
139 | com.droserasprout.healergram
140 | com.dualguard
141 | com.duolingo.kill
142 | com.easy.tgPlus
143 | com.emanuelef.remote_capture
144 | com.example.installhook
145 | com.example.ourom
146 | com.example.vcam
147 | com.ext.star.wars
148 | com.fankes.apperrorstracking
149 | com.fankes.coloros.notify
150 | com.fankes.enforcehighrefreshrate
151 | com.fankes.forcerotate
152 | com.fankes.miui.notify
153 | com.fankes.refusebrightness
154 | com.fankes.tsbattery
155 | com.fastmo.xhs
156 | com.fkzhang.qqxposed
157 | com.fkzhang.wechatxposed
158 | com.fkzhang.wxencoder
159 | com.flass.layoutinspect
160 | com.follow.clash
161 | com.fuck.android.rimet
162 | com.fuck.snotes
163 | com.fuckcoolapk
164 | com.fun.camerahook
165 | com.fun.mtp
166 | com.function.mtp
167 | com.game.reschange
168 | com.garyodernichts.downgrader
169 | com.gauravssnl.bypassrootcheck.pro
170 | com.gauravssnl.mobileradioadaway
171 | com.gauravssnl.radiobox
172 | com.gauravssnl.simpleradioadaway
173 | com.ghhccghk.xiaomibluetoothdiy
174 | com.github.dan.nostoragerestrict
175 | com.github.droserasprout.lockscreencamera
176 | com.github.hank9999.chargeprotectsetter
177 | com.github.jamsilva.ptgov_rootskip
178 | com.github.kr328.clash
179 | com.github.thepiemonster.hidemocklocation
180 | com.github.tianma8023.xposed.smscode
181 | com.github.uiautomator
182 | com.google.android.hmal
183 | com.google.android.hml
184 | com.goosebt.ld
185 | com.greenforest.auto.clicker
186 | com.gswxxn.autonfc
187 | com.gswxxn.camerasnap
188 | com.gswxxn.restoresplashscreen
189 | com.gswxxn.unlockmilink
190 | com.gswxxn.xmsfnotichannel
191 | com.guoshi.httpcanary
192 | com.hcgstudio.miui.fuck.gesture
193 | com.hchen.appretention
194 | com.hchen.autoseffswitch
195 | com.hchen.clipboardlist
196 | com.hchen.foregroundpin
197 | com.hchen.pinningapp
198 | com.hchen.switchfreeform
199 | com.hd.hdtool
200 | com.hello.world
201 | com.hentai.q
202 | com.hhvvg.anydebug
203 | com.hhvvg.anytext
204 | com.hhvvg.ecm
205 | com.hhvvg.launcher3customizer
206 | com.hiiro.fuckddvip
207 | com.hiwechart.translate
208 | com.hook.fuckmimarket
209 | com.hook.xblauncherxposedhook
210 | com.houvven.impad
211 | com.houvven.olocalnstall
212 | com.htetz.monopatch
213 | com.hujiayucc.hook
214 | com.hujiayucc.notask
215 | com.hujiayucc.rpointer
216 | com.hx.fanqie
217 | com.jakting.duolingo
218 | com.janking.viewperf
219 | com.jiguro.bettervia
220 | com.jiguro.fuckgoogle
221 | com.jiguro.kuaisnap
222 | com.jiguro.wonderless
223 | com.jingyu233.miuiquickopenhook
224 | com.jj.hidenavbar
225 | com.jozein.xedgepro
226 | com.js.deepsleep
227 | com.junge.algorithmaide
228 | com.jy.taofanfan
229 | com.jy.tt.auth
230 | com.jy.xp.lk
231 | com.jy.xposed.skip
232 | com.keramidas.TitaniumBackup
233 | com.keramidas.TitaniumBackupAddon
234 | com.keshav.capturesposed
235 | com.ketal.bcrfullscreen
236 | com.ketan.romtools24
237 | com.ketan.tweakss24pro
238 | com.kgg.hhvideo
239 | com.kgg.hlddz
240 | com.king250.fightoppoinstaller
241 | com.kooritea.fcmfix
242 | com.ldgz.sankuai
243 | com.ldq.connect
244 | com.lenerd46.spotifyplus
245 | com.leo.xposed.xradiant
246 | com.lerist.fakelocation
247 | com.lexa.fakegps
248 | com.ljlvink.formhook
249 | com.ljlvink.stylusplus.xposed
250 | com.lt2333.simplicitytools
251 | com.lt2333.wooboxforcoloros
252 | com.lu.wxmask
253 | com.luckyzyx.killredone
254 | com.luckyzyx.luckytool
255 | com.luckyzyx.notifyintercept
256 | com.luckyzyx.toolboxunlock
257 | com.luigivampa92.xlogger
258 | com.ma.bitchgiveitbackrunningservices
259 | com.ma.juicesshbypass
260 | com.makino.cslyric
261 | com.maxkiller.xposedhook
262 | com.metris.xposed.bluetoothtoolkitfree
263 | com.metris.xposed.castenabler
264 | com.metris.xposed.pmods
265 | com.mhook.dialog.beta
266 | com.mihuashi.paybyfinger
267 | com.miui.break.sim
268 | com.mln.momoxposed
269 | com.modisk.dawn
270 | com.my.televip
271 | com.n8.xmsflogbypass
272 | com.neko.helsirootbypass
273 | com.niki.breeno.openai
274 | com.niki914.qqmail.cleaner
275 | com.nnnen.plusne
276 | com.nnnen.tool
277 | com.noobexon.xposedfakelocation
278 | com.nxdxfg.GoldenVipHook
279 | com.oosl.colorostool
280 | com.op.lspdoze
281 | com.overlook.android.fing
282 | com.owl.auxiliary
283 | com.owo233.fuckmarketads
284 | com.owo233.tcqt
285 | com.padi.hook.hookqq
286 | com.parallelc.micts
287 | com.pic.catcher
288 | com.plus.boy
289 | com.polyhook.modules
290 | com.programminghoch10.cameracontrol
291 | com.programminghoch10.mobileiconchanger
292 | com.programminghoch10.securedisplay
293 | com.programminghoch10.upsidewifi
294 | com.pyshivam.geergit
295 | com.qingyu.mi5g
296 | com.qqlittleice.ironbridge
297 | com.queallytech.disablelogrequest
298 | com.queallytech.omapi
299 | com.radius.optimization
300 | com.raincat.dolby_beta
301 | com.rdstory.miuiperfsaver
302 | com.rel.languager
303 | com.rel.mujde
304 | com.reveny.protecttai.bypass
305 | com.reveny.vbmetafix.service
306 | com.richardluo.globalIconPack
307 | com.rifsxd.ksunext
308 | com.rifsxd.processhook
309 | com.rosan.dhizuku.api.xposed
310 | com.setoskins.hook
311 | com.sevtinge.cemiuiler
312 | com.sevtinge.hyperceiler
313 | com.shatyuka.killergram
314 | com.shatyuka.zhiliao
315 | com.silverlabtm.app.deviceidchanger.free
316 | com.simo.ssl.killer
317 | com.simo.tgramhooks
318 | com.skirky.fuck.motoroal.update
319 | com.sky.xposed.rimet
320 | com.skyhand.ppxxphelper
321 | com.skyhand.redbookhelper
322 | com.skyhand.sinahelper
323 | com.softwarebakery.drivedroid
324 | com.somebody.vipFucker
325 | com.sotap.module
326 | com.souleven.photosfix
327 | com.ss.android.ugc.aweme.removeblindwatermark
328 | com.strawing.alwaysthemedicon
329 | com.strawing.duckdevicepolicy
330 | com.strawing.fuckdevicepolicy
331 | com.suisho.disablescreenshotsound
332 | com.suisho.pixelposed
333 | com.sukisu.ultra
334 | com.sumver.fixmiaod
335 | com.sumver.keepaod
336 | com.suqi8.oshin
337 | com.surcumference.fingerprintpay
338 | com.sweet
339 | com.tcgg.imjhook
340 | com.termux
341 | com.test.unlockmiui
342 | com.th7.cgsportbypass
343 | com.th7.fcsdk
344 | com.th7.flinspirer.admin
345 | com.thinkdifferent.anywebview
346 | com.three.minit.batteryresources
347 | com.tlsu.opluscamerapro
348 | com.topjohnwu.magisk
349 | com.topmiaohan.superlist
350 | com.toxic.prime.ff
351 | com.tribalfs.gmh
352 | com.trump.myxposed
353 | com.tsng.fuckdmzj
354 | com.tsng.hidemyapplist
355 | com.twifucker.hachidori
356 | com.txy.anywhere
357 | com.unexpected.capture.uc
358 | com.unexpected.hook.disable.security.windows
359 | com.upbad.apps.opgo
360 | com.upbad.apps.vogo
361 | com.v2ray.ang
362 | com.variable.apkhook
363 | com.varuns2002.disable_flag_secure
364 | com.veo.hook.bili.speed
365 | com.vivian8421.mipushenhance
366 | com.w2016.fuckRealmeOTG
367 | com.w2016.sensorfilter
368 | com.w311ang.disable_flag_keep_screen_on
369 | com.wecom.padbridge
370 | com.wengui.hook
371 | com.weverses.modempro
372 | com.winnersonx.httpinterceptor
373 | com.winnersonx.sslbypass
374 | com.wizpizz.onepluspluslauncher
375 | com.wizpizz.reddidnt
376 | com.wmods.wppenhacer
377 | com.wmods.wppenhacer.w4b
378 | com.wovow.youtubehelper
379 | com.wrlus.module.fwkdebug
380 | com.ws.onscripterplus
381 | com.wubydax.romcontrol.v2
382 | com.wye4.hookforvip
383 | com.xchat
384 | com.xconst.vavatar
385 | com.xiaoer.watermark
386 | com.xiaoniu.zuiyouhook
387 | com.xposed.miuiime
388 | com.xtaolabs.fuck_huaya
389 | com.xunflash.setMiPad5Pointer
390 | com.y7.fingerpay
391 | com.yanghy.fkdy
392 | com.yifeplayte.logrequestmanager
393 | com.yifeplayte.maxfreeform
394 | com.yifeplayte.maxmipadinput
395 | com.yifeplayte.miuipadesc
396 | com.yifeplayte.norelaunch
397 | com.yifeplayte.wavecharge
398 | com.yotagit.xfucker
399 | com.yuanwofei.cardemulator.pro
400 | com.yubyf.quotelockx
401 | com.yunzia.hyperstar
402 | com.yureitzk.nophotopickerapi
403 | com.yuuki.automtp
404 | com.yuuki.betterbar
405 | com.yuuki.puresatusbar
406 | com.yxer.compo.module
407 | com.zdy.project.wechat_chatroom_helper
408 | com.zhangnew.wechatmultiwebview
409 | com.zhenxi.fundex2
410 | com.zhenxi.funelf
411 | com.zhenxi.il2cpptrace
412 | com.zhenxi.jnitrace
413 | com.zhizi42.diymiuicard
414 | com.zhufucdev.cp_plugin
415 | com.zhufucdev.motion_emulator
416 | com.zhufucdev.ws_plugin
417 | com.zidongdianji
418 | com.zitan.eternalseniahook
419 | com.znliang.fuck.soul
420 | com.ztc1997.fakedcbacklight
421 | com.ztc1997.mockbluetoothdevice
422 | com.zuiyou.adfree
423 | com.zwk.xintent
424 | com.zxl.bfunhelper
425 | cum.xiaoji.egggame
426 | de.buttercookie.disabletargetapiblock
427 | de.buttercookie.optionsmenufix
428 | de.buttercookie.rocketplayerdefuser
429 | dev.arktic.installerrestrictor
430 | dev.coderpwh.fuck_shake
431 | dev.device.emulator
432 | dev.lackluster.mihelper
433 | dev.rushii.xspoofsignatures
434 | dev.sora.extractor
435 | dialog.box
436 | es.chiteroman.bootloaderspoofer
437 | es.rafagale.biometricbypass
438 | eu.faircode.xlua
439 | eu.hxreborn.gboardmaterialexpressiveblack
440 | eu.hxreborn.remembermysort
441 | eu.rafareborn.biometricbypass
442 | fansirsqi.xposed.sesame
443 | fer.amiya.amiyahooks
444 | foss.coolest.fucker
445 | fr.netstat.locationindicatorwhitelist
446 | fr.xenorf.affranchi
447 | fuck.location
448 | fucking.internet.tile
449 | fuckinginput.coloros.baidu
450 | github.zerorooot.copyfenbi
451 | github.zerorooot.fuckbilibilivote
452 | github.zerorooot.hidemiuiclipboarddialog
453 | github.zerorooot.horizontalcontentextension
454 | gqv.sn.y
455 | have.fun
456 | icu.freedomIntrovert.biliSendCommAntifraud
457 | icu.freedomintrovert.YTSendCommAntiFraud
458 | icu.insomnia.qavatar
459 | icu.insomnia.zen
460 | icu.nullptr.twifucker
461 | id.my.pjm.toys.nfcnci_patience
462 | im.hoho.alipayinstallb
463 | im.mingxi.miko
464 | inc.whew.android.fakegapps
465 | io.dixtdf.ocar
466 | io.github.MarsGao.speed
467 | io.github.Retmon403.oppotheme
468 | io.github.a13e300.ksuwebui
469 | io.github.a13e300.tools.stethox
470 | io.github.achyuki.folddevtools
471 | io.github.ahmedmani.pairipfix
472 | io.github.alexdonh.noaccessibilityservices
473 | io.github.auag0.disableaudiofocus
474 | io.github.auag0.hidemocklocation
475 | io.github.auag0.imnotadeveloper
476 | io.github.brucezhang1993.warp_loves_play_store
477 | io.github.cctyl.coolmarkhook
478 | io.github.chipppppppppp.binnosoko
479 | io.github.chipppppppppp.lime
480 | io.github.chsbuffer.miuihelper
481 | io.github.chsbuffer.revancedxposed
482 | io.github.cloudburst.messengerex
483 | io.github.cpatcher
484 | io.github.dixtdf.key.forward
485 | io.github.dixtdf.oplus.display
486 | io.github.duzhaokun123.darkaischedule
487 | io.github.duzhaokun123.fuckcainiao
488 | io.github.duzhaokun123.tasklabelastasktitle
489 | io.github.duzhaokun123.yamf
490 | io.github.enhancege
491 | io.github.howard20181.notificationiconfix
492 | io.github.huskydg.magisk
493 | io.github.icepony.alwaysbatterysaver
494 | io.github.icepony.alwayscreateuser
495 | io.github.invalidsudo.nocharginganimation
496 | io.github.jeffshee.nekumorimod
497 | io.github.jqssun.gpssetter
498 | io.github.jqssun.seaccess
499 | io.github.lamprose.mi_ultra
500 | io.github.liusj5257
501 | io.github.lsposed.disableflagsecure
502 | io.github.lsposed.disabletgscreenshot
503 | io.github.lzghzr.biliveinvisible
504 | io.github.lzghzr.xperiaservicemenu
505 | io.github.lzghzr.xperiaupdatecenter
506 | io.github.nitsuya.aa.display
507 | io.github.nitsuya.donottryaccessibility
508 | io.github.nvg064.xiaomicharginganimation
509 | io.github.qauxv
510 | io.github.rezade05.hidebusybox
511 | io.github.rushiranpise.gameunlocker
512 | io.github.tehcneko.applinkverify
513 | io.github.tehcneko.clipboardwhitelist
514 | io.github.tehcneko.hyperos.aospinstaller
515 | io.github.tehcneko.miuinotificationfix
516 | io.github.tehcneko.satback
517 | io.github.tehcneko.sslunpinning
518 | io.github.tehcneko.telespeed
519 | io.github.vvb2060.callrecording
520 | io.github.vvb2060.magisk
521 | io.github.wzhy.xaudiocapture
522 | io.github.xyy.noad
523 | io.github.yagiyuu.linextra
524 | io.github.yangyiyu08.taplusext
525 | io.kazutoiris.infinite.illusion
526 | io.kazutoiris.mrga
527 | io.mesalabs.knoxpatch
528 | io.noisyfox.oplongshotxposed
529 | it.kapfer.digitalesamt.liberator
530 | its.madruga.warevamp
531 | junzi.xposed.hook
532 | kz.enpf.enabler
533 | lialh4.ldf
534 | lin.xposed
535 | lozn.hookui
536 | lsposed.orange
537 | ltd.nextalone.pkginstallerplus
538 | lzlnb.cnm.hook
539 | ma.wanam.youtubeadaway
540 | master.alarmshell.android
541 | me.bingyue.IceCore
542 | me.bingyue.fuckbiliads
543 | me.bingyue.fuckqishui
544 | me.bmax.apatch
545 | me.build
546 | me.colinxu2020.rollingskyhack
547 | me.dannyit.wechat.chum
548 | me.documenthook
549 | me.feimeng.vip
550 | me.garfieldhan.apatch.next
551 | me.hd.hookgg
552 | me.hd.hookwzry
553 | me.hd.nullavatar
554 | me.hd.wauxv
555 | me.hoshino.novpndetect
556 | me.iacn.biliroaming
557 | me.itejo443.bindhosts
558 | me.jsonet.jshook
559 | me.kofua.qmhelper
560 | me.kyuubiran.akinatorhelper
561 | me.kyuubiran.qqcleaner
562 | me.neko.lotus
563 | me.neversleep.plusplus
564 | me.plusne
565 | me.rhunk.snapenhance
566 | me.simplehook
567 | me.siowu.OplusKeyHook
568 | me.siowu.RamInfoShow
569 | me.sleep.vip
570 | me.teble.xposed.autodaily
571 | me.timschneeberger.onyxtweaks
572 | me.weishu.kernelsu
573 | me.xmbest.hyper
574 | me.yxp.qfun
575 | me.zhenxin.thisreallylite
576 | miko.client
577 | ml.pyshivam.imeimasker
578 | mobi.acpm.inspeckage
579 | moe.chenxy.hyperpods
580 | moe.henry_zhr.force_dark
581 | moe.henry_zhr.kill_domain_verification
582 | moe.lyniko.hiderecent
583 | moe.lyniko.replacecursor
584 | moe.lz233.mitranslator
585 | moe.shizuku.privileged.api
586 | moe.xzr.oplushidezoomwindow
587 | moe.zl.freeshare
588 | mufanc.tools.applock
589 | name.caiyao.sporteditor
590 | name.mikanoshi.customiuizer
591 | name.monwf.customiuizer
592 | nep.timeline.re_telegram
593 | net.ankio.bluetooth
594 | net.lonelytransistor.notificationinsystem
595 | nil.nadph.qnotified
596 | nnnn.aaaaa.nevercrash
597 | one.yufz.hmspush
598 | org.adaway
599 | org.hello.coolapk
600 | org.liuyi.mifreeformx
601 | org.lsposed.daemon
602 | org.lsposed.manager
603 | org.matrix.chromext
604 | org.strawing.customiuizermod
605 | org.swiftapps.swiftbackup
606 | org.torproject.torbrowser
607 | org.zwanoo.android.speedtest
608 | pansong291.xposed.quickenergy
609 | pansong291.xposed.quickenergy.qiufeng
610 | pansong291.xposed.quickenergy.repair
611 | pers.ketikai.lsp.mywebview
612 | pm.rnxhg.rhl.sn
613 | pokego.pip
614 | ps.reso.instaeclipse
615 | pub.chara.disablealttab
616 | pub.chara.miuipadmeta
617 | re.limus.timas
618 | rikka.riru
619 | ru.bluecat.alfabankpatcher
620 | ru.bluecat.android.xposed.mods.appsettings
621 | ru.bluecat.marketplaceadaway
622 | ru.bluecat.megafoncleaner
623 | ru.bluecat.mirpaysecurity
624 | ru.bluecat.sberbankpatcher
625 | ru.bluecat.yandexmapspatcher
626 | ru.hepolise.volumekeymusicmanagermodule
627 | ru.mike.customiuizer125plugin
628 | ru.mike.diiatweaks
629 | ru.mike.loyalty
630 | ru.mike.mapstweaks
631 | ru.mike.mcroot
632 | ru.mike.rootobywatel
633 | ru.mike.sidestories
634 | ru.mike.updatelocker
635 | ru.mike.wallettweaks
636 | sama.october.FuckTapVerify
637 | sb.firefds.pie.firefdskit
638 | sb.firefds.q.firefdskit
639 | sb.firefds.r.firefdskit
640 | sb.firefds.s.firefdskit
641 | sb.firefds.t.firefdskit
642 | sb.firefds.u.firefdskit
643 | sh.siava.pixelxpert
644 | space.aioilight.tsubonofuta
645 | sqz.wenku8.bg
646 | ss.colytitse.fuckdmzj
647 | ss.colytitse.setappfull
648 | star.sky.voyager
649 | statusbar.lyric
650 | tech.oliet.hcefunlocker
651 | tn.amin.keyboard_gpt
652 | tn.amin.mpro2
653 | tn.amin.phantom_mic
654 | tn.payoneer.loukious
655 | top.canyie.settingsfirewall
656 | top.galqq
657 | top.hookvip.pro
658 | top.hookvip.wxtablet
659 | top.ltfan.notdeveloper
660 | top.rainfall.kernelsuext
661 | top.sacz.timtool
662 | top.trangle.mbga
663 | top.weixiansen574.alarmshell
664 | top.weixiansen574.fuckadjump
665 | top.weixiansen574.fuckunknownsourcesrestrictions
666 | tw.idv.palatis.xappdebug
667 | vn.kwaiching.anantaryamarga
668 | vn.kwaiching.dj
669 | vn.kwaiching.live
670 | vn.kwaiching.tao
671 | vn.kwaiching.yauyin
672 | wx.myfriends
673 | wx.repair.tool
674 | wx.veil
675 | xdc.destinyImm
676 | xeed.xposed.cbppmod
677 | xmnh.soulfrog
678 | xyz.ccat3z.nodisplaycutout
679 | xyz.cirno.noswipetokill
680 | xyz.cirno.pseudodcdimming
681 | xyz.cirno.unfuckzui
682 | xyz.xfqlittlefan.ciwong.hello
683 | xyz.xfqlittlefan.notdeveloper
684 | yep.python.hook
685 | yuu.xposed
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/src/actionA.sh:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 | # Welcome (0b00000X) #
3 | readonly EXIT_SUCCESS=0
4 | readonly EXIT_FAILURE=1
5 | readonly EOF=255
6 | readonly VK_POWER=13
7 | readonly VK_SCREEN=20
8 | readonly VK_UP=38
9 | readonly VK_DOWN=40
10 | readonly moduleName="Bypasser"
11 | readonly moduleId="bypasser"
12 | readonly defaultTimeout=5
13 | readonly actionFolderPath="$(dirname "$0")"
14 | readonly adbFolder="../.."
15 | readonly ksuFolder="${adbFolder}/ksu"
16 | readonly magiskFolder="${adbFolder}/magisk"
17 | readonly apatchFolder="${adbFolder}/ap"
18 | readonly startTime=$(date +%s%N)
19 | readonly magiskVulnerabilityVersion=27007
20 | exitCode=${EXIT_SUCCESS}
21 |
22 | function clearCaches
23 | {
24 | sync && echo 3 > /proc/sys/vm/drop_caches
25 | return $?
26 | }
27 |
28 | function setPermissions
29 | {
30 | returnCode=${EXIT_SUCCESS}
31 | if [[ -n "$(find . -type d -exec chmod 555 {} \; 2>&1)" ]];
32 | then
33 | returnCode=${EXIT_FAILURE}
34 | fi
35 | if [[ -n "$(find . -type f ! -name "*.sh" -exec chmod 444 {} \; 2>&1)" ]];
36 | then
37 | returnCode=${EXIT_FAILURE}
38 | fi
39 | if [[ -n "$(find . -type f -name "*.sh" -exec chmod 544 {} \; 2>&1)" ]];
40 | then
41 | returnCode=${EXIT_FAILURE}
42 | fi
43 | if ! chown -R root:root ".";
44 | then
45 | returnCode=${EXIT_FAILURE}
46 | fi
47 | return ${returnCode}
48 | }
49 |
50 | echo "Welcome to the \`\`action.sh\`\` of the rooting-layer system module ${moduleName}! "
51 | echo "The absolute path to this script slot is \"$(cd "$(dirname "$0")" && pwd)/$(basename "$0")\". "
52 | clearCaches
53 | if [[ $? -eq ${EXIT_SUCCESS} ]];
54 | then
55 | echo "Successfully cleared caches. "
56 | else
57 | exitCode=$(expr ${exitCode} \| ${EXIT_FAILURE})
58 | echo "Failed to clear caches. "
59 | fi
60 | chmod 755 "${actionFolderPath}" && cd "${actionFolderPath}"
61 | if [[ $? -eq ${EXIT_SUCCESS} && "$(basename "$(pwd)")" == "${moduleId}" ]];
62 | then
63 | echo "The current working directory is \"$(pwd)\". "
64 | setPermissions
65 | if [[ $? -eq ${EXIT_SUCCESS} ]];
66 | then
67 | echo "Successfully set permissions. "
68 | else
69 | exitCode=$(expr ${exitCode} \| ${EXIT_FAILURE})
70 | echo "Failed to set permissions. "
71 | fi
72 | else
73 | echo "The working directory \"$(pwd)\" is unexpected. "
74 | exitCode=$(expr ${exitCode} \| ${EXIT_FAILURE})
75 | fi
76 | if ${BOOTMODE};
77 | then
78 | if [[ "${KSU}" == "true" ]];
79 | then
80 | echo "KSU (${KSU_VER_CODE}): Please "
81 | echo "- patch the kernel to support SukiSU-Ultra and SUSFS, "
82 | echo "- deploy the latest SukiSU-Ultra from the \`\`Actions\`\` tab of its GitHub repository with only applications requiring root privileges configured and granted in the SukiSU-Ultra Manager, "
83 | echo "- install the latest susfs4ksu module as a system module, "
84 | echo "- install the latest Zygisk Next module as a system module with Denylist Policy set to Unmount Only, "
85 | echo "- install the latest \`\`Jing Matrix\`\` branch of the LSPosed module from the \`\`Actions\`\` tab of its GitHub repository as a system module with logging disabled and the narrowest scope configured for each plugin, "
86 | echo "- install the latest Play Integrity Fix (PIF) module as a system module, "
87 | echo "- install the latest Tricky Store (TS) module as a system module with the correct configurations, "
88 | echo "- install the latest Audit Patch module as a system module, and"
89 | echo "- activate the latest HMA plugin from https://t.me/HideMyApplist with the correct configurations. "
90 | if [[ -d "${apatchFolder}" ]];
91 | then
92 | echo "The Apatch folder exists while the KSU / KSU Next is using. Please consider removing the Apatch folder. "
93 | fi
94 | if [[ -d "${magiskFolder}" ]];
95 | then
96 | echo "The Magisk folder exists while the KSU / KSU Next / SukiSU-Ultra is using. Please consider removing the Magisk folder. "
97 | fi
98 | elif [[ "${APATCH}" == "true" ]];
99 | then
100 | echo "Apatch (${APATCH_VER_CODE}): Please "
101 | echo "- deploy the latest Apatch from the \`\`Actions\`\` tab of its GitHub repository with only applications requiring root privileges configured and granted in the Apatch Manager, "
102 | echo "- embed the latest Cherish Peekaboo as a kernel module, "
103 | echo "- install the latest Zygisk Next module as a system module with Denylist Policy set to Unmount Only, "
104 | echo "- install the latest \`\`Jing Matrix\`\` branch of the LSPosed module from the \`\`Actions\`\` tab of its GitHub repository as a system module with logging disabled and the narrowest scope configured for each plugin, "
105 | echo "- install the latest Play Integrity Fix (PIF) module as a system module, "
106 | echo "- install the latest Tricky Store (TS) module as a system module with the correct configurations, "
107 | echo "- install the latest Audit Patch module as a system module, and"
108 | echo "- activate the latest HMA plugin from https://t.me/HideMyApplist with the correct configurations. "
109 | if [[ -d "${magiskFolder}" ]];
110 | then
111 | echo "The Magisk folder exists while the Apatch is using. Please consider removing the Magisk folder. "
112 | fi
113 | if [[ -d "${ksuFolder}" ]];
114 | then
115 | echo "The KSU folder exists while the Apatch is using. Please consider removing the KSU folder. "
116 | fi
117 | else
118 | if [[ -z "${MAGISK_VER_CODE}" ]];
119 | then
120 | MAGISK_VER_CODE="$(magisk -V)" &> /dev/null
121 | fi
122 | if [[ -z "${MAGISK_VER}" ]];
123 | then
124 | MAGISK_VER="$(magisk -v | cut -d ':' -f1)" &> /dev/null
125 | fi
126 | if [[ -n "${MAGISK_VER_CODE}" ]];
127 | then
128 | if [[ ${MAGISK_VER} == *-kitsune || ${MAGISK_VER} == *-delta ]];
129 | then
130 | echo "Magisk Delta (${MAGISK_VER_CODE}): Please "
131 | echo "- deploy the latest Magisk Delta with the built-in Zygisk enabled, the whitelist mode enabled, and only applications requiring root privileges configured and granted in the Magisk Delta Manager, "
132 | echo "- install the latest \`\`Jing Matrix\`\` branch of the LSPosed module from the \`\`Actions\`\` tab of its GitHub repository as a system module with the narrowest scope configured for each plugin, "
133 | echo "- install the latest Play Integrity Fix (PIF) module, "
134 | echo "- install the latest Tricky Store (TS) module with the correct configurations, "
135 | echo "- install the latest Audit Patch module, "
136 | echo "- install the latest bindhosts or the built-in Systemless hosts module (optional), and "
137 | echo "- activate the latest HMA plugin from https://t.me/HideMyApplist with the correct configurations. "
138 | echo "Please consider switching to the latest Magisk Alpha if possible. "
139 | else
140 | if [[ ${MAGISK_VER} == *-alpha ]];
141 | then
142 | echo -n "Magisk Alpha "
143 | elif [[ ${MAGISK_VER} == *-beta ]];
144 | then
145 | echo -n "Magisk Beta "
146 | elif [[ ${MAGISK_VER} == *-canary ]];
147 | then
148 | echo -n "Magisk Canary "
149 | else
150 | echo -n "Magisk "
151 | fi
152 | echo "(${MAGISK_VER_CODE}): Please "
153 | echo "- deploy the latest Magisk Alpha with the built-in Zygisk and denylist disabled, "
154 | echo "- execute applications requiring root privileges with root privileges granted, "
155 | echo "- install the latest Zygisk Next module with Denylist Policy set to Unmount Only, "
156 | echo "- install the latest \`\`Jing Matrix\`\` branch of the LSPosed module from the \`\`Actions\`\` tab of its GitHub repository with logging disabled and the narrowest scope configured for each plugin, "
157 | echo "- install the latest Play Integrity Fix (PIF) module, "
158 | echo "- install the latest Tricky Store (TS) module with the correct configurations, "
159 | echo "- install the latest Audit Patch module, "
160 | echo "- install the latest bindhosts or the built-in Systemless hosts module (optional), and "
161 | echo "- activate the latest HMA plugin from https://t.me/HideMyApplist with the correct configurations. "
162 | fi
163 | if [[ ${MAGISK_VER_CODE} -lt ${magiskVulnerabilityVersion} ]];
164 | then
165 | echo "Magisk versions before ${magiskVulnerabilityVersion} can contain severe privilege escalation vulnerability. You are using Magisk ${MAGISK_VER_CODE}. Please update it as soon as possible. "
166 | fi
167 | if [[ -d "${apatchFolder}" ]];
168 | then
169 | echo "The Apatch folder exists while the Magisk is using. Please consider removing the Apatch folder. "
170 | fi
171 | if [[ -d "${ksuFolder}" ]];
172 | then
173 | echo "The KSU folder exists while the Magisk is using. Please consider removing the KSU folder. "
174 | fi
175 | else
176 | echo "Unknown: The rooting solution used is unknown. "
177 | fi
178 | fi
179 | else
180 | echo "Unbooted: The device is not working in the boot mode. "
181 | fi
182 | echo ""
183 |
184 | # Zygisk Traces (0b0000X0) #
185 | echo "# Zygisk Traces (0b0000X0) #"
186 | readonly magiskModuleFolder="${adbFolder}/modules"
187 | readonly zygiskSolutionModuleId="zygisksu"
188 | readonly zygiskNextConfigurationFolderPath="${adbFolder}/zygisksu"
189 | readonly zygiskNextDenylistEnforceConfigurationFileName="denylist_enforce"
190 | readonly zygiskNextDenylistEnforceConfigurationFilePath="${zygiskNextConfigurationFolderPath}/${zygiskNextDenylistEnforceConfigurationFileName}"
191 | readonly zygiskNextDenylistPolicyConfigurationFileName="denylist_policy"
192 | readonly zygiskNextDenylistPolicyConfigurationFilePath="${zygiskNextConfigurationFolderPath}/${zygiskNextDenylistPolicyConfigurationFileName}"
193 | readonly shamikoModuleId="zygisk_shamiko"
194 | readonly shamikoConfigurationFolderPath="${adbFolder}/shamiko"
195 | readonly shamikoWhitelistConfigurationFileName="whitelist"
196 | readonly shamikoWhitelistConfigurationFilePath="${shamikoConfigurationFolderPath}/${shamikoWhitelistConfigurationFileName}"
197 | readonly zygiskAssistantModuleId="zygisk-assistant"
198 | readonly noHelloModuleId="zygisk_nohello"
199 | readonly noHelloConfigurationFolderPath="${adbFolder}/nohello"
200 | readonly noHelloWhitelistConfigurationFileName="whitelist"
201 | readonly noHelloWhitelistConfigurationFilePath="${noHelloConfigurationFolderPath}/${noHelloWhitelistConfigurationFileName}"
202 | readonly rezygiskConfigurationFolderPath="${adbFolder}/rezygisk"
203 | readonly neozygiskConfigurationFolderPath="${adbFolder}/neozygisk"
204 | readonly builtInZygiskFilePath="${adbFolder}/magisk/zygisk"
205 |
206 | function isModuleInstalled
207 | {
208 | moduleInstallationFolderPath="${magiskModuleFolder}/$1"
209 | if [[ -d "${moduleInstallationFolderPath}" ]];
210 | then
211 | modulePropFileName="module.prop"
212 | modulePropFilePath="${moduleInstallationFolderPath}/${modulePropFileName}"
213 | if [[ -f "${modulePropFilePath}" ]];
214 | then
215 | if grep -q "^id=$1\$" "${modulePropFilePath}";
216 | then
217 | grep "^name=" "${modulePropFilePath}" | cut -d '=' -f2
218 | return ${EXIT_SUCCESS}
219 | fi
220 | fi
221 | fi
222 | return ${EXIT_FAILURE}
223 | }
224 |
225 | if [[ "${ZYGISK_ENABLED}" == "1" ]];
226 | then
227 | zygiskSolutionModuleName="$(isModuleInstalled "${zygiskSolutionModuleId}")"
228 | if [[ $? -eq ${EXIT_SUCCESS} ]];
229 | then
230 | echo "The Zygisk solution was implemented by ${zygiskSolutionModuleName}. "
231 | toBeWritten="2"
232 | if isModuleInstalled "${shamikoModuleId}" > /dev/null;
233 | then
234 | toBeWritten="0"
235 | echo "The Shamiko module was installed. "
236 | if [[ "${APATCH}" == "true" ]];
237 | then
238 | echo "Please kindly acknowledge that the Shamiko module does not work with Apatch. Please consider using ReZygisk + NoHello in Apatch. "
239 | elif [[ ${MAGISK_VER} == *-kitsune || ${MAGISK_VER} == *-delta ]];
240 | then
241 | echo "Please kindly acknowledge that the Shamiko module does not work with Magisk Delta. Please consider switching to Magisk Alpha or removing the Shamiko module. "
242 | fi
243 | mkdir -p "${shamikoConfigurationFolderPath}"
244 | if [[ $? -eq ${EXIT_SUCCESS} && -d "${shamikoConfigurationFolderPath}" ]];
245 | then
246 | echo "Successfully prepared the Shamiko configuration folder \"${shamikoConfigurationFolderPath}\". "
247 | if [[ -f "${shamikoWhitelistConfigurationFilePath}" ]];
248 | then
249 | echo "The Shamiko whitelist configuration file \"${shamikoWhitelistConfigurationFilePath}\" already existed. "
250 | else
251 | echo "The Shamiko whitelist configuration file \"${shamikoWhitelistConfigurationFilePath}\" did not exist. "
252 | touch "${shamikoWhitelistConfigurationFilePath}"
253 | if [[ $? -eq ${EXIT_SUCCESS} && -f "${shamikoWhitelistConfigurationFilePath}" ]];
254 | then
255 | echo "Successfully created the Shamiko whitelist configuration file \"${shamikoWhitelistConfigurationFilePath}\". "
256 | else
257 | exitCode=$(expr ${exitCode} \| 2)
258 | echo "Failed to create the Shamiko whitelist configuration file \"${shamikoWhitelistConfigurationFilePath}\". "
259 | fi
260 | fi
261 | else
262 | echo "Failed to prepare the Shamiko configuration folder \"${shamikoConfigurationFolderPath}\". "
263 | fi
264 | else
265 | echo "The Shamiko module was not installed. "
266 | fi
267 | if isModuleInstalled "${zygiskAssistantModuleId}" > /dev/null;
268 | then
269 | if [[ "0" == "${toBeWritten}" ]];
270 | then
271 | if [[ "${APATCH}" != "true" && ${MAGISK_VER} != *-kitsune && ${MAGISK_VER} != *-delta ]];
272 | then
273 | echo "The Zygisk Assistant module was installed while the Shamiko module was installed. Please consider only using the Shamiko module in your environment. "
274 | else
275 | echo "The Zygisk Assistant module was installed while the Shamiko module was installed. Please consider only using the Zygisk Assistant module in your environment. "
276 | fi
277 | else
278 | echo "The Zygisk Assistant module was installed. "
279 | fi
280 | else
281 | echo "The Zygisk Assistant module was not installed. "
282 | fi
283 | if isModuleInstalled "${noHelloModuleId}" > /dev/null;
284 | then
285 | if [[ "0" == "${toBeWritten}" ]];
286 | then
287 | if [[ "${APATCH}" != "true" && ${MAGISK_VER} != *-kitsune && ${MAGISK_VER} != *-delta ]];
288 | then
289 | echo "The NoHello module was installed while the Shamiko or the Zygisk Assistant module was installed, which can cause compatibility issues. Please consider only using the Shamiko module in your environment. "
290 | else
291 | echo "The NoHello module was installed while the Shamiko or the Zygisk Assistant module was installed, which can cause compatibility issues. Please consider only using the NoHello module in your environment. "
292 | fi
293 | else
294 | echo "The NoHello module was installed. "
295 | fi
296 | mkdir -p "${noHelloConfigurationFolderPath}"
297 | if [[ $? -eq ${EXIT_SUCCESS} && -d "${noHelloConfigurationFolderPath}" ]];
298 | then
299 | echo "Successfully prepared the NoHello configuration folder \"${noHelloConfigurationFolderPath}\". "
300 | if [[ -f "${noHelloWhitelistConfigurationFilePath}" ]];
301 | then
302 | echo "The NoHello whitelist configuration file \"${noHelloWhitelistConfigurationFilePath}\" already existed. "
303 | else
304 | echo "The NoHello whitelist configuration file \"${noHelloWhitelistConfigurationFilePath}\" did not exist. "
305 | touch "${noHelloWhitelistConfigurationFilePath}"
306 | if [[ $? -eq ${EXIT_SUCCESS} && -f "${noHelloWhitelistConfigurationFilePath}" ]];
307 | then
308 | echo "Successfully created the NoHello whitelist configuration file \"${noHelloWhitelistConfigurationFilePath}\". "
309 | else
310 | exitCode=$(expr ${exitCode} \| 2)
311 | echo "Failed to create the NoHello whitelist configuration file \"${noHelloWhitelistConfigurationFilePath}\". "
312 | fi
313 | fi
314 | else
315 | echo "Failed to prepare the NoHello configuration folder \"${noHelloConfigurationFolderPath}\". "
316 | fi
317 | else
318 | echo "The NoHello module was not installed. "
319 | fi
320 | if [[ "Zygisk Next" == "${zygiskSolutionModuleName}" ]];
321 | then
322 | mkdir -p "${zygiskNextConfigurationFolderPath}"
323 | if [[ $? -eq ${EXIT_SUCCESS} && -d "${zygiskNextConfigurationFolderPath}" ]];
324 | then
325 | echo "Successfully prepared the Zygisk Next configuration folder \"${zygiskNextConfigurationFolderPath}\". "
326 | if [[ -f "${zygiskNextDenylistPolicyConfigurationFilePath}" && "1" == "$(cat "${zygiskNextDenylistPolicyConfigurationFilePath}")" ]];
327 | then
328 | echo "The Zygisk Next denylist policy configuration file \"${zygiskNextDenylistPolicyConfigurationFilePath}\" is already configured. "
329 | else
330 | echo "The Zygisk Next denylist policy configuration file \"${zygiskNextDenylistPolicyConfigurationFilePath}\" was not configured. "
331 | echo -n "1" > "${zygiskNextDenylistPolicyConfigurationFilePath}"
332 | if [[ $? -eq ${EXIT_SUCCESS} && -f "${zygiskNextDenylistPolicyConfigurationFilePath}" ]];
333 | then
334 | echo "Successfully wrote \"1\" to the Zygisk Next denylist policy configuration file \"${zygiskNextDenylistPolicyConfigurationFilePath}\". "
335 | else
336 | exitCode=$(expr ${exitCode} \| 2)
337 | echo "Failed to write \"1\" to the Zygisk Next denylist policy configuration file \"${zygiskNextDenylistPolicyConfigurationFilePath}\". "
338 | fi
339 | fi
340 | if [[ -f "${zygiskNextDenylistEnforceConfigurationFilePath}" && "${toBeWritten}" == "$(cat "${zygiskNextDenylistEnforceConfigurationFilePath}")" ]];
341 | then
342 | echo "The Zygisk Next denylist enforce configuration file \"${zygiskNextDenylistEnforceConfigurationFilePath}\" is already configured. "
343 | else
344 | echo "The Zygisk Next denylist enforce configuration file \"${zygiskNextDenylistEnforceConfigurationFilePath}\" was not configured. "
345 | echo -n "${toBeWritten}" > "${zygiskNextDenylistEnforceConfigurationFilePath}"
346 | if [[ $? -eq ${EXIT_SUCCESS} && -f "${zygiskNextDenylistEnforceConfigurationFilePath}" ]];
347 | then
348 | echo "Successfully wrote \"${toBeWritten}\" to the Zygisk Next denylist enforce configuration file \"${zygiskNextDenylistEnforceConfigurationFilePath}\". "
349 | else
350 | exitCode=$(expr ${exitCode} \| 2)
351 | echo "Failed to write \"${toBeWritten}\" to the Zygisk Next denylist enforce configuration file \"${zygiskNextDenylistEnforceConfigurationFilePath}\". "
352 | fi
353 | fi
354 | else
355 | echo "Failed to prepare the Zygisk Next configuration folder \"${zygiskNextConfigurationFolderPath}\". "
356 | fi
357 | if [[ -d "${rezygiskConfigurationFolderPath}" ]];
358 | then
359 | echo "The ReZygisk configuration folder exists while the Zygisk Next is using. Please consider removing the ReZygisk configuration folder. "
360 | fi
361 | if [[ -d "${neozygiskConfigurationFolderPath}" ]];
362 | then
363 | echo "The NeoZygisk configuration folder exists while the Zygisk Next is using. Please consider removing the NeoZygisk configuration folder. "
364 | fi
365 | elif [[ "ReZygisk" == "${zygiskSolutionModuleName}" ]];
366 | then
367 | if [[ -d "${zygiskNextConfigurationFolderPath}" ]];
368 | then
369 | echo "The Zygisk Next configuration folder exists while the ReZygisk is using. Please consider removing the Zygisk Next configuration folder. "
370 | fi
371 | if [[ -d "${neozygiskConfigurationFolderPath}" ]];
372 | then
373 | echo "The NeoZygisk configuration folder exists while the ReZygisk is using. Please consider removing the NeoZygisk configuration folder. "
374 | fi
375 | elif [[ "NeoZygisk" == "${zygiskSolutionModuleName}" ]];
376 | then
377 | if [[ -d "${zygiskNextConfigurationFolderPath}" ]];
378 | then
379 | echo "The Zygisk Next configuration folder exists while the NeoZygisk is using. Please consider removing the Zygisk Next configuration folder. "
380 | fi
381 | if [[ -d "${rezygiskConfigurationFolderPath}" ]];
382 | then
383 | echo "The ReZygisk configuration folder exists while the NeoZygisk is using. Please consider removing the ReZygisk configuration folder. "
384 | fi
385 | if isModuleInstalled "${shamikoModuleId}" > /dev/null;
386 | then
387 | if [[ "${APATCH}" == "true" ]];
388 | then
389 | echo "The Shamiko module does not work with Apatch or NeoZygisk. Please consider removing this module and switching to ReZygisk + NeHello. "
390 | else
391 | echo "The Shamiko module does not work with NeoZygisk. Please consider either switching to Zygisk Next or removing this module. "
392 | fi
393 | fi
394 | if isModuleInstalled "${noHelloModuleId}" > /dev/null;
395 | then
396 | echo "The NoHello module does not work with NeoZygisk. Please consider either switching to ReZygisk or removing this module. "
397 | fi
398 | fi
399 | elif [[ -f "${builtInZygiskFilePath}" ]]
400 | then
401 | echo "The Zygisk solution was implemented by Magisk built-in Zygisk. "
402 | else
403 | echo "The Zygisk was enabled but the implementation was unknown. "
404 | fi
405 | else
406 | echo "The Zygisk was not enabled. "
407 | fi
408 | echo ""
409 |
410 | # HMA(L) (0b000X00) #
411 | echo "# HMA(L) (0b000X00) #"
412 | readonly webrootName="webroot"
413 | readonly webrootFolderPath="${webrootName}"
414 | readonly webrootFilePath="${webrootName}.zip"
415 | readonly webrootUrl="https://raw.githubusercontent.com/LRFP-Team/Bypasser/main/src/webroot.zip"
416 | readonly webrootDigestUrl="https://raw.githubusercontent.com/LRFP-Team/Bypasser/main/src/webroot.zip.sha512"
417 | readonly classificationFolderName="classifications"
418 | readonly classificationFolderPath="${webrootFolderPath}/${classificationFolderName}"
419 | readonly dataAppFolder="/data/app"
420 | readonly largerOldScanningScope="/data"
421 | readonly smallerOldScanningScope="/data/misc"
422 | readonly blacklistName="Blacklist"
423 | readonly whitelistName="Whitelist"
424 | if [[ -n "${EXTERNAL_STORAGE}" ]];
425 | then
426 | readonly downloadFolderPath="${EXTERNAL_STORAGE}/Download"
427 | else
428 | readonly downloadFolderPath="/sdcard/Download"
429 | fi
430 | readonly blacklistConfigurationFileName=".HMA(L)_Blacklist_Config.json"
431 | readonly blacklistConfigurationFilePath="${downloadFolderPath}/${blacklistConfigurationFileName}"
432 | readonly whitelistConfigurationFileName=".HMA(L)_Whitelist_Config.json"
433 | readonly whitelistConfigurationFilePath="${downloadFolderPath}/${whitelistConfigurationFileName}"
434 | readonly reportLink="https://github.com/LRFP-Team/Bypasser"
435 | gapTime=0
436 |
437 | function getClassification
438 | {
439 | if [[ $# -eq 1 ]];
440 | then
441 | if [[ "B" == "$1" || "C" == "$1" || "D" == "$1" ]];
442 | then
443 | classificationFilePath="${classificationFolderPath}/classification$1.txt"
444 | if [[ -f "${classificationFilePath}" ]];
445 | then
446 | arr="$(cat "${classificationFilePath}")"
447 | returnCode=$?
448 | if [[ ${returnCode} -eq ${EXIT_SUCCESS} && -n "${arr}" ]];
449 | then
450 | arr="$(echo -n ${arr} | sort | uniq)"
451 | echoFlag=0
452 | for package in ${arr}
453 | do
454 | if echo -n "${package}" | grep -qE '^[A-Za-z][0-9A-Za-z_]*(\.[A-Za-z][0-9A-Za-z_]*)+$';
455 | then
456 | if [[ 1 == ${echoFlag} ]];
457 | then
458 | echo -e -n "\n${package}"
459 | else
460 | echo -n "${package}"
461 | echoFlag=1
462 | fi
463 | fi
464 | done
465 | return ${EXIT_SUCCESS}
466 | else
467 | return ${returnCode}
468 | fi
469 | else
470 | return ${EOF}
471 | fi
472 | else
473 | return ${EOF}
474 | fi
475 | else
476 | return ${EOF}
477 | fi
478 | }
479 |
480 | function getTheKeyPressed
481 | {
482 | if echo "$1" | grep -qE '^[1-9][0-9]*$';
483 | then
484 | timeout=$1
485 | else
486 | timeout=${defaultTimeout}
487 | fi
488 | read -r -t ${timeout} pressString < <(getevent -ql)
489 | pressCode=$?
490 | if [[ ${EXIT_SUCCESS} == ${pressCode} ]];
491 | then
492 | if [[ "${pressString}" == *KEY_VOLUMEUP* ]];
493 | then
494 | echo "The [+] was pressed. "
495 | return ${VK_UP}
496 | elif [[ "${pressString}" == *KEY_VOLUMEDOWN* ]];
497 | then
498 | echo "The [-] was pressed. "
499 | return ${VK_DOWN}
500 | elif [[ "${pressString}" == *KEY_POWER* ]];
501 | then
502 | echo "The power key was pressed. "
503 | return ${VK_POWER}
504 | elif [[ "${pressString}" == *ABS_MT_TRACKING_ID* ]];
505 | then
506 | echo "The screen was pressed. "
507 | return ${VK_SCREEN}
508 | else
509 | echo "The following unknown event occurred. "
510 | echo "${pressString}" | sed 's/^/\t/'
511 | return ${EXIT_FAILURE}
512 | fi
513 | else
514 | echo "Users did not respond within ${timeout} second(s). "
515 | return ${EOF}
516 | fi
517 | }
518 |
519 | function getArray
520 | {
521 | if [[ $# == 1 ]];
522 | then
523 | content=""
524 | arr="$(echo -n "$1" | sort | uniq)"
525 | for package in ${arr}
526 | do
527 | content="${content}\"${package}\","
528 | done
529 | if [[ "${content}" == *, ]];
530 | then
531 | content="${content%,}"
532 | echo -n "${content}"
533 | return ${EXIT_SUCCESS}
534 | else
535 | echo -n "${content}"
536 | return ${EXIT_FAILURE}
537 | fi
538 | else
539 | echo -n ""
540 | return ${EOF}
541 | fi
542 | }
543 |
544 | function getBlacklistScopeStringC
545 | {
546 | if [[ $# == 1 ]];
547 | then
548 | content=""
549 | arr="$(echo -n "$1" | sort | uniq)"
550 | totalLength="$(echo "${arr}" | wc -l)"
551 | headIndex=0
552 | tailIndex=$(expr ${totalLength} - ${headIndex} - 1)
553 | for package in ${arr}
554 | do
555 | extraAppList="$(getArray "$(echo -e -n "$(echo -n "${arr}" | head -${headIndex})\n$(echo -n "${arr}" | tail -${tailIndex})")")"
556 | headIndex=$(expr ${headIndex} + 1)
557 | tailIndex=$(expr ${tailIndex} - 1)
558 | content="${content}\"${package}\":{\"useWhitelist\":false,\"excludeSystemApps\":false,\"applyTemplates\":[\"${blacklistName}\"],\"extraAppList\":[${extraAppList}]},"
559 | done
560 | if [[ "${content}" == *, ]]; then
561 | content="${content%,}"
562 | echo -n "${content}"
563 | return ${EXIT_SUCCESS}
564 | else
565 | echo -n "${content}"
566 | return ${EXIT_FAILURE}
567 | fi
568 | else
569 | echo -n ""
570 | return ${EOF}
571 | fi
572 | }
573 |
574 | function getBlacklistScopeStringD
575 | {
576 | if [[ $# == 2 ]];
577 | then
578 | content=""
579 | arr="$(echo -n "$1" | sort | uniq)"
580 | extraAppList="$(getArray "$(echo -n "$2" | sort | uniq)")"
581 | for package in ${arr}
582 | do
583 | content="${content}\"${package}\":{\"useWhitelist\":false,\"excludeSystemApps\":false,\"applyTemplates\":[\"${blacklistName}\"],\"extraAppList\":[${extraAppList}]},"
584 | done
585 | if [[ "${content}" == *, ]]; then
586 | content="${content%,}"
587 | echo -n "${content}"
588 | return ${EXIT_SUCCESS}
589 | else
590 | echo -n "${content}"
591 | return ${EXIT_FAILURE}
592 | fi
593 | else
594 | echo -n ""
595 | return ${EOF}
596 | fi
597 | }
598 |
599 | function getWhitelistScopeString
600 | {
601 | if [[ $# == 2 ]];
602 | then
603 | content=""
604 | arrC="$(echo "$1" | sort | uniq)"
605 | arrD="$(echo "$2" | sort | uniq)"
606 | for package in ${arrC}
607 | do
608 | content="${content}\"${package}\":{\"useWhitelist\":true,\"excludeSystemApps\":true,\"applyTemplates\":[\"${whitelistName}\"],\"extraAppList\":[\"${package}\"]},"
609 | done
610 | for package in ${arrD}
611 | do
612 | content="${content}\"${package}\":{\"useWhitelist\":true,\"excludeSystemApps\":true,\"applyTemplates\":[\"${whitelistName}\"],\"extraAppList\":[]},"
613 | done
614 | if [[ "${content}" == *, ]]; then
615 | content="${content%,}"
616 | echo -n "${content}"
617 | return ${EXIT_SUCCESS}
618 | else
619 | echo -n "${content}"
620 | return ${EXIT_FAILURE}
621 | fi
622 | else
623 | echo -n ""
624 | return ${EOF}
625 | fi
626 | }
627 |
628 | webrootDigest="$(curl -s "${webrootDigestUrl}")"
629 | if [[ $? -eq ${EXIT_SUCCESS} && -n "${webrootDigest}" ]];
630 | then
631 | echo "Successfully fetched the SHA-512 value of the latest ZIP file of the web UI. "
632 | if [[ -d "${webrootFolderPath}" && "$(find "${webrootFolderPath}" -type f ! -name "*.sha512" ! -name "*.prop" -exec sha512sum {} \; | sort)" == "${webrootDigest}" ]];
633 | then
634 | echo "The current web UI is already up-to-date. "
635 | else
636 | echo "The current web UI is out-of-date and needs to be updated. "
637 | abortFlag=${EXIT_SUCCESS}
638 | if [[ -d "${webrootFolderPath}" ]];
639 | then
640 | rm -rf "${webrootFolderPath}.bak" && mv -fT "${webrootFolderPath}" "${webrootFolderPath}.bak"
641 | if [[ $? -eq ${EXIT_SUCCESS} && -d "${webrootFolderPath}.bak" ]];
642 | then
643 | echo "Successfully moved \"${webrootFolderPath}\" to \"${webrootFolderPath}.bak\". "
644 | else
645 | abortFlag=${EXIT_FAILURE}
646 | exitCode=$(expr ${exitCode} \| 32)
647 | echo "Failed to move \"${webrootFolderPath}\" to \"${webrootFolderPath}.bak\". "
648 | fi
649 | else
650 | echo "No old web UI folders were found to be backed up. "
651 | fi
652 | if [[ ${EXIT_SUCCESS} -eq ${abortFlag} ]];
653 | then
654 | curl -s "${webrootUrl}" -o "${webrootFilePath}" && unzip "${webrootFilePath}" -d "${webrootFolderPath}" && rm -f "${webrootFilePath}"
655 | if [[ $? -eq ${EXIT_SUCCESS} && -d "${webrootFolderPath}" && "$(find "${webrootFolderPath}" -type f ! -name "*.sha512" ! -name "*.prop" -exec sha512sum {} \; | sort)" == "${webrootDigest}" ]];
656 | then
657 | echo "Successfully updated and verified the web UI. "
658 | if [[ -d "${webrootFolderPath}.bak" ]];
659 | then
660 | rm -rf "${webrootFolderPath}.bak"
661 | if [[ $? -eq ${EXIT_SUCCESS} && ! -d "${webrootFolderPath}.bak" ]];
662 | then
663 | echo "Successfully removed \"${webrootFolderPath}.bak\". "
664 | else
665 | echo "Failed to remove \"${webrootFolderPath}.bak\". "
666 | fi
667 | else
668 | echo "No old web UI folders that should be removed were found. "
669 | fi
670 | else
671 | exitCode=$(expr ${exitCode} \| 32)
672 | echo "Failed to update or verify the web UI. "
673 | if [[ -d "${webrootFolderPath}.bak" ]];
674 | then
675 | rm -rf "${webrootFolderPath}" && mv -fT "${webrootFolderPath}.bak" "${webrootFolderPath}"
676 | if [[ $? -eq ${EXIT_SUCCESS} && -d "${webrootFolderPath}" ]];
677 | then
678 | echo "Successfully restored \"${webrootFolderPath}.bak\" to \"${webrootFolderPath}\". "
679 | else
680 | echo "Failed to restore \"${webrootFolderPath}.bak\" to \"${webrootFolderPath}\". "
681 | fi
682 | else
683 | echo "No old web UI folders were found for restoring. "
684 | fi
685 | fi
686 | fi
687 | fi
688 | else
689 | exitCode=$(expr ${exitCode} \| 32)
690 | echo "Failed to fetch the SHA-512 value of the latest ZIP file of the web UI. "
691 | fi
692 | if [[ $(expr ${exitCode} \& 32) -ne ${EXIT_SUCCESS} ]];
693 | then
694 | echo "The updating of the classifications might fail. This will use the classification cache files to generate the HMA(L) configurations. "
695 | fi
696 | classificationB="$(getClassification "B")"
697 | returnCodeB=$?
698 | if [[ -n "${classificationB}" ]];
699 | then
700 | lengthB=$(echo "${classificationB}" | wc -l)
701 | else
702 | lengthB=0
703 | fi
704 | classificationC="$(getClassification "C")"
705 | returnCodeC=$?
706 | if [[ -n "${classificationC}" ]];
707 | then
708 | lengthC=$(echo "${classificationC}" | wc -l)
709 | else
710 | lengthC=0
711 | fi
712 | classificationD="$(getClassification "D")"
713 | returnCodeD=$?
714 | if [[ -n "${classificationD}" ]];
715 | then
716 | lengthD=$(echo "${classificationD}" | wc -l)
717 | else
718 | lengthD=0
719 | fi
720 | if [[ ${returnCodeB} -eq ${EXIT_SUCCESS} ]];
721 | then
722 | echo "Successfully fetched ${lengthB} package name(s) of Classification \$B\$ from the library. "
723 | if [[ $# -ge 1 ]];
724 | then
725 | keyCode="$1"
726 | else
727 | echo "Please press the [+] or [-] key in ${defaultTimeout} seconds if you want to perform the local scanning (\`\`/data\`\`). Otherwise, you may touch the screen to skip the timing. "
728 | startGapTime=$(date +%s%N)
729 | getTheKeyPressed
730 | keyCode=$?
731 | endGapTime=$(date +%s%N)
732 | gapTime=$(expr ${endGapTime} - ${startGapTime})
733 | fi
734 | if [[ ${VK_UP} -eq ${keyCode} || ${VK_DOWN} -eq ${keyCode} ]];
735 | then
736 | localBCount=0
737 | folderCount=0
738 | fileCount=0
739 | failureInstallationCount=0
740 | failureInstallationRemovedCount=0
741 | echo "Performing local user application installation directory scanning. "
742 | for item in "${dataAppFolder}/"*
743 | do
744 | if [[ -d "${item}" ]];
745 | then
746 | if basename "${item}" | grep -qE "^vmdl[0-9]+\\.tmp\$";
747 | then
748 | failureInstallationCount=$(expr ${failureInstallationCount} + 1)
749 | if rm -rf "${item}";
750 | then
751 | failureInstallationRemovedCount=$(expr ${failureInstallationRemovedCount} + 1)
752 | echo "[${failureInstallationRemovedCount}/${failureInstallationCount}] Found a failure installation at \"${item}\", which has been removed. "
753 | else
754 | echo "[${failureInstallationRemovedCount}/${failureInstallationCount}] Found a failure installation at \"${item}\", which could not be removed. "
755 | fi
756 | else
757 | folderCount=$(expr ${folderCount} + 1)
758 | subItems="$(ls -1 "${item}")"
759 | if [[ $(echo "${subItems}" | wc -l) -eq 1 ]];
760 | then
761 | firstItem="$(echo "${subItems}" | awk "NR==1")"
762 | packageName="$(basename "${firstItem}" | cut -d "-" -f 1)"
763 | if echo -n "${packageName}" | grep -qE '^[A-Za-z][0-9A-Za-z_]*(\.[A-Za-z][0-9A-Za-z_]*)+$';
764 | then
765 | if ! echo -n "${classificationB}" | grep -qF "${packageName}";
766 | then
767 | printableStrings="$(cat "${item}/${firstItem}/base.apk" | strings)"
768 | if echo "${printableStrings}" | grep -qE "/xposed/|xposed_init";
769 | then
770 | localBCount=$(expr ${localBCount} + 1)
771 | classificationB="$(echo -e -n "${classificationB}\n${packageName}")"
772 | echo -n "[${localBCount}] Found the string \"/xposed/\" or \"xposed_init\" in \`\`${packageName}\`\`, which was not in and has been added to Classification \$B\$. "
773 | fi
774 | fi
775 | else
776 | echo "- Failed to resolve the folder \"${item}\". "
777 | fi
778 | else
779 | echo "- There is at least 1 additional item in \"${item}\", which should not exist. "
780 | fi
781 | fi
782 | elif [ -f "${item}" ];
783 | then
784 | if [[ "${item}" == *.apk ]];
785 | then
786 | fileCount=$(expr ${fileCount} + 1)
787 | packageName="$(basename "${item}")"
788 | packageName="${packageName%.apk}"
789 | if echo -n "${packageName}" | grep -qE '^[A-Za-z][0-9A-Za-z_]*(\.[A-Za-z][0-9A-Za-z_]*)+$';
790 | then
791 | if ! echo -n "${classificationB}" | grep -qF "${packageName}";
792 | then
793 | printableStrings="$(cat "${item}/${firstItem}/base.apk" | strings)"
794 | if echo "${printableStrings}" | grep -qE "/xposed/|xposed_init";
795 | then
796 | localBCount=$(expr ${localBCount} + 1)
797 | classificationB="$(echo -e -n "${classificationB}\n${packageName}")"
798 | echo -n "[${localBCount}] Found the string \"/xposed/\" or \"xposed_init\" in \`\`${packageName}\`\`, which was not in and has been added to Classification \$B\$. "
799 | fi
800 | fi
801 | else
802 | echo "- Failed to resolve the APK file \"${item}\". "
803 | fi
804 | else
805 | echo "- A file that should not exist was found at \"${item}\". "
806 | fi
807 | fi
808 | done
809 | if [[ ${folderCount} -gt 0 ]] && [[ ${fileCount} -gt 0 ]];
810 | then
811 | echo "A mixture of folders and files was detected in the \"${dataAppFolder}\" directory. "
812 | fi
813 | if [[ ${failureInstallationCount} -ge 1 ]];
814 | then
815 | echo "Found ${failureInstallationCount} failure installation(s) in the \"${dataAppFolder}\" directory with ${failureInstallationRemovedCount} removed successfully. "
816 | fi
817 | if [[ ${localBCount} -ge 1 ]];
818 | then
819 | echo "Successfully fetched ${localBCount} package name(s) of Classification \$B\$ from the local machine. "
820 | echo "Kindly report the package name(s) with the corresponding classification(s) to \"${reportLink}\" if you wish to. "
821 | fi
822 | originalLengthB=${lengthB}
823 | classificationB=$(echo -n "${classificationB}" | sort | uniq)
824 | if [[ -n "${classificationB}" ]];
825 | then
826 | lengthB=$(echo "${classificationB}" | wc -l)
827 | else
828 | lengthB=0
829 | fi
830 | echo "Successfully fetched ${lengthB} package name(s) of Classification \$B\$ from the library (${originalLengthB}) and the local machine (${localBCount}). "
831 | oldConfigurationFolderCount=0
832 | removedOldConfigurationFolderCount=0
833 | echo "Removing old HMA(L) configuration directories. "
834 | for oldPath in $(find "${largerOldScanningScope}" -type d -and \( -name "*h_m_a_l*" -or -name "*hma*" -or -name "*hma1*" -or -name "hmal*" \))
835 | do
836 | if [[ -e "${oldPath}/config.json" && -d "${oldPath}/log" ]];
837 | then
838 | oldConfigurationFolderCount=$(expr ${oldConfigurationFolderCount} + 1)
839 | if rm -rf "${oldPath}";
840 | then
841 | removedOldConfigurationFolderCount=$(expr ${removedOldConfigurationFolderCount} + 1)
842 | echo "[${removedOldConfigurationFolderCount}/${oldConfigurationFolderCount}] Successfully removed \"${oldPath}\" (L). "
843 | else
844 | echo "[${removedOldConfigurationFolderCount}/${oldConfigurationFolderCount}] Failed to remove \"${oldPath}\" (L). "
845 | fi
846 | fi
847 | done
848 | for oldPath in $(find "${smallerOldScanningScope}" -mindepth 2 -type d -and \( -name "*h_m_a_l*" -or -name "*hma*" -or -name "*hma1*" -or -name "hmal*" \))
849 | do
850 | if [[ -z "$(ls -A "${oldPath}")" ]];
851 | then
852 | oldConfigurationFolderCount=$(expr ${oldConfigurationFolderCount} + 1)
853 | if rm -rf "${oldPath}";
854 | then
855 | removedOldConfigurationFolderCount=$(expr ${removedOldConfigurationFolderCount} + 1)
856 | echo "[${removedOldConfigurationFolderCount}/${oldConfigurationFolderCount}] Successfully removed \"${oldPath}\" (S). "
857 | else
858 | echo "[${removedOldConfigurationFolderCount}/${oldConfigurationFolderCount}] Failed to remove \"${oldPath}\" (S). "
859 | fi
860 | fi
861 | done
862 | if [[ ${oldConfigurationFolderCount} -ge 2 ]];
863 | then
864 | echo "Found ${oldConfigurationFolderCount} old HMA(L) configuration directories in the \"${largerOldScanningScope}\" directory, with ${removedOldConfigurationFolderCount} removed successfully. "
865 | elif [[ ${oldConfigurationFolderCount} -eq 1 ]];
866 | then
867 | echo "Found 1 old HMA(L) configuration directory in the \"${largerOldScanningScope}\" directory, with ${removedOldConfigurationFolderCount} removed successfully. "
868 | else
869 | echo "No old HMA(L) configuration folders were found. "
870 | fi
871 | fi
872 | else
873 | classificationB=""
874 | lengthB=0
875 | echo "Failed to fetch package names of Classification \$B\$ from the library. "
876 | fi
877 | if [[ ${returnCodeC} -eq ${EXIT_SUCCESS} ]];
878 | then
879 | echo "Successfully fetched ${lengthC} package name(s) of Classification \$C\$ from the library. "
880 | else
881 | classificationC=""
882 | lengthC=0
883 | echo "Failed to fetch package names of Classification \$C\$ from the library. "
884 | fi
885 | if [[ ${returnCodeD} -eq ${EXIT_SUCCESS} ]];
886 | then
887 | localDCount=0
888 | for packageName in $(pm list packages -3 | cut -d ':' -f2)
889 | do
890 | if ! echo -e -n "${classificationB}\n${classificationC}\n${classificationD}" | grep -qF "${packageName}";
891 | then
892 | localDCount=$(expr ${localDCount} + 1)
893 | classificationD="$(echo -e -n "${classificationD}\n${packageName}")"
894 | fi
895 | done
896 | originalLengthD=${lengthD}
897 | classificationD=$(echo -n "${classificationD}" | sort | uniq)
898 | if [[ -n "${classificationD}" ]];
899 | then
900 | lengthD=$(echo "${classificationD}" | wc -l)
901 | else
902 | lengthD=0
903 | fi
904 | echo "Successfully fetched ${lengthD} package name(s) of Classification \$D\$ from the library (${originalLengthD}) and the local machine (${localDCount}). "
905 | else
906 | classificationD=""
907 | lengthD=0
908 | echo "Failed to fetch package names of Classification \$D\$ from the library. "
909 | fi
910 | if [[ ${returnCodeB} -eq ${EXIT_SUCCESS} ]];
911 | then
912 | blacklistAppList="$(getArray "${classificationB}")"
913 | whitelistScopeList="$(getWhitelistScopeString "${classificationC}" "${classificationD}")"
914 | else
915 | blacklistAppList=""
916 | whitelistScopeList=""
917 | fi
918 | if [[ ${returnCodeD} -eq ${EXIT_SUCCESS} ]];
919 | then
920 | whitelistAppList=$(getArray "${classificationD}")
921 | if [[ ${returnCodeC} -eq ${EXIT_SUCCESS} ]];
922 | then
923 | blacklistScopeListC="$(getBlacklistScopeStringC "${classificationC}")"
924 | blacklistScopeListD="$(getBlacklistScopeStringD "${classificationD}" "${classificationC}")"
925 | if [[ -z "${blacklistScopeListC}" ]];
926 | then
927 | blacklistScopeList="${blacklistScopeListD}"
928 | else
929 | blacklistScopeList="${blacklistScopeListC},${blacklistScopeListD}"
930 | fi
931 | else
932 | blacklistScopeList=""
933 | fi
934 | else
935 | whitelistAppList=""
936 | blacklistScopeList=""
937 | fi
938 | commonConfigContent="{\"configVersion\":92,\"detailLog\":true,\"maxLogSize\":1024,\"forceMountData\":true,\"aggressiveFilter\":true,\"templates\":{\"${blacklistName}\":{\"isWhitelist\":false,\"appList\":[${blacklistAppList}]},\"${whitelistName}\":{\"isWhitelist\":true,\"appList\":[${whitelistAppList}]}},"
939 | blacklistConfigContent="${commonConfigContent}\"scope\":{${blacklistScopeList}}}"
940 | whitelistConfigContent="${commonConfigContent}\"scope\":{${whitelistScopeList}}}"
941 | mkdir -p "${downloadFolderPath}"
942 | if [[ $? -eq ${EXIT_SUCCESS} && -d "${downloadFolderPath}" ]];
943 | then
944 | echo "Successfully prepared the folder \"${downloadFolderPath}\". "
945 | echo -n "${blacklistConfigContent}" > "${blacklistConfigurationFilePath}"
946 | if [[ $? -eq ${EXIT_SUCCESS} && -f "${blacklistConfigurationFilePath}" ]];
947 | then
948 | echo "Successfully generated the configuration file \"${blacklistConfigurationFilePath}\". "
949 | else
950 | exitCode=$(expr ${exitCode} \| 4)
951 | echo "Failed to generate the configuration file \"${blacklistConfigurationFilePath}\". "
952 | fi
953 | echo -n "${whitelistConfigContent}" > "${whitelistConfigurationFilePath}"
954 | if [[ $? -eq ${EXIT_SUCCESS} && -f "${whitelistConfigurationFilePath}" ]];
955 | then
956 | echo "Successfully generated the configuration file \"${whitelistConfigurationFilePath}\". "
957 | else
958 | exitCode=$(expr ${exitCode} \| 4)
959 | echo "Failed to generate the configuration file \"${whitelistConfigurationFilePath}\". "
960 | fi
961 | else
962 | exitCode=$(expr ${exitCode} \| 4)
963 | echo "Failed to prepare the folder \"${downloadFolderPath}\". "
964 | fi
965 | if [[ -z "${blacklistAppList}" || -z "${blacklistScopeList}" || -z "${whitelistAppList}" || -z "${whitelistScopeList}" ]];
966 | then
967 | echo "At least one list was empty. Please check the configurations generated before importing. "
968 | fi
969 | echo ""
970 |
971 | # Tricky Store (0b00X000) #
972 | echo "# Tricky Store (0b00X000) #"
973 | readonly trickyStoreModuleId="tricky_store"
974 | readonly trickyStoreConfigurationFolderPath="${adbFolder}/tricky_store"
975 | readonly trickyStoreTargetFileName="target.txt"
976 | readonly trickyStoreSecurityPatchFileName="security_patch.txt"
977 | readonly trickyStoreTargetFilePath="${trickyStoreConfigurationFolderPath}/${trickyStoreTargetFileName}"
978 | readonly trickyStoreSecurityPatchFilePath="${trickyStoreConfigurationFolderPath}/${trickyStoreSecurityPatchFileName}"
979 | readonly classificationS="$(echo -e -n "com.google.android.gsf\ncom.google.android.gms\ncom.android.vending")"
980 | readonly lengthS=$(echo "${classificationS}" | wc -l)
981 |
982 | if isModuleInstalled "${trickyStoreModuleId}" > /dev/null;
983 | then
984 | echo "The Tricky Store module was installed. "
985 | if [[ -d "${trickyStoreConfigurationFolderPath}" ]];
986 | then
987 | echo "The Tricky Store configuration folder was found at \"${trickyStoreConfigurationFolderPath}\". "
988 | if [[ -f "${trickyStoreSecurityPatchFilePath}" ]];
989 | then
990 | echo "Found security patch file at \"${trickyStoreSecurityPatchFilePath}\". "
991 | if mv "${trickyStoreSecurityPatchFilePath}" "${trickyStoreSecurityPatchFilePath}.bak";
992 | then
993 | echo "Successfully removed \"${trickyStoreSecurityPatchFilePath}\" by renaming to \`\`${trickyStoreSecurityPatchFileName}.bak\`\`. "
994 | else
995 | exitCode=$(expr ${exitCode} \| 8)
996 | echo "Failed to remove \"${trickyStoreSecurityPatchFilePath}\" by renaming to \`\`${trickyStoreSecurityPatchFileName}.bak\`\`. "
997 | fi
998 | fi
999 | abortFlag=${EXIT_SUCCESS}
1000 | if [[ -f "${trickyStoreTargetFilePath}" ]];
1001 | then
1002 | echo "The Tricky Store target file was found at \"${trickyStoreTargetFilePath}\". "
1003 | cp -fp "${trickyStoreTargetFilePath}" "${trickyStoreTargetFilePath}.bak"
1004 | if [[ $? -eq ${EXIT_SUCCESS} && -f "${trickyStoreTargetFilePath}.bak" ]];
1005 | then
1006 | echo "Successfully copied \"${trickyStoreTargetFilePath}\" to \"${trickyStoreTargetFilePath}.bak\". "
1007 | else
1008 | abortFlag=${EXIT_FAILURE}
1009 | echo "Failed to copy \"${trickyStoreTargetFilePath}\" to \"${trickyStoreTargetFilePath}.bak\". "
1010 | fi
1011 | else
1012 | echo "The copying has been skipped since no Tricky Store target files were detected. "
1013 | fi
1014 | if [[ ${EXIT_SUCCESS} -eq ${abortFlag} ]];
1015 | then
1016 | lines="${classificationS}"
1017 | if [[ -n "${classificationB}" ]];
1018 | then
1019 | lines="$(echo -e -n "${lines}\n$(echo -n "${classificationB}")")"
1020 | fi
1021 | if [[ -n "${classificationC}" ]];
1022 | then
1023 | lines="$(echo -e -n "${lines}\n$(echo -n "${classificationC}")")"
1024 | fi
1025 | if [[ -n "${classificationD}" ]];
1026 | then
1027 | lines="$(echo -e -n "${lines}\n$(echo -n "${classificationD}")")"
1028 | fi
1029 | classificationL="$(pm list packages | cut -d ':' -f 2)"
1030 | if [[ -n "${classificationL}" ]];
1031 | then
1032 | lengthL=$(echo "${classificationL}" | wc -l)
1033 | echo "Successfully fetched ${lengthL} package name(s) from the local machine. "
1034 | else
1035 | lengthL=0
1036 | echo "No package names were fetched from the local machine. "
1037 | fi
1038 | if [[ -n "${classificationL}" ]];
1039 | then
1040 | lines="$(echo -e -n "${lines}\n$(echo -n "${classificationL}")")"
1041 | fi
1042 | lines=$(echo -n "${lines}" | sort | uniq)
1043 | echo "${lines}" > "${trickyStoreTargetFilePath}"
1044 | if [[ $? -eq ${EXIT_SUCCESS} && -f "${trickyStoreTargetFilePath}" ]];
1045 | then
1046 | cnt=$(cat "${trickyStoreTargetFilePath}" | wc -l)
1047 | echo "Successfully wrote ${cnt} target(s) to \"${trickyStoreTargetFilePath}\". "
1048 | expectedCount=$(expr ${lengthS} + ${lengthB} + ${lengthC} + ${lengthD} + ${lengthL})
1049 | if [[ ${cnt} -le ${expectedCount} ]];
1050 | then
1051 | echo "Successfully verified \"${trickyStoreTargetFilePath}\" (${cnt} <= ${expectedCount} = ${lengthS} + ${lengthB} + ${lengthC} + ${lengthD} + ${lengthL}). "
1052 | else
1053 | exitCode=$(expr ${exitCode} \| 8)
1054 | echo "Failed to verify \"${trickyStoreTargetFilePath}\" (${cnt} > ${expectedCount} = ${lengthS} + ${lengthB} + ${lengthC} + ${lengthD} + ${lengthL}). "
1055 | fi
1056 | else
1057 | exitCode=$(expr ${exitCode} \| 8)
1058 | echo "Failed to write to \"${trickyStoreTargetFilePath}\". "
1059 | fi
1060 | fi
1061 | else
1062 | echo "No Tricky Store configuration folders were detected. "
1063 | fi
1064 | else
1065 | echo "The Tricky Store module was not installed. "
1066 | fi
1067 | echo ""
1068 |
1069 | # Shell (0b0X0000) #
1070 | echo "# Shell (0b0X0000) #"
1071 | readonly sensitiveApplications="com.google.android.safetycore com.google.android.contactkeys"
1072 | readonly policiesToBeDeleted="hidden_api_policy hidden_api_policy_p_apps hidden_api_policy_pre_p_apps hidden_api_blacklist_exemptions"
1073 | readonly propertiesToBeSet="ro.boot.vbmeta.device_state:locked ro.boot.verifiedbootstate:green vendor.boot.secboot:enabled"
1074 | readonly propertiesToExist="ro.boot.vbmeta.avb_version ro.boot.vbmeta.hash_alg ro.boot.vbmeta.size ro.boot.vbmeta.digest"
1075 | readonly propertiesToBeDeleted="persist.sys.vold_app_data_isolation_enabled persist.zygote.app_data_isolation ro.oem_unlock_supported"
1076 | readonly persistentPropertyFilePath="/data/property/persistent_properties"
1077 | readonly directoryForTesting="/data/data/com.android.settings"
1078 | readonly plainUserExecution="$(echo -e "if [[ -n \"\${EXTERNAL_STORAGE}\" ]];\n\
1079 | then\n\
1080 | readonly folders=\"/data/data /data/user/0 /data/user_de/0 \${EXTERNAL_STORAGE}/Android/data\"\n\
1081 | readonly wxDownloadFolderPath=\"\${EXTERNAL_STORAGE}/Download/WechatXposed\"\n\
1082 | else\n\
1083 | readonly folders=\"/data/data /data/user/0 /data/user_de/0 /sdcard/Android/data\"\n\
1084 | readonly wxDownloadFolderPath=\"/sdcard/Download/WechatXposed\"\n\
1085 | fi\n\
1086 | for packageName in \$(cat \"${classificationFolderPath}/classificationB.txt\")\n\
1087 | do\n\
1088 | for folder in \${folders}\n\
1089 | do\n\
1090 | leakedPath=\"\${folder}/\${packageName}\"
1091 | if [[ -e \"\${leakedPath}\" ]];\n\
1092 | then\n\
1093 | echo \"- Found \\\"\${leakedPath}\\\" (Classification \\\$B\\\$). \"\n\
1094 | fi\n\
1095 | done\n\
1096 | done\n\
1097 | for packageName in \$(cat \"${classificationFolderPath}/classificationC.txt\")\n\
1098 | do\n\
1099 | for folder in \${folders}\n\
1100 | do\n\
1101 | leakedPath=\"\${folder}/\${packageName}\"
1102 | if [[ -e \"\${leakedPath}\" ]];\n\
1103 | then\n\
1104 | echo \"- Found \\\"\${leakedPath}\\\" (Classification \\\$C\\\$). \"\n\
1105 | fi\n\
1106 | done\n\
1107 | done\n\
1108 | test -e \"\${wxDownloadFolderPath}\" && echo \"- Found \\\"\${wxDownloadFolderPath}\\\". ")"
1109 | readonly bannedSubStrings="-AICP -arter97 -blu_spark -CAF -cm- -crDroid -crdroid -CyanogenMod -Deathly -EAS- -eas- -ElementalX -Elite -franco -hadesKernel -Lineage- -lineage- -LineageOS -lineageos -mokee -MoRoKernel -Noble -Optimus -SlimRoms -Sultan -sultan"
1110 | readonly sourceXmlFilePath="/etc/compatconfig/services-platform-compat-config.xml"
1111 | readonly replacementEntry="system"
1112 | readonly targetXmlFilePath="${replacementEntry}${sourceXmlFilePath}"
1113 |
1114 | echo "The sensitive applications are being handled. "
1115 | sensitiveApplicationCount=0
1116 | disabledSensitiveApplicationCount=0
1117 | packageList="$(pm list packages)"
1118 | for sensitiveApplication in ${sensitiveApplications}
1119 | do
1120 | if echo "${packageList}" | grep -qF "${sensitiveApplication}";
1121 | then
1122 | sensitiveApplicationCount=$(expr ${sensitiveApplicationCount} + 1)
1123 | if pm disable "${sensitiveApplication}" &> /dev/null;
1124 | then
1125 | disabledSensitiveApplicationCount=$(expr ${disabledSensitiveApplicationCount} + 1)
1126 | echo "- The sensitive application \"${sensitiveApplication}\" was detected, which has been disabled. "
1127 | else
1128 | exitCode=$(expr ${exitCode} \| 16)
1129 | echo "- The sensitive application \"${sensitiveApplication}\" was detected, which failed to be disabled. "
1130 | fi
1131 | fi
1132 | done
1133 | if [[ ${sensitiveApplicationCount} -ge 1 ]];
1134 | then
1135 | echo "Successfully disabled ${disabledSensitiveApplicationCount} / ${sensitiveApplicationCount} sensitive application(s). "
1136 | else
1137 | echo "No sensitive applications were found. "
1138 | fi
1139 | echo "The policies are being handled. "
1140 | for policyToBeDeleted in ${policiesToBeDeleted}
1141 | do
1142 | executionContent="$(settings delete global ${policyToBeDeleted})"
1143 | if [[ $? -eq ${EXIT_SUCCESS} && "${executionContent}" == "Deleted 0 rows" ]];
1144 | then
1145 | echo "- The execution of \`\`settings delete global ${policyToBeDeleted}\`\` succeeded. "
1146 | else
1147 | exitCode=$(expr ${exitCode} \| 16)
1148 | echo "- The execution of \`\`settings delete global ${policyToBeDeleted}\`\` failed. "
1149 | fi
1150 | done
1151 | echo "The properties are being handled. "
1152 | for propertyKeyValue in ${propertiesToBeSet}
1153 | do
1154 | propertyKey="$(echo "${propertyKeyValue}" | cut -d ':' -f1)"
1155 | propertyValue="$(echo "${propertyKeyValue}" | cut -d ':' -f2)"
1156 | executionContent="$(getprop "${propertyKey}")"
1157 | if [[ $? -eq ${EXIT_SUCCESS} && "${executionContent}" == "${propertyValue}" ]];
1158 | then
1159 | echo "- The value of \`\`${propertyKey}\`\` was \"${executionContent}\", which was proper. "
1160 | else
1161 | resetprop "${propertyKey}" "${propertyValue}"
1162 | if [[ $? -eq ${EXIT_SUCCESS} && "$(getprop "${propertyKey}")" == "${propertyValue}" ]];
1163 | then
1164 | echo "- The value of \`\`${propertyKey}\`\` was \"${executionContent}\", which should be and successfully set to \"${propertyValue}\". "
1165 | else
1166 | echo "- The value of \`\`${propertyKey}\`\` was \"${executionContent}\", which should be but failed to set to \"${propertyValue}\". "
1167 | exitCode=$(expr ${exitCode} \| 16)
1168 | fi
1169 | fi
1170 | done
1171 | propertyToExistFlag=${EXIT_SUCCESS}
1172 | for propertyToExist in ${propertiesToExist}
1173 | do
1174 | if [[ -n "$(getprop "${propertyToExist}")" ]];
1175 | then
1176 | echo "- The property \"${propertyToExist}\" existed and its value was not empty, which was normal. "
1177 | else
1178 | propertyToExistFlag=${EXIT_FAILURE}
1179 | echo "- The property \"${propertyToExist}\" did not exist or its value was empty, which was abnormal. "
1180 | fi
1181 | done
1182 | for propertyToBeDeleted in ${propertiesToBeDeleted}
1183 | do
1184 | resetprop --delete "${propertyToBeDeleted}"
1185 | if [[ $? -eq ${EXIT_SUCCESS} || $? -eq 255 ]];
1186 | then
1187 | echo "- The execution of \`\`resetprop --delete \"${propertyToBeDeleted}\"\`\` succeeded. "
1188 | else
1189 | echo "- The execution of \`\`resetprop --delete \"${propertyToBeDeleted}\"\`\` failed. "
1190 | exitCode=$(expr ${exitCode} \| 16)
1191 | fi
1192 | done
1193 | if [[ -f "${persistentPropertyFilePath}" ]];
1194 | then
1195 | sed -i '/persist\.sys\.vold_app_data_isolation_enabled/d; /persist\.zygote\.app_data_isolation/d' "${persistentPropertyFilePath}"
1196 | if [[ $? -eq ${EXIT_SUCCESS} ]];
1197 | then
1198 | echo "- Successfully removed persistent property traces from \"${persistentPropertyFilePath}\". "
1199 | else
1200 | echo "- Failed to remove persistent property traces from \"${persistentPropertyFilePath}\". "
1201 | fi
1202 | else
1203 | echo "- The persistent property file \"${persistentPropertyFilePath}\" did not exist. "
1204 | fi
1205 | if [[ ${propertyToExistFlag} -eq ${EXIT_FAILURE} ]];
1206 | then
1207 | if [[ "${KSU}" == "true" || "${APATCH}" == "true" ]];
1208 | then
1209 | echo "Missing properties, please install the latest [VBMeta Fixer](https://github.com/reveny/Android-VBMeta-Fixer) module as a system module. "
1210 | else
1211 | echo "Missing properties, please install the latest [VBMeta Fixer](https://github.com/reveny/Android-VBMeta-Fixer) module. "
1212 | fi
1213 | fi
1214 | if [[ "$(getenforce)" == "Enforcing" ]];
1215 | then
1216 | echo "SELinux is already Enforcing. "
1217 | else
1218 | setenforce enforcing
1219 | if [[ $? -eq ${EXIT_SUCCESS} && "$(getenforce)" == "Enforcing" ]];
1220 | then
1221 | echo "SELinux was not Enforcing, which has been set to Enforcing. "
1222 | else
1223 | echo "SELinux is not Enforcing and cannot be set to Enforcing. "
1224 | fi
1225 | fi
1226 | #su -Z u:r:untrusted_app:s0 shell -c "test -e \"${directoryForTesting}\""
1227 | returnCode=${EOF}
1228 | if [[ ${returnCode} -eq ${EXIT_SUCCESS} || ${returnCode} -eq ${EOF} ]];
1229 | then
1230 | echo "Skipped checking the existence of applications in Classifications \$B\$ and \$C\$ that are leaked by the specified folders as a non-root user due to the unsupported environments. "
1231 | else
1232 | echo "Checking the existence of applications in Classifications \$B\$ and \$C\$ leaked by the specified folders as a non-root user. "
1233 | plainUserContent="$(su -Z u:r:untrusted_app:s0 shell -c "${plainUserExecution}")"
1234 | if [[ $? -eq ${EOF} ]];
1235 | then
1236 | echo "Could not check the existence of applications in Classifications \$B\$ and \$C\$ that are leaked by the specified folders as a non-root user due to the EOF signal. "
1237 | else
1238 | echo "${plainUserContent}"
1239 | if [[ -n "${plainUserContent}" ]];
1240 | then
1241 | echo "Found $(echo "${plainUserContent}" | wc -l) issue(s) during checking the existence of applications in Classifications \$B\$ and \$C\$ leaked by the specified folders as a plain user. "
1242 | else
1243 | echo "Congratulations on no applications in Classifications \$B\$ and \$C\$ leaked by the specified folders. "
1244 | fi
1245 | fi
1246 | fi
1247 | bannedSubStringFoundFlag=${EXIT_SUCCESS}
1248 | kernelVersion="$(uname -r)"
1249 | for bannedSubString in ${bannedSubStrings}
1250 | do
1251 | if [[ "${kernelVersion}" == *"${bannedSubString}"* ]];
1252 | then
1253 | bannedSubStringFoundFlag=${EXIT_FAILURE}
1254 | echo "Found the banned substring \"${bannedSubString}\" in the kernel version \"${kernelVersion}\". "
1255 | break
1256 | fi
1257 | done
1258 | if [[ ${bannedSubStringFoundFlag} -eq ${EXIT_SUCCESS} ]];
1259 | then
1260 | echo "No banned substrings were found in the kernel version \"${kernelVersion}\". "
1261 | fi
1262 | if [[ -s "${sourceXmlFilePath}" ]];
1263 | then
1264 | if grep -qF 'enableAfterTargetSdk="0" id="143937733"' "${sourceXmlFilePath}";
1265 | then
1266 | echo "The current \"${sourceXmlFilePath}\" is already a replaced one. "
1267 | else
1268 | echo "Generating replacement, the \"${sourceXmlFilePath}\" will be replaced after the device reboots. "
1269 | targetXmlFolderPath="$(dirname "${targetXmlFilePath}")"
1270 | if mkdir -p "${targetXmlFolderPath}";
1271 | then
1272 | echo "Successfully created the folder \"${targetXmlFolderPath}\". "
1273 | toBeWritten=$(sed -E 's/(enableAfterTargetSdk=")[0-9]+(" id="143937733")/\10\2/g' "${sourceXmlFilePath}")
1274 | echo -n "${toBeWritten}" > "${targetXmlFilePath}"
1275 | if [[ $? -eq ${EXIT_SUCCESS} && -f "${targetXmlFilePath}" ]];
1276 | then
1277 | echo "Successfully generated \"${targetXmlFilePath}\". "
1278 | else
1279 | exitCode=$(expr ${exitCode} \| 16)
1280 | echo "Failed to generate \"${targetXmlFilePath}\". "
1281 | fi
1282 | else
1283 | exitCode=$(expr ${exitCode} \| 16)
1284 | echo "Failed to create the folder \"${targetXmlFolderPath}\". "
1285 | fi
1286 | fi
1287 | else
1288 | echo "The \"${sourceXmlFilePath}\" did not exist or was found to be empty. "
1289 | rm -rf "${replacementEntry}" && mkdir -p "${replacementEntry}"
1290 | if [[ $? -eq ${EXIT_SUCCESS} && -d "${replacementEntry}" ]];
1291 | then
1292 | echo "Successfully removed replacement in this module. "
1293 | else
1294 | echo "Failed to remove replacement in this module. "
1295 | fi
1296 | fi
1297 | androidVersion=$(getprop ro.build.version.release)
1298 | if [[ ${androidVersion} -ge 10 ]];
1299 | then
1300 | settings put global show_hidden_icon_apps_enabled 0
1301 | if [[ $? -eq ${EXIT_SUCCESS} ]];
1302 | then
1303 | echo "Successfully enabled the feature of hiding desktop icons (Android ${androidVersion}). "
1304 | else
1305 | echo "Failed to enable the feature of hiding desktop icons (Android ${androidVersion}). "
1306 | fi
1307 | fi
1308 | echo ""
1309 |
1310 | # Update (0bX00000) #
1311 | echo "# Update (0bX00000) #"
1312 | readonly actionPropFileName="action.prop"
1313 | readonly actionPropFilePath="${webrootFolderPath}/${actionPropFileName}"
1314 | readonly currentAB="A"
1315 | readonly targetAB="B"
1316 | readonly targetAction="action${targetAB}.sh"
1317 | readonly actionUrl="https://raw.githubusercontent.com/LRFP-Team/Bypasser/main/src/${targetAction}"
1318 | readonly actionDigestUrl="https://raw.githubusercontent.com/LRFP-Team/Bypasser/main/src/${targetAction}.sha512"
1319 |
1320 | shellDigest="$(curl -s "${actionDigestUrl}")"
1321 | if [[ $? -eq ${EXIT_SUCCESS} && -n "${shellDigest}" ]];
1322 | then
1323 | echo "Successfully fetched the SHA-512 value of the latest \`\`${targetAction}\`\` from GitHub. "
1324 | if [[ -f "${targetAction}" && "$(sha512sum "${targetAction}" | cut -d " " -f1)" == "${shellDigest}" ]];
1325 | then
1326 | echo "The target action \`\`${targetAction}\`\` is already up-to-date. "
1327 | if [[ -f "${actionPropFilePath}" && "$(cat "${actionPropFilePath}")" == "${currentAB}" ]];
1328 | then
1329 | echo "The action slot remained ${currentAB}. "
1330 | else
1331 | echo "The action slot seemed inconsistent with the actual one. "
1332 | rm -f "${actionPropFilePath}" && echo -n "${currentAB}" > "${actionPropFilePath}"
1333 | if [[ $? -eq ${EXIT_SUCCESS} && -f "${actionPropFilePath}" ]];
1334 | then
1335 | echo "Successfully synchronized the actual action slot to \"${actionPropFilePath}\". "
1336 | else
1337 | exitCode=$(expr ${exitCode} \| 32)
1338 | echo "Failed to synchronize the actual action slot to \"${actionPropFilePath}\". "
1339 | fi
1340 | fi
1341 | else
1342 | echo "The target action \`\`${targetAction}\`\` is out-of-date and needs to be updated. "
1343 | shellContent="$(curl -s "${actionUrl}")"
1344 | if [[ $? -eq ${EXIT_SUCCESS} && -n "${shellContent}" ]];
1345 | then
1346 | echo "Successfully fetched the latest \`\`${targetAction}\`\` from GitHub. "
1347 | if [[ "$(echo "${shellContent}" | sha512sum | cut -d " " -f1)" == "${shellDigest}" ]];
1348 | then
1349 | echo "Successfully verified the latest \`\`${targetAction}\`\`. "
1350 | if echo "${shellContent}" | sh -n;
1351 | then
1352 | echo "The latest \`\`${targetAction}\`\` successfully passed the local shell syntax check (sh). "
1353 | rm -f "${targetAction}"
1354 | echo "${shellContent}" > "${targetAction}"
1355 | if [[ $? -eq ${EXIT_SUCCESS} && -f "${targetAction}" ]];
1356 | then
1357 | echo "Successfully updated \`\`${targetAction}\`\`. "
1358 | rm -f "${actionPropFilePath}" && echo -n "${targetAB}" > "${actionPropFilePath}"
1359 | if [[ $? -eq ${EXIT_SUCCESS} && -f "${actionPropFilePath}" ]];
1360 | then
1361 | echo "Successfully switched the action slot to ${targetAB} in \"${actionPropFilePath}\". "
1362 | else
1363 | exitCode=$(expr ${exitCode} \| 32)
1364 | echo "Failed to switch the action slot to ${targetAB} in \"${actionPropFilePath}\". "
1365 | fi
1366 | else
1367 | exitCode=$(expr ${exitCode} \| 32)
1368 | echo "Failed to update \`\`${targetAction}\`\`. "
1369 | fi
1370 | else
1371 | exitCode=$(expr ${exitCode} \| 32)
1372 | echo "The latest \`\`${targetAction}\`\` failed to pass the local shell syntax check (sh). "
1373 | fi
1374 | else
1375 | exitCode=$(expr ${exitCode} \| 32)
1376 | echo "Failed to verify the latest \`\`${targetAction}\`\`. "
1377 | fi
1378 | else
1379 | exitCode=$(expr ${exitCode} \| 32)
1380 | echo "Failed to fetch the latest \`\`${targetAction}\`\` from GitHub. "
1381 | fi
1382 | fi
1383 | else
1384 | exitCode=$(expr ${exitCode} \| 32)
1385 | echo "Failed to fetch the SHA-512 value of the latest \`\`${targetAction}\`\` from GitHub. "
1386 | fi
1387 | echo ""
1388 |
1389 | # Exit #
1390 | readonly endTime=$(date +%s%N)
1391 | readonly timeDelta=$(expr ${endTime} - ${startTime} - ${gapTime})
1392 |
1393 | if [[ ${EXIT_SUCCESS} -eq $(expr ${exitCode} \& ${EXIT_FAILURE}) ]];
1394 | then
1395 | setPermissions && chmod 755 "${actionFolderPath}"
1396 | if [[ $? -eq ${EXIT_SUCCESS} ]];
1397 | then
1398 | echo "Successfully set permissions. "
1399 | else
1400 | exitCode=$(expr ${exitCode} \| ${EXIT_FAILURE})
1401 | echo "Failed to set permissions. "
1402 | fi
1403 | fi
1404 | clearCaches
1405 | if [[ $? -eq ${EXIT_SUCCESS} ]];
1406 | then
1407 | echo "Successfully cleared caches. "
1408 | else
1409 | exitCode=$(expr ${exitCode} \| ${EXIT_FAILURE})
1410 | echo "Failed to clear caches. "
1411 | fi
1412 | echo "Finished executing the \`\`action.sh\`\` in $(expr ${timeDelta} / 1000000000).$(expr ${timeDelta} % 1000000000) second(s) (${exitCode}). "
1413 | exit ${exitCode}
1414 |
--------------------------------------------------------------------------------