Installing LegacyXperia for Dummies

Robert Clochard edited this page Sep 25, 2016 · 44 revisions

This page steps you through everything you need to install LegacyXperia (LX).

The first time, this will take a while, about 2-3 hours.
Once you've done that, installing other Android versions is a lot easier.

You need basic skills with Windows or Linux.

IF YOU HAVE QUESTIONS
Go to the right Q&A thread:
LX 13.0: http://forum.xda-developers.com/xperia-arc/development/dev-2011-unofficial-cyanogenmod-13-0-t3323975

LX 12.1: http://forum.xda-developers.com/xperia-mini/help/faq-2011-legacyxperia-discussion-t3053947
LX 11.0: http://forum.xda-developers.com/showthread.php?t=2543426
LX 10.2: http://forum.xda-developers.com/showthread.php?t=2466097
LX 10.1: http://forum.xda-developers.com/showthread.php?t=2464859
LX AOSP 5.1.1: http://forum.xda-developers.com/xperia-arc/general/faq-2011-legacyxperiaaosp-discussion-t3053181

Before you Start: Check the Basics

Can you install LegacyXperia (LX) on your phone?

Only if you have one of the following phones:

  • Xperia Active [Satsuma]
  • Xperia Arc [Anzu]
  • Xperia Arc S [Ayame, but uses Anzu's files]
  • Xperia Mini [Smultron]
  • Xperia Mini Pro [Mango]
  • Xperia Neo [Hallon]
  • Xperia Neo V [Haida]
  • Xperia Pro [Iyokan]
  • Xperia Ray [Urushi]
  • Live with Walkman [Coconut]

These two phones were supported, but not as well as the others:

  • Xperia Neo L [Phoenix]
  • Xperia Play [Zeus]

If your phone is not on the list, you can NOT install LX.

Remember the [codename] for your phone !

Do you have a PC with a supported OS?

Linux works (when in doubt, Ubuntu LTS is the best tested).

Windows XP (32 bit) is the easiest to work with.

Windows Vista, 7 works.

Windows 8 can be used after disabling Driver Signature Enforcement (this is the only way to install flashtool/adb drivers). See http://www.nextofwindows.com/how-to-install-an-un-signed-3rd-party-driver-in-windows-8/

Windows 8.1 and Windows 10: Microsoft has released the new update for Sony Driver. Install this to remedy the problem http://support.microsoft.com/kb/2917929

OSX works with some effort, but you can simply run another OS in a VM.

Do you WANT to install LX?

If you value trouble-free reliability over everything else, better stay with stock Android.
If you want the latest Android, more control over your phone, and you are willing to tinker with your phone and live with some bugs, try LX. You can always go back to stock if you don't like it.

###Risks LegacyXperia is not a company. It is private developers spending a lot of their free time to give you cool stuff.

YOU have to take the risk. Others may help you if they want, but NOBODY is responsible for YOUR problems except you!

It happens that newcomers "soft brick" their phones: they end up with a broken installation, the phone no longer works, and they don't know how to fix it. This usually gets fixed with some help on the XDA forums, but the phone may be down for a while.

"Hard bricks" are phones that are so broken that they can no longer be fixed.
This is very rare (I have never heard of such a case with LegacyXperia, I don't even know how to do it on purpose).

Outline: the Major Steps in this guide

This is a summary of what you will do below:

  1. Unlock the bootloader
    (this gives you more boot options than "load Android", for example, boot to fastboot mode or recovery. This is like the PC F8 boot menu)
  2. Install the Android SDK on your PC
    (this gives you the required drivers and tools to talk to your phone via USB, on a low level)
  3. Install an LX kernel
    (this is required for LX Android. It also provides a Recovery kernel, which lets you do low-level admin on the phone)
  4. Install an LX Android ROM
    (this is the actual Android system running on top of the Linux kernel. ROM basically means "Android system image")

INFO What about Root?
Rooting makes you an administrator, so you can do (and damage) anything.
The LX Rom is already rooted; you never need to root the phone yourself.

Other Installation Guides

If you run into problems, you can try

Unlock the Bootloader, Install SDK

INFO
During the Sony guide, you install the Android SDK. This gives you the adb and fastboot tools, and (hopefully) installs the required adb and fastboot drivers.
Now you have low-level access to your phone, and you can also use the SDK to write Android apps. If you know Java, check the examples; it's quite easy to do a Hello World.

INFO
fastboot is a very low-level routine that lets you flash partition images to partitions. Fastboot is never overwritten by LX. As long as fastboot works, you can always recover from a broken installation.
adb (Android Debug Bridge) is like a shell that you run on your PC. It allows you to remotely access the Android file system, copy files, read the logs, and so on.

Choose your weapon

  • LX 13 based on CM 13 based on AOSP 6 (Marshmallow)
  • LX 11.0 based on CM 11.0 based on AOSP 4.4 (KitKat)

No longer maintained:

  • LX 12.1 based on CM 12.1 based on AOSP 5.1 (Lollipop)
  • LX 12 based on CM 12 based on AOSP 5.0 (Lollipop)
  • LX 10.2 based on CM 10.2 based on AOSP 4.3 (Jellybean)
  • LX 10.1 based on CM 10.1 based on AOSP 4.2 (Jellybean)
  • LX 5.1.1 based on AOSP 5.1.1 (Lollipop, plain AOSP without CyanogenMod)

You can check the "Working/Not Working" lists on the LX project page: http://legacyxperia.github.io

LX 13 has big new features, and a lot of changes every day, so it is not as well tested as the others. I recommend LX13 if you want to experience shiny new Android. It performs well, but Google has not designed it to run on 512MB phones, so you have to live with occasional slowdowns. All apps and data are stored on the SD card, so you need a fast one to enjoy it.
LX 12 is stable, but it is made obsolete by LX 13 (which is more like LX 12 reloaded).
LX 11 is currently the fastest and most reliable version; Google designed it to run on 512MB phones. This is noticable especially when you switch between several apps. You must use link2sd or similar tools to move apps to the SD card. I recommend LX11 if you install LX on your only phone and want it to 'just run' after it settled down.

If you're not sure, I would start with 13.

INFO
AOSP is the official Google Android ("Android Open Source Project") that runs on Nexus phones.
CM (www.CyanogenMod.org) builds on top of AOSP, adds features and bugfixes, and supports more phones.
LX builds on top of CM, to support the 2011 Xperias (official CM support for our phones ends with v4.1).

Download the ROM

  1. Go to the LX Project page: http://legacyxperia.github.io
  2. Clicking on "Downloads" will take you to the BasketBuild download page
  3. Click on your phone's codename
  4. Choose an Android version
  5. Pick the newest build for your desired Android version. Nightlies/Release doesn't really make sense today. Go to the newer one. The date is within the file's name.
  6. If the ROM has just been released, CHECK THE SIZE OF THE FILE! If the file is smaller then the older builds, the upload is not finished. Wait until the file size does not change before you download!
  7. Open the ROM .zip and extract the kernel (boot.img) to your PC
  8. Download the Google Apps, also know as GApps (this is Google apps like the Play store).
    YOU MUST ALWAYS use GApps that match the Android version.
  • For CM10.1 and CM10.2: The respective GApps files have been added to the BasketBuild download page and can be found inside the gapps folder.
  • For CM11: Get Mardon's GApps for 4.4. This is a lite version because the full GApps package does not fit on our phones. You can install missing apps like Gmail later from the Play store. Download from XDA-Developers
  • For CM12: Get Mardon's Mini GApps for 5.1.1: XDA-Developers
  • For CM13: Get Mardon's Mini GApps for 6.0.1: XDA-Developers

Save all your Data

Assume that the following steps will erase all data on your phone, including the SD card if things go wrong.
Save everything you will still need, like pictures, local contacts and local documents.

To store app settings like game progress, use a backup tool. Titanium Backup is an XDA favorite.
Personally, I don't do that. I like to start from scratch, and install everything from the Play store; my data is on Dropbox and Google.

Lollipop: Prepare an SD card with 2 partitions.

See the corresponding chapter in Installing Lollipop

KitKat: Reset the Internal Storage Partitions

This step is only needed when you flash LegacyXperia for the first time, and you have installed other custom ROMs before. The other ROMs may have changed the partition layout, which can cause tricky problems.
Follow these instructions How to Go Back to Stock to install a stock ICS .587 image on your phone.

Install the LX Kernel

  1. KitKat and Lollipop: Copy the ROM .zip and the GApps .zip to the root directory of your SD card
  2. Connect the phone in fastboot mode
  3. Shut down the phone
  4. Press and hold the fastboot button (Menu or Vol-Up)
  5. Connect USB
  6. Release the fastboot button
  7. The status LED should turn blue. If not, try again.
  8. Find fastboot.exe on your PC (...\Android-SDK\platform-tools)
  9. Open a command prompt as an administrator and navigate to your fastboot.exe directory using cd command
  10. Enter fastboot devices to check if fastboot is working. This command should print something like:
    123ABC456 fastboot
    If the result is an empty line, troubleshoot fastboot.
  11. Move the kernel you extracted earlier to the fastboot.exe directory
  12. Enter fastboot flash boot boot.img
    Flashing the kernel takes a few seconds.
  13. Enter fastboot reboot
  14. When the boot image appears, press Vol-Down or Back every second.
    The LED turns blue and you enter the Recovery tool.

If the phone is not booting at all

  1. Reboot to bootloader again
  2. Enter fastboot erase system
  3. Enter fastboot erase userdata
    This will erase all data and settings.

Install the LX ROM

Note: You must install the kernel every time you install a new ROM version.

Marshmallow uses a different method to install the ROM. Skip this step and instead follow Installing Marshmallow

  1. Boot into the Recovery tool
    Navigate the menus with Vol-Up/Down to choose, Home to confirm, Back to go back.
    If the buttons don't work, try Menu and Power.
  2. Only if you install KitKat for the first time:
  3. Go to mounts and storage
  4. Format /system, then /data, then /cache
  5. Select Wipe Data / Factory Reset
    This will erase all your data, apps and settings. Usually, you only have to do that when you switch to other ROMs; when you only install a newer build of the same ROM (like LX11 build 5 to LX11 build 7), only do a factory reset when the developer says so, or when you don't care about losing data.
  6. Flash the ROM .zip that you have put on your SD card before
  7. Select Install .zip
  8. Select Choose .zip from /Storage/SDcard0
  9. Select the ROM .zip ("cm-11-20140101-...zip")
  10. Repeat the last step to flash the GApps .zip
    Flashing GApps is optional; it is required for the Play store, which you probably want. Note that the GApps package must match the LX release (you cannot flash a KitKat GApps on Lollipop, for example).
  11. Return to the main menu and Reboot system now

NOTE: Do NOT reboot and install GApps afterwards, this causes problems with access rights.

Basic Setup

  • Show Developer settings:
    Go to Settings > About phone and press Build number seven times.
  • Give root to adb: Settings > Developer options > Root access : apps and adb
    This lets you access the file system from your PC