How to mount encrypted /data partition in recovery mode?

one more… what mount binary is the pixel5 lineage recovery using and what version?

FP3:/ # ls -l $(which mount)                                                                                                                                                                 
lrwxrwxrwx 1 root root 6 1970-01-01 00:00 /system/bin/mount -> toybox
FP3:/ # toybox --help | head -n1                                                                                                                                                             
Toybox 0.8.6-android multicall binary (see https://landley.net/toybox)

same

redfin:/ #  ls -l $(which mount)
lrwxrwxrwx 1 root root 6 1970-01-01 00:00 /system/bin/mount -> toybox
redfin:/ # toybox --help | head -n1
Toybox 0.8.6-android multicall binary (see https://landley.net/toybox)
redfin:/ #

Hi everyone,
I’m experiencing the same problem (not sure if encrypted though) so was really happy to find this thread.
This is my first time I’m using adb.

If I understand correctly, the idea is that by mounting the userdata I can find a large file and delete it. My problem is that /dev/block/ does not contain the folder bootdevice. Since it contains a folder by-name, I tried this:

> mount /dev/block/by-name/userdata /mnt/userdata/                                                                                  
mount: /dev/block/by-name/userdata: need -t
> mount -t ext4 /dev/block/by-name/userdata /mnt/userdata/                                                                          
mount: '/dev/block/by-name/userdata'->'/mnt/userdata/': Invalid argument

This is what my Gigaset GS290 is showing right now:

Any advice on how can mount my data would be greatly appreciated as I’m cut off from the world.

P.S.: I support the motion that a phone should not become unusable just because the memory is full. For me, the OS loads but then shuts down after several apps have shown their error messages.

found a device that I can reproduce the behaviour with. I checked if the recovery kernel has the filesystem compiled in / as modules, played around with mount options - I speculate the invalid arg error is originating from fs kernel module / mount-option incompatibility. Will get back to this when I have more time

1 Like

I’m lacking knowledge to understand but thank you for looking into the issue. In your discernment, is there any attempt that could be promising? I caught up talk mentioning fastboot and twrp, anything worth trying or would they all be hampered by the same problem?

Hi johentsch,
How far can you go when you reboot? In my case, it only crashes when I unlock the phone after startup (within 1-2 seconds I’ve got notifications saying some apps (such as BlissLauncher, microG) can’t open and it goes into rebooting).

Waiting before unlocking or removing the sim card does not improve things, but I am thinking, if nothing works, that killing some memory-hungry system functions with adb could be enough? For me what matters most is to save as much pictures/videos as possible.

From what I understand, your chances that twrp works depends on the status (locked/unlocked) of your device, which you can see by entering “Reboot to bootloader”.

Thank you @rogit.

My booting experience is similar to what you’re describing. My interpretation of this behaviour was that the system was probably failing to write logs and shut down because of this.

But in case you’ve had success with this, could please point me to what the memory-hungry system functions are?

Hmm, I don’t remember rooting the phone so, unless it’s part of the normal installation procedure, it’s probably locked? When I select “Reboot to bootloader” I get a black screen with a tiny “FASTBOOT mode…” written in the lower left, that’s all.

From what I understand adb should let me remove files, so I would need only a single filepath – how can it be so difficult to see the filepaths? Or am I mistaken and mounting the userdata is a necessary condition on /e/?

Small update on this. I’ve also played around a little bit more, trying to follow this stackexchange. Although fdisk -l could have come handy, it’s not actually available, nor when I mount /system (BTW, wouldn’t it come enormously handy if the recovery menu also had a Mount /data option?). However, it does provide du which helped me discover that I also have a /dev/block/platform/bootdevice/by-name/userdata path. However, mount -t ext4 -o rw /dev/block/platform/bootdevice/by-name/userdata /mnt/userdata yields Invalid argument as well.

I just realized this now but when selecting the mount option in the recovery menu it says:
“Unable to enable ext4 verity on /dev/block/by-name/metadata because /system/bin/tune2fs is missing”
From what I’ve read in the forums there might be no way around this