A few months ago I dropped my phone (Samsung Galaxy A70) and the screen broke. Got a new phone, problem solved. But there is some data on it that I forgot to include in my backups. Very small files but important for achive purposes.

Screen (touch input too) and the speaker are dead. I know the password (obviously) but how will I go around doing this? First thing that came to my mind is connecting the phone to a computer via USB. But there are some obstacles.

The phone is rooted and has LineageOS 20 (and Lineage Recovery) installed. The phone is on vibration or muted mode. Therefore an external speaker isn’t of much use. The OS is most likely fully functional. I can tell when the screen is on and not by holding the power button. If it’s on, it will vibrate which indicates the power menu has openned. If it’s off, the flashlight will turn on.

Phone has a USB-C 2.0 port and the wireless cast doesn’t work due to Google Services being absent (apparently) so no video output. First thing I tried doing is just straight up connecting it to a computer. Obviously it didn’t work because I didn’t unlock the phone and a security feature that only uses USB for power unless otherwise is told is active. That setting can be changed via a notification. So I tried connecting a mouse and keyboard. I couldn’t if anything was happening or if the peripherals were connected at all.

So what do I do? I’m thinking of booting into Lineage Recovery and see if I can do anything with ADB or fastboot. But probably not since the data is encrypted.

  • Atemu@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    11 months ago

    On my cheeseburger guinea pig device with a broken screen what I do is enable ADB in the system via some shell commands in TWRP recovery and then use scrcpy to use the phone “normally”.

    #!/usr/bin/env bash
    adb shell "
    twrp mount system
    twrp remountrw system
    echo '' >> /system_root/system/build.prop
    echo '# Enable ADB' >> /system_root/system/build.prop
    echo 'persist.service.adb.enable=1' >> /system_root/system/build.prop 
    echo 'persist.service.debuggable=1' >> /system_root/system/build.prop
    echo 'persist.sys.usb.config=mtp,adb' >> /system_root/system/build.prop 
    "
    adb push ~/.android/adbkey.pub /data/misc/adb/adb_keys
    

    (You need to generate an ADB keypair first ofc.)

    This does not require decrypting data but you do need a writeable system and data partition. In TWRP, data is mounted by default and the first two commands mount system writeable at /system_root/. I’ve never done it with Lineage recovery but in theory, it should be possible somehow. (Obviously not using the TWRP command.)