Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
36d3723
fix: correct variable names
Veutexus Nov 29, 2025
003ad58
fix: update boot animation paths in documentation
Veutexus Nov 29, 2025
be31bfa
fix: resolve module installation failure
Veutexus Nov 29, 2025
a7e3748
fix: update default boot animation paths and remove obsolete options
Veutexus Nov 29, 2025
27ba7c2
fix: update media file paths
Veutexus Nov 29, 2025
dfa9279
update
Veutexus Nov 29, 2025
859b335
fix: update version to v1.1.1
Veutexus Nov 29, 2025
de07e19
fix: update comments
Veutexus Nov 29, 2025
fcba734
chore: update JSON for release v1.1.1
github-actions[bot] Nov 29, 2025
7e2b663
update
Veutexus Nov 29, 2025
560435c
fix: correct desc.txt format in README files
Veutexus Nov 29, 2025
c4dd9ef
update
Veutexus Nov 29, 2025
d175f63
fix: update target location handling in build-module workflow
Veutexus Nov 29, 2025
dac6d24
fix: improve artifact naming in build-module workflow
Veutexus Nov 29, 2025
0c01ecd
fix: update files
Veutexus Nov 29, 2025
1ce05ed
update
Veutexus Nov 29, 2025
598af3c
update
Veutexus Nov 29, 2025
a603fd8
update instructions for selecting system type to template
Veutexus Nov 29, 2025
b9932e8
fix: update README for clarity and consistency
Veutexus Nov 30, 2025
c01874d
docs: add clarification on systemless mount usage
Veutexus Nov 30, 2025
c22b0e4
refactor: update module name and version
Veutexus Nov 30, 2025
be2aa3a
chore: update JSON for release v1.1.2
github-actions[bot] Nov 30, 2025
60fe5ba
fix: enhance README
Veutexus Nov 30, 2025
6814b3b
fix: improve PR closing logic
Veutexus Nov 30, 2025
5b05d74
fix: enhance logic
Veutexus Nov 30, 2025
07793ee
fix: simplify PR closing logic
Veutexus Nov 30, 2025
55430ee
fix: refine broken logic??
Veutexus Nov 30, 2025
ab430d3
fix: update PR closing logic again
Veutexus Nov 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 34 additions & 28 deletions .github/workflows/build-module.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: Build Custom Boot Animation Module

# This workflow allows users to:
# 1. Fork this repo
# 2. Choose a device template OR add custom bootanimation.zip files to the 'upload' folder
# 3. Run this workflow manually
# 4. Download the ready-to-flash module

run-name: "Build: ${{ inputs.source == 'template' && format('{0}/{1}', inputs.device, inputs.system) || 'upload' }} ${{ inputs.target_location }}"
run-name: "Build: ${{ inputs.source == 'template' && format('{0}/{1}', inputs.device, inputs.theme) || 'upload' }} > ${{ inputs.target_location }}"

on:
workflow_dispatch:
Expand All @@ -26,8 +25,8 @@ on:
type: choice
options:
- 'liuqin'
system:
description: 'System type (only used when source is template)'
theme:
description: 'Theme (only used when source is template)'
required: false
default: 'HyperOS'
type: choice
Expand All @@ -38,13 +37,12 @@ on:
target_location:
description: 'Where to place bootanimation files in the module'
required: true
default: 'system/product/media'
default: '/product/media'
type: choice
options:
- 'system/product/media'
- 'system/media'
- 'system/system_ext/media'
- 'system/product/media/theme/default'
- '/product/media'
- '/system/media'
- '/system_ext/media'

jobs:
build-module:
Expand Down Expand Up @@ -122,17 +120,17 @@ jobs:
echo "Source: $SOURCE"

if [ "$SOURCE" = "template" ]; then
# Build template path from device and system inputs
# Build template path from device and theme inputs
DEVICE="${{ github.event.inputs.device }}"
SYSTEM="${{ github.event.inputs.system }}"
THEME="${{ github.event.inputs.theme }}"

# Use defaults if not specified
DEVICE="${DEVICE:-liuqin}"
SYSTEM="${SYSTEM:-HyperOS}"
THEME="${THEME:-HyperOS}"

TEMPLATE_DIR="templates/$DEVICE/$SYSTEM"
TEMPLATE_DIR="templates/$DEVICE/$THEME"

echo "Using template: $DEVICE/$SYSTEM"
echo "Using template: $DEVICE/$THEME"

if [ ! -d "$TEMPLATE_DIR" ]; then
echo "Error: Template directory not found: $TEMPLATE_DIR"
Expand Down Expand Up @@ -237,33 +235,38 @@ jobs:
# Determine target location (use input or default)
TARGET_LOCATION="${{ github.event.inputs.target_location }}"
if [ -z "$TARGET_LOCATION" ]; then
TARGET_LOCATION="system/product/media"
TARGET_LOCATION="/product/media"
fi

MODULE_TARGET="system$TARGET_LOCATION"

echo "Target location: $TARGET_LOCATION"
echo "Module path: $MODULE_TARGET"

# Remove all existing media directories to avoid conflicts
# Only keep the one we're targeting
echo "Cleaning up existing media directories..."

MEDIA_DIRS=(
"build/module/system/product/media"
"build/module/system/media"
"build/module/system/system/media"
"build/module/system/system_ext/media"
"build/module/system/product/media/theme/default"
)

for dir in "${MEDIA_DIRS[@]}"; do
if [ -d "$dir" ]; then
# Check if this is the target or a parent of the target
TARGET_DIR_FULL="build/module/$TARGET_LOCATION"
TARGET_DIR_FULL="build/module/$MODULE_TARGET"
if [[ "$TARGET_DIR_FULL" != "$dir"* ]]; then
echo " Removing: $dir"
rm -rf "$dir"
fi
fi
done

# Create target directory
TARGET_DIR="build/module/$TARGET_LOCATION"
# Create target directory with system/ prefix for Magisk
TARGET_DIR="build/module/$MODULE_TARGET"
mkdir -p "$TARGET_DIR"

# Clean any existing bootanimation files from the downloaded module
Expand Down Expand Up @@ -320,9 +323,13 @@ jobs:
MODULE_VERSION="${{ steps.module_info.outputs.module_version }}"

# Create a unique zip name with target location indicator
TARGET_SHORT=$(echo "${{ env.target_location }}" | sed 's/system\///g' | tr '/' '-')
# Remove leading slash and convert remaining slashes to dashes
TARGET_SHORT=$(echo "${{ env.target_location }}" | sed 's|^/||' | tr '/' '-')
ZIP_NAME="${MODULE_ID}-${MODULE_VERSION}-${TARGET_SHORT}.zip"

# Artifact name without .zip (GitHub adds it automatically on download)
ARTIFACT_NAME="${MODULE_ID}-${MODULE_VERSION}-${TARGET_SHORT}"

# Create ZIP with stored (no compression) mode for bootanimation compatibility
echo "Creating ZIP with stored (no compression) mode..."
zip -r -0 "../$ZIP_NAME" . -x "*.git*"
Expand All @@ -331,6 +338,7 @@ jobs:
ZIP_SIZE=$(du -h "../$ZIP_NAME" | cut -f1)

echo "zip_name=$ZIP_NAME" >> $GITHUB_OUTPUT
echo "artifact_name=$ARTIFACT_NAME" >> $GITHUB_OUTPUT
echo "zip_size=$ZIP_SIZE" >> $GITHUB_OUTPUT

echo ""
Expand All @@ -342,8 +350,8 @@ jobs:
- name: Upload module artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.create_zip.outputs.zip_name }}
path: build/${{ steps.create_zip.outputs.zip_name }}
name: ${{ steps.create_zip.outputs.artifact_name }}
path: build/module
retention-days: 90
compression-level: 0

Expand All @@ -357,8 +365,8 @@ jobs:
# Build source description
if [ "$SOURCE" = "template" ]; then
DEVICE="${{ github.event.inputs.device }}"
SYSTEM="${{ github.event.inputs.system }}"
SOURCE_DESC="template: $DEVICE/$SYSTEM"
THEME="${{ github.event.inputs.theme }}"
SOURCE_DESC="template: $DEVICE/$THEME"
else
SOURCE_DESC="upload"
fi
Expand Down Expand Up @@ -397,16 +405,14 @@ jobs:

1. Scroll down to the **Artifacts** section below
2. Click on the module ZIP file to download
3. The download will be a ZIP containing the module

## Installation

1. Extract the downloaded artifact (if needed)
2. Flash the module ZIP using:
1. Flash the downloaded module ZIP using:
- **Magisk Manager** → Modules → Install from storage
- **KernelSU** → Module → Install
- **APatch** → Module → Install
3. Reboot your device
2. Reboot your device

## Notes

Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/close-upload-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ name: Auto Close Upload PRs

on:
pull_request_target:
types: [opened]
paths:
- 'upload/**'

jobs:
close-pr:
runs-on: ubuntu-latest
# Only run for PRs from forks - check if head repo is different from base repo
if: ${{ github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name }}
permissions:
pull-requests: write

Expand All @@ -21,8 +24,11 @@ jobs:
script: |
const prNumber = context.payload.pull_request.number;
const prAuthor = context.payload.pull_request.user.login;
const headRepo = context.payload.pull_request.head.repo.full_name;
const baseRepo = context.payload.pull_request.base.repo.full_name;

console.log(`Head repo: ${headRepo}, Base repo: ${baseRepo}`);

// Add comment explaining why
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
Expand All @@ -44,12 +50,10 @@ jobs:
Thank you for your understanding!`
});

// Close the PR
await github.rest.pulls.update({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: prNumber,
state: 'closed'
});

console.log(`Closed PR #${prNumber} - modifies upload folder`);
console.log(`Closed PR #${prNumber}`);
32 changes: 15 additions & 17 deletions .github/workflows/package-release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
name: "NodeJs with Release"

# This workflow is for maintainers/developers only
# It packages the module, creates a GitHub release, and updates update.json
#
# Before running:

# 1. Update module/module.prop with the new version
# 2. Edit RELEASE_NOTES.md with your changelog
# 3. Run this workflow
# 2. Edit CHANGELOG.md
# 3. Run

run-name: "Release: v${{ inputs.version }} (${{ inputs.release_type }})"

Expand Down Expand Up @@ -59,7 +57,7 @@ jobs:
id: create_zip
run: |
VERSION="${{ github.event.inputs.version }}"
ZIP_NAME="mipad-custom-boot-$VERSION.zip"
ZIP_NAME="mi-boot-replacer-$VERSION.zip"

cd module

Expand Down Expand Up @@ -92,24 +90,24 @@ jobs:
RELEASE_TYPE="${{ github.event.inputs.release_type }}"
ZIP_NAME="${{ steps.create_zip.outputs.zip_name }}"

# Check if RELEASE_NOTES.md exists
if [ ! -f "RELEASE_NOTES.md" ]; then
echo "Error: RELEASE_NOTES.md not found!"
echo "Please create RELEASE_NOTES.md with your release notes before running this workflow."
# Check if CHANGELOG.md exists
if [ ! -f "CHANGELOG.md" ]; then
echo "Error: CHANGELOG.md not found!"
echo "Please create CHANGELOG.md with your release notes before running this workflow."
exit 1
fi

# Get the previous release tag for changelog link
PREV_TAG=$(gh release list --repo ${{ github.repository }} --exclude-drafts --limit 1 --json tagName -q '.[0].tagName' 2>/dev/null || echo "")

# Copy release notes and append changelog link
cp RELEASE_NOTES.md release_notes.md
cp CHANGELOG.md changelog.md

if [ -n "$PREV_TAG" ]; then
CHANGELOG_URL="https://github.com/${{ github.repository }}/compare/${PREV_TAG}...${TAG}"
echo "" >> release_notes.md
echo "---" >> release_notes.md
echo "**Full Changelog**: ${CHANGELOG_URL}" >> release_notes.md
echo "" >> changelog.md
echo "---" >> changelog.md
echo "**Full Changelog**: ${CHANGELOG_URL}" >> changelog.md
fi

# Build release flags
Expand All @@ -131,7 +129,7 @@ jobs:
# Create the release with the ZIP attached
gh release create "$TAG" "$ZIP_NAME" \
--title "$TITLE" \
--notes-file release_notes.md \
--notes-file changelog.md \
$FLAGS

echo "Release created successfully!"
Expand All @@ -156,8 +154,8 @@ jobs:
fi

VERSION_NO_V="${{ github.event.inputs.version }}"
ZIP_URL="https://github.com/${{ github.repository }}/releases/latest/download/mipad-custom-boot-${VERSION_NO_V}.zip"
CHANGELOG_URL="https://raw.githubusercontent.com/${{ github.repository }}/main/README.md"
ZIP_URL="https://github.com/${{ github.repository }}/releases/latest/download/mi-boot-replacer-${VERSION_NO_V}.zip"
CHANGELOG_URL="https://raw.githubusercontent.com/${{ github.repository }}/main/CHANGELOG.md"

echo "Updating update.json..."
echo " Version: $VERSION"
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## v1.1.2

### Module Rebranding

- **Renamed to "Xiaomi Boot Animation Replacer" (mi-boot-replacer)**
- The module is no longer limited to tablet devices
- Now supports both phones and tablets

---

## v1.1.1

### Bug Fixes

- **Major Fix: Resolved module installation failure**
- Fixed critical issue that caused the module to fail during installation
- Improved installation script stability and error handling
- Enhanced compatibility with various Magisk/KernelSU/APatch versions
Loading