1

Problem

My phone is stuck in boot loop after suffering water damage. It only reaches the boot loop when I'm charging, otherwise it does not react at all. Edit: I took the battery out and let it and the phone air dry for several days, I don't think there is any moisture left.

Device Info

My phone is a Galaxy S5 Plus/kccat6/SM-G901F and runs lineageos. TWRP is installed. Edit: I have a more or less recent backup saved on my desktop computer.

Backup Info

As per the comments, here are the names of my backup files:

total 4.2G
-rwxr----- 1 nonthevisor nonthevisor   13M Feb 11  2020 boot.emmc.win
-rwxr----- 1 nonthevisor nonthevisor    80 Feb 11  2020 boot.emmc.win.sha2
-rwxr----- 1 nonthevisor nonthevisor  1.6G Feb 11  2020 data.ext4.win000
-rwxr----- 1 nonthevisor nonthevisor    83 Feb 11  2020 data.ext4.win000.sha2
-rwxr----- 1 nonthevisor nonthevisor  909M Feb 11  2020 data.ext4.win001
-rwxr----- 1 nonthevisor nonthevisor    83 Feb 11  2020 data.ext4.win001.sha2
-rwxr----- 1 nonthevisor nonthevisor    66 Feb 11  2020 data.info
-rwxr----- 1 nonthevisor nonthevisor  711M Feb 11  2020 external_sd.f2fs.win
-rwxr----- 1 nonthevisor nonthevisor    64 Feb 11  2020 external_sd.info
-rwxr----- 1 nonthevisor nonthevisor   15M Feb 11  2020 recovery.emmc.win
-rwxr----- 1 nonthevisor nonthevisor    84 Feb 11  2020 recovery.emmc.win.sha2
-rwxr----- 1 nonthevisor nonthevisor  4.1M Feb 11  2020 recovery.log
-rwxr----- 1 nonthevisor nonthevisor 1014M Feb 11  2020 system.ext4.win
-rwxr----- 1 nonthevisor nonthevisor    82 Feb 11  2020 system.ext4.win.sha2
-rwxr----- 1 nonthevisor nonthevisor    65 Feb 11  2020 system.info

What I tried

Here are the things I tried, in the order I tried them. After each attempt, I tried to reboot, the error is still there.

Restore backup from device

  1. boot to recovery mode
  2. select restore
  3. notice that there are no backup files found on the device

Restore backup from pc

  1. boot to recovery mode
  2. connect to pc
  3. try to mount USB-OTP
  4. "unable to mount"

Flash new lineageos image via heimdall

  1. confirm heimdall is running by typing heimdall version
  2. boot phone to download mode
  3. type heimdal print-pit to check if device is found
  4. ERROR: Failed to detect compatible download-mode device.

Install lineageos from recovery via adb

  1. boot phone to recovery mode
  2. select sideload
  3. on host, type adb sideload lineage-16.0-20201022-nightly-kccat6-signed.zip
  4. error: no devices/emulators found

I've read this thread, but since I'm stuck in boot loop I cannot enable USB debugging on the device.

Factory reset

  1. recovery mode
  2. select wipe
  3. wipe
  4. reboot
  5. still boot loop

However, it doesn't ask me for my decryption pattern anymore, so the reset must have been at least partly successful.

nonthevisor
  • 171
  • 1
  • 6
  • 1
    In your first sentence you already mentioned that your phone has been damaged by water. Why do you think that installing a new firmware would "heal" this damage? – Robert Oct 24 '20 at 18:46
  • just dry the short-circuited buttons – alecxs Oct 24 '20 at 20:22
  • @Robert the reason is that clearly the hardware is still functioning to some degree, seeing as it can boot into recovery or download mode. I just included the information about water damage because 1) it was the event that caused the problem and 2) maybe someone had a similar problem and thus knows the solution – nonthevisor Oct 25 '20 at 11:49
  • @alecxs I forgot to mention it in my question, but I already let the phone dry for several days. I edited that in, thank you for pointing it out – nonthevisor Oct 25 '20 at 11:52
  • @alecxs I do have a backup, and luckily also copied it to my desktop computer – nonthevisor Oct 26 '20 at 12:07
  • we will help you restore that backup. what are the file names? please update your question with that info – alecxs Oct 26 '20 at 13:20
  • @alecxs thank you, I have updated the question accordingly – nonthevisor Oct 28 '20 at 14:31
  • adb is working in TWRP (not sideload)? boot.emmc.win can be flashed directly, system.ext4.win data.ext4.win can be extracted with gnu tar. from cmd line check the partitions with *ls -d $(find /dev/block -name by-name)/** – alecxs Oct 28 '20 at 16:46
  • format the data partition with *mke2fs -t ext4 /dev/block/*/userdata* – alecxs Oct 28 '20 at 16:50
  • get a working gnu tar binary and copy to ram via adb push tar /tmp/tar – alecxs Oct 28 '20 at 16:56
  • mount the /data partition and extract both files for each own: gzip -cd data.ext4.win000 | /tmp/tar --selinux --xattrs -vxpC /data (repeat for data.ext4.win001) finally check if /data/system/packages.xml exist (correct path) – alecxs Oct 28 '20 at 17:10
  • (if MicroSD Card not working you can adb push the files into fresh formatted /data partition before extracting, and delete them after successful extract) – alecxs Oct 28 '20 at 17:19
  • (if the path is doubled like /data/data/system/packages.xml start from beginning but instead with that command gzip -cd data.ext4.win000 | /tmp/tar --selinux --xattrs -vxpP – alecxs Oct 28 '20 at 17:22
  • I will try tomorrow and give feedback then, thank you already for your answer. one problem I expect to encounter though: I might not be able to flash boot.emmc.win, since adb gave me the "no devices/emulators found" error – nonthevisor Oct 28 '20 at 19:16
  • you can flash from TWRP (adb shell or terminal) cmd line: cat boot.emmc.win > /dev/block/platform/msm_sdcc.1/by-name/boot (or adb push boot.emmc.win /dev/block/platform/msm_sdcc.1/by-name/boot) – alecxs Oct 28 '20 at 22:27
  • you can do the same for lineageos if you decompress system.new.dat.br with brotli and convert with sdat2img.py (or just place the zip file somewhere at /data and install from gui) – alecxs Oct 28 '20 at 22:33
  • maybe it's already sufficient only format userdata with mke2fs. after reboot recovery /data should be mountable. then it should be possible to adb push twrp backup to /sdcard and restore it from twrp menu as usual. i will write this as answer after you confirmed solution – alecxs Oct 29 '20 at 08:10

0 Answers0