[Galaxy Tab 2 General] LukasTomek:
There are more possibilities how to repair Hardbrick Samsung Galaxy Tab 2:

* For those who damaged boot loader can try Running stock U-Boot from SD Card

* For those who have HW fault like eMMC bug can participate on development Running entire system from SD Card

The second one may be solve later with help of some experienced people.

Run stock U-Boot from SD Card

Requirements

* Hardbrick Samsung Galaxy Tab 2 (GT-P5100). This can be recognized that it don't do nothing, charging not working, power button do nothing, recovery not working. More info How To Unbrick Your Galaxy Tab!

* SD Card Support UHS-I UHS104 (SDR104), with is not easy to determine with Card support this format and with not. I tried many cards and label UHS-I is not enough so i asked SanDisk support they recommended SanDisk Extreme. I bought SanDisk Extreme 32GB, and this card is working. I would say that every card 90MB/s+ should work.

step 0 not for Linux

Windows

* Install drivers for OMAP 4430 Guide / Drivers inside OMAPFlash download

* VirtualBox with Linux

* Set VirtualBox to capture OMAP 4430

* Download win iso burner

step 1

Windows & Linux

* Download [omapboot](https://github.com/LukasTomek/omapboot) to Linux

* Download [ Debrick dump imgs](https://xdaforums.com/showpost.php?p=65114419&postcount=2)

step 2

Prepare SD card

Windows

Usewin iso burner to write Debrick dump imgs to Sd Card.

Linux

Write Debrick dump imgs to Sd Card.

Be careful to use right device sdX

dd if=debrick.img of=/dev/sdX

step 3

In Linux Run

root@debian:/home/lukas/SamsungP5100/omapboot# python3 omapboot.py -b

you will see:

root@debian:/home/lukas/SamsungP5100/omapboot# python3 omapboot.py -b

Boot from MMC1 interface selected.
Waiting for omap44 device.

* Connect Tablet to PC

* Press Power button for long time approximately 10s

* You should see this in command line:

Boot from MMC1 interface selected.
Waiting for omap44 device.
Model: 4430
ROM revision: 0x04
CH: enabled
Underdocumented ASIC subblock #18: 00
IDEN: 0xE5FD23CE0F5FDF902D7EDA9B4D848D687F62372A
MPKH: 0xB585ACF1DD15B06A74813BFDDD6ECD64227CE4C90658C65B4C53AC229B4C6DC0
CRC0: 0x9C669AD9
CRC0: 0x682ADCCF
recevied ASIC ID banner:
Model: 4430
ROM revision: 0x04
CH: enabled
Underdocumented ASIC subblock #18: 00
IDEN: 0xE5FD23CE0F5FDF902D7EDA9B4D848D687F62372A
MPKH: 0xB585ACF1DD15B06A74813BFDDD6ECD64227CE4C90658C65B4C53AC229B4C6DC0
CRC0: 0x9C669AD9
CRC0: 0x682ADCCF
Giving x-loader a chance to come up...Probably loaded!

* Tablet should start to some firmware recovery mode see picture

[IMG="BootBrokenMMC"]https://www.lukastomek.info/2018/11/05/UnBrick-Samsung-Galaxy-Tab/Boot_BrokenMMC.jpg[/IMG]

* You should be able to use ODIN to repair internal memory, in my case ODIN stop in the half of loading, I probably have eMMC bug.

Running entire system from SD Card

I'm trying to modify U-Boot and Kernel to load entire system from SD Card. Some have done it Say hi to "CyanoBoot" -- a 2nd bootloader/w menu aka "ub2" different device same CPU.

First step of boot is loading x-loader. The x-loader is signed so we have to use original one from Samsung. After some peripheral initialization x-loader copy u-boot to ram checking for magic constant as copied code and execute it. This is the place where we can change u-boot to boot from SD Card, because x-loader load u-boot from the same device as was loaded him.

u-boot source

Do anyone have u-boot source from Samsung?

I used this Guide and copy something from Nook device u-boot source because they made boot from SD Card on same CPU OMAP4430. And lge_p920 from LG Open-source repository. Do anyone have better idea?

How to compile

[u-boot source](https://gogs.lukastomek.info/lukas/u-boot)

[Building U-BOOT #(for Blaze)](http://omappedia.org/wiki/4AJ.2.5_OMAP4_Jelly_Bean_Release_Notes)

Kernel

I'm using Stock boot.img from O2C-P5100XXDMJ2-20131203002840.zip package. Do anyone have kernel booting from SD Card?

Prepare Debrick.img

Rewrite part of Image Files

Write recovery.img to specific address in debrick_changed.img address 0x2C00000 write in hex or dec depend on system (seek=$((0x1800000)) for linux) (seek=46137344 for Windows).

You need to rewrite:

x-loader (MLO) 0x20000

u-boot (Sbl.bin) 0x1800000

boot.img 0x2400000

recovery.img 0x2C00000

dd if=C:\temp\Tablet\sdCardDebrick\recovery.img of=C:\temp\Tablet\sdCardDebrick\debrick_changed.img seek=$((0x1800000)) oflag=seek_bytes conv=notrunc

UART Debugging

Pin 21 of [Samsung Galaxy Tab 30 Pin Dock Connector Pinout](https://xdaforums.com/showthread.php?t=1118986) is output of debug messages for x-loader and u-boot (port UART4). I would like send Kernel debug output to this port. Anyone know how to do it?[/HTML]I’m using UB232R for conecting to PC.

Output from debugging:

ŕ<0>

Texas Instruments X-Loader 1.41 (Apr 10 2013 - 20:55:49)
Starting OS Bootloader from MMC/SD1 ...

U-Boot 1.1.4-g01076139-dirty (Jan 8 2019 - 14:49:13)

U-Boot code: 80E80000 -> 80EAA870 BSS: -> 80F2F964
Load address: 0x80e80000
DRAM: 2048 MB
Flash: 0 kB
Using default environment

In: serial
Out: serial
Err: serial
Initializing SD(0) Slot.
ptbl slot: SD:(0).
8192 20M EFS
49152 2M SBL1
53248 2M SBL2
57344 8M PARAM
73728 8M KERNEL
90112 8M RECOVERY
106496 700M CACHE
1540096 20M MODEM
1581056 1400M FACTORYFS
4448256 12343M DATAFS
29728734 512M HIDDEN
efi partition table:
bootcmd booti mmc0ptbl slot: SD:(0).
8192 20M EFS
49152 2M SBL1
53248 2M SBL2
57344 8M PARAM
73728 8M KERNEL
90112 8M RECOVERY
106496 700M CACHE
1540096 20M MODEM
1581056 1400M FACTORYFS
4448256 12343M DATAFS
29728734 512M HIDDEN
Net: KS8851SNL
arch_number = 0x00000870
board rev = 0x00000000
env_t = 0x00000000
boot_params = 0x80000100
DRAM bank = 0x00000000
-> start = 0x80000000
-> size = 0x80000000
ethaddr = 00:00:00:00:00:00
ip_addr = 128.247.77.90
baudrate = 115200 bps
81200000: 52444e41 2144494f 0046add8 80008000 ANDROID!..F.....
81200010: 000b63a5 81000000 00000000 80f00000 .c..............
81200020: 80000100 00000800 00000000 00000000 ................
81200030: 00000000 00000000 00000000 00000000 ................
81200040: 736e6f63 3d656c6f 4f797474 31312c32 console=ttyO2,11
81200050: 30303235 6d20386e 313d6d65 4d343230 5200n8 mem=1024M
81200060: 646e6120 64696f72 746f6f62 6e6f632e androidboot.con
81200070: 656c6f73 7974743d 7620324f 3d6d6172 sole=ttyO2 vram=
kernel @ 80008000 (4632024)
ramdisk @ 81000000 (746405)
timed out in wait_for_bb: I2C_STAT=1000
I2C read: I/O error

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
ŕ<0>

This look like kernel is executed but no more info. I tried set ttyO0 - ttyO4 ttyS0 - 4 but no difference to get output from kernel. Do anyone have some idea how to get kernel output or what is wrong?