Search This thread

cmajetic

Senior Member
Sep 6, 2011
1,513
623
Vienna
AW: [Bootloader] LK for Xperia T

okay thanks for your help, everything fine :)

what if I want to install cm10 now? just wipe and flash? does it just flash the kernel included in the boot.img from the cm10 zip and not the recovery? or is this not possible yet/overrides the recovery and reverts anything?

Gesendet von meinem LT30p mit Tapatalk 2
 

lilstevie

Senior Recognized Developer
Apr 17, 2009
1,339
1,040
okay thanks for your help, everything fine :)

what if I want to install cm10 now? just wipe and flash? does it just flash the kernel included in the boot.img from the cm10 zip and not the recovery? or is this not possible yet/overrides the recovery and reverts anything?

Gesendet von meinem LT30p mit Tapatalk 2

Not yet, CM10 includes a 3.0 kernel which won't work with lk at this point in time.

I am working with cdesai at getting lk merged into cm10.1 but that is still a wip at the moment, you could probably build a cm10.1 image that is compatible from the changes on gerrit, but ultimately for cm10.1 I would wait until it transitions to using the sony 3.4 kernel
 
  • Like
Reactions: cmajetic

adam900710

Senior Member
Dec 20, 2010
86
19
Perfect idea and the bootloader.

Waiting for CM to accept it as default bootloader and kernel support.

BTW, it will be much better if CM10 also use the Sony JB kernel, but it will not be so....
 
Last edited:

Random Canadian

Senior Member
Dec 27, 2010
192
63
Sorry if I'm not getting something, but could/will this be able to be installed on devices that say "boot loader unlock allowed:no" to allow usage of CM10/PA/AOSP ect?

I'm coming from an Atrix so the concept of recovery being tied to a specific kernel is foreign to me.
 
Last edited:

Mad Marty

Senior Member
Jan 20, 2011
278
94
No, you'll need an unlocked bootloader to install a custom/unsecure kernel. There are versions of recoveries for locked bootloaders, though you'll still need to be rooted
 

lilstevie

Senior Recognized Developer
Apr 17, 2009
1,339
1,040
Sorry if I'm not getting something, but could/will this be able to be installed on devices that say "boot loader unlock allowed:no" to allow usage of CM10/PA/AOSP ect?

I'm coming from an Atrix so the concept of recovery being tied to a specific kernel is foreign to me.

no, in this case LK adds as an extra link in the boot chain taking place of where the kernel normally sits, to do this you need to be able to load an unsigned kernel
 

mrsatan

Senior Member
Jul 12, 2009
1,889
501
SLC
Damn this is sweet. My only problem with Sony devices is how the kernel is tied to the recovery. I wish my Xperia S could do this! Hopefully the Xperia Z and further phones try this as well.
 

DooMLoRD

Inactive Recognized Developer
Jul 27, 2010
13,187
39,710
Pune
Damn this is sweet. My only problem with Sony devices is how the kernel is tied to the recovery. I wish my Xperia S could do this! Hopefully the Xperia Z and further phones try this as well.

I intend to get this working on Xperia S...


There is No need of this on Xperia Z as it uses standard boot.img format

Sent from my LT30p using xda app-developers app
 
  • Like
Reactions: Galaxy3HELL

lilstevie

Senior Recognized Developer
Apr 17, 2009
1,339
1,040
I don't know if it's matter but I was on cm10.1 when I send you the output

Sent from my GT-I8190 using xda premium

That wouldn't matter, at this stage only flashing FTFs (or via PC Companion/EMMA/etc) and the LK installation zip modify the partition table on the Xperia T, it would be the same on the V.
 

cdesai

Inactive Recognized Developer
Jan 16, 2011
2,296
4,089
IN YOUR HEAD
New version uploaded
It supports dual booting, second kernel is loaded if camera focus key is pressed on first 5 seconds of boot, and second recovery on pressing the snapshot key (i.e. pressing it fully)
second kernel is loaded from Android2 partition, and second recovery from recovery2 partition.
We'll update the scripts to make them automatically shortly.

LK:
http://goo.im/devs/cdesai/mint/lk/lk-20130223.elf
flash it with "fastboot flash bootloader <file>"

Also, here's a completely unmodified stock kernel, for anyone who wants it - built from source, but packed into a boot.img rather than sony elf.
http://goo.im/devs/cdesai/mint/sony/boot-20120224.img
 

hodgepodge81

Member
Nov 4, 2010
30
4
Amsterdam
New version uploaded
It supports dual booting, second kernel is loaded if camera focus key is pressed on first 5 seconds of boot, and second recovery on pressing the snapshot key (i.e. pressing it fully)
second kernel is loaded from Android2 partition, and second recovery from recovery2 partition.
We'll update the scripts to make them automatically shortly.

So after that script wil be installed i can install a second kernel en recovery with "fastboot flash recovery2 recovery.img" and "fastboot flash Android2 boot.img"?

Great solution this, and very easy to install.

Thank you
 

themaxx

New member
Sep 28, 2006
4
0
Partition error

Hi,

I just installed LittleKernel-1.0-FINAL.zip and JB_Kernel_LK.zip. Now my Xperia T will not boot anymore, I can start the Phone in fastboot mode and by using sony xperia flasher i can start the Phone using the option select "kernel to HotBoot". I select the boot.img I extracted from JB_Kernel_LK.zip and the Phone 'Hotboot s' just fine. When I try to install the kernel to flash using the same tool (or fastboot from Android SDK) I get the following error :


03/056/2013 15:56:14 - INFO - Device should now start booting with this kernel
03/056/2013 15:56:27 - INFO - Device connected with USB debugging off
03/056/2013 15:56:27 - INFO - For 2011 devices line, be sure you are not in MTP mode
03/056/2013 15:56:36 - INFO - Finished Fastboot Toolbox
03/056/2013 15:56:44 - INFO - Device connected with USB debugging on
03/056/2013 15:56:44 - INFO - Connected device : LT30
03/056/2013 15:56:44 - INFO - Installed version of busybox : N/A
03/056/2013 15:56:44 - INFO - Android version : 4.1.2 / kernel version : 3.4.0-g5549a4a-dirty / Build number : 9.1.A.0.489
03/056/2013 15:56:56 - INFO - Root Access Allowed
03/059/2013 15:59:34 - INFO - Device disconnected
03/013/2013 16:13:05 - INFO - Launching Fastboot Toolbox 1.0 by DooMLoRD
03/013/2013 16:13:05 - INFO - Device Status: FASTBOOT mode
03/015/2013 16:15:46 - INFO - Selected kernel (boot.img or kernel.sin): C:\Flashtool\boot.img
03/015/2013 16:15:46 - INFO - Flashing selected kernel
03/015/2013 16:15:46 - INFO - sending 'boot' (9902 KB)...
03/015/2013 16:15:46 - INFO - OKAY [ 0.376s]
03/015/2013 16:15:46 - INFO - writing 'boot'...
03/015/2013 16:15:46 - INFO - FAILED (remote: partition table doesn't exist)
03/015/2013 16:15:46 - INFO - finished. total time: 0.378s
03/015/2013 16:15:46 - INFO - FASTBOOT Output:
sending 'boot' (9902 KB)...
OKAY [ 0.376s]
writing 'boot'...
FAILED (remote: partition table doesn't exist)
finished. total time: 0.378s

In other words something went wrong with my partition table, I can't flash any image now. Is there a way to fix this using fastboot ?

Please help, I'm running out of options
 

lilstevie

Senior Recognized Developer
Apr 17, 2009
1,339
1,040
Hi,

I just installed LittleKernel-1.0-FINAL.zip and JB_Kernel_LK.zip. Now my Xperia T will not boot anymore, I can start the Phone in fastboot mode and by using sony xperia flasher i can start the Phone using the option select "kernel to HotBoot". I select the boot.img I extracted from JB_Kernel_LK.zip and the Phone 'Hotboot s' just fine. When I try to install the kernel to flash using the same tool (or fastboot from Android SDK) I get the following error :


03/056/2013 15:56:14 - INFO - Device should now start booting with this kernel
03/056/2013 15:56:27 - INFO - Device connected with USB debugging off
03/056/2013 15:56:27 - INFO - For 2011 devices line, be sure you are not in MTP mode
03/056/2013 15:56:36 - INFO - Finished Fastboot Toolbox
03/056/2013 15:56:44 - INFO - Device connected with USB debugging on
03/056/2013 15:56:44 - INFO - Connected device : LT30
03/056/2013 15:56:44 - INFO - Installed version of busybox : N/A
03/056/2013 15:56:44 - INFO - Android version : 4.1.2 / kernel version : 3.4.0-g5549a4a-dirty / Build number : 9.1.A.0.489
03/056/2013 15:56:56 - INFO - Root Access Allowed
03/059/2013 15:59:34 - INFO - Device disconnected
03/013/2013 16:13:05 - INFO - Launching Fastboot Toolbox 1.0 by DooMLoRD
03/013/2013 16:13:05 - INFO - Device Status: FASTBOOT mode
03/015/2013 16:15:46 - INFO - Selected kernel (boot.img or kernel.sin): C:\Flashtool\boot.img
03/015/2013 16:15:46 - INFO - Flashing selected kernel
03/015/2013 16:15:46 - INFO - sending 'boot' (9902 KB)...
03/015/2013 16:15:46 - INFO - OKAY [ 0.376s]
03/015/2013 16:15:46 - INFO - writing 'boot'...
03/015/2013 16:15:46 - INFO - FAILED (remote: partition table doesn't exist)
03/015/2013 16:15:46 - INFO - finished. total time: 0.378s
03/015/2013 16:15:46 - INFO - FASTBOOT Output:
sending 'boot' (9902 KB)...
OKAY [ 0.376s]
writing 'boot'...
FAILED (remote: partition table doesn't exist)
finished. total time: 0.378s

In other words something went wrong with my partition table, I can't flash any image now. Is there a way to fix this using fastboot ?

Please help, I'm running out of options

can you fastboot boot a recovery and run "parted /dev/block/mmcblk0 print all"
 

themaxx

New member
Sep 28, 2006
4
0
can you fastboot boot a recovery and run "parted /dev/block/mmcblk0 print all"

I tried to SSH into my Phone and get the following :

127|root@android:/storage/sdcard0 # parted /dev/block/mmcblk0 print all
sh: parted: not found

Am i missing any dependencies, or should I boot using somekind of recovery image (If so where can i find it)
 

hodgepodge81

Member
Nov 4, 2010
30
4
Amsterdam
I tried to SSH into my Phone and get the following :

127|root@android:/storage/sdcard0 # parted /dev/block/mmcblk0 print all
sh: parted: not found

Am i missing any dependencies, or should I boot using somekind of recovery image (If so where can i find it)

No, that's a command u can use in the recovery console. You should flash a stock ftf stock rom with flashboot. In that faq topic you find how to install flashboot and how it works.
 
  • Like
Reactions: themaxx

gregbradley

Retired Forum Moderator
No, that's a command u can use in the recovery console. You should flash a stock ftf stock rom with flashboot. In that faq topic you find how to install flashboot and how it works.

I have never heard of flashboot. Do you mean flashmode or fastboot?

I think he means flashmode, as thats how you flash stock ftf's in flashtool.
 

lilstevie

Senior Recognized Developer
Apr 17, 2009
1,339
1,040
No, that's a command u can use in the recovery console. You should flash a stock ftf stock rom with flashboot. In that faq topic you find how to install flashboot and how it works.

you will need to try it from recovery, I have no idea where you can get a recovery image from, none are built as an android boot.img to my knowledge, alternatively you can flash an ftf with flashtool and try again.
 
  • Like
Reactions: themaxx

Top Liked Posts

  • There are no posts matching your filters.
  • 19
    LK for Xperia T

    LT30p Only - Unlocked Bootloader Required

    WARNING 1: This modification makes changes
    to the devices partition table. I (lilstevie) am not
    responsible for any damage to your device or
    data loss that may occur.

    WARNING 2: ICS kernels currently do not boot
    with this modification at this point in time. This
    can only be used with JB kernels including those
    from the alpha and leaked releases. At the time
    of writing the TWRP 2.4.1.1 FOTA image has
    everything required to boot without any changes.


    Since getting the Xperia T the biggest annoyance is only having one bootable partition.
    To combat this issue I have spent some time porting the Little Kernel bootloader. This
    allows booting different kernels for recovery and boot as well as a full implementation
    fastboot.

    Features:
    • Separate boot and recovery partition.
    • Full fastboot implementation including fastboot boot (with correctly formatted boot.img)
    • Ability to load both Android boot image and sony elf formats.
    • Boot to recovery, and boot to recovery from userspace (requires patched kernel).

    Known Issues:
    • No display until kernel has booted – This is also the case with S1Boot.
    • Cannot reboot into another boot mode without kernel patch.
    • No LEDs to indicate status.
    • ICS 3.0 kernels will not boot.

    Usage:

    After 1 second from pressing the power button LK will listen for input on the volume keys for 2-5 seconds:
    • Volume Up -> boot recovery.
    • Volume Down -> boot fastboot.

    Credits:
    • Rebellos -- Inital work on getting eMMC and buttons working.
    • Dees_Troy -- extract_elf_ramdisk served as a base for elf parsing.
    • cdesai -- Bug fixes and hosting bootloader on his github.
    • Various others for support, if you think your name should be here
      and that I have forgotten all about you let me know.

    How to install LK:
    1. Download LittleKernel-1.0-FINAL.zip
    2. Copy LittleKernel-1.0-FINAL.zip to device
    3. Boot into recovery
    4. Install LittleKernel-1.0-FINAL.zip

    How to install LK ready kernel:
    1. Download JB_Kernel_LK.zip
    2. Copy JB_Kernel_LK.zip to device
    3. Boot into recovery
    4. Install JB_Kernel_LK.zip
    9
    New version uploaded
    It supports dual booting, second kernel is loaded if camera focus key is pressed on first 5 seconds of boot, and second recovery on pressing the snapshot key (i.e. pressing it fully)
    second kernel is loaded from Android2 partition, and second recovery from recovery2 partition.
    We'll update the scripts to make them automatically shortly.

    LK:
    http://goo.im/devs/cdesai/mint/lk/lk-20130223.elf
    flash it with "fastboot flash bootloader <file>"

    Also, here's a completely unmodified stock kernel, for anyone who wants it - built from source, but packed into a boot.img rather than sony elf.
    http://goo.im/devs/cdesai/mint/sony/boot-20120224.img
    5
    Versions:

    Version 1.0:
    • Initial Release.

    MD5Sums:
    • LittleKernel-1.0-FINAL.zip - fd550025493533db904ecb5bc299ac9b
    • JB_Kernel_LK.zip - cc185b728e28865fe6323f4cc96e17a0


    Building a boot image for lk should be done with the
    following boot image settings:
    • Base Address: 0x80200000
    • Ramdisk Address: 0x81400000
    • Page Size: 2048
    • Cmdline: “user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 maxcpus=2 kgsl.mmutype=gpummu”


    Copyleft:
    2
    Ok so from what I understand you are still depending on s1boot as primary bootloader. Then once the primary bootloader passes boot sequence to main kernel (mmcblk0p4) you have little kernel which will intercept it and then function as a bootloader? Which can then accept these commands or in turn boot a secondary kernel (fotakernel) or mmcblk0p16 which will now act as boot partition for the OS?

    We can't actually replace S1Boot due to code signatures, and S1Boot is actually multiple bootloader stages in 1. Other devices would have pbl sbl and appsboot.mbn, Sony have combined them all into 1, LK is only a replacement for appsboot, thankfully between each stage everything that was turned on gets turned on for the purpose of appsboot (such as mmu) get turned off again before the next stage which allows us to do this without major hacks. Essentially what we are doing is adding an extra boot stage.

    mmcblk0p16 which has been added to the end indeed does act as the new boot partition. I did originally plan to add another extra partition for boot, but after talking to Dees_Troy we worked out a situation where we could utilise FOTAKernel for recovery and not impact installation of TWRP from goomanager.

    My concern is how are you making space for that mmcblk0p16? Are you repartitioning internal sdcard?

    I do understand this concern, however I did notice that all Xperia T's that I have encountered so far (I checked with ~10 peoples devices) and they all have 300±25MB of unused, and unpartitioned space at the end of their eMMCs, I do not delete or resize any partitions. This is the script I run when installing lk if you are interested in seeing how it is done.

    I think flashing a standard full stock firmware should restore partition table

    Utimately this is what eased my feelings towards modifying the partition table, I understand people get a little bit funny about things that cannot be easily reverted, and in this case flashing a stock ftf or using EMMA to reflash back to stock will undo the changes to the partition table.