-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9d38ac4
Showing
42 changed files
with
3,227 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- 'initrd/**' | ||
- '.github/workflows/build.yml' | ||
pull_request: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Build initrd-magisk | ||
run: | | ||
cd initrd | ||
chmod -R 777 *; ln -fs /bin/ld-linux.so.2 lib/ld-linux.so.2; find * | cpio -o -H newc | gzip > ../initrd-magisk.img | ||
cd .. | ||
- uses: actions/upload-artifact@v1 | ||
with: | ||
name: initrd-magisk | ||
path: initrd-magisk.img | ||
- name: Patch boot image | ||
run: | | ||
cd patch | ||
sh download.sh | ||
cp ../initrd/boot.img.gz ./boot.img.gz | ||
cp ../initrd/magisk/magiskboot.gz ./magiskboot.gz | ||
gzip -d ./boot.img.gz | ||
gzip -d ./magiskboot.gz | ||
chmod 777 ./magiskboot | ||
sh ./boot_patch.sh boot.img canary-huskydg | ||
sh ./boot_patch.sh boot.img debug-huskydg | ||
cd .. | ||
- name: Upload a Build Artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: Boot image for initrd-magisk | ||
path: | | ||
boot-magisk_canary-huskydg.img | ||
boot-magisk_debug-huskydg.img |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Build and Release Folders | ||
bin-debug/ | ||
bin-release/ | ||
[Oo]bj/ | ||
[Bb]in/ | ||
|
||
# Other files and folders | ||
.settings/ | ||
|
||
# Executables | ||
*.swf | ||
*.air | ||
*.ipa | ||
*.apk | ||
|
||
# others | ||
README.md | ||
LICENSE | ||
|
||
# Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties` | ||
# should NOT be excluded as they contain compiler settings and other important | ||
# information for Eclipse / Flash Builder. | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# initrd-magisk | ||
Another easy and convenient way to integrate Magisk, add support `boot.img` for Magisk into Android-x86 project (BlissOS, PrimeOS, ...). Check out [Wiki page](http://github.com/huskydg/initrd-magisk/wiki) for install instructions and more information. | ||
|
||
<img src="https://i.imgur.com/1BbSrTp.jpg"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#placeholder |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
initrd_magisk_ver=v1.18 | ||
MAGISKCORE=/magisk | ||
TMPDIR=/tmp |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/sh | ||
|
||
[ "$1" = "-v" ] && verbose=-v && shift | ||
|
||
src=$1 | ||
dst=${2:-.} | ||
|
||
usage() | ||
{ | ||
echo "Usage: $(basename $0) SRC_DIR [DST_DIR]" | ||
echo | ||
exit 1 | ||
} | ||
|
||
make_dir() | ||
{ | ||
[ -d "$2" ] || mkdir -p "$2" | ||
if [ "`id -u`" = "0" ]; then | ||
chmod `stat -c "%a" "$1"` "$2" | ||
chown `stat -c "%u.%g" "$1"` "$2" | ||
fi | ||
} | ||
|
||
linkdir() | ||
{ | ||
local odir="$PWD" | ||
make_dir "$1" "$2" | ||
[ -d "$2" ] || mkdir -p "$2" | ||
cd "$2" | ||
local d="$PWD" | ||
cd "$odir" && cd "$1" | ||
for f in * .*; do | ||
if [ "$f" != "." -a "$f" != ".." -a \( -e "$f" -o -L "$f" \) ]; then | ||
if [ -d "$f" -a ! -L "$f" ]; then | ||
linkdir "$f" "$d/$f" | ||
else | ||
ln $verbose "$f" "$d" | ||
fi | ||
fi | ||
done | ||
cd "$odir" | ||
} | ||
|
||
[ -d /system/bin ] && PATH=/system/bin:$PATH | ||
|
||
[ -z "$src" ] && usage | ||
|
||
[ ! -d "$src" ] && echo "$src is not a directory" && exit 2 | ||
|
||
echo "$src" | grep -q /$ || dst=$dst/$(basename "$src") | ||
|
||
linkdir "$src" "$dst" |
Oops, something went wrong.