Wednesday, December 30, 2015

How to perfectly install Android 6.0 Marshmallow on Xperia S (LT26i)

Installing Android Marshmallow on Xperia S is a little bit complicated if you do not have basic knowledge of CMD (Command prompt) commands. But not to worry, I'm right here to help you with that.

After installing the rom on my Xperia S, it run pretty smooth. So, feel free to try it out, if you want to.

  1. A PC
  2. Rooted Xperia S
  3. TWRP recovery installed 
  4. Fastboot / ADB folder
  5. Pure AOSP Marshmallow rom [Download]
  6. (Optional) Stock ftf firmware [Download]  (if you want to revert to stock rom)
Also read about Installing TWRP 3.0.0 on Sony Xperia S LT26i (nozomi) and MIUI 7 for Sony Xperia S (Lt26i)


Note: Before you go about installing any custom rom to your device, you should consider making a backup of your current rom just in case you mess something up. Make a backup of your SDcard content too.

Read how to flash nAOSP Lollipop (5.0, 5.1) Rom On Xperia S LT26i

Disclaimer: your use of this guide is strictly at your own risk just in case something goes wrong and your device gets damaged. I or Leakite will not be held responsible, but you.

Step One: Reboot your device to TWRP recovery

Step Two: Go to Mount and uncheck all the checked options

Read how to flash OneOfaKind lightweight Marshmallow rom on Xperia S

Steep Three: Connect the device to PC using a USB cable, then launch CMD from your ADB / Fastboot directory

Step Four: Type in the following commands

adb shell 
fdisk /dev/block/mmcblk0 


(First cylinder) -> You have to enter the start cylinder of partition 14 as read in partition table earlier.
(Last cylinder) -> Here, check the end cylinder of partition 15. Mine was 954240. The subtraction then looked like this: 954240-16384= 954238. So, I entered 937856 here.


adb push /tmp/

Note: '' should be the name of your downloaded Marshmallow rom. If you renamed it, effect the change in the command above before you hit Enter button.

Now, we're done with the hard part. Let's go ahead and install the rom now.

To install, select the Install option in TWRP recovery to commence the installation. Once done, reboot device to system.
First boot takes a while, so be patient and wait for it.

IMPORTANT: To revert all the changes made to your device's partition, you will have to flash a stock ftf firmware. After flashing, if you're still unable to mount your sdcard, go to Settings > storage and format the sdcard. This will fix it.

To go back to previous rom, just restore the backup you made previously.

That's all!

See my screenshots below:

Write replies
  1. If someone does not know the code of the service menu / hidden menu is : *#*#4636#*#*

  2. Hello Collins Edim, I followed all the steps, TWRP is not detecting the SDCard after repartitioning.

    1. Once you partition the internal sdcard as explained above you won't be able to access it normally. It has been entirely converted to data partition.

      That's why you'll have to push the rom to /tmp/ for flashing, and not the normal way.

    2. Thanks for the reply, I pushed the rom to /tmp/ but it is not visible for flashing through TWRP. If I want to flash MIUI 7 (as explained in your other thread), pushing the ROM to /tmp/ will be sufficient?

    3. Yes, it is and will be sufficient.

      As I explained in the article, once you push the ROM to /tmp/, return to TWRP main screen and select Install. The installation process should commence instantly.

    4. But you absolutely don't need this guide to flash MIUI 7 on your Xperia S since you're able to access the sdcard normally and there's no need to extend the data partition.

      If you wish to flash via pc, you should use the adb sideload command instead.

    5. Yes, this guide is not required for flashing MIUI but I have already partitioned my device. I could install Marshmallow but unable to flash MIUI. I pushed the MIUI ROM to the device & installed it but my device doesn't boot. It gets stuck at "SONY" logo.

    6. Have you tried flashing the boot.img contained in the MIUI 7 ROM package?

  3. Flashed MIUI 7 (6.3.4) the link posted in your guide

  4. Replies
    1. I didn't get any error, so I assume it installed properly.
      Is there a way to make the partitions back as it was before so TWRP detects it? I tried making 15 partitions like before but no luck :(
      Even when connected to the PC, SDCard doesn't appear. PC only shows LT26i but no storage.

    2. To revert all changes made to your sdcard, you will have to format it.

      But be aware that if you used the guide in this article to install Marshmallow on your device, the device will be stuck at boot screen after you must have formatted the sdcard.

      So, backup your files to PC via MTP mode. Format sdcard, then flash another rom.

    3. I re-partitioned my device, having 15 partitions as before but still SDCard is not getting mounted in TWRP.

      Tried flashing MIUI, now the device is getting stuck at the MI Logo.

    4. The sdcard has to be formatted before it can be accessed normally via TWRP or Mass Storage.

      Flash stock firmware from the link provided in this article, boot into system and format the SDcard. Then you can follow MIUI 7 installation steps.

    5. Thanks for all your help Collins, managed to format SDCard & install MIUI7. Although system language is set to English, most of the apps like App Store, Themes, Games etc. are showing stuff in Chinese, any way to change the language to English?
      Just one more thing, any way to boost speaker volume (in-call volume is very low)

    6. The entire language should be English since you already selected it during first boot.

      For the issue with in-call volume, I noticed it in the older version and I believe it should have been fixed in the later builds.

      Which of the versions did you install?

    7. The language all over the UI is English but inside the apps it displays Chinese.

      Initially, I installed 6.3.4 from the link on your thread - it was showing an update was available, so I downloaded & installed 6.3.18

      Version 6.3.4 was having the same issue, I thought it will get resolved with the newer version so flashed it, but no luck.

      I have seen some volume boosters in Play Store, but didn't seem to work for me. You aware of any good one?

  5. can i use same process for Cyanogenmod 13

    1. Yes you can! There's no difference, and it works just fine.

  6. can you give any link download for Cyanogenmod 13

    1. At the moment bro, there's no official CM13 for LT26i. There's just CM12.1.

      If you just feel like trying out other roms for this device, check these out:

      1. nAOSP (Lollipop)
      2. OneOfaKind (Marshmallow)

  7. Hola Collins,He seguido el tutorial al pie de la letra,pero al reiniciar me dice no se que de encryptado...

    1. No debe mostrar dicho mensaje. Siga las instrucciones cuidadosamente , especialmente la guía de partición de datos , no se mostrará que el error de nuevo. Pero si persiste , flash stock firmware , vuelva a intentar !

  8. Do you have to install gaps? I didnt install gaaps. It loads and then says encryption unsucessful. It doesnt enter recovery mode. Can you please help.

    1. It is required and necessary that you flash gapps. If you can't get into recovery mode, wipe your phone and repeat the above steps: from flashing boot.img via fastboot to end.

  9. Thank for your step by step information regarding os installation.

    While flashing Rom I got error stating Encryption Unsuccessful.

    It asks to reset phone to perform factory data reset.

    When I do so. It goes into recovery it shows error unable to mount data nd unable to mount sdcard...

    Pls help...

    I'm not worried of losing any data in my phone.

    1. If your recovery is unable to mount partitions as you explained above, you need to flash the recovery again.

      But what I need you to understand is: to get this ROM working without errors you need to entirely wipe your device data then restart the installation following the instructions above.

  10. I tired flashing recovery again.
    Still unable to mount data

    1. You will have to flash the stock firmware of your phone then retry the entire steps again.


If your comment is unrelated to this article, post the problem, request or suggestion here instead.