Post Reply

[Dev] Building kernel

OP Blagus

5th April 2011, 09:10 PM   |  #1  
Blagus's Avatar
OP Recognized Developer
Thanks Meter: 1,047
 
1,239 posts
Join Date:Joined: Jun 2010
Donate to Me
MSM7227 S1Boot has been patched to ignore SIN header signature by the_laser.

You need phone which you either did not unlock by cable, or phone which you unlocked via SEtool2 only.

If you unlocked with Omnius, in C:\ProgramData\Omnius for SE\Backups\Xperia X8
you have file called: Xperia X8_IMEI_DATE_SIMLock.opd

Note, the fixed S1Boot for other tools should come soon.

Restore that TA backup, then use semc.cmd in the_laser's release to unlock bootloader - you'll restore SIM lock this way!
Currently there is no unlocked bootloader for Omnius unlocked phones.

* Kernel build instructions in second post.
* Original post by the_laser with unlock instructions in third post.

What will this allow:
* custom kernels
* better/fully working Gingerbread
* no need for chroot to avoid init crash bug
* overclock/Synaptics fake DT/Cypress real DT/MDDI fix built in kernel

This will not enable:
* real DT on Synaptics digitizer
Last edited by Blagus; 11th September 2011 at 08:39 PM.
The Following 23 Users Say Thank You to Blagus For This Useful Post: [ View ]
5th April 2011, 09:23 PM   |  #2  
Blagus's Avatar
OP Recognized Developer
Thanks Meter: 1,047
 
1,239 posts
Join Date:Joined: Jun 2010
Donate to Me
To make custom kernel:

1) Compile it.
2) Grab Image, not zImage
3) Make ramdisk.gz (cpio ramdisk content, then gzip the cpio archive)
4) Place both files in ./msm7227/sinTools
5) Name then image and ramdisk, no extension, remove existing files
6) Exectue example_build.cmd
7) Grab result.elf.sin from result.zip, rename to kernel.sin and pack in ftf bundle with patched loader.sin from ./msm7227/loader
8) Flash with FlashTool.
Last edited by Blagus; 11th September 2011 at 08:38 PM.
The Following 15 Users Say Thank You to Blagus For This Useful Post: [ View ]
7th September 2011, 11:09 AM   |  #3  
Senior Member
Thanks Meter: 784
 
131 posts
Join Date:Joined: Feb 2011
Greetings.

warning.
if you are not developer, please quit reading that post.
wait for user friendly tool with one big button.


here ( msm7227.7z) is toolset to permanently "unlock" semcboot of msm7227 semc phones.

that means, you can use own kernel and so on.

steps,precautions, etc.

unpack archive to any directory.

if you using eset antivirus or similar ****, it will find evil virus in adb.exe.
ignore that, it is not virus in any way, it is standard android debug bridge, bundled in one file to save space and usability.


now, if your phone unlocked officially:

flash phone with standard 2.0,2.1 android firmware,because kernel mapper module compiled for "2.6.29" kernel.

of course, enable "usb debugging"

run msm7227_semc.cmd,
( if you want, examine it before run, it is pretty straightforward. )

you will get similar output

Code:
process requires standard 2.x android firmware.
Press any key to continue . . .
Getting ROOT rights.
1743 KB/s (585731 bytes in 0.328s)
error: protocol fault (no status)
Waiting ...
Removing NAND MPU restrictions via SEMC backdoor. Permanent. Require ROOT rights.
192 KB/s (3087 bytes in 0.015s)
success
Waiting ...
Getting ROOT rights.
Waiting ...
Writing patched semcboot. Two step process
First, we need get access to semcboot area
504 KB/s (8064 bytes in 0.015s)
Second, we need to write semcboot ;)
1130 KB/s (596916 bytes in 0.515s)
successfully wrote 0003ff00
Press any key to continue . . .
bingo, your phone now has unlocked bootloader.

if your phone unlocked by setool2 software, use msm7227_setool2.cmd

if your phone unlocked by 3rd-party software other than setool2, do not run anything -
it will disable radio capability of your phone and you will need to unlock phone by setool2 software.

to find out if you can safely unlock bootloader, here (s1tool.7z) is tool.

if you will see "NOT RECOGNIZED SIMLOCK CERTIFICATE", you should not use either of .cmd.

hopefully, mizerable flea and mOxImKo will release something similar for your phone.



okay, now about other details.

1.
unlocked bootloader require unlocked loader, yep ?

loader\loader.sin is special unlocked loader, which will be accepted ONLY after your "unlock" semcboot with previous steps.

to distinguish unlocked semcboot and original semcboot, first letter in version tag of semcboot output will be lower case, i. e. "r8A029"

( same applies for loader version tag )

so, all that stuff with signatures are not for us, so i removed them - loader will ignore signature part of SIN file.

2.
we should make SIN file somehow, right ?
for that i prepared "dumb" bin2sin utility.

Quote:

Syntax : bin2sin [input] [partition info, 32 digits] [type] [block size]

[input] - is input binary file.

[partition info]
android implementation on s1 semc qualcomm phones based on partitions,so we MUST define it for our file.

you can get required partition info from standard semc sin files, it is first 0x10 bytes of DATA, right after header, i.e.
Quote:

e10 kernel partition info
03000000010000402001000040000000

[type] - partition type, 9 - partition without spare, 0xA - partition with spare.
kernel partition is partition without spare.
if that parameter omitted, type = 9

[block size] - nand block size, if omitted, it is standard size 0x20000

there is example in sinTools\example_build.cmd

3.
kernel should be prepared specially to be accepted by semcboot.
for that there is tool bin2elf.

Quote:

Syntax : bin2Elf.exe [nbrOfSegments] [EntryPoint] [Segment1] [LoadAddress1] [Attributes1] ...

we need 2 segments:
segment 1 is unpacked linux kernel image, i.e.
( e10/kernel/arch/arm/boot/Image )

it looks like entrypoint and load address for segment 1 is always same for all msm7227-based semc phone, it is 0x00208000

attributes for image 0x0

segment 2 is ramdisk.

it looks like entrypoint and load address for segment 1 is always same for all msm7227-based semc phone, it is 0x01000000

set attributes for ramdisk 0x80000000, that is extremly important.

there is simple kernel example in sinTools\example_build.cmd

ps.

@blagus:
NAND MPU disabler has only one relation to rFoNe - he took it from setool2, together with entire idea for msm7227 bypass.
your 6-wings friend with many nicks done exactly same.

NAND MPU has nothing to do with memory firewall, so it will not help with kexec things, however, who will care now.

edit:
there was minor flaw in msm7227_setool2.cmd - i forgot to change source bootwriter name and both .cmd wrote same semc boot:

flawed:
Quote:

@echo Second, we need to write semcboot
bootTools\adb.exe push my7227bootwrite_semcSL /data/local/tmp/my7227bootwrite_setool2SL

correct:
Quote:

@echo Second, we need to write semcboot
bootTools\adb.exe push my7227bootwrite_setool2SL /data/local/tmp/my7227bootwrite_setool2SL


of course, every developer or man with capability to read fixed it immediately.
just in case, i uploaded "fixed" package.

Last edited by the_laser; 10th September 2011 at 12:11 AM.
The Following 112 Users Say Thank You to the_laser For This Useful Post: [ View ]
8th September 2011, 10:32 PM   |  #4  
af974's Avatar
Retired Recognized Developer / Retired Forum Moderator
Thanks Meter: 1,887
 
4,940 posts
Join Date:Joined: Jan 2008
More
Ok, just because someone is asking what the hell is happened, got a request by Blagus to delete all posts but his first 2 and the_laser one, thread is now closeed untill Blagus will say me to open it.
The Following 2 Users Say Thank You to af974 For This Useful Post: [ View ]
9th September 2011, 03:31 PM   |  #5  
SpyderX's Avatar
Senior Member
Flag Singapore
Thanks Meter: 840
 
924 posts
Join Date:Joined: Mar 2011
More
How to verify if the bootloader on your phone is really unlocked
Quote:
Originally Posted by the_laser (earlier in this thread)

unlocked bootloader require unlocked loader, yep ?

loader\loader.sin is special unlocked loader, which will be accepted ONLY after your "unlock" semcboot with previous steps.

to distinguish unlocked semcboot and original semcboot, first letter in version tag of semcboot output will be lower case, i. e. "r8A029"

This means s1tool log file can provide us with verification if we unlocked bootloader correctly.

S1tool link: http://forum.xda-developers.com/show...0&postcount=26


Example of log file (mine):

Code:
9/9/2011 21:41:44 Welcome to S1 identify tool
9/9/2011 21:45:13  
9/9/2011 21:45:13 TO CONNECT NEXT PHONES
9/9/2011 21:45:13 X10 Xperia,E10 Xperia Mini,E15 Xperia X8,U20 Xperia Mini Pro
9/9/2011 21:45:13 LT15 Xperia ARC,MT15 Xperia NEO,R800 Xperia PLAY
9/9/2011 21:45:13 PRESS AND HOLD "BACK" BUTTON...
9/9/2011 21:45:13  
9/9/2011 21:45:13 PLEASE ATTACH TURNED OFF PHONE NOW
9/9/2011 21:45:13 
9/9/2011 21:45:46  
9/9/2011 21:45:46 RUNNING S1_EROM VER "r8A029"
9/9/2011 21:45:46 SOFTWARE AID: 0001
9/9/2011 21:45:46 LOADER AID: 0001
9/9/2011 21:45:49 FLASH ID: "002C/00BC"
9/9/2011 21:45:49 LOADER VERSION: "R4A045"
9/9/2011 21:45:49  
9/9/2011 21:45:49 MODEL (from GDFS): X8
9/9/2011 21:45:49 SOFTWARE VERSION: 1236-9291_2.1.1.A.0.6
9/9/2011 21:45:49 CUSTOM VERSION: 1241-3178_R1B
9/9/2011 21:45:49 FILESYSTEM VERSION: WORLD-1-8_2.1.1.A.0.6
9/9/2011 21:45:49 SERIAL NO: CB511SPH7Q
9/9/2011 21:45:49  
9/9/2011 21:45:49 SEMC SIMLOCK CERTIFICATE
9/9/2011 21:45:49 Elapsed:36 secs.
If the line RUNNING S1_EROM FROM VER "#8A029" has a lowercase "r" letter replacing the "#" (RUNNING S1_EROM FROM VER "r8A029"), your bootloader has been unlocked . If it has an uppercase "R" replacing the "#" (RUNNING S1_EROM FROM VER "R8A029"), your bootloader is NOT unlocked .

Cheers ,

SpyderX
Last edited by SpyderX; 9th September 2011 at 04:11 PM.
The Following 2 Users Say Thank You to SpyderX For This Useful Post: [ View ]
9th September 2011, 06:41 PM   |  #6  
Account currently disabled
Thanks Meter: 336
 
263 posts
Join Date:Joined: Aug 2011
Donate to Me
More
Talking Im confused !!
are you saying my phone has to have been sim unlocked for this to work because i have not had my x8 sim unlocked and i unlocked my boot loader perfectly fine. and thanks to the devs for all their hard work. now just gotta compile my own kernal
9th September 2011, 06:49 PM   |  #7  
lotus13's Avatar
Senior Member
Flag Somewhere in the kernel called earth
Thanks Meter: 102
 
234 posts
Join Date:Joined: Jul 2011
Donate to Me
More
Quote:

Welcome to S1 identify tool

TO CONNECT NEXT PHONES
X10 Xperia,E10 Xperia Mini,E15 Xperia X8,U20 Xperia Mini Pro
LT15 Xperia ARC,MT15 Xperia NEO,R800 Xperia PLAY
PRESS AND HOLD "BACK" BUTTON...

PLEASE ATTACH TURNED OFF PHONE NOW

RUNNING S1_EROM VER "r8A029"
SOFTWARE AID: 0001
LOADER AID: 0001
FLASH ID: "0020/00BC"
LOADER VERSION: "R4A045"

MODEL (from GDFS): E15i
SOFTWARE VERSION: 1236-9291_2.1.1.A.0.6
CUSTOM VERSION: 1241-4091_R3B
FILESYSTEM VERSION: WORLD-1-8_2.1.1.A.0.6
SERIAL NO: CB511RZG51

SEMC SIMLOCK CERTIFICATE
Elapsed:56 secs.

Success ! ty Dev ! you r the best !
9th September 2011, 06:52 PM   |  #8  
DeFcOn's Avatar
Senior Member
Flag Győrszemere
Thanks Meter: 243
 
861 posts
Join Date:Joined: Jun 2011
More
Quote:
Originally Posted by lotus13

Success ! ty Dev ! you r the best !

i turned off my phone, click button in s1tool and connect my phone to computer with pressed back button? and nothing writes only
2011. 09. 09. 19:02:20 Welcome to S1 identify tool
2011. 09. 09. 19:03:03
2011. 09. 09. 19:03:03 TO CONNECT NEXT PHONES
2011. 09. 09. 19:03:03 X10 Xperia,E10 Xperia Mini,E15 Xperia X8,U20 Xperia Mini Pro
2011. 09. 09. 19:03:03 LT15 Xperia ARC,MT15 Xperia NEO,R800 Xperia PLAY
2011. 09. 09. 19:03:03 PRESS AND HOLD "BACK" BUTTON...
2011. 09. 09. 19:03:03
2011. 09. 09. 19:03:03 PLEASE ATTACH TURNED OFF PHONE NOW
2011. 09. 09. 19:03:03
2011. 09. 09. 19:03:39 PROCEDURE STOPPED BY USER
2011. 09. 09. 19:03:39 Elapsed:250 secs.
Please help...
The Following User Says Thank You to DeFcOn For This Useful Post: [ View ]
9th September 2011, 06:56 PM   |  #9  
lotus13's Avatar
Senior Member
Flag Somewhere in the kernel called earth
Thanks Meter: 102
 
234 posts
Join Date:Joined: Jul 2011
Donate to Me
More
Quote:
Originally Posted by tony-noob

i turned off my phone, click button in s1tool and connect my phone to computer with pressed back button? and nothing writes only
2011. 09. 09. 19:02:20 Welcome to S1 identify tool
2011. 09. 09. 19:03:03
2011. 09. 09. 19:03:03 TO CONNECT NEXT PHONES
2011. 09. 09. 19:03:03 X10 Xperia,E10 Xperia Mini,E15 Xperia X8,U20 Xperia Mini Pro
2011. 09. 09. 19:03:03 LT15 Xperia ARC,MT15 Xperia NEO,R800 Xperia PLAY
2011. 09. 09. 19:03:03 PRESS AND HOLD "BACK" BUTTON...
2011. 09. 09. 19:03:03
2011. 09. 09. 19:03:03 PLEASE ATTACH TURNED OFF PHONE NOW
2011. 09. 09. 19:03:03
2011. 09. 09. 19:03:39 PROCEDURE STOPPED BY USER
2011. 09. 09. 19:03:39 Elapsed:250 secs.
Please help...

1.TURN OFF YOUR PHONE.
2.Open S1tool.CLick DO JoB(right side)
3.On your phone:
a.Pressing the back key.connect you phone.untill s1tool says:SEMC SIMLOCK CERTIFICATE
b.DO NOT RELEASE THE BACK KEY!
9th September 2011, 07:03 PM   |  #10  
DeFcOn's Avatar
Senior Member
Flag Győrszemere
Thanks Meter: 243
 
861 posts
Join Date:Joined: Jun 2011
More
Quote:
Originally Posted by lotus13

1.TURN OFF YOUR PHONE.
2.Open S1tool.CLick DO JoB(right side)
3.On your phone:
a.Pressing the back key.connect you phone.untill s1tool says:SEMC SIMLOCK CERTIFICATE
b.DO NOT RELEASE THE BACK KEY!

i do this 5 times but nothing... its normal if i don't have unlocked sim?can this cause this problem?

The Following User Says Thank You to DeFcOn For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes