[RECOVERY][TWRP&CWM][Updated: 6-Feb-2013]Stock Kernel on Official Jellybean

Search This thread

lilstevie

Senior Recognized Developer
Apr 17, 2009
1,339
1,040
Note: This has been deprecated in favour of LK for Xperia T

This kernel image is based on stock using the FreeXperia ramdisk method of loading stock and recovery. It also includes the new FOTA partition trick by Dees_Troy for easy updates in the future to TWRP.

Dees_Troy and I worked on figuring out the reason recovery binaries would not load on the stock kernel without patches, fixed this up in bionic, and rebuilt recovery linked against the fixed bionic.

F.A.Q

Q. The title says TWRP and CWM but when I boot recovery I only see TWRP. How do I get CWM?
A. TWRP is the default recovery, if you want CWM you should download the CWM update.zip in the second post and flash it with twrp.

Technical Info

In 3.4 Qualcomm have changed the fb_var_screeninfo struct slightly. They have added an extra field called colorspace which increases the size of the stuct by __u32. When a binary linked against bionic tries to pass a struct the size of the old fb_var_screeninfo to kernelspace the application breaks as the kernel is expecting more data than it was given.

The patch to fix this in kernel solves the problem by removing one of the reserved fields, bringing the struct back to the same size it was prior to the new field being added. While this keeps compatibility with older recovery binaries, it does introduce the problem of needing a custom kernel to run recovery. Sony have not yet released source for 9.1.A.0.489 which means the kernel cannot be rebuilt without issues such as WiFi not working. The patch that Dees_Troy applied to the build system was to add the new colorspace field into the header for bionic which means the new recovery binary can run on an unmodified stock Sony kernel.

Flashing

Boot device in fastboot mode:
Code:
adb reboot bootloader
Flash image with fastboot:
Code:
fastboot flash boot mint489stock.img


Source for TWRP available from here.​
 

Attachments

  • mint489stock.img
    9.8 MB · Views: 2,279
Last edited:

lilstevie

Senior Recognized Developer
Apr 17, 2009
1,339
1,040
Updates:

1. Updated image in first post to fix bug where creating a backup would fail and crash twrp.
2. Updated first post to show CWM in title and answer questions about how to get CWM.

Flashable zips:

In the first post it is mentioned about using the FOTAKernel trick by Dees_Troy to offer easy updates. The 2 zips attached to this post are examples of the ease of use.

flashCWM.zip - This will flash CWM to the FOTAKernel and replace TWRP as your recovery.
flashTWRP.zip - This will flash TWRP to the FOTAKernel and replace TWRP that is built into the image that was flashed to your device by fastboot, or to replace CWM with TWRP again if you used the flashCWM.zip

This also makes updates easier as you do not need to replace the kernel image you currently have flashed to your device.
 

Attachments

  • flashCWM.zip
    7.2 MB · Views: 889
  • flashTWRP.zip
    7.5 MB · Views: 869
Last edited:

jerdog

Admin Emeritus - Purveyor of word nuggets
May 17, 2007
8,169
7,154
Gallifrey
Many thanks, can you just clear up one thing please, does Wi-Fi work on this image?

Sent from my LT30p xda premium app.
How do I customise the signature on xda premium app?

Yes, wifi does work because it is just the stock kernel with TWRP added. I am running it right now with no problems.
 
  • Like
Reactions: gregbradley

sj8023ld

Senior Member
Jan 9, 2011
129
356
This kernel image is based on stock using the FreeXperia ramdisk method of loading stock and recovery. It also includes the new FOTA partition trick by Dees_Troy for easy updates in the future to TWRP.

Dees_Troy and I worked on figuring out the reason recovery binaries would not load on the stock kernel without patches, fixed this up in bionic, and rebuilt recovery linked against the fixed bionic.

Technical Info

In 3.4 Qualcomm have changed the fb_var_screeninfo struct slightly. They have added an extra field called colorspace which increases the size of the stuct by __u32. When a binary linked against bionic tries to pass a struct the size of the old fb_var_screeninfo to kernelspace the application breaks as the kernel is expecting more data than it was given.

The patch to fix this in kernel solves the problem by removing one of the reserved fields, bringing the struct back to the same size it was prior to the new field being added. While this keeps compatibility with older recovery binaries, it does introduce the problem of needing a custom kernel to run recovery. Sony have not yet released source for 9.1.A.0.489 which means the kernel cannot be rebuilt without issues such as WiFi not working. The patch that Dees_Troy applied to the build system was to add the new colorspace field into the header for bionic which means the new recovery binary can run on an unmodified stock Sony kernel.

Flashing

Boot device in fastboot mode:
Code:
adb reboot bootloader
Flash image with fastboot:
Code:
fastboot flash boot mint489stock.img


Source for TWRP available from here.​


Such a good news!I will port it to TX JellyBean firmware if you don' mind
 

MysticEnforcer

Senior Member
Oct 29, 2012
618
298
Trier
hi,
i wanted to create with this version a backup, but it doesn't work.
it was just created the folder system,
the other folders such as data and boot not.
the created folder system, that was created after backup, is empty.

the 'backup' also takes only a few seconds, then the 'backup' is done.

what have i done?
installed the .img with instructions above.
boot xt into recovery, push backup, select system, data & boot, choose destination folder and start backup.

where is my failure?
 
Last edited:

gregbradley

Retired Forum Moderator
only for unlocked bl, correct?

Yes

hi,
i wanted to create with this version a backup, but it doesn't work.
it was just created the folder system,
the other folders such as data and boot not.
the created folder system, that was created after backup, is empty.

the 'backup' also takes only a few seconds, then the 'backup' is done.

what have i done?
installed the .img with instructions above.
boot xt into recovery, push backup, select system, data & boot, choose destination folder and start backup.

where is my failure?

Same here....seems backup is not working
 

gregbradley

Retired Forum Moderator
Just flashed new image

Doing a backup and it seems to work...will update in few minutes when it is finished



EDIT:
It works
Backup complete in 385 seconds


FYI,

both times on rebooting system from recovery I initially got the grey triangle, both times it was only for 10-15 seconds before the phone rebooted...
 
Last edited:

r-l

Senior Member
Jan 8, 2011
2,282
800
Rotterdam
Testing it now ....


Edit:


[Backup completed in 461 seconds] External SD card with compression on. No Grey triangle for me.
[Restore completed in 192 seconds] Restored backup without any problems. No grey triangle on second reboot either.

Seems to work great for me.

(only clock seems to be incorrect. 7 hours and 16 minutes behind)


Edit 2: thirth boot up seems to get stuck on grey triangle for about 15 seconds
Edit 3: Seems only the first time reboot after using the recovery the grey triangle is there. Rebooted the phone 4 times and only got the triangle 1 time.
 
Last edited:

lilstevie

Senior Recognized Developer
Apr 17, 2009
1,339
1,040
USB storage does not work at all both on TWRP and CWM

This appears to be more of a technical limitation.

The internal storage space is formatted ext4, so only linux would be able to mount that by default so it doesn't offer that.
With the MicroSD the issue seems to be a little more complex and may possibly need a custom kernel.
 

romcio47

Senior Member
Nov 27, 2010
1,056
357
29
Bydgoszcz
This appears to be more of a technical limitation.

The internal storage space is formatted ext4, so only linux would be able to mount that by default so it doesn't offer that.
With the MicroSD the issue seems to be a little more complex and may possibly need a custom kernel.

Thanks for the reply :) I guess we just have to wait for the kernel sources to be published :)

Besides another issue - in CWM wiping dalvik-cache does not work.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 23
    Note: This has been deprecated in favour of LK for Xperia T

    This kernel image is based on stock using the FreeXperia ramdisk method of loading stock and recovery. It also includes the new FOTA partition trick by Dees_Troy for easy updates in the future to TWRP.

    Dees_Troy and I worked on figuring out the reason recovery binaries would not load on the stock kernel without patches, fixed this up in bionic, and rebuilt recovery linked against the fixed bionic.

    F.A.Q

    Q. The title says TWRP and CWM but when I boot recovery I only see TWRP. How do I get CWM?
    A. TWRP is the default recovery, if you want CWM you should download the CWM update.zip in the second post and flash it with twrp.

    Technical Info

    In 3.4 Qualcomm have changed the fb_var_screeninfo struct slightly. They have added an extra field called colorspace which increases the size of the stuct by __u32. When a binary linked against bionic tries to pass a struct the size of the old fb_var_screeninfo to kernelspace the application breaks as the kernel is expecting more data than it was given.

    The patch to fix this in kernel solves the problem by removing one of the reserved fields, bringing the struct back to the same size it was prior to the new field being added. While this keeps compatibility with older recovery binaries, it does introduce the problem of needing a custom kernel to run recovery. Sony have not yet released source for 9.1.A.0.489 which means the kernel cannot be rebuilt without issues such as WiFi not working. The patch that Dees_Troy applied to the build system was to add the new colorspace field into the header for bionic which means the new recovery binary can run on an unmodified stock Sony kernel.

    Flashing

    Boot device in fastboot mode:
    Code:
    adb reboot bootloader
    Flash image with fastboot:
    Code:
    fastboot flash boot mint489stock.img


    Source for TWRP available from here.​
    9
    Updates:

    1. Updated image in first post to fix bug where creating a backup would fail and crash twrp.
    2. Updated first post to show CWM in title and answer questions about how to get CWM.

    Flashable zips:

    In the first post it is mentioned about using the FOTAKernel trick by Dees_Troy to offer easy updates. The 2 zips attached to this post are examples of the ease of use.

    flashCWM.zip - This will flash CWM to the FOTAKernel and replace TWRP as your recovery.
    flashTWRP.zip - This will flash TWRP to the FOTAKernel and replace TWRP that is built into the image that was flashed to your device by fastboot, or to replace CWM with TWRP again if you used the flashCWM.zip

    This also makes updates easier as you do not need to replace the kernel image you currently have flashed to your device.
    3
    Dees_Troy has updated TWRP to support jb.

    You should keep the kernel installed from the first post as that has the trick required to load twrp from FOTAKernel.
    If you open goomanager and in the menu select the option "Install OpenRecoveryScript" that should update the FOTAKernel partition with official TWRP.
    2
    only for unlocked bl, correct?

    Yes

    hi,
    i wanted to create with this version a backup, but it doesn't work.
    it was just created the folder system,
    the other folders such as data and boot not.
    the created folder system, that was created after backup, is empty.

    the 'backup' also takes only a few seconds, then the 'backup' is done.

    what have i done?
    installed the .img with instructions above.
    boot xt into recovery, push backup, select system, data & boot, choose destination folder and start backup.

    where is my failure?

    Same here....seems backup is not working
    2
    the 'backup' also takes only a few seconds, then the 'backup' is done.

    Updated first post with a fixed image.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone