Any way to pull a local file from an Android 12 device stuck in Recovery before factory reset? (Unlocked bootloader) - Reddthat

23 days ago by lipen to c/android

My Tecno Spark 10 Pro (MediaTek Helio G88, Android 12) bootlooped after a banking app froze. Now it boots straight into stock recovery with the message that Android cannot be loaded and data may be corrupt. The bootloader is unlocked. I hooked it up to an Android tablet via OTG with Bugjaeger. The device uses A/B partitioning and was running on slot b. I switched it to slot a via fastboot, but slot a gives the exact same recovery loop, so the issue is clearly a corrupted userdata partition failing to mount during early init. All I need is my local KeePass database file from internal storage. I know modern Android uses File-Based Encryption with keys sealed in the TEE, but since my bootloader is unlocked, is there any known way via fastboot, MTK tools, or custom boot images to extract or decrypt that single file before I wipe the device? Or is it completely unrecoverable once the filesystem fails to mount?

My Tecno Spark 10 Pro (MediaTek Helio G88, Android 12) bootlooped after a banking app froze. Now it boots straight into stock recovery with the message that Android cannot be loaded and data may be corrupt. The bootloader is unlocked. I hooked it up to an Android tablet via OTG with Bugjaeger. The device uses A/B partitioning and was running on slot b. I switched it to slot a via fastboot, but slot a gives the exact same recovery loop, so the issue is clearly a corrupted userdata partition failing to mount during early init. All I need is my local KeePass database file from internal storage. I know modern Android uses File-Based Encryption with keys sealed in the TEE, but since my bootloader is unlocked, is there any known way via fastboot, MTK tools, or custom boot images to extract or decrypt that single file before I wipe the device? Or is it completely unrecoverable once the filesystem fails to mount?

load all comments
hexagonwin 4 points 23 days ago
  • are you rooted?/do you get adb while booting? (few years ago on a custom rom's debug build, but i was able to connect via adb and read logcat and solve the issue it was having while stuck in bootloop and before it auto enters recovery)
  • i see you have custom recovery now. can you boot a custom recovery (maybe temporarily via fastboot)?

it should be possible to recover given that you have full unrestricted access to the device and even know the lockscreen password..

seems like it's possible with twrp. btw, i've bootlooped my phone before after using twrp to wipe dalvik cache on a recent encrypted phone (it created an unencrypted dir on userdata iirc, removing the offending directory solved it), so beware and don't do anything that doesn't seem necessary!

path: 0 25909844, hotness: undefined, score: 4, children: 12
lipen 1 point 23 days ago

I don't have root and I don't have custom recovery :)

path: 0 25909844 25910573, hotness: undefined, score: 1, children: 11
hexagonwin 3 points 23 days ago

maybe try booting this or this TWRP temporarily without flashing using fastboot (fastboot boot recovery_filename.img)

(kinda unlikely to be able to directly mount data though, there's one on 4PDA too dated Apr 2024 but it specifically says it doesn't support mounting data)

are you able to obtain the installed version of the firmware or extract stock boot image from device? (if the TWRP above booted, you probably can)

in that case, we may be able to enable adb during boot phase by changing some props on the boot image's initrd, and try logcat'ing to get android properly booting again.

path: 0 25909844 25910573 25910921, hotness: undefined, score: 3, children: 10
lipen 1 point 23 days ago

TWRP won't load :( The phone reboots and the error appears again

path: 0 25909844 25910573 25910921 25913687, hotness: undefined, score: 1, children: 9
hexagonwin 2 points 22 days ago

do you have the stock firmware of this device (the version installed on the phone)?

if you don't, at least please share the build version or whatever info shows on the stock recovery, fastboot/bootloader menu (if it exists), etc

path: 0 25909844 25910573 25910921 25913687 25920701, hotness: undefined, score: 2, children: 8
lipen 1 point 22 days ago

Here is the exact build information from my stock recovery screen:

Device: TECNO Spark 10 Pro (TECNO/KI7-GL/TECNO-KI7) Android version: 12 (SP1A.210812.016) Build number: 230703V2369 Build tag: user/release-keys

I don't have the stock firmware package or scatter file on hand right now, but this is the exact build that is currently installed.

path: 0 25909844 25910573 25910921 25913687 25920701 25921184, hotness: undefined, score: 1, children: 7
android
android

@lemmy.world

login for more options
34845
2227
1879

DROID DOES

Welcome to the Android community on Lemmy. Here you can participate in amazing discussions and events relating to all things Android.

The rules for posting and commenting, besides the rules defined here for lemmy.world, are as follows:

Rules


1. All posts must be relevant to Android devices/operating system.


2. Posts cannot be illegal or NSFW material.


3. No spam, self promotion, or upvote farming. Sources engaging in these behavior will be added to the Blacklist.


4. Non-whitelisted bots will be banned.


5. Engage respectfully: Harassment, flamebaiting, bad faith engagement, or agenda posting will result in your posts being removed. Excessive violations will result in temporary or permanent ban, depending on severity.


6. Memes are not allowed to be posts, but are allowed in the comments.


7. Posts from clickbait sources are heavily discouraged. Please de-clickbait titles if it needs to be submitted.


8. Submission statements of any length composed of your own thoughts inside the post text field are mandatory for any microblog posts, and are optional but recommended for article/image/video posts.


Community Resources:


go to feed...