Some Files I Managed To Pull - OPPO Reno Z Guides, News, & Discussion

Just some files I managed to pull from my Reno Z
https://drive.google.com/open?id=1tnRzpQwczh9JfISHhdetPQqC_13tBApH
List of the files:
charger
fstab.enableswap
init
init.environ.rc
init.oppo.debug.rc
init.oppo.face.rc
init.oppo.fingerprints.rc
init.oppo.seccommon.rc
init.rc
init.usb.configfs.rc
init.usb.rc
init.zygote32.rc
init.zygote64_32.rc
ueventd.rc
vendor/etc/project_info.txt
proc/partitions
proc/mounts
proc/chip
proc/version
proc/boot_mode
vendor/oppo/recovery_rootcheck
system/build_18593.prop
system/build_default.prop
system/sysmd5.zip

Related

[Q] Problem starting own script from init.rc

Hello,
I am having some trouble running a script at boot started with init.rc:
I have added the following to the init.rc
Code:
service custom-init /system/bin/init.custom
class main
user root
group root
oneshot
The file exists and has executable rights:
Code:
ll /system/bin/init.custom
-rwxr-xr-x root root 645 2008-08-01 14:00 init.custom
If I execute the file from the shell everything works fine. What am I doing wrong? Needs the started script to be a binary?

[Release] Xposed for ZE500KL/ZE500KG [Updated-Again]

Thanks to @miau9202 I just finished an automated script for installing Xposed Framework on ZE500KL and on ZE500KG
Prerequisite:
>Root
>BusyBox Installed
>ADB driver installed(old method only, but you'll have them from root)
>USB debugging activated in 'Developer Settings' (old method only)
NEW METHOD
Right now, the best way to flash xposed now is to download and install the TWRP recovery from HERE and then reboot in to it and flash the official xposed zip you can find HERE (It's important to download the sdk21-arm64 version, so check twice)
OLD METHOD
How To:
>Connect your phone while switched on to your pc
>Run "InstallXposedInstaller.bat" first (Optional: you can download it yourself and install by hand, this is just to make thing faster)
>Run "InstallXposedFramework.bat" second
-You need to press a button after each passage, to proceed. This is done for debugging purpose, so that if you have an error you have the possibility to copy it
-NOTE: the error "WARNING: linker: could not load library "libsigchain.so" from LD_PRELOAD for "gz
ip"; caused by library "libsigchain.so" not found" is NORMAL, you can simply ignore it and proceed​
Your phone will reboot and after a while (it coul require even 10 minutes), it should appear the "Android Upgrade" pop-up.
Wait for him to complete and then you are ready to go!
Download:
Official Version - for .118
Unofficial Shakalaca Version - for .156
Manual Procedure:
If you prefer (or need) to manually insert the commands, here you a re a copy-paste friendly transcription:
adb shell
su
mount -o remount,rw /
mount -o remount,rw /system
mkdir /system/tmp
mkdir /sdcard/tmp2
exit
adb push assets/xposed-sdk21-arm64 /sdcard/tmp2
adb shell
su
cp -r /sdcard/tmp2/* /system/tmp/
chmod -R 777 /system/tmp
chmod 777 /system/tmp/flash-script.sh
./system/tmp/flash-script.sh
rm -rd /sdcard/tmp2
rm -rd /system/tmp
exit
adb reboot
Click to expand...
Click to collapse
Tested Modules:
Code:
Snapprefs - NOT Working (Bootloop)
XInternalSD - NOT Working (Bootloop)
BootManager - Working
Intelli3g - Working
PowerNap - Working
VolumeSteps+ - Working
YoutubeAdaway - Working
Disclaimer:
This tool could stuck your phone in a bootloop.
I'm not responsible nor accountable for any possible damage, loss of data or any problem could appear on your phone.
Use this tool at your own risk
Update:
15/11/2015 - Updated guide and binary for last asus update (12.8.5.156), thanks to @shakalaca, @rajlko, @96DANGER96 and @berkobra
13/02/2016 - Updated with the TWRP method
Need Xposed for ZE500KG
Some body can help me to send link Xposed for ZE500KG.
Thanks..
cannyvio said:
Some body can help me to send link Xposed for ZE500KG.
Thanks..
Click to expand...
Click to collapse
Since root procedure is the same and the phones are very look-alike.
I suppose that the same package sould work even on ZE500KG
Give it a try and report here the result
Thanks for the effort, I'll try this.
I have this error running your script:
tmp-mksh: ./flash-script.sh: not found
so tried manually, but encountered an error when starting the install script, here the entire log:
Code:
C:\Users\luca.bosso\Desktop\Xposed ZE500KL>adb shell
[email protected]_Z00E_1:/ $ su -c mount -o remount,rw /
su -c mount -o remount,rw /
[email protected]_Z00E_1:/ $ su -c mount -o remount,rw /system
su -c mount -o remount,rw /system
[email protected]_Z00E_1:/ $ su -c mkdir /system/tmp
su -c mkdir /system/tmp
mkdir failed for /system/tmp, File exists
255|[email protected]_Z00E_1:/ $ su -c mkdir /sdcard/tmp2
su -c mkdir /sdcard/tmp2
mkdir failed for /sdcard/tmp2, File exists
255|[email protected]_Z00E_1:/ $ su -c chmod 777 /system/tmp
su -c chmod 777 /system/tmp
[email protected]_Z00E_1:/ $ exit
exit
C:\Users\luca.bosso\Desktop\Xposed ZE500KL>adb push assets/xposed-sdk21-arm64 /
dcard/tmp2
push: assets/xposed-sdk21-arm64/META-INF/com/google/android/updater-script -> /
dcard/tmp2/META-INF/com/google/android/updater-script
push: assets/xposed-sdk21-arm64/META-INF/com/google/android/update-binary -> /s
card/tmp2/META-INF/com/google/android/update-binary
push: assets/xposed-sdk21-arm64/META-INF/com/google/android/flash-script.sh ->
sdcard/tmp2/META-INF/com/google/android/flash-script.sh
push: assets/xposed-sdk21-arm64/META-INF/MANIFEST.MF -> /sdcard/tmp2/META-INF/M
NIFEST.MF
push: assets/xposed-sdk21-arm64/META-INF/CERT.SF -> /sdcard/tmp2/META-INF/CERT.
F
push: assets/xposed-sdk21-arm64/META-INF/CERT.RSA -> /sdcard/tmp2/META-INF/CERT
RSA
push: assets/xposed-sdk21-arm64/system/bin/patchoat -> /sdcard/tmp2/system/bin/
atchoat
push: assets/xposed-sdk21-arm64/system/bin/oatdump -> /sdcard/tmp2/system/bin/o
tdump
push: assets/xposed-sdk21-arm64/system/bin/dex2oat -> /sdcard/tmp2/system/bin/d
x2oat
push: assets/xposed-sdk21-arm64/system/bin/app_process64_xposed -> /sdcard/tmp2
system/bin/app_process64_xposed
push: assets/xposed-sdk21-arm64/system/bin/app_process32_xposed -> /sdcard/tmp2
system/bin/app_process32_xposed
push: assets/xposed-sdk21-arm64/system/framework/XposedBridge.jar -> /sdcard/tm
2/system/framework/XposedBridge.jar
push: assets/xposed-sdk21-arm64/system/lib/libxposed_art.so -> /sdcard/tmp2/sys
em/lib/libxposed_art.so
push: assets/xposed-sdk21-arm64/system/lib/libsigchain.so -> /sdcard/tmp2/syste
/lib/libsigchain.so
push: assets/xposed-sdk21-arm64/system/lib/libart.so -> /sdcard/tmp2/system/lib
libart.so
push: assets/xposed-sdk21-arm64/system/lib/libart-compiler.so -> /sdcard/tmp2/s
stem/lib/libart-compiler.so
push: assets/xposed-sdk21-arm64/system/lib64/libxposed_art.so -> /sdcard/tmp2/s
stem/lib64/libxposed_art.so
push: assets/xposed-sdk21-arm64/system/lib64/libsigchain.so -> /sdcard/tmp2/sys
em/lib64/libsigchain.so
push: assets/xposed-sdk21-arm64/system/lib64/libart.so -> /sdcard/tmp2/system/l
b64/libart.so
push: assets/xposed-sdk21-arm64/system/lib64/libart-disassembler.so -> /sdcard/
mp2/system/lib64/libart-disassembler.so
push: assets/xposed-sdk21-arm64/system/xposed.prop -> /sdcard/tmp2/system/xpose
.prop
push: assets/xposed-sdk21-arm64/flash-script.sh -> /sdcard/tmp2/flash-script.sh
22 files pushed. 0 files skipped.
5543 KB/s (12807304 bytes in 2.256s)
C:\Users\luca.bosso\Desktop\Xposed ZE500KL>adb shell
[email protected]_Z00E_1:/ $ su -c cp -r /sdcard/tmp2/* /system/tmp/
su -c cp -r /sdcard/tmp2/* /system/tmp/
[email protected]_Z00E_1:/ $ su -c ./flash-script.sh
su -c ./flash-script.sh
tmp-mksh: ./flash-script.sh: not found
127|[email protected]_Z00E_1:/ $ dir
dir
/system/bin/sh: dir: not found
127|[email protected]_Z00E_1:/ $ ls -la
ls -la
drwxrwxr-x system system 2015-01-01 01:01 ADF
drwxrwxr-x system system 1970-01-01 01:00 APD
drwxr-xr-x root system 2015-10-28 09:55 Removable
drwxr-xr-x root root 1970-02-14 02:30 acct
drwxrwxrwx root root 2015-10-27 17:30 asdf
drwxrwxr-x system system 1970-01-01 01:00 asusfw
drwxr-xr-x root root 1970-01-01 01:00 bin
drwxrwx--- system cache 2015-10-27 15:05 cache
lrwxrwxrwx root root 1970-01-01 01:00 charger -> /sbin/healthd
dr-x------ root root 1970-02-14 02:30 config
lrwxrwxrwx root root 1970-02-14 02:30 d -> /sys/kernel/debug
drwxrwx--x system system 2015-10-21 17:25 data
-rw-r--r-- root root 363 1970-01-01 01:00 default.prop
drwxr-xr-x root root 2015-10-28 09:55 dev
lrwxrwxrwx root root 1970-02-14 02:30 etc -> /system/etc
drwxrwxrwx shell shell 1970-01-01 05:04 factory
-rw-r--r-- root root 36566 1970-01-01 01:00 file_contexts
dr-xr-x--- system system 1970-01-01 01:00 firmware
-rw-r----- root root 922 1970-01-01 01:00 fstab.goldfish
-rw-r----- root root 1063 1970-01-01 01:00 fstab.qcom
-rwxr-x--- root root 408616 1970-01-01 01:00 init
-rwxr-x--- root root 3058 1970-01-01 01:00 init.asus.debugtool.rc
-rwxr-x--- root root 15324 1970-01-01 01:00 init.asus.rc
-rwxr-x--- root root 1577 1970-01-01 01:00 init.asus.thermald.rc
-rwxr-x--- root root 13380 1970-01-01 01:00 init.asus.usb.rc
-rwxr-x--- root root 3265 1970-01-01 01:00 init.class_main.sh
-rwxr-x--- root root 1178 1970-01-01 01:00 init.environ.rc
-rwxr-x--- root root 2836 1970-01-01 01:00 init.goldfish.rc
-rwxr-x--- root root 1730 1970-01-01 01:00 init.mdm.sh
-rwxr-x--- root root 7054 1970-01-01 01:00 init.qcom.class_core.sh
-rwxr-x--- root root 6920 1970-01-01 01:00 init.qcom.early_boot.sh
-rwxr-x--- root root 12878 1970-01-01 01:00 init.qcom.factory.sh
-rwxr-x--- root root 31160 1970-01-01 01:00 init.qcom.rc
-rwxr-x--- root root 6987 1970-01-01 01:00 init.qcom.sh
-rwxr-x--- root root 2965 1970-01-01 01:00 init.qcom.syspart_fixup.
h
-rwxr-x--- root root 60593 1970-01-01 01:00 init.qcom.usb.rc
-rwxr-x--- root root 10516 1970-01-01 01:00 init.qcom.usb.sh
-rwxr-x--- root root 24085 1970-01-01 01:00 init.rc
-rwxr-x--- root root 7223 1970-01-01 01:00 init.target.rc
-rwxr-x--- root root 1927 1970-01-01 01:00 init.trace.rc
-rwxr-x--- root root 3910 1970-01-01 01:00 init.usb.rc
-rwxr-x--- root root 301 1970-01-01 01:00 init.zygote32.rc
-rwxr-x--- root root 531 1970-01-01 01:00 init.zygote64_32.rc
drwxrwxr-x root system 1970-02-14 02:30 mnt
drwxrwx--x system system 1970-01-01 01:00 persist
dr-xr-xr-x root root 1970-01-01 01:00 proc
-rw-r--r-- root root 2832 1970-01-01 01:00 property_contexts
drwxr-xr-x root root 1970-01-01 01:00 res
drwx------ root root 2015-09-15 07:03 root
drwxr-x--- root root 1970-01-01 01:00 sbin
lrwxrwxrwx root root 1970-02-14 02:30 sdcard -> /storage/emula
ed/legacy
-rw-r--r-- root root 746 1970-01-01 01:00 seapp_contexts
-rw-r--r-- root root 76 1970-01-01 01:00 selinux_version
-rw-r--r-- root root 187085 1970-01-01 01:00 sepolicy
-rw-r--r-- root root 10475 1970-01-01 01:00 service_contexts
drwxr-x--x root sdcard_r 1970-02-14 02:30 storage
dr-xr-xr-x root root 1970-02-14 02:30 sys
drwxr-xr-x root root 2015-10-28 09:56 system
drwxr-xr-x root root 2015-10-28 09:55 tmp-mksh
lrwxrwxrwx root root 1970-02-14 02:30 tombstones -> /data/tomb
tones
-rw-r--r-- root root 323 1970-01-01 01:00 ueventd.goldfish.rc
-rw-r--r-- root root 11724 1970-01-01 01:00 ueventd.qcom.rc
-rw-r--r-- root root 4546 1970-01-01 01:00 ueventd.rc
lrwxrwxrwx root root 1970-02-14 02:30 vendor -> /system/vendor
-rw-r--r-- root root 524 1970-01-01 01:00 verity_key
[email protected]_Z00E_1:/ $ ls -la tmp-mksh
ls -la tmp-mksh
-rwxr-xr-x root root 285016 2015-10-28 09:55 tmp-mksh
[email protected]_Z00E_1:/ $ ls -la system/tmp
ls -la system/tmp
drwxrwx--- root root 2015-10-28 09:57 META-INF
-rw------- root root 5602 2015-10-28 10:05 flash-script.sh
drwxrwx--- root root 2015-10-28 09:57 system
[email protected]_Z00E_1:/ $ cp system/tmp/flash-script.sh tmp-mksh
cp system/tmp/flash-script.sh tmp-mksh
cp: system/tmp/flash-script.sh: Permission denied
1|[email protected]_Z00E_1:/ $ cd system/tmp
cd system/tmp
[email protected]_Z00E_1:/system/tmp $ su -c ./flash-script.sh
su -c ./flash-script.sh
tmp-mksh: ./flash-script.sh: can't execute: Permission denied
126|[email protected]_Z00E_1:/system/tmp $ su -c ./flash-script.sh
su -c ./flash-script.sh
tmp-mksh: ./flash-script.sh: can't execute: Permission denied
126|[email protected]_Z00E_1:/system/tmp $ su
su
[email protected]_Z00E_1:/system/tmp # ./flash-script.sh
./flash-script.sh
tmp-mksh: ./flash-script.sh: can't execute: Permission denied
126|[email protected]_Z00E_1:/system/tmp #
C:\Users\luca.bosso\Desktop\Xposed ZE500KL>adb shell
[email protected]_Z00E_1:/ $ su -c ./flash-script.sh
su -c ./flash-script.sh
tmp-mksh: ./flash-script.sh: not found
127|[email protected]_Z00E_1:/ $ chmod 777 tmp-mksh
chmod 777 tmp-mksh
Unable to chmod tmp-mksh: Read-only file system
10|[email protected]_Z00E_1:/ $ su
su
[email protected]_Z00E_1:/ # mount -o remount,rw /tmp-mksh
mount -o remount,rw /tmp-mksh
Usage: mount [-r] [-w] [-o options] [-t type] device directory
1|[email protected]_Z00E_1:/ # mount -o remount,rw /
mount -o remount,rw /
[email protected]_Z00E_1:/ # su -c mount -o remount,rw /
su -c mount -o remount,rw /
[email protected]_Z00E_1:/ # su -c mount -o remount,rw /tmp-mksh
su -c mount -o remount,rw /tmp-mksh
Usage: mount [-r] [-w] [-o options] [-t type] device directory
1|[email protected]_Z00E_1:/ # shell
shell
tmp-mksh: shell: not found
127|[email protected]_Z00E_1:/ # su -c mount -o remount,rw /tmp-mksh
su -c mount -o remount,rw /tmp-mksh
Usage: mount [-r] [-w] [-o options] [-t type] device directory
1|[email protected]_Z00E_1:/ # su -c mount -o remount,rw /tmp-mksh
su -c mount -o remount,rw /tmp-mksh
Usage: mount [-r] [-w] [-o options] [-t type] device directory
1|[email protected]_Z00E_1:/ # su -c mount -o remount,rw /system
su -c mount -o remount,rw /system
[email protected]_Z00E_1:/ # su -c mount -o remount,rw /
su -c mount -o remount,rw /
[email protected]_Z00E_1:/ # chmod 777 tmp-mksh
chmod 777 tmp-mksh
[email protected]_Z00E_1:/ # su -c ./flash-script.sh
su -c ./flash-script.sh
tmp-mksh: ./flash-script.sh: not found
127|[email protected]_Z00E_1:/ # su -c cp system/tmp/flash-script.sh /tmp-mksh
su -c cp system/tmp/flash-script.sh /tmp-mksh
[email protected]_Z00E_1:/ # su -c ./flash-script.sh
su -c ./flash-script.sh
tmp-mksh: ./flash-script.sh: not found
127|[email protected]_Z00E_1:/ # ls -la /tmp-mksh
ls -la /tmp-mksh
-rw------- root root 5602 2015-10-28 10:16 flash-script.sh
-rwxr-xr-x root root 285016 2015-10-28 09:55 tmp-mksh
[email protected]_Z00E_1:/ # shell
shell
tmp-mksh: shell: not found
127|[email protected]_Z00E_1:/ # cd tmp-mksh
cd tmp-mksh
[email protected]_Z00E_1:/tmp-mksh # ./flash-script.sh
./flash-script.sh
tmp-mksh: ./flash-script.sh: can't execute: Permission denied
126|[email protected]_Z00E_1:/tmp-mksh # chmod 777 flash-script.sh
chmod 777 flash-script.sh
[email protected]_Z00E_1:/tmp-mksh # ./flash-script.sh
./flash-script.sh
******************************
Xposed framework installer zip
******************************
- Mounting /system and /vendor read-write
- Checking environment
./flash-script.sh[113]: head: not found
./flash-script.sh[113]: sed: not found
./flash-script.sh[115]: cut: not found
./flash-script.sh[115]: head: not found
./flash-script.sh[115]: sed: not found
./flash-script.sh[116]: cut: not found
./flash-script.sh[116]: sed: not found
./flash-script.sh[116]: head: not found
./flash-script.sh[117]: head: not found
./flash-script.sh[117]: sed: not found
./flash-script.sh[119]: head: not found
./flash-script.sh[119]: sed: not found
./flash-script.sh[120]: sed: not found
./flash-script.sh[120]: head: not found
./flash-script.sh[121]: sed: not found
./flash-script.sh[121]: head: not found
./flash-script.sh[122]: head: not found
./flash-script.sh[122]: sed: not found
Xposed version:
! Wrong platform: arm
! This file is for:
! Please download the correct package
! for your platform/ROM!
1|[email protected]_Z00E_1:/tmp-mksh # ./flash-script.sh
Xposed ZE500KG
Jhyrachy said:
Since root procedure is the same and the phones are very look-alike.
I suppose that the same package sould work even on ZE500KG
Give it a try and report here the result
Click to expand...
Click to collapse
I already installed xposed on ZE500KG but still can not because framework didn't active in xposed
when i installed error "tmp-mksh: ./flash-script.sh: not found
Thanks.
cannyvio said:
I already installed xposed on ZE500KG but still can not because framework didn't active in xposed
when i installed error "tmp-mksh: ./flash-script.sh: not found
Thanks.
Click to expand...
Click to collapse
Had the same problem, I successfully installed xposed but I'm also having problem with
tmp-mksh: ./flash-script.sh: not found.... We hope we'll have update to fix this. Thank you and God bless
96DANGER96 said:
I have this error running your script:
tmp-mksh: ./flash-script.sh: not found
so tried manually, but encountered an error when starting the install script, here the entire log:
Code:
C:\Users\*************\Desktop\Xposed ZE500KL>adb shell
[email protected]_Z00E_1:/ $ su -c mount -o remount,rw /
su -c mount -o remount,rw /
[email protected]_Z00E_1:/ $ su -c mount -o remount,rw /system
su -c mount -o remount,rw /system
[email protected]_Z00E_1:/ $ su -c mkdir /system/tmp
su -c mkdir /system/tmp
mkdir failed for /system/tmp, File exists
255|[email protected]_Z00E_1:/ $ su -c mkdir /sdcard/tmp2
su -c mkdir /sdcard/tmp2
mkdir failed for /sdcard/tmp2, File exists
255|[email protected]_Z00E_1:/ $ su -c chmod 777 /system/tmp
su -c chmod 777 /system/tmp
[email protected]_Z00E_1:/ $ exit
exit
C:\Users\***********\Desktop\Xposed ZE500KL>adb push assets/xposed-sdk21-arm64 /
dcard/tmp2
push: assets/xposed-sdk21-arm64/META-INF/com/google/android/updater-script -> /
dcard/tmp2/META-INF/com/google/android/updater-script
push: assets/xposed-sdk21-arm64/META-INF/com/google/android/update-binary -> /s
card/tmp2/META-INF/com/google/android/update-binary
push: assets/xposed-sdk21-arm64/META-INF/com/google/android/flash-script.sh ->
sdcard/tmp2/META-INF/com/google/android/flash-script.sh
push: assets/xposed-sdk21-arm64/META-INF/MANIFEST.MF -> /sdcard/tmp2/META-INF/M
NIFEST.MF
push: assets/xposed-sdk21-arm64/META-INF/CERT.SF -> /sdcard/tmp2/META-INF/CERT.
F
push: assets/xposed-sdk21-arm64/META-INF/CERT.RSA -> /sdcard/tmp2/META-INF/CERT
RSA
push: assets/xposed-sdk21-arm64/system/bin/patchoat -> /sdcard/tmp2/system/bin/
atchoat
push: assets/xposed-sdk21-arm64/system/bin/oatdump -> /sdcard/tmp2/system/bin/o
tdump
push: assets/xposed-sdk21-arm64/system/bin/dex2oat -> /sdcard/tmp2/system/bin/d
x2oat
push: assets/xposed-sdk21-arm64/system/bin/app_process64_xposed -> /sdcard/tmp2
system/bin/app_process64_xposed
push: assets/xposed-sdk21-arm64/system/bin/app_process32_xposed -> /sdcard/tmp2
system/bin/app_process32_xposed
push: assets/xposed-sdk21-arm64/system/framework/XposedBridge.jar -> /sdcard/tm
2/system/framework/XposedBridge.jar
push: assets/xposed-sdk21-arm64/system/lib/libxposed_art.so -> /sdcard/tmp2/sys
em/lib/libxposed_art.so
push: assets/xposed-sdk21-arm64/system/lib/libsigchain.so -> /sdcard/tmp2/syste
/lib/libsigchain.so
push: assets/xposed-sdk21-arm64/system/lib/libart.so -> /sdcard/tmp2/system/lib
libart.so
push: assets/xposed-sdk21-arm64/system/lib/libart-compiler.so -> /sdcard/tmp2/s
stem/lib/libart-compiler.so
push: assets/xposed-sdk21-arm64/system/lib64/libxposed_art.so -> /sdcard/tmp2/s
stem/lib64/libxposed_art.so
push: assets/xposed-sdk21-arm64/system/lib64/libsigchain.so -> /sdcard/tmp2/sys
em/lib64/libsigchain.so
push: assets/xposed-sdk21-arm64/system/lib64/libart.so -> /sdcard/tmp2/system/l
b64/libart.so
push: assets/xposed-sdk21-arm64/system/lib64/libart-disassembler.so -> /sdcard/
mp2/system/lib64/libart-disassembler.so
push: assets/xposed-sdk21-arm64/system/xposed.prop -> /sdcard/tmp2/system/xpose
.prop
push: assets/xposed-sdk21-arm64/flash-script.sh -> /sdcard/tmp2/flash-script.sh
22 files pushed. 0 files skipped.
5543 KB/s (12807304 bytes in 2.256s)
C:\Users\**************\Desktop\Xposed ZE500KL>adb shell
[email protected]_Z00E_1:/ $ su -c cp -r /sdcard/tmp2/* /system/tmp/
su -c cp -r /sdcard/tmp2/* /system/tmp/
[email protected]_Z00E_1:/ $ su -c ./flash-script.sh
su -c ./flash-script.sh
tmp-mksh: ./flash-script.sh: not found
127|[email protected]_Z00E_1:/ $ dir
dir
/system/bin/sh: dir: not found
127|[email protected]_Z00E_1:/ $ ls -la
ls -la
drwxrwxr-x system system 2015-01-01 01:01 ADF
drwxrwxr-x system system 1970-01-01 01:00 APD
drwxr-xr-x root system 2015-10-28 09:55 Removable
drwxr-xr-x root root 1970-02-14 02:30 acct
drwxrwxrwx root root 2015-10-27 17:30 asdf
drwxrwxr-x system system 1970-01-01 01:00 asusfw
drwxr-xr-x root root 1970-01-01 01:00 bin
drwxrwx--- system cache 2015-10-27 15:05 cache
lrwxrwxrwx root root 1970-01-01 01:00 charger -> /sbin/healthd
dr-x------ root root 1970-02-14 02:30 config
lrwxrwxrwx root root 1970-02-14 02:30 d -> /sys/kernel/debug
drwxrwx--x system system 2015-10-21 17:25 data
-rw-r--r-- root root 363 1970-01-01 01:00 default.prop
drwxr-xr-x root root 2015-10-28 09:55 dev
lrwxrwxrwx root root 1970-02-14 02:30 etc -> /system/etc
drwxrwxrwx shell shell 1970-01-01 05:04 factory
-rw-r--r-- root root 36566 1970-01-01 01:00 file_contexts
dr-xr-x--- system system 1970-01-01 01:00 firmware
-rw-r----- root root 922 1970-01-01 01:00 fstab.goldfish
-rw-r----- root root 1063 1970-01-01 01:00 fstab.qcom
-rwxr-x--- root root 408616 1970-01-01 01:00 init
-rwxr-x--- root root 3058 1970-01-01 01:00 init.asus.debugtool.rc
-rwxr-x--- root root 15324 1970-01-01 01:00 init.asus.rc
-rwxr-x--- root root 1577 1970-01-01 01:00 init.asus.thermald.rc
-rwxr-x--- root root 13380 1970-01-01 01:00 init.asus.usb.rc
-rwxr-x--- root root 3265 1970-01-01 01:00 init.class_main.sh
-rwxr-x--- root root 1178 1970-01-01 01:00 init.environ.rc
-rwxr-x--- root root 2836 1970-01-01 01:00 init.goldfish.rc
-rwxr-x--- root root 1730 1970-01-01 01:00 init.mdm.sh
-rwxr-x--- root root 7054 1970-01-01 01:00 init.qcom.class_core.sh
-rwxr-x--- root root 6920 1970-01-01 01:00 init.qcom.early_boot.sh
-rwxr-x--- root root 12878 1970-01-01 01:00 init.qcom.factory.sh
-rwxr-x--- root root 31160 1970-01-01 01:00 init.qcom.rc
-rwxr-x--- root root 6987 1970-01-01 01:00 init.qcom.sh
-rwxr-x--- root root 2965 1970-01-01 01:00 init.qcom.syspart_fixup.
h
-rwxr-x--- root root 60593 1970-01-01 01:00 init.qcom.usb.rc
-rwxr-x--- root root 10516 1970-01-01 01:00 init.qcom.usb.sh
-rwxr-x--- root root 24085 1970-01-01 01:00 init.rc
-rwxr-x--- root root 7223 1970-01-01 01:00 init.target.rc
-rwxr-x--- root root 1927 1970-01-01 01:00 init.trace.rc
-rwxr-x--- root root 3910 1970-01-01 01:00 init.usb.rc
-rwxr-x--- root root 301 1970-01-01 01:00 init.zygote32.rc
-rwxr-x--- root root 531 1970-01-01 01:00 init.zygote64_32.rc
drwxrwxr-x root system 1970-02-14 02:30 mnt
drwxrwx--x system system 1970-01-01 01:00 persist
dr-xr-xr-x root root 1970-01-01 01:00 proc
-rw-r--r-- root root 2832 1970-01-01 01:00 property_contexts
drwxr-xr-x root root 1970-01-01 01:00 res
drwx------ root root 2015-09-15 07:03 root
drwxr-x--- root root 1970-01-01 01:00 sbin
lrwxrwxrwx root root 1970-02-14 02:30 sdcard -> /storage/emula
ed/legacy
-rw-r--r-- root root 746 1970-01-01 01:00 seapp_contexts
-rw-r--r-- root root 76 1970-01-01 01:00 selinux_version
-rw-r--r-- root root 187085 1970-01-01 01:00 sepolicy
-rw-r--r-- root root 10475 1970-01-01 01:00 service_contexts
drwxr-x--x root sdcard_r 1970-02-14 02:30 storage
dr-xr-xr-x root root 1970-02-14 02:30 sys
drwxr-xr-x root root 2015-10-28 09:56 system
drwxr-xr-x root root 2015-10-28 09:55 tmp-mksh
lrwxrwxrwx root root 1970-02-14 02:30 tombstones -> /data/tomb
tones
-rw-r--r-- root root 323 1970-01-01 01:00 ueventd.goldfish.rc
-rw-r--r-- root root 11724 1970-01-01 01:00 ueventd.qcom.rc
-rw-r--r-- root root 4546 1970-01-01 01:00 ueventd.rc
lrwxrwxrwx root root 1970-02-14 02:30 vendor -> /system/vendor
-rw-r--r-- root root 524 1970-01-01 01:00 verity_key
[email protected]_Z00E_1:/ $ ls -la tmp-mksh
ls -la tmp-mksh
-rwxr-xr-x root root 285016 2015-10-28 09:55 tmp-mksh
[email protected]_Z00E_1:/ $ ls -la system/tmp
ls -la system/tmp
drwxrwx--- root root 2015-10-28 09:57 META-INF
-rw------- root root 5602 2015-10-28 10:05 flash-script.sh
drwxrwx--- root root 2015-10-28 09:57 system
[email protected]_Z00E_1:/ $ cp system/tmp/flash-script.sh tmp-mksh
cp system/tmp/flash-script.sh tmp-mksh
cp: system/tmp/flash-script.sh: Permission denied
1|[email protected]_Z00E_1:/ $ cd system/tmp
cd system/tmp
[email protected]_Z00E_1:/system/tmp $ su -c ./flash-script.sh
su -c ./flash-script.sh
tmp-mksh: ./flash-script.sh: can't execute: Permission denied
126|[email protected]_Z00E_1:/system/tmp $ su -c ./flash-script.sh
su -c ./flash-script.sh
tmp-mksh: ./flash-script.sh: can't execute: Permission denied
126|[email protected]_Z00E_1:/system/tmp $ su
su
[email protected]_Z00E_1:/system/tmp # ./flash-script.sh
./flash-script.sh
tmp-mksh: ./flash-script.sh: can't execute: Permission denied
126|[email protected]_Z00E_1:/system/tmp #
C:\Users\**********\Desktop\Xposed ZE500KL>adb shell
[email protected]_Z00E_1:/ $ su -c ./flash-script.sh
su -c ./flash-script.sh
tmp-mksh: ./flash-script.sh: not found
127|[email protected]_Z00E_1:/ $ chmod 777 tmp-mksh
chmod 777 tmp-mksh
Unable to chmod tmp-mksh: Read-only file system
10|[email protected]_Z00E_1:/ $ su
su
[email protected]_Z00E_1:/ # mount -o remount,rw /tmp-mksh
mount -o remount,rw /tmp-mksh
Usage: mount [-r] [-w] [-o options] [-t type] device directory
1|[email protected]_Z00E_1:/ # mount -o remount,rw /
mount -o remount,rw /
[email protected]_Z00E_1:/ # su -c mount -o remount,rw /
su -c mount -o remount,rw /
[email protected]_Z00E_1:/ # su -c mount -o remount,rw /tmp-mksh
su -c mount -o remount,rw /tmp-mksh
Usage: mount [-r] [-w] [-o options] [-t type] device directory
1|[email protected]_Z00E_1:/ # shell
shell
tmp-mksh: shell: not found
127|[email protected]_Z00E_1:/ # su -c mount -o remount,rw /tmp-mksh
su -c mount -o remount,rw /tmp-mksh
Usage: mount [-r] [-w] [-o options] [-t type] device directory
1|[email protected]_Z00E_1:/ # su -c mount -o remount,rw /tmp-mksh
su -c mount -o remount,rw /tmp-mksh
Usage: mount [-r] [-w] [-o options] [-t type] device directory
1|[email protected]_Z00E_1:/ # su -c mount -o remount,rw /system
su -c mount -o remount,rw /system
[email protected]_Z00E_1:/ # su -c mount -o remount,rw /
su -c mount -o remount,rw /
[email protected]_Z00E_1:/ # chmod 777 tmp-mksh
chmod 777 tmp-mksh
[email protected]_Z00E_1:/ # su -c ./flash-script.sh
su -c ./flash-script.sh
tmp-mksh: ./flash-script.sh: not found
127|[email protected]_Z00E_1:/ # su -c cp system/tmp/flash-script.sh /tmp-mksh
su -c cp system/tmp/flash-script.sh /tmp-mksh
[email protected]_Z00E_1:/ # su -c ./flash-script.sh
su -c ./flash-script.sh
tmp-mksh: ./flash-script.sh: not found
127|[email protected]_Z00E_1:/ # ls -la /tmp-mksh
ls -la /tmp-mksh
-rw------- root root 5602 2015-10-28 10:16 flash-script.sh
-rwxr-xr-x root root 285016 2015-10-28 09:55 tmp-mksh
[email protected]_Z00E_1:/ # shell
shell
tmp-mksh: shell: not found
127|[email protected]_Z00E_1:/ # cd tmp-mksh
cd tmp-mksh
[email protected]_Z00E_1:/tmp-mksh # ./flash-script.sh
./flash-script.sh
tmp-mksh: ./flash-script.sh: can't execute: Permission denied
126|[email protected]_Z00E_1:/tmp-mksh # chmod 777 flash-script.sh
chmod 777 flash-script.sh
[email protected]_Z00E_1:/tmp-mksh # ./flash-script.sh
./flash-script.sh
******************************
Xposed framework installer zip
******************************
- Mounting /system and /vendor read-write
- Checking environment
./flash-script.sh[113]: head: not found
./flash-script.sh[113]: sed: not found
./flash-script.sh[115]: cut: not found
./flash-script.sh[115]: head: not found
./flash-script.sh[115]: sed: not found
./flash-script.sh[116]: cut: not found
./flash-script.sh[116]: sed: not found
./flash-script.sh[116]: head: not found
./flash-script.sh[117]: head: not found
./flash-script.sh[117]: sed: not found
./flash-script.sh[119]: head: not found
./flash-script.sh[119]: sed: not found
./flash-script.sh[120]: sed: not found
./flash-script.sh[120]: head: not found
./flash-script.sh[121]: sed: not found
./flash-script.sh[121]: head: not found
./flash-script.sh[122]: head: not found
./flash-script.sh[122]: sed: not found
Xposed version:
! Wrong platform: arm
! This file is for:
! Please download the correct package
! for your platform/ROM!
1|[email protected]_Z00E_1:/tmp-mksh # ./flash-script.sh
Click to expand...
Click to collapse
SOLVED!
Code:
C:\Users\********\Desktop\Xposed ZE500KL>adb shell
[email protected]_Z00E_1:/ $ su -c mount -o remount,rw /
su -c mount -o remount,rw /
[email protected]_Z00E_1:/ $ su
su
[email protected]_Z00E_1:/ # mount -o remount,rw /system
mount -o remount,rw /system
[email protected]_Z00E_1:/ # mkdir /system/tmp
mkdir /system/tmp
mkdir failed for /system/tmp, File exists
255|[email protected]_Z00E_1:/ # mkdir /sdcard/tmp2
mkdir /sdcard/tmp2
mkdir failed for /sdcard/tmp2, File exists
255|[email protected]_Z00E_1:/ # ls -la /sdcard/tmp2
ls -la /sdcard/tmp2
drwxrwx--- root sdcard_r 2015-10-28 11:04 META-INF
-rw-rw---- root sdcard_r 5602 2015-10-28 11:04 flash-script.sh
drwxrwx--- root sdcard_r 2015-10-28 11:04 system
[email protected]_Z00E_1:/ # ls -la system/tmp
ls -la system/tmp
drwxrwx--- root root 2015-10-28 11:01 META-INF
-rwxrwxrwx root root 5602 2015-10-28 11:04 flash-script.sh
drwxrwx--- root root 2015-10-28 11:01 system
[email protected]_Z00E_1:/ # chmod 777 system/tmp/flash-script.sh
chmod 777 system/tmp/flash-script.sh
[email protected]_Z00E_1:/ # cd system/tmp
cd system/tmp
[email protected]_Z00E_1:/system/tmp # ./flash-script.sh
./flash-script.sh
******************************
Xposed framework installer zip
******************************
- Mounting /system and /vendor read-write
- Checking environment
Xposed version: 75
- Placing files
WARNING: linker: could not load library "libsigchain.so" from LD_PRELOAD for "gz
ip"; caused by library "libsigchain.so" not found
WARNING: linker: could not load library "libsigchain.so" from LD_PRELOAD for "ch
own"; caused by library "libsigchain.so" not found
WARNING: linker: could not load library "libsigchain.so" from LD_PRELOAD for "ch
mod"; caused by library "libsigchain.so" not found
WARNING: linker: could not load library "libsigchain.so" from LD_PRELOAD for "cp
"; caused by library "libsigchain.so" not found
- Done
[email protected]_Z00E_1:/system/tmp # reboot
reboot
To fix your problems you can try this, it worked for me, download this file and place it in the Jyrachy's Xposed ZE500KL folder (with "InstallXposedFramework" and "InstallXposedInstaller" files)
File: https://drive.google.com/file/d/0B7qd8mpcLFB2UGoxS1MwZExJOVk/view?usp=sharing
then after opening it write these commands in the shell
Code:
su
mount -o remount,rw /
mount -o remount,rw /system
chmod 777 system/tmp/flash-script.sh
cd system/tmp
./flash-script.sh
reboot
Click Here!
It's my way to install it. Thank you miau9202 and Jhyrarchy!
I'll update my tool.
but is strange worked onnmine at first try XD
Ok, i noticed one serious problem
Don't install Snapprefs with xposed. I did it, and when i wanted to reboot, some error appeared. So i click on soft reboot, and... android doesn't want to start
I'm flashing now my phone, and i hope it will boot
Ok, added a list of working and not working modules.
Also fixed the problem, i just added a recursive chmod to the /system/tmp folder before launching the script
96DANGER96 said:
SOLVED!
Code:
C:\Users\********\Desktop\Xposed ZE500KL>adb shell
[email protected]_Z00E_1:/ $ su -c mount -o remount,rw /
su -c mount -o remount,rw /
[email protected]_Z00E_1:/ $ su
su
[email protected]_Z00E_1:/ # mount -o remount,rw /system
mount -o remount,rw /system
[email protected]_Z00E_1:/ # mkdir /system/tmp
mkdir /system/tmp
mkdir failed for /system/tmp, File exists
255|[email protected]_Z00E_1:/ # mkdir /sdcard/tmp2
mkdir /sdcard/tmp2
mkdir failed for /sdcard/tmp2, File exists
255|[email protected]_Z00E_1:/ # ls -la /sdcard/tmp2
ls -la /sdcard/tmp2
drwxrwx--- root sdcard_r 2015-10-28 11:04 META-INF
-rw-rw---- root sdcard_r 5602 2015-10-28 11:04 flash-script.sh
drwxrwx--- root sdcard_r 2015-10-28 11:04 system
[email protected]_Z00E_1:/ # ls -la system/tmp
ls -la system/tmp
drwxrwx--- root root 2015-10-28 11:01 META-INF
-rwxrwxrwx root root 5602 2015-10-28 11:04 flash-script.sh
drwxrwx--- root root 2015-10-28 11:01 system
[email protected]_Z00E_1:/ # chmod 777 system/tmp/flash-script.sh
chmod 777 system/tmp/flash-script.sh
[email protected]_Z00E_1:/ # cd system/tmp
cd system/tmp
[email protected]_Z00E_1:/system/tmp # ./flash-script.sh
./flash-script.sh
******************************
Xposed framework installer zip
******************************
- Mounting /system and /vendor read-write
- Checking environment
Xposed version: 75
- Placing files
WARNING: linker: could not load library "libsigchain.so" from LD_PRELOAD for "gz
ip"; caused by library "libsigchain.so" not found
WARNING: linker: could not load library "libsigchain.so" from LD_PRELOAD for "ch
own"; caused by library "libsigchain.so" not found
WARNING: linker: could not load library "libsigchain.so" from LD_PRELOAD for "ch
mod"; caused by library "libsigchain.so" not found
WARNING: linker: could not load library "libsigchain.so" from LD_PRELOAD for "cp
"; caused by library "libsigchain.so" not found
- Done
[email protected]_Z00E_1:/system/tmp # reboot
reboot
To fix your problems you can try this, it worked for me, download this file and place it in the Jyrachy's Xposed ZE500KL folder (with "InstallXposedFramework" and "InstallXposedInstaller" files)
File: https://drive.google.com/file/d/0B7qd8mpcLFB2UGoxS1MwZExJOVk/view?usp=sharing
then after opening it write these commands in the shell
Code:
su
mount -o remount,rw /
mount -o remount,rw /system
chmod 777 system/tmp/flash-script.sh
cd system/tmp
./flash-script.sh
reboot
Click to expand...
Click to collapse
How come when I type the commands, the output is just a copy of what I just typed?
---------- Post added at 01:52 AM ---------- Previous post was at 01:15 AM ----------
bohenian said:
How come when I type the commands, the output is just a copy of what I just typed?
Click to expand...
Click to collapse
nevermind, I just figured it. Thanks again!
can you tell us as well what you've done ? thx
is this possible for ZE550KL? thanks
Added to index, thanks for your work!
is it safe for ze500kg? and how about gravitybox module does it working well?
cpuz99 said:
is it safe for ze500kg? and how about gravitybox module does it working well?
Click to expand...
Click to collapse
I couldn't get gravity box to works 100%.
I never tried personally on ZE500KG, but someone else said it works.
Why not work with a Stock Rom 1:13?
Mandrakerj said:
Why not work with a Stock Rom 1:13?
Click to expand...
Click to collapse
what do you mean?
I'm on stock and it worked

How To Guide How to change files in the boot image using Magisk

How to change files in the boot image using Magisk
Sometime it's necessary to change a file in the boot image used for booting an Android phone (for example to change the default properties that are used before Magisk is loaded)
To change or add files to the boot image for an Android phone the Magisk binary magiskboot can be used
magiskboot is
A tool to unpack / repack boot images, parse / patch / extract cpio, patch dtb, hex patch binaries, and compress / decompress files with multiple algorithms.
Click to expand...
Click to collapse
and can handle the boot images for all phones supported by Magisk.
Warning
Be aware that changes to the boot image only survive until the installation of the next OS update. So it's strongly recommended to use Magisk to change files from the OS if possible.
Anyway -- to change a file in the boot image open a shell as user root on the phone and do:
Notes:
The following instructions were done on Zenfone 8 running OmniROM 12 but should also work for other ROMs.
At the end of this post are the commands to unpack the boot partition and to recreate the boot partition listed for cut & paste.
Code:
#
# first create the directory tree for the work
#
# Note:
#
# This directory tree must be on a Unix filesystem like that mounted to /data;
# a filesystem like that mounted to /sdcard does not work
#
ASUS_I006D:/data/adb # cd /data/adb
ASUS_I006D:/data/adb # mkdir workdir
ASUS_I006D:/data/adb # mkdir workdir/backup
ASUS_I006D:/data/adb # mkdir workdir/ramdisk
ASUS_I006D:/data/adb # mkdir workdir/boot_files
ASUS_I006D:/data/adb #
Next get the current boot slot:
Code:
ASUS_I006D:/data/adb/workdir # getprop ro.boot.slot_suffix
_b
and create an image of the current boot partition:
Code:
#
ASUS_I006D:/ # cd /data/adb/workdir
ASUS_I006D:/data/adb/workdir #
ASUS_I006D:/data/adb/workdir # dd if=/dev/block/by-name/boot_b of=./boot_b.img
196608+0 records in
196608+0 records out
100663296 bytes (96 M) copied, 0.374815 s, 256 M/s
ASUS_I006D:/data/adb/workdir #
Create a backup of the original boot image file:
Code:
ASUS_I006D:/data/adb/workdir # cp boot_b.img backup/
ASUS_I006D:/data/adb/workdir #
Note:
You will need the boot image file just created to restore the boot partition in case the phone will not boot anymore with your changed boot partition. Therefor you should also copy the boot image file to your PC.
Next unpack the boot image using magiskboot into an empty directory:
Code:
ASUS_I006D:/data/adb/workdir # cd boot_files/
ASUS_I006D:/data/adb/workdir/boot_files # ls
ASUS_I006D:/data/adb/workdir/boot_files #
ASUS_I006D:/data/adb/workdir/boot_files # /data/adb/magisk/magiskboot unpack ../boot_b.img
Parsing boot image: [../boot_b.img]
HEADER_VER [3]
KERNEL_SZ [42025472]
RAMDISK_SZ [15093897]
OS_VERSION [12.0.0]
OS_PATCH_LEVEL [2022-05]
PAGESIZE [4096]
CMDLINE []
KERNEL_FMT [raw]
RAMDISK_FMT [gzip]
VBMETA
ASUS_I006D:/data/adb/workdir/boot_files #
magiskboot will split the boot.img file into the various parts -- for most phones with Android 12 this should be the kernel and the ramdisk:
Code:
ASUS_I006D:/data/adb/workdir/boot_files # ls -l
total 71264
-rw-r--r-- 1 root root 42025472 2022-09-18 18:22 kernel
-rw-r--r-- 1 root root 30864336 2022-09-18 18:22 ramdisk.cpio
ASUS_I006D:/data/adb/workdir/boot_files #
The files for the ramdisk used while booting the phone are in an cpio archive so to change them we must unpack the cpio archive with the ramdisk contents:
Code:
#
ASUS_I006D:/ # cd /data/adb/workdir/ramdisk/
ASUS_I006D:/data/adb/workdir/ramdisk #
130|ASUS_I006D:/data/adb/workdir/ramdisk # cpio -idm <../boot_files/ramdisk.cpio
ASUS_I006D:/data/adb/workdir/ramdisk # ls -ltr
total 1868
-rw-r--r-- 1 root root 20700 1970-01-01 01:00 vendor_property_contexts
-rw-r--r-- 1 root root 89884 1970-01-01 01:00 vendor_file_contexts
drwxr-xr-x 2 root root 3452 1970-01-01 01:00 vendor
drwxr-xr-x 2 root root 3452 1970-01-01 01:00 tmp
-rw-r--r-- 1 root root 5783 1970-01-01 01:00 system_ext_property_contexts
-rw-r--r-- 1 root root 3347 1970-01-01 01:00 system_ext_file_contexts
drwxr-xr-x 2 root root 3452 1970-01-01 01:00 system_ext
drwxr-xr-x 2 root root 3452 1970-01-01 01:00 sys
drwxr-x--x 2 root root 3452 1970-01-01 01:00 storage
-rw-r--r-- 1 root root 1027673 1970-01-01 01:00 sepolicy
drwxr-xr-x 2 root root 3452 1970-01-01 01:00 second_stage_resources
drwxr-xr-x 2 root root 3452 1970-01-01 01:00 sdcard
-rw-r--r-- 1 root root 31390 1970-01-01 01:00 prop.default
-rw-r--r-- 1 root root 1721 1970-01-01 01:00 product_property_contexts
-rw-r--r-- 1 root root 306 1970-01-01 01:00 product_file_contexts
drwxr-xr-x 2 root root 3452 1970-01-01 01:00 product
drwxr-xr-x 2 root root 3452 1970-01-01 01:00 proc
drwxr-xr-x 2 root root 3452 1970-01-01 01:00 postinstall
-rw-r--r-- 1 root root 76958 1970-01-01 01:00 plat_property_contexts
-rw-r--r-- 1 root root 40490 1970-01-01 01:00 plat_file_contexts
drwxr-xr-x 2 root root 3452 1970-01-01 01:00 oem
-rw-r--r-- 1 root root 0 1970-01-01 01:00 odm_property_contexts
-rw-r--r-- 1 root root 0 1970-01-01 01:00 odm_file_contexts
drwxr-xr-x 2 root root 3452 1970-01-01 01:00 mnt
drwxr-xr-x 2 root root 3452 1970-01-01 01:00 metadata
drwxr-xr-x 2 root root 3452 1970-01-01 01:00 linkerconfig
-rwxr-x--- 1 root root 2025 1970-01-01 01:00 init.recovery.qcom.rc
-rwxr-x--- 1 root root 491528 1970-01-01 01:00 init
lrwxrwxrwx 1 root root 11 1970-01-01 01:00 etc -> /system/etc
drwxr-xr-x 2 root root 3452 1970-01-01 01:00 dev
lrwxrwxrwx 1 root root 12 1970-01-01 01:00 default.prop -> prop.default
drwxr-xr-x 2 root root 3452 1970-01-01 01:00 debug_ramdisk
drwxr-xr-x 2 root root 3452 1970-01-01 01:00 data_mirror
drwxr-x--x 2 root root 3452 1970-01-01 01:00 data
lrwxrwxrwx 1 root root 17 1970-01-01 01:00 d -> /sys/kernel/debug
dr-xr-xr-x 2 root root 3452 1970-01-01 01:00 config
lrwxrwxrwx 1 root root 50 1970-01-01 01:00 bugreports -> /data/user_de/0/com.android.shell/files/bugreports
lrwxrwxrwx 1 root root 11 1970-01-01 01:00 bin -> /system/bin
drwxr-xr-x 2 root root 3452 1970-01-01 01:00 batinfo
drwxr-xr-x 2 root root 3452 1970-01-01 01:00 asdf
drwxr-xr-x 2 root root 3452 1970-01-01 01:00 apex
drwxr-xr-x 2 root root 3452 1970-01-01 01:00 acct
drwxr-xr-x 2 root root 3452 1970-01-01 01:00 APD
drwxr-xr-x 2 root root 3452 1970-01-01 01:00 ADF
drwxr-xr-x 4 root root 3452 2022-09-18 18:28 first_stage_ramdisk
drwxr-x--- 3 root root 3452 2022-09-18 18:28 overlay.d
drwxr-xr-x 2 root root 3452 2022-09-18 18:28 odm_dlkm
drwxr-xr-x 2 root root 3452 2022-09-18 18:28 odm
drwxr-xr-x 3 root root 3452 2022-09-18 18:28 res
drwxr-xr-x 5 root root 3452 2022-09-18 18:28 system
drwxr-xr-x 2 root root 3452 2022-09-18 18:28 vendor_dlkm
ASUS_I006D:/data/adb/workdir/ramdisk #
Now you can change the files from the ramdisk; add new files, or do anything necessary.
Be aware that most of the directories in the ramdisk are mount points to mount the other partitions. Therefor it's quite pointless to add files in these directories in the ramdisk.
Changing files in the ramdisk from the boot image
Changing one or more properties
Warning:
Please note that I am not an expert on Android internals and the following may be completely wrong.
(Any comments or corrections are welcome)
There are some files with property definitions in the boot image:
Code:
ASUS_I006D:/data/adb/workdir/ramdisk # find . -name "*.prop"
./default.prop
./system/etc/ramdisk/build.prop
ASUS_I006D:/data/adb/workdir/ramdisk #
To change or add a property it should be sufficient to add or change it in the file default.prop in the ramdisk from the boot image. But that does not work (at least in my tests...)
So to change or add a property it must be added to the file
/system/etc/ramdisk/build.prop
in the ramdisk for the boot image.
For example to add a swap device with 2 GB in the OmniROM these properties can be used:
Code:
#
# define the size for the device zram0 (use the postfix G for values in Gigabytes or M for values in Megabytes)
#
vendor.zram.disksize=2147483648
vendor.zram.enable=1
The result after repacking and installing the boot image :
Code:
ASUS_I006D:/ # id
uid=0(root) gid=0(root) groups=0(root) context=u:r:magisk:s0
ASUS_I006D:/ #
ASUS_I006D:/data/adb/workdir/ramdisk # getprop vendor.zram.disksize
2147483648
ASUS_I006D:/data/adb/workdir/ramdisk # vendor.zram.enable
1
ASUS_I006D:/data/adb/workdir/ramdisk #
1|ASUS_I006D:/data/adb/workdir/ramdisk # free
total used free shared buffers
Mem: 7612493824 4858556416 2753937408 12169216 15933440
-/+ buffers/cache: 4842622976 2769870848
Swap: 2147479552 0 2147479552
ASUS_I006D:/data/adb/workdir/ramdisk #
Notes:
These new properties defined in the file /system/etc/ramdisk/build.prop in the ramdisk are only visible for the root user.
Most probably another SELinux definition in one of the *context* files in the boot image is required to make the property visible for all users (but I don't know the necessary permissions for the properties to make them visible for all user). The current SELinx context for these properties is defined in the file vendor_property_contexts in the root directory of the ramdisk from the boot image:
Code:
ASUS_I006D:/data/adb/workdir/ramdisk # grep zram vendor_property_contexts
vendor.zram.disksize u:object_r:vendor_exported_system_prop:s0
vendor.zram.enable u:object_r:vendor_exported_system_prop:s0
persist.vendor.zram u:object_r:vendor_mpctl_prop:s0
vendor.asus.zram u:object_r:vendor_mpctl_prop:s0
vendor.zram. u:object_r:vendor_mpctl_prop:s0
ASUS_I006D:/data/adb/workdir/ramdisk #
To add a new property without a specific SELInux context it seems to be sufficient to add the property to the file /system/etc/ramdisk/build.prop in the ramdisk from the boot image (this does not work for properties starting with vendor. ):
Code:
# add the property to the file
#
130|ASUS_I006D:/ # tail -3 /data/adb/workdir/ramdisk/system/etc/ramdisk/build.prop
build.mysettings.variable01.value=5555
#
# end of file
ASUS_I006D:/ #
After the reboot the property is visible for non-root user:
Code:
ASUS_I006D:/ $ id
uid=2000(shell) gid=2000(shell) groups=2000(shell),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),1078(ext_data_rw),1079(ext_obb_rw),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats),3009(readproc),3011(uhid),3012(readtracefs) context=u:r:shell:s0
ASUS_I006D:/ $
ASUS_I006D:/ $ getprop build.mysettings.variable01.value
5555
ASUS_I006D:/ $
But the new property can only be changed by the user root:
Code:
1|ASUS_I006D:/ $ id
uid=2000(shell) gid=2000(shell) groups=2000(shell),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),1078(ext_data_rw),1079(ext_obb_rw),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats),3009(readproc),3011(uhid),3012(readtracefs) context=u:r:shell:s0
ASUS_I006D:/ $
ASUS_I006D:/ $ setprop build.mysettings.variable01.value 7777
Failed to set property 'build.mysettings.variable01.value' to '7777'.
See dmesg for error reason.
1|ASUS_I006D:/ $
1|ASUS_I006D:/ $ su -
ASUS_I006D:/ #
ASUS_I006D:/ # id
uid=0(root) gid=0(root) groups=0(root) context=u:r:magisk:s0
ASUS_I006D:/ #
ASUS_I006D:/ # setprop build.mysettings.variable01.value 7777
ASUS_I006D:/ #
ASUS_I006D:/ # getprop build.mysettings.variable01.value
7777
ASUS_I006D:/ #
ASUS_I006D:/ # ^D
ASUS_I006D:/ $ id
uid=2000(shell) gid=2000(shell) groups=2000(shell),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),1078(ext_data_rw),1079(ext_obb_rw),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats),3009(readproc),3011(uhid),3012(readtracefs) context=u:r:shell:s0
ASUS_I006D:/ $ getprop build.mysettings.variable01.value
7777
ASUS_I006D:/ $
(see here https://source.android.com/docs/core/architecture/configuration/add-system-properties for details about defining properties)
When done with your changes repack the ramdisk.
First we recreate the cpio archive:
Code:
ASUS_I006D:/data/adb/workdir # cd /data/adb/workdir/ramdisk
ASUS_I006D:/data/adb/workdir/ramdisk #
ASUS_I006D:/data/adb/workdir/ramdisk # find . | cpio -o >../boot_files/ramdisk.cpio
ASUS_I006D:/data/adb/workdir/ramdisk #
ASUS_I006D:/data/adb/workdir/ramdisk # ls -l ../boot_files/ramdisk.cpio
-rw-r--r-- 1 root root 30865560 2022-09-18 18:31 ../boot_files/ramdisk.cpio
ASUS_I006D:/data/adb/workdir/ramdisk #
And then we recreate the boot image with the kernel and the changed ramdisk using magiskboot:
Code:
ASUS_I006D:/data/adb/workdir/ramdisk # cd /data/adb/workdir/boot_files/
ASUS_I006D:/data/adb/workdir/boot_files #
130|ASUS_I006D:/data/adb/workdir/boot_files # /data/adb/magisk/magiskboot repack ../boot_b.img ../boot_b.img.new
Parsing boot image: [../boot_b.img]
HEADER_VER [3]
KERNEL_SZ [42025472]
RAMDISK_SZ [15093897]
OS_VERSION [12.0.0]
OS_PATCH_LEVEL [2022-05]
PAGESIZE [4096]
CMDLINE []
KERNEL_FMT [raw]
RAMDISK_FMT [gzip]
VBMETA
Repack to boot image: [../boot_b.img.new]
HEADER_VER [3]
KERNEL_SZ [42025472]
RAMDISK_SZ [15094405]
OS_VERSION [12.0.0]
OS_PATCH_LEVEL [2022-05]
PAGESIZE [4096]
CMDLINE []
ASUS_I006D:/data/adb/workdir/boot_files #
ASUS_I006D:/data/adb/workdir/boot_files # ls -l ../boot_b.img ../boot_b.img.new
-rw-r--r-- 1 root root 100663296 2022-09-18 18:20 ../boot_b.img
-rw-r--r-- 1 root root 100663296 2022-09-18 18:34 ../boot_b.img.new
ASUS_I006D:/data/adb/workdir/boot_files #
The new boot image file can now be written to the boot partition (either via dd or fastboot):
Code:
ASUS_I006D:/data/adb/workdir # cd /data/adb/workdir
ASUS_I006D:/data/adb/workdir # dd if=./boot_b.img.new of=/dev/block/by-name/boot_b
196608+0 records in
196608+0 records out
100663296 bytes (96 M) copied, 5.324559 s, 18 M/s
ASUS_I006D:/data/adb/workdir #
That's it -- now the new boot image should be used for the next reboots of the phone.
Additional infos
Please note that the file /system/etc/ramdisk/build.prop does not exist in the ramdisk from the boot disk used in the Original Android 12 for the ASUS Zenfone 8 . So this approach to change the properties does not work in that OS.
But the general approach used in these instructions to change files in the ramdisk used for the boot image does also work in the Original Android 12 for the ASUS Zenfone 8.
In the OmniROM for the Zenfone 8 and also in the Original Android 10 for the Zenfone 8 the swap device is created and configured with this init script: /vendor/bin/init.asus.zram.sh
See here
How to disable or change the swap device in the Android 12 from ASUS for the Zenfone 8
for a method using Magisk to change the swap device config in the Original ASUS Android 12
See here
How to create a swap device in the OmniROM 12 using Magisk
for a method using Magisk to change the swap device config in the OnmiROM 12
Replace files in the root directory
Magisk also supports changing files in the root directory via an overlay system -- see the section Root Directory Overlay System in this page https://github.com/topjohnwu/Magisk/blob/master/docs/guides.md.
To use this feature it's also neccessary to unpack and repack the boot partition.
An example about how to use this feature is here:
Magisk overlay - execute a script or copy files
Another example is in this thread https://github.com/topjohnwu/Magisk/issues/2978
Including sample code to use magiskboot to change files in the ramdisk from the boot partition:
Code:
./magiskboot unpack boot_root.img
./magiskboot cpio ramdisk.cpio \
"mkdir 0700 overlay.d" \
"add 0700 overlay.d/init.custom.rc init.custom.rc" \
"mkdir 0700 overlay.d/sbin" \
"add 0700 overlay.d/sbin/custom.sh init.custom.sh"
./magiskboot repack boot_root.img
Another example for this techniquie is in this post:
How to enable access via adb on a new installed OS
Trouble Shooting
If the phone does not boot anymore with the changed boot partition restore the boot partition from the boot image file created at the beginning either via dd after booting from a recovery image like TWRP or using fastboot to flash the boot paritition.
It's important to at least unpack the cpio with the ramdisk contents on an Unix filesystem (e.g. ext3, ext4, etc) - this can not be done in the device mounted to /sdcard.
Instructions for cut & paste
The instructions below are for cut & paste. Be aware that there is no error checking.
Instructions to copy the boot partition to a boot image file and to unpack the boot image and the ramdisk
Code:
CUR_SLOT=$( getprop ro.boot.slot_suffix )
cd /data/adb
mkdir /data/adb/workdir
mkdir /data/adb/workdir/backup
mkdir /data/adb/workdir/ramdisk
mkdir /data/adb/workdir/boot_files
cd /data/adb/workdir
dd if=/dev/block/by-name/boot${CUR_SLOT} of=./boot${CUR_SLOT}.img
cp boot_b.img backup/
cd boot_files
/data/adb/magisk/magiskboot unpack ../boot${CUR_SLOT}.img
cd /data/adb/workdir/ramdisk
cpio -idm <../boot_files/ramdisk.cpio
pwd
ls -ltr
Instructions to repack the ramdisk and the boot image and to rewrite the boot partition
Code:
CUR_SLOT=$( getprop ro.boot.slot_suffix )
cd /data/adb/workdir/ramdisk/
find . | cpio -o >../boot_files/ramdisk.cpio
cd /data/adb/workdir/boot_files/
/data/adb/magisk/magiskboot repack ../boot${CUR_SLOT}.img ../boot${CUR_SLOT}.img.new
cd /data/adb/workdir
dd if=./boot${CUR_SLOT}.img.new of=/dev/block/by-name/boot${CUR_SLOT}
reboot
History
30.09.2022/bs
add infos about changing files in the root directory via Magisk overlays
02.11.2022/bs
see How to process Android boot image files on a PC running the Linux OS for instructions about using magiskboot on a machine running the Linux OS
30.12.2022 /bs
Changed the links in this post to match the title of the linked post
Added a link to the new post to enable adb access
Thank you man!!!!! I used to make use of the mkbootimg_tools, but that ended up throwing errors saying it can't find "mkbootimg" I'm so glad I found this you spared me a huge headache. It ended up working really damn well
Tested device:
BLU View 2
Android 10
Rooted with Magisk/Unlocked bl
Сan i patch the adbd binary with magisktool? If the answer is yes, then where is the adbd binary in ramdisk? Or do I need to use another tool?
I apologize for the stupid questions, I'm new to this field
nom_ said:
Сan i patch the adbd binary with magisktool? If the answer is yes, then where is the adbd binary in ramdisk? Or do I need to use another tool?
I apologize for the stupid questions, I'm new to this field
Click to expand...
Click to collapse
What do you want to achieve?
"adbd binary" is the adb daemon running on the phone? And your goal is to replace the adb daemon with a patched version?
regards
Bernd
bnsmb said:
What do you want to achieve?
"adbd binary" is the adb daemon running on the phone? And your goal is to replace the adb daemon with a patched version?
regards
Bernd
Click to expand...
Click to collapse
Yes, by this guide: https://harrisonsand.com/posts/patching-adb-root/
I want to use adb root, but it's throws this error "adb cannot run as root in production builds"
nom_ said:
Yes, by this guide: https://harrisonsand.com/posts/patching-adb-root/
I want to use adb root, but it's throws this error "adb cannot run as root in production builds"
Click to expand...
Click to collapse
Well , then just extract the boot image ; unpack the ramdisk , search for the adbd in the files from the ramdisk using
find <dir_with_unpacked_ramdisk> -name adbd
or something similar (in the ramdisk from the boot image for OmniROM 13 the adbd is in the directory ./system/bin/) ; patch the adbd binary, and recreate the ramdisk and the boot image as described above .
This must be done after every OS update so I recommend to better use Magisk for getting root access if possible.
regards
Bernd
bnsmb said:
Well , then just extract the boot image ; unpack the ramdisk , search for the adbd in the files from the ramdisk using
find <dir_with_unpacked_ramdisk> -name adbd
or something similar (in the ramdisk from the boot image for OmniROM 13 the adbd is in the directory ./system/bin/) ; patch the adbd binary, and recreate the ramdisk and the boot image as described above .
This must be done after every OS update so I recommend to better use Magisk for getting root access if possible.
regards
Bernd
Click to expand...
Click to collapse
Thank you Bernd)!
@nom_ - Were you able to make this work?
CC: @bnsmb
I believe post Android 11, all vendor-specific information is factored out of the boot partition and relocated into a new vendor_boot partition.[1]
I was able to extract the vendor_boot image using this, but curious as to how to boot via vendor_boot image?
If I flash it using fastboot, my device goes into a boot loop.
Code:
fastboot flash vendor_boot vendor_boot.img.
How can the /system/bin dir this be repacked within ramdisk as boot img?
[1] https://source.android.com/docs/core/architecture/partitions/vendor-boot-partitions
Rev_786 said:
@nom_ - Were you able to make this work?
CC: @bnsmb
I believe post Android 11, all vendor-specific information is factored out of the boot partition and relocated into a new vendor_boot partition.[1]
I was able to extract the vendor_boot image using this, but curious as to how to boot via vendor_boot image?
If I flash it using fastboot, my device goes into a boot loop.
Code:
fastboot flash vendor_boot vendor_boot.img.
How can the /system/bin dir this be repacked within ramdisk as boot img?
[1] https://source.android.com/docs/core/architecture/partitions/vendor-boot-partitions
Click to expand...
Click to collapse
HI
what do you want to achieve?
regards
Bernd
bnsmb said:
HI
what do you want to achieve?
regards
Bernd
Click to expand...
Click to collapse
Boot by adding custom system binaries in vendor_boot img
(For example, the patched adbd which is discussed)
Rev_786 said:
Boot by adding custom system binaries in vendor_boot img
(For example, the patched adbd which is discussed)
Click to expand...
Click to collapse
I doubt that replacing files in the vendor_boot.img can be done easily ... I recommend to use Magisk to do that:
https://forum.xda-developers.com/t/how-to-change-files-in-the-directory-system-with-magisk.4454489/
see the section beginning with "This method can also be used to replace files in the directories /vendor, /product, or /system_ext:"
If that does not work you might try this approach:
https://forum.xda-developers.com/t/how-to-change-files-in-the-directory-system-with-magisk.4454489/
regards
Bernd
I want to add custom.init.rc with this code
```
./magiskboot unpack boot_root.img
./magiskboot cpio ramdisk.cpio \
"mkdir 0700 overlay.d" \
"add 0700 overlay.d/init.custom.rc init.custom.rc" \
"mkdir 0700 overlay.d/sbin" \
"add 0700 overlay.d/sbin/custom.sh init.custom.sh"
./magiskboot repack boot_root.img
```
After reboot my phone doing nothing, check file /sbin/custom.sh is existed, but /init.custom.rc not exist.
A10 Pixel Experience Redmi4x
alfanveykov said:
I want to add custom.init.rc with this code
```
./magiskboot unpack boot_root.img
./magiskboot cpio ramdisk.cpio \
"mkdir 0700 overlay.d" \
"add 0700 overlay.d/init.custom.rc init.custom.rc" \
"mkdir 0700 overlay.d/sbin" \
"add 0700 overlay.d/sbin/custom.sh init.custom.sh"
./magiskboot repack boot_root.img
```
After reboot my phone doing nothing, check file /sbin/custom.sh is existed, but /init.custom.rc not exist.
A10 Pixel Experience Redmi4x
Click to expand...
Click to collapse
That work's like designed. Excerpt from the Magisk developer guide https://topjohnwu.github.io/Magisk/guides.html:
Each *.rc file (except for init.rc) in overlay.d will be read and concatenated AFTER init.rc if it does not exist in the root directory, otherwise it will REPLACE the existing one.
Click to expand...
Click to collapse
The *rc files will be read and processed while booting the Android OS -- Magisk will not copy them to the boot partition. And that make sense because the *rc files in Android are not used at all after the boot process finished.
To be able to test in the running Android OS if an additional *rc file is processed I recommend to add instructions to set a new property while booting the OS, e.g.:
Spoiler: cat init.custom.rc
Code:
ASUS_I006D:/data/develop # cat init.custom.rc
on property:bs.test.prop01=1
setprop bs.test.prop02 "1"
on property:bs.test.prop01=0
setprop bs.test.prop02 "0"
service test_service_001 /system/bin/sh /data/develop/init001.custom.sh
user root
group root
disabled
seclabel u:r:magisk:s0
oneshot
service test_service_002 /system/bin/sh ${MAGISKTMP}/init002.custom.sh
user root
group root
disabled
seclabel u:r:magisk:s0
oneshot
on property:bs.test.prop01=9
exec u:r:magisk:s0 -- /system/bin/sh /data/develop/init.custom001.sh 001
on property:bs.test.prop01=8
exec u:r:magisk:s0 -- /system/bin/sh ${MAGISKTMP}/init.custom002.sh 000
on property:bs.test.prop02=10
start test_service_001
on property:bs.test.prop02=20
start test_service_002
on early-init
setprop bs.test.prop01 "111"
setprop bs.test.prop02 "222"
ASUS_I006D:/data/develop #
The commands in the section "on early-init"
Code:
on early-init
setprop bs.test.prop01 "111"
setprop bs.test.prop02 "222"
can be used to check if the *rc file was processed:
Code:
ASUS_I006D:/ $ uptime
21:14:00 up 0 min, 0 users, load average: 1.86, 0.44, 0.14
ASUS_I006D:/ $ getprop bs.test.prop01
111
ASUS_I006D:/ $ getprop bs.test.prop02
222
ASUS_I006D:/ $
If the properties are not set the *rc file was not processed. Most probably there is a syntax error in that file.
And for the records:
Note that the new properties can only be read by non-root user; non-root users can not change them:
Code:
ASUS_I006D:/ $ id
uid=2000(shell) gid=2000(shell) groups=2000(shell),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),1078(ext_data_rw),1079(ext_obb_rw),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats),3009(readproc),3011(uhid),3012(readtracefs) context=u:r:shell:s0
ASUS_I006D:/ $ setprop bs.test.prop02 999
Failed to set property 'bs.test.prop02' to '999'.
See dmesg for error reason.
1|ASUS_I006D:/ $
The new property can only be changed by the user root:
Code:
ASUS_I006D:/ $ su - -c setprop bs.test.prop02 999
ASUS_I006D:/ $
ASUS_I006D:/ $ getprop bs.test.prop02
999
ASUS_I006D:/ $
To enable non-root user to change these new properties a correct SELinux context must be defined for the properties.
You should also be aware of this issue - again an excerpt from the Magisk Developer Guide https://topjohnwu.github.io/Magisk/guides.html:
Starting from Android 11, the /sbin folder may no longer exists, and in that scenario, Magisk randomly generates a different tmpfs folder each boot. Every occurrence of the pattern ${MAGISKTMP} in your *.rc scripts will be replaced with the Magisk tmpfs folder when magiskinit injects it into init.rc. On pre Android 11 devices, ${MAGISKTMP} will simply be replaced with /sbin, so NEVER hardcode /sbin in the *.rc scripts when referencing these additional files.
Click to expand...
Click to collapse
regards
Bernd

How To Guide How to add additional files to an TWRP image

How to add additonal files to an TWRP image
The recovery image TWRP is very useful for the maintenance of the Android OS.
It's the Swiss Army knife for maintaining phones running the Android OS but sometimes you might miss some files in the TWRP recovery.
To add additional files to an TWRP image the instructions from the HowTo How to change files in the boot image can be used.
To make sure that the new files are also added to an TWRP installed in the boot partition additional steps are necessary.
To unpack and repack the TWRP image the Magisk binary magiskboot is necessary. This binary is part of TWRP so creating the new image should be done while the phone is booted from the TWRP image.
So to add additional files to an TWRP image do:
Bash:
# boot into the TWRP image
#
adb reboot bootloader
sudo fastboot boot /data/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-0-I006D.img
Wait until booting the TWRP image is done and open an adb shell
Bash:
adb shell
Create some directories for the work on the phone:
Bash:
mkdir -p /data/develop/workdir/twrp/ramdisk
Copy the TWRP image file from your PC to the working directory on the phone
Bash:
adb push twrp-3.7.0_12-0-I006D.img /data/develop/workdir/twrp
Unpack the image file:
Bash:
cd /data/develop/workdir/twrp
magiskboot unpack -h twrp-3.7.0_12-0-I006D.img
e.g.
Code:
ASUS_I006D:/data/develop/workdir/twrp # magiskboot unpack -h twrp-3.7.0_12-0-I006D.img
Parsing boot image: [twrp-3.7.0_12-0-I006D.img]
HEADER_VER [3]
KERNEL_SZ [18627321]
RAMDISK_SZ [34811448]
OS_VERSION [99.87.36]
OS_PATCH_LEVEL [2099-12]
PAGESIZE [4096]
CMDLINE [twrpfastboot=1]
KERNEL_FMT [gzip]
RAMDISK_FMT [gzip]
VBMETA
ASUS_I006D:/data/develop/workdir/twrp #
ASUS_I006D:/data/develop/workdir/twrp # ls -ltr
total 324223
-rw-rw---- 1 u0_a119 media_rw 100663296 2022-10-12 13:38 twrp-3.7.0_12-0-I006D.img
-rw-r--r-- 1 root root 100663296 2022-10-28 15:55 new-boot.img
-rw-rw-rw- 1 root root 66 2022-10-28 16:14 header
-rw-r--r-- 1 root root 41943552 2022-10-28 16:14 kernel
-rw-r--r-- 1 root root 88384000 2022-10-28 16:14 ramdisk.cpio
drwxrwxrwx 2 root root 3452 2022-10-28 16:15 ramdisk
ASUS_I006D:/data/develop/workdir/twrp #
Unpack the ramdisk from the TWRP image:
Bash:
cd /data/develop/workdir/twrp/ramdisk
cpio -idm <../ramdisk.cpio
The directory /data/develop/workdir/twrp/ramdisk now contains the contents of the ramdisk used for TWRP.
Now add the new files for the image to the directory /data/develop/workdir/twrp/ramdisk:
In this example we will add the binaries zsh, sqlite3, and vi.
Bash:
cd /data/develop/workdir/twrp/ramdisk
cp ../../newfiles/sqlite3 ./system/bin/
cp ../../newfiles/zsh ./system/bin/
cp ../../newfiles/vi ./system/bin/
Note:
In case you want to add new binaries :
To check if the binaries will work in TWRP execute the binaries while the phone is booted from the original TWRP image. If the binaries need additional libraries not included in TWRP just also add them to the TWRP image into the directory ./system/lib64 of the image.
The next step is necessary to make sure that TWRP will copy the new files also to a TWRP installation in a boot partition:
For each new file add an entry to the files
./ramdisk-files.sha256sum
./ramdisk-files.txt
in the directory with the contents from the ramdisk.
The file ramdisk-files.txt contains the name and path of the files used in the ramdisk for the boot partition and the file ramdisk-files.sha256sum contains the checksum for each of the files for the ramdisk.
Note:
If you change an existing file that is mentioned in the file ./ramdisk-files.sha256sum you must also correct the entry in that file.
So do for each new file:
echo <file_with_path_not_starting_with_a_dot_or_slash> >>ramdisk-files.txt ; done
sh256sum <file_with_path_startinge with_a_slash> >>ramdisk-files.sha256sum
e.g:
Code:
ASUS_I006D:/data/develop/workdir/twrp/ramdisk # for i in system/bin/sqlite3 system/bin/vi system/bin/zsh ; do sha256sum ./$i >>ramdisk-files.sha256sum ; echo "$i" >>ramdisk-files.txt ; done
ASUS_I006D:/data/develop/workdir/twrp/ramdisk #
Check the result.
Code:
ASUS_I006D:/data/develop/workdir/twrp/ramdisk # tail -4 ramdisk-files.sha256sum
8a8ff76cbda445f08ba3552598085089883f9d594cd7716e90f3411a8b82f8a0 ./twres/fonts/DroidSansMono.ttf
09fcec146d9ecba0f2a0b7362b52d2f87607a3c5760c94ba5fcd900e423e16f8 ./system/bin/sqlite3
3a221d10ffc275cadaf79fb1a00c39c9083ce672ea111205301e277091a04b51 ./system/bin/vi
354e415da42503ed4211907adf93ed8bfb14ce2e2d8418fcd7a3227873b4b53f ./system/bin/zsh
ASUS_I006D:/data/develop/workdir/twrp/ramdisk #
ASUS_I006D:/data/develop/workdir/twrp/ramdisk # tail -4 ramdisk-files.txt
twres/fonts/DroidSansMono.ttf
system/bin/sqlite3
system/bin/vi
system/bin/zsh
ASUS_I006D:/data/develop/workdir/twrp/ramdisk #
Correct the entry for the file ramdisk-files.txt in the file ramdisk-files.sha256sum :
Bash:
cd /data/develop/workdir/twrp/ramdisk
cp ./ramdisk-files.sha256sum ./ramdisk-files.sha256sum.org
NEW_ENTRY="$( sha256sum ./ramdisk-files.txt )" && sed -i -e "s#.*\./ramdisk-files.txt#${NEW_ENTRY}#g" ./ramdisk-files.sha256sum
Check the entries in the file ramdisk-files.sha256sum
Bash:
sha256sum --status -c ./ramdisk-files.sha256sum ; echo $?
If the output of that command is not 0 use
Bash:
sha256sum -c ./ramdisk-files.sha256sum | grep -v OK
to get the entry with the invalid checksum. Fix the entry and check again.
Now repack the ramdisk:
Bash:
cd /data/develop/workdir/twrp/ramdisk
find . | cpio -o >../ramdisk.cpio
And recreate the image file:
Bash:
cd /data/develop/workdir/twrp
magiskboot repack twrp-3.7.0_12-0-I006D.img
e.g
Code:
ASUS_I006D:/data/develop/workdir/twrp # magiskboot repack twrp-3.7.0_12-0-I006D.img
Parsing boot image: [twrp-3.7.0_12-0-I006D.img]
HEADER_VER [3]
KERNEL_SZ [18627321]
RAMDISK_SZ [34811448]
OS_VERSION [99.87.36]
OS_PATCH_LEVEL [2099-12]
PAGESIZE [4096]
CMDLINE [twrpfastboot=1]
KERNEL_FMT [gzip]
RAMDISK_FMT [gzip]
VBMETA
Repack to boot image: [new-boot.img]
HEADER_VER [3]
KERNEL_SZ [18618540]
RAMDISK_SZ [37358888]
OS_VERSION [99.87.36]
OS_PATCH_LEVEL [2099-12]
PAGESIZE [4096]
CMDLINE [twrpfastboot=1]
ASUS_I006D:/data/develop/workdir/twrp #
The file new-boot.img contains the TWRP image with the additional files.:
ASUS_I006D:/data/develop/workdir/twrp # ls -ltr new-boot.img
-rw-r--r-- 1 root root 100663296 2022-10-28 16:28 new-boot.img
ASUS_I006D:/data/develop/workdir/twrp #
To test the image, rename the file, copy the file to an PC and boot the phone from the image:
Bash:
mv new-boot.img twrp-3.7.0_12-0-I006D-enhanced.img
Execute on the PC:
Bash:
adb pull /data/develop/workdir/twrp/twrp-3.7.0_12-0-I006D-enhanced.img
adb reboot bootloader
sudo fastboot boot twrp-3.7.0_12-0-I006D-enhanced.img
Connect via adb to the phone booted from the new TWRP image and check the result:
Code:
ASUS_I006D:/ # ls -l /system/bin/zsh /system/bin/sqlite3 /system/bin/vi
-rwxr-xr-x 1 root root 1714720 2022-10-28 16:19 /system/bin/sqlite3
-rwxr-xr-x 1 root root 1815152 2022-10-28 16:19 /system/bin/vi
-rwxr-xr-x 1 root root 2004808 2022-10-28 16:19 /system/bin/zsh
ASUS_I006D:/ #
ASUS_I006D:/ # /system/bin/sqlite3 --version
3.39.3 2022-09-05 11:02:23 4635f4a69c8c2a8df242b384a992aea71224e39a2ccab42d8c0b0602f1e826e8
ASUS_I006D:/ #
ASUS_I006D:/ # /system/bin/vi --version | head -1
VIM - Vi IMproved 8.1 (2018 May 18)
ASUS_I006D:/ #
ASUS_I006D:/ # /system/bin/zsh --version
zsh 5.9 (aarch64-unknown-linux-android)
ASUS_I006D:/ #
Advanced Usage
To be able to distinguish the new image from the original one you can change or add values in the file ./default.prop in the ramdisk for the image, e.g.:
Bash:
# before creating the new ramdisk
cd /data/develop/workdir/twrp/ramdisk
echo "ro.product.type=enhanced" >>default.prop
Then when booted from the image you can check the new property, e.g.:
Code:
ASUS_I006D:/ # getprop ro.product.type
enhanced
ASUS_I006D:/ #
Notes:
The file default.prop is not listed in the checksum file ramdisk-files.sha256sum for the image.
Adding new files to ramdisk-files.sha256sum is not mandatory but recommended
To add files to the image that should not be copied to an TWRP installation in a boot partition just add them to the ramdisk but not to the file ramdisk-files.txt.
see also How to install TWRP via script
Update 28.11.2022 /bs
see als How to compile TWRP for the ASUS Zenfone 8

How To Guide How to change any file or directory using Magisk

To change a file (or directory) in one of the read-only mounted filesystems in the Android OS Magisk can be used.
(see How to change files in the directory /system with Magisk and How to make files in /system writable )
But this method only works for files in the directories /system, /vendor, /product, or /system_ext.
In current Android OS implementations there are a lot of other directories on read-only filesystems with files that must be changed or replaced to change the behaviour of Android.
For example on some Android implementations the boot animation is in the file /my_product/media/bootanimation/bootanimation.zip. The standard mechanism to change a file on a read-only mounted filesystem via Magisk can not be used to replace this file with another file.
But Magisk also supports executing scripts while booting the phone (see How to run a script at every boot using Magisk)
And the Magisk init scripts in the directory /data/adb/post-fs-data.d are executed early in the boot process. Therefor we can create a Magisk init script to replace any file with another file using the same method Magisk is using (that is a "mount -o bind ..." ):
Note
All commands in this Howto must be done by the user root.
Example
To replace the boot animation with another one copy the ZIP file with the new boot animation to the directory /data/adb (or any other read-write mounted directory available early in the boot process), e.g:
Code:
ASUS_I006D:/data # ls -l /data/adb/Earth_bootanimation.zip
-rw-r--r-- 1 u0_a130 media_rw 13227720 2022-04-16 10:58 /data/adb/Earth_bootanimation.zip
ASUS_I006D:/data #
Make sure that the permissions and SELinux contexts for the file are okay using these commands:
Bash:
chown root:root /data/adb/Earth_bootanimation.zip
chmod 0644 /data/adb/Earth_bootanimation.zip
chcon -v u:object_r:system_file:s0 /data/adb/Earth_bootanimation.zip
Result:
Code:
ASUS_I006D:/data # ls -ldZ /data/adb/Earth_bootanimation.zip
-rw-r--r-- 1 root root u:object_r:system_file:s0 13227720 2022-04-16 10:58 /data/adb/Earth_bootanimation.zip
ASUS_I006D:/data #
Now create a Magisk init script to replace the file via bind mount:
Bash:
echo "mount -o bind /data/adb/Earth_bootanimation.zip /system/media/bootanimation.zip " >/data/adb/post-fs-data.d/change_bootanimation.sh
chmod 755 /data/adb/post-fs-data.d/change_bootanimation.sh
That's it .. Reboot the phone and enjoy the new animation.
To remove the new animation just delete the script /data/adb/post-fs-data.d/change_bootanimation.sh and reboot the phone.
The same method can be used to replace a complete directory using these steps:
e.g. to make the directory /odm/etc writable do:
Bash:
#
# create the new directory
#
mkdir /data/adb/odm_etc
#
# copy the existing files in /odm/etc to the new directory
#
cd /odm/etc && find . | cpio -pdum /data/adb/odm_etc
#
# create the Magisk init script to replace /odm/etc with the new directory /data/adb/odm_etc
#
echo "# make /odm writable
mount -o bind /data/adb/odm_etc /odm/etc
" >/data/adb/post-fs-data.d/make_odm_etc_writable
chmod 0755 /data/adb/post-fs-data.d/make_odm_etc_writable
Now reboot the phone and check the result:
Code:
ASUS_I006D:/ #
ASUS_I006D:/ # ls -l /odm/etc
total 15
-rw-r--r-- 1 root root 4961 2009-01-01 01:00 NOTICE.xml.gz
-rw------- 1 root root 1136 2009-01-01 01:00 build.prop
-r--r--r-- 1 root root 0 2009-01-01 01:00 fs_config_dirs
-r--r--r-- 1 root root 0 2009-01-01 01:00 fs_config_files
-rw-r--r-- 1 root root 0 2009-01-01 01:00 group
-rw-r--r-- 1 root root 0 2009-01-01 01:00 passwd
drwxr-xr-x 2 root root 3452 2023-01-18 16:30 selinux
ASUS_I006D:/ #
#
# create a new file in the directory used to replace /odm/etc
#
ASUS_I006D:/ # touch /data/adb/odm_etc/test.$$
ASUS_I006D:/ # ls -l /data/adb/odm_etc/test.$$
-rw-r--r-- 1 root root 0 2023-01-18 16:41 /data/adb/odm_etc/test.4597
ASUS_I006D:/ #
#
# check the contents of the directory /odm/etc
#
ASUS_I006D:/ # ls -l /odm/etc/test.$$
-rw-r--r-- 1 root root 0 2023-01-18 16:41 //odm/etc/test.4597
ASUS_I006D:/ #
Caution
I'm sure there is a reason why this feature is not implemented for all directories by default in Magisk
And, for example, if you make the directory /odm/etc writable using the method described above Android will complain after the next reboot with an error message that something is wrong with your phone.
Therefor please use with care! If possible only use this approach to make single files writable.
Trouble Shooting
In case the phone does not boot anymore after replacing a file or directory using this method:
Reboot the phone from a recovery with adb support (like TWRP) and delete the script in /data/adb/post-fs-data to fix the error
Notes
Files or directories that are used by Android before the Magisk init scripts are executed can not be changed using this method. These files must be replaced by changing the files in the ramdisk on the boot partition (see How to change files in the boot image using Magisk and How to trigger an action when a property is changed )
There are various Magisk Modules available in the internet to replace the animation that use this technique
To test a boot animation while the Android OS is running do:
Bash:
mount -o bind /data/adb/bootanimation_android12.zip /system/media/bootanimation.zip
bootanimation
Update 24.06.2023/bs
See the post https://forum.xda-developers.com/t/...directory-using-magisk.4543103/#post-88679517 below in this thread for using an overlayfs to make files read-write.
Can it be used to add a self-signed SSL certificate? And also this method works only with ASUS ZenFone 8 or also with others (e.g. OnePlus 9 pro)?
Romano36 said:
Can it be used to add a self-signed SSL certificate? And also this method works only with ASUS ZenFone 8 or also with others (e.g. OnePlus 9 pro)?
Click to expand...
Click to collapse
Hi
Can it be used to add a self-signed SSL certificate?
Click to expand...
Click to collapse
What is the purpose of the new SSL certificate?
If you intend to change the SSL certificate that was used to create the OS :
I did not test this but I'm pretty sure that you can not replace that certificate in an installed OS.
And also this method works only with ASUS ZenFone 8 or also with others (e.g. OnePlus 9 pro)?
Click to expand...
Click to collapse
This method works for all phones and OS that are supported by Magisk.
regards
Bernd
Modded by moderator
Romano36 said:
My purpose is to put a new certificate in this folder /system/etc/security/cacerts/. I have to try.
Click to expand...
Click to collapse
That should work . But I suggest to use a "dummy" Magisk module for that purpose -- see:
How to change files in the directory /system with Magisk
How to change files in the directory /system with Magisk Note: I tested the instructions below with Magisk 24. 25.0, and 25.2 on an ASUS Zenfone 8 running OmniROM (Android 12 ) . The filesystem for /system is normally mounted read-only In...
forum.xda-developers.com
regards
Bernd
Thanks!!!
bnsmb said:
To change a file (or directory) in one of the read-only mounted filesystems in the Android OS Magisk can be used.
(see How to change files in the directory /system with Magisk and How to make files in /system writable )
But this method only works for files in the directories /system, /vendor, /product, or /system_ext.
In current Android OS implementations there are a lot of other directories on read-only filesystems with files that must be changed or replaced to change the behaviour of Android.
For example on some Android implementations the boot animation is in the file /my_product/media/bootanimation/bootanimation.zip. The standard mechanism to change a file on a read-only mounted filesystem via Magisk can not be used to replace this file with another file.
But Magisk also supports executing scripts while booting the phone (see How to run a script at every boot using Magisk)
And the Magisk init scripts in the directory /data/adb/post-fs-data.d are executed early in the boot process. Therefor we can create a Magisk init script to replace any file with another file using the same method Magisk is using (that is a "mount -o bind ..." ):
Note
All commands in this Howto must be done by the user root.
Example
To replace the boot animation with another one copy the ZIP file with the new boot animation to the directory /data/adb (or any other read-write mounted directory available early in the boot process), e.g:
Code:
ASUS_I006D:/data # ls -l /data/adb/Earth_bootanimation.zip
-rw-r--r-- 1 u0_a130 media_rw 13227720 2022-04-16 10:58 /data/adb/Earth_bootanimation.zip
ASUS_I006D:/data #
Make sure that the permissions and SELinux contexts for the file are okay using these commands:
Bash:
chown root:root /data/adb/Earth_bootanimation.zip
chmod 0644 /data/adb/Earth_bootanimation.zip
chcon -v u:object_r:system_file:s0 /data/adb/Earth_bootanimation.zip
Result:
Code:
ASUS_I006D:/data # ls -ldZ /data/adb/Earth_bootanimation.zip
-rw-r--r-- 1 root root u:object_r:system_file:s0 13227720 2022-04-16 10:58 /data/adb/Earth_bootanimation.zip
ASUS_I006D:/data #
Now create a Magisk init script to replace the file via bind mount:
Bash:
echo "mount -o bind /data/adb/Earth_bootanimation.zip /system/media/bootanimation.zip " >/data/adb/post-fs-data.d/change_bootanimation.sh
chmod 755 /data/adb/post-fs-data.d/change_bootanimation.sh
That's it .. Reboot the phone and enjoy the new animation.
To remove the new animation just delete the script /data/adb/post-fs-data.d/change_bootanimation.sh and reboot the phone.
The same method can be used to replace a complete directory using these steps:
e.g. to make the directory /odm/etc writable do:
Bash:
#
# create the new directory
#
mkdir /data/adb/odm_etc
#
# copy the existing files in /odm/etc to the new directory
#
cd /odm/etc && find . | cpio -pdum /data/adb/odm_etc
#
# create the Magisk init script to replace /odm/etc with the new directory /data/adb/odm_etc
#
echo "# make /odm writable
mount -o bind /data/adb/odm_etc /odm/etc
" >/data/adb/post-fs-data.d/make_odm_etc_writable
chmod 0755 /data/adb/post-fs-data.d/make_odm_etc_writable
Now reboot the phone and check the result:
Code:
ASUS_I006D:/ #
ASUS_I006D:/ # ls -l /odm/etc
total 15
-rw-r--r-- 1 root root 4961 2009-01-01 01:00 NOTICE.xml.gz
-rw------- 1 root root 1136 2009-01-01 01:00 build.prop
-r--r--r-- 1 root root 0 2009-01-01 01:00 fs_config_dirs
-r--r--r-- 1 root root 0 2009-01-01 01:00 fs_config_files
-rw-r--r-- 1 root root 0 2009-01-01 01:00 group
-rw-r--r-- 1 root root 0 2009-01-01 01:00 passwd
drwxr-xr-x 2 root root 3452 2023-01-18 16:30 selinux
ASUS_I006D:/ #
#
# create a new file in the directory used to replace /odm/etc
#
ASUS_I006D:/ # touch /data/adb/odm_etc/test.$$
ASUS_I006D:/ # ls -l /data/adb/odm_etc/test.$$
-rw-r--r-- 1 root root 0 2023-01-18 16:41 /data/adb/odm_etc/test.4597
ASUS_I006D:/ #
#
# check the contents of the directory /odm/etc
#
ASUS_I006D:/ # ls -l /odm/etc/test.$$
-rw-r--r-- 1 root root 0 2023-01-18 16:41 //odm/etc/test.4597
ASUS_I006D:/ #
Caution
I'm sure there is a reason why this feature is not implemented for all directories by default in Magisk
And, for example, if you make the directory /odm/etc writable using the method described above Android will complain after the next reboot with an error message that something is wrong with your phone.
Therefor please use with care! If possible only use this approach to make single files writable.
Trouble Shooting
In case the phone does not boot anymore after replacing a file or directory using this method:
Reboot the phone from a recovery with adb support (like TWRP) and delete the script in /data/adb/post-fs-data to fix the error
Notes
Files or directories that are used by Android before the Magisk init scripts are executed can not be changed using this method. These files must be replaced by changing the files in the ramdisk on the boot partition (see How to change files in the boot image using Magisk and How to trigger an action when a property is changed )
There are various Magisk Modules available in the internet to replace the animation that use this technique
To test a boot animation while the Android OS is running do:
Bash:
mount -o bind /data/adb/bootanimation_android12.zip /system/media/bootanimation.zip
bootanimation
Click to expand...
Click to collapse
Hello,
I would like to create a Magisk module that targets the file /odm/etc/mixer_paths.xml.
I am a little confused about the examples you have given. Can you please guide me using the directory I mentioned? It would be very helpful. Thank you.
sargodian2 said:
Hello,
I would like to create a Magisk module that targets the file /odm/etc/mixer_paths.xml.
I am a little confused about the examples you have given. Can you please guide me using the directory I mentioned? It would be very helpful. Thank you.
Click to expand...
Click to collapse
Hi
no Magisk module necessary (but it can be done also via Magisk Module, of course)
Use
- install Magisk
- become root user
- create the file /data/adb/mixer_paths.xml with the changed contents
- create the script /data/adb/post-fs-data.d/change_odm_etc_mixer.sh :
echo "mount -o bind /data/adb/mixer_paths.xml /odm/etc/mixer_paths.xml " >/data/adb/post-fs-data.d/change_odm_etc_mixer.sh
- make the script executable
chmod 755 /data/adb/post-fs-data.d/change_odm_etc_mixer.sh
- reboot
Note that these instructions only work if the file /odm/etc/mixer_paths.xml already exists - you can not create additional files using this approach.
regards
Bernd
bnsmb said:
Hi
no Magisk module necessary (but it can be done also via Magisk Module, of course)
Use
- install Magisk
- become root user
- create the file /data/adb/mixer_paths.xml with the changed contents
- create the script /data/adb/post-fs-data.d/change_odm_etc_mixer.sh :
echo "mount -o bind /data/adb/mixer_paths.xml /odm/etc/mixer_paths.xml " >/data/adb/post-fs-data.d/change_odm_etc_mixer.sh
- make the script executable
chmod 755 /data/adb/post-fs-data.d/change_odm_etc_mixer.sh
- reboot
Note that these instructions only work if the file /odm/etc/mixer_paths.xml already exists - you can not create additional files using this approach.
regards
Bernd
Click to expand...
Click to collapse
Thank You, It worked.
thank you bnsmb
i fallowed your clear steps to modify cscfeature.xml on my S23
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
amk316 said:
View attachment 5938113
Click to expand...
Click to collapse
what's the message of this screenshot?
bnsmb said:
what's the message of this screenshot?
Click to expand...
Click to collapse
when i bind cscfeature.xml on my s23 MemoryDetector app detected it!!!
amk316 said:
when i bind cscfeature.xml on my s23 MemoryDetector app detected it!!!
Click to expand...
Click to collapse
>>when i bind cscfeature.xml on my s23 MemoryDetector app detected it!!!
and do you think that shouldn't be?
I don't know what the MemoryDetector app is used for but is quite easy for an app to check the current mounts to find bind mounts. So it works like expected.
regards
Bernd
Another method to change files in read-only filesystems is to use an overlay filesystem.
This method is implemented in the Magisk Module Magisk Overlayfs.
The source code for this Magisk module is available here:
https://github.com/HuskyDG/magic_overlayfs
Using this Magisk Module every file in most of the read-only filesystems in Android can be changed;
excerpt from the documentation:
Make most parts of system partition (/system, /vendor, /product, /system_ext, /odm, /odm_dlkm, /vendor_dlkm, ...) become read-write.
Click to expand...
Click to collapse
I successfully tested this Magisk Module on an ASUS Zenfone 8 running OmniROM 13.
Notes:
There is no installable zip file in the repository for the Magisk Overlayfs . But the repository contains a script to create the zip file (build.sh).
Note that I had to change the code to create the Magisk module zip file in the script build.sh to create an installable Magisk Module:
I replaced the line
Bash:
zip -r9 out/magisk-module-release.zip out/magisk-module
with
Bash:
cd out/magisk-module && zip -r9 ../magisk-module-release.zip

Categories

Resources