Antecedentes: Consulte los siguientes enlaces
- ¿Cómo desactivar dm-verity en Android con ROM de tipo build "usuario"?
- Atascado en el bucle de arranque al desempaquetar y empaquetar
system.img
?
Actualización: Por lo tanto, estoy tratando de desactivar dm-veridad en mi dispositivo Samsung S10 5G para flashear con éxito un paquete, sin modificar y luego embalado system.img.ext4.lz4
(con otros archivos ROM) usando Odin.
He probado lo siguiente:
-
Eliminado
avb
bandera deboot.img
con los siguientes comandos:magiskboot dtb boot.img print -f
345900: fstab
345940: vendor
346156: vm-linux
343692: fstab
343732: vendor
343948: vm-linux
magiskboot dtb boot.img patch
magiskboot dtb boot.img print -f
345900: fstab
345940: vendor
346152: vm-linux
343692: fstab
343732: vendor
343944: vm-linux
-
Eliminado
avb
yverify
banderas dedtbo.img
con los siguientes comandos:magiskboot dtb dtbo.img print -f
126600: fstab
126612: product
126800: vendor
126596: fstab
126608: product
type: [ext4]# magiskboot dtb dtbo.img print -f
126796: vendor
126600: fstab
126612: product
126800: vendor
126600: fstab
126612: product
126800: vendor
126600: fstab
126612: product
126800: vendor
126600: fstab
126612: product
126800: vendor
magiskboot dtb dtbo.img patch
magiskboot dtb dtbo.img print -f
126600: fstab
126612: product
126792: vendor
126596: fstab
126608: product
126788: vendor
126600: fstab
126612: product
126792: vendor
126600: fstab
126612: product
126792: vendor
126600: stab
126612: product
126792: vendor
126600: fstab
126612: product
126792: vendor
-
Parcheado
ramdisk.cpio
con los siguientes comandos:magiskboot cpio ./initrd 'patch false true'
Loading cpio: [./initrd] Patch with flag KEEPVERITY=[false] KEEPFORCEENCRYPT=[false] Found fstab file [etc/recovery.fstab] Dump cpio: [./initrd]
magiskboot cpio ./initrd extract
cat etc/recovery.fstab
Copyright (c) 2013, The Linux Foundation. All rights reserved.
#
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of The Linux Foundation nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
#
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/bootdevice/by-name/boot /boot emmc defaults recoveryonly /dev/block/bootdevice/by-name/recovery /recovery emmc defaults recoveryonly /dev/block/bootdevice/by-name/system / ext4 defaults recoveryonly /dev/block/bootdevice/by-name/userdata /data ext4 defaults wait,length=-16384 /dev/block/bootdevice/by-name/cache /cache ext4 defaults recoveryonly /dev/block/mmcblk0p1 /sdcard vfat defaults recoveryonly /dev/block/bootdevice/by-name/sec_efs /efs ext4 defaults recoveryonly /dev/block/bootdevice/by-name/sec_efs /sec_efs ext4 defaults recoveryonly /dev/block/bootdevice/by-name/carrier /carrier ext4 defaults recoveryonly /dev/block/bootdevice/by-name/hidden /preload ext4 defaults recoveryonly
FOTA
/dev/block/bootdevice/by-name/apnhlos /modem emmc defaults recoveryonly /dev/block/bootdevice/by-name/modem /mdm emmc defaults recoveryonly /dev/block/bootdevice/by-name/dsp /dsp emmc defaults recoveryonly /dev/block/bootdevice/by-name/vendor /vendor ext4 defaults recoveryonly /dev/block/bootdevice/by-name/product /product ext4 defaults recoveryonly
Add misc for GOTA
/dev/block/bootdevice/by-name/misc /misc emmc defaults recoveryonly
Samsung ODE
/dev/block/bootdevice/by-name/keydata /keydata ext4 defaults recoveryonly /dev/block/bootdevice/by-name/keyrefuge /keyrefuge ext4 defaults recoveryonly
Auto-generated code by FOTA Portal
/dev/block/bootdevice/by-name/dtbo /dtbo emmc default recoveryonly
Después de Parcheando, he convertido dtbo.img
a dtbo.img.lz4
utilizando la herramienta de compresión lz4 y creado nuevo recovery.img
imagen con parches initrd
archivo.
Después de eso. He intentado flash magisk_patched.tar
con contenido AP como uno de los siguientes:
-
Sobrescritos los tres archivos parcheados en los puntos 1, 2 y 3 anteriores. -> Atascado en la pantalla de inicio cuando se trata de ir a la recuperación después de flashear con éxito con Odin. El modo de descarga aparece en la pantalla de inicio.
-
Sobreescrito 1.
boot.img
y 2.dtbo.img.lz4
arriba. -> rooteado con éxito, pero al intentar editar elsystem_root
partición entonces me encuentro con el siguiente problema:D:>adb shell beyondxq:/ $ su beyondxq:/ # mount -o rw,remount /system beyondxq:/ # cd system beyondxq:/system # echo "Test /system mounting" > temp.txt beyondxq:/system # cat temp.txt Test /system mounting beyondxq:/system # cd .. beyondxq:/ # mount -o rw,remount /system_root beyondxq:/ # echo "Test /system_root mounting" > temp.txt /system/bin/sh: can't create temp.txt: Read-only file system ---> Error here 1|beyondxq:/ # cat system/temp.txt Test /system mounting beyondxq:/ # cat system_root/temp.txt cat: system_root/temp.txt: No such file or directory ---> Verify: File not created 1|beyondxq:/ # exit 1|beyondxq:/ $ exit
D:>adb remount Not running as root. Try "adb root" first.
D:>adb root ---> It didn't work as the next command is not working
D:>adb remount
Not running as root. Try "adb root" first.D:>adb shell beyondxq:/ $ su beyondxq:/ # ls sdcard Alarms Android DCIM Download Movies Music Notifications Pictures Podcasts Ringtones Samsung selinux_policy_modified beyondxq:/ # mount -o rw,remount /system_root beyondxq:/ # cp sdcard/selinux_policy_modified /system_root/sepolicy cp: /system_root/sepolicy: Permission denied ---> Permission Denied here 1|beyondxq:/ #
-
Sobreescrito 1.
boot.img
y 2.dtbo.img.lz4
arriba con desembalar y embalarsystem.img.ext4.lz4
-> El resultado es boot-loop después de un flasheo exitoso.
Por favor, indíqueme qué ha fallado o si me he saltado algún paso.