Bricked Unit After MCU Update - MTCB Android Head Units General

I downloaded KLD 2.78 MCU and it bricked my unit within 2 seconds ! It was a bit strange how it happened so quick - I clicked on updates, it found the file, it asked if I wanted to install it, I clicked "yes" and then it went straight to the dead robot screen saying "error!", not heard of this behaviour before. The MCU appears totally dead, no beeps, nothing, the SoM works when put in my other unit, though it first booted to recovery but was fine after, meaning whatever happened affected android a little. Now the unit is totally dead, no power, wont start, no beeps, fuse is ok.
Cant think of any way round this other than getting a new board or getting a new MCU and soldering it to the board. Theres no recovery for MCUs as far as I m aware. Any one got any suggestions ?

You might be able to flash the current MCU chip directly while still on-board. To do this you would connect a 3.3v UART device to pins 18 & 19 of the MCU and to your pc, run STC's ISP programming tool on your pc, and then cycle power to the chip. This is referred to as "ISP" programming in the STC device documentation. That documentation also says that MCU pins 20 & 21 need to be temporarily grounded to get the MCU to power up in ISP mode.
An English version of the STC ISP programming tool is available for download from STC's website. Note there is also an open-source STC programming tool "stcgal" (written in Python 3) on github that does the same thing as the STC tool, and more. stcgal will run on both linux and windows systems (needs Python 3 and Python 3 setuptools installed).
To program the MCU this way you would also need to convert the mcu.img to .bin, which you can do using dark simpson's mtcmcutool.exe

Read through this! http://forum.xda-developers.com/and...d-kgl-unit-t3457538/post68656680#post68656680

dhmsjs said:
You might be able to flash the current MCU chip directly while still on-board. To do this you would connect a 3.3v UART device to pins 18 & 19 of the MCU and to your pc, run STC's ISP programming tool on your pc, and then cycle power to the chip. This is referred to as "ISP" programming in the STC device documentation. That documentation also says that MCU pins 20 & 21 need to be temporarily grounded to get the MCU to power up in ISP mode.
An English version of the STC ISP programming tool is available for download from STC's website. Note there is also an open-source STC programming tool "stcgal" (written in Python 3) on github that does the same thing as the STC tool, and more. stcgal will run on both linux and windows systems (needs Python 3 and Python 3 setuptools installed).
To program the MCU this way you would also need to convert the mcu.img to .bin, which you can do using dark simpson's mtcmcutool.exe
Click to expand...
Click to collapse
Hi,
i am trying to fix my MTCD HU and did the UART method but flashed the img as .bin, of course it still doesnt works and i think i need to convert it as you say, but how can i convert my dmcu.img (PX3) as mtcmcutool.exe prints this "Input file is too big, not looks like valid MCU FW image!"
Any hints are appreciated, thanks

Kayhan 17# said:
Hi,
i am trying to fix my MTCD HU and did the UART method but flashed the img as .bin, of course it still doesnt works and i think i need to convert it as you say, but how can i convert my dmcu.img (PX3) as mtcmcutool.exe prints this "Input file is too big, not looks like valid MCU FW image!"
Any hints are appreciated, thanks
Click to expand...
Click to collapse
Resellers provide encrypted mcu images.
New mcu tool in mtcd forums that can decrypt MTCD firmware - search for it.

marchnz said:
Resellers provide encrypted mcu images.
New mcu tool in mtcd forums that can decrypt MTCD firmware - search for it.
Click to expand...
Click to collapse
Hey Mate,
i searched using google and also inside the forums, either i am using the wrong keywords("mtcmcutool" "mtc mcu" "mtc mcu tool" "mcu tool mtcd") or it simply doesnt exists?
i somehow found yesterday the mtcmcutool.exe in v1.0 but was not even able to find it using the forums search(google...)...

Kayhan 17# said:
Hey Mate,
i searched using google and also inside the forums, either i am using the wrong keywords("mtcmcutool" "mtc mcu" "mtc mcu tool" "mcu tool mtcd") or it simply doesnt exists?
i somehow found yesterday the mtcmcutool.exe in v1.0 but was not even able to find it using the forums search(google...)...
Click to expand...
Click to collapse
forum.xda-developers.com/showpost.php?p=75097741&postcount=383

marchnz said:
forum.xda-developers.com/showpost.php?p=75097741&postcount=383
Click to expand...
Click to collapse
And https://forum.xda-developers.com/showpost.php?p=74989848&postcount=343 with link to this tool.
BTW
Flashing such a unpacked image will not help you.
As I wrote in post quoted by @marchnz, there is a bootloader that uploads the unpacked image and runs it
At the moment I do not know if someone has such a bootloader that could be flashed to the MCU first
If someone has it, I will gladly dowonload too
The only solution for the moment I see is to ask the seller.

delete this, i see Wadzios message now..

dhmsjs said:
You might be able to flash the current MCU chip directly while still on-board. To do this you would connect a 3.3v UART device to pins 18 & 19 of the MCU and to your pc, run STC's ISP programming tool on your pc, and then cycle power to the chip. This is referred to as "ISP" programming in the STC device documentation. That documentation also says that MCU pins 20 & 21 need to be temporarily grounded to get the MCU to power up in ISP mode.
An English version of the STC ISP programming tool is available for download from STC's website. Note there is also an open-source STC programming tool "stcgal" (written in Python 3) on github that does the same thing as the STC tool, and more. stcgal will run on both linux and windows systems (needs Python 3 and Python 3 setuptools installed).
To program the MCU this way you would also need to convert the mcu.img to .bin, which you can do using dark simpson's mtcmcutool.exe
Click to expand...
Click to collapse
Just to clarify for anyone reading this thread, the info I posted above applies ONLY to MTCB/C, and NOT to MTCD. The older MTCB/C units use an 8051-type processor for the MCU, while the MTCD units use an ARM processor.. The instruction sets for these two processors are completely different. Also the 8051-type processor is limited to 64k memory space, while the ARM processor is not. This is why the MCU flash images for MTCD units are larger than 64k, why mtcmcutool.exe gives that "too large" error message, and why you can't use an MCU image from MTCD in MTCB/C, or vise-versa.

dhmsjs said:
You might be able to flash the current MCU chip directly while still on-board. To do this you would connect a 3.3v UART device to pins 18 & 19 of the MCU and to your pc, run STC's ISP programming tool on your pc, and then cycle power to the chip. This is referred to as "ISP" programming in the STC device documentation. That documentation also says that MCU pins 20 & 21 need to be temporarily grounded to get the MCU to power up in ISP mode.
An English version of the STC ISP programming tool is available for download from STC's website. Note there is also an open-source STC programming tool "stcgal" (written in Python 3) on github that does the same thing as the STC tool, and more. stcgal will run on both linux and windows systems (needs Python 3 and Python 3 setuptools installed).
To program the MCU this way you would also need to convert the mcu.img to .bin, which you can do using dark simpson's mtcmcutool.exe
Click to expand...
Click to collapse
In addition, this method allows only to restore the work of the bricked MCU, because the firmware upgrade from the recovery mode will not work

Related

[Q] Capture image of a X8 internal memory

I am interested in creating a forensic image of a Xperia x8 internal memory (school purpose). When I connect the device with the USB cable I can only see the SD card partition. I tried with different tools: ProDiscoverer Basic, WinHex...
How can this be accomplished ?
I don't want to root, install a particular app or alter in any way the content of the internal memory, that will ruin the hole ideea of a forensic image..
Oh yeah.. on previous owned devices: SE Elm or SE Z520, after connecting the device I did have access to the internal memory.
Connecting the device in USB storage mode won't get you any far. That way, as you already worked out, you only gain access to the SD card contents.
You actually need to look into the "adb" commandline tool that comes as a part of the Android SDK (if you look around on XDA you will find adb.exe plus the two required DLLs so you don't need to install the whole SDK along with the Java JDK).
The problem you will face:
If the the phone isn't rooted you won't be able to gain access to all parts of the internal file-system (i.e. some directories may appear empty though there are files and directories inside).
Apart from that - that's not a approach fit for forensic analysis.
IF you would want to tap into a device that's up for forensic investigation the worst thing you can possibly do is to actually turn the device on, let alone boot it up. Chance are that this could destroy valuable evidence (don't take everything you see in CSI:Retards for real) or trigger a "killswitch" that could delete data.
To perform a real forensic analysis you would actually take the phone apart and tap into the system through the JTAG interface. There you are talking directly to the hardware without the phone being booted or even "turned on" (it'll just sit there in "standby-ish" mode).
From there you would then dump the contents of the NAND (the internal memory of the phone where the Android OS, data and installed apps reside) into a file on your computer to perform further analysis.
Once the content of the NAND is secured you can crack down on the SD card (to secure further data for investigation) by slapping it into a card reader being WRITE PROTECTED and do a dump of the SD into a image you can then later mount or hex-view on the computer.
In other words ... to "emulate" a forensic analysis (by ignoring the fact to break basic safety measures) you would actually need to ROOT the phone. Once you did that, and therefore have busybox and su in your ROM, you can then use "mtd_utils" to dump the nand into a file for further analysis.
EDIT:
MTD Utils (i.e. dump the content of the NAND)
These files need to go onto your phone! This are NOT executables for Windows or Linux desktop PCs!
ADB (Windows, Android Platform Tools r10 at the time of writing)
Download the ZIP and extract it ... you only need adb.exe, adbwinapi.dll and adbwinusbapi.dll
Do NOT forget that the Android drivers for your phone need to be installed!
Thanks for the answer. Do you know/have any links regarding what cables/connectors or other hardware tools I need to tap into the system through the JTAG interface.
I found a link:
gsm-technology.com/index.php/en_US,details,id_pr,8466,menu_mode,categories.html
.. dude has a lot o hardware equipment and cables... where can I get & buy stuff like that?
I would try eBay first - or look into finding online retailers selling you a RIFF Box plus required toolset.
Since you said it's for a study project I'm not sure if the equipment you need to really replicate a "professional forensic analysis" will match your budget. A RIFF Box usually goes for USD 150+ over the counter, and then you need some experience to get it to good use and also know a thing or two about electronics in general.
EDIT: Well, the link you posted is the JTAG Header adapter (for the X8 and possibly also W8). If you scroll down they also have the RIFF Box for EUR 119,00 enlisted. And it seems that's actually a online retailer where you could buy the stuff.
---------- Post added at 11:12 AM ---------- Previous post was at 11:02 AM ----------
Ok, to pull it together ...
Xperia X8/W8 is based on the MSM7227 CPU, hence you need ...
Medusa JTAG Box EUR 119,00 (w/o VAT)
Supports MSM7227 based devices. Cables come with the box.
JTAG Xperia X8 EUR 8 (w/o VAT)
That's the JTAG header adapter
Apart from that you may need some software and a good idea about how to wire the cable from the Medusa Box to the pins on the JTAG adapter. Chances are you may also need a power adapter to power the JTAG (if powering the phone through USB doesn't work).
EDIT: Forgot: While the Xperia phones aren't really listed at the RIFF Box that box should work as well.

TI OMAP Drivers (now with 4470)

I modified a little bit omap_winusb.inf file for existing TI OMAP Drivers and now it supports OMAP4470 CPU too.
I just added only some lines for OMAP4470 device ID like:
Code:
%USB_OMAP4470% = USB_Install, USB\Vid_0451&Pid_d012
This driver can be installed on Windows x86 and x64 as well. I hope it will help somebody to make an unbricker for my Kindle Fire HD 8.9 (now it can be detected only like an OMAP4470 device).
Drivers attached to this post.
Woonder.ua said:
I modified a little bit omap_winusb.inf file for existing TI OMAP Drivers and now it supports OMAP4470 CPU too.
I just added only some lines for OMAP4470 device ID like:
Code:
%USB_OMAP4470% = USB_Install, USB\Vid_0451&Pid_d012
This driver can be installed on Windows x86 and x64 as well. I hope it will help somebody to make an unbricker for my Kindle Fire HD 8.9 (now it can be detected only like an OMAP4470 device).
Drivers attached to this post.
Click to expand...
Click to collapse
Do you know how to use this driver mode?
adb code ? or fastboot code?
I know that this driver can be used in download mode (for example, to load external boot via USB cable and fix internal one). However I don't know how to use it programmatically.
Just a guess it`s for usb boot just like in the usage for firekit for the first gen kindle.
Exactly. However, I know no one tool, which can be applicable to flash OMAP4470 device in Windows. May be OMAPflash tool can do this, but I don't know how.
I wonder if there a chance of a windows based firekit for second gen devices. Although sadly windows is very crappy with these sort of applications, drivers and such.
I don't think so, because I know a lot of android devices on another processors, which supports flashing through download mode in Windows, even Samsung Galaxy Nexus (edition with OMAP processor). For example, my primary smartphone is JIAYU G2 based on MTK6577, and it can be flashed through download mode with battery removed - MediaTek distributes firmware tool for vendors only, but it was spread to destination users extremely fast because vendors don't want to make their own flash tools for fastboot/adb mode. So, I think it is possible indeed, but we need a right tool for flashing. And I know that Texas Instruments has such tool, but it is distributed only for device manufacturer.
I was goijg through firekit and found that there is binary named usbboot
Since I have no experience with original kindle I little bit skeptical about this binary
Is it provided by amazon/ti
Or is it built by pokey
In any ways is there same binary or method to boot KHFD 8.9
Sent from my GT-N7100 using xda app-developers app
kanchan.n.mahajan said:
I was goijg through firekit and found that there is binary named usbboot
Since I have no experience with original kindle I little bit skeptical about this binary
Is it provided by amazon/ti
Or is it built by pokey
Click to expand...
Click to collapse
usbboot website
kanchan.n.mahajan said:
In any ways is there same binary or method to boot KHFD 8.9
Click to expand...
Click to collapse
Quoted from a PM...
Pokey9000 said:
When the OMAP USB boots, it first waits a bit to handshake with a host. If the handshake is successful, the host sends a small loader to the OMAP that then does some hardware init and handshakes again with the host to get a payload to shove into RAM. This loader is similar to x-loader in that it has to be small enough to fit in the SRAM of the OMAP, and does low level initialization like mux, clock, and memory setup. However it differs in that it replaces the MMC and FAT handling in x-loader with USB loading as there's not enough room for a generic x-loader that does MMC and USB.
On HS OMAPs, this initial USB loader payload must be signed just like x-loader has to be for eMMC boot. If the payload doesn't have a signature that checks out, the OMAP halts until it's reset. This is enforced by hardware, so short of finding a sploit in the OMAP ROM code or a copy of Amazon's USB boot tools used in factory it's not going to work.
Click to expand...
Click to collapse
In short...no.
soupmagnet said:
usbboot website
Quoted from a PM...
In short...no.
Click to expand...
Click to collapse
Do you know how to download usbboot?
and how to use it???
Thanks!
Has anyone had any luck in recovering an 8.9 HD stuck in omap only mode?
In theory: Need a compatible usbboot/aboot which can bring up some kind of bootloader to enable fastboot for reflash all original partitions.
The reality: I'm not sure at what point the signature checks would be enforced. If usbboot needs to be signed to even load.. then it's dead.
Hashcode said:
In theory: Need a compatible usbboot/aboot which can bring up some kind of bootloader to enable fastboot for reflash all original partitions.
The reality: I'm not sure at what point the signature checks would be enforced. If usbboot needs to be signed to even load.. then it's dead.
Click to expand...
Click to collapse
Much appreciated Hash. I guess he is better off ditching it on eBay for parts or praying Amazon will replace it for him.

[Q] XT890's Medfield SoC architecture

(I know this thread maybe should belong to Development forum, but I'm posting here since I don't have enough posts to discuss there yet)
I'm in the second year of Computer Science, being a dynamic/interpreted languages programmer for over 6 years now, C/C++ for 2 years.
I have a solid understanding on the x86 PC architecture: interrupts, buses, etc. I'm pretty good at basic x86 assembly... Been studying UEFI for over a month... Whatever.
I've lost the past couple hours searching but didn't find anything on the architecture of our device. Is the "Bootloader" here compared to a BIOS? Or is it like any PC bootloader (MS-DOS, Windows, Linux bootloaders). Is there anything like a BIOS at all or does the OS, once booted, manages all the hardware interrupts by itself? Can I use INT 10H on XT890? Is it ANYTHING close to the PC architecture?
PCI, ISA, (parallel and serial) "ports" managed by a chipset between the peripherals and the x86 core itself?
Ok, it's x86. Once the system has booted, we can call x86 instructions, ok... But what is under that? Is there any reference on this? How can I boot my own code, if it's not Linux?
I really got nowhere trying to learn about the architecture underneath Android and Motorola's Bootloader on Medfield. Found nothing on Intel nor Motorola websites. What am I doing wrong?
Thanks in advance!
I'm studying this myself but there is a lot that i need to learn. Check those to see if helps.
http://bootloader.wikidot.com/android
http://elinux.org/Android_Booting
http://www.ibm.com/developerworks/linux/library/l-linuxboot/
I would like more info about the RAZR I as well, considering it's the only mainstream phone with a x86 processor I'd expect more documentation about it, I am receiving a RAZR I soon.
For what I know, it's boot process is similar to other Android devices, it loads and decompresses a boot.img file that includes a ramdisk and the kernel, you should be able to load another non-linux OS by chainloading a secondary bootloader there, I honestly would like to see more development on the Razr i, specifically to get native Gnu-linux with x11 running
Using @thiagomtl's links, I was able to understand a little more about the Boot process. XT890 seems to have basically the same mechanics of the ARM ones, but x86 tuned.
However I'm yet to understand the differences between "normal" Linux bootstrapping and the Android Bootloader's one.
On a average legacy Linux box we have GRUB/LILO on the MBR. Making a hell of a simplification here: The user turns the PC on, BIOS does the POST and then loads whatever code is on the MBR. GRUB is a very small program there, which simply loads a driver for the storage device, loads vmlinuz and the f*ing ramdisk on the memory and executes it (effectively by simply pointing the IP to the address where the kernel is on the memory).
Samuelgames said:
I would like more info about the RAZR I as well, considering it's the only mainstream phone with a x86 processor I'd expect more documentation about it, I am receiving a RAZR I soon.
For what I know, it's boot process is similar to other Android devices, it loads and decompresses a boot.img file that includes a ramdisk and the kernel, you should be able to load another non-linux OS by chainloading a secondary bootloader there, I honestly would like to see more development on the Razr i, specifically to get native Gnu-linux with x11 running
Click to expand...
Click to collapse
But the Boot process is just a part of my original question. Ok, a important one, but a part.
What about the structure of the device? How it's all implemented? Is the display using plain old VESA VBE? Are the input devices PS/2? USB? Is the power implemented using ACPI standards? lol
As far as I'm concerned Atom SoC doesn't respect many industry standards for the architecture, even for those who run Windows 8, buttons on the Razr I should be naturally be defined as GPIO as the notification LED, I don't think the display respects VESA standards (SGX 540 can't even do scaling) but it should fallback to them at some extent depending on how you initialize the framebuffer.
All of this should be in the Motorola kernel, I haven't taken a look at it but I'll surely will once I get my phone
@Hazou, @YaPeL, @Omar-Avelar
you guys know anything about this?
Ok this is all i know about it by searching through the code and internet and by finding out myself (no sources included, just my memory). It's all linux, nothing like Windows.
Kernel:
We indeed are making a x86 kernel, but not for normal PC's. We use the mid-x86 implementation within the x86 code of the kernel. (arch/x86/platform/mid-x86) MID is the intel word for all the socs for mobile platforms intel is using. The normal upstream linux doesn't provide all the necessary code. And is has changed with the new android version 4.4.2 for our device.
Boot sequence:
The android devices use some sort of bootloader. Droidboot. Droidboot includes the fastboot commands and starts the bringup of the android system. You can read about it on the internet. In most devices (ARM) it is the first thing thats get called for.
Our intel device is a little different. Before the droidboot gets loaded the firmware of the device loads another OS. Also called POS (i think preprocessor OS, or something). Those gets updated with the dix and efwi(wrong name) files we got. The POS can be accessed by booting in the medfield download through the camera button, if i am correct. The POS then loads the droidboot which will in turn load the rest, like a linux device which loads from the bootloader.
The partition layout can be found in the gpt.bin. It can be flashed through fastboot and can change every partition afaik.
So the boot order is:
1. POS/RADIO
2. DROIDBOOT
3. BOOT.IMG is like linux. First the kernel then the ramdisk with the kernel modules.
4. ANDROID
To comment about the JB implementation.
We can build our own kernel and we can, if we want and take the time, upgrade the kernel to the newest version (for android is that 3.10, but we should be able to manage to go fully upstream 3.17). But that takes a lot of time.
I also noticed that, from what i heard, some kernel modules specific for our device has changed and now the kernel that we have can't load the new firmware files in 4.4. So we will need the next kernel from Moto to compile our own when 4.4.2 is released. Those changed are not upstream.
Hazou said:
The POS then loads the droidboot which will in turn load the rest, like a linux device which loads from the bootloader.
The partition layout can be found in the gpt.bin. It can be flashed through fastboot and can change every partition afaik.
So the boot order is:
1. POS/RADIO
2. DROIDBOOT
3. BOOT.IMG is like linux. First the kernel then the ramdisk with the kernel modules.
4. ANDROID
Click to expand...
Click to collapse
This is the most interesting part for hundreds of us. Is there a way we can find what sectors are used for the pos so we can possibly repair code corrupt?
I have a feeling the gpt is messed up so any amount of writing to the dnx or ifwi will be in the wrong location.
I can't find any information on this phone at all.
I think it's time I bought a spare mobo and dumped everything to compare a broken to working
Flacid Monkey said:
This is the most interesting part for hundreds of us. Is there a way we can find what sectors are used for the pos so we can possibly repair code corrupt?
I have a feeling the gpt is messed up so any amount of writing to the dnx or ifwi will be in the wrong location.
I can't find any information on this phone at all.
I think it's time I bought a spare mobo and dumped everything to compare a broken to working
Click to expand...
Click to collapse
If i am correct they are present on the partition layout of the phone. I just don't know wish ones are the right ones. Never looked good enough at that.
Also to repair the gpt and write the dnx or ofwi to the right location u need a dd command or flash command with the right parameters. The flash command most likely won't work because of the gpt partition and the DD command wont either because most of the time u don't have access to a recovery anymore.
But my knowledge about this is limited, so if u dare to put your phone on the line and have maybe the knowledge and skills to do what some people need, please do I can't and need my phone working
Hazou said:
If i am correct they are present on the partition layout of the phone. I just don't know wish ones are the right ones. Never looked good enough at that.
Also to repair the gpt and write the dnx or ofwi to the right location u need a dd command or flash command with the right parameters. The flash command most likely won't work because of the gpt partition and the DD command wont either because most of the time u don't have access to a recovery anymore.
But my knowledge about this is limited, so if u dare to put your phone on the line and have maybe the knowledge and skills to do what some people need, please do I can't and need my phone working
Click to expand...
Click to collapse
Skills/knowledge = limited. I'm no programmer but I take information in like a 100 petabyte SSD.
My phones knackered, I'm trying to fix it but it's not easy! If it's fixed, I'll break it again to make sure the fix works :good:
It's going to be a long road, there is zero success since the first report of code corrupt.
As you say, I need the right param. There's almost no information about it anywhere and what information is about is very fragmented.
I'll keep you updated
Flacid Monkey said:
Skills/knowledge = limited. I'm no programmer but I take information in like a 100 petabyte SSD.
My phones knackered, I'm trying to fix it but it's not easy! If it's fixed, I'll break it again to make sure the fix works :good:
It's going to be a long road, there is zero success since the first report of code corrupt.
As you say, I need the right param. There's almost no information about it anywhere and what information is about is very fragmented.
I'll keep you updated
Click to expand...
Click to collapse
I am almost certain it can be fixed as long as it is a software failure (some maybe have a hardware failure). As this seems one of them it should be fixable as long as your BL is unlocked. With a locked bootloader u don't stand any chance (nah, maybe with medfield flasher, but that one is also limited).
Take a look at the acer padphone or something. Dunno how it is called exactly. Is also uses the intel SOC and makes use of the medfield flasher.
I never had a phone thats corrupt so can't say much about it, but i can help with thinking my way through. If u have that problem can u boot in fastboot or is that even impossible? I know we can flash the POS and fastboot through xfstk. So with the right combination it should work. And if not we can try flash the modem as extra if that is possible. But do know it can hard-brick the device (modem, lowest thing of the device) of-course, aldo u don't have much choice now
Another thing, because fastboot (and even recovery) can flash the dix, ifwi and bootloader files. I 'assume' xfstk (that can also flash the ifwi, dix and bootloader) can flash the whole emmc with indeed the right parameters. We have the source code of the fastboot/recovery ifwi, dix and bootloader flasher. Also called update_osip.
So think it out, i will wait and see.
uart console
Has somebody tried to access a uart console on our razr-i? would be nice for debugging.
Intels datasheet says the board has 3 uart ports. http://ark.intel.com/products/70097
I hope one uart port can be accessed via usb or audio jack. Like on this device: http://forum.xda-developers.com/showthread.php?t=1081743
Or is it only possible with opening the phone and looking for jtag pins?

[FAQ] The Baseband

Hi,
As there is apparently a little bit of misinformation about the baseband I decided to write a short FAQ, if you find anything thats wrong or is missing, feel free to correct me
DISCLAIMER
Messing with the baseband can permanently brick your device, but more important it could harm yourself, someone else or could be illegal in your country. By reading this FAQ you agree that you act on your own risk and I am not responsible if you kill your phone, yourself, your dog or if you get arrested.
What does the baseband do?
The baseband(often also called modem,radio or CP (Cellular Processor) on other phones) is a set of chips which is responsible for handling all the communication with the mobile Network. It recieves the radio signals with the antenna, decodes it and sends it to the main processor( also called AP, which stands for Application Processor). The connection between the two processors carries the audio data from a phone call and the data you when you access the Internet. On the Android side the connection is managed by a piece of software called RIL. The chipset also has an own operating system, which leads us to the next question.
Why are there different baseband firmwares?
The different versions often contain bugfixes or improvements, however the most important part is different mobile operators have different networks and if you buy a phone from your mobile operator it most probably has a baseband optimized for your region. Another important point are the different hardware revisions of our phone which also can need different baseband software. So I recommend not to change your baseband if you bought your phone from your mobile operator! I changed it once and my download speed got very slow But if you bought it from ebay or somewhere else it might improve something. For more information read this excellent guide from tonyp.
Where is the baseband firmware stored?
The baseband chipset includes a second combined RAM/FLASH chip independent from the main RAM and FLASH connected to the Tegra2. To avoid confusion I will from now on call the RAM/FLASH of the baseband RAM2 and FLASH2. If I read the datasheet correctly the FLASH2 chip can store 128MB and the RAM2 has 64MB.
Can we hack/mod/flash our phone to use RAM2/FLASH2 for Android?
NO. There is simply no electrical connection between the main processor and the FLASH2/RAM2 thats fast enough to make it useful. In theory it would be possible to store a small amount of data in FLASH2, but we had to modify the baseband firmware (which will be very very difficult), the kernel and the ROM so it will not happen.
Now we get to the technical questions and some research I did:
Which baseband hardware does our phone have?
The baseband is manufactured by Infineon and the chipset is called X-GOLD 618 or XMM6180. You can find some sort of advertising brochure here.
The chipset itself consists of the following chips:
PMB8901: The basebands main processor with an ARM core.
PMB5703: The tranciever, containing ADC's and DAC's
Hynix H8BCS0QGMMR-46M: Contains RAM2 and FLASH2
There are also some smaller chips used for analog signal routing and processing.
How does the baseband firmware get into the FLASH2?
I think all who read this FAQ know how to flash a baseband firmware, but whats happening in detail?
First of all if you pull out the battery and press VOL-DOWN while inserting the USB cable the phone boots in a special "download mode". You can see the message "Software update, please wait...", I am not sure where the bootloader displaying this message is saved, but i think its the normal FLASH.
After you klick start in LG SmartFlash a HDLC encoded command is send to this bootloader, which allows the program to send commands to the baseband processor. Then SmartFlash uploads a bootloader to the RAM2 which I identified as MPEHS-Bootloader and which SmartFlash calls PSI RAM. from now on. This bootloader now accepts commands to write data to FLASH2. Altough it would be very interesting I didn't find a command to read data from FLASH2. I think FLASH2 in addition to the firmware contains interesting data, such as calibration settings, IMEI and probably the unlocking code to remove the simlock.
What do the *.fls files contain?
The *.fls files contain the firmware files for the baseband. There are multiple areas in FLASH2 which hold different parts of the firmware. I am not sure about the structure of the *.fls files so this what i got so far:
First there are 2 types of *.fls files, those who contain multiple binary images and those who contain only one binary image.
The binary images are always: psi ( I think MPEHS-Bootloader), slb(???), AENAS_FW(???), R375_SIC(probably the application + operating system). On all basebands which come as 4 files the psi and slb are identical.
Both types have a common header which is identical on single and multipart files. The header has yet to get described completely.
In all *.fls files i opened offset 0x3E7C contains the number of binary image files. Then follows some sort of table of the following format:
Code:
+0x10 .... file number
+0x0C .... file name
+0x80 .... next file number
and so on.
Identified binaries:
Code:
0x4744 size 0xD570 .... PSI RAM
Maybe anyone knows more about *.fls files and could expand this list.
What sort of software does the baseband processor run?
Well, this is a bit complicated to answer as the firmware is only available in binary form, but to our luck it isn't encrypted so the strings in the binary file do tell interesting stories
On boot the processor executes a bootloader (Oh, what a suprise ) which i think is called PSI (MPEHS Bootloader), which then maybe loads the operating system (ThreadX) and the application (the protocol stack to communicate with the mobile network).
Is the baseband firmware encrypted?
I don't think so , because else I wouldn't have come so far. In addition I could already modify the baseband version string without causing an error, so I think there is not even a checksum or similar things.
This makes this phone ideal for hacking the baseband
Where did you get all this information?
Well mostly by reading the service manual, which can be googled easily.
A huge thanks goes to @wkpark for uploading this file and some others in this repository which helped a lot to understand the flashing protocol.
Then i found the following websites:
http://theiphonewiki.com/wiki/XMM_6180
http://fabiensanglard.net/cellphoneModem/index.php
The rest comes from binwalking the firmware files, a good hexeditor and playing man in the middle on the baseband firmware upgrade process.
Do you want to continue exploring the baseband?
Yes, of course and I would be happy if anyone joined
I am currently working on a platform independent tool implementing LG's update protocol to flash the baseband and the ROM. It will also allow to emulate a phone to further investigate the flashing process without risking to brick a phone.
I hope this FAQ is useful for users, developers and people that also do some research on basebands.
good luck,
sudden36

[Workshop] Unbrick fully bricked I9070

Hi,
I'm launching this thread to work on an unbrick procedure for fully bricked I9070/P without JTAG or Riffbox (same as Adam Outler, TheBeano, Odia etc... 's project "let's save some bricks")
Reminder : fully bricked = no download/recovery mode, no display, not charging, not going to recovery with a 301k Ohm jig.
I have a fully bricked I9070P and a fully functionnal I8090 (same processor).
Based on the sources and tools for the U8500 that were disclosed in january, I've managed to make my dead phone and my PC talk "a bit" together (under Windows with the VSIW tool, and under linux with recompiling the "flashkit" tools): when plugged in and inserting the battery, the tool sees the terminal, gets its serial number and various data and fails while trying to send and execute a boot file because the terminal closes the USB port.
I've managed to get a certain degree of communication with the "riff" tool (open source) of the Snowball project too (the dev board based on a U9500).
Based on this half successes, I'm pretty sure we are close to a clean solution to revive a fully bricked terminal without soldering JTAG.
Here are the main docs I've read so far :
* most posts from the threads "let's save some bricks" and "fun with resistors"
* the reference documents of the I9070 (Samsung_GT-I9070_Galaxy_S_Advance_Galaxy_S_II_Lite_service_manual.rar)
* the reference manual of the U9500 (http://www.calao-systems.com/reposi...X/DATASHEETS/AP9500_reference_manual_rev1.pdf)
* TSU6111 datasheet from TI (the USB/UART switch the 9070 is using, cf the service manual -> Lite Schematics -> u-USB SW IC part)
* lots of docs from the "flashkit" sources
My setup :
* a fully bricked I9070P
* a fully working I8190P
* an 8GB SDCard
* a Windows/Linux workstation (Ubuntu 12.04LTS + Android compiling environment + disclosed sources)
* terminal emulators
* a Prolific cable (PL2303) (any USB to TTL adapter would do it, you can buy one for 3$ as Arduino accessory, or reuse a Nokia DKU 5 -see hackaday website for a link). Take care with Prolifics : they don't work under Windows 8 with the last driver, you have to use the version before, Google is your friend)
* a set of resistors
* a multimeter
* libusb win32 drivers setup, see sourceforge (use the tool included in the drivers package to generate the right .inf file for the U8500 (or use 04CC and 8500)
Here are my conclusions so far :
* based on the Snowball docs and the U9500 spec, we don't seem to have any need to modify anything (resistors) on the mainboard to change boot sequence. The dev board does not have any switch for that and my dead I9070 and working I8190 exibit the same behaviour at bootup : the appear as a "U8500 USB ROM" for a seconds and disconnect when going on farther in the boot sequence.
Moreover, the fact that I managed to have my dead phone talk with the flashtool confort me in the fact that we are almost done.
* I have *not* managed to get any output on my terminal with my Prolific cable plugged in with a 630kOhm resistor on the pins 4 and 5. My resistor setup might be good because it make my working I8190 boot when I plug it in.
But I'm not sure of my RX/TX setup, I have crossed the RX/TX of the phone and the ones of the Prolific but I might have been wrong identifying the pins of my modified USB plug (D+ and D-).
But I'm sure the RX and TX wires of my Prolific are the right ones : when I connect them together (nullmodem configuration), the characters typed on my terminal are displayed.
So the main issue is : how can we have the dead phone keep the USB port open and not close it after 2 seconds?
My assumption is that it is always probing different boot methods (UART, USB, MMC etc) and then attempts to boot normaly from eMMC.
I don't know which part of the bootchain sequence I've garbaged on my I9070: IBL, PBL, SBL, PARAM? Managing to get any debug output on my console would greatly help me.
Has any of you tried to achieve something similar? If yes, could you post your setup and results?
Let's save some bricks another time!
any progress
flentus said:
Hi,
I'm launching this thread to work on an unbrick procedure for fully bricked I9070/P without JTAG or Riffbox (same as Adam Outler, TheBeano, Odia etc... 's project "let's save some bricks")
Reminder : fully bricked = no download/recovery mode, no display, not charging, not going to recovery with a 301k Ohm jig.
I have a fully bricked I9070P and a fully functionnal I8090 (same processor).
Based on the sources and tools for the U8500 that were disclosed in january, I've managed to make my dead phone and my PC talk "a bit" together (under Windows with the VSIW tool, and under linux with recompiling the "flashkit" tools): when plugged in and inserting the battery, the tool sees the terminal, gets its serial number and various data and fails while trying to send and execute a boot file because the terminal closes the USB port.
I've managed to get a certain degree of communication with the "riff" tool (open source) of the Snowball project too (the dev board based on a U9500).
Based on this half successes, I'm pretty sure we are close to a clean solution to revive a fully bricked terminal without soldering JTAG.
Here are the main docs I've read so far :
* most posts from the threads "let's save some bricks" and "fun with resistors"
* the reference documents of the I9070 (Samsung_GT-I9070_Galaxy_S_Advance_Galaxy_S_II_Lite_service_manual.rar)
* the reference manual of the U9500 (http://www.calao-systems.com/reposi...X/DATASHEETS/AP9500_reference_manual_rev1.pdf)
* TSU6111 datasheet from TI (the USB/UART switch the 9070 is using, cf the service manual -> Lite Schematics -> u-USB SW IC part)
* lots of docs from the "flashkit" sources
My setup :
* a fully bricked I9070P
* a fully working I8190P
* an 8GB SDCard
* a Windows/Linux workstation (Ubuntu 12.04LTS + Android compiling environment + disclosed sources)
* terminal emulators
* a Prolific cable (PL2303) (any USB to TTL adapter would do it, you can buy one for 3$ as Arduino accessory, or reuse a Nokia DKU 5 -see hackaday website for a link). Take care with Prolifics : they don't work under Windows 8 with the last driver, you have to use the version before, Google is your friend)
* a set of resistors
* a multimeter
* libusb win32 drivers setup, see sourceforge (use the tool included in the drivers package to generate the right .inf file for the U8500 (or use 04CC and 8500)
Here are my conclusions so far :
* based on the Snowball docs and the U9500 spec, we don't seem to have any need to modify anything (resistors) on the mainboard to change boot sequence. The dev board does not have any switch for that and my dead I9070 and working I8190 exibit the same behaviour at bootup : the appear as a "U8500 USB ROM" for a seconds and disconnect when going on farther in the boot sequence.
Moreover, the fact that I managed to have my dead phone talk with the flashtool confort me in the fact that we are almost done.
* I have *not* managed to get any output on my terminal with my Prolific cable plugged in with a 630kOhm resistor on the pins 4 and 5. My resistor setup might be good because it make my working I8190 boot when I plug it in.
But I'm not sure of my RX/TX setup, I have crossed the RX/TX of the phone and the ones of the Prolific but I might have been wrong identifying the pins of my modified USB plug (D+ and D-).
But I'm sure the RX and TX wires of my Prolific are the right ones : when I connect them together (nullmodem configuration), the characters typed on my terminal are displayed.
So the main issue is : how can we have the dead phone keep the USB port open and not close it after 2 seconds?
My assumption is that it is always probing different boot methods (UART, USB, MMC etc) and then attempts to boot normaly from eMMC.
I don't know which part of the bootchain sequence I've garbaged on my I9070: IBL, PBL, SBL, PARAM? Managing to get any debug output on my console would greatly help me.
Has any of you tried to achieve something similar? If yes, could you post your setup and results?
Let's save some bricks another time!
Click to expand...
Click to collapse
dude did you find any solution??same problem here
up up this thread.... i'm also experiencing with my s3 mini i8190 continuously disconnecting libusb-win32 driver... my phone is at deadboot and unable to resurrect with RIFFBOX...
neilPD_07 said:
up up this thread.... i'm also experiencing with my s3 mini i8190 continuously disconnecting libusb-win32 driver... my phone is at deadboot and unable to resurrect with RIFFBOX...
Click to expand...
Click to collapse
Mebay u have dead mini USB port in SIII mini ?
Sent from my GT-I9070 using Tapatalk
Hi guys,
I had a little time playing with this, but I have good news :
I modified the default profile used for the flashtool backend to "ADL boot" : my "dead" phone now stays connected to the USB and is reported as "started" by the flashtool CLI ("flash-tool get_connected_equipments") however, when I try some "active" flash-tool CLI commands, the backend crashes.
As I was running it either in windows 8.1 64 bits or Linux in a VM, their might have some bad interactions with the OS on the one hand and the USB port forwarding on the other hand (there was issues with the LCD and LCM drivers in Windows, I grabbed the 64 bits ones from VSIW...).
-> I have to test on a 32 bit Windows.
Good to read to understand further (extracted from flash-tool-backend.html file) :
Note : ME stands for mobile equipment, "boot indication" can take the following values : ADL, ALT, Normal, Production, Programming : set into the config files pointed by the .mesp file)
Boot process description
When the peripheral boot sequence starts, the ME sends an asic id to the connected PC tool. The PC tool then answers with a boot indication. If normal, "ADL" or "production" is sent as boot indication; this means that the x-loader will start the binary software stored at the corresponding location in the boot image (based on the location stated by the TOC). If programming is used as boot indication, the PC will send a completely new set of boot code to the ME. This is used when a loader is downloaded during service mode startup via the Flash Tool Backend. When the normal boot indication is sent, Flash Tool backend sends no more data and the ME is booted with the binary software stored in the place where the normal software is stored according to the TOC.
The ADL boot scenario works like this:
1. Flash Tool Backend receives asic id
2. Boot indication ADL is sent
3. Flash tool backend starts LCD and LCM and waits for a loader startup message.
The loader is stored at the ADL location of the boot image (this is supported by the assemble tool).
I think I'd have to assemble the correct bootloader to enable "profile-STE_DBX500_flashloader.prfl" profile to work (we are missing corresponding loader.ldr loader). It would enable the use of the "LoaderCommunication"
I think I have all the pieces and the docs (we even have the certificates to sign it !): just need time and a better GFAF (Girlfriend acceptance factor).
The guys who managed to unbrick some Qualcomm based devices might be of a huge help, they would be much more efficient than I can be... I any of you have time to drive them around here, do not hesitate!
Enjoy!
flentus said:
Hi guys,
I had a little time playing with this, but I have good news :
I modified the default profile used for the flashtool backend to "ADL boot" : my "dead" phone now stays connected to the USB and is reported as "started" by the flashtool CLI ("flash-tool get_connected_equipments") however, when I try some "active" flash-tool CLI commands, the backend crashes.
As I was running it either in windows 8.1 64 bits or Linux in a VM, their might have some bad interactions with the OS on the one hand and the USB port forwarding on the other hand (there was issues with the LCD and LCM drivers in Windows, I grabbed the 64 bits ones from VSIW...).
-> I have to test on a 32 bit Windows.
Good to read to understand further (extracted from flash-tool-backend.html file) :
Note : ME stands for mobile equipment, "boot indication" can take the following values : ADL, ALT, Normal, Production, Programming : set into the config files pointed by the .mesp file)
Boot process description
When the peripheral boot sequence starts, the ME sends an asic id to the connected PC tool. The PC tool then answers with a boot indication. If normal, "ADL" or "production" is sent as boot indication; this means that the x-loader will start the binary software stored at the corresponding location in the boot image (based on the location stated by the TOC). If programming is used as boot indication, the PC will send a completely new set of boot code to the ME. This is used when a loader is downloaded during service mode startup via the Flash Tool Backend. When the normal boot indication is sent, Flash Tool backend sends no more data and the ME is booted with the binary software stored in the place where the normal software is stored according to the TOC.
The ADL boot scenario works like this:
1. Flash Tool Backend receives asic id
2. Boot indication ADL is sent
3. Flash tool backend starts LCD and LCM and waits for a loader startup message.
The loader is stored at the ADL location of the boot image (this is supported by the assemble tool).
I think I'd have to assemble the correct bootloader to enable "profile-STE_DBX500_flashloader.prfl" profile to work (we are missing corresponding loader.ldr loader). It would enable the use of the "LoaderCommunication"
I think I have all the pieces and the docs (we even have the certificates to sign it !): just need time and a better GFAF (Girlfriend acceptance factor).
The guys who managed to unbrick some Qualcomm based devices might be of a huge help, they would be much more efficient than I can be... I any of you have time to drive them around here, do not hesitate!
Enjoy!
Click to expand...
Click to collapse
Any good updates & tested solution sir? I'm still waiting for a big solution for this kind of problem... TIA
Hi !
well, I'm almost done with the bootloaders: I have a loader.ldr compiled + 2 bin.
I've reset my dev. env. to an Ubuntu 10.04 according to a .doc I found in the sources (search for "*.doc", you will find "getting_Started_with_Android_and_Linux.doc"): I now have far less compilation errors, but I'm still struggling to get the full compilation process just right. For eg. I had to remove the "alsactrl" component due to dependency issues I've not been able to solve.
As already stated, I'm far from being a dev. expert so it takes me a lot of time to acheive the right compilation.
I would highly need the help of s/b who is fluent with Android compilation/dev env.: first it would be necessary to establish how to merge correctly the disclosed sources with Google's sources + the open sources from Samsung (kernel + system) (we have duplicates here as the kernel is also available in the disclosed sources, but both are different releases).
As already stated, given the few spare tile I have and without the help of the right people this will take me ~4 months+ to have this unbrick done (if I face no deadlock).
So, if you want this faster: get the right guys on the forum (from the "dev" branches) and drag them here so we can go forward much faste!
Hi!
So, I think I'm getting close: I now have the boot files build procedure working (+kernel and sytem, but I don't need those).
When I try to boot my phone with those boot files using the "flasher -tXXXX -X0,normal.bin" command, it seems that they are rejected as the phone connects and disconnects (boot loop on the iRom startup, I believe).
So, now I really need to have some kind of debug console setup to understand what's going on (cause of rejection, like signature problem etc...):
I've been working blindly up to now hopping that the software would work "off the shelves"... it never does
I'll have to try to understand how the "trigger UART" parameter of flashkit backend works and what is it intended to (I'll have to read the code for that as I've never seen any explanation about it anywhere in the docs). I don't figure out how this could work as on the backend GUI it lists the host PC's serial ports...
Another option would be to have my FTDI debug setup working. Maybe it's not "another option" but is required if the "trigger UART" is just enabling UART debug on the phone and requires a debug cable to read these debug data. My problem in that case would be how to have USB *and* UART on the same port... unless all this is designed for dev targets that have 2 USB ports as the Calao's u8500 targets. In that case, i'd have to find something smarter
As usual, if someone with knownledge on all this is willing to help: wave your hand, I'd happy to share my researches and go forward much faster. But I really feel I'm alone on this (even if I know that there will be tons of leechers when/if I manage to have this work
That's life on XDA!
Nice nice
flentus said:
Hi!
So, I think I'm getting close: I now have the boot files build procedure working (+kernel and sytem, but I don't need those).
When I try to boot my phone with those boot files using the "flasher -tXXXX -X0,normal.bin" command, it seems that they are rejected as the phone connects and disconnects (boot loop on the iRom startup, I believe).
So, now I really need to have some kind of debug console setup to understand what's going on (cause of rejection, like signature problem etc...):
I've been working blindly up to now hopping that the software would work "off the shelves"... it never does
I'll have to try to understand how the "trigger UART" parameter of flashkit backend works and what is it intended to (I'll have to read the code for that as I've never seen any explanation about it anywhere in the docs). I don't figure out how this could work as on the backend GUI it lists the host PC's serial ports...
Another option would be to have my FTDI debug setup working. Maybe it's not "another option" but is required if the "trigger UART" is just enabling UART debug on the phone and requires a debug cable to read these debug data. My problem in that case would be how to have USB *and* UART on the same port... unless all this is designed for dev targets that have 2 USB ports as the Calao's u8500 targets. In that case, i'd have to find something smarter
As usual, if someone with knownledge on all this is willing to help: wave your hand, I'd happy to share my researches and go forward much faster. But I really feel I'm alone on this (even if I know that there will be tons of leechers when/if I manage to have this work
That's life on XDA!
Click to expand...
Click to collapse
U R great man..UP UP UP :good::good::good:
use UART debug on USB
This will help me, I'll test it on my working S3 mini (same proc and very similar HW)... when I have time...
-> this will validate my UART debug setup : http://forum.xda-developers.com/showthread.php?t=2100809
ok, UART debug up and partially running on my SIII mini: debug messages displayed on terminal but keystrokes do not reach the phone, this is secondary for me at the moment, I may have a bad contact somewhere.
Tested on my dead I9070: no display, so the Xloader on my eMMC is garbaged (or Xloader UART debug is disabled, but this is less likely).
As expected, I now have to figure out how to have flashloader boot files upload *and* debug working together to understand what's wrong with my compiled boot files. I think the "trigger UART" thing is a good track, but I'm really puzzled by how to have the USB *and* the UART setup at the same time.
I fear to fry something by having phone D+/D- connected to USB port of the PC and connected at the same time to my Prolific TxD/RxD + 5V VCC connected to PC USB... sounds like a bad thing.
Another track would be USB debug I see in some parts of the code, but I don't know how to read the debug from there, more code to inspect...
got it~
---------- Post added at 02:03 PM ---------- Previous post was at 01:22 PM ----------
I also have a fully bricked I9070( not I9070P).I`m waiting for your good news.Thanks first.
I received this PM, I believe it can be useful for others experimenting with it
flentus said:
Ola Paul,
I contact you on an advise from Cocafe.
I launched a while ago the thread "[Workshop] Unbrick fully bricked I9070" (http://forum.xda-developers.com/showthread.php?t=2701363)
I'm looking for help to acheive the task as I don't have very much time to spend on it due to huge work I have this year.
Would you be ok to participate if you have a little spare time and interest in it?
I think I'm very close to the solution, and this would help a lot of 9070 owners (and maybe SIII mini and Sony too).
As explained in my thread, I have difficulties getting the disclosed sources to build correctly up to the end when integrated with Google SDK. As a result the "finalizing" scripts (that gather the binaries and tidy the "out" directory) don't execute: I end up with a large mess and STE tools don't work out of the box. I have to gather the pieces one by one to have them run which is very time consuming and error prone.
I can say that the recovery process won't need any kind of soldering, wiring or whatever: just a regular USB cable and the right sofware.
The disclosed sources contain everything we need: PBL/SBL sources, signing tool+certificates, the software to talk to the iROM + various documentation.
The problem is just a question of assembling the pieces...
My idea is to assemble an Xloader (PBL) + Uboot (SBL) + recovery and boot from that to execute recovery.
The "flashkit" tool enables this process, I quote the docs: "If 'programming' boot indication is used as boot indication, the PC will send a completely new set of boot code to the ME. This is used when a loader is downloaded during service mode startup via the Flash Tool Backend.".
Tell me if you wish to help me, or if you know someone who has competencies and would wish to!
I speek average spanish if you prefer to exchange in this language.
Regards
Click to expand...
Click to collapse
I am sorry for pointing this out, STE tools wont work ever on i9070, the reason being that we do not have a STE bootloader, heck, most of the low level stuff do not resemble the ST-Ericsson Montblanc development board. You can't even change the bootloader arguments, you can only add to them (the way I first enabled SELinux), the Samsung Bootloader version that we have may be not as restrictive as others, but Sonys bootloader resembles more to STE's than ours.
The only way you may found how to restore it is accessing the JTAG mode (something that is determined only if JTAG is connected and recognized) and depends solely on the emergency bootloader (if that exists, because I am not sure how the device powers on without PBL), the "seconds" of power you get on the USB is the device looking for JTAG.
The "disclosed" sources are for ST-Ericsson devices
Something you should do, is analyze the structures of /dev/block/mmcblk0p10, which contains our partition table (GUID Partition Table - GPT).
Simple way of doing it, you have to do dd if=/dev/block/mmcblk0p10 of=/sdcard/janice.pit on terminal emulator, this is ROM agnostic, because the structures are the same on both stock and any custom ROM. Of course, that is from a working device, I'll do that and drop it here later since I am working on something else right now, and thanks diegoch for discovering this.
Anyway, as diego pointed to me, our partition table is like this.
PIT, CSPSA, EFS, MODEM fs, SBL, SBL2, PARAM, IPL modem, MODEM, Kernel, Kernel2, system, data, cache, preload, fota, sdcard
This is the correct order I believe, since basically, when you use ODIN and use a PIT file, the partition table gets rewritten according to whatever is on that .pit file. So PIT is basically the GPT partition table; obviously SBL is the Samsung bootloader, and SBL2 I believe it's either stage 2.5 or a backup of the first.
So, no clue by going the STE way, something familiar here.
So, I may say something good at the end, see if the i9100 guys ever did it, and go from there, since our device is largely based around i9100 (Galaxy S II)
Hi Paul,
thanks for your contribution.
A few replies/questions :
* you state that Montblanc dev board and I9070 are completly different: isn't the aim of dev dev board to be close to ME while adding extra connectors to ease debug and interfacing for prototyping? Calao dev board looks very close to I9070: I have compared the schematics and component list: they look very very much alike. For me, NovaThor U8500 plateform consists of a DB8500 SoC, a Mali 400, a built-in modem + chips for USB, audio and SIM operations.
So, to me, I may be wrong, at least the processor (u8500), PLL, eMMC, SDRAM, UART + several low level controlers should be the same. As we are trying to work at such level (just trying to get the basic system to boot to just enable eMMC write), don't we have a chance to manage to have those work (maybe with adressing adaptation, those might be tough)?
* I can't agree with you that "the "seconds" of power you get on the USB is the device looking for JTAG.": on boot time, even without trashed PBL, the ME connects to USB properly with vendor/ID=04cc/8500, and sends its ASIC ID (displayed on PC screen). As stated earlier in the thread, I manage to send some commands and receive response from the ME in this state using STE tools (flashkit_cli, sending commands threw flashkit_backend).
It's definetly not any JTAG stuffs. JTAG on the I9070 is accessible on the mainboard via dedicated pads, you can locate using the light schematics provided in the "Service manual" package.
This early boot behaviour is documented in the "flash-tool-backend.html" document (available in s-4.1_vendor_st-ericsson.tar in ./s-4.1_vendor_st-ericsson/vendor/st-ericsson/tools/platform/flash_kit/flash_tool_backend/com.stericsson.sdk.backend.build/doc):
Boot process description
When the peripheral boot sequence starts, the ME sends an asic id to the connected PC tool.
The PC tool then answers with a boot indication.
- If normal, ADL or production is sent as boot indication; this means that the x-loader will start the binary software stored at the corresponding location in the boot image (based on the location stated by the TOC).
- If programming is used as boot indication, the PC will send a completely new set of boot code to the ME. This is used when a loader is downloaded during service mode startup via the Flash Tool Backend.
- When the normal boot indication is sent, Flash Tool backend sends no more data and the ME is booted with the binary software stored in the place where the normal software is stored according to the TOC.
The ADL boot scenario works like this:
1. Flash Tool Backend receives asic id
2. Boot indication ADL is sent
3. Flash tool backend starts LCD and LCM and waits for a loader startup message.
The loader is stored at the ADL location of the boot image (this is supported by the assemble tool).
* If I understand well, as we don't have the sources for the bootloader, your proposal is to grab one from a working device.
That sounds a really good idea!
Here is the complete partition table/PIT of the I9070 (recovered by someone with a Riff box from a GB archive, if I remember well):
(copy/paste it in a traditional editor and add padding to recover the table).
Partition number Filename in archive Name in PIT starting offset HEX Size in bytes HEX
MBR, GPT 0 20000
STE_boot.bin TOC ISSW XLOADER 20000 60000
mmcblk0p10 GT-I9070P_EUR_XX_8G.pit PIT 80000 100000
mmcblk0p6 cspsa.img CSPSA FS 180000 180000
EMPTY 300000 100000
mmcblk0p7 EFS.img EFS 400000 A00000
mmcblk0p2 modemfs.img MODEM FS E00000 100000
mem_init.bin STE MEM INIT 1E00000 80000
power_management.bin PWR MGT 1E80000 80000
mmcblk0p14 normal.bin SBL 1F00000 200000
mmcblk0p16 normal2.bin SBL_2 2100000 200000
mmcblk0p1 param.lfs PARAM 2300000 1000000
mmcblk0p12 ipl.bin IPL MODEM 3300000 200000
mmcblk0p13 modem.bin MODEM 3500000 1000000
mmcblk0p15 kernel.bin KERNEL 4500000 1000000
mmcblk0p17 kernel2.bin KERNEL2 5500000 1000000
mmcblk0p3 system.img SYSTEM 6500000 26400000
mmcblk0p5 userdata.img DATAFS 2C900000 80000000
mmcblk0p4 cache.img CACHEFS AC900000 13200000
mmcblk0p9 hidden.img HIDDEN BFB00000 14000000
mmcblk0p11 ssgtest.img FOTA D3B00000 3200000
mmcblk0p8 ums.rfs UMS D6D00000 FAA00000
--> PBL corresponds to "TOC ISSW XLOADER" (STE_boot.bin in the flash archive) and SLB to normal.bin. So basically we have our boot files. We can extract them from the GB flash archive or from a ROM dump (I have dd'ed every partitions from 2 different I9070P + a full recovery dump from a 9070 provided by Riff box support files I found once I don't remember where).
So, if I have time one of theses days, I'll try to build a flash archive based on these files and try to boot from STE tools on it using "programming" as boot indication.
* Using the knowledge of the I9100 (Galaxy S II): I'm afraid this is a very different hardware, I9100 uses an Exynos 4210, so I hardly see what we could use from there... Could you give us some more advise on that idea?
Regards
Hi!
I had no time working on this for a while: extremely busy at work.
Maybe this weekend...
@cocafe: I've read you know how to extract the initramfs from the kernel, modify, repack, and reflash it. I'll need to do that to modify the "on boot" section of the init.rc to launch the recovery from standard boot. Could you drop me here the command lines to do that? Thanks in advance!
This looks by far the most advanced research into bringing back a hard bricked i9070.
@flentus Did you manage to upload a new bootloader?
Hi,
had to time at all to play with this for a loooong time.
I have grabed a few new phones so me 9070 is now burried deep into a drawer but I really wish to finish this one day because I feel I'm very close to something.
If anybody would like to take over this, feel free, I can provide support for the stuff I have understood (and remember of...)
Regards

Categories

Resources