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/’ 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:


  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. 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.

  7. 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.

  8. 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.

  9. 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.

  10. 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)

  11. 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?

  12. 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?

  13. 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)

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

  15. 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 !

  16. 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.

  17. 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.

  18. 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.

  19. 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.

  20. Hi,
    I have successfully upgraded my Xperia S to Marshmallow and gapps are also flashed successfully. However, I am not able to mount external USB as I used to do it earlier. It asks for formatting the USB and the formatting is aborted with message “missing output stream”.
    Any solution?

    • If you check properly in the post and from other comments, this question has been answered.

      The entire Storage has been converted to data partition. And as such, the Internal storage cannot be directly accessed as Mass Storage drive. But you can access and manage your files via Media Transfer Protocol (MTP).

      If you do not like this change and wish to revert, you will have to flash your device’s stock ftf firmware.

      • Hi,

        I am not worried about internal storage. I want to connect external USB via the USB port. Is is still possible as in earlier versions of android?

        Regarding flashing stock firmware, do I have to revert the partition information manually? p14 and p15?

        • No you won’t have to go through that process a second time. If you flash the stock firmware and it doesn’t fix the issue with storage,just navigate to Settings and format the internal storage. That’s all!

          If you mean connecting a USB storage drive via OTG, you can try and give us feedback whether or not it works! It won’t hurt your device.

  21. hi
    i have problem adb server is out of date. killing…
    * daemon started successfully *
    error: device ‘(null)’ not found
    help me please

  22. I m getting an error while creating new partition:
    Calling ioctl() to re-read partition table
    fdisk WARNING : rereading partition table failed, kernal still uses old table: Device or resource busy.

    Please help.

Leave a Comment

Your email address will not be published. Required fields are marked *

It is main inner container footer text