[02.05.2024 10:23 ] ### prepare_phone.sh started at 02.05.2024 10:23:41 (The PID of this process is 657339) [02.05.2024 10:23 ] ### Processing the parameter ... [02.05.2024 10:23 ] Not yet used parameter are: "raw_image_with_magisk" [02.05.2024 10:23 ] Tasks to execute are: "raw_image_with_magisk" [02.05.2024 10:23 ] Parameter for the function init_tasks are: "" [02.05.2024 10:23 ] ### The logfile used is /var/tmp/prepare_phone.sh.log [02.05.2024 10:23 ] ERROR: Can not write to the file /var/tmp/prepare_phone.sh.log - now using the log file /var/tmp/prepare_phone.sh.log.657339 [02.05.2024 10:23 ] Checking the include file "/data/develop/android/scripts_on_linux/prepare_phone.include" ... [02.05.2024 10:23 ] Reading the include file "/data/develop/android/scripts_on_linux/prepare_phone.include" ... [02.05.2024 10:23 ] Processing the parameter ... [02.05.2024 10:23 ] Preparing the list of tasks to execute ... [02.05.2024 10:23 ] "init_tasks" is defined - now executing it ... ---------------------------------------------------------------------- [02.05.2024 10:23 ] Searching for a config file .... [02.05.2024 10:23 ] Config file "prepare_phone.conf" succesfully read [02.05.2024 10:23 ] Using the directory "/tmp" for temporary files [02.05.2024 10:23 ] The PID of this process is 657339 [02.05.2024 10:23 ] The include file used is : -rw-r--r--. 1 xtrnaw7 xtrnaw7 467980 May 2 09:57 /data/develop/android/scripts_on_linux/prepare_phone.include [02.05.2024 10:23 ] The include file used was last edited at: "30.04.2024 /bs" [02.05.2024 10:23 ] The version of the used execute_tasks.sh script is "v2.2.5" ----------------------------------------------------------------------- [02.05.2024 10:23 ] Using the TWRP image "/data/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-1-I006D-enhanced.img" for booting the phone into TWRP [02.05.2024 10:23 ] Using the working directory "/tmp/prepare_phone.sh_WORKDIR.657339" . [02.05.2024 10:23 ] *** Reading the include file "/data/develop/android/scripts_on_linux/boot_phone_from_twrp.sh" ... [02.05.2024 10:23 ] The script is running as user "xtrnaw7" -- will use "sudo" for the fastboot commands ... [02.05.2024 10:23 ] Will use the attached phone with the serial number "M6AIB760D0939LX" [02.05.2024 10:23 ] Using the TWRP image defined in the environment variable TWRP_IMAGE: "/data/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-1-I006D-enhanced.img" [02.05.2024 10:23 ] Using the options "-d -s M6AIB760D0939LX " for the adb commands [02.05.2024 10:23 ] Using the options " -s M6AIB760D0939LX " for the fastboot commands [02.05.2024 10:23 ] Checking the script prerequisites ... [02.05.2024 10:23 ] Will wait up to 60 second(s) after booting the phone into the bootloader [02.05.2024 10:23 ] Will wait up to 120 second(s) after booting the phone from the TWRP image [02.05.2024 10:23 ] Will wait up to 30 second(s) until the adb daemon is ready to use [02.05.2024 10:23 ] The phone is currently booted into the Android OS [02.05.2024 10:23 ] Selecting the TWRP image to use depending on the installed OS on the phone ... [02.05.2024 10:23 ] Checking the installed OS on the phone ... [02.05.2024 10:23 ] The OS on the phone is the ASUS Android 13 [02.05.2024 10:23 ] Checking the type of the file "/data1/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-1-I006D-enhanced.img" ... [02.05.2024 10:23 ] The file type is "Android bootimg, kernel (0x2d52a0b)" [02.05.2024 10:23 ] OK, the file "/data1/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-1-I006D-enhanced.img" is a valid boot image for Android devices [02.05.2024 10:23 ] The installed OS is "ASUS_Android" [02.05.2024 10:23 ] The TWRP file necessary for this OS is "/data1/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-1-I006D-enhanced.img" [02.05.2024 10:23 ] The boot slot is _a. ---------------------------------------------------------------------- [02.05.2024 10:23 ] Executing the tasks now ... [02.05.2024 10:23 ] The tasks to execute are: Task 1: install_ASUS_raw_image Task 2: boot_phone_from_twrp_image ignorerc Task 3: format_data_via_twrp Task 4: boot_phone_from_twrp_image force Task 5: install_magisk_in_boot_partition_only noreboot:_a Task 6: enable_adb reboot:_a Task 7: install_magisk_in_data_adb_only noreboot:copy_apk:use_apk Task 8: wait_for_access_via_adb 120:kill Task 9: enable_root_access_for_the_shell reboot Task 10: wait_for_access_via_adb 120:kill Task 11: install_the_magisk_app [02.05.2024 10:23 ] Processing the task "install_ASUS_raw_image" ... [02.05.2024 10:23 ] Executing now "install_ASUS_raw_image " ---------------------------------------------------------------------- [02.05.2024 10:23 ] Installing the Android raw image from the directory "/data/backup/ASUS_ZENFONE8/raw_images/Android13/OPEN-ZS590KS-32.0501.0403.4-BSP-2206-user-20220705" [02.05.2024 10:23 ] [02.05.2024 10:23 ] *** Installing the Android raw OS image in the directory "/data/backup/ASUS_ZENFONE8/raw_images/Android13/OPEN-ZS590KS-32.0501.0403.4-BSP-2206-user-20220705" using the script "/data/backup/ASUS_ZENFONE8/raw_images/Android13/OPEN-ZS590KS-32.0501.0403.4-BSP-2206-user-20220705/update_image.sh" with the parameter " noreboot " ... [02.05.2024 10:23 ] [02.05.2024 10:23 ] The automatic reboot after executing the script is disabled [02.05.2024 10:23 ] The task execution stops if the script ends with a return code not zero [02.05.2024 10:23 ] Parameter for "reboot_phone" are: bootloader wait [02.05.2024 10:23 ] The current phone status is "3" [02.05.2024 10:23 ] Will boot the phone using "adb" [02.05.2024 10:23 ] Rebooting the phone using the command " /usr/bin/adb -d -s M6AIB760D0939LX reboot bootloader" now ... Waiting up to 120 second(s) for the phone .. [02.05.2024 10:23 ] Booting the phone into the bootloader succeeded after 10 seconds; the current status of the phone is 4 [02.05.2024 10:23 ] The phone is currently booted into the bootloader [02.05.2024 10:23 ] The phone is NOT booted into the Android OS - can not detect which OS is installed on the phone [02.05.2024 10:23 ] The boot slot is _a. [02.05.2024 10:23 ] ---------------------------------------------------------------------- [02.05.2024 10:23 ] *** Executing now "/data/backup/ASUS_ZENFONE8/raw_images/Android13/OPEN-ZS590KS-32.0501.0403.4-BSP-2206-user-20220705/update_image.sh noreboot" ... # --------------------------------------------------------------------- Project ZS590KS matching success! Start erase misc Erasing 'misc' OKAY [ 0.002s] Finished. Total time: 0.009s misc flash succeed! Start Flash abl_a Sending 'abl_a' (588 KB) OKAY [ 0.021s] Writing 'abl_a' OKAY [ 0.003s] Finished. Total time: 0.030s abl_a flash succeed! Start Flash abl_b Sending 'abl_b' (588 KB) OKAY [ 0.028s] Writing 'abl_b' OKAY [ 0.002s] Finished. Total time: 0.037s abl_b flash succeed! Rebooting into bootloader OKAY [ 0.001s] Finished. Total time: 0.101s Start Flash multiimgoem_a Sending 'multiimgoem_a' (13 KB) OKAY [ 0.010s] Writing 'multiimgoem_a' OKAY [ 0.002s] Finished. Total time: 0.019s multiimgoem_a flash succeed! Start Flash multiimgoem_b Sending 'multiimgoem_b' (13 KB) OKAY [ 0.011s] Writing 'multiimgoem_b' OKAY [ 0.002s] Finished. Total time: 0.020s multiimgoem_b flash succeed! Sending 'partition:0' (44 KB) OKAY [ 0.008s] Writing 'partition:0' OKAY [ 0.194s] Finished. Total time: 0.212s partition:0 flash succeed! Sending 'partition:1' (44 KB) OKAY [ 0.011s] Writing 'partition:1' OKAY [ 0.220s] Finished. Total time: 0.245s partition:1 flash succeed! Sending 'partition:2' (44 KB) OKAY [ 0.012s] Writing 'partition:2' OKAY [ 0.255s] Finished. Total time: 0.276s partition:2 flash succeed! Sending 'partition:3' (44 KB) OKAY [ 0.006s] Writing 'partition:3' OKAY [ 0.284s] Finished. Total time: 0.300s partition:3 flash succeed! Sending 'partition:4' (44 KB) OKAY [ 0.007s] Writing 'partition:4' OKAY [ 0.336s] Finished. Total time: 0.353s partition:4 flash succeed! Sending 'partition:5' (44 KB) OKAY [ 0.006s] Writing 'partition:5' OKAY [ 0.368s] Finished. Total time: 0.384s partition:5 flash succeed! Sending 'partition:6' (44 KB) OKAY [ 0.007s] Writing 'partition:6' OKAY [ 0.413s] Finished. Total time: 0.431s partition:6 flash succeed! Start Flash multiimgoem_a Sending 'multiimgoem_a' (13 KB) OKAY [ 0.011s] Writing 'multiimgoem_a' OKAY [ 0.002s] Finished. Total time: 0.020s multiimgoem_a flash succeed! Start Flash multiimgoem_b Sending 'multiimgoem_b' (13 KB) OKAY [ 0.012s] Writing 'multiimgoem_b' OKAY [ 0.002s] Finished. Total time: 0.020s multiimgoem_b flash succeed! Start Flash xbl_a Sending 'xbl_a' (3582 KB) OKAY [ 0.112s] Writing 'xbl_a' OKAY [ 0.015s] Finished. Total time: 0.134s xbl_a flash succeed! Start Flash xbl_config_a Sending 'xbl_config_a' (213 KB) OKAY [ 0.008s] Writing 'xbl_config_a' OKAY [ 0.004s] Finished. Total time: 0.020s xbl_config_a flash succeed! Start Flash xbl_b Sending 'xbl_b' (3582 KB) OKAY [ 0.111s] Writing 'xbl_b' OKAY [ 0.015s] Finished. Total time: 0.132s xbl_b flash succeed! Start Flash xbl_config_b Sending 'xbl_config_b' (213 KB) OKAY [ 0.017s] Writing 'xbl_config_b' OKAY [ 0.004s] Finished. Total time: 0.028s xbl_config_b flash succeed! Start Flash shrm_a Sending 'shrm_a' (44 KB) OKAY [ 0.009s] Writing 'shrm_a' OKAY [ 0.002s] Finished. Total time: 0.017s shrm_a flash succeed! Start Flash shrm_b Sending 'shrm_b' (44 KB) OKAY [ 0.011s] Writing 'shrm_b' OKAY [ 0.002s] Finished. Total time: 0.019s shrm_b flash succeed! Start Flash abl_a Sending 'abl_a' (588 KB) OKAY [ 0.022s] Writing 'abl_a' OKAY [ 0.003s] Finished. Total time: 0.030s abl_a flash succeed! Start Flash abl_b Sending 'abl_b' (588 KB) OKAY [ 0.021s] Writing 'abl_b' OKAY [ 0.002s] Finished. Total time: 0.029s abl_b flash succeed! Start Flash aop_a Sending 'aop_a' (237 KB) OKAY [ 0.012s] Writing 'aop_a' OKAY [ 0.002s] Finished. Total time: 0.020s aop_a flash succeed! Start Flash aop_b Sending 'aop_b' (237 KB) OKAY [ 0.011s] Writing 'aop_b' OKAY [ 0.002s] Finished. Total time: 0.019s aop_b flash succeed! Start Flash tz_a Sending 'tz_a' (3665 KB) OKAY [ 0.112s] Writing 'tz_a' OKAY [ 0.016s] Finished. Total time: 0.133s tz_a flash succeed! Start Flash tz_b Sending 'tz_b' (3665 KB) OKAY [ 0.109s] Writing 'tz_b' OKAY [ 0.008s] Finished. Total time: 0.122s tz_b flash succeed! Start Flash hyp_a Sending 'hyp_a' (3614 KB) OKAY [ 0.107s] Writing 'hyp_a' OKAY [ 0.009s] Finished. Total time: 0.122s hyp_a flash succeed! Start Flash hyp_b Sending 'hyp_b' (3614 KB) OKAY [ 0.105s] Writing 'hyp_b' OKAY [ 0.010s] Finished. Total time: 0.120s hyp_b flash succeed! Start Flash modem_a Sending 'modem_a' (175116 KB) OKAY [ 5.018s] Writing 'modem_a' OKAY [ 0.447s] Finished. Total time: 5.471s modem_a flash succeed! Start Flash modem_b Sending 'modem_b' (175116 KB) OKAY [ 5.024s] Writing 'modem_b' OKAY [ 0.545s] Finished. Total time: 5.575s modem_b flash succeed! Start Flash bluetooth_a Sending 'bluetooth_a' (1116 KB) OKAY [ 0.035s] Writing 'bluetooth_a' OKAY [ 0.005s] Finished. Total time: 0.050s bluetooth_a flash succeed! Start Flash bluetooth_b Sending 'bluetooth_b' (1116 KB) OKAY [ 0.038s] Writing 'bluetooth_b' OKAY [ 0.005s] Finished. Total time: 0.049s bluetooth_b flash succeed! Start Flash dsp_a Sending 'dsp_a' (65536 KB) OKAY [ 1.878s] Writing 'dsp_a' OKAY [ 0.100s] Finished. Total time: 1.984s dsp_a flash succeed! Start Flash dsp_b Sending 'dsp_b' (65536 KB) OKAY [ 1.875s] Writing 'dsp_b' OKAY [ 0.113s] Finished. Total time: 1.994s dsp_b flash succeed! Start Flash keymaster_a Sending 'keymaster_a' (277 KB) OKAY [ 0.011s] Writing 'keymaster_a' OKAY [ 0.002s] Finished. Total time: 0.020s keymaster_a flash succeed! Start Flash keymaster_b Sending 'keymaster_b' (277 KB) OKAY [ 0.011s] Writing 'keymaster_b' OKAY [ 0.003s] Finished. Total time: 0.021s keymaster_b flash succeed! Start Flash rtice Sending 'rtice' (261 KB) OKAY [ 0.011s] Writing 'rtice' OKAY [ 0.003s] Finished. Total time: 0.019s rtice flash succeed! Start Flash storsec Sending 'storsec' (20 KB) OKAY [ 0.010s] Writing 'storsec' OKAY [ 0.002s] Finished. Total time: 0.018s storsec flash succeed! Start erase misc Erasing 'misc' OKAY [ 0.002s] Finished. Total time: 0.008s misc flash succeed! Start erase spunvm Erasing 'spunvm' OKAY [ 0.002s] Finished. Total time: 0.007s spunvm flash succeed! Start Flash qweslicstore_a Sending 'qweslicstore_a' (256 KB) OKAY [ 0.013s] Writing 'qweslicstore_a' OKAY [ 0.007s] Finished. Total time: 0.027s qweslicstore_a flash succeed! Start Flash qweslicstore_b Sending 'qweslicstore_b' (256 KB) OKAY [ 0.016s] Writing 'qweslicstore_b' OKAY [ 0.003s] Finished. Total time: 0.027s qweslicstore_b flash succeed! Start Flash devcfg_a Sending 'devcfg_a' (47 KB) OKAY [ 0.012s] Writing 'devcfg_a' OKAY [ 0.002s] Finished. Total time: 0.020s devcfg_a flash succeed! Start Flash devcfg_b Sending 'devcfg_b' (47 KB) OKAY [ 0.012s] Writing 'devcfg_b' OKAY [ 0.009s] Finished. Total time: 0.027s devcfg_b flash succeed! Start Flash qupfw_a Sending 'qupfw_a' (55 KB) OKAY [ 0.006s] Writing 'qupfw_a' OKAY [ 0.009s] Finished. Total time: 0.021s qupfw_a flash succeed! Start Flash qupfw_b Sending 'qupfw_b' (55 KB) OKAY [ 0.006s] Writing 'qupfw_b' OKAY [ 0.009s] Finished. Total time: 0.021s qupfw_b flash succeed! Start Flash cpucp_a Sending 'cpucp_a' (101 KB) OKAY [ 0.014s] Writing 'cpucp_a' OKAY [ 0.002s] Finished. Total time: 0.022s cpucp_a flash succeed! Start Flash cpucp_b Sending 'cpucp_b' (101 KB) OKAY [ 0.011s] Writing 'cpucp_b' OKAY [ 0.003s] Finished. Total time: 0.020s cpucp_b flash succeed! Start Flash logfs Sending 'logfs' (16 KB) OKAY [ 0.002s] Writing 'logfs' OKAY [ 0.001s] Finished. Total time: 0.009s logfs flash succeed! Start Flash uefisecapp_a Sending 'uefisecapp_a' (121 KB) OKAY [ 0.012s] Writing 'uefisecapp_a' OKAY [ 0.003s] Finished. Total time: 0.022s uefisecapp_a flash succeed! Start Flash uefisecapp_b Sending 'uefisecapp_b' (121 KB) OKAY [ 0.011s] Writing 'uefisecapp_b' OKAY [ 0.003s] Finished. Total time: 0.021s uefisecapp_b flash succeed! Start Flash featenabler_a Sending 'featenabler_a' (84 KB) OKAY [ 0.008s] Writing 'featenabler_a' OKAY [ 0.003s] Finished. Total time: 0.018s featenabler_a flash succeed! Start Flash featenabler_b Sending 'featenabler_b' (84 KB) OKAY [ 0.011s] Writing 'featenabler_b' OKAY [ 0.003s] Finished. Total time: 0.021s featenabler_b flash succeed! Start Flash imagefv_a Sending 'imagefv_a' (20 KB) OKAY [ 0.010s] Writing 'imagefv_a' OKAY [ 0.002s] Finished. Total time: 0.018s imagefv_a flash succeed! Start Flash imagefv_b Sending 'imagefv_b' (20 KB) OKAY [ 0.011s] Writing 'imagefv_b' OKAY [ 0.002s] Finished. Total time: 0.019s imagefv_b flash succeed! Start Flash ADF Sending 'ADF' (32768 KB) OKAY [ 0.933s] Writing 'ADF' OKAY [ 0.065s] Finished. Total time: 1.004s ADF flash succeed! Start Flash vbmeta_a Sending 'vbmeta_a' (8 KB) OKAY [ 0.010s] Writing 'vbmeta_a' OKAY [ 0.001s] Finished. Total time: 0.017s vbmeta_a flash succeed! Start Flash vbmeta_b Sending 'vbmeta_b' (8 KB) OKAY [ 0.003s] Writing 'vbmeta_b' OKAY [ 0.001s] Finished. Total time: 0.011s vbmeta_b flash succeed! Start Flash vbmeta_system_a Sending 'vbmeta_system_a' (4 KB) OKAY [ 0.012s] Writing 'vbmeta_system_a' OKAY [ 0.001s] Finished. Total time: 0.020s vbmeta_system_a flash succeed! Start Flash vbmeta_system_b Sending 'vbmeta_system_b' (4 KB) OKAY [ 0.011s] Writing 'vbmeta_system_b' OKAY [ 0.001s] Finished. Total time: 0.020s vbmeta_system_b flash succeed! Start Flash boot_a Sending 'boot_a' (98304 KB) OKAY [ 2.820s] Writing 'boot_a' OKAY [ 0.315s] Finished. Total time: 3.146s boot_a flash succeed! Start Flash boot_b Sending 'boot_b' (98304 KB) OKAY [ 2.808s] Writing 'boot_b' OKAY [ 0.295s] Finished. Total time: 3.112s boot_b flash succeed! Start Flash vendor_boot_a Sending 'vendor_boot_a' (98304 KB) OKAY [ 2.787s] Writing 'vendor_boot_a' OKAY [ 0.332s] Finished. Total time: 3.126s vendor_boot_a flash succeed! Start Flash vendor_boot_b Sending 'vendor_boot_b' (98304 KB) OKAY [ 2.787s] Writing 'vendor_boot_b' OKAY [ 0.235s] Finished. Total time: 3.029s vendor_boot_b flash succeed! Start Flash dtbo_a Sending 'dtbo_a' (8192 KB) OKAY [ 0.243s] Writing 'dtbo_a' OKAY [ 0.064s] Finished. Total time: 0.313s dtbo_a flash succeed! Start Flash dtbo_b Sending 'dtbo_b' (8192 KB) OKAY [ 0.241s] Writing 'dtbo_b' OKAY [ 0.066s] Finished. Total time: 0.313s dtbo_b flash succeed! Start Flash xrom_a Sending 'xrom_a' (10452 KB) OKAY [ 0.309s] Writing 'xrom_a' OKAY [ 0.221s] Finished. Total time: 0.536s xrom_a flash succeed! Start Flash xrom_b Sending 'xrom_b' (10452 KB) OKAY [ 0.303s] Writing 'xrom_b' OKAY [ 0.277s] Finished. Total time: 0.586s xrom_b flash succeed! Start erase asdf ******** Did you mean to fastboot format this ext4 partition? Erasing 'asdf' OKAY [ 0.012s] Finished. Total time: 0.019s asdf flash succeed! Start Flash asdf Sending 'asdf' (8336 KB) OKAY [ 0.245s] Writing 'asdf' OKAY [ 0.240s] Finished. Total time: 0.491s asdf flash succeed! Start erase super Erasing 'super' OKAY [ 0.048s] Finished. Total time: 0.054s super flash succeed! Start Flash super Sending sparse 'super' 1/17 (307196 KB) OKAY [ 8.824s] Writing 'super' OKAY [ 5.258s] Sending sparse 'super' 2/17 (283992 KB) OKAY [ 8.129s] Writing 'super' OKAY [ 4.193s] Sending sparse 'super' 3/17 (307196 KB) OKAY [ 8.823s] Writing 'super' OKAY [ 4.818s] Sending sparse 'super' 4/17 (282584 KB) OKAY [ 8.129s] Writing 'super' OKAY [ 3.287s] Sending sparse 'super' 5/17 (307196 KB) OKAY [ 8.768s] Writing 'super' OKAY [ 4.927s] Sending sparse 'super' 6/17 (282588 KB) OKAY [ 8.089s] Writing 'super' OKAY [ 4.480s] Sending sparse 'super' 7/17 (301364 KB) OKAY [ 8.666s] Writing 'super' OKAY [ 4.806s] Sending sparse 'super' 8/17 (307196 KB) OKAY [ 8.831s] Writing 'super' OKAY [ 4.089s] Sending sparse 'super' 9/17 (291528 KB) OKAY [ 8.387s] Writing 'super' OKAY [ 4.012s] Sending sparse 'super' 10/17 (301144 KB) OKAY [ 8.665s] Writing 'super' OKAY [ 4.445s] Sending sparse 'super' 11/17 (285476 KB) OKAY [ 8.211s] Writing 'super' OKAY [ 3.338s] Sending sparse 'super' 12/17 (280100 KB) OKAY [ 8.047s] Writing 'super' OKAY [ 5.761s] Sending sparse 'super' 13/17 (299412 KB) OKAY [ 8.576s] Writing 'super' OKAY [ 4.563s] Sending sparse 'super' 14/17 (282912 KB) OKAY [ 8.093s] Writing 'super' OKAY [ 3.651s] Sending sparse 'super' 15/17 (307196 KB) OKAY [ 8.815s] Writing 'super' OKAY [ 6.583s] Sending sparse 'super' 16/17 (282696 KB) OKAY [ 8.184s] Writing 'super' OKAY [ 2.380s] Sending sparse 'super' 17/17 (53420 KB) OKAY [ 1.552s] Writing 'super' OKAY [ 1.393s] Finished. Total time: 208.782s super flash succeed! Partition multiimgoem_a Crc32Check succeed! Partition multiimgoem_b Crc32Check succeed! Partition xbl_a Crc32Check succeed! Partition xbl_config_a Crc32Check succeed! Partition xbl_b Crc32Check succeed! Partition xbl_config_b Crc32Check succeed! Partition abl_a Crc32Check succeed! Partition abl_b Crc32Check succeed! Partition aop_a Crc32Check succeed! Partition aop_b Crc32Check succeed! Partition tz_a Crc32Check succeed! Partition tz_b Crc32Check succeed! Partition hyp_a Crc32Check succeed! Partition hyp_b Crc32Check succeed! Partition modem_a Crc32Check succeed! Partition modem_b Crc32Check succeed! Partition bluetooth_a Crc32Check succeed! Partition bluetooth_b Crc32Check succeed! Partition dsp_a Crc32Check succeed! Partition dsp_b Crc32Check succeed! Partition keymaster_a Crc32Check succeed! Partition keymaster_b Crc32Check succeed! Partition rtice Crc32Check succeed! Partition storsec Crc32Check succeed! Partition shrm_a Crc32Check succeed! Partition shrm_b Crc32Check succeed! Partition asdf Crc32Check succeed! Partition devcfg_a Crc32Check succeed! Partition devcfg_b Crc32Check succeed! Partition qupfw_a Crc32Check succeed! Partition qupfw_b Crc32Check succeed! Partition cpucp_a Crc32Check succeed! Partition cpucp_b Crc32Check succeed! Partition logfs Crc32Check succeed! Partition uefisecapp_a Crc32Check succeed! Partition uefisecapp_b Crc32Check succeed! Partition featenabler_a Crc32Check succeed! Partition featenabler_b Crc32Check succeed! Partition imagefv_a Crc32Check succeed! Partition imagefv_b Crc32Check succeed! Partition qweslicstore_a Crc32Check succeed! Partition qweslicstore_b Crc32Check succeed! Partition ADF Crc32Check succeed! Partition vbmeta_a Crc32Check succeed! Partition vbmeta_b Crc32Check succeed! Partition vbmeta_system_a Crc32Check succeed! Partition vbmeta_system_b Crc32Check succeed! Partition boot_a Crc32Check succeed! Partition boot_b Crc32Check succeed! Partition vendor_boot_a Crc32Check succeed! Partition vendor_boot_b Crc32Check succeed! Partition dtbo_a Crc32Check succeed! Partition dtbo_b Crc32Check succeed! Partition super Crc32Check succeed! ^_^ Crc32Check General Partitions Pass ^o^ Erasing 'userdata' OKAY [ 0.032s] F2FS-tools: mkfs.f2fs Ver: 1.13.0 (2019-09-24) Info: Disable heap-based policy Info: Debug level = 1 Info: Trim is disabled Info: Set conf for android Info: No support kernel version! Info: Segments per section = 1 Info: Sections per zone = 1 Info: sector size = 512 Info: total sectors = 226184856 (110441 MB) Info: zone aligned segment0 blkaddr: 512 Info: add quota type = 0 => 4 Info: add quota type = 1 => 5 [f2fs_init_sit_area: 556] Filling sit area at offset 0x00600000 [f2fs_init_nat_area: 590] Filling nat area at offset 0x00e00000 [f2fs_write_root_inode:1170] Writing root inode (hot node), 1ce00 0 200 at offset 0x00118272 [f2fs_write_default_quota:1246] Writing quota data, at offset 0001d401, 0001d402 [f2fs_write_qf_inode:1337] Writing quota inode (hot node), 1ce00 0 200 at offset 0x00118273 [f2fs_write_default_quota:1246] Writing quota data, at offset 0001d403, 0001d404 [f2fs_write_qf_inode:1337] Writing quota inode (hot node), 1ce00 0 200 at offset 0x00118274 [f2fs_update_nat_root:1391] Writing nat root, at offset 0x00000e00 [f2fs_add_default_dentry_root:1588] Writing default dentry root, at offset 0x0001d400 Info: Overprovision ratio = 0.600% Info: Overprovision segments = 668 (GC reserved = 341) [f2fs_write_check_point_pack: 734] Writing main segments, cp at offset 0x00000200 [f2fs_write_check_point_pack: 871] Writing Segment summary for HOT/WARM/COLD_DATA, at offset 0x00000201 [f2fs_write_check_point_pack: 898] Writing Segment summary for HOT_NODE, at offset 0x00000202 [f2fs_write_check_point_pack: 910] Writing Segment summary for WARM_NODE, at offset 0x00000203 [f2fs_write_check_point_pack: 921] Writing Segment summary for COLD_NODE, at offset 0x00000204 [f2fs_write_check_point_pack: 929] Writing cp page2, at offset 0x00000205 [f2fs_write_check_point_pack: 949] Writing NAT bits pages, at offset 0x000003fe [f2fs_write_check_point_pack: 970] Writing cp page 1 of checkpoint pack 2, at offset 0x00000400 [f2fs_write_check_point_pack: 989] Writing cp page 2 of checkpoint pack 2, at offset 0x00000405 [f2fs_write_super_block:1022] Writing super block, at offset 0x00000000 Info: format successful Sending 'userdata' (85 KB) OKAY [ 0.007s] Writing 'userdata' OKAY [ 5.176s] Erasing 'userdata' OKAY [ 0.012s] erase userdata partition again after format Erasing 'metadata' OKAY [ 0.002s] mke2fs 1.45.4 (23-Sep-2019) Creating filesystem with 4096 4k blocks and 4096 inodes Allocating group tables: 0/1 done Writing inode tables: 0/1 done Creating journal (1024 blocks): done Writing superblocks and filesystem accounting information: 0/1 done Sending 'metadata' (52 KB) OKAY [ 0.013s] Writing 'metadata' OKAY [ 0.004s] Finished. Total time: 5.373s ======================= Download Complete ! ======================= # --------------------------------------------------------------------- [02.05.2024 10:29 ] ... the script ended with RC=0 ---------------------------------------------------------------------- [02.05.2024 10:29 ] Processing the task "boot_phone_from_twrp_image" with the parameter "ignorerc" ... [02.05.2024 10:29 ] Executing now "boot_phone_from_twrp_image ignorerc" ---------------------------------------------------------------------- [02.05.2024 10:29 ] [02.05.2024 10:29 ] *** Booting the attached phone from the TWRP image "/data/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-1-I006D-enhanced.img" ... [02.05.2024 10:29 ] [02.05.2024 10:29 ] The Returncode of the script is ignored [02.05.2024 10:29 ] The phone is booted into the bootloader [02.05.2024 10:29 ] Booting the phone from the TWRP image "/data/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-1-I006D-enhanced.img" now ... Sending 'boot.img' (98304 KB) OKAY [ 2.835s] Booting OKAY [ 10.431s] Finished. Total time: 13.311s Waiting up to 120 seconds for a working adb connection .... [02.05.2024 10:29 ] The adb connection is working after 20 second(s) Waiting up to 30 seconds for the adb daemon to get ready [02.05.2024 10:29 ] ... the adb daemon is ready after 0 second(s) [02.05.2024 10:29 ] The adb connection is ready after 0 second(s) [02.05.2024 10:29 ] Waiting up to 20 seconds until /data is mounted ... .................... [02.05.2024 10:30 ] WARNING: /data is still NOT mounted after 20 second(s). [02.05.2024 10:30 ] ERROR: /data is not mounted ---------------------------------------------------------------------- [02.05.2024 10:30 ] Processing the task "format_data_via_twrp" ... [02.05.2024 10:30 ] Executing now "format_data_via_twrp " ---------------------------------------------------------------------- [02.05.2024 10:30 ] [02.05.2024 10:30 ] *** Format data partition using the TWRP executable "twrp"; the TWRP image file to use is "/data/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-1-I006D-enhanced.img" [02.05.2024 10:30 ] [02.05.2024 10:30 ] The automatic reboot after executing the script is disabled [02.05.2024 10:30 ] The phone is NOT rebooted from the TWRP image if it has already been rebooted from the TWRP image. [02.05.2024 10:30 ] The task execution stops if the script ends with a return code not zero [02.05.2024 10:30 ] The phone is currently booted from a TWRP image [02.05.2024 10:30 ] The boot slot is _a. [02.05.2024 10:30 ] The phone is booted from a TWRP image [02.05.2024 10:30 ] The phone is booted into TWRP version "3.7.0_12-1" [02.05.2024 10:30 ] /data is not mounted to a separate partition [02.05.2024 10:30 ] [02.05.2024 10:30 ] Formating /data ... + /usr/bin/adb -d -s M6AIB760D0939LX shell twrp format data + 2>& 1 real 0m02.22s user 0m00.00s sys 0m00.00s Done. You may need to reboot recovery to be able to use /data again. Formatting Metadata using mke2fs... Done. Done processing script file [02.05.2024 10:30 ] Formating the data partition sucesfully done. ---------------------------------------------------------------------- [02.05.2024 10:30 ] Processing the task "boot_phone_from_twrp_image" with the parameter "force" ... [02.05.2024 10:30 ] Executing now "boot_phone_from_twrp_image force" ---------------------------------------------------------------------- [02.05.2024 10:30 ] [02.05.2024 10:30 ] *** Booting the attached phone from the TWRP image "/data/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-1-I006D-enhanced.img" ... [02.05.2024 10:30 ] [02.05.2024 10:30 ] The task execution stops if the script ends with a return code not zero [02.05.2024 10:30 ] The phone is booted from a TWRP image [02.05.2024 10:30 ] Rebooting the phone from the TWRP image requested via parameter [02.05.2024 10:30 ] Booting the phone into the bootloader now ... [02.05.2024 10:30 ] Waiting up to 60 seconds for the boot into the fastboot mode ... [02.05.2024 10:30 ] The phone is booted into the bootloader [02.05.2024 10:30 ] Booting the phone from the TWRP image "/data/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-1-I006D-enhanced.img" now ... Sending 'boot.img' (98304 KB) OKAY [ 2.832s] Booting OKAY [ 10.420s] Finished. Total time: 13.308s Waiting up to 120 seconds for a working adb connection .... [02.05.2024 10:30 ] The adb connection is working after 20 second(s) Waiting up to 30 seconds for the adb daemon to get ready [02.05.2024 10:30 ] ... the adb daemon is ready after 0 second(s) [02.05.2024 10:30 ] The adb connection is ready after 0 second(s) [02.05.2024 10:30 ] Waiting up to 20 seconds until /data is mounted ... [02.05.2024 10:30 ] /data is mounted after 0 second(s). [02.05.2024 10:30 ] /data/media not found - /data is not yet initialized [02.05.2024 10:30 ] The phone is booted into TWRP version "3.7.0_12-1" ---------------------------------------------------------------------- [02.05.2024 10:30 ] Processing the task "install_magisk_in_boot_partition_only" with the parameter "noreboot:_a" ... [02.05.2024 10:30 ] Executing now "install_magisk_in_boot_partition_only noreboot _a" ---------------------------------------------------------------------- [02.05.2024 10:30 ] The slot to use for this task is "_a" [02.05.2024 10:30 ] [02.05.2024 10:30 ] *** 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 "_a copy_apk delete_adb_dir magisk_apk_file=/data/backup/Android/EssentialApps_Backup/Magisk-v25.2.apk" ... [02.05.2024 10:30 ] [02.05.2024 10:30 ] The automatic reboot after executing the script is disabled [02.05.2024 10:30 ] The task execution stops if the script ends with a return code not zero [02.05.2024 10:30 ] ---------------------------------------------------------------------- [02.05.2024 10:30 ] *** Executing now "/data/develop/android/scripts_on_linux/install_magisk_via_twrp.sh _a 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.3.3 - 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 found in the parameter: "/data/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-1-I006D-enhanced.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-BeyondStock™-Sake-A13.001-CPTB-g17db0633edf3 #32 SMP PREEMPT Sat Oct 14 11:34:03 EDT 2023 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-1" Retrieving the current boot slot from the phone ... The current boot slot is "_a" Using the boot partition for the slot found in the parameter: _a The boot partition to patch is "boot_a" 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. 50.9 MB/s (11278270 bytes in 0.211s) 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. 250.3 MB/s (7716 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 '' Searching for an installed Magisk app .... ls: /data/app/*/com.topjohnwu.magisk*/base.apk: No such file or directory Searching for a Magisk apk file in the directory /sdcard/Download ... ls: /sdcard/Download/Magisk*apk: No such file or directory Searching for a Magisk apk file in the directdory /data ... 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.592" ... Delete all existing files in the directory "/data/MagiskInst/bin" ... total 0 total 0 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 2024-05-02 08:30 /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_a.661479.img" from the partition "/dev/block/by-name/boot_a" ... 196608+0 records in 196608+0 records out 100663296 bytes (96 M) copied, 0.186144 s, 516 M/s Checking the result ... -rw-rw-rw- 1 root root 100663296 2024-05-02 08:30 /tmp/boot_a.661479.img The check sums are: The check sum of the boot partition "/dev/block/by-name/boot_a" on the phone is "4178161735" The check sum of th boot image file on the phone is "/tmp/boot_a.661479.img" is "4178161735" Installing Magisk into the boot partition using the old method ... Patching the boot image file "/tmp/boot_a.661479.img" ... Waiting now 10 second(s) ... - Unpacking boot image Parsing boot image: [/tmp/boot_a.661479.img] HEADER_VER [3] KERNEL_SZ [46215680] RAMDISK_SZ [9243717] OS_VERSION [11.0.0] OS_PATCH_LEVEL [2022-02] 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] 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] Create directory [.backup] (0000) Add entry [.backup/.magisk] (0000) Dump cpio: [ramdisk.cpio] - Repacking boot image Parsing boot image: [/tmp/boot_a.661479.img] HEADER_VER [3] KERNEL_SZ [46215680] RAMDISK_SZ [9243717] OS_VERSION [11.0.0] OS_PATCH_LEVEL [2022-02] PAGESIZE [4096] CMDLINE [] KERNEL_FMT [raw] RAMDISK_FMT [gzip] VBMETA Repack to boot image: [new-boot.img] HEADER_VER [3] KERNEL_SZ [46215680] RAMDISK_SZ [9653292] OS_VERSION [11.0.0] OS_PATCH_LEVEL [2022-02] PAGESIZE [4096] CMDLINE [] Checking the result ... -rw-r--r-- 1 root root 100663296 2024-05-02 08:31 /data/MagiskInst/bin/new-boot.img The patched boot image is "/tmp/patched_boot_a.661479.img" Waiting now 10 second(s) ... Patching the partition "/dev/block/by-name/boot_a" from the patched boot image file "/tmp/patched_boot_a.661479.img" via dd ... 196608+0 records in 196608+0 records out 100663296 bytes (96 M) copied, 4.432900 s, 22 M/s Checking the result .... The check sums for the images and devices on the phone are: 4178161735 100663296 /tmp/boot_a.661479.img 2319007921 100663296 /tmp/patched_boot_a.661479.img 2319007921 100663296 /dev/block/by-name/boot_a OK, patching the boot partition "/dev/block/by-name/boot_a" was successfull Deleting all used files and directories in the directory /data ... Automatically rebooting the phone is disabled # --------------------------------------------------------------------- [02.05.2024 10:31 ] ... the script ended with RC=0 ---------------------------------------------------------------------- [02.05.2024 10:31 ] Processing the task "enable_adb" with the parameter "reboot:_a" ... [02.05.2024 10:31 ] Executing now "enable_adb reboot _a" ---------------------------------------------------------------------- _a[02.05.2024 10:31 ] [02.05.2024 10:31 ] *** Enabling access via adb using the script "/data/develop/android/scripts_on_linux/enable_access_via_adb.sh" with the parameter " _a" ... [02.05.2024 10:31 ] [02.05.2024 10:31 ] The automatic reboot after executing the script is enabled [02.05.2024 10:31 ] The task execution stops if the script ends with a return code not zero [02.05.2024 10:31 ] The phone is currently booted from a TWRP image [02.05.2024 10:31 ] The boot slot is _a. [02.05.2024 10:31 ] ---------------------------------------------------------------------- [02.05.2024 10:31 ] *** Executing now "/data/develop/android/scripts_on_linux/enable_access_via_adb.sh _a" ... # --------------------------------------------------------------------- enable_access_via_adb.sh version - v1.3.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 TWRP image defined in the environment variable TWRP_IMAGE: "/data/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-1-I006D-enhanced.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 Checking which user startd the adb daemon ... ERROR: The adb daemon (PID=522705) was started by the user "root" but the user running this script is "xtrnaw7" - most probably the pubkeys for these user are different and enabling access via adb using the script will NOT work 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 "/data/develop/android/adb.pubkey" to "/tmp/adbkey.pub" on the phone ... Copying the file "/data/develop/android/adb.pubkey" to "/tmp/adbkey.pub" the phone ... /data/develop/android/adb.pubkey: 1 file pushed, 0 skipped. 63.5 MB/s (2156 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. 536.6 MB/s (19212 bytes in 0.000s) Executing the temporary script "/tmp/enable_adb_using_magisk.sh _a" on the phone ... 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_a" into the file "boot_a.img" ... 196608+0 records in 196608+0 records out 100663296 bytes (96 M) copied, 0.311836 s, 308 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_a.img" ... Parsing boot image: [boot_a.img] HEADER_VER [3] KERNEL_SZ [46215680] RAMDISK_SZ [9653292] OS_VERSION [11.0.0] OS_PATCH_LEVEL [2022-02] 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_a.img" ... Parsing boot image: [boot_a.img] HEADER_VER [3] KERNEL_SZ [46215680] RAMDISK_SZ [9653292] OS_VERSION [11.0.0] OS_PATCH_LEVEL [2022-02] PAGESIZE [4096] CMDLINE [] KERNEL_FMT [raw] RAMDISK_FMT [gzip] VBMETA Repack to boot image: [boot_a_new.img] HEADER_VER [3] KERNEL_SZ [46215680] RAMDISK_SZ [9654019] OS_VERSION [11.0.0] OS_PATCH_LEVEL [2022-02] PAGESIZE [4096] CMDLINE [] Patching the new image file "boot_a_new.img" to the boot partition /dev/block/by-name/boot_a ... 196608+0 records in 196608+0 records out 100663296 bytes (96 M) copied, 4.562960 s, 21 M/s adb access will now be enabled by Magisk while doing the next reboot Automatically rebooting the phone is disabled # --------------------------------------------------------------------- [02.05.2024 10:31 ] ... the script ended with RC=0 [02.05.2024 10:31 ] *** Rebooting the phone now .... [02.05.2024 10:31 ] Parameter for "reboot_phone" are: wait [02.05.2024 10:31 ] The current phone status is "1" [02.05.2024 10:31 ] Will boot the phone using "adb" [02.05.2024 10:31 ] Rebooting the phone using the command " /usr/bin/adb -d -s M6AIB760D0939LX reboot " now ... Waiting up to 120 second(s) for the phone .............. [02.05.2024 10:32 ] Booting the phone into the Android OS succeeded after 70 seconds; the current status of the phone is 3 [02.05.2024 10:32 ] Waiting up to 20 seconds until /data is mounted ... [02.05.2024 10:32 ] /data is mounted after 0 second(s). [02.05.2024 10:32 ] Testing if the data partition on the phone is encrypted ... [02.05.2024 10:32 ] The test directory for the encryption test is "/sdcard/Download" [02.05.2024 10:32 ] The data partition on the phone is either not mounted or not encrypted [02.05.2024 10:32 ] Retrieving the UID from the shell ... [02.05.2024 10:32 ] The UID for the shell is "2000" ---------------------------------------------------------------------- [02.05.2024 10:32 ] Processing the task "install_magisk_in_data_adb_only" with the parameter "noreboot:copy_apk:use_apk" ... [02.05.2024 10:32 ] Executing now "install_magisk_in_data_adb_only noreboot copy_apk use_apk" ---------------------------------------------------------------------- [02.05.2024 10:32 ] [02.05.2024 10:32 ] *** 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 use_apk magisk_apk_file=/data/backup/Android/EssentialApps_Backup/Magisk-v25.2.apk" ... [02.05.2024 10:32 ] [02.05.2024 10:32 ] The automatic reboot after executing the script is disabled [02.05.2024 10:32 ] The task execution stops if the script ends with a return code not zero [02.05.2024 10:32 ] ---------------------------------------------------------------------- [02.05.2024 10:32 ] *** Executing now "/data/develop/android/scripts_on_linux/install_magisk_via_twrp.sh adb_only copy_apk use_apk magisk_apk_file=/data/backup/Android/EssentialApps_Backup/Magisk-v25.2.apk" ... # --------------------------------------------------------------------- install_magisk_via_twrp.sh version - v3.1.3.3 - 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 "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-v25.2.apk" Using the TWRP image found in the parameter: "/data/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-1-I006D-enhanced.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.134-qgki-perf-11963-g6adc8cf32efd #1 SMP PREEMPT Tue May 3 14:56:35 CST 2022 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 (Tue Jul 5 01:11:51 CST 2022); the description for the distribution is "EU_I006D-user 13 TKQ1.220523.001 32.0501.0403.4 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 ... The phone is booted into the fastboot mode after 11 second(s) Booting the phone from the TWRP image "/data/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-1-I006D-enhanced.img" now ... Sending 'boot.img' (98304 KB) OKAY [ 2.839s] Booting OKAY [ 10.431s] Finished. Total time: 13.312s Waiting up to 60 second(s) for the boot of the phone ..... ... ro.build.version.release is "99.87.36" The adb connection is working after 25 second(s) Retrieving the current boot slot from the phone ... The current boot slot is "_a" The boot slot to patch is "_a" The boot partition to patch is "boot_a" 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. 49.4 MB/s (11278270 bytes in 0.218s) 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. 285.1 MB/s (7716 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 /data/Magisk-v25.2.apk Magisk is not yet installed 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.633" ... Delete all existing files in the directory "/data/MagiskInst/bin" ... total 0 total 0 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:system_file:s0 chcon '/data/adb/magisk/util_functions.sh' to u:object_r:system_file:s0 chcon '/data/adb/magisk/chromeos' to u:object_r:system_file:s0 chcon '/data/adb/magisk/chromeos/kernel_data_key.vbprivk' to u:object_r:system_file:s0 chcon '/data/adb/magisk/chromeos/kernel.keyblock' to u:object_r:system_file:s0 chcon '/data/adb/magisk/chromeos/futility' to u:object_r:system_file:s0 chcon '/data/adb/magisk/boot_patch.sh' to u:object_r:system_file:s0 chcon '/data/adb/magisk/addon.d.sh' to u:object_r:system_file:s0 chcon '/data/adb/magisk/busybox' to u:object_r:system_file:s0 chcon '/data/adb/magisk/magisk64' to u:object_r:system_file:s0 chcon '/data/adb/magisk/magiskboot' to u:object_r:system_file:s0 chcon '/data/adb/magisk/magiskinit' to u:object_r:system_file:s0 chcon '/data/adb/magisk/magiskpolicy' to u:object_r:system_file:s0 chcon '/data/adb/magisk/magisk32' to u:object_r:system_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 Automatically rebooting the phone is disabled # --------------------------------------------------------------------- [02.05.2024 10:33 ] ... the script ended with RC=0 ---------------------------------------------------------------------- [02.05.2024 10:33 ] Processing the task "wait_for_access_via_adb" with the parameter "120:kill" ... [02.05.2024 10:33 ] Executing now "wait_for_access_via_adb 120 kill" ---------------------------------------------------------------------- [02.05.2024 10:33 ] The phone is currently booted from a TWRP image [02.05.2024 10:33 ] The boot slot is _a. [02.05.2024 10:33 ] adb access to the phone is working ---------------------------------------------------------------------- [02.05.2024 10:33 ] Processing the task "enable_root_access_for_the_shell" with the parameter "reboot" ... [02.05.2024 10:33 ] Executing now "enable_root_access_for_the_shell reboot" ---------------------------------------------------------------------- [02.05.2024 10:33 ] [02.05.2024 10:33 ] *** Enabling root access for shell in Magisk using the script "/data/develop/android/scripts_on_linux/init_magisk_db.sh" with the parameter " apps=2000" ... [02.05.2024 10:33 ] [02.05.2024 10:33 ] The automatic reboot after executing the script is enabled [02.05.2024 10:33 ] The task execution stops if the script ends with a return code not zero [02.05.2024 10:33 ] ---------------------------------------------------------------------- [02.05.2024 10:33 ] *** Executing now "/data/develop/android/scripts_on_linux/init_magisk_db.sh apps=2000" ... # --------------------------------------------------------------------- init_magisk_db.sh version - v1.0.3.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: 2000 Apps that should be enabled are: UIDs that should be enabled are: 2000 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 TWRP image defined in the environment variable TWRP_IMAGE: "/data/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-1-I006D-enhanced.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. Will enable the root access via Magisk for these UIDs: 2000 The phone is booted from a TWRP image The phone is booted into TWRP version "3.7.0_12-1" 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. 540.9 MB/s (25391 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 The Magisk database does not yet exist Checking if the Magisk daemon is running ... No daemon is currently running! The Magisk daemon is not running -- will start it now ... 25.2:MAGISK:R Successfully started the Magisk daemon Creating the database "/data/adb/magisk.db" using "/data/adb/magisk/magisk64" ... user_version=12 Successfully created the Magisk database "/data/adb/magisk.db" : -rw------- 1 root root 40960 2024-05-02 08:33 /data/adb/magisk.db Stopping the Magisk daemon now No daemon is currently running! 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.707.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 ... Parameter for "reboot_phone" are: The current phone status is "1" Will boot the phone using "adb" 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 Android OS succeeded after 30 seconds; the current status of the phone is 3 Waiting up to 20 seconds until /data is mounted ... /data is mounted after 0 second(s). Testing if the data partition on the phone is encrypted ... The test directory for the encryption test is "/sdcard/Download" The data partition on the phone is either not mounted or not encrypted # --------------------------------------------------------------------- [02.05.2024 10:34 ] ... the script ended with RC=0 ---------------------------------------------------------------------- [02.05.2024 10:34 ] Processing the task "wait_for_access_via_adb" with the parameter "120:kill" ... [02.05.2024 10:34 ] Executing now "wait_for_access_via_adb 120 kill" ---------------------------------------------------------------------- [02.05.2024 10:34 ] The phone is currently booted into the Android OS [02.05.2024 10:34 ] Selecting the TWRP image to use depending on the installed OS on the phone ... [02.05.2024 10:34 ] Checking the installed OS on the phone ... [02.05.2024 10:34 ] The OS on the phone is the ASUS Android 13 [02.05.2024 10:34 ] Checking the type of the file "/data1/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-1-I006D-enhanced.img" ... [02.05.2024 10:34 ] The file type is "Android bootimg, kernel (0x2d52a0b)" [02.05.2024 10:34 ] OK, the file "/data1/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-1-I006D-enhanced.img" is a valid boot image for Android devices [02.05.2024 10:34 ] The installed OS is "ASUS_Android" [02.05.2024 10:34 ] The TWRP file necessary for this OS is "/data1/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-1-I006D-enhanced.img" [02.05.2024 10:34 ] The boot slot is _a. [02.05.2024 10:34 ] adb access to the phone is working ---------------------------------------------------------------------- [02.05.2024 10:34 ] Processing the task "install_the_magisk_app" ... [02.05.2024 10:34 ] Executing now "install_the_magisk_app " ---------------------------------------------------------------------- [02.05.2024 10:34 ] [02.05.2024 10:34 ] *** Installing the Magisk App from the apk file "/data/backup/Android/EssentialApps_Backup/Magisk-v25.2.apk" using the script "/data/develop/android/scripts_on_linux/install_apk.sh" with the parameter " /data/backup/Android/EssentialApps_Backup/Magisk-v25.2.apk" ... [02.05.2024 10:34 ] [02.05.2024 10:34 ] The automatic reboot after executing the script is disabled [02.05.2024 10:34 ] The task execution stops if the script ends with a return code not zero [02.05.2024 10:34 ] Parameter for "reboot_phone" are: [02.05.2024 10:34 ] The current phone status is "3" [02.05.2024 10:34 ] Will boot the phone using "adb" [02.05.2024 10:34 ] The phone is already booted into the android [02.05.2024 10:34 ] Waiting up to 20 seconds until /sdcard is mounted ... [02.05.2024 10:34 ] wait_until_sdcard_is_mounted: /sdcard is mounted after 1 second(s) [02.05.2024 10:34 ] ---------------------------------------------------------------------- [02.05.2024 10:34 ] *** Executing now "/data/develop/android/scripts_on_linux/install_apk.sh -d -s M6AIB760D0939LX -- /data/backup/Android/EssentialApps_Backup/Magisk-v25.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_Backup/Magisk-v25.2.apk Installing the apk "/data/backup/Android/EssentialApps_Backup/Magisk-v25.2.apk" ... Success "/data/backup/Android/EssentialApps_Backup/Magisk-v25.2.apk" succcessfully installed Installation summary ==================== 1 package(s) successfully installed: /data/backup/Android/EssentialApps_Backup/Magisk-v25.2.apk # --------------------------------------------------------------------- [02.05.2024 10:34 ] ... the script ended with RC=0 [02.05.2024 10:34 ] Magisk app successfully installed [02.05.2024 10:34 ] Granting 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 ---------------------------------------------------------------------- [02.05.2024 10:34 ] "finish_tasks" is defined - now executing it ... ---------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------- [02.05.2024 10:34 ] *** Task summary : ------------------------------------------------------------------------------------------------------------- [02.05.2024 10:34 ] Tasks executed successfully are: install_ASUS_raw_image boot_phone_from_twrp_image format_data_via_twrp boot_phone_from_twrp_image install_magisk_in_boot_partition_only enable_adb install_magisk_in_data_adb_only wait_for_access_via_adb enable_root_access_for_the_shell wait_for_access_via_adb install_the_magisk_app ------------------------------------------------------------------------------------------------------------- [02.05.2024 10:34 ] The working directory used is: "/tmp/prepare_phone.sh_WORKDIR.657339" . [02.05.2024 10:34 ] The include file used was : [02.05.2024 10:34 ] -rw-r--r--. 1 xtrnaw7 xtrnaw7 467980 May 2 09:57 /data/develop/android/scripts_on_linux/prepare_phone.include [02.05.2024 10:34 ] The include file used was last edited at: "30.04.2024 /bs" ---------------------------------------------------------------------- [02.05.2024 10:34 ] Execution summary: [02.05.2024 10:34 ] Tasks processed: 11 [02.05.2024 10:34 ] Tasks executed succesfully: 11 [02.05.2024 10:34 ] Tasks executed with errors: 0 [02.05.2024 10:34 ] Tasks not executed on request: 0 [02.05.2024 10:34 ] Tasks not found: 0 [02.05.2024 10:34 ] ### The logfile used was /var/tmp/prepare_phone.sh.log.657339 [02.05.2024 10:34 ] ### The start time was 02.05.2024 10:23:41, the script runtime is (day:hour:minute:seconds) 0:00:10:54 (= 654 seconds) [02.05.2024 10:34 ] ### prepare_phone.sh ended at 02.05.2024 10:34:35 (The PID of this process is 657339; the RC is 0)