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 ran pretty smoothly. So feel free to try it out if you want to.
REQUIREMENTS
- PC
- Rooted Xperia S
- TWRP recovery installed
- Fastboot/ADB folder
- Pure AOSP Marshmallow Rom-[Download]
- (Optional) Stock ftf firmware [Download] (if you want to revert to stock rom
Also read Installing TWRP 3.0.0 on Sony Xperia S LT26i (nozomi) and MIUI 7 for Sony Xperia S (Lt26i)
FULL INSTALLATION GUIDE
Note: Before you go about installing any custom rom on 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
Step Three: Connect the device to the 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
p

d15d14

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

p
w
exit
adb push pure_aosp_marshmallow_r1.zip /tmp/
Note: ‘pure_aosp_marshmallow_r1.zip’ 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 screenshots below:


45 Comments
If someone does not know the code of the service menu / hidden menu is : *#*#4636#*#*
nice 1 man, kudos
thanks a lot for dropping by bro.
Hello Collins Edim, I followed all the steps, TWRP is not detecting the SDCard after repartitioning.
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.
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?
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.
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.
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.
Have you tried flashing the boot.img contained in the MIUI 7 ROM package?
Flashed MIUI 7 (6.3.4) the link posted in your guide
Has it installed properly?
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.
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.
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.
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.
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)
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?
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?
Did you try Ultimate Volume Booster?
can i use same process for Cyanogenmod 13
Yes you can! There's no difference, and it works just fine.
can you give any link download for Cyanogenmod 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)
Hola Collins,He seguido el tutorial al pie de la letra,pero al reiniciar me dice no se que de encryptado…
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 !
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.
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.
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.
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.
I tired flashing recovery again.
Still unable to mount data
You will have to flash the stock firmware of your phone then retry the entire steps again.
Thanks.
It workedwith
Thanks. It worked.
How about the bootloader?
What about the bootloader?
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.
hi
i have problem adb server is out of date. killing…
* daemon started successfully *
error: device \'(null)\’ not found
help me please
Consider downloading this version of ADB Installer, https://www.leakite.com/adb-fastboot-driver/
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.
Please reflash stock rom and retry the process accordingly.
thanks for all