-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gen: add support for generating twrp flashable zips
Showing
4 changed files
with
69 additions
and
2 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 |
---|---|---|
@@ -1 +1,2 @@ | ||
nuke.sh | ||
*.zip | ||
nuke*.sh |
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
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,47 @@ | ||
#!/sbin/sh | ||
|
||
OUTFD=$2 | ||
ZIP=$3 | ||
|
||
ui_print() { | ||
echo -n -e "ui_print $1\n" > /proc/self/fd/$OUTFD | ||
echo -n -e "ui_print\n" > /proc/self/fd/$OUTFD | ||
} | ||
|
||
cd /tmp | ||
rm -rf tmpdir | ||
mkdir tmpdir | ||
cd tmpdir | ||
unzip -o "$ZIP" | ||
|
||
zipdir=/tmp/tmpdir | ||
|
||
echo 'GENERATED BY universal-debloat-script-generator' | ||
echo 'AUTHOR : @ghzzor (github)' | ||
echo ' ' | ||
echo 'WARNING: This script will remove packages from your device.' | ||
echo ' I am not responsible for bricked devices.' | ||
echo ' Ensure you have backed up your data.' | ||
echo ' ' | ||
|
||
# mount stuff | ||
mount /system_root | ||
mount /product | ||
mount /prism | ||
|
||
mount -o rw,remount -t auto /system_root | ||
mount -o rw,remount -t auto /product | ||
mount -o rw,remount -t auto /prism | ||
|
||
# source the package list | ||
. $zipdir/nuke_twrp.sh | ||
|
||
# Remove bloat if it exists | ||
for bloat in "${packages_to_nuke[@]}"; do | ||
if [ -e "$bloat" ]; then | ||
rm -rf "$bloat" | ||
ui_print "Removed $bloat" | ||
else | ||
ui_print "Skipping $bloat (NOT FOUND)" | ||
fi | ||
done |
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 @@ | ||
# this is a dummy file, the magic is in update-binary, which is a shell script |