[ OmniRom 13 Dev - xtrnaw7@t15g /data/develop/android/scripts_on_linux ] $ time  ./prepare_phone.sh all
[16.04.2023 18:33 ] ### prepare_phone.sh started at 16.04.2023 18:33:04 (The PID of this process is 542824)
[16.04.2023 18:33 ] ### Processing the parameter ...
[16.04.2023 18:33 ] Not yet used parameter are: "all"
[16.04.2023 18:33 ] Tasks to execute are: "all"
[16.04.2023 18:33 ] Parameter for the function init_tasks are: ""
[16.04.2023 18:33 ] ### The logfile used is /var/tmp/prepare_phone.sh.log


[16.04.2023 18:33 ] Checking the include file "/data/develop/android/scripts_on_linux/prepare_phone.include" ...
[16.04.2023 18:33 ] Reading the include file "/data/develop/android/scripts_on_linux/prepare_phone.include" ...

[16.04.2023 18:33 ] Processing the parameter  ...

[16.04.2023 18:33 ] Preparing the list of tasks to execute ...
[16.04.2023 18:33 ] Parameter "all" found - now ignoring all other task parameter and executing all defined tasks
[16.04.2023 18:33 ] Executing the tasks defined in the include file(s) for "all"
[16.04.2023 18:33 ] "init_tasks" is defined - now executing it ...
 ----------------------------------------------------------------------
[16.04.2023 18:33 ] Searching for a config file ....
[16.04.2023 18:33 ] Config file "prepare_phone.conf" succesfully read
[16.04.2023 18:33 ] Using the directory "/tmp" for temporary files
[16.04.2023 18:33 ] The PID of this process is 542824
[16.04.2023 18:33 ] The include file used is :
-rwxr-xr-x. 1 xtrnaw7 xtrnaw7 254658 Apr 16 17:45 /data/develop/android/scripts_on_linux/prepare_phone.include
[16.04.2023 18:33 ] The include file used was last edited at: "15.04.2023 /bs"
[16.04.2023 18:33 ] The version of the used execute_tasks.sh script is "v2.2.2"
-----------------------------------------------------------------------
[16.04.2023 18:33 ] Using the TWRP image "/data/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-0-I006D-enhanced.img" for booting the phone into TWRP
[16.04.2023 18:33 ] Using the working directory "/tmp/prepare_phone.sh_WORKDIR.542824" .

[16.04.2023 18:33 ] *** Reading the include file "/data/develop/android/scripts_on_linux/boot_phone_from_twrp.sh" ...
[16.04.2023 18:33 ] The script is running as user "xtrnaw7" -- will use "sudo" for the fastboot commands ...
[16.04.2023 18:33 ] Will use the attached phone with the serial number "M6AIB760D0939LX"
[16.04.2023 18:33 ] Using the TWRP image found in the parameter: "/data/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-0-I006D-enhanced.img"
[16.04.2023 18:33 ] Using the options "-d -s M6AIB760D0939LX " for the adb commands
[16.04.2023 18:33 ] Using the options " -s M6AIB760D0939LX " for the fastboot commands
[16.04.2023 18:33 ] Checking the script prerequisites ...
[16.04.2023 18:33 ] Will wait up to 60 second(s) after booting the phone into the bootloader
[16.04.2023 18:33 ] Will wait up to 120 second(s) after booting the phone from the TWRP image
[16.04.2023 18:33 ] Will wait up to 30 second(s) until the adb daemon is ready to use
[16.04.2023 18:33 ] The phone is currently booted into the bootloader
[16.04.2023 18:33 ] The boot slot is _a.
 ----------------------------------------------------------------------
[16.04.2023 18:33 ] Executing the tasks now ...

[16.04.2023 18:33 ] The tasks to execute are:
Task  1: enable_disable_abort_on_error enable
Task  2: boot_phone_from_twrp_image  
Task  3: install_os noreboot:factory_reset
Task  4: install_twrp noreboot:next
Task  5: install_magisk_in_boot_partition_only noreboot:next
Task  6: enable_adb reboot
Task  7: install_magisk_in_data_adb_only noreboot:copy_apk
Task  8: enable_root_access_for_the_shell reboot
Task  9: wait_for_access_via_adb 120:kill
Task 10: install_magisk_v26_in_boot_partition active:reboot
Task 11: install_the_magisk_app  
Task 12: wait_for_access_via_adb 120:kill
Task 13: enable_disable_abort_on_error disable
Task 14: install_essential_scripts  
Task 15: install_essential_apps  
Task 16: install_essential_magisk_modules  
Task 17: enable_root_access_for_apps reboot
Task 18: execute_script_on_the_phone ignorerc

[16.04.2023 18:33 ] Processing the task "enable_disable_abort_on_error" with the parameter "enable" ...
[16.04.2023 18:33 ] Executing now "enable_disable_abort_on_error enable"

 ----------------------------------------------------------------------
[16.04.2023 18:33 ] Setting the variable "ABORT_TASK_EXECUTION_ON_ERROR" to "0" ..
 ----------------------------------------------------------------------

[16.04.2023 18:33 ] Processing the task "boot_phone_from_twrp_image"  ...
[16.04.2023 18:33 ] Executing now "boot_phone_from_twrp_image "

 ----------------------------------------------------------------------
[16.04.2023 18:33 ]
[16.04.2023 18:33 ] *** Booting the attached phone from the TWRP image "/data/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-0-I006D-enhanced.img"  ...
[16.04.2023 18:33 ]
[16.04.2023 18:33 ] The task execution will stop if the script ends with a return code not zero
[16.04.2023 18:33 ] The phone is booted into the bootloader
[16.04.2023 18:33 ] Booting the phone from the TWRP image "/data/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-0-I006D-enhanced.img" now  ...
Sending 'boot.img' (98304 KB)                      OKAY [  2.842s]
Booting                                            OKAY [ 10.359s]
Finished. Total time: 13.246s
Waiting up to 120 seconds for the boot of the phone ....
Waiting up to 30 seconds for the adb daemon to get ready  ..
[16.04.2023 18:33 ] ... the adb daemon is ready after 4.059 second(s)

[16.04.2023 18:33 ] The phone is booted into TWRP: "/data/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-0-I006D-enhanced.img" version "3.7.0_12-0"
 ----------------------------------------------------------------------

[16.04.2023 18:33 ] Processing the task "install_os" with the parameter "noreboot:factory_reset" ...
[16.04.2023 18:33 ] Executing now "install_os noreboot factory_reset"

 ----------------------------------------------------------------------
[16.04.2023 18:33 ]
[16.04.2023 18:33 ] *** Installing the Android OS using the image "/data/backup/ASUS_ZENFONE8/omnirom_local/omni-13/omni-13-20230416-zenfone8-MICROG.zip" using the script "/data/develop/android/scripts_on_linux/install_os_via_twrp.sh" with the parameter " factory_reset /data/backup/ASUS_ZENFONE8/omnirom_local/omni-13/omni-13-20230416-zenfone8-MICROG.zip"  ...
[16.04.2023 18:33 ]
[16.04.2023 18:33 ] The automatic reboot after executing the script is disabled
[16.04.2023 18:33 ] The task execution will stop if the script ends with a return code not zero

[16.04.2023 18:33 ]  ----------------------------------------------------------------------

[16.04.2023 18:33 ] *** Executing now "/data/develop/android/scripts_on_linux/install_os_via_twrp.sh factory_reset /data/backup/ASUS_ZENFONE8/omnirom_local/omni-13/omni-13-20230416-zenfone8-MICROG.zip" ...
# ---------------------------------------------------------------------

install_os_via_twrp.sh version - v1.1.0.0 - install an OS image via the TWRP command twrp

Using the TWRP helper script "/data/develop/android/scripts_on_linux/boot_phone_from_twrp.sh"
The OS image to install is: "/data/backup/ASUS_ZENFONE8/omnirom_local/omni-13/omni-13-20230416-zenfone8-MICROG.zip"
Reading the helper script "boot_phone_from_twrp.sh" ...
The script is running as user "xtrnaw7" -- will use "sudo" for the fastboot commands ...
Will use the attached phone with the serial number "M6AIB760D0939LX"
Using the default TWRP image: "/data/backup/ASUS_ZENFONE8/twrp/current_twrp.img"
Using the options "-d -s M6AIB760D0939LX " for the adb commands
Using the options " -s M6AIB760D0939LX " for the fastboot commands
Checking the script prerequisites ...
Will wait up to 60 second(s) after booting the phone into the bootloader
Will wait up to 120 second(s) after booting the phone from the TWRP image
Will wait up to 30 second(s) until the adb daemon is ready to use
Retrieving the current status of the phone ...
The phone is currently booted from a TWRP image
The boot slot is _a.
The phone is booted from a TWRP image
The phone is booted into TWRP: "/data/backup/ASUS_ZENFONE8/twrp/current_twrp.img" version "3.7.0_12-0"
Waiting up to 30 seconds for the adb daemon to get ready  
... the adb daemon is ready after 0 second(s)


Formating /data ...
Done.
You may need to reboot recovery to be able to use /data again.
TWRP will not recreate /data/media on an FBE device. Please reboot into your rom to create /data/media
Formatting Metadata using mke2fs...
Done.
Done processing script file

Formating the metadata partition ...
++ /usr/bin/adb -d -s M6AIB760D0939LX shell umount /dev/block/by-name/metadata
umount: /dev/block/sda22: Invalid argument
++ /usr/bin/adb -d -s M6AIB760D0939LX shell mke2fs -F -t ext4 /dev/block/by-name/metadata
mke2fs 1.45.4 (23-Sep-2019)
Discarding device blocks: done                            
Creating filesystem with 4096 4k blocks and 4096 inodes

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (1024 blocks): done
Writing superblocks and filesystem accounting information: done

Coyping the OS image file "/data/backup/ASUS_ZENFONE8/omnirom_local/omni-13/omni-13-20230416-zenfone8-MICROG.zip" to "/tmp/omni-13-20230416-zenfone8-MICROG.zip" on the phone ...
adb: error: failed to read copy response
/data/backup/ASUS_ZENFONE8/omnirom_local/omni-13/omni-13-20230416-zenfone8-MICROG.zip: 1 file pushed, 0 skipped. 297.0 MB/s (1292085166 bytes in 4.149s)
adb: error: failed to read copy response

adb: device 'M6AIB760D0939LX' not found

Copying the image failed -- we will do another try in 5 seconds ...
/data/backup/ASUS_ZENFONE8/omnirom_local/omni-13/omni-13-20230416-zenfone8-MICROG.zip: 1 file pushed, 0 skipped. 32.3 MB/s (1292085166 bytes in 38.197s)

Installing the OS image "/tmp/omni-13-20230416-zenfone8-MICROG.zip" into the slot "_b" ...
Installing zip file '/tmp/omni-13-20230416-zenfone8-MICROG.zip'
Flashing A/B zip to inactive slot: B
Step 1/2Step 2/2Updating partition details...
...done
Devices on super may not mount until rebooting recovery.
To flash additional zips, please reboot recovery to switch to the updated slot.
Done processing script file
OS image file "/tmp/omni-13-20230416-zenfone8-MICROG.zip" successfully installed.
Now changing the next active slot to _b ...
... successfully changed the active slot for the next reboot
Automatically rebooting the phone is disabled

# ---------------------------------------------------------------------
[16.04.2023 18:36 ]  ... the script ended with RC=0
 ----------------------------------------------------------------------

[16.04.2023 18:36 ] Processing the task "install_twrp" with the parameter "noreboot:next" ...
[16.04.2023 18:36 ] Executing now "install_twrp noreboot next"

 ----------------------------------------------------------------------
[16.04.2023 18:36 ] The slot to use for this task is "next"
[16.04.2023 18:36 ]
[16.04.2023 18:36 ] *** Installing the TWRP image "/data/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-0-I006D-enhanced.img" using the script /data/develop/android/scripts_on_linux/install_twrp.sh with the parameter " next  /data/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-0-I006D-enhanced.img"  ...
[16.04.2023 18:36 ]
[16.04.2023 18:36 ] The automatic reboot after executing the script is disabled
[16.04.2023 18:36 ] The task execution will stop if the script ends with a return code not zero

[16.04.2023 18:36 ]  ----------------------------------------------------------------------

[16.04.2023 18:36 ] *** Executing now "/data/develop/android/scripts_on_linux/install_twrp.sh next /data/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-0-I006D-enhanced.img" ...
# ---------------------------------------------------------------------

install_twrp.sh version - v1.3.1.0 - install TWRP to the boot partition of a phone running Android using TWRP

Using the TWRP image "/data/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-0-I006D-enhanced.img"
Checking the script prerequisites ...
Will wait 10 second(s) before starting the script on the phone
The script is running as user "xtrnaw7" -- will use "sudo" for the fastboot commands ...
Will patch the boot partition on the attached phone with the serial number "M6AIB760D0939LX"
Using the options "-d -s M6AIB760D0939LX " for the adb commands
Using the options " -s M6AIB760D0939LX " for the fastboot commands
Checking for a connected phone booted into fastboot mode ...
No attached phone in fastboot mode found
Checking for an attached phone with working access via adb (USB) ...
Linux localhost 5.4.61-BeyondStock™-Sake-A11.001-CPTB-g93366b87d #4 SMP PREEMPT Sat Aug 21 18:03:04 EDT 2021 aarch64
... found a phone connected via USB with working adb access
The phone is already booted from a TWRP image: "twrp_I006D" version "3.7.0_12-0"
Retrieving the current boot slot from the phone ...
The current boot slot is "_a"
The boot slot to patch is "_b"
The boot partition to patch is "boot_b"
Checking if the directory "/data/local/tmp" exists on the phone ....
ls: /data/local/tmp: No such file or directory
WARNING: Directory "/data/local/tmp" not found on the phone, will try /tmp now ...
/tmp
Copying the script "/data/develop/android/scripts_on_linux/install_twrp_from_within_twrp.sh" to the phone ...
/data/develop/android/scripts_on_linux/install_twrp_from_within_twrp.sh: 1 file pushed, 0 skipped. 270.2 MB/s (14228 bytes in 0.000s)
Creating the boot image file "/tmp/boot_b.544100.img" from the partition "/dev/block/by-name/boot_b" ...
196608+0 records in
196608+0 records out
100663296 bytes (96 M) copied, 0.201495 s, 476 M/s

Checking the result ...
-rw-rw-rw- 1 root root 100663296 2023-04-16 16:36 /tmp/boot_b.544100.img
The check sums are:
The check sum of the boot partition "/dev/block/by-name/boot_b" on the phohe is  "1751204117"
The check sum of the boot image file on the phone is "/tmp/boot_b.544100.img" is "1751204117"   
Installing TWRP using the boot image file "/tmp/boot_b.544100.img"  ...

[2023.04.16 18:36:09] Waiting now 10 seconds ...
Now executing "/tmp/install_twrp_from_within_twrp.sh" on the phone ...
 ----------------------------------------------------------------------
+ adb -d -s M6AIB760D0939LX shell /tmp/install_twrp_from_within_twrp.sh /tmp/boot_b.544100.img /tmp/boot_b_witn_twrp.544100.img

Installing TWRP into a boot image or boot partition via script

Checking the running OS ...
OK, running a shell in TWRP: "twrp_I006D" version "3.7.0_12-0"
Checking the prerequisites for installing TWRP ...
Using the file "/tmp/boot_b.544100.img" as source for the installation of TWRP
Creating the boot image with TWRP in the file "/tmp/boot_b_witn_twrp.544100.img"
Checking if the required executables exist ...
OK, the file "/system/bin/magiskboot" exists and is executable
OK, the file "/system/bin/cpio" exists and is executable
OK, the file "/system/bin/sha256sum" exists and is executable
OK, the file "/system/bin/getprop" exists and is executable
Checking if the required data files exist ...
OK, the file "/ramdisk-files.sha256sum" exists
OK, the file "/ramdisk-files.txt" exists
OK, the file "/tmp/boot_b.544100.img" exists
Checking the check sums of the files for the new ramdisk ...
OK, the check sums of the files for the new ramdisk are okay
Directory "/tmp/install_twrp.676" successfully created
Directory "/tmp/install_twrp.676/img.676" successfully created
Directory "/tmp/install_twrp.676/img_files.676" successfully created
The temporary directory to unpack the boot image is "/tmp/install_twrp.676/img_files.676"
Unpacking the boot image from "/tmp/boot_b.544100.img" ...
Parsing boot image: [/tmp/boot_b.544100.img]
HEADER_VER      [3]
KERNEL_SZ       [39928320]
RAMDISK_SZ      [16559841]
OS_VERSION      [13.0.0]
OS_PATCH_LEVEL  [2023-04]
PAGESIZE        [4096]
CMDLINE         []
KERNEL_FMT      [raw]
RAMDISK_FMT     [gzip]
VBMETA
OK, "/tmp/boot_b.544100.img" successfully unpacked to "/tmp/install_twrp.676/img_files.676" :
Creating a backup of the original ramdisk ...
total 55172
-rw-rw-rw- 1 root root       50 2023-04-16 16:36 header
-rw-r--r-- 1 root root 39928320 2023-04-16 16:36 kernel
-rw-r--r-- 1 root root 16559841 2023-04-16 16:36 ramdisk.cpio.org
Creating the new ramdisk with TWRP ...
New ramdisk with TWRP "/tmp/install_twrp.676/img_files.676/ramdisk.cpio" successfully created.

-rw-rw-rw- 1 root root 96503152 2023-04-16 16:36 /tmp/install_twrp.676/img_files.676/ramdisk.cpio
-rw-r--r-- 1 root root 16559841 2023-04-16 16:36 /tmp/install_twrp.676/img_files.676/ramdisk.cpio.org

Repacking the boot image into the file "/tmp/boot_b_witn_twrp.544100.img" ...
+ cd /tmp/install_twrp.676/img_files.676
+ /system/bin/magiskboot repack /tmp/boot_b.544100.img /tmp/boot_b_witn_twrp.544100.img
Parsing boot image: [/tmp/boot_b.544100.img]
HEADER_VER      [3]
KERNEL_SZ       [39928320]
RAMDISK_SZ      [16559841]
OS_VERSION      [13.0.0]
OS_PATCH_LEVEL  [2023-04]
PAGESIZE        [4096]
CMDLINE         []
KERNEL_FMT      [raw]
RAMDISK_FMT     [gzip]
VBMETA
Repack to boot image: [/tmp/boot_b_witn_twrp.544100.img]
HEADER_VER      [3]
KERNEL_SZ       [39928320]
RAMDISK_SZ      [39516518]
OS_VERSION      [13.0.0]
OS_PATCH_LEVEL  [2023-04]
PAGESIZE        [4096]
CMDLINE         []
+ TEMPRC=0
+ set +x
OK, the new boot image "/tmp/boot_b_witn_twrp.544100.img" successfully created
-rw-r--r-- 1 root root 100663296 2023-04-16 16:36 /tmp/boot_b_witn_twrp.544100.img
Note: Flashing the new image to the boot partition was not requested
+ TEMPRC=0
+ set +x
 ----------------------------------------------------------------------
Checking the result ...
The patched boot image is "/tmp/boot_b_witn_twrp.544100.img"
-rw-r--r-- 1 root root 100663296 2023-04-16 16:36 /tmp/boot_b_witn_twrp.544100.img
[2023.04.16 18:36:32] Waiting now 5 seconds ...
Patching the partition "/dev/block/by-name/boot_b" from the patched boot image file "/tmp/boot_b_witn_twrp.544100.img" via dd ...
196608+0 records in
196608+0 records out
100663296 bytes (96 M) copied, 4.560789 s, 21 M/s
Checking the result ....
The check sums for the images and devices on the phone are:

Checksum   Size      File/Device name
-------------------------------------
1751204117 100663296 /tmp/boot_b.544100.img
788087472 100663296 /tmp/boot_b_witn_twrp.544100.img
788087472 100663296 /dev/block/by-name/boot_b

OK, patching the boot partition "/dev/block/by-name/boot_b" was successfull
Automatically rebooting the phone is disabled

# ---------------------------------------------------------------------
[16.04.2023 18:36 ]  ... the script ended with RC=0
 ----------------------------------------------------------------------

[16.04.2023 18:36 ] Processing the task "install_magisk_in_boot_partition_only" with the parameter "noreboot:next" ...
[16.04.2023 18:36 ] Executing now "install_magisk_in_boot_partition_only noreboot next"

 ----------------------------------------------------------------------
[16.04.2023 18:36 ] The slot to use for this task is "next"
[16.04.2023 18:36 ]
[16.04.2023 18:36 ] *** Installing Magisk using the apk file "/data/backup/Android/EssentialApps_Backup/Magisk-v25.2.apk" into the boot partition using the script "/data/develop/android/scripts_on_linux/install_magisk_via_twrp.sh" with the parameter "next copy_apk  delete_adb_dir  magisk_apk_file=/data/backup/Android/EssentialApps_Backup/Magisk-v25.2.apk"  ...
[16.04.2023 18:36 ]
[16.04.2023 18:36 ] The automatic reboot after executing the script is disabled
[16.04.2023 18:36 ] The task execution will stop if the script ends with a return code not zero

[16.04.2023 18:36 ]  ----------------------------------------------------------------------

[16.04.2023 18:36 ] *** Executing now "/data/develop/android/scripts_on_linux/install_magisk_via_twrp.sh next copy_apk delete_adb_dir magisk_apk_file=/data/backup/Android/EssentialApps_Backup/Magisk-v25.2.apk" ...
# ---------------------------------------------------------------------

install_magisk_via_twrp.sh version - v3.1.0.0 - add Magisk to the boot partition of a phone running Android using TWRP

Parameter "copy_apk" found: Will copy the Magisk apk file to the phone if neccessary
Parameter "delete_adb_dir" found: All files and directories created by this script in the directory  "/data/adb" will be deleted at script end.
Parameter "magisk_apk_file=file" found : Will use the Magisk apk file "/data/backup/Android/EssentialApps_Backup/Magisk-v25.2.apk"
Using the TWRP image hardcoded in the script: "/data/backup/ASUS_ZENFONE8/twrp/current_twrp.img"
Checking the script prerequisites ...
Will wait 10 second(s) before starting the script on the phone
The Magisk version used is v25.x or older
Using the temporary directory "/data/MagiskInst" on the phone
The script is running as user "xtrnaw7" -- will use "sudo" for the fastboot commands ...
Will patch the boot partition on the attached phone with the serial number "M6AIB760D0939LX"
Using the options "-d -s M6AIB760D0939LX " for the adb commands
Using the options " -s M6AIB760D0939LX " for the fastboot commands
Checking for a connected phone booted into fastboot mode ...
No attached phone in fastboot mode found
Checking for an attached phone with working access via adb (USB) ...
Linux localhost 5.4.61-BeyondStock™-Sake-A11.001-CPTB-g93366b87d #4 SMP PREEMPT Sat Aug 21 18:03:04 EDT 2021 aarch64
... found a phone connected via USB with working adb access
The phone is already booted from a TWRP image: "twrp_I006D" version "3.7.0_12-0"
Retrieving the current boot slot from the phone ...
The current boot slot is "_a"
The boot slot to patch is "_b"
The boot partition to patch is "boot_b"
Copying the Magisk apk file "/data/backup/Android/EssentialApps_Backup/Magisk-v25.2.apk" to the phone into the directory "/data" ...
/data/backup/Android/EssentialApps_Backup/Magisk-v25.2.apk: 1 file pushed, 0 skipped. 51.2 MB/s (11278270 bytes in 0.210s)
Creating the temporary directory "/data/MagiskInst" with the Magisk files necessarry to install Magisk into the boot partition ...

Creating the script file "/tmp/init_magisk_dirs.sh" to create the directory "/data/MagiskInst" on the phone ...
Creating the directory "/data/MagiskInst" on the phone ...
Copying the temporary script file "/tmp/init_magisk_dirs.sh" to the file "/data/MagiskInst/create_temporary_magisk_dir.sh" on the phone ...
/tmp/init_magisk_dirs.sh: 1 file pushed, 0 skipped. 255.6 MB/s (6588 bytes in 0.000s)
Executing the script "/data/MagiskInst/create_temporary_magisk_dir.sh" on the phone ...
 ------------------------------------------------------------------------------
+ adb -d -s M6AIB760D0939LX shell /data/MagiskInst/create_temporary_magisk_dir.sh /data/MagiskInst ''
ls: /data/app/*/com.topjohnwu.magisk*/base.apk: No such file or directory
Magisk is not yet installed -- searching for an apk file (Magisk*apk) in the directory /sdcard/Download ...
ls: /sdcard/Download/Magisk*apk: No such file or directory
Found the apk file "/data/Magisk-v25.2.apk"
Using the directory "/data/MagiskInst/bin" for the Magisk Binaries
Creating the files in the directory "/data/MagiskInst/bin" using the files for the CPU "arm64-v8a" from the apk file "/data/Magisk-v25.2.apk" ...
Unpacking the apk file "/data/Magisk-v25.2.apk" into the directory "/data/MagiskInst/magisk_apk_contents.733" ...
Copying the files to "/data/MagiskInst/bin" ...
+ mv ./assets/util_functions.sh /data/MagiskInst/bin
+ mv ./assets/chromeos /data/MagiskInst/bin/
+ mv ./assets/boot_patch.sh /data/MagiskInst/bin
+ mv ./assets/addon.d.sh /data/MagiskInst/bin
+ '[' -r ./assets/stub.apk ']'
+ cd ./lib/arm64-v8a
+ mv libbusybox.so /data/MagiskInst/bin/busybox
+ mv libmagisk64.so /data/MagiskInst/bin/magisk64
+ mv libmagiskboot.so /data/MagiskInst/bin/magiskboot
+ mv libmagiskinit.so /data/MagiskInst/bin/magiskinit
+ mv libmagiskpolicy.so /data/MagiskInst/bin/magiskpolicy
+ cd ../..
+ file=libmagisk32.so
+ '[' arm64-v8ax '=' arm64-v8ax -a -r ./lib/armeabi-v7a/libmagisk32.so ']'
+ mv ./lib/armeabi-v7a/libmagisk32.so /data/MagiskInst/bin/magisk32
+ set +x
+ TEMPRC=0
+ set +x
 ------------------------------------------------------------------------------
... "/data/MagiskInst/create_temporary_magisk_dir.sh" successfully executed

Checking if the Magisk patch script "boot_patch.sh" exists on the phone ....
-rwxr-xr-x 1 root root 5987 2023-04-16 16:36 /data/MagiskInst/bin/boot_patch.sh
Checking if the download directory "/sdcard/Download" exists on the phone ....
ls: /sdcard/Download: No such file or directory
WARNING: Directory "/sdcard/Download" not found on the phone .
Checking if the download directory "/tmp" exists on the phone ....
/tmp
Creating the boot image file "/tmp/boot_b.544220.img" from the partition "/dev/block/by-name/boot_b" ...
196608+0 records in
196608+0 records out
100663296 bytes (96 M) copied, 0.193213 s, 497 M/s

Checking the result ...
-rw-rw-rw- 1 root root 100663296 2023-04-16 16:36 /tmp/boot_b.544220.img
The check sums are:
The check sum of the boot partition "/dev/block/by-name/boot_b" on the phone is             "788087472"
The check sum of th boot image file on the phone is "/tmp/boot_b.544220.img" is "788087472"   
Installing Magisk into the boot partition using the old method ...
Patching the boot image file "/tmp/boot_b.544220.img"  ...
Waiting now 10 seconds ...
- Unpacking boot image
Parsing boot image: [/tmp/boot_b.544220.img]
HEADER_VER      [3]
KERNEL_SZ       [39928320]
RAMDISK_SZ      [39516518]
OS_VERSION      [13.0.0]
OS_PATCH_LEVEL  [2023-04]
PAGESIZE        [4096]
CMDLINE         []
KERNEL_FMT      [raw]
RAMDISK_FMT     [gzip]
VBMETA
- Checking ramdisk status
Loading cpio: [ramdisk.cpio]
- Stock boot image detected
- Patching ramdisk
Loading cpio: [ramdisk.cpio]
Add entry [init] (0750)
Create directory [overlay.d] (0750)
Create directory [overlay.d/sbin] (0750)
Add entry [overlay.d/sbin/magisk32.xz] (0644)
Add entry [overlay.d/sbin/magisk64.xz] (0644)
Patch with flag KEEPVERITY=[false] KEEPFORCEENCRYPT=[false]
Found fstab file [system/etc/fstab.postinstall]
Remove pattern [,avb_keys=/product/etc/security/avb/system_other.avbpubkey]
Loading cpio: [ramdisk.cpio.orig]
Backup mismatch entry: [init] -> [.backup/init]
Record new entry: [overlay.d] -> [.backup/.rmlist]
Record new entry: [overlay.d/sbin] -> [.backup/.rmlist]
Record new entry: [overlay.d/sbin/magisk32.xz] -> [.backup/.rmlist]
Record new entry: [overlay.d/sbin/magisk64.xz] -> [.backup/.rmlist]
Backup mismatch entry: [system/etc/fstab.postinstall] -> [.backup/system/etc/fstab.postinstall]
Create directory [.backup] (0000)
Add entry [.backup/.magisk] (0000)
Dump cpio: [ramdisk.cpio]
- Repacking boot image
Parsing boot image: [/tmp/boot_b.544220.img]
HEADER_VER      [3]
KERNEL_SZ       [39928320]
RAMDISK_SZ      [39516518]
OS_VERSION      [13.0.0]
OS_PATCH_LEVEL  [2023-04]
PAGESIZE        [4096]
CMDLINE         []
KERNEL_FMT      [raw]
RAMDISK_FMT     [gzip]
VBMETA
Repack to boot image: [new-boot.img]
HEADER_VER      [3]
KERNEL_SZ       [39928320]
RAMDISK_SZ      [37894796]
OS_VERSION      [13.0.0]
OS_PATCH_LEVEL  [2023-04]
PAGESIZE        [4096]
CMDLINE         []
Checking the result ...
-rw-r--r-- 1 root root 100663296 2023-04-16 16:37 /data/MagiskInst/bin/new-boot.img
The patched boot image is "/tmp/patched_boot_b.544220.img"
Waiting now 10 seconds ...
Patching the partition "/dev/block/by-name/boot_b" from the patched boot image file "/tmp/patched_boot_b.544220.img" via dd ...
196608+0 records in
196608+0 records out
100663296 bytes (96 M) copied, 4.799468 s, 20 M/s
Checking the result ....

The check sums for the images and devices on the phone are:

788087472 100663296 /tmp/boot_b.544220.img
2990423667 100663296 /tmp/patched_boot_b.544220.img
2990423667 100663296 /dev/block/by-name/boot_b

OK, patching the boot partition "/dev/block/by-name/boot_b" was successfull
Deleting all used files and directories in the directory /data  ...
Automatically rebooting the phone is disabled

# ---------------------------------------------------------------------
[16.04.2023 18:37 ]  ... the script ended with RC=0
 ----------------------------------------------------------------------

[16.04.2023 18:37 ] Processing the task "enable_adb" with the parameter "reboot" ...
[16.04.2023 18:37 ] Executing now "enable_adb reboot"

 ----------------------------------------------------------------------
[16.04.2023 18:37 ]
[16.04.2023 18:37 ] *** Enabling access via adb using the script "/data/develop/android/scripts_on_linux/enable_access_via_adb.sh" with the parameter ""  ...
[16.04.2023 18:37 ]
[16.04.2023 18:37 ] The automatic reboot after executing the script is enabled
[16.04.2023 18:37 ] The task execution will stop if the script ends with a return code not zero
[16.04.2023 18:37 ] The phone is currently booted from a TWRP image
[16.04.2023 18:37 ] The boot slot is _a.

[16.04.2023 18:37 ]  ----------------------------------------------------------------------

[16.04.2023 18:37 ] *** Executing now "/data/develop/android/scripts_on_linux/enable_access_via_adb.sh " ...
# ---------------------------------------------------------------------

enable_access_via_adb.sh version - v1.1.0.0 -  shell script to enable adb access via an init .rc file configured via Magisk

Using the TWRP helper script "/data/develop/android/scripts_on_linux/boot_phone_from_twrp.sh"
Using the Magisk helper script "/data/develop/android/scripts_on_linux/enable_adb_using_magisk.sh"
Reading the helper script "boot_phone_from_twrp.sh" ...
The script is running as user "xtrnaw7" -- will use "sudo" for the fastboot commands ...
Will use the attached phone with the serial number "M6AIB760D0939LX"
Using the default TWRP image: "/data/backup/ASUS_ZENFONE8/twrp/current_twrp.img"
Using the options "-d -s M6AIB760D0939LX " for the adb commands
Using the options " -s M6AIB760D0939LX " for the fastboot commands
Checking the script prerequisites ...
Will wait up to 60 second(s) after booting the phone into the bootloader
Will wait up to 120 second(s) after booting the phone from the TWRP image
Will wait up to 30 second(s) until the adb daemon is ready to use
Retrieving the current status of the phone ...
The phone is currently booted from a TWRP image
The boot slot is _a.
Copying the public ssl key for access via adb "/home/xtrnaw7/.android/adbkey.pub" to "/tmp/adbkey.pub" on the phone ...
Copying the file "/home/xtrnaw7/.android/adbkey.pub" to "/tmp/adbkey.pub" the phone ...
/home/xtrnaw7/.android/adbkey.pub: 1 file pushed, 0 skipped. 28.4 MB/s (721 bytes in 0.000s)
Copying the Magisk helper script "/data/develop/android/scripts_on_linux/enable_adb_using_magisk.sh" to "/tmp/enable_adb_using_magisk.sh" on the phone ...
/data/develop/android/scripts_on_linux/enable_adb_using_magisk.sh: 1 file pushed, 0 skipped. 421.1 MB/s (13979 bytes in 0.000s)
Executing the temporary script "/tmp/enable_adb_using_magisk.sh" on the phone ...
The directory /data/recovery does not exist -- will now create it ...
chcon '/data/recovery' to u:object_r:system_data_file:s0
The directory /data/cache does not exist -- will now create it ...
chcon '/data/cache' to u:object_r:cache_file:s0
The working directory "/data/recovery/work" does not exist -- will now create it ...
chcon '/data/recovery/work' to u:object_r:system_data_file:s0
Reading the public ssl key for the access via adb from the file "/tmp/adbkey.pub" ...
Creating the script to enable access via adb "/data/recovery/enable_adb_via_service.sh" ...
chcon '/data/recovery/enable_adb_via_service.sh' to u:object_r:system_data_file:s0
Doing a syntax check for the script "/data/recovery/enable_adb_via_service.sh" ...
Creating the RC file with the additional trigger to enable access via adb "/data/recovery/work/enable_adb_via_service.rc" ...
Copying the partition "/dev/block/by-name/boot_b" into the file "boot_b.img" ...
196608+0 records in
196608+0 records out
100663296 bytes (96 M) copied, 0.284202 s, 338 M/s
Successfully created the script "/data/recovery/work/restore_boot_partition.sh" to restore the boot partition
Extracting the ramdisk from the file "boot_b.img" ...
Parsing boot image: [boot_b.img]
HEADER_VER      [3]
KERNEL_SZ       [39928320]
RAMDISK_SZ      [37894796]
OS_VERSION      [13.0.0]
OS_PATCH_LEVEL  [2023-04]
PAGESIZE        [4096]
CMDLINE         []
KERNEL_FMT      [raw]
RAMDISK_FMT     [gzip]
VBMETA
Adding the new RC file "/data/recovery/work/enable_adb_via_service.rc" to the ramdisk ...
Loading cpio: [ramdisk.cpio]
Create directory [overlay.d] (0700)
Add entry [overlay.d/init.custom.rc] (0700)
Dump cpio: [ramdisk.cpio]
Recreating the boot image file "boot_b.img" ...
Parsing boot image: [boot_b.img]
HEADER_VER      [3]
KERNEL_SZ       [39928320]
RAMDISK_SZ      [37894796]
OS_VERSION      [13.0.0]
OS_PATCH_LEVEL  [2023-04]
PAGESIZE        [4096]
CMDLINE         []
KERNEL_FMT      [raw]
RAMDISK_FMT     [gzip]
VBMETA
Repack to boot image: [boot_b_new.img]
HEADER_VER      [3]
KERNEL_SZ       [39928320]
RAMDISK_SZ      [37895304]
OS_VERSION      [13.0.0]
OS_PATCH_LEVEL  [2023-04]
PAGESIZE        [4096]
CMDLINE         []
Patching the new image file "boot_b_new.img" to the boot partition /dev/block/by-name/boot_b ...
196608+0 records in
196608+0 records out
100663296 bytes (96 M) copied, 4.516355 s, 21 M/s
adb access will now be enabled by Magisk while doing the next reboot
Automatically rebooting the phone is disabled

# ---------------------------------------------------------------------
[16.04.2023 18:37 ]  ... the script ended with RC=0

[16.04.2023 18:37 ] Killing the running adb daemon now ....
+ grep adb
+ ps -ef
xtrnaw7   531195       1  0 17:24 ?        00:00:04 adb -L tcp:5037 fork-server server --reply-fd 4
xtrnaw7   544488  542824  0 18:37 pts/17   00:00:00 grep adb
+ /usr/bin/adb -d -s M6AIB760D0939LX kill-server
+ grep adb
+ ps -ef
xtrnaw7   544491  542824  0 18:37 pts/17   00:00:00 grep adb

[16.04.2023 18:37 ] *** Rebooting the phone now ....
[16.04.2023 18:37 ] Rebooting the phone using the command " /usr/bin/adb -d -s M6AIB760D0939LX  reboot " now ...
* daemon not running; starting now at tcp:5037
* daemon started successfully
Waiting up to 120 second(s) for the phone ...........
[16.04.2023 18:38 ] Booting the phone into the AndroidOS succeeded after 55 seconds; the current status of the phone is 3
[16.04.2023 18:38 ] Retrieving the UID from the shell ...
[16.04.2023 18:38 ] Could not retrieve the UID for the shell (this is not an error)
 ----------------------------------------------------------------------

[16.04.2023 18:38 ] Processing the task "install_magisk_in_data_adb_only" with the parameter "noreboot:copy_apk" ...
[16.04.2023 18:38 ] Executing now "install_magisk_in_data_adb_only noreboot copy_apk"

 ----------------------------------------------------------------------
[16.04.2023 18:38 ]
[16.04.2023 18:38 ] *** Installing the Magisk directories and files in /data/adb from the apk file "/data/backup/Android/EssentialApps_Backup/Magisk-v25.2.apk" using the script "/data/develop/android/scripts_on_linux/install_magisk_via_twrp.sh" with the parameter " adb_only  copy_apk magisk_apk_file=/data/backup/Android/EssentialApps_Backup/Magisk-v25.2.apk"  ...
[16.04.2023 18:38 ]
[16.04.2023 18:38 ] The automatic reboot after executing the script is disabled
[16.04.2023 18:38 ] The task execution will stop if the script ends with a return code not zero

[16.04.2023 18:38 ]  ----------------------------------------------------------------------

[16.04.2023 18:38 ] *** Executing now "/data/develop/android/scripts_on_linux/install_magisk_via_twrp.sh adb_only copy_apk magisk_apk_file=/data/backup/Android/EssentialApps_Backup/Magisk-v25.2.apk" ...
# ---------------------------------------------------------------------

install_magisk_via_twrp.sh version - v3.1.0.0 - add Magisk to the boot partition of a phone running Android using TWRP

Parameter "adb_only" found: Will only install the directories and files in the directory "/data/adb"
Parameter "copy_apk" found: Will copy the Magisk apk file to the phone if neccessary
Parameter "magisk_apk_file=file" found : Will use the Magisk apk file "/data/backup/Android/EssentialApps_Backup/Magisk-v25.2.apk"
Using the TWRP image hardcoded in the script: "/data/backup/ASUS_ZENFONE8/twrp/current_twrp.img"
Checking the script prerequisites ...
Will wait 10 second(s) before starting the script on the phone
The Magisk version used is v25.x or older
Using the temporary directory "/data/MagiskInst" on the phone
The script is running as user "xtrnaw7" -- will use "sudo" for the fastboot commands ...
Will patch the boot partition on the attached phone with the serial number "M6AIB760D0939LX"
Using the options "-d -s M6AIB760D0939LX " for the adb commands
Using the options " -s M6AIB760D0939LX " for the fastboot commands
Checking for a connected phone booted into fastboot mode ...
No attached phone in fastboot mode found
Checking for an attached phone with working access via adb (USB) ...
Linux localhost 5.4.147-Omni-qgki-perf-g875131b91949 #20 SMP PREEMPT Sun Mar 26 09:47:43 CEST 2023 aarch64 Toybox
... found a phone connected via USB with working adb access
The phone is booted in normal mode
The installed OS is based on Android 13 (Sun Apr 16 15:54:50 CEST 2023); the description for the distribution is "omni_zenfone8-user 13 TQ2A.230405.003.E1 eng.xtrnaw.20230416.155603 release-keys"
WARNING: Can not detect the version of the installed Magisk
Booting the phone into the fastboot mode now ...
Waiting up to 60 seconds for the boot into the fastboot mode ...
Booting the phone from the TWRP image "/data/backup/ASUS_ZENFONE8/twrp/current_twrp.img" now  ...
Sending 'boot.img' (98304 KB)                      OKAY [  2.845s]
Booting                                            OKAY [ 10.364s]
Finished. Total time: 13.251s
Waiting up to 60 seconds for the boot of the phone ....
Retrieving the current boot slot from the phone ...
The current boot slot is "_b"
The boot slot to patch is "_b"
The boot partition to patch is "boot_b"
Copying the Magisk apk file "/data/backup/Android/EssentialApps_Backup/Magisk-v25.2.apk" to the phone into the directory "/data" ...
/data/backup/Android/EssentialApps_Backup/Magisk-v25.2.apk: 1 file pushed, 0 skipped. 47.0 MB/s (11278270 bytes in 0.229s)
Creating the temporary directory "/data/MagiskInst" with the Magisk files necessarry to install Magisk into the boot partition ...

Creating the script file "/tmp/init_magisk_dirs.sh" to create the directory "/data/MagiskInst" on the phone ...
Creating the directory "/data/MagiskInst" on the phone ...
Copying the temporary script file "/tmp/init_magisk_dirs.sh" to the file "/data/MagiskInst/create_temporary_magisk_dir.sh" on the phone ...
/tmp/init_magisk_dirs.sh: 1 file pushed, 0 skipped. 62.9 MB/s (6588 bytes in 0.000s)
Executing the script "/data/MagiskInst/create_temporary_magisk_dir.sh" on the phone ...
 ------------------------------------------------------------------------------
+ adb -d -s M6AIB760D0939LX shell /data/MagiskInst/create_temporary_magisk_dir.sh /data/MagiskInst ''
ls: /data/app/*/com.topjohnwu.magisk*/base.apk: No such file or directory
Magisk is not yet installed -- searching for an apk file (Magisk*apk) in the directory /sdcard/Download ...
ls: /sdcard/Download/Magisk*apk: No such file or directory
Found the apk file "/data/Magisk-v25.2.apk"
Using the directory "/data/MagiskInst/bin" for the Magisk Binaries
Creating the files in the directory "/data/MagiskInst/bin" using the files for the CPU "arm64-v8a" from the apk file "/data/Magisk-v25.2.apk" ...
Unpacking the apk file "/data/Magisk-v25.2.apk" into the directory "/data/MagiskInst/magisk_apk_contents.527" ...
Copying the files to "/data/MagiskInst/bin" ...
+ mv ./assets/util_functions.sh /data/MagiskInst/bin
+ mv ./assets/chromeos /data/MagiskInst/bin/
+ mv ./assets/boot_patch.sh /data/MagiskInst/bin
+ mv ./assets/addon.d.sh /data/MagiskInst/bin
+ '[' -r ./assets/stub.apk ']'
+ cd ./lib/arm64-v8a
+ mv libbusybox.so /data/MagiskInst/bin/busybox
+ mv libmagisk64.so /data/MagiskInst/bin/magisk64
+ mv libmagiskboot.so /data/MagiskInst/bin/magiskboot
+ mv libmagiskinit.so /data/MagiskInst/bin/magiskinit
+ mv libmagiskpolicy.so /data/MagiskInst/bin/magiskpolicy
+ cd ../..
+ file=libmagisk32.so
+ '[' arm64-v8ax '=' arm64-v8ax -a -r ./lib/armeabi-v7a/libmagisk32.so ']'
+ mv ./lib/armeabi-v7a/libmagisk32.so /data/MagiskInst/bin/magisk32
+ set +x
+ TEMPRC=0
+ set +x
 ------------------------------------------------------------------------------
... "/data/MagiskInst/create_temporary_magisk_dir.sh" successfully executed

chcon '/data/adb/magisk' to u:object_r:magisk_file:s0
chcon '/data/adb/magisk/util_functions.sh' to u:object_r:magisk_file:s0
chcon '/data/adb/magisk/chromeos' to u:object_r:magisk_file:s0
chcon '/data/adb/magisk/chromeos/kernel_data_key.vbprivk' to u:object_r:magisk_file:s0
chcon '/data/adb/magisk/chromeos/kernel.keyblock' to u:object_r:magisk_file:s0
chcon '/data/adb/magisk/chromeos/futility' to u:object_r:magisk_file:s0
chcon '/data/adb/magisk/boot_patch.sh' to u:object_r:magisk_file:s0
chcon '/data/adb/magisk/addon.d.sh' to u:object_r:magisk_file:s0
chcon '/data/adb/magisk/busybox' to u:object_r:magisk_file:s0
chcon '/data/adb/magisk/magisk64' to u:object_r:magisk_file:s0
chcon '/data/adb/magisk/magiskboot' to u:object_r:magisk_file:s0
chcon '/data/adb/magisk/magiskinit' to u:object_r:magisk_file:s0
chcon '/data/adb/magisk/magiskpolicy' to u:object_r:magisk_file:s0
chcon '/data/adb/magisk/magisk32' to u:object_r:magisk_file:s0
chcon '/data/adb/modules' to u:object_r:system_file:s0
chcon '/data/adb/post-fs-data.d' to u:object_r:adb_data_file:s0
chcon '/data/adb/service.d' to u:object_r:adb_data_file:s0

# ---------------------------------------------------------------------
[16.04.2023 18:39 ]  ... the script ended with RC=0
 ----------------------------------------------------------------------

[16.04.2023 18:39 ] Processing the task "enable_root_access_for_the_shell" with the parameter "reboot" ...
[16.04.2023 18:39 ] Executing now "enable_root_access_for_the_shell reboot"

 ----------------------------------------------------------------------
[16.04.2023 18:39 ]
[16.04.2023 18:39 ] *** Enabling root access for shell in Magisk using the script "/data/develop/android/scripts_on_linux/init_magisk_db.sh" with the parameter ""  ...
[16.04.2023 18:39 ]
[16.04.2023 18:39 ] The automatic reboot after executing the script is enabled
[16.04.2023 18:39 ] The task execution will stop if the script ends with a return code not zero

[16.04.2023 18:39 ]  ----------------------------------------------------------------------

[16.04.2023 18:39 ] *** Executing now "/data/develop/android/scripts_on_linux/init_magisk_db.sh " ...
# ---------------------------------------------------------------------

init_magisk_db.sh version - v1.0.1.0 - shell script to enable root access via Magisk for specified apps

Using the TWRP helper script "/data/develop/android/scripts_on_linux/boot_phone_from_twrp.sh"
Using the Magisk helper script "/data/develop/android/scripts_on_linux/enable_root_access_via_magisk.sh"
The apps for which root access should be enabled are:
   com.android.shell
Apps that should be enabled are:  com.android.shell
UIDs that should be enabled are:
Found one more app names in the list of apps
Reading the helper script "boot_phone_from_twrp.sh" ...
The script is running as user "xtrnaw7" -- will use "sudo" for the fastboot commands ...
Will use the attached phone with the serial number "M6AIB760D0939LX"
Using the default TWRP image: "/data/backup/ASUS_ZENFONE8/twrp/current_twrp.img"
Using the options "-d -s M6AIB760D0939LX " for the adb commands
Using the options " -s M6AIB760D0939LX " for the fastboot commands
Checking the script prerequisites ...
Will wait up to 60 second(s) after booting the phone into the bootloader
Will wait up to 120 second(s) after booting the phone from the TWRP image
Will wait up to 30 second(s) until the adb daemon is ready to use
Retrieving the current status of the phone ...
The phone is currently booted from a TWRP image
The boot slot is _b.
Retrieving the UIDs for the app names ...
Rebooting the phone using the command " /usr/bin/adb -d -s M6AIB760D0939LX  reboot " now ...
Waiting up to 120 second(s) for the phone .....
Booting the phone into the AndroidOS succeeded after 25 seconds; the current status of the phone is 3
Retrieving the UID for the app "com.android.shell" ...
The UID for the app "com.android.shell" is "2000"
Will enable the root access via Magisk for these UIDs:  2000
The phone is booted into the Android OS
Booting the phone into the bootloader now ...
Waiting up to 60 seconds for the boot into the fastboot mode ...
The phone is booted into the bootloader
Booting the phone from the TWRP image "/data/backup/ASUS_ZENFONE8/twrp/current_twrp.img" now  ...
Sending 'boot.img' (98304 KB)                      OKAY [  2.839s]
Booting                                            OKAY [ 10.360s]
Finished. Total time: 13.243s
Waiting up to 120 seconds for the boot of the phone ....
Waiting up to 30 seconds for the adb daemon to get ready  ..
... the adb daemon is ready after 2 second(s)

The phone is booted into TWRP: "/data/backup/ASUS_ZENFONE8/twrp/current_twrp.img" version "3.7.0_12-0"
Copying the Magisk helper script "/data/develop/android/scripts_on_linux/enable_root_access_via_magisk.sh" to /cache/enable_root_access_via_magisk.sh on the phone ...
/data/develop/android/scripts_on_linux/enable_root_access_via_magisk.sh: 1 file pushed, 0 skipped. 417.9 MB/s (22596 bytes in 0.000s)
Executing the Magisk helper script "/cache/enable_root_access_via_magisk.sh" on the phone now ...

Enabling root access for apps by adding entries to the Magisk database

OK, running in TWRP
TWRP is booted from an image file
Using the Magisk binary "/data/adb/magisk/magisk64"
Using the Magisk database "/data/adb/magisk.db"
Checking the prerequisites ...
Checking if the required executables exist ...
OK, the file "/data/adb/magisk/magisk64" exists and is executable
Checking if the required data files exist ...
OK, the file "/data/adb/magisk.db" exists
Using the sqlite3 executable "/system/bin/sqlite3"
Checking the parameter ...
The parameter "2000" is okay
OK, all parameter are okay
OK, the installed Magisk version "25.2" is supported
Creating a backup of the existing Magisk database in "/data/adb/magisk.db.563.bkp" ...

Reading the current entries from the Magisk database ...
Current entries in the Magisk database table "policies":


Enabling the root access for these app UIDs:  2000

Processing the UID "2000" ...
Enabling root access for the UID "2000" now ...
OK, root access successfully enabled for the UID "2000"

Summary

root access enabled for 1 UID(s):
   2000

Current entries in the Magisk database table "policies":

uid   policy  until  logging  notification
----  ------  -----  -------  ------------
2000  2       0      1        1           

root access for the UIDs via Magisk successfully enabled
Rebooting the phone now ...
Rebooting the phone using the command " /usr/bin/adb -d -s M6AIB760D0939LX  reboot " now ...

# ---------------------------------------------------------------------
[16.04.2023 18:40 ]  ... the script ended with RC=0
 ----------------------------------------------------------------------

[16.04.2023 18:40 ] Processing the task "wait_for_access_via_adb" with the parameter "120:kill" ...
[16.04.2023 18:40 ] Executing now "wait_for_access_via_adb 120 kill"

 ----------------------------------------------------------------------
[16.04.2023 18:40 ] The current status of the phone is not known (PHONE_STATUS=10)
[16.04.2023 18:40 ] Stopping the adb daemon now ...
+ grep adb
+ grep -v grep
+ ps -ef
xtrnaw7   544495       1  0 18:37 ?        00:00:00 adb -L tcp:5037 fork-server server --reply-fd 4
+ echo

+ /usr/bin/adb -d -s M6AIB760D0939LX kill-server
+ echo

+ grep -v grep
+ grep adb
+ ps -ef
[16.04.2023 18:40 ]
[16.04.2023 18:40 ] *** Waiting up to 120 second(s) for a working access via adb to the attached phone ...
[16.04.2023 18:41 ]
Waiting up to 120 seconds for the boot of the phone .....
[16.04.2023 18:41 ] The phone is currently booted into the Android OS
[16.04.2023 18:41 ] The boot slot is _b.
[16.04.2023 18:41 ] adb access to the phone is working now
 ----------------------------------------------------------------------

[16.04.2023 18:41 ] Processing the task "install_magisk_v26_in_boot_partition" with the parameter "active:reboot" ...
[16.04.2023 18:41 ] Executing now "install_magisk_v26_in_boot_partition active reboot"

 ----------------------------------------------------------------------
[16.04.2023 18:41 ] The slot to use for this task is "active"
[16.04.2023 18:41 ]
[16.04.2023 18:41 ] *** Installing Magisk using the apk file "/data/backup/Android/EssentialApps_Backup/Magisk-v26.1.apk" into the boot partition using the script "/data/develop/android/scripts_on_linux/install_magisk_via_twrp.sh" with the parameter "active copy_apk use_apk  magisk_apk_file=/data/backup/Android/EssentialApps_Backup/Magisk-v26.1.apk"  ...
[16.04.2023 18:41 ]
[16.04.2023 18:41 ] The automatic reboot after executing the script is enabled
[16.04.2023 18:41 ] The task execution will stop if the script ends with a return code not zero

[16.04.2023 18:41 ]  ----------------------------------------------------------------------

[16.04.2023 18:41 ] *** Executing now "/data/develop/android/scripts_on_linux/install_magisk_via_twrp.sh active copy_apk use_apk magisk_apk_file=/data/backup/Android/EssentialApps_Backup/Magisk-v26.1.apk" ...
# ---------------------------------------------------------------------

install_magisk_via_twrp.sh version - v3.1.0.0 - add Magisk to the boot partition of a phone running Android using TWRP

Parameter "copy_apk" found: Will copy the Magisk apk file to the phone if neccessary
Parameter "use_apk" found: Will use the files from the apk file even if the files in /data/adb/magisk exist
Parameter "magisk_apk_file=file" found : Will use the Magisk apk file "/data/backup/Android/EssentialApps_Backup/Magisk-v26.1.apk"
Using the TWRP image hardcoded in the script: "/data/backup/ASUS_ZENFONE8/twrp/current_twrp.img"
Checking the script prerequisites ...
Will wait 10 second(s) before starting the script on the phone
The Magisk version used is v26.0 or newer
Using the temporary directory "/data/local/tmp/MagiskInst" on the phone
The script is running as user "xtrnaw7" -- will use "sudo" for the fastboot commands ...
Will patch the boot partition on the attached phone with the serial number "M6AIB760D0939LX"
Using the options "-d -s M6AIB760D0939LX " for the adb commands
Using the options " -s M6AIB760D0939LX " for the fastboot commands
Checking for a connected phone booted into fastboot mode ...
No attached phone in fastboot mode found
Checking for an attached phone with working access via adb (USB) ...
Linux localhost 5.4.147-Omni-qgki-perf-g875131b91949 #20 SMP PREEMPT Sun Mar 26 09:47:43 CEST 2023 aarch64 Toybox
... found a phone connected via USB with working adb access
The phone is booted in normal mode
The installed OS is based on Android 13 (Sun Apr 16 15:54:50 CEST 2023); the description for the distribution is "omni_zenfone8-user 13 TQ2A.230405.003.E1 eng.xtrnaw.20230416.155603 release-keys"
WARNING: Can not detect the version of the installed Magisk
Booting the phone into the fastboot mode now ...
Waiting up to 60 seconds for the boot into the fastboot mode ...
Booting the phone from the TWRP image "/data/backup/ASUS_ZENFONE8/twrp/current_twrp.img" now  ...
Sending 'boot.img' (98304 KB)                      OKAY [  2.852s]
Booting                                            OKAY [ 10.359s]
Finished. Total time: 13.264s
Waiting up to 60 seconds for the boot of the phone ....
Retrieving the current boot slot from the phone ...
The current boot slot is "_b"
The boot slot to patch is "_b"
The boot partition to patch is "boot_b"
Copying the Magisk apk file "/data/backup/Android/EssentialApps_Backup/Magisk-v26.1.apk" to the phone into the directory "/data" ...
/data/backup/Android/EssentialApps_Backup/Magisk-v26.1.apk: 1 file pushed, 0 skipped. 47.3 MB/s (11411692 bytes in 0.230s)
Creating the temporary directory "/data/local/tmp/MagiskInst" with the Magisk files necessarry to install Magisk into the boot partition ...

Creating the script file "/tmp/init_magisk_dirs.sh" to create the directory "/data/local/tmp/MagiskInst" on the phone ...
Creating the directory "/data/local/tmp/MagiskInst" on the phone ...
Copying the temporary script file "/tmp/init_magisk_dirs.sh" to the file "/data/local/tmp/MagiskInst/create_temporary_magisk_dir.sh" on the phone ...
/tmp/init_magisk_dirs.sh: 1 file pushed, 0 skipped. 246.5 MB/s (6588 bytes in 0.000s)
Executing the script "/data/local/tmp/MagiskInst/create_temporary_magisk_dir.sh" on the phone ...
 ------------------------------------------------------------------------------
+ adb -d -s M6AIB760D0939LX shell /data/local/tmp/MagiskInst/create_temporary_magisk_dir.sh /data/local/tmp/MagiskInst /data/Magisk-v26.1.apk
Using the directory "/data/local/tmp/MagiskInst/bin" for the Magisk Binaries
Creating the files in the directory "/data/local/tmp/MagiskInst/bin" using the files for the CPU "arm64-v8a" from the apk file "/data/Magisk-v26.1.apk" ...
Unpacking the apk file "/data/Magisk-v26.1.apk" into the directory "/data/local/tmp/MagiskInst/magisk_apk_contents.529" ...
Copying the files to "/data/local/tmp/MagiskInst/bin" ...
+ mv ./assets/util_functions.sh /data/local/tmp/MagiskInst/bin
+ mv ./assets/chromeos /data/local/tmp/MagiskInst/bin/
+ mv ./assets/boot_patch.sh /data/local/tmp/MagiskInst/bin
+ mv ./assets/addon.d.sh /data/local/tmp/MagiskInst/bin
+ '[' -r ./assets/stub.apk ']'
+ mv ./assets/stub.apk /data/local/tmp/MagiskInst/bin
+ cd ./lib/arm64-v8a
+ mv libbusybox.so /data/local/tmp/MagiskInst/bin/busybox
+ mv libmagisk64.so /data/local/tmp/MagiskInst/bin/magisk64
+ mv libmagiskboot.so /data/local/tmp/MagiskInst/bin/magiskboot
+ mv libmagiskinit.so /data/local/tmp/MagiskInst/bin/magiskinit
+ mv libmagiskpolicy.so /data/local/tmp/MagiskInst/bin/magiskpolicy
+ cd ../..
+ file=libmagisk32.so
+ '[' arm64-v8ax '=' arm64-v8ax -a -r ./lib/armeabi-v7a/libmagisk32.so ']'
+ mv ./lib/armeabi-v7a/libmagisk32.so /data/local/tmp/MagiskInst/bin/magisk32
+ set +x
+ TEMPRC=0
+ set +x
 ------------------------------------------------------------------------------
... "/data/local/tmp/MagiskInst/create_temporary_magisk_dir.sh" successfully executed

Checking if the Magisk patch script "boot_patch.sh" exists on the phone ....
-rwxr-xr-x 1 root root 6978 2023-04-16 16:42 /data/local/tmp/MagiskInst/bin/boot_patch.sh
Checking if the download directory "/sdcard/Download" exists on the phone ....
/sdcard/Download
Creating the boot image file "/sdcard/Download/boot_b.545768.img" from the partition "/dev/block/by-name/boot_b" ...
196608+0 records in
196608+0 records out
100663296 bytes (96 M) copied, 0.326922 s, 294 M/s

Checking the result ...
-rw-rw---- 1 root media_rw 100663296 2023-04-16 16:42 /sdcard/Download/boot_b.545768.img
The check sums are:
The check sum of the boot partition "/dev/block/by-name/boot_b" on the phone is             "2286115237"
The check sum of th boot image file on the phone is "/sdcard/Download/boot_b.545768.img" is "2286115237"   
Installing Magisk into the boot partition using the new method ...
Patching the boot image file "/sdcard/Download/boot_b.545768.img" ...
Preparing the directory with the temporary Magisk installation files for usage by the user with the UID 2000 (this is the user "shell") ...
+ adb -d -s M6AIB760D0939LX shell chown -R 2000:2000 /data/local/tmp/MagiskInst
+ adb -d -s M6AIB760D0939LX shell chmod -R 755 /data/local/tmp/MagiskInst
+ adb -d -s M6AIB760D0939LX shell chown -R 2000:2000 /sdcard/Download/boot_b.545768.img
+ adb -d -s M6AIB760D0939LX shell chmod o+r /sdcard/Download/boot_b.545768.img
+ set +x
Rebooting the phone into the Android OS now ...
Waiting up to 60 seconds for the boot of the phone .....
The phone is now booted into the Android OS.
Using the patch script "/data/local/tmp/MagiskInst/bin/boot_patch.sh" ...
Waiting up to 20 seconds for /data to get mounted ...........
- Unpacking boot image
Parsing boot image: [/sdcard/Download/boot_b.545768.img]
HEADER_VER      [3]
KERNEL_SZ       [39928320]
RAMDISK_SZ      [37895304]
OS_VERSION      [13.0.0]
OS_PATCH_LEVEL  [2023-04]
PAGESIZE        [4096]
CMDLINE         []
KERNEL_FMT      [raw]
RAMDISK_FMT     [gzip]
VBMETA
- Checking ramdisk status
Loading cpio: [ramdisk.cpio]
- Magisk patched boot image detected
Loading cpio: [ramdisk.cpio]
Remove [.backup]
Remove [.backup/.magisk]
Remove [overlay.d]
Remove [overlay.d/sbin]
Remove [overlay.d/sbin/magisk32.xz]
Remove [overlay.d/sbin/magisk64.xz]
Remove [.backup/.rmlist]
Move [.backup/init] -> [init]
Move [.backup/system/etc/fstab.postinstall] -> [system/etc/fstab.postinstall]
Dump cpio: [ramdisk.cpio]
- Patching ramdisk
- Pre-init storage partition device ID: metadata
Loading cpio: [ramdisk.cpio]
Add entry [init] (0750)
Create directory [overlay.d] (0750)
Create directory [overlay.d/sbin] (0750)
Add entry [overlay.d/sbin/magisk32.xz] (0644)
Add entry [overlay.d/sbin/magisk64.xz] (0644)
Add entry [overlay.d/sbin/stub.xz] (0644)
Patch with flag KEEPVERITY=[false] KEEPFORCEENCRYPT=[false]
Found fstab file [system/etc/fstab.postinstall]
Remove pattern [,avb_keys=/product/etc/security/avb/system_other.avbpubkey]
Loading cpio: [ramdisk.cpio.orig]
Backup mismatch entry: [init] -> [.backup/init]
Record new entry: [overlay.d] -> [.backup/.rmlist]
Record new entry: [overlay.d/sbin] -> [.backup/.rmlist]
Record new entry: [overlay.d/sbin/magisk32.xz] -> [.backup/.rmlist]
Record new entry: [overlay.d/sbin/magisk64.xz] -> [.backup/.rmlist]
Record new entry: [overlay.d/sbin/stub.xz] -> [.backup/.rmlist]
Backup mismatch entry: [system/etc/fstab.postinstall] -> [.backup/system/etc/fstab.postinstall]
Create directory [.backup] (0000)
Add entry [.backup/.magisk] (0000)
Dump cpio: [ramdisk.cpio]
- Repacking boot image
Parsing boot image: [/sdcard/Download/boot_b.545768.img]
HEADER_VER      [3]
KERNEL_SZ       [39928320]
RAMDISK_SZ      [37895304]
OS_VERSION      [13.0.0]
OS_PATCH_LEVEL  [2023-04]
PAGESIZE        [4096]
CMDLINE         []
KERNEL_FMT      [raw]
RAMDISK_FMT     [gzip]
VBMETA
Repack to boot image: [new-boot.img]
HEADER_VER      [3]
KERNEL_SZ       [39928320]
RAMDISK_SZ      [37947903]
OS_VERSION      [13.0.0]
OS_PATCH_LEVEL  [2023-04]
PAGESIZE        [4096]
CMDLINE         []
Checking the result ...
-rw-r--r-- 1 shell shell 100663296 2023-04-16 18:43 /data/local/tmp/MagiskInst/bin/new-boot.img
The patched boot image is "/sdcard/Download/patched_boot_b.545768.img"
The Magisk app is not yet installed
Now installing the Magisk App using the apk file "/data/backup/Android/EssentialApps_Backup/Magisk-v26.1.apk" ...
+ cat /data/backup/Android/EssentialApps_Backup/Magisk-v26.1.apk
+ adb -d -s M6AIB760D0939LX shell pm install -S 11411692
Success
+ set +x
Will now grant the permission "android.permission.POST_NOTIFICATIONS" for the Magisk App ...
+ adb -d -s M6AIB760D0939LX shell pm grant com.topjohnwu.magisk android.permission.POST_NOTIFICATIONS
+ set +x
The status of the permission "android.permission.POST_NOTIFICATIONS" for the Magisk App is now:
        android.permission.POST_NOTIFICATIONS: granted=true, flags=[ USER_SENSITIVE_WHEN_GRANTED|USER_SENSITIVE_WHEN_DENIED]
Waiting now 10 seconds ...
Now rebooting the phone into the bootloader  ...
Waiting up to 60 seconds for the boot into the fastboot mode ...
Booting the phone from the TWRP image "/data/backup/ASUS_ZENFONE8/twrp/current_twrp.img" now  ...
Sending 'boot.img' (98304 KB)                      OKAY [  2.837s]
Booting                                            OKAY [ 10.359s]
Finished. Total time: 13.268s
Waiting up to 60 seconds for the boot of the phone ....
***
total 3911
-rwxr-xr-x 1 root root    3530 2023-04-16 16:39 addon.d.sh
-rwxr-xr-x 1 root root    5987 2023-04-16 16:39 boot_patch.sh
-rwxr-xr-x 1 root root 2107848 2023-04-16 16:39 busybox
drwxr-xr-x 2 root root    3452 2023-04-16 16:39 chromeos
-rwxr-xr-x 1 root root  154452 2023-04-16 16:39 magisk32
-rwxr-xr-x 1 root root  247168 2023-04-16 16:39 magisk64
-rwxr-xr-x 1 root root  631848 2023-04-16 16:39 magiskboot
-rwxr-xr-x 1 root root  479592 2023-04-16 16:39 magiskinit
-rwxr-xr-x 1 root root  328240 2023-04-16 16:39 magiskpolicy
-rwxr-xr-x 1 root root   23888 2023-04-16 16:39 util_functions.sh
***
Copying the Magisk binaries from "/data/local/tmp/MagiskInst/bin" to "/data/adb/magisk" ...
chcon '/data/adb/magisk' to r:magisk_file:s0
chcon '/data/adb/magisk/addon.d.sh' to u:object_r:magisk_file:s0
chcon '/data/adb/magisk/boot_patch.sh' to u:object_r:magisk_file:s0
chcon '/data/adb/magisk/busybox' to u:object_r:magisk_file:s0
chcon '/data/adb/magisk/chromeos' to u:object_r:magisk_file:s0
chcon '/data/adb/magisk/magisk32' to u:object_r:magisk_file:s0
chcon '/data/adb/magisk/magisk64' to u:object_r:magisk_file:s0
chcon '/data/adb/magisk/magiskboot' to u:object_r:magisk_file:s0
chcon '/data/adb/magisk/magiskinit' to u:object_r:magisk_file:s0
chcon '/data/adb/magisk/magiskpolicy' to u:object_r:magisk_file:s0
chcon '/data/adb/magisk/ramdisk.cpio' to u:object_r:magisk_file:s0
chcon '/data/adb/magisk/stub.apk' to u:object_r:magisk_file:s0
chcon '/data/adb/magisk/util_functions.sh' to u:object_r:magisk_file:s0
Magisk binaries successfully copied to "/data/adb/magisk"
***
total 95459
-rwxr-xr-x 1 shell shell     3534 2023-04-16 16:42 addon.d.sh
-rwxr-xr-x 1 shell shell     6978 2023-04-16 16:42 boot_patch.sh
-rwxr-xr-x 1 shell shell  2116176 2023-04-16 16:42 busybox
drwxr-xr-x 2 shell shell     3452 2023-04-16 16:42 chromeos
-rwxr-xr-x 1 shell shell   162500 2023-04-16 16:42 magisk32
-rwxr-xr-x 1 shell shell   263904 2023-04-16 16:42 magisk64
-rwxr-xr-x 1 shell shell   825056 2023-04-16 16:42 magiskboot
-rwxr-xr-x 1 shell shell   642952 2023-04-16 16:42 magiskinit
-rwxr-xr-x 1 shell shell   331832 2023-04-16 16:42 magiskpolicy
-rw-r--r-- 1 shell shell 93228876 2023-04-16 16:42 ramdisk.cpio
-rwxr-xr-x 1 shell shell    29053 2023-04-16 16:42 stub.apk
-rwxr-xr-x 1 shell shell    22746 2023-04-16 16:42 util_functions.sh
***
Waiting now 10 seconds ...
Patching the partition "/dev/block/by-name/boot_b" from the patched boot image file "/sdcard/Download/patched_boot_b.545768.img" via dd ...
196608+0 records in
196608+0 records out
100663296 bytes (96 M) copied, 5.042465 s, 19 M/s
Checking the result ....

The check sums for the images and devices on the phone are:

2286115237 100663296 /sdcard/Download/boot_b.545768.img
4003366313 100663296 /sdcard/Download/patched_boot_b.545768.img
4003366313 100663296 /dev/block/by-name/boot_b

OK, patching the boot partition "/dev/block/by-name/boot_b" was successfull
INFO: The Magisk binaries in "/data/adb/magisk" already exist
Rebooting the phone now ...

# ---------------------------------------------------------------------
[16.04.2023 18:44 ]  ... the script ended with RC=0
 ----------------------------------------------------------------------

[16.04.2023 18:44 ] Processing the task "install_the_magisk_app"  ...
[16.04.2023 18:44 ] Executing now "install_the_magisk_app "

 ----------------------------------------------------------------------
[16.04.2023 18:44 ]
[16.04.2023 18:44 ] *** Installing the Magisk App from the apk file "/data/backup/Android/EssentialApps_Backup/Magisk-v26.1.apk" using the script "/data/develop/android/scripts_on_linux/install_apk.sh" with the parameter " /data/backup/Android/EssentialApps_Backup/Magisk-v26.1.apk"  ...
[16.04.2023 18:44 ]
[16.04.2023 18:44 ] The automatic reboot after executing the script is disabled
[16.04.2023 18:44 ] The task execution will stop if the script ends with a return code not zero
[16.04.2023 18:44 ] The phone is already booted into the Android
[16.04.2023 18:44 ] Waiting up to 20 seconds until /sdcard is mounted ...
..........
[16.04.2023 18:45 ] wait_until_sdcard_is_mounted: /sdcard is mounted after 11 second(s)

[16.04.2023 18:45 ]  ----------------------------------------------------------------------

[16.04.2023 18:45 ] *** Executing now "/data/develop/android/scripts_on_linux/install_apk.sh -d -s M6AIB760D0939LX -- /data/backup/Android/EssentialApps_Backup/Magisk-v26.1.apk" ...
# ---------------------------------------------------------------------

Running on a PC
Using adb with the options " -d -s M6AIB760D0939LX " to install the packages
The apks will be installed on the phone model ASUS_I006D with the serial number M6AIB760D0939LX
Installing these apks

 
/data/backup/Android/EssentialApps_Backup/Magisk-v26.1.apk



Installing the apk "/data/backup/Android/EssentialApps_Backup/Magisk-v26.1.apk" ...
Success
"/data/backup/Android/EssentialApps_Backup/Magisk-v26.1.apk" succcessfully installed

Installation summary
====================

1 package(s) successfully installed:
 
/data/backup/Android/EssentialApps_Backup/Magisk-v26.1.apk



# ---------------------------------------------------------------------
[16.04.2023 18:45 ]  ... the script ended with RC=0
[16.04.2023 18:45 ] Magisk app successfully installed
[16.04.2023 18:45 ] Will now grant the permission "android.permission.POST_NOTIFICATIONS" for the Magisk app ...

The status of the permission "android.permission.POST_NOTIFICATIONS" for the Magisk App is now:
        android.permission.POST_NOTIFICATIONS: granted=true, flags=[ USER_SENSITIVE_WHEN_GRANTED|USER_SENSITIVE_WHEN_DENIED]
 ----------------------------------------------------------------------

[16.04.2023 18:45 ] Processing the task "wait_for_access_via_adb" with the parameter "120:kill" ...
[16.04.2023 18:45 ] Executing now "wait_for_access_via_adb 120 kill"

 ----------------------------------------------------------------------
[16.04.2023 18:45 ] The phone is currently booted into the Android OS
[16.04.2023 18:45 ] The boot slot is _b.
[16.04.2023 18:45 ] adb access to the phone is working
 ----------------------------------------------------------------------

[16.04.2023 18:45 ] Processing the task "enable_disable_abort_on_error" with the parameter "disable" ...
[16.04.2023 18:45 ] Executing now "enable_disable_abort_on_error disable"

 ----------------------------------------------------------------------
[16.04.2023 18:45 ] Setting the variable "ABORT_TASK_EXECUTION_ON_ERROR" to "1" ..
 ----------------------------------------------------------------------

[16.04.2023 18:45 ] Processing the task "install_essential_scripts"  ...
[16.04.2023 18:45 ] Executing now "install_essential_scripts "

 ----------------------------------------------------------------------
[16.04.2023 18:45 ]
[16.04.2023 18:45 ] *** Installing the essential scripts from the local directory "/data/backup/Android/EssentialScripts/" onto the phone  ...
[16.04.2023 18:45 ]
[16.04.2023 18:45 ] The automatic reboot after executing the script is disabled
[16.04.2023 18:45 ] The task execution will stop if the script ends with a return code not zero
[16.04.2023 18:45 ] The phone is already booted into the Android
[16.04.2023 18:45 ] Waiting up to 20 seconds until /sdcard is mounted ...

[16.04.2023 18:45 ] wait_until_sdcard_is_mounted: /sdcard is mounted after 1 second(s)
[16.04.2023 18:45 ] Copying the scripts to the phone ...
/data/backup/Android/EssentialScripts//0001logcatboot: 1 file pushed, 0 skipped. 4.0 MB/s (156 bytes in 0.000s)
/data/backup/Android/EssentialScripts//correct_dev_pn553.sh: 1 file pushed, 0 skipped. 37.9 MB/s (354 bytes in 0.000s)
/data/backup/Android/EssentialScripts//disable_intent_filter_verification.sh: 1 file pushed, 0 skipped. 5.8 MB/s (51 bytes in 0.000s)
/data/backup/Android/EssentialScripts//enable_microg.sh: 1 file pushed, 0 skipped. 20.2 MB/s (146 bytes in 0.000s)
/data/backup/Android/EssentialScripts//enable_wifi.sh: 1 file pushed, 0 skipped. 361.2 MB/s (2956 bytes in 0.000s)
/data/backup/Android/EssentialScripts//install_apk.sh: 1 file pushed, 0 skipped. 477.4 MB/s (6052 bytes in 0.000s)
/data/backup/Android/EssentialScripts//list_magisk_root_permissions.sh: 1 file pushed, 0 skipped. 29.0 MB/s (223 bytes in 0.000s)
/data/backup/Android/EssentialScripts//remove_screenlock.sh: 1 file pushed, 0 skipped. 9.4 MB/s (69 bytes in 0.000s)
8 files pushed, 0 skipped. 0.1 MB/s (10007 bytes in 0.166s)
 ----------------------------------------------------------------------

[16.04.2023 18:45 ] Processing the task "install_essential_apps"  ...
[16.04.2023 18:45 ] Executing now "install_essential_apps "

 ----------------------------------------------------------------------
[16.04.2023 18:45 ]
[16.04.2023 18:45 ] *** Installing the essential apss from the local directory "/data/backup/Android/EssentialApps" onto the phone using the script "/data/develop/android/scripts_on_linux/install_apk.sh" ...
[16.04.2023 18:45 ]
[16.04.2023 18:45 ] The automatic reboot after executing the script is disabled
[16.04.2023 18:45 ] The task execution will stop if the script ends with a return code not zero
[16.04.2023 18:45 ] The phone is already booted into the Android
Running on a PC
Using adb with the options " -d -s M6AIB760D0939LX " to install the packages
The apks will be installed on the phone model ASUS_I006D with the serial number M6AIB760D0939LX
Installing these apks

 
/data/backup/Android/EssentialApps/axp.tool.apkextractor_v5.apk



Installing the apk "/data/backup/Android/EssentialApps/axp.tool.apkextractor_v5.apk" ...
Success
"/data/backup/Android/EssentialApps/axp.tool.apkextractor_v5.apk" succcessfully installed

Installation summary
====================

1 package(s) successfully installed:
 
/data/backup/Android/EssentialApps/axp.tool.apkextractor_v5.apk


Running on a PC
Using adb with the options " -d -s M6AIB760D0939LX " to install the packages
The apks will be installed on the phone model ASUS_I006D with the serial number M6AIB760D0939LX
Installing these apks

 
/data/backup/Android/EssentialApps/com.android.keepass_196.apk



Installing the apk "/data/backup/Android/EssentialApps/com.android.keepass_196.apk" ...
Success
"/data/backup/Android/EssentialApps/com.android.keepass_196.apk" succcessfully installed

Installation summary
====================

1 package(s) successfully installed:
 
/data/backup/Android/EssentialApps/com.android.keepass_196.apk


Running on a PC
Using adb with the options " -d -s M6AIB760D0939LX " to install the packages
The apks will be installed on the phone model ASUS_I006D with the serial number M6AIB760D0939LX
Installing these apks

 
/data/backup/Android/EssentialApps/com.bytehamster.changelog_v49.apk



Installing the apk "/data/backup/Android/EssentialApps/com.bytehamster.changelog_v49.apk" ...
Success
"/data/backup/Android/EssentialApps/com.bytehamster.changelog_v49.apk" succcessfully installed

Installation summary
====================

1 package(s) successfully installed:
 
/data/backup/Android/EssentialApps/com.bytehamster.changelog_v49.apk


Running on a PC
Using adb with the options " -d -s M6AIB760D0939LX " to install the packages
The apks will be installed on the phone model ASUS_I006D with the serial number M6AIB760D0939LX
Installing these apks

 
/data/backup/Android/EssentialApps/com.elsdoerfer.android.autostarts_v33.apk



Installing the apk "/data/backup/Android/EssentialApps/com.elsdoerfer.android.autostarts_v33.apk" ...
Success
"/data/backup/Android/EssentialApps/com.elsdoerfer.android.autostarts_v33.apk" succcessfully installed

Installation summary
====================

1 package(s) successfully installed:
 
/data/backup/Android/EssentialApps/com.elsdoerfer.android.autostarts_v33.apk


Running on a PC
Using adb with the options " -d -s M6AIB760D0939LX " to install the packages
The apks will be installed on the phone model ASUS_I006D with the serial number M6AIB760D0939LX
Installing these apks

 
/data/backup/Android/EssentialApps/com.keramidas.TitaniumBackupAddon_v1.apk



Installing the apk "/data/backup/Android/EssentialApps/com.keramidas.TitaniumBackupAddon_v1.apk" ...
Success
"/data/backup/Android/EssentialApps/com.keramidas.TitaniumBackupAddon_v1.apk" succcessfully installed

Installation summary
====================

1 package(s) successfully installed:
 
/data/backup/Android/EssentialApps/com.keramidas.TitaniumBackupAddon_v1.apk


Running on a PC
Using adb with the options " -d -s M6AIB760D0939LX " to install the packages
The apks will be installed on the phone model ASUS_I006D with the serial number M6AIB760D0939LX
Installing these apks

 
/data/backup/Android/EssentialApps/com.keramidas.TitaniumBackup_v417.apk



Installing the apk "/data/backup/Android/EssentialApps/com.keramidas.TitaniumBackup_v417.apk" ...
Success
"/data/backup/Android/EssentialApps/com.keramidas.TitaniumBackup_v417.apk" succcessfully installed

Installation summary
====================

1 package(s) successfully installed:
 
/data/backup/Android/EssentialApps/com.keramidas.TitaniumBackup_v417.apk


Running on a PC
Using adb with the options " -d -s M6AIB760D0939LX " to install the packages
The apks will be installed on the phone model ASUS_I006D with the serial number M6AIB760D0939LX
Installing these apks

 
/data/backup/Android/EssentialApps/com.kunzisoft.keepass.libre_57.apk



Installing the apk "/data/backup/Android/EssentialApps/com.kunzisoft.keepass.libre_57.apk" ...
Success
"/data/backup/Android/EssentialApps/com.kunzisoft.keepass.libre_57.apk" succcessfully installed

Installation summary
====================

1 package(s) successfully installed:
 
/data/backup/Android/EssentialApps/com.kunzisoft.keepass.libre_57.apk


Running on a PC
Using adb with the options " -d -s M6AIB760D0939LX " to install the packages
The apks will be installed on the phone model ASUS_I006D with the serial number M6AIB760D0939LX
Installing these apks

 
/data/backup/Android/EssentialApps/com.matoski.adbm_v27.apk



Installing the apk "/data/backup/Android/EssentialApps/com.matoski.adbm_v27.apk" ...
Success
"/data/backup/Android/EssentialApps/com.matoski.adbm_v27.apk" succcessfully installed

Installation summary
====================

1 package(s) successfully installed:
 
/data/backup/Android/EssentialApps/com.matoski.adbm_v27.apk


Running on a PC
Using adb with the options " -d -s M6AIB760D0939LX " to install the packages
The apks will be installed on the phone model ASUS_I006D with the serial number M6AIB760D0939LX
Installing these apks

 
/data/backup/Android/EssentialApps/com.offsec.nhterm_2020040001.apk



Installing the apk "/data/backup/Android/EssentialApps/com.offsec.nhterm_2020040001.apk" ...
Success
"/data/backup/Android/EssentialApps/com.offsec.nhterm_2020040001.apk" succcessfully installed

Installation summary
====================

1 package(s) successfully installed:
 
/data/backup/Android/EssentialApps/com.offsec.nhterm_2020040001.apk


Running on a PC
Using adb with the options " -d -s M6AIB760D0939LX " to install the packages
The apks will be installed on the phone model ASUS_I006D with the serial number M6AIB760D0939LX
Installing these apks

 
/data/backup/Android/EssentialApps/com.termux_v118.apk



Installing the apk "/data/backup/Android/EssentialApps/com.termux_v118.apk" ...
Success
"/data/backup/Android/EssentialApps/com.termux_v118.apk" succcessfully installed

Installation summary
====================

1 package(s) successfully installed:
 
/data/backup/Android/EssentialApps/com.termux_v118.apk


Running on a PC
Using adb with the options " -d -s M6AIB760D0939LX " to install the packages
The apks will be installed on the phone model ASUS_I006D with the serial number M6AIB760D0939LX
Installing these apks

 
/data/backup/Android/EssentialApps/F-Droid.apk



Installing the apk "/data/backup/Android/EssentialApps/F-Droid.apk" ...
Success
"/data/backup/Android/EssentialApps/F-Droid.apk" succcessfully installed

Installation summary
====================

1 package(s) successfully installed:
 
/data/backup/Android/EssentialApps/F-Droid.apk


Running on a PC
Using adb with the options " -d -s M6AIB760D0939LX " to install the packages
The apks will be installed on the phone model ASUS_I006D with the serial number M6AIB760D0939LX
Installing these apks

 
/data/backup/Android/EssentialApps/FoxMagiskModuleManager_0.4.0-rc1.apk



Installing the apk "/data/backup/Android/EssentialApps/FoxMagiskModuleManager_0.4.0-rc1.apk" ...
Success
"/data/backup/Android/EssentialApps/FoxMagiskModuleManager_0.4.0-rc1.apk" succcessfully installed

Installation summary
====================

1 package(s) successfully installed:
 
/data/backup/Android/EssentialApps/FoxMagiskModuleManager_0.4.0-rc1.apk


Running on a PC
Using adb with the options " -d -s M6AIB760D0939LX " to install the packages
The apks will be installed on the phone model ASUS_I006D with the serial number M6AIB760D0939LX
Installing these apks

 
/data/backup/Android/EssentialApps/FoxMmm-0.5.6.apk



Installing the apk "/data/backup/Android/EssentialApps/FoxMmm-0.5.6.apk" ...
Success
"/data/backup/Android/EssentialApps/FoxMmm-0.5.6.apk" succcessfully installed

Installation summary
====================

1 package(s) successfully installed:
 
/data/backup/Android/EssentialApps/FoxMmm-0.5.6.apk


Running on a PC
Using adb with the options " -d -s M6AIB760D0939LX " to install the packages
The apks will be installed on the phone model ASUS_I006D with the serial number M6AIB760D0939LX
Installing these apks

 
/data/backup/Android/EssentialApps/io.github.muntashirakon.AppManager_v397.apk



Installing the apk "/data/backup/Android/EssentialApps/io.github.muntashirakon.AppManager_v397.apk" ...
Success
"/data/backup/Android/EssentialApps/io.github.muntashirakon.AppManager_v397.apk" succcessfully installed

Installation summary
====================

1 package(s) successfully installed:
 
/data/backup/Android/EssentialApps/io.github.muntashirakon.AppManager_v397.apk


Running on a PC
Using adb with the options " -d -s M6AIB760D0939LX " to install the packages
The apks will be installed on the phone model ASUS_I006D with the serial number M6AIB760D0939LX
Installing these apks

 
/data/backup/Android/EssentialApps/MiXplorer_v6.58.8_B23010320.apk



Installing the apk "/data/backup/Android/EssentialApps/MiXplorer_v6.58.8_B23010320.apk" ...
Success
"/data/backup/Android/EssentialApps/MiXplorer_v6.58.8_B23010320.apk" succcessfully installed

Installation summary
====================

1 package(s) successfully installed:
 
/data/backup/Android/EssentialApps/MiXplorer_v6.58.8_B23010320.apk


Running on a PC
Using adb with the options " -d -s M6AIB760D0939LX " to install the packages
The apks will be installed on the phone model ASUS_I006D with the serial number M6AIB760D0939LX
Installing these apks

 
/data/backup/Android/EssentialApps/NetHunterStore.apk



Installing the apk "/data/backup/Android/EssentialApps/NetHunterStore.apk" ...
Success
"/data/backup/Android/EssentialApps/NetHunterStore.apk" succcessfully installed

Installation summary
====================

1 package(s) successfully installed:
 
/data/backup/Android/EssentialApps/NetHunterStore.apk


Running on a PC
Using adb with the options " -d -s M6AIB760D0939LX " to install the packages
The apks will be installed on the phone model ASUS_I006D with the serial number M6AIB760D0939LX
Installing these apks

 
/data/backup/Android/EssentialApps/Notecase_Pro_1.2.2.apk



Installing the apk "/data/backup/Android/EssentialApps/Notecase_Pro_1.2.2.apk" ...
Success
"/data/backup/Android/EssentialApps/Notecase_Pro_1.2.2.apk" succcessfully installed

Installation summary
====================

1 package(s) successfully installed:
 
/data/backup/Android/EssentialApps/Notecase_Pro_1.2.2.apk


Running on a PC
Using adb with the options " -d -s M6AIB760D0939LX " to install the packages
The apks will be installed on the phone model ASUS_I006D with the serial number M6AIB760D0939LX
Installing these apks

 
/data/backup/Android/EssentialApps/yasnac-v1.1.5.r65.15110ef310-release.apk



Installing the apk "/data/backup/Android/EssentialApps/yasnac-v1.1.5.r65.15110ef310-release.apk" ...
Success
"/data/backup/Android/EssentialApps/yasnac-v1.1.5.r65.15110ef310-release.apk" succcessfully installed

Installation summary
====================

1 package(s) successfully installed:
 
/data/backup/Android/EssentialApps/yasnac-v1.1.5.r65.15110ef310-release.apk



[16.04.2023 18:45 ] Summary:

[16.04.2023 18:45 ] 18 apk(s) successfully installed:

/data/backup/Android/EssentialApps/axp.tool.apkextractor_v5.apk
/data/backup/Android/EssentialApps/com.android.keepass_196.apk
/data/backup/Android/EssentialApps/com.bytehamster.changelog_v49.apk
/data/backup/Android/EssentialApps/com.elsdoerfer.android.autostarts_v33.apk
/data/backup/Android/EssentialApps/com.keramidas.TitaniumBackupAddon_v1.apk
/data/backup/Android/EssentialApps/com.keramidas.TitaniumBackup_v417.apk
/data/backup/Android/EssentialApps/com.kunzisoft.keepass.libre_57.apk
/data/backup/Android/EssentialApps/com.matoski.adbm_v27.apk
/data/backup/Android/EssentialApps/com.offsec.nhterm_2020040001.apk
/data/backup/Android/EssentialApps/com.termux_v118.apk
/data/backup/Android/EssentialApps/F-Droid.apk
/data/backup/Android/EssentialApps/FoxMagiskModuleManager_0.4.0-rc1.apk
/data/backup/Android/EssentialApps/FoxMmm-0.5.6.apk
/data/backup/Android/EssentialApps/io.github.muntashirakon.AppManager_v397.apk
/data/backup/Android/EssentialApps/MiXplorer_v6.58.8_B23010320.apk
/data/backup/Android/EssentialApps/NetHunterStore.apk
/data/backup/Android/EssentialApps/Notecase_Pro_1.2.2.apk
/data/backup/Android/EssentialApps/yasnac-v1.1.5.r65.15110ef310-release.apk
 ----------------------------------------------------------------------

[16.04.2023 18:45 ] Processing the task "install_essential_magisk_modules"  ...
[16.04.2023 18:45 ] Executing now "install_essential_magisk_modules "

 ----------------------------------------------------------------------
[16.04.2023 18:45 ]
[16.04.2023 18:45 ] *** Installing the essential Magisk modules from the local directory "/data/backup/Android/EssentialMagiskModules" onto the phone ...
[16.04.2023 18:45 ]
[16.04.2023 18:45 ] The automatic reboot after executing the script is disabled
[16.04.2023 18:45 ] The task execution will stop if the script ends with a return code not zero
[16.04.2023 18:45 ] The phone is already booted into the Android

[16.04.2023 18:45 ] *** Installing the Magisk Module addbin-v1.3.1.0.zip ...
addbin-v1.3.1.0.zip: 1 file pushed, 0 skipped. 32.3 MB/s (90852099 bytes in 2.685s)
- Current boot slot: _b
- Device is system-as-root
**********************
 Additional Binaries
 by bnsmb01@gmail.com
**********************
*******************
 Powered by Magisk
*******************
- Extracting module files
The current envrironment for this installation is
The version of the installed Magisk is "26.1" (26100)
INFO: BOOTMODE is "true"
INFO: MODPATH is "/data/adb/modules_update/addbin"
INFO: TMPDIR is "/dev/tmp"
INFO: ZIPFILE is "/storage/emulated/0/Download/MagiskModules/addbin-v1.3.1.0.zip"
INFO: ARCH is "arm64"
INFO: IS64BIT is "true"
INFO: API is "33"
Installing the Magisk Module for the additional binaries version "1.0.0.0" ...
Checking the type of the CPU used in this device ....
The CPU in this device is a arm64 CPU
OK, the CPU is supported by this module
Copying the config files to /sdcard ...
Creating the config file "/sdcard/.viminfo" ...
Creating the config file "/sdcard/.aliases" ...
Creating the config file "/sdcard/.customrc" ...
Creating the config file "/sdcard/.bashrc" ...
- Done

[16.04.2023 18:47 ] *** Installing the Magisk Module bootctl-binary-v2.1.2.zip ...
bootctl-binary-v2.1.2.zip: 1 file pushed, 0 skipped. 312.0 MB/s (23015 bytes in 0.000s)
- Current boot slot: _b
- Device is system-as-root
*******************
 Bootctl Binary
 by Roee Hershberg
*******************
*******************
 Powered by Magisk
*******************
**************************************
*   MMT Extended by Zackptg5 @ XDA   *
**************************************
 
- Extracting module files
- Removing old files
- Installing
   Installing for arm64 SDK 33 device...
 
- Setting Permissions
- Done

[16.04.2023 18:47 ] *** Installing the Magisk Module btop_v1.2.13.zip ...
btop_v1.2.13.zip: 1 file pushed, 0 skipped. 65.6 MB/s (5900366 bytes in 0.086s)
- Current boot slot: _b
- Device is system-as-root
****************************************
 btop for Android
 by Author of btop: Jakob P. Liljenberg  
****************************************
*******************
 Powered by Magisk
*******************
- Extracting module files
The current environment for this installation is
The version of the installed Magisk is "26.1" (26100)
INFO: BOOTMODE is "true"
INFO: MODPATH is "/data/adb/modules_update/btop"
INFO: TMPDIR is "/dev/tmp"
INFO: ZIPFILE is "/storage/emulated/0/Download/MagiskModules/btop_v1.2.13.zip"
INFO: ARCH is "arm64"
INFO: IS64BIT is "true"
INFO: API is "33"
Installing the Magisk Module for the additional binaries version "1.0.0.0" ...
Checking the type of the CPU used in this device ....
The CPU in this device is a arm64 CPU
The machine type reported by "uname -m" is "aarch64"
[File copied]: /data/adb/modules_update/btop/bin/btop_arm64 to /data/adb/modules_update/btop/system/xbin/btop.bin
- Done

[16.04.2023 18:47 ] *** Installing the Magisk Module magisk_ssh_v0.14.zip ...
magisk_ssh_v0.14.zip: 1 file pushed, 0 skipped. 36.4 MB/s (23306755 bytes in 0.610s)
- Current boot slot: _b
- Device is system-as-root
*******************************
      OpenSSH for Android      
*******************************
[0/7] Preparing module directory
[1/7] Extracting architecture unspecific module files
[2/7] Extracting libraries and binaries for arm64
[3/7] Configuring library path wrapper
[4/7] Recreating symlinks
[5/7] Creating SSH user directories
[6/7] Extracting sshd_config
[7/7] Cleaning up
- Setting permissions
- Done

[16.04.2023 18:47 ] *** Installing the Magisk Module MiXplorer.v6.58.4.22020910.zip ...
MiXplorer.v6.58.4.22020910.zip: 1 file pushed, 0 skipped. 33.0 MB/s (43026084 bytes in 1.242s)
- Current boot slot: _b
- Device is system-as-root
***********
 MiXplorer
 by Psk.It
***********
*******************
 Powered by Magisk
*******************
- Extracting module files
- Done

[16.04.2023 18:47 ] *** Installing the Magisk Module Nano_for_Android_NDK-6_3-6300.zip ...
Nano_for_Android_NDK-6_3-6300.zip: 1 file pushed, 0 skipped. 570.1 MB/s (380554 bytes in 0.001s)
- Current boot slot: _b
- Device is system-as-root
*****************************
 Nano for Android NDK
 by osm0sis @ xda-developers
*****************************
*******************
 Powered by Magisk
*******************
Archive:  /storage/emulated/0/Download/MagiskModules/Nano_for_Android_NDK-6_3-6300.zip
  inflating: diffusion_config.sh
  inflating: module.prop
 
Mounting...
 
Extracting files...
Archive:  /storage/emulated/0/Download/MagiskModules/Nano_for_Android_NDK-6_3-6300.zip
  inflating: META-INF/com/google/android/updater-script
  inflating: META-INF/com/google/android/update-binary
  inflating: sbin/nano
  inflating: etc/terminfo/r/rxvt
  inflating: etc/terminfo/r/rxvt-basic
  inflating: etc/terminfo/h/hurd
  inflating: etc/terminfo/m/mach-bold
  inflating: etc/terminfo/m/mach-color
  inflating: etc/terminfo/m/mach
  inflating: etc/terminfo/v/vt100
  inflating: etc/terminfo/v/vt52
  inflating: etc/terminfo/v/vt220
  inflating: etc/terminfo/v/vt102
  inflating: etc/terminfo/E/Eterm-color
  inflating: etc/terminfo/E/Eterm
  inflating: etc/terminfo/x/xterm
  inflating: etc/terminfo/x/xterm-vt220
  inflating: etc/terminfo/x/xterm-r6
  inflating: etc/terminfo/x/xterm-color
  inflating: etc/terminfo/x/xterm-xfree86
  inflating: etc/terminfo/x/xterm-256color
  inflating: etc/terminfo/x/xterm-r5
  inflating: etc/terminfo/w/wsvt25
  inflating: etc/terminfo/w/wsvt25m
  inflating: etc/terminfo/d/dumb
  inflating: etc/terminfo/s/screen-256color
  inflating: etc/terminfo/s/screen-bce
  inflating: etc/terminfo/s/sun
  inflating: etc/terminfo/s/screen
  inflating: etc/terminfo/s/screen-w
  inflating: etc/terminfo/s/screen-s
  inflating: etc/terminfo/s/screen-256color-bce
  inflating: etc/terminfo/c/cygwin
  inflating: etc/terminfo/c/cons25
  inflating: etc/terminfo/p/pcansi
  inflating: etc/terminfo/a/ansi
  inflating: etc/terminfo/l/linux
  inflating: customize.sh
  inflating: update.json
  inflating: bin/nano
  inflating: bin/nano.bin
  inflating: README.md
  inflating: diffusion_config.sh
  inflating: module.prop
 
Installing...
 
Installing nano to /data/adb/modules_update/nano-ndk/system/bin ...
Installing terminfo to /data/adb/modules_update/nano-ndk/system/etc ...
 
Unmounting...
 
Done!

[16.04.2023 18:47 ] *** Installing the Magisk Module PlayStore_for_MicroG.zip ...
PlayStore_for_MicroG.zip: 1 file pushed, 0 skipped. 34.5 MB/s (21746673 bytes in 0.601s)
- Current boot slot: _b
- Device is system-as-root
*******************************************************************
 Patched Playstore from NanoDroid for MicroG (for ARM64 CPUs only)
 by bnsmb01@gmail.com
*******************************************************************
*******************
 Powered by Magisk
*******************
- Extracting module files
The current envrironment for this installation is
The version of the installed Magisk is "26.1" (26100)
INFO: BOOTMODE is "true"
INFO: MODPATH is "/data/adb/modules_update/PlayStore_for_MicroG"
INFO: TMPDIR is "/dev/tmp"
INFO: ZIPFILE is "/storage/emulated/0/Download/MagiskModules/PlayStore_for_MicroG.zip"
INFO: ARCH is "arm64"
INFO: IS64BIT is "true"
INFO: API is "33"
Installing the Magisk Module for the patched Playstore version "1.0.0.0" ...
Checking the OS configuration ...
Checking the directories used for the patched Playstore ...
Checking tf the MicroG packages are installed ...
package:org.microg.nlp.backend.nominatim
package:org.microg.nlp.backend.ichnaea
Checking the type of the CPU used in this device ....
The CPU in this device is a arm64 CPU
OK, the CPU is supported by this module
- Done

[16.04.2023 18:47 ] Summary:

[16.04.2023 18:47 ] 7 Magisk Module(s) successfully installed:

addbin-v1.3.1.0.zip
bootctl-binary-v2.1.2.zip
btop_v1.2.13.zip
magisk_ssh_v0.14.zip
MiXplorer.v6.58.4.22020910.zip
Nano_for_Android_NDK-6_3-6300.zip
PlayStore_for_MicroG.zip
 ----------------------------------------------------------------------

[16.04.2023 18:47 ] Processing the task "enable_root_access_for_apps" with the parameter "reboot" ...
[16.04.2023 18:47 ] Executing now "enable_root_access_for_apps reboot"

 ----------------------------------------------------------------------
[16.04.2023 18:47 ]
[16.04.2023 18:47 ] *** Enabling root access for additional apps using the script "/data/develop/android/scripts_on_linux/init_magisk_db.sh" with the parameter "apps=+com.mixplorer,com.keramidas.TitaniumBackup,io.github.muntashirakon.AppManager,com.matoski.adbm,com.fox2code.mmm"  ...
[16.04.2023 18:47 ]
[16.04.2023 18:47 ] The automatic reboot after executing the script is enabled
[16.04.2023 18:47 ] The task execution will stop if the script ends with a return code not zero

[16.04.2023 18:47 ]  ----------------------------------------------------------------------

[16.04.2023 18:47 ] *** Executing now "/data/develop/android/scripts_on_linux/init_magisk_db.sh apps=+com.mixplorer,com.keramidas.TitaniumBackup,io.github.muntashirakon.AppManager,com.matoski.adbm,com.fox2code.mmm" ...
# ---------------------------------------------------------------------

init_magisk_db.sh version - v1.0.1.0 - shell script to enable root access via Magisk for specified apps

Using the TWRP helper script "/data/develop/android/scripts_on_linux/boot_phone_from_twrp.sh"
Using the Magisk helper script "/data/develop/android/scripts_on_linux/enable_root_access_via_magisk.sh"
The apps for which root access should be enabled are:
   com.android.shell com.mixplorer com.keramidas.TitaniumBackup io.github.muntashirakon.AppManager com.matoski.adbm com.fox2code.mmm
Apps that should be enabled are:  com.android.shell com.mixplorer com.keramidas.TitaniumBackup io.github.muntashirakon.AppManager com.matoski.adbm com.fox2code.mmm
UIDs that should be enabled are:
Found one more app names in the list of apps
Reading the helper script "boot_phone_from_twrp.sh" ...
The script is running as user "xtrnaw7" -- will use "sudo" for the fastboot commands ...
Will use the attached phone with the serial number "M6AIB760D0939LX"
Using the default TWRP image: "/data/backup/ASUS_ZENFONE8/twrp/current_twrp.img"
Using the options "-d -s M6AIB760D0939LX " for the adb commands
Using the options " -s M6AIB760D0939LX " for the fastboot commands
Checking the script prerequisites ...
Will wait up to 60 second(s) after booting the phone into the bootloader
Will wait up to 120 second(s) after booting the phone from the TWRP image
Will wait up to 30 second(s) until the adb daemon is ready to use
Retrieving the current status of the phone ...
The phone is currently booted into the Android OS
The boot slot is _b.
Retrieving the UIDs for the app names ...
The phone is already booted into the Android
Retrieving the UID for the app "com.android.shell" ...
The UID for the app "com.android.shell" is "2000"
Retrieving the UID for the app "com.mixplorer" ...
The UID for the app "com.mixplorer" is "10146"
Retrieving the UID for the app "com.keramidas.TitaniumBackup" ...
The UID for the app "com.keramidas.TitaniumBackup" is "10138"
Retrieving the UID for the app "io.github.muntashirakon.AppManager" ...
The UID for the app "io.github.muntashirakon.AppManager" is "10145"
Retrieving the UID for the app "com.matoski.adbm" ...
The UID for the app "com.matoski.adbm" is "10140"
Retrieving the UID for the app "com.fox2code.mmm" ...
The UID for the app "com.fox2code.mmm" is "10144"
Will enable the root access via Magisk for these UIDs:  2000 10146 10138 10145 10140 10144
The phone is booted into the Android OS
Booting the phone into the bootloader now ...
Waiting up to 60 seconds for the boot into the fastboot mode ...
The phone is booted into the bootloader
Booting the phone from the TWRP image "/data/backup/ASUS_ZENFONE8/twrp/current_twrp.img" now  ...
Sending 'boot.img' (98304 KB)                      OKAY [  2.836s]
Booting                                            OKAY [ 10.361s]
Finished. Total time: 13.238s
Waiting up to 120 seconds for the boot of the phone ....
Waiting up to 30 seconds for the adb daemon to get ready  ..
... the adb daemon is ready after 2 second(s)

The phone is booted into TWRP: "/data/backup/ASUS_ZENFONE8/twrp/current_twrp.img" version "3.7.0_12-0"
Copying the Magisk helper script "/data/develop/android/scripts_on_linux/enable_root_access_via_magisk.sh" to /cache/enable_root_access_via_magisk.sh on the phone ...
/data/develop/android/scripts_on_linux/enable_root_access_via_magisk.sh: 1 file pushed, 0 skipped. 473.4 MB/s (22596 bytes in 0.000s)
Executing the Magisk helper script "/cache/enable_root_access_via_magisk.sh" on the phone now ...

Enabling root access for apps by adding entries to the Magisk database

OK, running in TWRP
TWRP is booted from an image file
Using the Magisk binary "/data/adb/magisk/magisk64"
Using the Magisk database "/data/adb/magisk.db"
Checking the prerequisites ...
Checking if the required executables exist ...
OK, the file "/data/adb/magisk/magisk64" exists and is executable
Checking if the required data files exist ...
OK, the file "/data/adb/magisk.db" exists
Using the sqlite3 executable "/system/bin/sqlite3"
Checking the parameter ...
The parameter "2000" is okay
The parameter "10146" is okay
The parameter "10138" is okay
The parameter "10145" is okay
The parameter "10140" is okay
The parameter "10144" is okay
OK, all parameter are okay
OK, the installed Magisk version "26.1" is supported
Creating a backup of the existing Magisk database in "/data/adb/magisk.db.566.bkp" ...

Reading the current entries from the Magisk database ...
Current entries in the Magisk database table "policies":

uid    policy  until  logging  notification
-----  ------  -----  -------  ------------
2000   2       0      1        1           
10146  1       0      1        1           

Enabling the root access for these app UIDs:  2000 10146 10138 10145 10140 10144

Processing the UID "2000" ...
The entry for the UID "2000" already exists in the Magisk database:
OK, root access is already enabled for the UID "2000"

Processing the UID "10146" ...
The entry for the UID "10146" already exists in the Magisk database:
root acces for the UID "10146" is not enabled -- enabling root access for the UID "10146" now ...
OK, root access successfully enabled for the UID "10146"

Processing the UID "10138" ...
Enabling root access for the UID "10138" now ...
OK, root access successfully enabled for the UID "10138"

Processing the UID "10145" ...
Enabling root access for the UID "10145" now ...
OK, root access successfully enabled for the UID "10145"

Processing the UID "10140" ...
Enabling root access for the UID "10140" now ...
OK, root access successfully enabled for the UID "10140"

Processing the UID "10144" ...
Enabling root access for the UID "10144" now ...
OK, root access successfully enabled for the UID "10144"

Summary

root access enabled for 5 UID(s):
   10146 10138 10145 10140 10144

root access was already enabled for 1 UID(s):
   2000

Current entries in the Magisk database table "policies":

uid    policy  until  logging  notification
-----  ------  -----  -------  ------------
2000   2       0      1        1           
10146  2       0      1        1           
10138  2       0      1        1           
10145  2       0      1        1           
10140  2       0      1        1           
10144  2       0      1        1           

root access for the UIDs via Magisk successfully enabled
Rebooting the phone now ...
Rebooting the phone using the command " /usr/bin/adb -d -s M6AIB760D0939LX  reboot " now ...

# ---------------------------------------------------------------------
[16.04.2023 18:48 ]  ... the script ended with RC=0
 ----------------------------------------------------------------------

[16.04.2023 18:48 ] Processing the task "execute_script_on_the_phone" with the parameter "ignorerc" ...
[16.04.2023 18:48 ] Executing now "execute_script_on_the_phone ignorerc"

 ----------------------------------------------------------------------
[16.04.2023 18:48 ]
[16.04.2023 18:48 ] *** Executing the script "/data/develop/android/scripts_on_linux/post_install.sh" on the phone  ...
[16.04.2023 18:48 ]
[16.04.2023 18:48 ] The Returncode of the script will be ignored
[16.04.2023 18:48 ] Waiting for a working adb connection ...
Waiting up to 120 seconds for the boot of the phone ......
Waiting up to 30 seconds for the adb daemon to get ready  ...............
[16.04.2023 18:49 ] Copying the script "/data/develop/android/scripts_on_linux/post_install.sh" to "/sdcard/Download/post_install.sh" on the phone ...
/data/develop/android/scripts_on_linux/post_install.sh: 1 file pushed, 0 skipped. 242.9 MB/s (10657 bytes in 0.000s)
[16.04.2023 18:49 ] Now executing the script "/sdcard/Download/post_install.sh" on the phone ...

*** Postinstall script is running ...

Disabling sound effects ...
Creating the file "/sdcard/Download/WifiConfigStore.xml" ...
Creating the file "/data/misc/apexdata/com.android.wifi/WifiConfigStore.xml" ...
chcon '/data/misc/apexdata/com.android.wifi/WifiConfigStore.xml' to u:object_r:apex_system_server_data_file:s0
Enabling WiFi ...
Use SIM 1 for phone calls ...
Use SIM 1 for data connections ...
Disabling mobile data ...
Waiting 15 seconds now before rebooting - press CTRL-C to abort ....
...............
Now rebooting the phone ...
 ----------------------------------------------------------------------

[16.04.2023 18:49 ] "finish_tasks" is defined - now executing it ...
 ----------------------------------------------------------------------

-------------------------------------------------------------------------------------------------------------
[16.04.2023 18:49 ] *** Task summary :


-------------------------------------------------------------------------------------------------------------
[16.04.2023 18:49 ] Tasks executed successfully are:
enable_disable_abort_on_error
boot_phone_from_twrp_image
install_os
install_twrp
install_magisk_in_boot_partition_only
enable_adb
install_magisk_in_data_adb_only
enable_root_access_for_the_shell
wait_for_access_via_adb
install_magisk_v26_in_boot_partition
install_the_magisk_app
wait_for_access_via_adb
enable_disable_abort_on_error
install_essential_scripts
install_essential_apps
install_essential_magisk_modules
enable_root_access_for_apps
execute_script_on_the_phone

-------------------------------------------------------------------------------------------------------------

[16.04.2023 18:49 ] The working directory used is: "/tmp/prepare_phone.sh_WORKDIR.542824" .


[16.04.2023 18:49 ] The include file used was :
[16.04.2023 18:49 ]   -rwxr-xr-x. 1 xtrnaw7 xtrnaw7 254658 Apr 16 17:45 /data/develop/android/scripts_on_linux/prepare_phone.include
[16.04.2023 18:49 ] The include file used was last edited at: "15.04.2023 /bs"
 ----------------------------------------------------------------------

[16.04.2023 18:49 ] Execution summary:

[16.04.2023 18:49 ] Tasks processed:               18  
[16.04.2023 18:49 ] Tasks executed succesfully:    18
[16.04.2023 18:49 ] Tasks executed with errors:    0
[16.04.2023 18:49 ] Tasks not executed on request: 0
[16.04.2023 18:49 ] Tasks not found:               0

[16.04.2023 18:49 ] ### The logfile used was /var/tmp/prepare_phone.sh.log
[16.04.2023 18:49 ] ### The start time was 16.04.2023 18:33:04, the script runtime is (day:hour:minute:seconds) 0:00:16:29 (= 989 seconds)
[16.04.2023 18:49 ] ### prepare_phone.sh ended at 16.04.2023 18:49:33 (The PID of this process is 542824; the RC is 0)

real    16m29.427s
user    0m3.207s
sys    0m4.687s
[ OmniRom 13 Dev - xtrnaw7@t15g /data/develop/android/scripts_on_linux ] $