mirror of
https://gitlab.com/newbit/rootAVD.git
synced 2026-06-01 22:09:11 +02:00
Added Support for LD_PRELOAD of init
This commit is contained in:
@@ -384,6 +384,7 @@ rootAVD.bat system-images\android-25\google_apis_playstore\armeabi-v7a\ramdisk.i
|
|||||||
|
|
||||||
### Change Logs
|
### Change Logs
|
||||||
#### [Oct 2024]
|
#### [Oct 2024]
|
||||||
|
* [rootAVD.sh] - Added Support for LD_PRELOAD of init
|
||||||
* [General] - Updated to Magisk v26.4
|
* [General] - Updated to Magisk v26.4
|
||||||
* [rootAVD.sh] - Removed Magisk Alpha as it moved to App Center and TG
|
* [rootAVD.sh] - Removed Magisk Alpha as it moved to App Center and TG
|
||||||
|
|
||||||
|
|||||||
+26
-9
@@ -67,6 +67,7 @@ copyARCHfiles() {
|
|||||||
BINDIR=$BASEDIR/lib/$ABI
|
BINDIR=$BASEDIR/lib/$ABI
|
||||||
ASSETSDIR=$BASEDIR/assets
|
ASSETSDIR=$BASEDIR/assets
|
||||||
STUBAPK=false
|
STUBAPK=false
|
||||||
|
INITLD=false
|
||||||
|
|
||||||
if [ -e $BINDIR/libstub.so ]; then
|
if [ -e $BINDIR/libstub.so ]; then
|
||||||
ABI=$ARCH32
|
ABI=$ARCH32
|
||||||
@@ -89,6 +90,11 @@ copyARCHfiles() {
|
|||||||
STUBAPK=true
|
STUBAPK=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -e $BASEDIR/init-ld ]; then
|
||||||
|
echo "[*] init LD_PRELOAD is present"
|
||||||
|
INITLD=true
|
||||||
|
fi
|
||||||
|
|
||||||
chmod -R 755 $BASEDIR
|
chmod -R 755 $BASEDIR
|
||||||
export STUBAPK
|
export STUBAPK
|
||||||
}
|
}
|
||||||
@@ -1235,7 +1241,7 @@ FindWorkingBusyBox() {
|
|||||||
for file in $(ls $BASEDIR/lib/*/*busybox*); do
|
for file in $(ls $BASEDIR/lib/*/*busybox*); do
|
||||||
chmod +x "$file"
|
chmod +x "$file"
|
||||||
bbversion=$($file | $file head -n 1)>/dev/null 2>&1
|
bbversion=$($file | $file head -n 1)>/dev/null 2>&1
|
||||||
if [[ $bbversion == *"BusyBox"*"Magisk"*"multi-call"* ]]; then
|
if [[ $bbversion == *"BusyBox"* ]]; then
|
||||||
TestingBusyBoxVersion "$file"
|
TestingBusyBoxVersion "$file"
|
||||||
RESULT="$?"
|
RESULT="$?"
|
||||||
if [[ "$RESULT" == "0" ]]; then
|
if [[ "$RESULT" == "0" ]]; then
|
||||||
@@ -1692,16 +1698,23 @@ patching_ramdisk(){
|
|||||||
echo "[-] Patching ramdisk"
|
echo "[-] Patching ramdisk"
|
||||||
|
|
||||||
# Compress to save precious ramdisk space
|
# Compress to save precious ramdisk space
|
||||||
|
if ! $INITLD ; then
|
||||||
|
if $IS32BITONLY || ! $IS64BITONLY ; then
|
||||||
|
PREINITDEVICE=$($BASEDIR/magisk32 --preinit-device)
|
||||||
|
$BASEDIR/magiskboot compress=xz magisk32 magisk32.xz
|
||||||
|
fi
|
||||||
|
|
||||||
if $IS32BITONLY || ! $IS64BITONLY ; then
|
if $IS64BITONLY || ! $IS32BITONLY ; then
|
||||||
PREINITDEVICE=$($BASEDIR/magisk32 --preinit-device)
|
PREINITDEVICE=$($BASEDIR/magisk64 --preinit-device)
|
||||||
$BASEDIR/magiskboot compress=xz magisk32 magisk32.xz
|
$BASEDIR/magiskboot compress=xz magisk64 magisk64.xz
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
PREINITDEVICE=$($BASEDIR/magisk --preinit-device)
|
||||||
|
$BASEDIR/magiskboot compress=xz magisk magisk.xz
|
||||||
|
$BASEDIR/magiskboot compress=xz init-ld init-ld.xz
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if $IS64BITONLY || ! $IS32BITONLY ; then
|
$INITLD && SKIPLD="" || SKIPLD="#"
|
||||||
PREINITDEVICE=$($BASEDIR/magisk64 --preinit-device)
|
|
||||||
$BASEDIR/magiskboot compress=xz magisk64 magisk64.xz
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "KEEPVERITY=$KEEPVERITY" > config
|
echo "KEEPVERITY=$KEEPVERITY" > config
|
||||||
echo "KEEPFORCEENCRYPT=$KEEPFORCEENCRYPT" >> config
|
echo "KEEPFORCEENCRYPT=$KEEPFORCEENCRYPT" >> config
|
||||||
@@ -1719,6 +1732,9 @@ patching_ramdisk(){
|
|||||||
$IS64BITONLY && SKIP32="#" || SKIP32=""
|
$IS64BITONLY && SKIP32="#" || SKIP32=""
|
||||||
$IS64BIT && SKIP64="" || SKIP64="#"
|
$IS64BIT && SKIP64="" || SKIP64="#"
|
||||||
|
|
||||||
|
$INITLD && SKIP32="#"
|
||||||
|
$INITLD && SKIP64="#"
|
||||||
|
|
||||||
if $STUBAPK; then
|
if $STUBAPK; then
|
||||||
echo "[!] stub.apk is present, compress and add it to ramdisk"
|
echo "[!] stub.apk is present, compress and add it to ramdisk"
|
||||||
$BASEDIR/magiskboot compress=xz stub.apk stub.xz
|
$BASEDIR/magiskboot compress=xz stub.apk stub.xz
|
||||||
@@ -1740,14 +1756,15 @@ patching_ramdisk(){
|
|||||||
"add 0750 init magiskinit" \
|
"add 0750 init magiskinit" \
|
||||||
"$SKIP32 add 0644 overlay.d/sbin/magisk32.xz magisk32.xz" \
|
"$SKIP32 add 0644 overlay.d/sbin/magisk32.xz magisk32.xz" \
|
||||||
"$SKIP64 add 0644 overlay.d/sbin/magisk64.xz magisk64.xz" \
|
"$SKIP64 add 0644 overlay.d/sbin/magisk64.xz magisk64.xz" \
|
||||||
|
"$SKIPLD add 0644 overlay.d/sbin/magisk.xz magisk.xz" \
|
||||||
"$SKIPSTUB add 0644 overlay.d/sbin/stub.xz stub.xz" \
|
"$SKIPSTUB add 0644 overlay.d/sbin/stub.xz stub.xz" \
|
||||||
|
"$SKIPLD add 0644 overlay.d/sbin/init-ld.xz init-ld.xz" \
|
||||||
"patch" \
|
"patch" \
|
||||||
"backup ramdisk.cpio.orig" \
|
"backup ramdisk.cpio.orig" \
|
||||||
"mkdir 000 .backup" \
|
"mkdir 000 .backup" \
|
||||||
"add 000 .backup/.magisk config"
|
"add 000 .backup/.magisk config"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
rename_copy_magisk() {
|
rename_copy_magisk() {
|
||||||
if ( "$MAGISKVERCHOOSEN" ); then
|
if ( "$MAGISKVERCHOOSEN" ); then
|
||||||
echo "[!] Copy Magisk.zip to Magisk.apk"
|
echo "[!] Copy Magisk.zip to Magisk.apk"
|
||||||
|
|||||||
Reference in New Issue
Block a user