Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePieMonster committed Oct 26, 2024
1 parent cfefc09 commit ce6d669
Show file tree
Hide file tree
Showing 10 changed files with 857 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Zygisk CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
PROJECT_NAME: ZygiskFakeEncryption

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Check out
uses: actions/checkout@v4
with:
submodules: "recursive"
fetch-depth: 1

- name: Input Check
run: |
echo "github.event_name : ${{ github.event_name }}"
echo "github.event.action : ${{ github.event.action }}"
echo "github.ref : ${{ github.ref }}"
echo "github.event.pull_request.merged : ${{ github.event.pull_request.merged }}"
echo "github.event.number : ${{ github.event.number }}"
- name: ZIP Release
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: '${{ env.PROJECT_NAME }}.zip'
exclusions: '*.git* /*node_modules/* .editorconfig README.md LICENSE'

- name : Extract ZIP & View Work Directory
working-directory : ${{ github.workspace }}/
run : |
unzip ${{ env.PROJECT_NAME }}.zip -d ${{ github.workspace }}/work
echo "\nEcho ${{ github.workspace }}/work"
ls -la ${{ github.workspace }}/work
echo "\nEcho ${{ github.workspace }}/work/module"
ls -la ${{ github.workspace }}/work/module
- name: Upload ${{ env.PROJECT_NAME }}.zip
uses: actions/upload-artifact@v4
with:
name: ${{ env.PROJECT_NAME }}
path: ${{ github.workspace }}/work/module
33 changes: 33 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Log/OS Files
*.log

# Android Studio generated files and folders
captures/
.externalNativeBuild/
.cxx/
*.apk
output.json

# IntelliJ
*.iml
.idea/
misc.xml
deploymentTargetDropDown.xml
render.experimental.xml

# Keystore files
*.jks
*.keystore

# Google Services (e.g. APIs or Firebase)
google-services.json

# Android Profiling
*.hprof
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
# ZygiskFakeEncryption

## About
Sets system property to show data partition is encrypted.


## Requirements
- Magisk 20.4+ is installed.


## Installation
It's Magisk module, flash it in **Magisk** app.


## Usage
Just flash the module and then check [Storage Encryption](https://www.cyber.nj.gov/guidance-and-best-practices/device-security/guide-to-accessing-your-android-device-s-security-privacy-settings#:~:text=In%20the%20Settings%20menu%2C%20locate,and%20Security%20%3E%20Other%20Security%20Settings) status in settings.
33 changes: 33 additions & 0 deletions module/META-INF/com/google/android/update-binary
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/sbin/sh

#################
# Initialization
#################

umask 022

# echo before loading util_functions
ui_print() { echo "$1"; }

require_new_magisk() {
ui_print "*******************************"
ui_print " Please install Magisk v20.4+! "
ui_print "*******************************"
exit 1
}

#########################
# Load util_functions.sh
#########################

OUTFD=$2
ZIPFILE=$3

mount /data 2>/dev/null

[ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk
. /data/adb/magisk/util_functions.sh
[ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk

install_module
exit 0
1 change: 1 addition & 0 deletions module/META-INF/com/google/android/updater-script
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#MAGISK
20 changes: 20 additions & 0 deletions module/customize.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# If you need to customize the module installation process, optionally you can create a script in the
# installer named customize.sh. This script will be sourced (not executed!) by the module installer script
# after all files are extracted and default permissions and secontext are applied. This is very useful if
# your module require additional setup based on the device ABI, or you need to set special
# permissions/secontext for some of your module files.
#
# If you would like to fully control and customize the installation process, declare SKIPUNZIP=1 in
# customize.sh to skip all default installation steps. By doing so, your customize.sh will be
# responsible to install everything by itself.

# Module requires Zygisk to work
isZygiskEnabled=$(magisk --sqlite "SELECT value FROM settings WHERE key='zygisk';")
if [ "$isZygiskEnabled" == "value=0" ] && [ ! -d "/data/adb/modules/zygisksu" ]; then
abort "! Zygisk is not enabled. Please, enable Zygisk in Magisk settings or install ZygiskNext or ReZygisk module."
fi

# Error on < Android 8
if [ "$API" -lt 26 ]; then
abort "! You can't use this module on Android < 8.0"
fi
6 changes: 6 additions & 0 deletions module/module.prop
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
id=zygisk_fake_encryption
name=Zygisk Fake Encryption
version=v1.0
versionCode=10
author=ThePieMonster
description=Sets system property to show data partition is encrypted.
8 changes: 8 additions & 0 deletions module/post-fs-data.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
MODPATH="${0%/*}"

# Conditional early sensitive properties

# Storage Encryption
resetprop ro.crypto.state encrypted
resetprop ro.crypto.type block

16 changes: 16 additions & 0 deletions module/service.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
MODPATH="${0%/*}"

# Conditional sensitive properties

# Storage Encryption
resetprop ro.crypto.state encrypted
resetprop ro.crypto.type block



# Conditional late sensitive properties

until [ "$(getprop sys.boot_completed)" = "1" ]; do
sleep 1
done

0 comments on commit ce6d669

Please sign in to comment.