[Samsung Galaxy Tab A series Questions & Answers] moltu:
Hi,

So, as I said in the title, I have a Samsung Galaxy Tab a 9.7 SM-5555 device running on the official Android 7.1 (P555XXU1CQL3) by Samsung, and I also have the kernel's source code for that same stock firmware (P555XXU1CQL3), I got it from opensource.samsung.com.

So since I'm new to this field, I thought that the best thing I can do to learn before trying to build a lineage ROM, is to build a fresh up-to-date TWRP for my tablet (I am aware of twrp_3.0.2-1_SM-P555_mm_15816.tar and it's working fine, I just wanna build an updated version myself, cuz why not right?)

So I used the shallow clone twrp omni 7.1, since I'm only building the recovery image (it has arm-eabi-4.8 compiler btw).

my BoardConfig.mk is inheriting device/samsung/msm8916-common/BoardConfigCommon.mk, and I had to delete some things from BoardConfigCommon cuz they are not necessary (I think :D).

At this point I got everything setup, the device tree + the kernel, after I run the make cmd : make clean && make -j64 recoveryimage

It build successfully until 99%, and then it says the recovery image is too large, which is true, since my BOARD_RECOVERYIMAGE_PARTITION_SIZE := 15728640 - I got it from my tablet, while the out/../recovery.img is 16.7MB.

After some research, I find out that the kernel is using CONFIG_KERNEL_LZ4=y to compress/decompress things, so I tried several things like: LZMA, GZIP, CONFIG_KERNEL_XZ, and the build passes if I use any of them :D, I get an image between 13MB <=recovery.img <=15MB.

Now it's time to flash it right, so I use Odin v3.14.1 since it's working great for the already made twrp_3.0.2-1_SM-P555_mm_15816.tar and because if I boot my tablet in Download mode adb reboot bootloader, ADB and fastboot can't detect my device anymore, so I used Odin.

Now I flashed the recovery successfully, without auto reboot, and then I jump to recovery mode to find the Odin label at the top left (just like in download mode) but the screen is in black & shows the Samsung Galaxy logo and nothing happens. It feels like it doesn't even read the recovery, no crashes, no nothing, I'm not sure if it reads or not, since I can't debug it anw, it doesn't show in adb devices nor fastboot.

At this point I spent a lot of time trying to build this recovery but It just doesn't boot, I double checked my twrp.fstab :

#mount point fstype device [device2]

/boot emmc /dev/block/bootdevice/by-name/boot

/recovery emmc /dev/block/bootdevice/by-name/recovery flags=display="Recovery";backup=1

/data ext4 /dev/block/bootdevice/by-name/userdata flags=fsflags=rw,discard,nosuid,nodev,noatime,nodiratime,inline_xattr,inline_data; encryptable=/dev/block/bootdevice/by-name/encrypt

/cache ext4 /dev/block/bootdevice/by-name/cache

/system ext4 /dev/block/bootdevice/by-name/system

#/misc emmc /dev/block/bootdevice/by-name/fota

/efs ext4 /dev/block/bootdevice/by-name/efs flags=backup=1;display=EFS

#/efs1 emmc /dev/block/bootdevice/by-name/modemst1 flags=backup=1;subpartitionof=/efs1

#/efs2 emmc /dev/block/bootdevice/by-name/modemst2 flags=backup=1;subpartitionof=/efs1

/firmware-modem vfat /dev/block/bootdevice/by-name/modem flags=backup=1;display="Modem"

/firmware vfat /dev/block/bootdevice/by-name/apnhlos flags=backup=1;display="Firmware"

/external_sd auto /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=display="Micro SDcard";storage;wipeingui;removable

/usb-otg auto /dev/block/sda1 /dev/block/sda flags=display="USB-OTG";storage;wipeingui;removable

I don't think it's the problem, or is it?

I would really really love to hear any ideas, suggestions, I spent quite some time trying to figure this out and this is not the ending I was hoping for XD.

Any help is greatly appreciated,

Thanks in advance & stay safe :D