[Galaxy S 4 i9505 Original Android Development] yfriday14:
Since I can not boot into any of the ROMS, I decided to start from beginning by flashing original stock rom (after backup & cleanup).

Steps:

- made a full backup from TWRP -> moved to computer

- made a backup of internal sdcard to my computer

- made a backup of external sdcard to my computer

- took the external sdcard out, and using an USB 3.0 card reader, formatted & tested for errors. NO errors. The Samsung EVO 64Gb class10 card speed was 43 Mb/s read and 21 Mb/s write.

- wiped out with TWRP some important partitions: Dalvik, /system, /data, /sdcard (internal sd), /cache. Did NOT touch EFS!

- Flashed original stock rom (I9505XXUHOJ2) for i9505 (jfltexx) with ODIN 3.11.1. Flashing failed a few times, then after searching Google, took advice to try other cables, until I got success.

- rooted with CF-ROOT method

- flashed TWRP 3.0.2

- Installed a few apps into stock rom, including Dual Boot Patcher.

- Patched CM13 rom as ext-slot-cm13tmp

- Flashed ext-slot-cm13tmp patched rom from recovery. Flashing took 6 hours 39 minutes. It seems to hang at "Patching system image unconditionally" text, but after 6-8 hours usually finishes...

- Rebooted to switch to ext-slot-cm13tmp

- Switched to ext-slot-cm13tmp in recovery

- reboot

- Boot unsuccessful, 5 vibration, then reboot to TWRP recovery.

- Flashed getlog, Log attached.

I checked the log and found something interesting:

[ 9.188659] mblog: 1 fstab entries for the external SD
[ 9.188781] mblog: [Attempt 1/10] Finding and mounting external SD
[ 9.188903] mblog: Matching devices against pattern: /devices/platform/msm_sdcc.2/mmc_host/mmc2*
[ 9.196319] synaptics_rmi4_i2c 3-0020: synaptics_init_power_on: until lcd does not turn on.
[ 10.189178] mblog: [Attempt 2/10] Finding and mounting external SD
[ 10.189361] mblog: Matching devices against pattern: /devices/platform/msm_sdcc.2/mmc_host/mmc2*
[ 10.196380] synaptics_rmi4_i2c 3-0020: synaptics_init_power_on: until lcd does not turn on.
[ 10.796325] max77693-muic max77693-muic: func:max77693_muic_usb_detect info->muic_data->sw_path:0
[ 11.189605] mblog: [Attempt 3/10] Finding and mounting external SD
[ 11.189727] mblog: Matching devices against pattern: /devices/platform/msm_sdcc.2/mmc_host/mmc2*
[ 11.196350] synaptics_rmi4_i2c 3-0020: synaptics_init_power_on: until lcd does not turn on.
[ 11.570617] [SSP]: MSG From MCU - Init
[ 11.570617] Gyro Temp Init
[ 11.570617] CheckLightLux Init
[ 11.570617] AD 6 1 0 1
[ 12.076324] [SSP]: debug_work_func(1) - Sensor state: 0x3fff, RC: 0, MS: 0
[ 12.190032] mblog: [Attempt 4/10] Finding and mounting external SD
[ 12.190155] mblog: Matching devices against pattern: /devices/platform/msm_sdcc.2/mmc_host/mmc2*
[ 12.196350] synaptics_rmi4_i2c 3-0020: synaptics_init_power_on: until lcd does not turn on.
[ 13.190460] mblog: [Attempt 5/10] Finding and mounting external SD
[ 13.190582] mblog: Matching devices against pattern: /devices/platform/msm_sdcc.2/mmc_host/mmc2*
[ 13.196350] synaptics_rmi4_i2c 3-0020: synaptics_init_power_on: until lcd does not turn on.
[ 14.190887] mblog: [Attempt 6/10] Finding and mounting external SD
[ 14.191009] mblog: Matching devices against pattern: /devices/platform/msm_sdcc.2/mmc_host/mmc2*
[ 14.196319] synaptics_rmi4_i2c 3-0020: synaptics_init_power_on: until lcd does not turn on.
[ 15.191314] mblog: [Attempt 7/10] Finding and mounting external SD
[ 15.191436] mblog: Matching devices against pattern: /devices/platform/msm_sdcc.2/mmc_host/mmc2*
[ 15.196350] synaptics_rmi4_i2c 3-0020: synaptics_init_power_on: until lcd does not turn on.
[ 16.191741] mblog: [Attempt 8/10] Finding and mounting external SD
[ 16.191864] mblog: Matching devices against pattern: /devices/platform/msm_sdcc.2/mmc_host/mmc2*
[ 16.196350] synaptics_rmi4_i2c 3-0020: synaptics_init_power_on: until lcd does not turn on.
[ 17.192169] mblog: [Attempt 9/10] Finding and mounting external SD
[ 17.192291] mblog: Matching devices against pattern: /devices/platform/msm_sdcc.2/mmc_host/mmc2*
[ 17.196350] synaptics_rmi4_i2c 3-0020: synaptics_init_power_on: until lcd does not turn on.
[ 18.192596] mblog: [Attempt 10/10] Finding and mounting external SD
[ 18.192749] mblog: Matching devices against pattern: /devices/platform/msm_sdcc.2/mmc_host/mmc2*
[ 18.192932] mblog: Failed to mount /raw/extsd
[ 18.193084] mblog: Failed to mount fstab

So the external SD card was not found and not mounted.

But it is searching on the path:

/devices/platform/msm_sdcc.2/mmc_host/mmc2*

I went to TWRP recovery, opened terminal and checked the paths, but

/devices/platform/msm_sdcc.2/mmc_host/

directory does not exist.

However

/devices/platform/msm_sdcc.2/

directory exists and has a linked file:

mmcblk1 -> /dev/block/mmcblk1

So only

/devices/platform/msm_sdcc.2/mmcblk1

path exists for external sd on Samsung Galaxy S4 i9505 (jfltexx).

In

mbtool/mount_fstab.cpp

the mount_extsd_fstab_entries() should also look for

/devices/platform/msm_sdcc.2/mmcblk1

path.

This is the reason why my ROMS are not booting.

I hope [MENTION=4277844]chenxiaolong[/MENTION] will be able to fix it after arriving back from holiday.