TWRP cannot mount /data; nothing 'sticking' using fastboot - Nexus 5 Q&A, Help & Troubleshooting

Hi all,
hoping on the off-chance someone's still monitoring the Nexus 5 forums here
So decided to dust off the old Nexus 5 (now with extra COVID-19 time on my hands!) to use as a backup device, but having serious issues getting it up and running. I had it rooted years ago, and had no issues installing custom roms.
Now I'm having the following situation:
I cannot flash the factory image using fastboot, nor anything is 'sticking' to the phone when I try to re-flash individual component for the factory image. I've also tried to flash TWRP, but again, it doesn't stick and the only way i can boot into TWRP is by using
Code:
fastboot boot recovery.img
.
However in recovery, the data partition is not mounting and all the tutorials/guides I read about fixing it aren't working (e.g. repairing the partition-- get a 'unable to repair data' error; changing from EX4 to EX2 and back-- get 'failed to mount '/data' error).
Ran the following command in the terminal window in TWRP
Code:
cat /etc/fstab
and got the following output:
Code:
/dev/block/mmcblk0p25 /system ext4 rw 0 0
/dev/block/dm-0 /data ext4 rw 0 0
/dev/block/mmcblk0p27 /cache ext4 rw 0 0
/dev/block/mmcblk016 /persist ext 4 rw 0 0
/dev/block/mmcblk0p1 /firmware vfat rw 0 0
/usb-otg vfat rw 0 0
tried using the make_ext4fs command, but again- nothing happens.
Using TWRP 3.3.1-0 by the way
Any ideas? is the phone completely bricked? it's stuck in a bootloop where the google colours come up but freeze within half a second, repeat and continue.
Any advice would be very much appreciated!

Related

recovery mode not working

Ok, so I was trying to reflash the modified rc30 update to start from scratch because when trying to do the auto rotate browser tweak I kept getting the not enough space message. I rebooted into recovery mode thinking all I had to do was run the update and it didn't do it. I thought maybe I needed to reflash the modified recovery image so I did that, but now when I reboot into recovery mode I get the G1 logo and then a blank screen. I tried pushing home+back to restart and get nothing. So I used adb to push the recovery image on the device and I get "no space left on device" Tried doing a factory reset and it hangs up on a blank screen there too. can I just wipe the data partition to fix it then reflash the recovery image to the device? The phone works fine, I just can't do anything with recovery. Can someone help me out here in getting back recovery mode? Thanks
When you tried to push the recovery image, did you do so to the sdcard?
I am referencing these pages:
http://android-dls.com/wiki/index.php?title=Keeping_Root
http://code.google.com/android/reference/adb.html
Just remount /system as rw and adb push the recovery.img directly in. Also, if you have the engineering bootloader installed, you could try using fastboot to reflash the recovery partition from the bootloader.
doesn't mount -o remount,rw /dev/block/mtdblock3 /system remount the system as rw? That's what i've been doing, and still says device full. I went in and tried by putting the file on the sd card and then flashing it but get the same message. I don't have the engineering bootloader yet that was next on my list. Is there a way to see what is on my partition so I can remove things to free up space?
jdwme said:
doesn't mount -o remount,rw /dev/block/mtdblock3 /system remount the system as rw? That's what i've been doing, and still says device full. I went in and tried by putting the file on the sd card and then flashing it but get the same message. I don't have the engineering bootloader yet that was next on my list. Is there a way to see what is on my partition so I can remove things to free up space?
Click to expand...
Click to collapse
If you're on RC30 v1.2 put the recovery.img in /data not /system
so then my it should look like this?
mount -o remount,rw /dev/block/mtdblock3 /data
cd /data
cat /sdcard/recovery_testkeys.img > recovery.img
flash_image recovery recovery.img
jdwme said:
so then my it should look like this?
mount -o remount,rw /dev/block/mtdblock3 /data
cd /data
cat /sdcard/recovery_testkeys.img > recovery.img
flash_image recovery recovery.img
Click to expand...
Click to collapse
mtd3 is system. mtd5 is userdata. Don't execute that first step! userdata partition is rw anyway. Just start with step 2.
ok, i did execute the first step in the terminal emulator, is that bad? i will try it now starting with just cd /data
jdwme said:
ok, i did execute the first step in the terminal emulator, is that bad? i will try it now starting with just cd /data
Click to expand...
Click to collapse
Not sure. What do you get if you type mount with no args in the terminal emu?
nothing, it just goes to the next line and lets me enter in the next step. is there a way to flash from the standard bootloader?
jdwme said:
nothing, it just goes to the next line and lets me enter in the next step. is there a way to flash from the standard bootloader?
Click to expand...
Click to collapse
Really? What it should do is return a list of mounted devices, like so (this is a Mod RC30 v1.2 device):
Code:
# mount
rootfs on / type rootfs (ro)
tmpfs on /dev type tmpfs (rw,mode=755)
devpts on /dev/pts type devpts (rw,mode=600)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /sqlite_stmt_journals type tmpfs (rw,size=4096k)
/dev/block/mtdblock3 on /system type yaffs2 (ro)
/dev/block/loop0 on /system/modules type cramfs (ro)
/dev/block/loop1 on /system/xbin type cramfs (ro)
/dev/block/mtdblock5 on /data type yaffs2 (rw,nosuid,nodev)
/dev/block/mtdblock4 on /cache type yaffs2 (rw,nosuid,nodev)
/dev/block/mmcblk0p1 on /sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1000,fmask=0711,dmask=0700,codepage=cp437,iocharset=iso8859-1,utf8)
Stock bootloader can't be used to flash images to the mtd partitions.
ok i misunderstood, i did type just mount now and it shows what you posted. could i have two modified recovery images on there and it cant pick one so thats causing the problem?
Did you change directory to /data? If you can't get it to work from the terminal, as long as you have the recovery.img in /data, just power the G1 off completely and power it back on. It automatically writes the recovery partition every time you cold boot.
Btw make sure that in the mount report the following two lines read exactly as such:
Code:
/dev/block/mtdblock3 on /system type yaffs2 (ro)
/dev/block/mtdblock5 on /data type yaffs2 (rw,nosuid,nodev)
yeah the mount report shows just that. i have cold rebooted everytime i tried to flash, then powered off and tried to boot back up in recovery mode and it doesnt work, gives the g1 logo then screen is black.
jdwme said:
yeah the mount report shows just that. i have cold rebooted everytime i tried to flash, then powered off and tried to boot back up in recovery mode and it doesnt work, gives the g1 logo then screen is black.
Click to expand...
Click to collapse
On your cold reboots were you seeing the flashing screen (arrow onto chip) before booting into Android?
nope, only showed that when i was able to upgrade to modified rc 30 or run the update in recovery mode
jdwme said:
nope, only showed that when i was able to upgrade to modified rc 30 or run the update in recovery mode
Click to expand...
Click to collapse
Are you sure you have the recovery.img in the /data directory? Strange. Maybe someone else has some ideas about whats going on here?
So I decided to show all my partitions listed on the system using cat
/proc/partitions and this is what I got. Does this look normal? Not sure
what it looks like on anyone else device
major minor #blocks name
7 0 2248 loop0
7 1 3176 loop1
31 0 256 mtdblock0
31 1 5120 mtdblock1
31 2 2560 mtdblock2
31 3 69120 mtdblock3
31 4 69120 mtdblock4
31 5 76544 mtdblock5
179 0 7977472 mmcblk0
179 1 7973376 mmcblk0p1
I pushed it to the data directory before, followed the instruction thread, but using oi file manager recovery.omg shows in system, nothing shows in data
so does anyone have any ideas? I was thinking about going back to rc29 to try and fix this but without being able to get recovery mode to come on I can't do it, I also can't flash over to the dev boot loader
jdwme said:
so does anyone have any ideas? I was thinking about going back to rc29 to try and fix this but without being able to get recovery mode to come on I can't do it, I also can't flash over to the dev boot loader
Click to expand...
Click to collapse
Give me an IM if you want. I may be able to help fix your recovery mode. (debugging things like that is such a pain on a forum. real-time is much easier)

Guide to Treble/GSI on the Palm Phone

From this thread: https://forum.xda-developers.com/pr...velopment/aosp-10-0-quack-phh-treble-t3992559, the TrebleCheck app indicates we need an arm64 "a-only" ROM. The Palm Phone is running vendor version 8.1.
Step 1: Download Sugar. This thread: https://forum.xda-developers.com/android/general/release-root-palm-phone-t4021201, has everything you need to know about Sugar. I ran the upgrade once to download the full stock ROM (make a backup as described). Warning, this erases all of your data.
Step 2: Follow this guide: https://forum.xda-developers.com/android/general/guide-porting-twrp-source-t3843473, to build a TWRP for the Palm Phone without source. I used the latest TWRP for the Asus Nexus 7 2013 LTE as my base. From your Palm upgrade backup, the recovery image is the one that starts with 'R', about 36MB. Rename your new TWRP image to match the stock recovery and replace it similar to the rooting guide for replacing the boot image.
Update: snoopy20 has shared his TWRP image here: https://forum.xda-developers.com/showpost.php?p=82654073&postcount=26
Step 3: Extract the system image you downloaded and rename and replace the stock system image. It's the largest file in your Sugar device folder.
Step 4: Re-run the upgrade in Sugar with your replaced images in place.
Step 5: You're probably stuck in a boot loop. Press and hold the power button until you get into recovery, which is now TWRP. First, I formatted data. Then push or otherwise copy this zip to the device: https://forum.xda-developers.com/android/software/universal-dm-verity-forceencrypt-t3817389 and install it from TWRP. The stock configuration should be fine, i.e. don't worry about re-naming the zip. Note, do NOT use adb sideload, since that seems to wreck the zip installer's ability to use its own file name to configure itself.
Update: The Universal dm-verity zip may not always work, in particular on AOSP Android 10 images. In this case, you can use another Android device and Magisk Manager to patch the Palm boot image. Push the boot image from your Palm backup (described in Step 1) to the other Android device. It's the mbn file that starts with 'B'. I chose to rename it to boot.img for easier use. Than use Magisk Manager to patch it. Push the modified boot image back to the Palm (in TWRP) and use TWRP to Install->Image it.
Step 6: Reboot! Wipe data and cache for good measure, and you should be set!
All credit goes to the folks from the links above for creating the Treble system image, TWRP guide, and dm-verity script. Thanks to snoopy20 for his TWRP image.
Things that work so far:
* Almost everything
Doesn't work
* Soft key requires an app, such as Key Mapper, to use
* Screen auto brightness is missing
Can you post the TWRP you created?
snoopy20 said:
Can you post the TWRP you created?
Click to expand...
Click to collapse
Is it kosher to publicly post a TWRP created like this (i.e. not from source)?
Additionally, I'm not entirely confident I didn't screw something up, so I'm a little wary to risk everyone's device. Specifically, I do not know what would happen if you get caught in a boot loop and don't have a functioning recovery to boot into in order to restore...
Yeah you just write "Unofficial" or something in the title. Right now I'm happy to brick the Palm, I'm 99% of the way to dropping it but it would be fantastic if I can get a stock Android on it.
By the way do the restrictions, i.e wifi tethering, get applied by the Vendor package?
snoopy20 said:
Yeah you just write "Unofficial" or something in the title. Right now I'm happy to brick the Palm, I'm 99% of the way to dropping it but it would be fantastic if I can get a stock Android on it.
By the way do the restrictions, i.e wifi tethering, get applied by the Vendor package?
Click to expand...
Click to collapse
Hard for me to test since I don't have a supported SIM, but the tethering menu is available in Settings. You'll have to try it and let us know.
If you post the TWRP I'll do so. My biggest concern is if I **** up building it. I sent you a PM.
snoopy20 said:
If you post the TWRP I'll do so. My biggest concern is if I **** up building it. I sent you a PM.
Click to expand...
Click to collapse
Just waiting for android file host to approve
I've attempted to repack but found:
1. Two fstab files are fstab.qcom and fstab.grouper, don't know if I should delete them but instructions seem to indicate I should.
2. Stock ramdisk folder doesn't have a fstab.* file to copy over.
I ended up with this twrp.fstab. Note the encryption part from /data is gone? Unsure if this is ok.
# mount point fstype device
#twrp.fstab
/system ext4 /dev/block/bootdevice/by-name/system
/cache ext4 /dev/block/bootdevice/by-name/cache
/data ext4 /dev/block/bootdevice/by-name/userdata
/misc emmc /dev/block/bootdevice/by-name/misc
/boot emmc /dev/block/bootdevice/by-name/boot
/recovery emmc /dev/block/bootdevice/by-name/recovery
/external_sd vfat /dev/block/mmcblk1p1 flags=removable;storage;display="SDCARD"
/usb-otg auto /dev/block/sda1 flags=removable;storage;display="USB-OTG"
Just a big heads up, when trying to connect to the network today (Visible) I noticed that my IMEI was 0000.... I have never successfully connected the Palm phone and while the behavior now is consistent with my issues before, I can't say whether or not flashing the GSI as outlined here erased my IMEI.
Proceed with caution.
I'm not proceeding at all unless you post your twrp or verify the issues I've had creating it.
I read the IMEI is held on another partition, type 'efs'. I can't see Sugar killing it. More likely your fstab options aren't mounting it.
---------- Post added at 06:57 PM ---------- Previous post was at 06:33 PM ----------
Here is a list of all the mountpoints on a working phone. At a guess the IMEI is held in /firmware. Do you have this mounted?
rootfs on / type rootfs (ro,seclabel,size=1358776k,nr_inodes=339694)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,size=1439668k,nr_inodes=359917,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime,gid=3009,hidepid=2)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
/dev/block/mmcblk0p27 on /system type ext4 (ro,seclabel,relatime,discard,data=ordered)
/dev/block/mmcblk0p28 on /vendor type ext4 (ro,seclabel,relatime,discard,data=ordered)
none on /acct type cgroup (rw,relatime,cpuacct)
debugfs on /sys/kernel/debug type debugfs (rw,seclabel,relatime)
tmpfs on /mnt type tmpfs (rw,seclabel,relatime,size=1439668k,nr_inodes=359917,mode=755,gid=1000)
none on /config type configfs (rw,relatime)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
pstore on /sys/fs/pstore type pstore (rw,seclabel,relatime)
/dev/block/mmcblk0p52 on /fotadata type ext4 (rw,seclabel,nosuid,nodev,noatime,discard,noauto_da_alloc,data=ordered)
/dev/block/mmcblk0p29 on /cache type ext4 (rw,seclabel,nosuid,nodev,noatime,data=ordered)
/dev/block/mmcblk0p12 on /dsp type ext4 (ro,seclabel,nosuid,nodev,relatime,data=ordered)
/dev/block/mmcblk0p1 on /firmware type vfat (ro,context=ubject_r:firmware_file:s0,relatime,uid=1000,gid=1000,fmask=0337,dmask=0227,codepage=437,iocharset=iso8859-1,shortname=lower,errors=remount-ro)
/dev/block/mmcblk0p30 on /persist type ext4 (rw,seclabel,nosuid,nodev,noatime,data=ordered)
tmpfs on /storage type tmpfs (rw,seclabel,relatime,size=1439668k,nr_inodes=359917,mode=755,gid=1000)
tracefs on /sys/kernel/debug/tracing type tracefs (rw,seclabel,relatime)
tmpfs on /sbin type tmpfs (rw,seclabel,relatime,size=1439668k,nr_inodes=359917,mode=755)
/sbin/.magisk/block/persist on /sbin/.magisk/mirror/persist type ext4 (rw,seclabel,relatime,data=ordered)
adb on /dev/usb-ffs/adb type functionfs (rw,relatime)
/dev/block/dm-0 on /data type ext4 (rw,seclabel,nosuid,nodev,noatime,discard,noauto_da_alloc,resuid=10010,data=ordered)
/sbin/.magisk/block/system on /sbin/.magisk/mirror/system type ext4 (ro,seclabel,relatime,discard,data=ordered)
/sbin/.magisk/block/vendor on /sbin/.magisk/mirror/vendor type ext4 (ro,seclabel,relatime,discard,data=ordered)
/sbin/.magisk/block/data on /sbin/.magisk/mirror/data type ext4 (rw,seclabel,relatime,discard,noauto_da_alloc,resuid=10010,data=ordered)
/data/media on /mnt/runtime/default/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid)
/data/media on /storage/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid)
/data/media on /mnt/runtime/read/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=23,derive_gid)
/data/media on /mnt/runtime/write/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=7,derive_gid)
The original firmware recovery has the /firmware mounted as the sdcard so depending on how you mounted for twrp could you have wiped it?
/dev/block/bootdevice/by-name/system /system ext4 ro,barrier=1 wait,verify
/dev/block/bootdevice/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered wait,check
/dev/block/bootdevice/by-name/fotadata /fotadata ext4 noatime,nosuid,nodev,barrier=1,data=ordered wait,check
/dev/block/bootdevice/by-name/vendor /vendor ext4 ro,barrier=1 wait,verify
/dev/block/bootdevice/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc wait,check
/dev/block/mmcblk0p1 /sdcard vfat nosuid,nodev wait
/dev/block/bootdevice/by-name/boot /boot emmc defaults defaults
/dev/block/bootdevice/by-name/recovery /recovery emmc defaults defaults
/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults
/dev/block/bootdevice/by-name/fsg /fsg emmc defaults defaults
Added my TWRP to the OP
OK I've compared and I can't see anything major. The only thing you do have is a few more mount points which I've not had in mine (listed). Where are they from? I think mounting the sdcard (modem firmware) is a bad idea so I'm going to skip that.
/sbl1 emmc /dev/block/bootdevice/by-name/sbl1
#/sbl2 emmc /dev/block/bootdevice/by-name/sbl2
#/sbl3 emmc /dev/block/bootdevice/by-name/sbl3
/tz emmc /dev/block/bootdevice/by-name/tz
/rpm emmc /dev/block/bootdevice/by-name/rpm
/aboot emmc /dev/block/bootdevice/by-name/aboot
#/sbl2b emmc /dev/block/bootdevice/by-name/sbl2b
#/sbl3b emmc /dev/block/bootdevice/by-name/sbl3b
#/tzb emmc /dev/block/bootdevice/by-name/tzb
#/rpmb emmc /dev/block/bootdevice/by-name/rpmb
#/abootb emmc /dev/block/bootdevice/by-name/abootb
#/usb-otg vfat /dev/block/sda1 /dev/block/sda flags=removable;storage;display=USB-OTG
/external_sd vfat /dev/block/mmcblk0p1
/usb-otg auto /dev/block/sda1
So, I have twrp installed, and a fast bootloop almost instantly on start. I haven't been able to solve it thus far. I can get into twrp which is something though.
snoopy20 said:
OK I've compared and I can't see anything major. The only thing you do have is a few more mount points which I've not had in mine (listed). Where are they from? I think mounting the sdcard (modem firmware) is a bad idea so I'm going to skip that.
/sbl1 emmc /dev/block/bootdevice/by-name/sbl1
#/sbl2 emmc /dev/block/bootdevice/by-name/sbl2
#/sbl3 emmc /dev/block/bootdevice/by-name/sbl3
/tz emmc /dev/block/bootdevice/by-name/tz
/rpm emmc /dev/block/bootdevice/by-name/rpm
/aboot emmc /dev/block/bootdevice/by-name/aboot
#/sbl2b emmc /dev/block/bootdevice/by-name/sbl2b
#/sbl3b emmc /dev/block/bootdevice/by-name/sbl3b
#/tzb emmc /dev/block/bootdevice/by-name/tzb
#/rpmb emmc /dev/block/bootdevice/by-name/rpmb
#/abootb emmc /dev/block/bootdevice/by-name/abootb
#/usb-otg vfat /dev/block/sda1 /dev/block/sda flags=removable;storage;display=USB-OTG
/external_sd vfat /dev/block/mmcblk0p1
/usb-otg auto /dev/block/sda1
Click to expand...
Click to collapse
I think the guide for porting TWRP mentioned to add it, so I did.
snoopy20 said:
So, I have twrp installed, and a fast bootloop almost instantly on start. I haven't been able to solve it thus far. I can get into twrp which is something though.
Click to expand...
Click to collapse
Sounds similar to me. Did you flash the new system as well? If so, this is when you use TWRP to flash the zip to disable dm-verity.
I did, then the dm-verity but with no success. Assuming /system was corrupt or wrong I've deleted it. I'm now trying to work out how to flash the system.img without fastboot (which I don't have).
So far dd is ending up with a corrupt partition and twrp insists on a zip for system flash. Trying to figure out how to convert it.
---------- Post added at 09:44 PM ---------- Previous post was at 09:26 PM ----------
I did, then the dm-verity but with no success. Assuming /system was corrupt or wrong I've deleted it. I'm now trying to work out how to flash the system.img without fastboot (which I don't have).
So far dd is ending up with a corrupt partition and twrp insists on a zip for system flash. Trying to figure out how to convert it.
Actually you said you tried 10 unsuccessfully, so how did you then flash the v8 image?
snoopy20 said:
So far dd is ending up with a corrupt partition and twrp insists on a zip for system flash. Trying to figure out how to convert it.
Click to expand...
Click to collapse
TWRP doesn't say "Install Image" at the bottom when you go to Install?
Actually you said you tried 10 unsuccessfully, so how did you then flash the v8 image?
Click to expand...
Click to collapse
I'm assuming the 2nd link down in OP (github).
This is exciting!
Anytime I got stuck, from TWRP I used
Code:
adb reboot edl
then I used Sugar to reflash everything all over again.
Phew, I didn't know about that one. I'll try again.
You can't flash an img from TWRP, there's no boot partition to enter fastboot mode.
I'd originally downloaded the nogapps without su and added Magisk.zip after, this caused an instant bootloop. The one with build in gapps+su works. It's possible to disable all gapps and related services except GoogleOne (I installed OpenLauncher into /system/app then removed GoogleOne by force). After this "Google" can be removed and all notifications about Google Services end.
I recommend you take down the twrp and remove the line which mounts the firmware partition as sdcard in case this is what wiped your IMEI. I build my own without this line and IMEI survived.
Tested
Wifi hotspot is working!
Bluetooth, camera, all USB,
Stability
Not working
Thee dots button (don't think it's a big deal as you get the three icons for back etc by default).
Auto screen brightness

Init_user0_failed After trying to update to 11.0.5.1

I have the same issue but I can't boot at all. I'm only limited to twrp and fastboot. I was previously running 11.0.3 with Magisk and a Magisk module called xXx_nolimit, downloaded the OTA update and went to reboot to recovery before being prompted for a pattern passcode (I hadn't set any fingerprint or password) so I rebooted into twrp and clicked fix bootloader. Now as I reboot it just boots back into twrp.
I'm also getting these same messages:
Failed to mount /data (Invalid argument)
Unable to recreate /data/media folder.
Unable to mount storage
Unable to mount /data/media/TWRP/.twrps
I'm currently running apbf to bruteforce the pattern passcode that I never set in hopes to decrypt my phone. Not even sure it will work though as I don't have FBE user 0 mounted? I have my dad's phone which basically has the exact setup as mine but I didn't update it yet. Anyway to use partition or parts data from his phone to fix mine? I really don't want to wipe my /data or /userdata as it's been a while since I backed anything up.
All I have in my /data folder is:
/data/india /data/recovery /data/reserve
Update:
I tried adb sideloading the previous 11.0.3.1 and as I reboot I get `Init_user0_failed` with a dmesg and android.log file saved in /op2.
My /system/etc/fstab:
/system_root ext4 ro 0 0
/dev/block/sda17 /metadata ext4 rw 0 0
/dev/block/sda19 /data ext4 rw 0 0
/firmware vfat ro 0 0
/dev/block/sda7 /op2 ext4 rw 0 0
/usbstorage vfat rw 0 0
/vendor ext4 ro 0 0
ls -al /dev/block/platform/soc/1d84000.ufshc/by-name/: http://dpaste.com/CFNTDVTRK
dmesg.log: http://dpaste.com/DPRQLYCEE
android.log: (added as attachement)
I've been told I can use EDL but want to keep that as last resort as I don't have a backup of any of my files.
Edit: I also tried the reboot to recovery, clear cache then reboot back to recovery and reboot system as mentioned on a couple of other threads but that didn't work either.
Don't know if this will help, but I recently ended up soft-bricked with that same error after upgrading to a newer version of TWRP. I believe it had something to do with the way TWRP interacts with the /data partition, although I'm not sure how exactly.
Anyway, I was able to get the phone booting into OOS so I could at least back up my /sdcard partition before blowing it away and starting over. The way I did that was to flash crDroid's newest recovery boot img:
https://forum.xda-developers.com/t/rom-android-12l-op7pro-crdroid-v8-6-26-06-2022.4184671/
https://sourceforge.net/projects/crdroid/files/guacamole/8.x/recovery/
For me, the phone would once again boot into OOS, but fingerprint authentication didn't work, and the phone consistently froze about 5 minutes after putting in my PIN at boot. I was able to extend this time by freezing the Magisk app in Titanium and turning off all radios (Airplane mode on, Bluetooth off, etc.) After like 30 reboots, I was able to get everything copied off the /sdcard partition. Hope this helps someone...

Help I unlocked the bootloader and can't decrypt data.

So I unlocked the bootloader, flashed TWRP, and everything went fine. But when I tried to get into TWRP it asks for a password even though I haven't set one.
If I go to cancel > wipe and try to format data it just gives me a lot of red text ("operation not permitted") saying it doesn't have the permissions for a data wipe.
So since the system is still working I went and did a soft data reset since I already flashed TWRP and it doesn't work.
I confirmed it and the device started restarting, but when it booted it booted into TWRP. From TWRP I went back to the system and my data was still there.
I will now download the stock rom and try to flash the stock recovery. Is the problem in TWRP or in my device?
My phone is Motorola moto g8 (XT2045-2)
As soon as the bootloader gets unlocked, a Factory Reset is executed internally, which means that the encryption key gets also deleted, hence you no longer can decrypt encrypted data.
xXx yYy said:
As soon as the bootloader gets unlocked, a Factory Reset is executed internally, which means that the encryption key gets also deleted, hence you no longer can decrypt encrypted data.
Click to expand...
Click to collapse
yes, I know but for some reason it is still asking for a password.
Try default password -> default_password
xXx yYy said:
Try default password -> default_password
Click to expand...
Click to collapse
tried that aswell.. I tried erasing the userdata and cache using fastboot, then set a password in the system and it doesn't work in twrp. even twrp can't format data.
xXx yYy said:
Try default password -> default_password
Click to expand...
Click to collapse
I found out what was wrong, still can't get it to work though.. So the userdata partition was a format TWRP can't decrypt (I think). So I reformatted the userdata partition to ext4 but I get stuck in a bootloop unless I again erase the partition. Any help to how do I format it so it actually boots?
Why don't you ask in the support thread on xda-developers if TWRP is built with encryption support at all?
according to recovery.fstab it uses FBE + metadata encryption, so you probably have to format userdata + metadata once
from fastboot
Code:
fastboot format:f2fs userdata
fastboot format:ext4 metadata
or
from adb shell or terminal
Code:
make_f2fs -f /dev/block/bootdevice/by-name/userdata
mke2fs -t ext4 /dev/block/bootdevice/by-name/metadata
how do I delete double posts?
aIecxs said:
Why don't you ask in the support thread on xda-developers if TWRP is built with encryption support at all?
according to recovery.fstab it uses FBE + metadata encryption, so you probably have to format userdata + metadata once
from fastboot
Code:
fastboot format:f2fs userdata
fastboot format:ext4 metadata
or
from adb shell or terminal
Code:
make_f2fs -f /dev/block/bootdevice/by-name/userdata
mke2fs -t ext4 /dev/block/bootdevice/by-name/metadata
Click to expand...
Click to collapse
Code:
Warning: userdata type is raw, but f2fs was requested for formating.
Formatting is not supported for filesystem with type 'f2fs'.
Code:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
rav:/ $ make_f2fs -f /dev/block/bootdevice/by-name/userdata
/system/bin/sh: make_f2fs: inaccessible or not found
the metadata one worked fine
try mkfs.f2fs instead
aIecxs said:
try mkfs.f2fs instead
Click to expand...
Click to collapse
/system/bin/sh: mkfs.f2fs: inaccessible or not found
where am I supposed to use the adb shell command? in the recovery or while in the system?
can't I just wipe data from the stock recovery and then format metadata?
note with adb shell I meant in TWRP recovery (requires partition unmounted)
uwucake2020 said:
/system/bin/sh: mkfs.f2fs: inaccessible or not found
can't I just wipe data from the stock recovery?
Click to expand...
Click to collapse
aIecxs said:
note with adb shell I meant in TWRP recovery (requires partition unmounted)
Click to expand...
Click to collapse
oh ok wait a minute
I can't umount it..
Code:
127|sofiar:/ # make_f2fs -f /dev/block/bootdevice/by-name/userdata
F2FS-tools: mkfs.f2fs Ver: 1.12.0 (2018-11-12)
Info: Disable heap-based policy
Info: Debug level = 0
Info: Trim is enabled
Error: In use by the system!
1|sofiar:/ # umount /data
umount: /data: Device or resource busy
@aIecxs what can I do here? maybe erase the partition using fastboot or do a factory reset/wipe data using the stock recovery?
edit: I had data transfer on oops
sorry for the ping tho, idk if you can see when I edit a message
/data is not the only mount point. there is also /sdcard (refer to df -a)
this is how it looks on Poco M3. in my case you can see userdata is sda11. sda11 is mounted triple, so we have to umount sda11 until it is completely unmounted
Code:
[root] /: find /dev/block -name userdata
/dev/block/platform/soc/4804000.ufshc/by-name/userdata
[root] /: ls -l /dev/block/platform/soc/4804000.ufshc/by-name/userdata
lrwxrwxrwx 1 0 0 16 1971-05-21 00:59 /dev/block/platform/soc/4804000.ufshc/by-name/userdata -> /dev/block/sda11
[root] /: df -a
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 1788376 68504 1719872 4% /
tmpfs 1902824 572 1902252 1% /dev
tmpfs 1902824 0 1902824 0% /mnt
tmpfs 1902824 0 1902824 0% /apex
tmpfs 1902824 52 1902772 1% /tmp
/dev/block/sde53 364504 3876 360628 2% /cache
/dev/block/sda11 49394556 20677260 28717296 42% /data
/dev/block/sda11 49394556 20677260 28717296 42% /sdcard
/dev/block/sda11 49394556 20677260 28717296 42% /storage
/dev/block/mmcblk0p1 31150720 26539136 4611584 86% /sdcard1
/dev/block/dm-0 2923136 2821180 101956 97% /system_root
/dev/block/sde52 196528 118256 78272 61% /firmware
/dev/block/sde55 999320 583268 416052 59% /cust
/dev/block/sda6 11760 72 11688 1% /metadata
/dev/block/sda7 27632 2156 25476 8% /persist
/dev/block/dm-2 1479100 1374644 104456 93% /product
/dev/block/dm-1 1414572 1309996 104576 93% /vendor
[root] /:
aIecxs said:
note with adb shell I meant in TWRP recovery (requires partition unmounted)
Click to expand...
Click to collapse
got into a bootloop. "android system may be corrupt"
just format in TWRP recovery + stay in TWRP recovery and pull recovery.log, that's all you can do for now. this is for maintainer to look at
aIecxs said:
just format in TWRP recovery + stay in TWRP recovery and pull recovery.log, that's all you can do for now. this is for maintainer to look at
Click to expand...
Click to collapse
i don't think the problem is in TWRP, every time I format a partition to ext4 it bootloops :/
according to recovery.fstab /data is f2fs and /metadata is ext4. so formatting should work from fastboot and from twrp. you must not boot into android, reboot straight into recovery back again, then get recovery.log. boot loop is different issue, probably dm-verity
aIecxs said:
just format in TWRP recovery + stay in TWRP recovery and pull recovery.log, that's all you can do for now. this is for maintainer to look at
Click to expand...
Click to collapse
I just checked and the problem is in formatting the data partition, idk why tho
without recovery.log it's all just guesswork.. kindly re-read how to format

Question Device bootlooping after installing the April 2nd LOS for microG release on bluejay.

Hey everyone, My phone started bootlooping after I installed the LineageOS for microG 402-nightly image. I forgot to disable magisk before updating, and after I rebooted it just started bootlooping until I was kicked into LOS recovery. Trying to reflash the older image resulted in a `kInstallDeviceOpenError` (the infamous error 7), and so did the new one. I tried everything, from flashing different versions of boot.img from different releases and from both los for microG and official los, to even trying to reflash vanilla, but nothing worked, and trying to mount any partition from /dev just results in it saying '/dev/sdaXX'->'/mnt': no such file or directory. I have data on this device that I forgot to back up, is there any way to at least extract the photos from this thing?
many thanks in advance.
As long as you could enter the recovery and use adb, you could access to the file system or push update etc.
TWRP offers File Transfer and OTG
yes, but how, *exactly*? I got a pixel 6a and twrp doesnt support m ydevices yet, so i can I mount /data or /storage in LineageOS recovery?
ezntek said:
yes, but how, *exactly*? I got a pixel 6a and twrp doesnt support m ydevices yet, so i can I mount /data or /storage in LineageOS recovery?
Click to expand...
Click to collapse
I remember you could use adb and mount /system or /data
Every LineageOS recovery differs
Yep, I tried.
Here is the output of cat /etc/fstab:
```
/dev/block/platform/14700000.ufs/by-name/efs /mnt/vendor/efs ext4 defaults 0 0
/dev/block/platform/14700000.ufs/by-name/efs_backup /mnt/vendor/efs_backup ext4 defaults 0 0
/dev/block/platform/14700000.ufs/by-name/modem_userdata /mnt/vendor/modem_userdata ext4 defaults 0 0
/dev/block/platform/14700000.ufs/by-name/modem_a /mnt/vendor/modem_img ext4 context=ubject_r:modem_img_file:s0,barrier=1 0 0
/dev/block/platform/14700000.ufs/by-name/metadata /metadata ext4 data=journal,commit=1 0 0
/dev/block/platform/14700000.ufs/by-name/userdata /data f2fs discard,reserve_root=32768,resgid=1065,fsync_mode=nobarrier,inlinecrypt,atgc,checkpoint_merge 0 0
=32768,resgid=1065,fsync_mode=nobarrier,inlinecrypt,atgc,checkpoint_merge /dev/block/platform/14700000.ufs/by-name/userdata /data <
```
so of course I issued
`mount -t f2fs -o discard,reserve_root=32768,resgid=1065,fsync_mode=nobarrier,inlinecrypt,atgc,checkpoint_merge /dev/block/platform/14700000.ufs/by-name/userdata /data`
and the output was
`mount: '/dev/block/platform/14700000.ufs/by-name/userdata'->'/data': Invalid argument`
mount -a outputs the same thing.

Categories

Resources