How to patch `system.img` to root the Samsung S10 5G (Qualcomm) device? - Samsung Galaxy S10 5G ROMs, Kernels, Recoveries, &

Hi All,
Device Detail:
- Samsung S10 5G
- Qualcomm Device
- Model: SM-G977U
- ROM: VZW-G977UVRU2ASH7-20190827135903
- Kernel-Version - Linux version 4.14.83-16633035 ([email protected]) (clang version 6.0.10 for Android NDK) #2 SMP PREEMPT Wed Aug 14 16:23:48 KST 2019
Background: I have
- rooted the device with instructions given by Magisk.
- I can successfully reboot to the recovery rootfs.
Problem: I am trying to modify the `system.img.ext4.lz4` file to root the device with normal boot. I am aware that it will not let the device install OTA Updates.
Unpack-Pack System and make new AP.tar, flash:
- Without any modification to the `system.img`, I have just unpacked `system.img.ext4.lz4`->`system.img.ext4`->`system.img`->mounted to system directory and packed it back to `system.img`->`system.img.ext4`->`system.img.ext4.lz4`.
- Replaced unpack-packed `system.img.ext4.lz4` with the AP `system.img.ext4.lz4` and make a tar of it.
- Then I have flashed it using Odin v3.13 along with BL, CP, and HOME_CSC.
- Odin has show PASS and I have rebooted the device into recovery mode.
- Done the Wipe data/factory reset and reboot to recovery again but released the recovery key combination on splash screen as mentioned in the root instructions .
- The device stuck in a boot loop.
Tries:
1. Disable Dm-verity
- Removed `avb` flag from `boot.img` with
Code:
magiskboot dtb boot.img patch
- Removed `avb` and `verify` flags from `dtbo.img` with
Code:
magiskboot dtb dtbo.img patch
- Patched `ramdisk.cpio` with
Code:
magiskboot cpio ./initrd 'patch false true'
Patched `boot.img` and `dtbo.img` is working fine with magisk patched AP file but the `ramdisk.cpio` creating the issue: Stuck at splash screen when trying to go to recovery after successfully flash with Odin. Download mode is appearing on splash screen.
So, I have used `boot.img` and `dtbo.img` along with unpack-packed `system.img.ext4.lz4` but the result is still a boot loop. I have also tried a combination of `boot.img` and `dtbo.img` along with unpack-packed `vendor.img.ext4.lz4` and flashed the AP.tar with other files but still the result is a boot loop.
So, I want to debug the problem and got to know about `pstore` which preserve the logs when kernel panic.
2. pstore
- Checked that `/sys/fs/pstore` is mounted by the system with following in init file: Grep the pstore using `find . | grep '\.rc' | xargs cat | grep pstore -n -i` and get following result:
Code:
314: # pstore/ramoops previous console log
315: mount pstore pstore /sys/fs/pstore nodev noexec nosuid
316: chown system log /sys/fs/pstore/console-ramoops
317: chmod 0440 /sys/fs/pstore/console-ramoops
318: chown system log /sys/fs/pstore/console-ramoops-0
319: chmod 0440 /sys/fs/pstore/console-ramoops-0
320: chown system log /sys/fs/pstore/pmsg-ramoops-0
321: chmod 0440 /sys/fs/pstore/pmsg-ramoops-0
- Checked the kernel config by pulling the file from /proc/config.gz.
Code:
$ cat config | grep PSTORE
CONFIG_PSTORE=y
CONFIG_PSTORE_ZLIB_COMPRESS=y
# CONFIG_PSTORE_LZO_COMPRESS is not set
# CONFIG_PSTORE_LZ4_COMPRESS is not set
CONFIG_PSTORE_CONSOLE=y
CONFIG_PSTORE_PMSG=y
CONFIG_PSTORE_PMSG_SSPLOG=y
CONFIG_PSTORE_RAM=y
- Check the `ramoops` configuration:
Code:
./sys/module/ramoops/parameters/console_size 262144
./sys/module/ramoops/parameters/dump_oops 1
./sys/module/ramoops/parameters/ecc 0
./sys/module/ramoops/parameters/ftrace_size 262144
./sys/module/ramoops/parameters/mem_address 3241148416
./sys/module/ramoops/parameters/mem_size 1048576
./sys/module/ramoops/parameters/mem_type 0
./sys/module/ramoops/parameters/pmsg_size 262144
./sys/module/ramoops/parameters/record_size 262144
`pstore` setup looks fine but when I am trying the get logs from `sys/fs/pstore` then I found nothing.
I have tried it by two ways:
1. Crash manually with panic kernel using:
Code:
echo 1 > /proc/sys/kernel/sysrq
echo c > /proc/sysrq-trigger
Followed Reading Kernel Logs
2. Flashing non-working rom that cause a boot loop and then flashed a working ROM with rooting steps and checked the file at `sys/fs/pstore`.
I need a favor in:
- Any steps to fix/debug the `pstore` problem?
- Any other way to find the kernel logs?
Update 1: I get the logs from recovery but I am not able to identify the problem.
Logs link: https://drive.google.com/file/d/1b-XNmjpYvH-L8lY0xA0SYr7XcITVCrVS/view?usp=sharing
Description: In this video, I have done the following:
1. Displayed recovery logs before: The last recovery logs are ends with 8.
2. Rebooted the device with a recovery key combination. I have already wipe data partition before making this video.
3. The boot loop happens and in the next reboot, I have pressed the recovery key combination to open the recovery mode where logs that end with 9 displayed.
4. Then I have recorded `last_history`, `last_avc_message_recovery`, `last_log.9` and `last_kmsg.9`
5. `last_history` and `last_avc_message_recovery` looks unchanged(same as before boot loop).
6. Then, I just have tried to mount the system but that didn't work.
7. At last, I have just rebooted the system normally without any recovery key combination.
Some Highlighted logs of last_log.9
exec -f /system/bin/e2fsck -v -y /dev/block/bootdevice/by-name/cache
error: _do_exec: can't run '/system/bin/e2fsck'
(errno 13 : Permission denied)
/system/bin/e2fsck terminated by exit(255)
...
E:Can't read /cache/recovery/last_locale: No such file or directory
...
W:Failed to unmount /efs: Device or resource busy
can't unmount /efs - Device or resource busy
...
W:Failed to set brightness: Invalid argument
I:Screensaver disabled
Atomic Commit failed in DisableNonMainCrtcs
Atomic Commit failed, rc = 0
...
Reboot Recovery Cause is [[BootChecker]RebootRecoveryWithKey]
...
print_recovery_cause() : reboot_reason=[[BootChecker]RebootRecoveryWithKey]
...
[property list]
persist.audio.fluence.speaker=true
...
ro.vendor.build.security_patch=2018-08-05
Supported API: 3
I:/efs is already mounted
W:Failed to unmount /efs: Device or resource busy
check_selective_file:Can't unmount /efs - Device or resource busy
just_reboot_after_update = 1
should_wipe_cahcewipe_cache
-- Wiping cache...
erase_volume(/cache)
...
MDF_I: Completed reset MDF flag!
MDF_I: Completed initialized MDF for Recovery!
mke2fs 1.43.3 (04-Sep-2016)
Discarding device blocksL 4096/153600??????????????????????????????done
Discard takes 0.00051s
Creating filesystem with 153600 4k blocks and 38400 inodes
...
Creating journal (2048 blocks): done
...
copy_logs
...
Cache wipe complete
[Checking pre-multi-csc2]
[start failed section]
sales_code=VZW
Carrier ID=[XAA]
[system partition space check]
The device has /product partition.
[out-recovery]
I:system root image is true, so need to change the unmount point from /system to /system_root
running out-recovery time : 0.000s
running recovery time: 1.738s
copy_avc_msg_to_data(1, )
I:fs_type "ext4" for /cache
copy_file 'proc/avc_msg' 'cache/recovery/last_avc_msg_recovery'
!__RECOVERY_FOR_ASSAMBLY
b_del_recovery_command = true
Rebooting...
## finish_recovery_terminate(del=1, reboot_cmd=reboot, clear_BCB=1)
## finish_recovery(delcmd=1,...
I:Saving locale "en-US"
I:fs_type "ext4" for /cache
I:[libfs_mgr]dt_fstab: Skip disabled entry for partition vm-linux
I:## unlink /cache/recovery/command
copy_logs
I:fs_type "ext4" for /cache
copy_log_file :: create recovery log file '/cache/recovery/log'
copy_log_file :: create recovery log file '/cache/recovery/last_log'
Click to expand...
Click to collapse
Is anyone have experience in detecting problems from the kernel logs?

i can not help you, but we can collect ideas. what about re-sign the system.img? there is a key somewhere, i guess just deleting won't work but maybe it is possible to calculate checksum

or maybe you can switch to SuperSU 2.79 SR3 (latest release from chainfire) or at least look inside the update-binary shell script how to root system.
regarding dm-verity i would start with searching for "verify" flag in your fstabs and remove it. magisk is also doing some hex patches and re-signing, it's the best source to look inside magisk installer zip update-binary/ updater-script, if you have the knowledge to read code
another option is try to port a twrp recovery from another snapdragon (i wonder if somebody did this already) if you can find a porting guide

so the vzw s10 5g is unlockable?

elliwigy said:
so the vzw s10 5g is unlockable?
Click to expand...
Click to collapse
yes

aIecxs said:
yes
Click to expand...
Click to collapse
Figures lol.. I have a g975u from big red n don't plan on buying another lol

aIecxs said:
yes
Click to expand...
Click to collapse
Message me on telegram and I can help you if you help me.. I'm curious in some logs and what not.. I also might have something you can use..

Did you get it working? I have the same phone and I want to use the 600mgz tmobile 5g in a few days, so I need the right rom.

elliwigy said:
so the vzw s10 5g is unlockable?
Click to expand...
Click to collapse
aIecxs said:
yes
Click to expand...
Click to collapse
Snapdragon bootloader unlockable? How?
I'm a VZW customer and can get the phone on an upgrade, but want to root it...

i got a g977p and twrp n magisk working great

do you think it is possible to flash other branding on verizon devices with modded odin?

aIecxs said:
do you think it is possible to flash other branding on verizon devices with modded odin?
Click to expand...
Click to collapse
dunno.. its not possible on n976v..

Was there any luck on rooting the Verizon G977U?

@Vats12 has already successful rooted with magisk in recovery. this thread is for rooting system (kind of rooting where su binary is placed in /system/xbin like for older devices, which breaks OTA)

aIecxs said:
@Vats12 has already successful rooted with magisk in recovery. this thread is for rooting system (kind of rooting where su binary is placed in /system/xbin like for older devices, which breaks OTA)
Click to expand...
Click to collapse
So you want like the supersu method?

ExtremeGrief said:
So you want like the supersu method?
Click to expand...
Click to collapse
Yes, do you know how to do this?
Magisk (guide) does a lot of other things too..
Maybe we can use Magisk to disable the securities and then SuperSu can help in the rooting system?

Vats12 said:
Yes, do you know how to do this?
Magisk (guide) does a lot of other things too..
Maybe we can use Magisk to disable the securities and then SuperSu can help in the rooting system?
Click to expand...
Click to collapse
But why? Safetynet will be gone
What model is the device?

ExtremeGrief said:
But why? Safetynet will be gone
What model is the device?
Click to expand...
Click to collapse
model see OP! i guess because of the buttons needed for booting in magiskrecovery, but the reason is not important only HOW (for Vats12, not for me i don't own this device)

Sorry but this thread needs to be closed
aIecxs said:
model see OP! i guess because of the buttons needed for booting in magiskrecovery, but the reason is not important only HOW (for Vats12, not for me i don't own this device)
Click to expand...
Click to collapse
I don't want to be the one who shouts fake, but the instructions you gave a link to says you have to be able to flash a bootloader first, which means an unlocked blootloader, if you have Verizon rom this is not possible, as the blootloader is locked.
If you did find a way to flash a modified bootloader, or a modified recovery those are the instructions we need, because in fastboot you are unable to do this with a locked bootloader and you are unable to unlock the bootloader on Verizon. If you have a modified bootloader or recovery flashed on your device what did you use to flash it with Odin? Because only way to flash a boot.img is either get into download mode and flash with Odin, or with Edl, if you got into edl mode then can you provide instructions on that, because we would like to know how to get the device into EDL mode as well
Sorry boys this is a hoax.

@DroidisLINUX there is video proof in OP, and again for you:
This is not a tutorial about unlocking and rooting, it is a question how he can modify /system to permanently integrate su

Related

[Q] Loop in bootanimation after update to CROMi-X 7.0.2

Hi to everyone.
I was updating my tab to the latest version of the ROM of sbdags.
Everything was fine until i reboot the tab to use it for the first time: loop in the boot animation and never come out from it.
I came from the previous version of the rom, the Cromi-x 6.1 with 10.26.1.18 bootloader.
The process i use to update was this:
1) wipe of data/factory reset, wipe with format /boot, wipe with format /system
2) Install the CWM recovery 6.0.5.0 and update the bootloader to 11.4.1.17 by flashing they with the file that you can find in the rom page.
3) repeat point 1
4) install the rom by flashing it from an SD. Complete the Aroma installer and answer to every option that it ask to me.
5) reboot the system and stuck in the bootanimation
I use the WW format cause i'm italian and i check the md5
What's wrong? I can go to recovery everytime i need and i have a backup just in case i need it.
Sdbags, i really want to offer you a beer for your work. I think i will do it in every case, but yes, kitkat on my tab would be great :victory:
Sorry for bad english. For every question, i'm here. Thanks a lot.
M.
aMachi said:
Hi to everyone.
I was updating my tab to the latest version of the ROM of sbdags.
Everything was fine until i reboot the tab to use it for the first time: loop in the boot animation and never come out from it.
I came from the previous version of the rom, the Cromi-x 6.1 with 10.26.1.18 bootloader.
The process i use to update was this:
1) wipe of data/factory reset, wipe with format /boot, wipe with format /system
2) Install the CWM recovery 6.0.5.0 and update the bootloader to 11.4.1.17 by flashing they with the file that you can find in the rom page.
3) repeat point 1
4) install the rom by flashing it from an SD. Complete the Aroma installer and answer to every option that it ask to me.
5) reboot the system and stuck in the bootanimation
I use the WW format cause i'm italian and i check the md5
What's wrong? I can go to recovery everytime i need and i have a backup just in case i need it.
Sdbags, i really want to offer you a beer for your work. I think i will do it in every case, but yes, kitkat on my tab would be great :victory:
Sorry for bad english. For every question, i'm here. Thanks a lot.
M.
Click to expand...
Click to collapse
Don't do step 3. Try it again please.
Try the default options first.
sbdags said:
Don't do step 3. Try it again please.
Try the default options first.
Click to expand...
Click to collapse
If default option are those who are pre-selected on the aroma installer i've already try it.
Also i try to do it without point 3. Nothing
Here a log of the installation of the rom
AROMA INSTALLER version 2.56
(c) 2012 by amarullz xda-developers
ROM Name : CROMi-Xenogenesis KitKat
ROM Version : 7.0.2 DEODEX
ROM Author : sbdags
Device : Asus Transformer TF701T
Start at : Mon Aug 25 20:30:02 2014
Thank you for installing CROMi-Xenogenesis KitKat 4.4.2!
Sit back and relax...
-----------------------------------------------------
This will take a few minutes!
Preparing File System...
about to run program [/sbin/umount] with 3 args
umount: can't umount /system: Invalid argument
run_program: child exited with status 1
about to run program [/sbin/umount] with 3 args
Formatting System....
Creating filesystem with parameters:
Size: 2147483648
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 8192
Label:
Blocks: 524288
Block groups: 16
Reserved block group size: 127
Created filesystem with 11/131072 inodes and 17193/524288 blocks
Tuning System....
about to run program [/tmp/tune2fs.ext4] with 6 args
tune2fs 1.41.12 (17-May-2010)
Tuning Data - Journaling Enabled.....
about to run program [/tmp/tune2fs.ext4] with 6 args
tune2fs 1.41.12 (17-May-2010)
Wiping Cache.....
Installing Core System.....
Installing Options...
Region Specific Files
- TF701 WW Build
Kernel Preparation
- sbdag's 11.4.1.17 Stock Modded Kernel
package_extract_file: no extras/kernel/sbmodded/701sb3.img in package
DPI Preparation
- 320 DPI
Resolution Preparation
- 2560x1600 res
Boot Animation
- Google Android-L
Launcher
- Asus Stock Launcher
Asus Apps 1
- Asus Email
- Asus Desk Clock & Widget
- Asus Weather & Time Widget
- Asus Splendid
- Asus Calculator
- Asus MyDictionary
- Asus Studio
Asus Apps 2
Google Apps 1
- Google Calendar
- Google Now and Voice Search
- Google Music
- News and Weather Genie
- YouTube
- Maps
- Hangouts
Google Apps 2
- Google Chrome
- Google Drive Docs
Misc Apps
- ES File Explorer
- AdAway installed
- Keyboard Manager
- Terminal Emulator
- Polaris Office
Installing CROMi-X System Tweaks.....
about to run program [/tmp/cromix-build-prop.sh] with 1 args
Tweaks and Scripts
- Browser2RAM enabled
- Ad Blocker enabled
- Zip Align Script installed
- Keyboard Dock Remapping installed
Building symlinks.....
Setting permissions.....
Installing BusyBox.....
about to run program [/system/xbin/busybox] with 4 args
Setting ROOT.....
DRM Options
- Google Video & Hulu+ DRM
Installing build.prop
about to run program [/sbin/sh] with 2 args
about to run program [/sbin/sh] with 2 args
Finalising ROM
about to run program [/sbin/umount] with 3 args
---------------------------------------
All Done!
Don't forget to follow @sbdags on Twitter
If you like it please donate to [email protected] on paypal
Enjoy CROMi-X!
script succeeded: result was [Enjoy CROMi-X!]
Installer Sucessfull (Status 0)
I don't know if this can be helpful, but if i restore the backup of the previous version of the rom everything work fine. I'm reading the discussion of the guy with the partition problem and i was wondering if maybe the problem was the same, but i don't think it.
Another time, sorry for bad english and thanks for all your work sdbags.
M.
That log is fine - everything is installed.
Read out the bootloader version from the bootloader screen to double check please.
Also you are rebooting after installing the bootloader and cwm package aren't you?
aMachi said:
If default option are those who are pre-selected on the aroma installer i've already try it.
Also i try to do it without point 3. Nothing
Here a log of the installation of the rom
AROMA INSTALLER version 2.56
(c) 2012 by amarullz xda-developers
ROM Name : CROMi-Xenogenesis KitKat
ROM Version : 7.0.2 DEODEX
ROM Author : sbdags
Device : Asus Transformer TF701T
Start at : Mon Aug 25 20:30:02 2014
Thank you for installing CROMi-Xenogenesis KitKat 4.4.2!
Sit back and relax...
-----------------------------------------------------
This will take a few minutes!
Preparing File System...
about to run program [/sbin/umount] with 3 args
umount: can't umount /system: Invalid argument
run_program: child exited with status 1
about to run program [/sbin/umount] with 3 args
Formatting System....
Creating filesystem with parameters:
Size: 2147483648
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 8192
Label:
Blocks: 524288
Block groups: 16
Reserved block group size: 127
Created filesystem with 11/131072 inodes and 17193/524288 blocks
Tuning System....
about to run program [/tmp/tune2fs.ext4] with 6 args
tune2fs 1.41.12 (17-May-2010)
Tuning Data - Journaling Enabled.....
about to run program [/tmp/tune2fs.ext4] with 6 args
tune2fs 1.41.12 (17-May-2010)
Wiping Cache.....
Installing Core System.....
Installing Options...
Region Specific Files
- TF701 WW Build
Kernel Preparation
- sbdag's 11.4.1.17 Stock Modded Kernel
package_extract_file: no extras/kernel/sbmodded/701sb3.img in package
DPI Preparation
- 320 DPI
Resolution Preparation
- 2560x1600 res
Boot Animation
- Google Android-L
Launcher
- Asus Stock Launcher
Asus Apps 1
- Asus Email
- Asus Desk Clock & Widget
- Asus Weather & Time Widget
- Asus Splendid
- Asus Calculator
- Asus MyDictionary
- Asus Studio
Asus Apps 2
Google Apps 1
- Google Calendar
- Google Now and Voice Search
- Google Music
- News and Weather Genie
- YouTube
- Maps
- Hangouts
Google Apps 2
- Google Chrome
- Google Drive Docs
Misc Apps
- ES File Explorer
- AdAway installed
- Keyboard Manager
- Terminal Emulator
- Polaris Office
Installing CROMi-X System Tweaks.....
about to run program [/tmp/cromix-build-prop.sh] with 1 args
Tweaks and Scripts
- Browser2RAM enabled
- Ad Blocker enabled
- Zip Align Script installed
- Keyboard Dock Remapping installed
Building symlinks.....
Setting permissions.....
Installing BusyBox.....
about to run program [/system/xbin/busybox] with 4 args
Setting ROOT.....
DRM Options
- Google Video & Hulu+ DRM
Installing build.prop
about to run program [/sbin/sh] with 2 args
about to run program [/sbin/sh] with 2 args
Finalising ROM
about to run program [/sbin/umount] with 3 args
---------------------------------------
All Done!
Don't forget to follow @sbdags on Twitter
If you like it please donate to [email protected] on paypal
Enjoy CROMi-X!
script succeeded: result was [Enjoy CROMi-X!]
Installer Sucessfull (Status 0)
I don't know if this can be helpful, but if i restore the backup of the previous version of the rom everything work fine. I'm reading the discussion of the guy with the partition problem and i was wondering if maybe the problem was the same, but i don't think it.
Another time, sorry for bad english and thanks for all your work sdbags.
M.
Click to expand...
Click to collapse
sbdags said:
That log is fine - everything is installed.
Read out the bootloader version from the bootloader screen to double check please.
Also you are rebooting after installing the bootloader and cwm package aren't you?
Click to expand...
Click to collapse
When i install cwm and bootloader package i reboot from cwm but i stuck in boot animation. The same that happen when i try to reboot after install the rom.
In bootloader screen i read
Android macallan-user BL released by WW_epad-11.4.1.17-20140711
aMachi said:
When i install cwm and bootloader package i reboot from cwm but i stuck in boot animation. The same that happen when i try to reboot after install the rom.
In bootloader screen i read
Android macallan-user BL released by WW_epad-11.4.1.17-20140711
Click to expand...
Click to collapse
Right and then you boot back to CWM, do a full wipe (you may need to wipe your internal sdcard so back it up first) and then flash the rom. After that it should boot fine.
If not please search xda for how to get a logcat and post one of it bootlooping please.
sbdags said:
Right and then you boot back to CWM, do a full wipe (you may need to wipe your internal sdcard so back it up first) and then flash the rom. After that it should boot fine.
If not please search xda for how to get a logcat and post one of it bootlooping please.
Click to expand...
Click to collapse
I try the first thing that you say but nothing, still loop in bootanimation.
I'll do a logcat through adb in the afternoon. Now i had some problem cause i can't mount usb storage through cwm for some reason. Late i'll find drivers or what's missing.
Maybe can help: when i reboot frequently cwm ask me if i want to fix root. It's normal?
Thanks you for your help.
aMachi said:
I try the first thing that you say but nothing, still loop in bootanimation.
I'll do a logcat through adb in the afternoon. Now i had some problem cause i can't mount usb storage through cwm for some reason. Late i'll find drivers or what's missing.
Maybe can help: when i reboot frequently cwm ask me if i want to fix root. It's normal?
Thanks you for your help.
Click to expand...
Click to collapse
That message is normal. Just a bug in CWM.
We need to find why you are bootlooping.
sbdags said:
That message is normal. Just a bug in CWM.
We need to find why you are bootlooping.
Click to expand...
Click to collapse
Ok, logcat is here.
Hope it can help.
aMachi said:
Ok, logcat is here.
Hope it can help.
Click to expand...
Click to collapse
OK You got some serious problems there. It would appear that your internal sdcard doesn't mount:
Code:
D/Vold ( 359): Volume sdcard state changing -1 (Initializing) -> 0 (No-Media)
D/Vold ( 359): *********** Success!! "ro.epad.mount_point.sdcard=/mnt/media_rw/sdcard"
D/Vold ( 359): Volume usbdrive state changing -1 (Initializing) -> 0 (No-Media)
D/Vold ( 359): *********** Success!! "ro.epad.mount_point.usbdrive=/mnt/media_rw/usbdrive"
I/Vold ( 359): opening the sysfs of TF701
E/Vold ( 359): lookupVolume usbdisk1 failed!
E/Vold ( 359): lookupVolume usbdisk2 failed!
E/Vold ( 359): lookupVolume sdreader failed!
D/Vold ( 359): checkUsbdisk sucess.
D/DirectVolume( 359): i:0 minor:48
D/Vold ( 359): Volume sdcard state changing 0 (No-Media) -> 2 (Pending)
D/DirectVolume( 359): i:1 minor:49
D/Vold ( 359): Volume sdcard state changing 2 (Pending) -> 1 (Idle-Unmounted)
@lj50036, @_that any suggestions for this one?
@aMachi - what is the SKU of your device? And you can restore a nandroid back to 4.3 and it works fine?
sbdags said:
OK You got some serious problems there. It would appear that your internal sdcard doesn't mount:
Code:
D/Vold ( 359): Volume sdcard state changing -1 (Initializing) -> 0 (No-Media)
D/Vold ( 359): *********** Success!! "ro.epad.mount_point.sdcard=/mnt/media_rw/sdcard"
D/Vold ( 359): Volume usbdrive state changing -1 (Initializing) -> 0 (No-Media)
D/Vold ( 359): *********** Success!! "ro.epad.mount_point.usbdrive=/mnt/media_rw/usbdrive"
I/Vold ( 359): opening the sysfs of TF701
E/Vold ( 359): lookupVolume usbdisk1 failed!
E/Vold ( 359): lookupVolume usbdisk2 failed!
E/Vold ( 359): lookupVolume sdreader failed!
D/Vold ( 359): checkUsbdisk sucess.
D/DirectVolume( 359): i:0 minor:48
D/Vold ( 359): Volume sdcard state changing 0 (No-Media) -> 2 (Pending)
D/DirectVolume( 359): i:1 minor:49
D/Vold ( 359): Volume sdcard state changing 2 (Pending) -> 1 (Idle-Unmounted)
@lj50036, @_that any suggestions for this one?
@aMachi - what is the SKU of your device? And you can restore a nandroid back to 4.3 and it works fine?
Click to expand...
Click to collapse
i've some problem to find the SKU code. I search on the box of the tablet but there are too many codes and i don't know what's the right. Can you give me an exemple of it?
Yes, i can restore to 4.3. In this right moment i'm writing with the tab with cromix 6. Everything seems to work fine.
In case like this you really know how much important is to do a backup..
aMachi said:
i've some problem to find the SKU code. I search on the box of the tablet but there are too many codes and i don't know what's the right. Can you give me an exemple of it?
Yes, i can restore to 4.3. In this right moment i'm writing with the tab with cromix 6. Everything seems to work fine.
In case like this you really know how much important is to do a backup..
Click to expand...
Click to collapse
SKU is just your country code - so if you have changed it it could be causing issues with the clean install.
US, WW, TW, CN, JP are the only 5 I know of.
So if you changed the bootloader from US to WW I heard another user reporting some issues.
But in your case I am at a loss as to how you can boot 4.3 but not 4.4.2 as you are apparently on a 4.4.2 compatible bootloader and recovery .......
sbdags said:
SKU is just your country code - so if you have changed it it could be causing issues with the clean install.
US, WW, TW, CN, JP are the only 5 I know of.
So if you changed the bootloader from US to WW I heard another user reporting some issues.
But in your case I am at a loss as to how you can boot 4.3 but not 4.4.2 as you are apparently on a 4.4.2 compatible bootloader and recovery .......
Click to expand...
Click to collapse
Ah, right, i understand. I am WW, and i use it in every installation that i've done on my eee pad, from the rooting process and the unlocking of bootloader to the change of the rom.
Now that i am on the previous version of your rom those are infos of kernel, firmware, ecc.
Android Version 4.3
Kernel Version 3.4.57-g47dbe4d [email protected]#1
Tue Dec 17 23.26.15 CST 2013
Build Number TF701T_CROMi-Xenogenesis-6.1-WW_DEODEX-ORIGINAL-10.26.1.18 020115_201310210002
In ROM Manager i can see that my Recovery still is the 6.0.5.0 version.
In bootloader i can see that it is "WW_epad-11.4.1.17-20140711"
Hope that this might be helpful and hope that i don't write anything of unsafe.
M.
aMachi said:
Ah, right, i understand. I am WW, and i use it in every installation that i've done on my eee pad, from the rooting process and the unlocking of bootloader to the change of the rom.
Now that i am on the previous version of your rom those are infos of kernel, firmware, ecc.
Android Version 4.3
Kernel Version 3.4.57-g47dbe4d [email protected]#1
Tue Dec 17 23.26.15 CST 2013
Build Number TF701T_CROMi-Xenogenesis-6.1-WW_DEODEX-ORIGINAL-10.26.1.18 020115_201310210002
In ROM Manager i can see that my Recovery still is the 6.0.5.0 version.
In bootloader i can see that it is "WW_epad-11.4.1.17-20140711"
Hope that this might be helpful and hope that i don't write anything of unsafe.
M.
Click to expand...
Click to collapse
NO that is expected but hat is not expected is why you can't boot 4.4.2. Let's wait for _that and lj50036 to cast their expert eyes over your issues.
sbdags said:
@lj50036, @_that any suggestions for this one?
Click to expand...
Click to collapse
This seems to be the core of the problem:
Code:
E/dalvikvm(13002): JNI posting fatal error: Native registration unable to find class 'com/android/internal/os/RuntimeInit'; aborting...
Check that the framework is correctly installed and the BOOTCLASSPATH is set correctly:
Code:
adb shell echo $BOOTCLASSPATH > bootclasspath.txt
adb shell ls -l /system/framework > framework.txt
_that said:
This seems to be the core of the problem:
Code:
E/dalvikvm(13002): JNI posting fatal error: Native registration unable to find class 'com/android/internal/os/RuntimeInit'; aborting...
Check that the framework is correctly installed and the BOOTCLASSPATH is set correctly:
Code:
adb shell echo $BOOTCLASSPATH > bootclasspath.txt
adb shell ls -l /system/framework > framework.txt
Click to expand...
Click to collapse
Ok, so maybe now i need some help.
I run adb in my pc then i type adb shell to run the remote shell interactively.
Then what i need to type?
Anyway if i type "ls -l /system/framework > framework.txt" the response is "No such file or directory"
Sorry for my n00b questions. Really hope to learn something here, and give a chance to reward everyone for the help.
aMachi said:
Ok, so maybe now i need some help.
I run adb in my pc then i type adb shell to run the remote shell interactively.
Then what i need to type?
Anyway if i type "ls -l /system/framework > framework.txt" the response is "No such file or directory"
Sorry for my n00b questions. Really hope to learn something here, and give a chance to reward everyone for the help.
Click to expand...
Click to collapse
The commands were supposed to be typed as is on your computer. However I think I missed to quote the "echo $BOOTCLASSPATH" - I want the bootclasspath of your device, not of your PC.
Anyway, if you type "adb shell" first and then "ls -l /system/framework" and you get back "No such file or directory" that's strange...
_that said:
The commands were supposed to be typed as is on your computer. However I think I missed to quote the "echo $BOOTCLASSPATH" - I want the bootclasspath of your device, not of your PC.
Anyway, if you type "adb shell" first and then "ls -l /system/framework" and you get back "No such file or directory" that's strange...
Click to expand...
Click to collapse
Ok so tomorrow i'll give you the result of this test. I hope that i learn how to right use this command.
Any other thing that i can do?
aMachi said:
Ok so tomorrow i'll give you the result of this test. I hope that i learn how to right use this command.
Any other thing that i can do?
Click to expand...
Click to collapse
Post screenshots of your cmd window so that they can see the actual input/output
berndblb said:
Post screenshots of your cmd window so that they can see the actual input/output
Click to expand...
Click to collapse
No need for a graphical screenshot - you can copy the text from the console window.

Stock checker zip (prepare for OTA) - Now with more Lollipop!

Here are some flashable zips I've created to check your system partition and optionally replace any files with their stock counterparts. This is particularly useful for preparing your phone for an OTA (when you get those annoying error messages that say "{APP} has unexpected contents"). You'll need to flash the zip for your specific version of Android. You can flash this as many times as you want and can flash the OTA directly after flashing this.
You need a custom recovery to flash these! For the Lollipop OTA, after flashing the correct check/fix zip, you will need to flash the stock recovery in order to install the OTA!
KTU84P to LRX21O
Just check your system files
Code:
File: system_check_hammerhead_lrx21o-from-ktu84p.zip
[url=http://goo.gl/ooEpTy]Google Drive[/url]
[url=http://goo.gl/HPxP9O]MEGA[/url]
MD5: 10e436b5d4042145b3789ee9b9fcecb5
Size: 267 kb
Check and fix your system files:
Code:
File: system_fixer_hammerhead_lrx21o-from-ktu84p.zip
[url=http://goo.gl/mFfusU]Google Drive[/url]
[URL=http://goo.gl/VA9tuo]MEGA[/URL]
MD5: 2ae0f21d76429538f4ae854da67f5857
Size: 153 mb
KTU84M to KTU84P
Just check your system files:
Code:
File: system_check_hammerhead_ktu84m.zip
[url=http://goo.gl/ESNUH0]Google Drive[/url]
[url=http://goo.gl/fYKyvn]MEGA[/url]
MD5: 79b54a842debb992d0ef03eb2d7bc661
Size: 192 kb
Check and fix your system files:
Code:
File: system_fixer_hammerhead_ktu84m.zip
[url=http://goo.gl/sZsjz4]Google Drive[/url]
[url=http://goo.gl/1z732L]MEGA[/url]
MD5: a80331b5406042e2212fa0fe3bfeaa30
Size: 244 mb
KOT49H to KTU84M
Code:
File: check_hammerhead_kot49h_system.zip
[url=http://goo.gl/xLlREk]Google Drive[/url]
[url=http://goo.gl/lNRLlk]MEGA[/url]
MD5: 3a810e0d67e2f7b17af947a9c46664ec
Size: 402 MB
If you want to check the updater-script that is in the zip file without downloading the whole thing, [url=http://pastebin.com/kUAimyYK]I've made a paste for easy access.[/url]
Standard disclaimer: I am not to be held responsible if this messes up your phone in any way. Make sure you have backed up your phone and have backups of your backups. I created it for myself and figured I'd share what I created to benefit others. Just because it works for me does not mean it will work for you. If an alien pops out of your phone or it suddenly implodes or you lose everything on it and have no backups is not my problem.
For those of you who are interested in how I generated this, you'll find the script I created to generate the file below.
System checker script (not for the faint of heart!):
If you want to run this to create the zip file yourself, you'll need a zip file of the system directory for the version you're upgrading from and the OTA zip. I'm sure there's a better way to do all this, but this is what my convoluted mind gave me...
Call the script as (2nd argument is optional) ${0} OTA.zip [system_files.zip]
Code:
#!/bin/bash
# This requires 1 argument: the update zip filename
# Also accepts 1 optional argument: system files zip filesname
update_zip=$1
if [ -z ${update_zip} ]; then
echo "Need to let me know the name of the ota zip file!"
exit 1
fi
extract_dir=/tmp/update_zip_check
update_dir="META-INF/com/google/android"
eval $(echo ${update_zip} | sed 's!\([^\.]*\)\.signed-\([^-]*\)-\([^-]*\)-from-\([^\.]*\).*!update_hash=\1\nhw_name=\2\nnew_ver=$(echo \3 | tr [A-Z] [a-z])\ncurr_ver=$(echo \4 | tr [A-Z] [a-z])!')
system_zip=${2:-$(ls system*${hw_name}*${curr_ver}.zip)}
fixer_zip="system_fixer_${hw_name}_${new_ver}-from-${curr_ver}.zip"
check_zip="system_check_${hw_name}_${new_ver}-from-${curr_ver}.zip"
echo -e "\n\n${update_hash}\n${hw_name}\n${new_ver}\n${curr_ver}\n${system_zip}\n${check_zip}"
sha1sum -c <<EOF
${update_hash} ${update_zip}
EOF
if [ $? != 0 ]; then
echo "${update_zip} doesn't match hash; please re-download"
exit 255
fi
[ -d "${extract_dir}" ] && rm -rf "${extract_dir}"
mkdir "${extract_dir}"
echo "Updating updater-script for checking and replacing files."
unzip -q -d "${extract_dir}" "${update_zip}" "${update_dir}/update-binary" "${update_dir}/updater-script"
# The following was the old way of updating files
#unzip -q "${system_zip}" $(grep -e 'mount' -e 'getprop' -e 'assert(apply_patch_check(' -e 'assert(apply_patch_space(' ${extract_dir}/${update_dir}/updater-script | sed 's|^assert(\(apply_patch_check("/\)\([^"]*\)\(.*")\));|ifelse(\1\2\3, "", (package_extract_file("\2", "/\2"); ui_print("\/\2")));|' | tee -i ${extract_dir}/${update_dir}/updater-script_check | grep -e 'ifelse' | sed 's|^ifelse(apply_patch_check("/system/\([^"]*\)".*|\1|') -d ${extract_dir}
unzip -q -d "${extract_dir}" "${system_zip}" $(grep -e 'mount' -e 'getprop' -e '^apply_patch_check(' -e '^apply_patch_space(' ${extract_dir}/${update_dir}/updater-script | sed 's!^\(apply_patch_.*\) || abort("\\"/system/\(.*\)\\" .*);$!\1 || (ui_print("Need to fix /system/\2"); package_extract_file("\2", "/system/\2"));!' | sed 's!^\(apply_patch_check.*\) || abort("\\"\(EMMC:/dev/block/platform/.*/by-name/boot\).*);$!\1 || (ui_print("Flash boot partition"); package_extract_file("boot.img", "\2"));!' | sed 's!abort!ui_print!' | tee -i ${extract_dir}/${update_dir}/updater-script_fixer | grep -e '^apply_patch_check("/' | sed 's!^apply_patch_check("/system/\([^"]*\)".*!\1!')
sed 's!; package_extract_file([^)]*)!!' ${extract_dir}/${update_dir}/updater-script_fixer >${extract_dir}/${update_dir}/updater-script_check
mv "${extract_dir}/${update_dir}/updater-script_fixer" "${extract_dir}/${update_dir}/updater-script"
cur_dir="$(/bin/pwd)"
cd "${extract_dir}"
echo "Now creating the zip file for flashing."
zip -qr "${cur_dir}/${fixer_zip}" *
mv "${extract_dir}/${update_dir}/updater-script_check" "${extract_dir}/${update_dir}/updater-script"
zip -qr "${cur_dir}/${check_zip}" META-INF
cd "${cur_dir}"
rm -rf "${extract_dir}"
echo 'Done! Please remember to backup any APKs you have replaced on the /system partition of your device; this file will replace with the stock version for your build.'
Clever and people will find this usefull.
Thanks
Very Nice, Thanks
You could also include checks for other partitions (boot, recovery...)
no fix option for KTU84P? or am I blind, cheers for the zips though
pedja1 said:
Very Nice, Thanks
You could also include checks for other partitions (boot, recovery...)
Click to expand...
Click to collapse
In the OTA checks and fixes, the zip checks everything the OTA does, which usually includes free space, modem, and kernel. The zip will alert you to these and, in the case of boot/kernel, it will install the stock kernel. You're on your own for the modem, though.
Natherul said:
no fix option for KTU84P? or am I blind, cheers for the zips though
Click to expand...
Click to collapse
Right now, that file would be HUGE since it would include every file in the system partition. I was planning on waiting for the OTA to drop to make one, but... Give me half an hour and I'll cook something up for you
Edit: I have added a new file that checks and fixes all KTU84P system files.
I have uploaded the new zips for the released OTA! Get them now!
KTU84P to LRX21O
Just check your system files
Code:
File: system_check_hammerhead_lrx21o-from-ktu84p.zip
[url=http://goo.gl/ooEpTy]Google Drive[/url]
[url=http://goo.gl/HPxP9O]MEGA[/url]
MD5: 10e436b5d4042145b3789ee9b9fcecb5
Size: 267 kb
Check and fix your system files:
Code:
File: system_fixer_hammerhead_lrx21o-from-ktu84p.zip
[url=http://goo.gl/mFfusU]Google Drive[/url]
[URL=http://goo.gl/VA9tuo]MEGA[/URL]
MD5: 2ae0f21d76429538f4ae854da67f5857
Size: 153 mb
I'm slightly confused by the red labels. I have version KTU84P and want to return it to stock so I can update using the OTA (when it's available). Which file should I download to ensure my files are stock again? (I would assume the files named KTU84P to Lxxxx would be the ones?)
Also, will this remove root at all so I would be able to simply download and install the OTA?
danaconda1 said:
I'm slightly confused by the red labels. I have version KTU84P and want to return it to stock so I can update using the OTA (when it's available). Which file should I download to ensure my files are stock again? (I would assume the files named KTU84P to Lxxxx would be the ones?)
Also, will this remove root at all so I would be able to simply download and install the OTA?
Click to expand...
Click to collapse
Yes, use the KTU84P to LRX21O to check/fix your KTU84P version. This will not remove root, it just checks the APKs and files that the OTA checks to make sure they're at the right version for patching.
crazycaveman said:
Yes, use the KTU84P to LRX21O to check/fix your KTU84P version. This will not remove root, it just checks the APKs and files that the OTA checks to make sure they're at the right version for patching.
Click to expand...
Click to collapse
Hi how to run that script on Windows?
Im trying to run adb sideload system_fixer_hammerhead_lrx21o-from-ktu84p.zip and Im getting error:
Veryfing update package....
E: footer is wrong
E: signature veryfication failed
Instalation aborted.
Any ideas?
Thanks,
K.
Please help me how to apply fix script.
Thanks,
K.
ikavior said:
Hi how to run that script on Windows?
Im trying to run adb sideload system_fixer_hammerhead_lrx21o-from-ktu84p.zip and Im getting error:
Veryfing update package....
E: footer is wrong
E: signature veryfication failed
Instalation aborted.
Any ideas?
Thanks,
K.
Click to expand...
Click to collapse
Sounds like you have stock recovery; these zip files are like custom ROMs and need a custom recovery (e.g. ClockworkMod, TWRP)
crazycaveman said:
Sounds like you have stock recovery; these zip files are like custom ROMs and need a custom recovery (e.g. ClockworkMod, TWRP)
Click to expand...
Click to collapse
So I cant fix thish without wipe my data ?
ikavior said:
So I cant fix thish without wipe my data ?
Click to expand...
Click to collapse
If your bootloader is locked, that is correct. However, if you are getting an "unexpected contents" error when flashing the OTA and are rooted, you can extract this zip file and replace the file(s) manually with the stock version.
ikavior said:
So I cant fix thish without wipe my data ?
Click to expand...
Click to collapse
Actually, on 4.4 you could root with Towelroot and unlock ur bootloader without wiping.
Script error
So I am getting an error that the script (and the OTA.zip) says the script expects that my device should have 4.4.4/KTU84P/1227136 or 5.0/LRX21O/1570415 release keys but my device has 4.4/KRT16M/893803 release keys. However when looking at device status my device says the following:
-Device Version 4.4.4
-Baseband Version M897A-2.0.50.1.16
-Kernel Version 3.4.0-gd59db4e [email protected] #1
-Build Number KTU84P
I'm in the same situation, the checker and supposed fixer both produce the same message as above. I tried un-rooting and reflashing both zips (I'm on stock recovery but using fastboot to boot into CWM - efrant's old way for the Galaxy Nexus, worked with SuperSu so far) but the message persists.
pauleyc said:
I'm in the same situation, the checker and supposed fixer both produce the same message as above. I tried un-rooting and reflashing both zips (I'm on stock recovery but using fastboot to boot into CWM - efrant's old way for the Galaxy Nexus, worked with SuperSu so far) but the message persists.
Click to expand...
Click to collapse
Instead of using CWM to flash the OTA update, try sideloading the update using the stock recovery. Something has changed with the lollipop update, and it doesn't seem like TWRP or CWM can flash it (at least I haven't been able to do it).
Sent from my Nexus 5 using Tapatalk
Remind me where I can get the stock recovery?
Sent from my Nexus 5 using XDA Free mobile app
efrant said:
Instead of using CWM to flash the OTA update, try sideloading the update using the stock recovery. Something has changed with the lollipop update, and it doesn't seem like TWRP or CWM can flash it (at least I haven't been able to do it).
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
To be honest, "nothing" changed, only that now it reads kitkat's kernel properties instead of the build.prop file directly. As I posted in the help-desk:
RusherDude said:
The fun part is that this is a bug that I saw loong ago coming.. I don't why recoveries can't STILL access android kitkat kernel properties, but they work ok reading the file, so the OTA 4.4.4 worked fine, that tries:
file_getprop("/system/build.prop", "ro.build.fingerprint") == "google/hammerhead/hammerhead:4.4.3/KTU84M/1158763:user/release-keys" ||
file_getprop("/system/build.prop", "ro.build.fingerprint") == "google/hammerhead/hammerhead:4.4.4/KTU84P/1227136:user/release-keys" ||
abort("Package expects build fingerprint of google/hammerhead/hammerhead:4.4.3/KTU84M/1158763:user/release-keys or google/hammerhead/hammerhead:4.4.4/KTU84P/1227136:user/release-keys; this device has " + getprop("ro.build.fingerprint") + ".");
Which works OK, tho if you notice the error case, the description would fail because it uses getprop...
NOW on 5.0 they use the same getprop for both cases, and fail:
getprop("ro.build.fingerprint") == "google/hammerhead/hammerhead:4.4.4/KTU84P/1227136:user/release-keys" ||
getprop("ro.build.fingerprint") == "google/hammerhead/hammerhead:5.0/LRX21O/1570415:user/release-keys" ||
abort("Package expects build fingerprint of google/hammerhead/hammerhead:4.4.4/KTU84P/1227136:user/release-keys or google/hammerhead/hammerhead:5.0/LRX21O/1570415:user/release-keys; this device has " + getprop("ro.build.fingerprint") + ".");
So modifying the update scripts its a simple solutions (tho It changes the file signature and so, and it's official OTA so no way..).
Click to expand...
Click to collapse
This is a custom recoveries bug from 2013 when Kit Kat came out, still unsolved and if they don't do something we will need to flash stock recovery and stuff every OTA from now on.
I didn't understand - does the fixer flashes a new recovery? (currently can't download the zip file to check if there is any recovery img inside.. )

[RECOVERY][UNOFFICIAL][US997/H870][rel_o2/rel_t2][2018-06-08] Melina TWRP v3.2.1

This recovery has been superseded by Eliminater74's TWRP.
This post and its files remain for archival purposes.
-- Old OP --
Note: I no longer own this device. To help test, join my Testing Discord (Please read the rules presented when you join.)
Note: There is a known bug with restoring backups. If you need to use the backup/restore features, please do not use Melina TWRP until rel_o3 is released, which has no eta.
The following releases are unofficial and will always be due to dirty edits.
However, it offers the following features over the official release:
Oreo Only Features:
Integrated Melina Kernel (rel_o2) into TWRP build system (rel_o2 or newer)
Oreo kernel (nougat kernel cannot mount unencrypted /data for some reason) (rel_o1 or newer)
Disabled encryption (rel_o1 or newer) (Note: LGE uses forceencryption now, and also has a script to replace your custom recovery with their own. Please flash my anti-root removal tool, which will remove rctd, forceencrypt, and the anti-custom-recovery script)
Nougat/Oreo Features:
Integrated Melina Kernel (rel_nr2) into TWRP build system (rel_t2 or newer)
Integrated uber-toolchain 6.x for kernel compilation into TWRP build system (rel_t2 or newer)
Stability and performance increases over rel3 (rel_t1 or newer)
/vendor partition support (if you have not repartitioned, which at the time of this release, 99% of you haven't, then you may get an error in TWRP regarding mounting storage. This is safe to ignore) (rel_t1 or newer)
/misc bootloop fix (rel_t1 or newer)
Date and time fix (msm8996 workaround) (mixed reports, but works for me on US997 with Stock and Fulmics ROMs, see this post for more information)
Option to wipe LG lockscreen security settings when restoring data partition (workaround for known issue where sometimes you get locked out of restored stock ROMs)
NTFS support (untested, should allow NTFS USB-OTG for restoring backups and flashing zips, read-only)
SD-Ext support (including backing up and restoring, both ext4 and F2FS supported thanks to Melina)
Purple theme, because purple is cool
Based on J0SH1X's work.
Downloads (bold is current):
Oreo
rel_o2
US997
H870
rel_o1
US997
H870
Nougat
rel_t2
US997
H870
rel_t1
US997 (old)
H870 (old)
rel3
US997 (old)
H870 (old)
rel2
US997 (old)
H870 (old)
Usage:
Unzip file and flash recovery.img
Please keep in mind I only have the US997 so help test this for H870!
Current Known issues:
Restoring backups does not work, due to tar process terminating with error 255.
You must format data when coming from a stock ROM due to LG using forceencrypt.
Fixed issues:
Disabled encryption (fixed in rel_o1)
E:Unhandled flag: 'removeable' (fixed in rel_t2)
Slow SDCard Performance (fixed in rel_t1)
MTP reliability (fixed in rel_t1)
GPL (dev info):
Read the readme on the github.
If my releases help you, please leave a thanks. If you are able, please consider a tip (check the small link in my sig).
Prompt for password to decrypt data
I installed the 3.2.1 version by flashing the img from the older 3.1.1 version.
When I rebooted to recovery, it prompted me for a password to decrypt the data. I don't remember encrypting the data and I do not know the password. I was able to tap cancel and get to the main TWRP screen.
Should I be worried about this?
DonS said:
I installed the 3.2.1 version by flashing the img from the older 3.1.1 version.
When I rebooted to recovery, it prompted me for a password to decrypt the data. I don't remember encrypting the data and I do not know the password. I was able to tap cancel and get to the main TWRP screen.
Should I be worried about this?
Click to expand...
Click to collapse
That is strange, I don't use encryption and never had that. I guess if the data was accessible after hitting cancel, I wouldn't worry about it. Which device?
I have the US997 version.
I didn't try flashing anything from TWRP, I just booted to make sure it showed the new version number. I rebooted to the system and everything is working fine.
DonS said:
I have the US997 version.
I didn't try flashing anything from TWRP, I just booted to make sure it showed the new version number. I rebooted to the system and everything is working fine.
Click to expand...
Click to collapse
Try flashing the img through fastboot as per normal rather than through TWRP, then when you reboot into recovery, regardless if you get the message or not, go to the backup menu and be sure Data has more than (0 MB) next to it on the list.
Oh, also, the old 3.1.1 (the one I didn't make) had an issue where if you used "Format Data" (with yes option) it actually created a corrupt file system, so that could be it as well. To fix that, execute the following under adb shell:
umount /dev/block/sda19
e2fsck -f /dev/block/sda19
(Select y for yes to repair if prompted)
Then reboot recovery and try again. You shouldn't lose data using these commands. However, if it does find and repair errors, it is not out of the question, but is something you'll want to address.
@zefie flashed the H870 build (flashed the img trough official TWRP), no password, data in backup is 8893MB, time is working fine, if you have other things to check just tell me.
BTW no purple theme, don't know why
Killua96 said:
@zefie flashed the H870 build (flashed the img trough official TWRP), no password, data in backup is 8893MB, time is working fine, if you have other things to check just tell me.
BTW no purple theme, don't know why
Click to expand...
Click to collapse
Probably just the header, is the slider purple?
Edit: nevermind, I know why, didn't define my theme in the h870 config. Rebuilding.
Edit 2: Fix should be up. Also updated US997 since this is Melina rel6 now (previous release used a pre-release version of rel6)
hello and thank you for this
anyway, I wanted to flash it under twrp as an image
it asks me :
"select partition to flash image"
-boot
-recovery
-system image
-modem
-persist
also is it ok to flash this with Fulmics ROM?
dave_id said:
hello and thank you for this
anyway, I wanted to flash it under twrp as an image
it asks me :
"select partition to flash image"
-boot
-recovery
-system image
-modem
-persist
also is it ok to flash this with Fulmics ROM?
Click to expand...
Click to collapse
It's a recovery, so you need to choose "recovery".
Also is fine with Fulmics, i've tested it on H870
just wanted to be sure, so THANKS!
zefie said:
Try flashing the img through fastboot as per normal rather than through TWRP, then when you reboot into recovery, regardless if you get the message or not, go to the backup menu and be sure Data has more than (0 MB) next to it on the list.
Oh, also, the old 3.1.1 (the one I didn't make) had an issue where if you used "Format Data" (with yes option) it actually created a corrupt file system, so that could be it as well. To fix that, execute the following under adb shell:
umount /dev/block/sda19
e2fsck -f /dev/block/sda19
(Select y for yes to repair if prompted)
Then reboot recovery and try again. You shouldn't lose data using these commands. However, if it does find and repair errors, it is not out of the question, but is something you'll want to address.
Click to expand...
Click to collapse
I flashed from fastboot instead of TWRP and I get the same thing. I get prompted for a password to decrypt data. I flashed the old 3.1.1 TWRP and I don't get that error. If I go into backup with TWRP 3.2.1 data shows 0 MB. With 3.1.1 it shows the actual size.
I rebooted to the system and connected a USB cable and went into a ADB shell. the first command returns an error. I thought your first command had a typo and you mean unmount instead of umount. I'll paste the error below.
C:\ADB>adb shell
lucye:/ $ umount /dev/block/sda19
umount /dev/block/sda19
umount: bad /etc/fstab: No such file or directory
1|lucye:/ $ unmount /dev/block/sda19
unmount /dev/block/sda19
/system/bin/sh: unmount: not found
127|lucye:/ $
DonS said:
I flashed from fastboot instead of TWRP and I get the same thing. I get prompted for a password to decrypt data. I flashed the old 3.1.1 TWRP and I don't get that error. If I go into backup with TWRP 3.2.1 data shows 0 MB. With 3.1.1 it shows the actual size.
I rebooted to the system and connected a USB cable and went into a ADB shell. the first command returns an error. I thought your first command had a typo and you mean unmount instead of umount. I'll paste the error below.
C:\ADB>adb shell
lucye:/ $ umount /dev/block/sda19
umount /dev/block/sda19
umount: bad /etc/fstab: No such file or directory
1|lucye:/ $ unmount /dev/block/sda19
unmount /dev/block/sda19
/system/bin/sh: unmount: not found
127|lucye:/ $
Click to expand...
Click to collapse
The error is because it's not mounted at all (since it sees 0 MB), so just skip to the second command.
zefie said:
The error is because it's not mounted at all (since it sees 0 MB), so just skip to the second command.
Click to expand...
Click to collapse
Here is what I get when running the second command:
C:\ADB>adb shell
lucye:/ $ e2fsck -f /dev/block/sda19
e2fsck -f /dev/block/sda19
/system/bin/sh: e2fsck: can't execute: Permission denied
126|lucye:/ $
I have gone back to TWRP 3.1.1 and in the backup screen it does show the proper size for the data volume.
DonS said:
Here is what I get when running the second command:
C:\ADB>adb shell
lucye:/ $ e2fsck -f /dev/block/sda19
e2fsck -f /dev/block/sda19
/system/bin/sh: e2fsck: can't execute: Permission denied
126|lucye:/ $
I have gone back to TWRP 3.1.1 and in the backup screen it does show the proper size for the data volume.
Click to expand...
Click to collapse
Run it in either TWRP, not under Android.
zefie said:
Run it in either TWRP, not under Android.
Click to expand...
Click to collapse
OK, here are the results from TWRP 3.1.1 terminal
umount /dev/block/sda19 returns an error
umount: can't umount /dev/block/sda19: invalid argument
e2fsck -f /dev/block/sda19 returns an error:
/dev/block/sda19 is in use.
e2fsck: cannot continue, aborting.
DonS said:
OK, here are the results from TWRP 3.1.1 terminal
umount /dev/block/sda19 returns an error
umount: can't umount /dev/block/sda19: invalid argument
e2fsck -f /dev/block/sda19 returns an error:
/dev/block/sda19 is in use.
e2fsck: cannot continue, aborting.
Click to expand...
Click to collapse
Invalid argument should not happen. Personally I'd make a back and reformat data. You say everything works but it's only a matter of time before the corruption catches you off guard. You could try the two commands on my TWRP, but if it's still saying invalid argument, back up and reformat. (With yes screen format option not just wipe data)
Thank you so much for your work. It is the only version which is working on mine.
@zefie is it somehow possible to convert ext4 to f2fs without loosing data?
Thanks for your strike work! [emoji4]
Gesendet von meinem LG-H870 mit Tapatalk
saenta said:
@zefie is it somehow possible to convert ext4 to f2fs without loosing data?
Thanks for your strike work! [emoji4]
Gesendet von meinem LG-H870 mit Tapatalk
Click to expand...
Click to collapse
Not conventionally. You could let TWRP back up sd-ext while ext4, and reformat it f2fs, but if you try to restore it in the TWRP GUI I think it'll format it back to the original format. That said, you could then manually extract the twrp backup files (they are just tar files, so something like tar -C /sd-ext -xf /path/to/sd-ext.ext4.win000 or whatever.) Extract them in numerical order.
If you are talking about built-in partitions like /data or /cache, don't do it, as ROMs have to be configured specifically to support f2fs, so it wouldn't work anyway.
bump for rel3
New Features:
Updated and Integrated Melina Kernel (rel7) into TWRP build system
Option to wipe LG lockscreen security settings when restoring data partition (workaround for known issue where sometimes you get locked out)

flash recovery partition from android system/userland

I'm having trouble with fastboot (see my thread here: https://forum.xda-developers.com/xperia-xz1-compact/help/issues-fastboot-t3971227, maybe you can help). However, I can seem to flash sony signed software in sony-service mode using newflasher. That's nice, but I haven't used stock android in years. I am very used to lineageos without gapps---nice and clean. So, for me, until I get rid of stock and get a clean flash of lineage, I'm really not happy.
Given my state of affairs, I'm wondering about flashing one of the exploitable sony stocks and to get root, then flashing the recovery partition with twrp from userland. Then, potentially, i could boot to that recovery and maybe (idk) flash a new system ROM. Does anyone have any tips or suggestions?
It should work as you outlined.
Still having BL unlocked and not usable fastboot seems like a major disadvantage to me.
Did you try with different PC to see if it is not due to usb chipset or something?
Preferably using usb 2.0 only chipset?
Maybe trying that from different OSes too - linux vs win?
Thanks for the reply. I got the exploitable firmware downloaded and flashed as well as your renosploit kit. Hasn't found a root shell yet although I'm hopeful it will eventually (I haven't read the details but I understand that the underlying vuln is a race condition).
One question: I suppose that given that tmp root status, it should be possible to copy a su binary over and make root permanent, that would make experimentation easier, I think. And if whatever I try fails the first time I wouldn't want to have to wait for the race condition exploit every time I wanted to reboot. Am I on the right track? If so, I suppose I need to either compile or download a su binary and possibly a supersu.apk in order to manage it. Are those already available for the xz1 compact?
@apexofservice, planting su binary is possible into /oem for example, it would switch the user to root, but without any better permissions, due to selinux, so it is useless.
But since you have your BL unlocked, you do not need that. As soon as you have twrp, you can flash magisk to have root on runtime easily. Or just enter twrp to have root in recovery.
j4nn said:
@apexofservice, planting su binary is possible into /oem for example, it would switch the user to root, but without any better permissions, due to selinux, so it is useless.
But since you have your BL unlocked, you do not need that. As soon as you have twrp, you can flash magisk to have root on runtime easily. Or just enter twrp to have root in recovery.
Click to expand...
Click to collapse
Got it. Thank you for this detail. So you think my best bet is to just use the root shell to `dd` the twrp image directly to some /dev? And then I would just `adb reboot recovery` and in theory I'm good to go.
Cool. I got a root shell with your exploit kit. I've got two questions at this point.
1) If my bootloader unlock had fully succeeded, would I have expected to find all 0x0 in the TA partition? In fact, there is data in there, so I went ahead and downloaded it. I skimmed the data with xxd and there are some sections of 0x0 as well though.
2) Second question, I've read that xperia's don't have a proper "recovery" partition the way some other boards do. So is FOTAkernel actually where I want to write twrp.img? Also, it would seem that this info is actually encoded somewhere in the fastboot client since on a working fastboot, you can just say "flash recovery" and it knows what part of the disk to write to. Any info about partition layouts on lilac and xperia's in general would be greatly appreciated.
apexofservice said:
Cool. I got a root shell with your exploit kit. I've got two questions at this point.
1) If my bootloader unlock had fully succeeded, would I have expected to find all 0x0 in the TA partition? In fact, there is data in there, so I went ahead and downloaded it. I skimmed the data with xxd and there are some sections of 0x0 as well though.
2) Second question, I've read that xperia's don't have a proper "recovery" partition the way some other boards do. So is FOTAkernel actually where I want to write twrp.img? Also, it would seem that this info is actually encoded somewhere in the fastboot client since on a working fastboot, you can just say "flash recovery" and it knows what part of the disk to write to. Any info about partition layouts on lilac and xperia's in general would be greatly appreciated.
Click to expand...
Click to collapse
1 - The TA partition contains significant amounts of other information as well. So it won't be empty.
The standard way of dealing with it is to not mess with it at all.
2 - The FOTAkernel is the recovery.
2a - The partition layout can be found from the stock firmware image in the "partition-image-LUNZ_X-FLASH-ALL-C93B.sin" file where "Z" is the LUN number. Once you extract the SIN file, you're left with an EFI partition header.
I've attached a CSV file that contains the layout as specified in the "partition-image-LUN0_X-FLASH-ALL-C93B.sin" file.
The layout for LUNs 1 and 2 both contain a single 4MB partition for "xbl" and "xblbak" respectively, so they're not as interesting.
@pbarrette, thanks! I tried the naive approach:
Code:
d if=twrp-3.2.1-0-lilac-10-patchlevel-2018-05-05.img of=/dev/block/bootdevice/by-name/FOTAKernel <
60128+0 records in
60128+0 records out
30785536 bytes transferred in 2.100 secs (14659779 bytes/sec)
G8441:/data/local/tmp # sync
G8441:/data/local/tmp # sync
G8441:/data/local/tmp # reboot recovery
Alas, it just rebooted back to system. It did seem to take a bit longer, so it's possible that it tried to boot from FOTAKernel and failed then fell back to system. I've just got a new root shell so I can look in startup logs from dmesg to see if there's anything of interest.
Also, I'm probably missing something really obvious. Thanks for any insight!
Reading dmesg now, this seems quite relevant (I recall booting to recovery on my z3 compact by touching a file in /cache/recovery). I'll post it here but I'm still reading the dmesg.
Code:
[ 7.406109] bs_roots: recovery filesystem table
[ 7.406120] bs_roots: =========================
[ 7.406125] bs_roots: 0 /data ext4 /dev/block/bootdevice/by-name/userdata
[ 7.406130] bs_roots: 1 /oem ext4 /dev/block/bootdevice/by-name/oem
[ 7.406134] bs_roots: 2 /cache ext4 /dev/block/bootdevice/by-name/cache
[ 7.406139] bs_roots: 3 /rca ext4 /dev/block/bootdevice/by-name/appslog
[ 7.406143] bs_roots: 4 /idd ext4 /dev/block/bootdevice/by-name/diag
[ 7.406148] bs_roots: 5 /storage/sdcard1 vfat /devices/soc/c0a4900.sdhci/mmc_host*
[ 7.406153] bs_roots: 6 none swap /dev/block/zram0
[ 7.406157] bs_roots: 7 /persistent emmc /dev/block/bootdevice/by-name/frp
[ 7.406162] bs_roots: 8 /misc emmc /dev/block/bootdevice/by-name/misc
[ 7.406167] bs_roots: 9 /firmware vfat /dev/block/bootdevice/by-name/modem
[ 7.406172] bs_roots: 10 /bt_firmware vfat /dev/block/bootdevice/by-name/bluetooth
[ 7.406177] bs_roots: 11 /dsp ext4 /dev/block/bootdevice/by-name/dsp
[ 7.406182] bs_roots: 12 /persist ext4 /dev/block/bootdevice/by-name/persist
[ 7.406187] bs_roots: 13 /boot/modem_fs1 emmc /dev/block/bootdevice/by-name/modemst1
[ 7.406191] bs_roots: 14 /boot/modem_fs2 emmc /dev/block/bootdevice/by-name/modemst2
[ 7.406195] bs_roots: 15 auto auto /devices/soc/a800000.ssusb/a800000.dwc3/xhci-hcd.0.auto/usb*
[ 7.406199] bs_roots: 16 /qns ext4 /dev/block/bootdevice/by-name/Qnovo
[ 7.406203] bs_roots: 17 /tmp ramdisk ramdisk
[ 7.406206] bs_roots:
[ 7.408585] MR: Mounting /cache ourselves
[ 7.412318] EXT4-fs (sda53): recovery complete
[ 7.412666] EXT4-fs (sda53): mounted filesystem with ordered data mode. Opts:
[ 7.413213] MR: fopen() failed -/cache/recovery/command (No such file or directory)
[ 7.413219] MR: Unmounting /cache
[ 7.413959] MR: Fail to get command from /cache/recovery/command, trying /misc
[ 7.414272] MR: Unknown wipe command
[ 7.414280] MR: Buffer is empty from /dev/block/bootdevice/by-name/misc with command 0
[ 7.417568] MR: TA_MASTER_RESET value = 0
[ 7.418475] init: Service 'exec 3 (/sbin/mr)' (pid 605) exited with status 0 waiting took 0.022997 se
conds
[ 7.418513] init: starting service 'exec 4 (/sbin/ffu)'...
[ 7.418846] init: SVC_EXEC pid 609 (uid 0 gid 0+0 context u:r:recovery:s0) started; waiting...
[ 7.419833] init: Service 'exec 4 (/sbin/ffu)' (pid 609) exited with status 255 waiting took 0.001316
seconds
------
One more update, I did a sanity check that that dd command is actually overwriting FOTAkernel. It doesn't look like it's working:
Code:
G8441:/data/local/tmp # dd if=/dev/block/bootdevice/by-name/FOTAKernel of=FOTAKernel-extracted.img
131072+0 records in
131072+0 records out
67108864 bytes transferred in 0.812 secs (82646384 bytes/sec)
G8441:/data/local/tmp # chown shell:shell FOTAKernel-extracted.img
G8441:/data/local/tmp # dd if=twrp-3.2.1-0-lilac-10-patchlevel-2018-05-05.img of=/dev/block/bootdevice/by-name/FOTAKernel
60128+0 records in
60128+0 records out
30785536 bytes transferred in 2.037 secs (15113174 bytes/sec)
G8441:/data/local/tmp # sync
G8441:/data/local/tmp # sync
=/dev/block/bootdevice/by-name/FOTAKernel of=FOTAKernel-extracted-2.img <
131072+0 records in
131072+0 records out
67108864 bytes transferred in 0.846 secs (79324898 bytes/sec)
And there's no `diff` on the device, so I pulled the files back to a laptop then:
Code:
$ diff FOTAKernel-extracted-2.img FOTAKernel-extracted.img
$ diff FOTAKernel-extracted.img twrp-3.2.1-0-lilac-10-patchlevel-2018-05-05.img
Binary files FOTAKernel-extracted.img and twrp-3.2.1-0-lilac-10-patchlevel-2018-05-05.img differ
@j4nn @pbarrette doing some more reading, I found some interesting details about booting to recovery stored on FOTAKernel here:
https://twrp.me/sony/sonyxperiaxz.html
https://twrp.me/sony/sonyxperiaz3compact.html
Looks like you really need a kernel that has the ramdisk extraction setup. So I'm guessing that once I figure out why dd isn''t working as I expected (see above) that I need to overwrite the main stock kernel with an alternative.
Yes, a dd extraction of the partition will be different than the TWRP image.
That's because the TWRP image is only ~35MB, while "dd" is extracting the entire 64MB partition.
So, if you do a visual diff on the files, you should see that what's actually different is the fact that the partition extraction is filled with zeros after the end of the TWRP image.
You're doing a "reboot recovery", but have you tried:
1 - Turn the phone off
2 - Press and hold [Vol-Down].
3 - Press and hold [Power].
4 - Release [Power] at power on.
5 - Release [Vol-Down] when you see an actual boot screen (after the bootloader unlocked screen).
I don't remember the "reboot recovery" command ever working right for me.
Edit to add: That's also a really old version of TWRP that you seem to be using.
pbarrette said:
Yes, a dd extraction of the partition will be different than the TWRP image.
That's because the TWRP image is only ~35MB, while "dd" is extracting the entire 64MB partition.
So, if you do a visual diff on the files, you should see that what's actually different is the fact that the partition extraction is filled with zeros after the end of the TWRP image.
You're doing a "reboot recovery", but have you tried:
1 - Turn the phone off
2 - Press and hold [Vol-Down].
3 - Press and hold [Power].
4 - Release [Power] at power on.
5 - Release [Vol-Down] when you see an actual boot screen (after the bootloader unlocked screen).
I don't remember the "reboot recovery" command ever working right for me.
Edit to add: That's also a really old version of TWRP that you seem to be using.
Click to expand...
Click to collapse
Hot damn. Thanks, I'm booted to twrp!
Note: i was using the older version for android 8 since I'm currently on the android 8 exploitable rom!
apexofservice said:
@j4nn @pbarrette doing some more reading, I found some interesting details about booting to recovery stored on FOTAKernel here:
https://twrp.me/sony/sonyxperiaxz.html
https://twrp.me/sony/sonyxperiaz3compact.html
Looks like you really need a kernel that has the ramdisk extraction setup. So I'm guessing that once I figure out why dd isn''t working as I expected (see above) that I need to overwrite the main stock kernel with an alternative.
Click to expand...
Click to collapse
XZ1 compact never needed the recovery with this extraction stuff. But according to
https://twrp.me/sony/sonyxperiaxzpremium.html
XZ Premium (which is also yoshino platform, the same as xz1c is) seems to need that - but I am not sure if it is still valid.
It might got fixed even in xzp case with some bootloader update to have it working the same as with other yoshino phones.
Sorry for my late answer, it's good you already have it working.
But I still wonder about that usb problem with fastboot - have you tried a different pc with different usb controller, preferably usb 2.0 type (not 3.0 one)?
j4nn said:
XZ1 compact never needed the recovery with this extraction stuff. But according to
https://twrp.me/sony/sonyxperiaxzpremium.html
XZ Premium (which is also yoshino platform, the same as xz1c is) seems to need that - but I am not sure if it is still valid.
It might got fixed even in xzp case with some bootloader update to have it working the same as with other yoshino phones.
Sorry for my late answer, it's good you already have it working.
But I still wonder about that usb problem with fastboot - have you tried a different pc with different usb controller, preferably usb 2.0 type (not 3.0 one)?
Click to expand...
Click to collapse
I haven't yet. Well, I have sorta. When I first ran into issues, I tried it with a different laptop, got the same result. Now that laptop was also a thinkpad (although a newer model) and was also running debian linux. I don't have any computers with Windows. I was going to reboot this laptop with usb3.0 kernel mod blacklisted and only using hci but I didn't get around to it yet (especially once I got twrp flashed and working, then I mainly wanted to get started actually using the phone i bought ). However, if it were a usb thing, wouldn't we expect that newflasher would fail too? Still, it is very curious about the fastboot thing, however, so I'm willing to keep playing with it.
@apexofservice, I am not sure if blacklisting usb3 drivers would help. Sometime there may be present multiple usb ports, some connected to usb 3.0 host controller, others just usb 2.0 controller.
Even if newflasher works, it is not that simple, that fastboot should work too.
Fastboot (including it's usb support) is implemented in UEFI bootloader, the ABL component of it (Android Boot Loader).
So usb stack is implemented by UEFI fw.
While newflasher uses flash mode, which is running XFL - a linux (bare bone android) kernel, running the lilo/loader userspace application. So there is in my opinion quite good usb stack implemented by linux kernel.
So it can easily be some incompatibility within UEFI usb stack implementation used with fastboot.

How To Guide How to "fix" the error Cannot load Android system. Your data may be corrupt.

If a serious error occurs when booting Android, Android boots the phone from the recovery installed on the phone. The standard Android recovery then aborts the boot process with an error message similar to this one:
Cannot load Android system. Your data may be corrupt.
and the only options to continue are "Try again" or "Factory data reset".
The error message is not really useful and most documentation on the Internet that I found recommends a factory reset to fix the problem. In most cases, factory reset works, but it has the disadvantage that you lose all the settings and data on the phone. So in most cases this is the worst option.
However, if the error is not caused by an invalid or missing file in the partitions for /data or /metadata, resetting to factory defaults will not fix the problem, but the data from the phone will still be gone.
Therefor I wrote this little HowTo.
This HowTo is not about how to fix that error -- it only contains some hints to find the reason for the error.
To get more information about the error and also the possibility to backup the phone's data, TWRP can be used:
Just poweroff the phone, reboot the phone into the bootloader, and then reboot the phone from the TWRP image, e.g:
Bash:
sudo fastboot boot /data/backup/ASUS_ZENFONE8/twrp/twrp-3.7.0_12-0-I006D-enhanced.img
Note:
In most cases, there is no option to turn off the phone in this dialog, so the phone must be turned off using the phone keys.
The key combination to turn off the phone during this dialog depends on the phone; on an ASUS Zenfone 8, this key combination must be used:
Press Volume UP + Volume DOWN + Power for 20 or more seconds
After the phone booted into the TWRP image connect via adb to the phone and check the TWRP logfile for a more detailed error message. The logile used by TWRP is /data/recovery/log.gz. Search for the string "Android Rescue Party trigger" in the TWRP logfile.
Note:
/data/recovery/log.gz is a compressed file ; use gzip to uncompress it.
Example:
Code:
ASUS_I006D:/ # gzip -cd /data/recovery/log.gz | more
Starting TWRP 3.7.0_12-0-d07fdb3c on Sat Jan 10 00:53:15 1970
(pid 403)
I:Lun file '/config/usb_gadget/g1/functions/mass_storage.0/lun.0/file'
PRODUCT_USE_DYNAMIC_PARTITIONS := true
TW_INCLUDE_CRYPTO := true
I:TW_BRIGHTNESS_PATH := /proc/lcd_brightness
I:Found brightness file at '/proc/lcd_brightness'
I:TWFunc::Set_Brightness: Setting brightness control to 420
I:TW_EXCLUDE_ENCRYPTED_BACKUPS := true
I:LANG: en
I:AB_OTA_UPDATER := true
Starting the UI...
Skipping adf graphics -- not present in build tree
setting DRM_FORMAT_XBGR8888 and GGL_PIXEL_FORMAT_RGBA_8888
setting DRM_FORMAT_XBGR8888 and GGL_PIXEL_FORMAT_RGBA_8888
....
I:Switching packages (TWRP)
boot command: boot-recovery
I:Startup Commands:
Android Rescue Party trigger! Possible solutions? Either:
1. Wipe caches, and/or
2. Format data, and/or
3. Clean-flash your ROM.
The reported problem is:
'--reason=set_policy_failed:/data/misc'
'--reason=set_policy_failed:/data/misc'
ro.boot.bootreason=shutdown
ro.boot.id.rf=1
If the error message is still not helpful in finding the reason for the error, try a Google search.
And if a factory reset is necessary, you can at least back up your data on the phone before performing the reset.
More infos about Android Rescue Party Trigger
The Android Rescue Party Trigger is an error handling process from Android (see here for more details about this Android functionality)
Android Rescue Party Trigger can also be triggered by Android while the OS is running :
In this case there should be some additional messages in the logfile /data/system/uiderrors.txt.
In addition, and if Magisk is installed, it might be useful to write the logcat messages to a file using the script from this post:
https://gist.github.com/niikoo/3f6bd13a69f2d68f3dd51cc667e79bdc
File: /data/adb/post-fs-data.d/0001logcatboot
Code:
#!/system/bin/sh
mkdir -p /cache/logs
/system/bin/logcat -r 1024 -n 9 -v threadtime -f /cache/logs/log >info.log 2>err.log &
The script can also be "installed" after the error already occured, to do this:
Boot the phone from the TWRP image; copy the script to the directory /data/adb/post-fs-data.d; make it executable and reboot the phone again from the installed OS to trigger the error again.
Note that logcat is not yet running if the error occurs in the early boot phase.
Caution:
If possible, TWRP will mount /data into the partition used for /data in the Android OS. Therefore, you can view the recovery boot logs in /data/recovery even after restarting the Android operating system as the user root.
However, if mounting the partition for /data in TWRP does not work, /data will be a directory in the root file system, e.g.:
Code:
130|ASUS_I006D:/ # df -h /data
Filesystem Size Used Avail Use% Mounted on
rootfs 3.2G 101M 3.1G 4% /
ASUS_I006D:/ #
In this case the contents of /data/reocvery are lost after rebooting the phone!
Notes:
The Android kernel uses the device /dev/block/by-name/misc to store the kernel parameter for the recovery kernel. The kernel from the recovery TWRP will clean the device /dev/block/by-name/misc . Therefor the error message is only visible in the logs of the first boot of TWRP.
The active log file for TWRP is /tmp/recovery.log; you can also use that file for the checks. Note that /tmp is mounted on a ramdisk.
On the page https://source.android.com/docs/core/tests/debug/rescue-party are instructions to force an Android Rescue Partry trigger by setting some properties but I did not get that to work neither in the OmniROM 13 nor in the ASUS Android 12.
To avoid the reboot from the TWRP image, install the TWRP recovery on the phone. In this case, Android will automatically boot into the installed TWRP recovery when a fatal error occurs.

Categories

Resources