Skip to content

Commit

Permalink
feat: add files
Browse files Browse the repository at this point in the history
  • Loading branch information
iamlooper committed Nov 29, 2023
1 parent b337ae5 commit 68105ce
Show file tree
Hide file tree
Showing 18 changed files with 623 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/build_module.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build Module

on:
workflow_dispatch:
pull_request:
push:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Upload module as artifact
uses: actions/upload-artifact@v3
with:
name: module
path: |
.
!.git
!.github
70 changes: 70 additions & 0 deletions META-INF/com/google/android/update-binary
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#!/sbin/sh

#################
# Functions
#################

ui_print() { echo "$1"; }

grep_prop() {
local REGEX="s/^$1=//p"
shift
local FILES="$@"
[[ -z "$FILES" ]] && FILES=/system/build.prop
cat "$FILES" 2>/dev/null | dos2unix | sed -n "$REGEX" | head -n 1
}

abort() {
ui_print "$1"
[[ ! -z "$MODPATH" ]] && rm -rf "$MODPATH"
rm -rf "$TMPDIR"
exit 1
}

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

umask 0022

# Enable debugging by default.
set -x

# Global vars.
TMPDIR=/dev/tmp
NVBASE=/data/adb
MODDIRNAME=modules_update
MODULEROOT="$NVBASE/$MODDIRNAME"
"$KSU" || ZIPFILE="$3"

# Setup tmp dir.
mkdir -p "$TMPDIR"
cd "$TMPDIR"

# Extract necessary stuff.
unzip -o "$ZIPFILE" module.prop module_functions.sh -d "$TMPDIR" >&2

# Extract module info.
[[ ! -f "$TMPDIR/module.prop" ]] && abort "[Error] Unable to extract zip file!"
MODID="$(grep_prop id $TMPDIR/module.prop)"
MODPATH="$MODULEROOT/$MODID"

# Setup mod path.
rm -rf "$MODPATH"
mkdir -p "$MODPATH"

#################
# Load utils
#################

# Mount data partition.
"$KSU" || mount /data 2>/dev/null

# Load functions.
source "$TMPDIR/module_functions.sh"

# Install module.
install_module

# Exit successfully.
exit 0
1 change: 1 addition & 0 deletions META-INF/com/google/android/updater-script
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#MAGISK
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Android Enhancer Module 🚀
Module variant of Android Enhancer that works on both Magisk and KSU.

## Instructions 📜
- Flash & reboot.
- Check for logs in Internal Storage / Android.
- Forget that you installed it in first place if you liked it & you are seeing a improvement.
5 changes: 5 additions & 0 deletions customize.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/sbin/sh

# Execute update-binary from here for KSU installation.
unzip -o "$ZIPFILE" META-INF/* -d "$TMPDIR" >&2
sh "$TMPDIR/META-INF/com/google/android/update-binary"
Binary file added libs/arm64-v8a/libandroid_enhancer.so
Binary file not shown.
Binary file added libs/arm64-v8a/libvmtouch.so
Binary file not shown.
Binary file added libs/armeabi-v7a/libandroid_enhancer.so
Binary file not shown.
Binary file added libs/armeabi-v7a/libvmtouch.so
Binary file not shown.
Binary file added libs/x86/libandroid_enhancer.so
Binary file not shown.
Binary file added libs/x86/libvmtouch.so
Binary file not shown.
Binary file added libs/x86_64/libandroid_enhancer.so
Binary file not shown.
Binary file added libs/x86_64/libvmtouch.so
Binary file not shown.
5 changes: 5 additions & 0 deletions module.prop
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
id=android_enhancer
name=Android Enhancer
version=v1.1.0
author=iamlooper @ telegram
description=Revolutionary android optimizer 🚀
Loading

0 comments on commit 68105ce

Please sign in to comment.