FORUMS
Remove All Ads from XDA

[DEV] RS232 for X8, X10mini

1,531 posts
Thanks Meter: 19,435
 
By nobodyAtall, Inactive Recognized Developer on 24th December 2012, 07:49 PM
Post Reply Email Thread
Hello,

First off, this mod is NOT for users, but is helpful for developers only that would like to do cool stuff (i.e. port new kernels, etc.). Do not start hacking your phone unless you know what you are doing.

The msm7227 has RS232 serial connection which is accessed via /dev/ttyMSM2. The issue is getting the pins on the board right, and this is because there is great confusion online about the actual pinout for these semc devices (probably because nobody has actually grabbed serial tty on them).

Requirements:
- Solder iron, solder, flux (you know, the cool stuff :P)
- Small wires, single core ideally - not too large to avoid noise
- Multimeter: useful for checking if you've sorted pins that you are soldering (happens all the time :P)
- Steady hand, patience (I lack those actually)
- A 3.3V TTL RS232 adapter. I'm using the FT232RL USB to Serial board which works flawlessly. You could come up with other solutions too if you are into electronics via MAX232 or Arduino.
Important: do NOT wire the phone to the serial port of you PC - it can potentially burn up your phone!

Be careful while soldering, don't let the iron for too much time on the connector or you'll end up destroying it (as I did for two connectors while reverse engineering where the tty pins are).

So here's the pinout on the X8:

The connection should be like so:
Code:
Phone <-> Serial Adapter
Tx <-> Rx
Rx <-> Tx
GND <-> GND



Once soldered and connected, you can use any tty program under linux or windows that you like. E.g. minicom (linux) works great for me, it picks up the bootloader / kernel output instantly.
Connection details: Port: /dev/ttyUSB0, baud: 115200-8N1

Some cosmetics for harnessing the added wires:




s1loader log
Some interesting stuff now... here's the log from the moment the power button is pressed, until the kernel picks up:
Code:
S1 Boot stage 1
CONF_FUSE 0-4 = 0x0077fd4d 0x00040447 0x2004080f 0xb79cc2de 0x00000180
HW_REVISION_NUMBER = 0x203c00e1
OEM_ID = 0x00000001

SEMCSEC Secure Bootstrap "1229-3593 S1Boot MSM7227 CRH1099189_R8A029" (2010-06-01 12:17)
Detected memories:
 SMI CS0: UNKNOWN 32MB LPDDR (SR 0x0000)
 EBI1 CS0: UNKNOWN 32MB LPDDR (SR 0x0000)
 EBI1 CS1: UNKNOWN 32MB LPDDR (SR 0x0000)
 EBI2 CS0: Samsung 512MB NAND (0x00ec 0x00bc)
PMIC initialization iterations=0x00000001
bq24180 charger IC rev 1.1 detected
OTP User segment locked
OTP User segment locked
TA @ 0x08100000 (8*128kB)
Hardware Config: verification OK
MSN=CB511K1YZM IMEI=XXXXXXXXXXXXXX
OTP User segment locked
Service Mode Config From TA (ver 1.0): KEYS:1 USB:eek:N SERVICEMODE:USB SERVICE_PIN:ENABLED


VBus is low (not a "chinese charger"), SoftService is not asserted...
TA_ReadData FlaFla is set
S1 BOOT waiting for USB connection
s1_main_loop: No Service mode comm interface found!
Configuring long press:500
plf_bootos MSM7227
Startup reason before override: PWRKEY WDOG 
Overriding default boot partitions: reason=0x00000011, mArm=0x00000005, aDsp=0x00000008, aArm=0x00000003
Partition table contents:
 PartID     Descr   Attribs    StartBlock NumBlocks  UsedAs
 0x00000001 S1Boot    0x00000022 0x00000000 0x00000008 
 0x00000002 TA      0x00000001 0x00000008 0x00000008 
 0x00000005 ModemSW   0x40000022 0x00000030 0x000000c0 mARM image
 0x00000003 Linux   0x40000001 0x00000120 0x00000040 aARM image
 0x0000000f Cache     0x80000001 0x000007d0 0x00000190 
 0x00000010 AppsLog   0xc0000001 0x00000ffe 0x00000002 
 0x0000000b FOTA0   0x40000022 0x00000010 0x00000010 
 0x0000000c FOTA1   0x40000022 0x00000020 0x00000010 
 0x00000006 ModemFS   0x40000001 0x000000f0 0x00000030 mARM-FS image
 0x00000009 UserData  0xc0000001 0x00000960 0x0000069e 
 0x00000004 AppsFS1   0x80000001 0x00000160 0x00000670 
ARM ELF image (0x0028), entry point @ 0x0db00000
SIN Verification of aARM failed!
ARM ELF image (0x0028), entry point @ 0x00208000
plf_ta_cmd_params()
Boot parameters found in config data
Commandline:serialno=CB511K1YZM console=ttyMSM0 startup=0x00000011.
Warmboot address calculated: 0x00200000
NAND MPU Partition 0 start:0x00000160 end:0x00000960
NAND MPU Partition 1 start:0x00000960 end:0x00001000
NAND MPU ON according to partition table
Jumping to code @ 0x0db00000, goodbye and thanks for all the fish...
Linux version 2.6.29.6-nAa-jb-03 (nobodyAtall@hydra) (gcc version 4.7.3 20121106 (prerelease) (Linaro GCC 4.7-2012.11) ) #1 PREEMPT Sat 2
goodbye and thanks for all the fish...
Attached Thumbnails
Click image for larger version

Name:	1_small.jpg
Views:	13170
Size:	151.1 KB
ID:	1589191   Click image for larger version

Name:	3.jpg
Views:	12745
Size:	210.2 KB
ID:	1589575   Click image for larger version

Name:	4.jpg
Views:	12680
Size:	93.5 KB
ID:	1589581   Click image for larger version

Name:	5.jpg
Views:	12580
Size:	56.3 KB
ID:	1589582   Click image for larger version

Name:	6.jpg
Views:	12639
Size:	81.2 KB
ID:	1589583  
The Following 60 Users Say Thank You to nobodyAtall For This Useful Post: [ View ] Gift nobodyAtall Ad-Free
 
 
24th December 2012, 07:49 PM |#2  
nobodyAtall's Avatar
OP Inactive Recognized Developer
Flag Patras
Thanks Meter: 19,435
 
Donate to Me
More
Pinouts for mini:


Attached Thumbnails
Click image for larger version

Name:	1.jpg
Views:	16250
Size:	175.5 KB
ID:	1591285   Click image for larger version

Name:	2.jpg
Views:	16200
Size:	168.2 KB
ID:	1591287   Click image for larger version

Name:	3.jpg
Views:	11275
Size:	162.2 KB
ID:	1591288  
The Following 34 Users Say Thank You to nobodyAtall For This Useful Post: [ View ] Gift nobodyAtall Ad-Free
24th December 2012, 08:10 PM |#3  
XperianPro's Avatar
Senior Member
Flag Mars
Thanks Meter: 880
 
Donate to Me
More
Cant believe in this !!!
The Following User Says Thank You to XperianPro For This Useful Post: [ View ] Gift XperianPro Ad-Free
24th December 2012, 08:12 PM |#4  
Daveee10's Avatar
Inactive Recognized Developer
Thanks Meter: 2,455
 
Donate to Me
More
bro, you are crazy
thats great...

This is a good xmas gift

P.S.: Merry Christmas!
The Following 3 Users Say Thank You to Daveee10 For This Useful Post: [ View ] Gift Daveee10 Ad-Free
24th December 2012, 08:32 PM |#5  
Cancar96's Avatar
Senior Member
Flag Zagreb
Thanks Meter: 429
 
More
Firstly I thought you made a 4.2 rom then I realised that you are crazy...cool work and merry Christmas
PS:just realised I spamed,sorryy wont happen again
Sent from my E15i using xda app-developers app
The Following User Says Thank You to Cancar96 For This Useful Post: [ View ] Gift Cancar96 Ad-Free
24th December 2012, 08:32 PM |#6  
nobodyAtall's Avatar
OP Inactive Recognized Developer
Flag Patras
Thanks Meter: 19,435
 
Donate to Me
More
Quote:
Originally Posted by Daveee10

bro, you are crazy
thats great...

This is a good xmas gift

P.S.: Merry Christmas!

Almost killed my shakira, but it was worth it :P

@all, please only post contributing stuff - don't clutter the thread.
The Following 15 Users Say Thank You to nobodyAtall For This Useful Post: [ View ] Gift nobodyAtall Ad-Free
24th December 2012, 11:07 PM |#7  
nobodyAtall's Avatar
OP Inactive Recognized Developer
Flag Patras
Thanks Meter: 19,435
 
Donate to Me
More
- More pics uploaded.
- Bootloader log captured. Output is hmm... interesting
The Following 20 Users Say Thank You to nobodyAtall For This Useful Post: [ View ] Gift nobodyAtall Ad-Free
25th December 2012, 12:00 AM |#8  
2010matej's Avatar
Senior Member
Flag Pregrada | Maribor
Thanks Meter: 1,218
 
More
Glade to see that you have black color of x8 too
25th December 2012, 04:08 PM |#9  
Member
Thanks Meter: 12
 
More
First of all, impressive work @nobodyAtall. You must have kind of huge balls to do so.

These days, I've been trying to modify CMDLINE from kernel to edit mtdparts parameter and, therefore, to resize MTD partitions. This way, it would be possible to reduce system and cache partitions in favour of data. Unfortunately, I didn't success, but I still don't know if it was because of a wrong kernel (I tried to compile Alfs, which is so [irony]easy[/irony] to compile) or something else...

I haven't tried with yours because your Git source seemed to be a little outdated.

Anyway, as I've seen in the output you posted, partitions are already set by default, leading me to think it is not possible to modify them through the kernel command line.

Have you ever thought about this before?
25th December 2012, 05:46 PM |#10  
nobodyAtall's Avatar
OP Inactive Recognized Developer
Flag Patras
Thanks Meter: 19,435
 
Donate to Me
More
Quote:
Originally Posted by GaBOr1

First of all, impressive work @nobodyAtall. You must have kind of huge balls to do so.

These days, I've been trying to modify CMDLINE from kernel to edit mtdparts parameter and, therefore, to resize MTD partitions. This way, it would be possible to reduce system and cache partitions in favour of data. Unfortunately, I didn't success, but I still don't know if it was because of a wrong kernel (I tried to compile Alfs, which is so [irony]easy[/irony] to compile) or something else...

I haven't tried with yours because your Git source seemed to be a little outdated.

Anyway, as I've seen in the output you posted, partitions are already set by default, leading me to think it is not possible to modify them through the kernel command line.

Have you ever thought about this before?

Hi,

Outdated in terms of what? All kernels for these devices are 2.6.29 - they are indeed outdated. The nAa-jb has all it's needed for jellybean and great performance.

@partitions
Changing the mtdparts via cmdline is absolutely possible. This is how I got the extra /system space needed for jellybean. The problem is that it breaks existing installations cause you are altering the default partitioning - therefore it's not suggested. People have to format all partitions before getting out of the kernel with the modded ones.
Don't mind the partitioning the s1loader says - those are of the internal nand as hardcoded via s1loader. My guess is that they can be exposed to userspace.

EDIT: pinouts for x10mini posted.
The Following 12 Users Say Thank You to nobodyAtall For This Useful Post: [ View ] Gift nobodyAtall Ad-Free
25th December 2012, 08:53 PM |#11  
Senior Member
Thanks Meter: 41
 
More
now our x8 can get kernel 3 ?
Post Reply Subscribe to Thread

Tags
kernel debugger

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes