1282960dbf
commit 7d4155e4463eeadfe83a9475d69bca3de9000bcd Author: RikkaW <rikka@shizuku.moe> Date: Mon Jul 19 09:27:29 2021 +0800 Fix push task commit e76aa44cfb7c48ba6b875423d4cd6e175afd190c Author: RikkaW <rikka@shizuku.moe> Date: Mon Jul 19 00:06:20 2021 +0800 Update README commit 8fc3c0675e206380214b400f325f48c87bc2cd2c Author: RikkaW <rikka@shizuku.moe> Date: Sun Jul 18 17:14:18 2021 +0800 Changes for Riru v26 commit 8cf6eec5282c286c5b517bca6d102ba068617c95 Author: RikkaW <rikka@shizuku.moe> Date: Sat Jul 17 12:14:17 2021 +0800 Remove more pre-24 support commit 254ebfe8a7420aeb83e462cf4a4eb8aefd344bcf Author: RikkaW <rikka@shizuku.moe> Date: Sat Jul 17 11:28:31 2021 +0800 Add GitHub Actions commit a4840a9f53b6187789e8fdcd07379d1dff86db61 Author: RikkaW <rikka@shizuku.moe> Date: Sat Jul 17 11:24:14 2021 +0800 Strip .comment section commit 9faec484a8c3d516dd92d8d52c06c09033675a94 Author: RikkaW <rikka@shizuku.moe> Date: Sat Jul 17 11:21:34 2021 +0800 Use CMake configure_file commit 944fe620911af2c6dd5ec98a4a4c36ed3339627e Author: RikkaW <rikka@shizuku.moe> Date: Sat Jul 17 11:12:36 2021 +0800 Remove pre-24 support since next major version of Riru will do this as well commit af0c7759c2a2ab6d01b7e19ed7159dc7afdd8b1e Author: RikkaW <rikka@shizuku.moe> Date: Sat Jul 17 11:02:40 2021 +0800 Cleanup gradle codes commit e2a4ddabcd7ece769205c85c0c9f2e0017d0eb9a Author: Howard Wu <40033067+Howard20181@users.noreply.github.com> Date: Sat Jul 17 11:02:20 2021 +0800 Update update-binary & Fix typo (#10) * Update update-binary * Fix typo commit 3d3f92a4f561433cf2dc8f7188d1f6618e195b83 Author: RikkaW <rikka@shizuku.moe> Date: Fri May 21 18:42:05 2021 +0800 Refuse to install if Riru is disabled or will be removed commit f7e2af8cdf7b864e0cf47be727c466c4bef5c214 Author: RikkaW <rikka@shizuku.moe> Date: Fri May 21 18:22:20 2021 +0800 Fix check Riru commit 36b82ca3b5ee4b975a755b27461f634d933b73b6 Author: Rikka <rikka@shizuku.moe> Date: Fri Apr 16 13:00:06 2021 +0800 Fix typo commit 73c7588f75c9566bd43ebb830e5be4b7ef062bc5 Author: RikkaW <rikka@shizuku.moe> Date: Fri Apr 2 17:28:37 2021 +0800 Add note for module id commit a701bc9c2c7a2c2a220aa4a6cec2474011387882 Author: RikkaW <rikka@shizuku.moe> Date: Tue Mar 30 11:49:25 2021 +0800 Add empty new line to scripts commit ce576cc23ab16ad22182b7fb708407f9712e758f Author: RikkaW <rikka@shizuku.moe> Date: Mon Mar 29 20:40:26 2021 +0800 Update CMakeLists.txt commit b4b1ec5b3231cef7a0a46b93f10a9aa4c6195eac Author: RikkaW <rikka@shizuku.moe> Date: Mon Mar 29 11:41:41 2021 +0800 Change "equals to Release" to "not equals to Debug" since the latest canary AGP has different build type commit c6cacf4c13184fb8539ce4b52751373ed7f09687 Author: RikkaW <rikka@shizuku.moe> Date: Mon Mar 29 10:47:08 2021 +0800 Update tasks commit 78013af879c1515e681f69b639198f021b7f003e Author: RikkaW <rikka@shizuku.moe> Date: Mon Mar 29 10:37:00 2021 +0800 Don't extract riru.sh to MODPATH commit 1337d948efdae9190eb1fad0f4eb9a2682519a3d Author: RikkaW <rikka@shizuku.moe> Date: Sun Mar 28 13:33:11 2021 +0800 Delete out dir in clean task commit 17cb1eebc7ec734a263a263d9b73ccf64dcfd137 Author: RikkaW <rikka@shizuku.moe> Date: Sun Mar 28 12:39:58 2021 +0800 Update template commit 6cb995e9f8607eaf695d0fb468a2b46355c5686c Author: RikkaW <rikka@shizuku.moe> Date: Mon Mar 22 16:34:21 2021 +0800 Update build.gradle commit 3857b8b599027bfdc2df4c4dd8feb94c4b7e7011 Author: RikkaW <rikka@shizuku.moe> Date: Wed Mar 17 02:51:51 2021 +0800 Update main.cpp commit 49868e17dfcd8d4c292a4b9e35aa96279977952a Author: RikkaW <rikka@shizuku.moe> Date: Wed Mar 17 02:40:36 2021 +0800 Update README commit 00abd3beeeca97b814ca2afb0e78e62d9c2aeca3 Author: RikkaW <rikka@shizuku.moe> Date: Wed Mar 17 02:34:13 2021 +0800 Fix typo commit ce677f7de75fcd9d0a65a7839983c263a04a746f Author: RikkaW <rikka@shizuku.moe> Date: Tue Mar 16 17:56:51 2021 +0800 Changes for Riru v25 commit 443ab95c2333c6a5006a0a520a9a5b29aa10a9e6 Author: RikkaW <rikka@shizuku.moe> Date: Fri Mar 12 00:07:28 2021 +0800 Fix main.cpp commit 551b2e6189476ecffb2cfd6aeda08f5550deb15a Author: RikkaW <rikka@shizuku.moe> Date: Thu Mar 11 22:58:19 2021 +0800 Update riru.sh commit f9794cbe205d3c2b37a423bc723b1922589c26f7 Author: RikkaW <rikka@shizuku.moe> Date: Thu Mar 11 22:55:26 2021 +0800 Use magisk --path commit 90d7adc75a06f70978f24b8341e1e702de978422 Author: RikkaW <rikka@shizuku.moe> Date: Thu Mar 11 18:01:22 2021 +0800 Update README commit 81c1e564f83459bbf0024a52a45e77b5b860055c Author: RikkaW <rikka@shizuku.moe> Date: Thu Mar 11 17:44:28 2021 +0800 Fix typo commit ddd5fbf8db1a30d08a030f7048041a1453828cfc Author: RikkaW <rikka@shizuku.moe> Date: Thu Mar 11 17:44:08 2021 +0800 Update main.cpp commit f9999fd1a234fe8bd099a909dff07d3ba77f511d Author: RikkaW <rikka@shizuku.moe> Date: Thu Mar 11 17:13:49 2021 +0800 Minor changes commit a16bd42029bf61909893cef8d89451c82a827748 Author: RikkaW <rikka@shizuku.moe> Date: Thu Mar 11 03:21:47 2021 +0800 Changes for Riru v24 again commit ed2ee5d3e4238c34fe18774cbd21837756e47270 Author: RikkaW <rikka@shizuku.moe> Date: Wed Mar 10 12:56:46 2021 +0800 Changes for Riru v24 commit faf4fcc3c17d743a8aec303d666a266548c1ee3d Author: RikkaW <rikka@shizuku.moe> Date: Fri Mar 5 15:08:06 2021 +0800 Lib moved to maven central commit 56fdbe82840b3b1c2bbefea89403c5ff838068f7 Author: RikkaW <rikka@shizuku.moe> Date: Thu Mar 4 16:51:25 2021 +0800 Update .gitattributes commit 9ace98fc53fc5aac43d1f0c87a3097658503969f Author: RikkaW <rikka@shizuku.moe> Date: Thu Mar 4 14:15:15 2021 +0800 Change lib path commit cf186db98da1660c6dbebe07b001606e1c0fac77 Author: RikkaW <rikka@shizuku.moe> Date: Sat Feb 27 22:02:19 2021 +0800 Fix check_riru_version commit d96a11f03cfb59cf1c8ed6f5d4156c9f0e23ed1b Author: RikkaW <rikka@shizuku.moe> Date: Tue Feb 23 12:37:49 2021 +0800 Update comment for shouldSkipUid commit fbe327ea4fb94c9b4a9e68dbfada3b84e51ce3dd Author: RikkaW <rikka@shizuku.moe> Date: Tue Feb 23 12:32:41 2021 +0800 Remove "_" commit a4316fab79151f4488a8d50480f73b2a0260004f Author: RikkaW <rikka@shizuku.moe> Date: Tue Feb 23 12:25:03 2021 +0800 Fix typo commit cd03c4561b32b093d22b32ebbd8275f9e2f78799 Author: RikkaW <rikka@shizuku.moe> Date: Sun Jan 3 13:39:45 2021 +0800 Fix install on x86 commit 530e7bc4c2b1fd3da9d94fb884fd2ccfbeb765da Author: RikkaW <rikka@shizuku.moe> Date: Sat Jan 2 15:08:50 2021 +0800 Use /data/adb/riru/util_functions.sh commit 3bdc01c04311eb51ab8520f00b72b8196c0efe55 Author: RikkaW <rikka@xing.moe> Date: Wed Dec 2 21:55:44 2020 +0800 Add comment about prefab 1.1.2 commit a60279ee147f9e24c37df5da53ae7db5f33f9201 Author: RikkaW <rikka@xing.moe> Date: Tue Dec 1 17:05:46 2020 +0800 Update README commit cd6669ebe4dc7d9ca92562ede48cfeb066132d70 Author: RikkaW <rikka@xing.moe> Date: Tue Dec 1 16:44:02 2020 +0800 Update README commit d3f00eab36d1076b2cdd217a08c16a9931bea542 Author: RikkaW <rikka@xing.moe> Date: Tue Dec 1 16:39:36 2020 +0800 Update exmaple commit 853279e9bf47a0e98fbe5f21998fc8c98cf1a738 Author: RikkaW <rikka@xing.moe> Date: Tue Dec 1 15:51:24 2020 +0800 Update for readdir through rirud commit a73dde129b303074bc834b26e6f313348c6a32af Author: RikkaW <rikka@xing.moe> Date: Mon Nov 30 15:48:54 2020 +0800 Update README commit 0587881cfe3b3426b7e1ecfc27c71c8bce3806c5 Author: RikkaW <rikka@xing.moe> Date: Mon Nov 30 15:47:45 2020 +0800 Update riru.h location commit 8a485e19e37358523ae7e97e0869cfc7c41a4f0b Author: RikkaW <rikka@xing.moe> Date: Mon Nov 30 15:41:31 2020 +0800 Update for API v10 commit 1561b5c6a9ba84504b0966a90c2c2a5d1c2d03c7 Author: RikkaW <rikka@xing.moe> Date: Sun Nov 15 15:54:51 2020 +0800 Update module.example.gradle commit 4c9579c3a90c31e092ade77fe54e438688ad1222 Author: RikkaW <rikka@xing.moe> Date: Sat Nov 14 21:04:23 2020 +0800 Update AGP to 4.1.1 commit 7e3ee55957680ab75b0b5c3af2fa42b582665ffe Author: RikkaW <rikka@xing.moe> Date: Sat Nov 14 21:04:03 2020 +0800 Min SDK version should be 23 commit 6f11ef88befeca5ca61b3e36bbd3e0d64be91e3e Author: RikkaW <rikka@xing.moe> Date: Sat Nov 14 14:32:58 2020 +0800 Change check riru version text commit 8f72889ffb9eff6ea30ca576446f0a30d4cd7505 Author: RikkaW <rikka@xing.moe> Date: Wed Oct 28 16:54:19 2020 +0800 Use u:object_r:magisk_file:s0 commit 899dbabe978dfa5a45a375e868514191c2893eb3 Author: RikkaW <rikka@xing.moe> Date: Sat Oct 24 22:05:53 2020 +0800 Update README commit 4e0ffdfe04cb23f89e6117ac690395c00fae1fcf Author: RikkaW <rikka@xing.moe> Date: Sat Oct 24 18:57:03 2020 +0800 Update README commit 36b254fd5c409b4d137f3dddd0b5875df94363bf Author: RikkaW <rikka@xing.moe> Date: Sat Oct 24 18:39:31 2020 +0800 Update README commit 7858d6d543073c5db66136aa3480a661a64ea9b7 Author: RikkaW <rikka@xing.moe> Date: Sat Oct 24 17:18:53 2020 +0800 use stable version AGP commit 18fed7b26067ab76017ed900f47438ffbeb47264 Author: Rikka <rikka@xing.moe> Date: Sat Oct 24 14:45:18 2020 +0800 Add LICENSE commit 52d4966bea7dea293559f72dd6d85af391fe32a8 Author: RikkaW <rikka@xing.moe> Date: Tue Oct 13 14:21:34 2020 +0800 update dependency commit 69d0e07f7f5e2ab9d6af680cfe7da87f80f910cd Author: RikkaW <rikka@xing.moe> Date: Sun Oct 11 22:15:18 2020 +0800 add missing supportHide commit 4e108b0d0fe52e6460cb235bd18b141b5cb41af4 Author: RikkaW <rikka@xing.moe> Date: Sun Oct 11 22:14:48 2020 +0800 add missing version/versionName commit 4a98de054a9a3b54550562be7c3e2d443d514567 Author: RikkaW <rikka@xing.moe> Date: Sun Oct 11 21:55:48 2020 +0800 pass api version from gradle commit b0143d1e7ab9a80a60671e69f7bd78056b4ba536 Author: RikkaW <rikka@xing.moe> Date: Sun Oct 11 20:56:28 2020 +0800 update for api 9 commit bc19061bb0b205ec879e75cb4286e98b8a622bd2 Author: RikkaW <rikka@xing.moe> Date: Fri Oct 9 23:26:16 2020 +0800 update AGP to make prefab happy commit 890f50f643b607ede1303dc54057fe2d0639519a Author: RikkaW <rikka@xing.moe> Date: Fri Oct 9 23:21:53 2020 +0800 update for api 8 commit 044de559aac06fb312ea52c6625fda62f03f7c87 Author: RikkaW <rikka@shizuku.moe> Date: Mon May 11 12:59:04 2020 +0800 remove "abort_clean" commit 1efe42f60aab6536a8d85ebc272dd4ad34f299e2 Author: RikkaW <rikka@shizuku.moe> Date: Sat May 9 11:05:31 2020 +0800 update for api 7 commit 155d2ed8af52838da9153df7b375059393b3e153 Author: RikkaW <rikka@shizuku.moe> Date: Fri Apr 24 14:02:35 2020 +0800 show required Riru version name commit 989b733ff52b5f052f33bbdafe1eb1543aff3a4a Author: RikkaW <rikka@shizuku.moe> Date: Fri Apr 24 13:29:46 2020 +0800 update for api 6 commit 65afd5a278c93b3828c48984092ed6ffa1d82202 Author: RikkaW <rikka@shizuku.moe> Date: Sun Apr 19 16:27:09 2020 +0800 update for api 5 commit a1c359f2ac374c74a2be63e36aa8351972838ae0 Author: RikkaW <rikka@shizuku.moe> Date: Wed Mar 18 16:35:03 2020 +0800 move module info to a stand-alone file fix #3 commit d768c52ec0740ad423508447fc5ddb1afab84e5b Author: RikkaW <rikka@shizuku.moe> Date: Fri Feb 28 01:17:47 2020 +0800 allow installed after new installation of Riru fix RikkaApps/Riru#86 commit 77bc46c73b130b42da24c498e44080b54e185fa5 Author: RikkaW <rikka@shizuku.moe> Date: Wed Feb 26 16:44:55 2020 +0800 update installation scripts commit 322576c630974fadbf73cc7e95fe7e0ce405534b Author: RikkaW <rikka@shizuku.moe> Date: Mon Feb 24 18:44:50 2020 +0800 fix bug commit 4638ccd2434e412a633ceae1c57289e1820074a5 Author: RikkaW <rikka@shizuku.moe> Date: Wed Feb 5 23:40:05 2020 +0800 fix #2 commit 85a565c0788339b393da347847eb6896e7b4f5bc Author: RikkaW <rikka@shizuku.moe> Date: Wed Feb 5 20:02:01 2020 +0800 no longer requires to modify the name "template" everywhere commit a2ae8d3f1a76c2aa7a3ecbedee51e3e8d9cdac9a Author: RikkaW <rikka@shizuku.moe> Date: Sat Jan 25 22:07:52 2020 +0800 update installation scripts commit 9729cd9b48e6d2d1940a340eaddec7bc0373c152 Author: RikkaW <rikka@shizuku.moe> Date: Sat Jan 25 00:30:00 2020 +0800 fix .gitattributes commit 1cb568d8d0f00fa580a325e1b9e9b4fdbd2f8538 Author: RikkaW <rikka@shizuku.moe> Date: Tue Jan 21 22:38:24 2020 +0800 format changes commit 9f362b94c17423c63ef373bceac635fb05085c08 Author: RikkaW <rikka@shizuku.moe> Date: Tue Jan 21 22:36:38 2020 +0800 format changes commit 09478e75cde4a0fe5af44495e5a530abfaa0ced6 Author: RikkaW <rikka@shizuku.moe> Date: Tue Jan 21 22:36:32 2020 +0800 fix bug commit 4e543b9e13bf8980f308410a3a2d533722ca6f94 Author: RikkaW <rikka@shizuku.moe> Date: Sun Jan 19 12:52:46 2020 +0800 add missing settings.gradle close #1 commit 96eb129abe88b940a9c9e3a774023729673da788 Author: RikkaW <rikka@shizuku.moe> Date: Fri Jan 10 17:17:46 2020 +0800 remove zip verification commit 4072c60339b56865a59a72e33acf497d52a5824a Author: RikkaW <rikka@shizuku.moe> Date: Wed Jan 8 15:37:07 2020 +0800 add missing uninstall.sh commit d99fd3a4413b0de2029a7a2b0e34c7563094613e Author: RikkaW <rikka@shizuku.moe> Date: Wed Jan 8 00:24:07 2020 +0800 initial commit |
||
---|---|---|
.github | ||
java_module | ||
META-INF/com/google/android | ||
patches | ||
riru | ||
system_sdk26/bin | ||
system_sdk27/bin | ||
system_sdk28/bin | ||
system_sdk29/bin | ||
system_sdk30 | ||
system_sdk31 | ||
.gitignore | ||
customize.sh | ||
LICENSE | ||
LICENSE.android | ||
Makefile | ||
module.prop | ||
post-fs-data.sh | ||
README.md | ||
service.sh | ||
system.prop |
Universal SafetyNet Fix
This is a universal fix for SafetyNet on devices with hardware attestation and unlocked bootloaders or custom verified boot keys. It defeats both hardware attestation and the new SafetyNet CTS profile updates released on January 12, 2021. The only requirement is that you can pass basic attestation, which requires a valid combination of device and model names, build fingerprints, and security patch levels.
Passing basic attestation is out-of-scope for this module; this module is meant to defy hardware attestation, as well as reported "basic" attestation that actually uses hardware under-the-hood. Use MagiskHide Props Config to spoof your CTS profile if you have trouble passing basic attestation. This is a common situation on old devices and custom ROMs.
No device-specific features (such as the new Pixel-exclusive Google Assistant design or screen-off voice match) will be lost with this fix.
MagiskHide is required if the device is rooted.
Android versions 8–12 Beta 2 are supported. Heavy OEM skins are not officially supported, but they may work depending on your luck and the particular ROM in question. Please do not report problems on such ROMs.
How does it work?
In order to enforce SafetyNet security, Google Play Services is now using hardware attestation for CTS profile validation in all cases, even when basic attestation is selected. The SafetyNet API response from GMS will report that basic attestation was used, but under the hood, hardware attestation is always used regardless of the reported state. This results in SafetyNet failing to pass due to TrustZone reporting an unlocked bootloader (and a partially invalidated root of trust) in the key attestation result.
We can still take advantage of the fact that this usage of hardware attestation is opportunistic — that is, it falls back to basic attestation if key attestation fails to run — and prevent GMS from using key attestation at the framework level. This causes it to gracefully fall back to basic attestation and pass SafetyNet with an unlocked bootloader.
Key attestation is still available for other apps, as there are valid uses for it that do not involve SafetyNet.
The "not implemented" error code from Keymaster is used to simulate the most realistic failure condition to evade detection, i.e. an old device that lacks support for key attestation.
ROM integration
Ideally, this workaround should be incorporated in ROMs instead of overriding part of the ROM in a Magisk module.
There are 2 options for:
- Blocking GMS in the framework, which is more portable across Android versions and typically less intrusive for ROMs to integrate
- Blocking GMS in the native keystore service, which is slightly more future-proof but may require forking another repository
You only need one of the workarounds on the ROM side. Adding both is redundant.
Commits for the framework version of the workaround:
Commits for the native version of the workaround that modifies the C++ keystore service in system/security:
All of the above commits are also available in the form of patch files in this repository.
Where is the source code?
The keystore executables and libraries in this repository were built with the commits linked above. The target CPU was changed to generic ARMv8-A for all target devices.
- Android 12 Beta 2: Built from AOSP master for
aosp_arm64
- Android 11: Built from ProtonAOSP 11.3.1 (android-11.0.0_r24) for
redfin
- Android 10: Built from LineageOS 17.1 (android-10.0.0_r41) for
taimen
- Android 9: Built from AOSP android-9.0.0_r61 for
taimen
- Android 8.1: Built from AOSP android-8.1.0_r81 for
taimen
- Android 8.0: Built from AOSP android-8.0.0_r51 for
marlin
Support
If you found this module helpful, please consider supporting development with a recurring donation on Patreon for benefits such as exclusive behind-the-scenes development news, early access to updates, and priority support. Alternatively, you can also buy me a coffee. All support is appreciated.