[Xperia Z5 Compact Q&A, Help & Troubleshooting] scjorge:
First, I apologize if I am writing a duplicate thread. If so, please link it.

As part of my Android-hobby-experiments with a rooted Sony Xperia Z5 Compact e5823 with Android MarshMallow, I attempted to use a partition of my external microSD card as swap area but ended up in a boot loop after reboot.

I have two partitions on the microSD card. One is fat32 and the other one is linux-swap. Both partitions were made under Debian using GParted, at different timepoints.

If I remember well, I did the following on a terminal emulator:

$ su
# mkswap /dev/block/mmcblk0p2
# swapon /dev/block/mmcblk0p2
(here I got an error. something like "Invalid argument".)
# free -m

I saw no improvement, so then I did:

$ su
# mkswap /dev/block/mmcblk0p3
# swapon /dev/block/mmcblk0p3
(here I got the same error.)
# free -m
(no improvement)
# exit
$ exit

Device was working normal after this.

Hours later, I reboot the phone (the camera sometimes crashes/freezes after taking a pic, so I took a pic, screen froze, took a screenshot, and rebooted). Then I reached a boot loop.

The screen showes the Sony Xperia logo, then the screen attempts to load the "powered-by.-ndroid-animation" but instead there is a black screen and a blinking red LED (4 times). The screen is then gray and the show repeats. I turned off the phone by opening it and disconnecting the battery :eek:

Then I took the microSD card out and the SIM card aswell. I swiched on the phone and the bootloop continued. :silly:

I can enter fastboot-mode (volume up + USB connection). Which I now use to switch off the phone instead of opening and disconnecting the battery :cyclops:.

Luckily, the device on fastboot-mode is listed the under Debian by the command

$ fastboot devices -l

, so I believe in hope to fix this boot loop w/o (re)flashing a ROM

It is also possible to run a custom recovery. I have run TWRP3.0 from this post and nilezon's version from this posts using the command

$ fastboot boot recovery.img

At the very beginning of the console of the recoveries there is an error:

Updating partition details . . .
Failed to mount '/lta-label' (No such device)
. . . done
Full SELinux support is present.
MTP Enabled

--- Update ---

I used the terminal using TWRP3.0 to read the file

/etc/fstab

and it looks as follows

/dev/block/mmcblk0p43 /system ext4 rw 0 0
/dev/block/mmcblk0p42 /data ext4 rw 0 0
/dev/block/mmcblk0p41 /cache ext4 rw 0 0
/external_sd vfat rw 0 0
/usb-otg vfat rw 0 0
/dev/block/mmcblk0p3 /firmware vfat rw 0 0
/dev/block/mmcblk0p38 /appslog ext4 rw 0 0
/dev/block/mmcblk0p40 /oem ext4 rw 0 0
/dev/block/mmcblk0p31 /persist ext4 rw 0 0
/dev/block/mmcblk0p2 /lta-label swap rw 0 0
/dev/block/mmcblk0p39 /diag ext4 rw 0 0

I decided to comment out

/dev/block/mmcblk0p2 /lta-label swap rw 0 0

and reboot. Boot loop persists in the same way and at the console of the recovery there is still, at the very beginning,

Failed to mount '/lta-label' (No such device)

I rechecked the

/etc/fstab

file and my modification was gone.

--- Update 2 ---

Today After connecting the SD card with a microSD-USB-adapter Debian shows the following error:

Error mounting /dev/sdb1 at /media/user/4C25-AD09: Command-line `mount -t "vfat" -o
"uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush" "/dev/sdb1"
"/media/jk/4C25-AD09"' exited with non-zero exit status 32: mount: /dev/sdb1: can't read superblock

Still, both partitions are recognized by GParted. "/dev/sdb1" is the fat32-partition. "/dev/sdb2" is the swap-partition. I can't access the first . . .

so I am stuck. dou you guys have any suggestion about what to try next? :cowboy: