WARNING
SONY has recently changed the method to unlock a bootloader. A rewrite will be done soon. Sorry for the inconvenience
Welcome to customising your phone! I made this guide specifically for new Xperia SP users (be it secondhand phones or you're just starting to do more with your XSP), and for future references until our Xperia SP forum cease from existence. There are many things to learn, if you search in the forums. This guide is to simply guide you into doing stuff in a more verbosely explained manner, at the same time will always be kept updated along with the progress of our Xperia SP.
This guide is universal — you can use any ROM versions that you like!**
"Universal Guide" Notice **
This guide mentioned "flashing custom ROMs". Though this guide is legitimate as it gets for flashing a ROM, I must warn you that methods provided here are exclusively a general outlook on how to flash a ROM. Always use the extraneous methods provided within a custom ROM's thread. If you fail to meet the exclusive requirements and steps of a ROM you will obviously encounter problems!
Disclaimer
Before you proceed, please understand that everything you do with your device, has many risks. If performed correctly, those terrible consequences may not happen. Any actions you will make are solely decided by yourself, and I have nothing to do with any damages that occur when you follow this very guide. Most importantly, following this guide will definitely void your warranty.
NOTE!
This post relies entirely on heavy formatting so you can understand better. Please open this post in a web browser, if you are viewing from a forum app. Tapatalk, for example. This also includes XDA Labs, which as of writing doesn't parse forum tags properly.
Things to consider before using Custom ROMs for your Xperia SP
Bootloaders
There are two different requirements for each custom ROMs here in the Xperia SP forum, in which there is one that require an unlocked bootloader and another is the one that can be used in a locked bootloader. What is a bootloader? A bootloader is a tiny program that enables you to get into an Operating System. Xperia phones have their bootloader locked by default. The one and only difference between a locked bootloader and an unlocked bootloader is the freedom to flash anything without so much concerns and risks of soft-bricking the device. In worse case scenario, even hard-brick too.
The choice to unlock your bootloader will be made by yourself. This guide will present on how to flash custom ROMs regardless of what bootloader you choose. NOTE however, some Xperia SPs are not allowed to unlock the bootloader. To check if you can unlock your bootloader, dial *#*#SERVICE#*#* (*#*#7378423#*#*) in Dialer. Tap on Service info > Configuration > Rooting Status and check if you can unlock your bootloader. The text "Bootloader unlock allowed: Yes" means that you can unlock the bootloader of your Xperia SP. If "No", I am sorry to say but you cannot do anything to unlock the bootloader. Don't worry yet! You can still use a special type of custom ROMs on a locked bootloader
Unlocking the bootloader will indeed have some drawbacks.
This will remove your DRM keys from your TA partition.
You will lose Bravia Engine on stock ROM forever. This due to the fact that the Bravia Engine requires the DRM keys that resides in your TA partition. This can be remedied, as you can actually back up your TA partition thus preserving your DRM keys as well!
Warranty will be lost for good. If you still have warranty, and quite paranoia if your device somehow magically broken, you also need to know that DRM keys also plays a huge role on confirming whether you have tempered with your Xperia SP's bootloader or not. SONY service centres will always check for the TA partition and also to see if your device is rooted or not. Root is reversible, but lost DRM keys is not. Again, backing up TA partition helps.
For those who can unlock their bootloader, since Xperia SP is no longer maintained officially by Sony and its last official ROM / firmware version is and will always be Jellybean 4.3, it is highly recommended to unlock your bootloader and set your Xperia SP for freedom. Unlocking the bootloader will also and always help you simplify things in the future.
Features
Custom ROMs are ROMs that are specifically made by different developers and teams based on their preferences and general idea. Depending on the custom ROM you want to use, you should understand that stock ROM features (e.g Camera, Walkman, Xperia Keyboard, Bravia Engine, etc) will no longer be available. This only applies on the custom ROMs that does not use the original stock ROM as a base.
Custom ROMs which are based on stock ROM on the other hand, usually contain a customised experience, while also providing the stock features to put into good use.
Stock ROM features aside, custom ROMs mostly are packed with other exciting features and customisations for you to tinker with, thus allowing you to make your ROM as unique to you as possible. You can inspect the screenshots posted on the ROM thread for a view of what features the ROM provides, or alternatively, (my favourite method) flash the ROM and test to see if it meets your preferences, and if the features really hook you up.
Explanation by another website (you will leave XDA)
Concluding
Now choose your device's future:
If you don't give a darn about TA partition, please refer to the guide 1(a). This can greatly reduce the hassle required while following this guide.
If you wish to both preserve your TA partition and unlock your bootloader, follow the respective guide which is guide 1(b).
If you don't want to or can't unlock your bootloader, there is also a guide for that, which is guide number 1(c).
Got questions? Refer to the second post for Q and As. If your question isn't there, feel free to ask!
Requirements!
Backup your apps. Use Helium backup tool. Do a backup of the apps that you want (only user-installed apps, or in other words, the apps that doesn't come with your Xperia SP when you bought it)
Un-metered and fast internet connection
A custom ROM's flashable zip of course. Copy the downloaded zip to your SD Card.
Download it by:
Going through the Xperia SP Lollipop Hub by @TheAvengingTITAN
Going through the Xperia SP Marshmallow Hub by @TheAvengingTITAN
Going to the custom ROM's thread of your choice in the Development subforum or the Original Development subforum
gapps package. Download the one supplied or suggested in the thread of the custom ROM of your choice. If there isn't any, maybe OpenGapps might be useful for you: http://opengapps.org (our device's architecture is ARM). Copy the downloaded zip to your SD Card.
Additional requirements if you want to unlock your bootloader:
Flashtool. Flashtool is a great software for you to flash your stock ROM back and also to do some other stuff. Download and install
Proper device drivers. After installing Flashtool, install the drivers by executing an installer from C:\Flashtool\drivers (assuming you didn't change the install location)
TWRP Recovery. We need the Beta downloads. Please download the twrp-3.0.X-rX-fota-huashan.zip. Copy the downloaded zip to your SD Card.
Unlocking the bootloader will wipe your /data partition. Please backup any files that you find important in the internal storage before performing these steps
Your IMEI written somewhere else. Dial *#06# to get your IMEI
Acceptable battery level (80% recommended)
Bootloader unlock code:
Go to: http://unlockbootloader.sonymobile.com/ and read everything!
At the bottom click 'Start Unlocking the Bootloader'
A number of prompts will be given. All you have to do is proceed (reading is optional and is recommended!)
Eventually you'll end up in the "Create Unlock request" page. From here enter your IMEI, name and email address. If your IMEI is unaccepted, try to enter your IMEI again, but excluding the last digit.
You should then receive the bootloader unlock key inside your email inbox.
1(a) I don't care about TA partition
WARNING: Once gone, you'll never able to retrieve your DRM keys, which will result in unable to use the Bravia engine, if someday, you wish to return to stock.
Just skip the guides below and jump to guide number 2.
1(b) I wish to both backup TA partition and unlock my bootloader
A working adb bridge is required before you proceed. Install it on your computer from here
Make sure USB Debugging is enabled in Settings > Developer Options
Root your 4.3 ROM with Towelroot!
Download and install the Towelroot apk
Open the newly installed app
Hit the make it rain button
After succession, go to Play Store and install SuperSU
Open SuperSU
It will prompt to update your binary. Continue to do so
It will prompt and ask you to choose which method to update the binary. Choose "Normal"
Reboot your device
Backup your TA Partition. NOTE! You can do a "dry-run" to determine the integrity of your backup. NOTICE! If you are a Windows 10 user, do note that you will need to apply this "patch" for BackupTA to work on your operating system
Follow guide number 2.
1(c) My bootloader is not unlockable / I don't want to unlock the bootloader
A working adb bridge is required before you proceed. Install it on your computer from here
Make sure USB Debugging is enabled in Settings > Developer Options
Root your 4.3 ROM with Towelroot!
Download and install the Towelroot apk
Open the newly installed app
Hit the make it rain button
After succession, go to Play Store and install SuperSU
Open SuperSU
It will prompt to update your binary. Continue to do so
It will prompt and ask you to choose which method to update the binary. Choose "Normal"
Reboot your device
Install CWM recovery
Reboot into CWM recovery by pressing the Camera button whilst on the BLUE light on the LED bar
You can navigate in CWM by using the volume and power keys or by swiping the screen up, right, down, left.
Wipe everything you can.
go to "Mounts and storage"
Format /system
Format /data
Format /cache
Go back to main menu
Get into "Advanced" > "Clear Dalvik Cache"
Go back to main menu
Attempt "Wipe data/factory reset"
Flash the custom ROM zip you've downloaded.
Go to "Install zip"
Choose "Choose zip from /storage/sdcard1" (I am assuming you've put the zip into your SD card)
Navigate to the zip you've copied, and select it
Choose "yes"
Flash gapps. The flashing process is similar to how you flashed the custom ROM zip based on the steps above.
Reboot the phone
You now have your preferred custom ROM installed! Congratulations! Set up your phone as usual now.
Restore your applications backup if you wish to have your apps back.
Your steps end here.
Now jump to the "Have fun" part to continue reading
2) Unlock the bootloader and flash TWRP recovery
Unlocking your bootloader:
Shut your phone down.
Open FlashTool as administrator.
Copy your unlock bootloader key that you received
Make sure drivers are installed. Install them by going to Flashtool install directory (default is C:\Flashtool) and then "drivers" folder. Install the .exe there in.
Click BLU on the toolbar
Connect your phone in flash mode (hold down vol down while device is powered off then connect to your computer. you can release vol button once phone is detected)
This will require you to enter IMEI and bootloader unlock key. You might need to check thrice for this to make sure the IMEI and bootloader unlock key is correctly copied.
Proceed. This will wipe your data completely. I've warned about this earlier on this post so I assume you've did a backup of important files.
Disconnect your phone upon completion. If it restarts, you need to shut it down after it booted.
Leave Flashtool open in order to proceed to the steps below.
Flashing the recovery:
Extract the TWRP recovery zip file you attained earlier. We will need to use the "twrp.img" file
Connect your phone in fastboot mode (hold down vol up while device is powered off then connect to your computer. you can release vol button once phone is detected)
Flash the kernel by selecting the Lightning icon in the toolbar, select Fastboot mode, then select "Select Kernel to Flash". Navigate to and choose the file "twrp.img" extracted earlier
Unplug your phone upon completion
Power up your phone. It will boot directly into TWRP Recovery
Once in recovery, you may now close Flashtool.
Please follow the guide below.
NOTE!
This will only grant you temporary access to recovery, as we are flashing the recovery into your /boot partition. When you flash the ROM zip later, this partition will be replaced with the ROM's kernel and the recovery will be lost!
3) Flashing the custom ROM
NOTE: Please understand methods are vary for different ROMs. Please prioritise steps provided in a custom ROM thread. This guide however, can be regarded as a "logic" for you to flash such custom ROM.
Wipe everything you can.
go to "Wipe"
Advanced Wipe
Tick Dalvik / ART Cache, System, Cache, Data
Slide the slider to wipe the ticked partitions
Go back to main menu
Flash the zips you've downloaded.
Go to "Install"
Tap on "Select Storage" button to select your storage that contains the flashable zip of your ROM and gapps. Assuming you put it in the sdcard, then it should be "Micro SDCard"
Navigate to the ROM zip, and select it
After that, hit the button "Add more Zips"
Navigate to the gapps zip, and select it
Make sure "Zip file signature verification" is disabled
Optional: You might want to flash the TWRP recovery zip downloaded earlier so that you would have a permanent TWRP recovery
Slide the slider to start flashing process
Choose "Reboot system"
You now have your preferred custom ROM installed! Congratulations! Set up your phone as usual now.
Restore your applications backup if you wish to have your apps back.
Your steps end here.
Have fun
You should now have completed the guide and have a custom ROM running on your device. Have fun with numerous new experiences in the time to come!
If you want to change ROMs in the future, after you have already flashed a custom ROM, you will just have to restart the same flashing procedure.
Don't forget to thank this post if my guide really helped you!
FAQ
FAQ
Q: What are custom ROMs actually?
A: I believe, Google will help you. This link might help you as explained by AndroidPolice: http://www.androidpolice.com/2010/05/01/custom-roms-for-android-explained-and-why-you-want-them/
Q: I can't unlock my bootloader! What should I do?
A: I understand how sucks it is for this to happen. But don't worry, there are also methods for locked bootloader phones. If you read my first post correctly, there is a method geared towards a person who can't unlock their bootloaders.
Q: What is a TA Partition?
A: TA Partition is a unique partition that can be found in almost any Xperia phones. It contains mostly DRM keys and other boot parameters. Unlocking the bootloader does not wipe the TA partition, but somehow edit it. I don't know much about this part.
Q: Why will Bravia Engine not work if I use custom ROMs?
A: In order to use some custom ROMs you'll need to unlock your bootloader. Unlocking the bootloader will definitely remove the DRM keys, which is a requirement for the Bravia Engine. Backing up TA will backup your DRM keys as well, just in case if you want to get back to stock.
Q: If that's the case, what will happen if I relock my bootloader after flashing a custom ROM?
A: Relocking bootloader when using a custom ROM is not a safe practise, and will definitely soft brick your device. Basically, constant SONY logo.
Q: How about flashing custom ROM without unlocking the bootloader?
A: It depends on the ROM. If the ROM is solely for unlocked bootloaders, doing this will of course brick your phone. Please refer to guide number 1(c) on how to use custom ROMs without unlocking a bootloader (which only applies to ROM for locked bootloaders).
Q: Is it really necessary to back up TA Partition?
A: TA Partition backups will help you on getting your phone to its really fresh factory state. Moreover, it allows you to have Bravia Engine working on stock ROM, if you wish to get back to the stock ROM. If your phone has warranty, backing it up is recommended, as you'll need to restore it before handing it to the repair centre.
Q: I didn't backup my TA Partition. Can I ever get it back?
A: You'll never able to get it back. And please don't ever try to restore anyone's TA backup as that will ultimately cause your phone to be bricked very hard.
Q: What is this software called BackupTA?
A: Please read the explanations provided in the thread of such software. The software help you to backup and restore your TA Partition.
Q: Are these guides safe?
A: Sure! :fingers-crossed: But I can't give 100% guarantee. Fortunately, this guides are constructed based on my experience. My Xperia SP is still running and is still being used right now.
Q: I broke my phone while following your guide. What can I do now?
A: I hope its a soft brick. If so, please follow mrjraider's tutorial on how to use Flashtool and then flash a stock FTF to get back your phone to its stock ROM. If your bootloader is unlocked, reverting to its normal state is easy. Just go back to the main post of this thread, and follow the "Flashing the recovery" part of the guide number 2.
Q: What are bricks?
A: There are two types of bricks. First one being soft, and the second is hard. Therefore softbrick and hardbrick. Softbrick is a situation where you cannot use your phone, however it can still boot / start. This applies to events in which you keep having SONY logo shown many times, or the SONY logo stays on the phone after minutes of waiting. Softbrick is repairable. Hardbrick, is a situation where your phone is completely damaged. Usually, the phone will never able to start even after many methods used and will show signs of ultimate death. Repair is possible, though mostly it is not. If you prefer, you can have a look in Wikipedia for a solid and thorough explanation
Q: How can I prevent from bricking?
A: Always know what you are doing and follow the guidelines laid out
Q: How about battery usage, is it good?
A: Custom ROMs are mostly based on the original Android experience (AOSP). AOSP is the purest android you can ever think of. AOSP doesn't have these neat features that most company provides, rather, it is Android at its bare. This being said, Stamina mode will no longer be available on your phone. To counter this you may use Greenify, an app that hibernates apps. Moreover, since custom ROMs aren't developed by the manufacturer of the device itself (in this case SONY), it will not conserve battery as good as stock, but at the same time battery life is still acceptable and long-lasting. Also as of Lollipop, the introduction of Doze to the AOSP makes battery conserving on custom ROMs a lot better. To summarise, the experience is slightly different, but still is amazing. To give a rough comparison on a ratio-based rating, it would be 0.95:1 (custom ROM:stock ROM)
Q: The ROM I use has an update. How can I update?
A: You can just download the new updated zip, and flash it normally. This action is alternatively called "dirty flash". Then, reboot into your ROM. If your ROM is provided with an updater app, you can also use it to simplify the process.
Q: How about root in custom ROMs?
A: By norm, root comes with any custom ROMs that you wish to use. When you have successfully flashed a custom ROM, you don't need to do any additional steps in order to have root access. Exception goes for CM ROMs and some CM-based ones which does not ship SuperSU. You will need to enable root from within the Developer Options in Settings. To enable Developer Options, tap "Build Number" in "About Phone" 7 times.
Q: Can I somehow use stock ROM features on my current custom ROM?
A: No. The stock features on stock ROM is not portable, hence cannot be used freely on a custom ROM. You can however, find a specific port to an Xperia app / feature (e.g Xperia Keyboard) by searching for the port on XDA. Make sure that the port is compatible with the ROM you are currently running. The reliability of these ports are greatly dependant on the ROM version and type that you are running, so you may actually experience either problems or greatness when you are running these ports.
Q: I'd like to use another file system f2fs for my partitions (Advanced)
A: By default, all partitions on Android are formatted as ext4. This can be changed easily by using the TWRP recovery. Note that this is only for unlocked bootloaders only!
Please note that only data and cache could be formatted as f2fs. System partition cannot be formatted as such due to how ROM installations are block based. The steps are as follows:
Boot into TWRP recovery
Select Wipe
Select Advanced Wipe
Tick a single partition you wanted to change its filesystem
Select Partition Options button
Change file system
Select f2fs and proceed
Done
CAUTION! This will also cause data in internal storage to cease from existence as well
NOTE! A ROM may not support f2fs (rare occurrence). So it would always be best to prepare for the worst if you are not certain of a particular ROM supports f2fs or not
Suggestions?
If you have any suggestion that may improve these guides, do tell me about it. I would be happy to make it better
Uhm.. Nice but we don't need a lot of thread with the same instructions.
Doomlord has made a general thread in the Android Development and there was another thread with rooting and flashing and stuff..
mrjraider said:
Uhm.. Nice but we don't need a lot of thread with the same instructions.
Doomlord has made a general thread in the Android Development and there was another thread with rooting and flashing and stuff..
Click to expand...
Click to collapse
Well I tried my best to make it look like if its not a duplicate. It is really a shortcut through things, and yet the guide here in are actually my own way of doing stuff (inspiration from DoomLord's and other guys' tutorials) for example, DoomLord has a guide on unlocking bootloaders with adb command, while I use Flashtool itself to get it done. I see your point really, and I'm okay if this guide should be nominated for deletion (even if I woke up to deletion of this thread). The choice is in the mod's hand now. Thank you by the way
EDIT: Plus, searching is a pain. Links herein this thread are the ones I bookmarked when I was a really noob person back then. Thought of giving them newcomers a head start though. Later on, I am sure they will discover themselves new things, and started diverting from stuffs provided in this thread, to other things based on their choices.
I even wanted to put out links to other tutorials, but..... nevermind
A few questions
Hi sorry for hijacking the thread, I'm not sure if this is the right place to ask a few questions that has been bothering me for sometime. I have followed every step of the guide correctly and successfully installed CM 11 on my Xperia Sp, however there are certain things that I haven't quite understood ..sorry if they are noob questions
> What is the DoomLord kernal supposed to be? Is it same as installing CWM recovery? if yes ,then how can I flash a different recovery like TWRP?[/B]
> Is the kernal different for installing anything other than CM?
> If I am to go back to stock ROM for warranty purpose, should I remove the Kernal first? If yes then how?
Thanks in advance
murky94 said:
Hi sorry for hijacking the thread, I'm not sure if this is the right place to ask a few questions that has been bothering me for sometime. I have followed every step of the guide correctly and successfully installed CM 11 on my Xperia Sp, however there are certain things that I haven't quite understood ..sorry if they are noob questions
> What is the DoomLord kernal supposed to be? Is it same as installing CWM recovery? if yes ,then how can I flash a different recovery like TWRP?[/B]
> Is the kernal different for installing anything other than CM?
> If I am to go back to stock ROM for warranty purpose, should I remove the Kernal first? If yes then how?
Thanks in advance
Click to expand...
Click to collapse
No worries. Asking any questions are indeed welcomed in this thread
DoomLord kernel is a custom kernel. If based on my guide, the kernel mentioned contains CWM recovery with it therefore, making it easier to access recovery compared to traditional method.
Installing CM will wipe the kernel off. The (DoomLord's) kernel is created only for stock ROMs. Flashing such kernel on custom ROMs will usually cause soft brick.
Since DoomLord's kernel are gone during the flashing process of CM, no. But still, NO, flashing stock ROM will wipe the kernel as well and puts in the stock one.
If you requires elaboration, please say so. I would be glad to clarify :angel:
Thank you so much! I was quite worried thinking that I had made a wrong decision.
> so you are saying that custom ROMs use their own Kernels? If so then there are no prerequisites to installing custom kernels beforehand? I'm guessing that would brick the phone?
> If CM does wipe off the kernel then how is it that the recovery is still working? its meant to be the part of the DoomLords kernel right?
>Can I change my recovery now to a different one?
TechnoSparks said:
No worries. Asking any questions are indeed welcomed in this thread
DoomLord kernel is a custom kernel. If based on my guide, the kernel mentioned contains CWM recovery with it therefore, making it easier to access recovery compared to traditional method.
Installing CM will wipe the kernel off. The (DoomLord's) kernel is created only for stock ROMs. Flashing such kernel on custom ROMs will usually cause soft brick.
Since DoomLord's kernel are gone during the flashing process of CM, no. But still, NO, flashing stock ROM will wipe the kernel as well and puts in the stock one.
If you requires elaboration, please say so. I would be glad to clarify :angel:
Click to expand...
Click to collapse
Thank you so much! I was quite worried thinking that I had made a wrong decision.
> so you are saying that custom ROMs use their own Kernels? If so then there are no prerequisites to installing custom kernels beforehand? I'm guessing that would brick the phone?
> If CM does wipe off the kernel then how is it that the recovery is still working? its meant to be the part of the DoomLords kernel right?
>Can I change my recovery now to a different one?
murky94 said:
Thank you so much! I was quite worried thinking that I had made a wrong decision.
> so you are saying that custom ROMs use their own Kernels? If so then there are no prerequisites to installing custom kernels beforehand? I'm guessing that would brick the phone?
> If CM does wipe off the kernel then how is it that the recovery is still working? its meant to be the part of the DoomLords kernel right?
>Can I change my recovery now to a different one?
Click to expand...
Click to collapse
Usually yes. Yes. No, as by the time you flashes the custom ROM zip (in which there is a boot.img file within it), it overwrites the old kernel, so no bricks.
I am not sure as of correct answer, but in my point of view the recovery is loaded into your RAM. When you flash a custom ROM, the recovery files are indeed gone (with the kernel) but the recovery still working as it is residing in your RAM (I still could be wrong though). Once you restart, the recovery you used will be gone but you are still able to access recovery in which were included in the newer kernel.
Yes indeed.
Sorry for the late reply, I am quite busy these days, so my online frequency is not like before.
TechnoSparks said:
Usually yes. Yes. No, as by the time you flashes the custom ROM zip (in which there is a boot.img file within it), it overwrites the old kernel, so no bricks.
I am not sure as of correct answer, but in my point of view the recovery is loaded into your RAM. When you flash a custom ROM, the recovery files are indeed gone (with the kernel) but the recovery still working as it is residing in your RAM (I still could be wrong though). Once you restart, the recovery you used will be gone but you are still able to access recovery in which were included in the newer kernel.
Yes indeed.
Sorry for the late reply, I am quite busy these days, so my online frequency is not like before.
Click to expand...
Click to collapse
Hey sorry for bothering again, but I have noticed that after installing CM11 my RAM memory is only 839MB, can you explain why? Is it because of the recovery which you mentioned above? And if I flash another recovery, will the issue be solved?
murky94 said:
Hey sorry for bothering again, but I have noticed that after installing CM11 my RAM memory is only 839MB, can you explain why? Is it because of the recovery which you mentioned above? And if I flash another recovery, will the issue be solved?
Click to expand...
Click to collapse
I am guessing that you have many apps running in the background. May please share a screenshot?
technosparks said:
i am guessing that you have many apps running in the background. May please share a screenshot?
Click to expand...
Click to collapse
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
murky94 said:
View attachment 3081260
View attachment 3081261
Click to expand...
Click to collapse
OOoooO! For your information, our available RAM for user is indeed 839MB+. I thought you were talking about RAM usage.
TechnoSparks said:
OOoooO! For your information, our available RAM for user is indeed 839MB+. I thought you were talking about RAM usage.
Click to expand...
Click to collapse
Ohh I see thanks again for your time
---------- Post added at 04:47 PM ---------- Previous post was at 04:43 PM ----------
murky94 said:
Ohh I see thanks again for your time
Click to expand...
Click to collapse
By the way, have you ever experienced lag with custom launchers? I have been trying to use a different launcher but there is always a certain seconds of lag when I press the home and background keys and this stays on until I uninstall the launcher itself!
murky94 said:
Ohh I see thanks again for your time
---------- Post added at 04:47 PM ---------- Previous post was at 04:43 PM ----------
By the way, have you ever experienced lag with custom launchers? I have been trying to use a different launcher but there is always a certain seconds of lag when I press the home and background keys and this stays on until I uninstall the launcher itself!
Click to expand...
Click to collapse
No problem mate!
Actually no (or maybe I am used to it). I am using only Nova launcher.
there may be two problems. If your launcher redraws, it seemed that you are using a lot of your RAM.
If your launcher loads okay, then based on community posts, if you have multiple launchers I suggest freezing all of them unused one. You can use Titanium Backup to freeze those other launchers. Alternatively you may use a custom kernel to banish this lag as people claims it came from the default CM kernel.
---
By the way, may I know which method do you used in my tutorial?
TechnoSparks said:
No problem mate!
Actually no (or maybe I am used to it). I am using only Nova launcher.
there may be two problems. If your launcher redraws, it seemed that you are using a lot of your RAM.
If your launcher loads okay, then based on community posts, if you have multiple launchers I suggest freezing all of them unused one. You can use Titanium Backup to freeze those other launchers. Alternatively you may use a custom kernel to banish this lag as people claims it came from the default CM kernel.
---
By the way, may I know which method do you used in my tutorial?
Click to expand...
Click to collapse
Thank you for all your help, I have followed your entire guide.
murky94 said:
Thank you for all your help, I have followed your entire guide.
Click to expand...
Click to collapse
Yes I may aware of that. But may I know which method did you used, 1a, 1b, or 1c?
TechnoSparks said:
Yes I may aware of that. But may I know which method did you used, 1a, 1b, or 1c?
Click to expand...
Click to collapse
I have used 1(b) followed by the rest
murky94 said:
I have used 1(b) followed by the rest
Click to expand...
Click to collapse
I think I may have solved my lag problem, I repeated the whole process, flashed the stock ROM first which restored my stock kernel/recovery and after that I flashed CM11, but without the DoomLord's kernel.
As a token of appreciation to this great device and it being slowly dying, I have again updated this guide to conform with latest changes. I had also verbosely explain some aspects of the things in the guide. Additionally, I also tried to provide better readability of the guide so that readers don't confused with numbers and alphabets eg, 1a is now 1(a).
This guide is pretty useful for new Xperia SP users in my honest (and maybe selfish ) opinion. I hope it benefits new users or old users as well.
Also, I am quite sad that my Xperia SP screen is damaged. This is due to a motorcycle accident that I confront with yesterday. The screen is not cracked, yay to Gorilla glass, but the screen isn't showing any colour. I don't know when will I have the money to fix it.
/monologue off
Ok, thanks.
Related
But... why?
Well, many people like and buy the Xperia line of devices currently on the market who previously owned a Samsung, LG or HTC. There are many differences in hardware, but most certainly in how Sony perceives the Android ecosystem and how it differs from the other major brands. This (noob) guide is meant to help people on the path to the Sony side I'm sure it contains lots of info which is even useful for the old timers
Things which differ a LOT from the other brands:
First and foremost: no recovery partition;
Second but not least: no download mode.
Sony has replaced the Android recovery partition with the FOTA kernel, which is meant to aid the device in rolling out OTA updates, which allow kernel updates without the risk of bricking the device. I hear you scream: "But wait, what about the recovery partition announcement by Sony themselves!?", well the answer is simple: that is meant for unlocked bootloader devices ONLY, as a part of their "Open Devices" program.
What is Flashmode, Flashtool and what are these FTF and SIN files I am reading about?
I'm going to quote @Androxyde here (it's a straight copy of his index page), as he is the maintainer of the tool:
Flashtool is a S1 flashing software that works for all Sony phones from X10 to Xperia Z Ultra. They all use the S1 protocol for flashing firmwares.
This program was originally made to flash sin files downloaded by SEUS/SUS or PC Companion.
Based on a command line tool written by @Bin4ry (Andreas Makris), I brought a user interface to sin files flashing.
We worked together to add more features to the tool such as rooting methods implementation or TA backup / restore.
Then I took the lead and got some advice and help from him occasionally on some features like rom cleaner or bootloader unlocking.
From time to time, sin files have been bundled into what is now well known FTF (Flash Tool Firmwares) and more features have been implemented.
But flashing firmwares is still the core of Flashtool (that is updated at least to follow Sony improvements around sin files) and the reason of its name.
Flashtool can also easily unlock the bootloader of the phone using the BLU icon as far as the bootloader of your phone is unlockable
The flashing feature as well as bootloader unlock feature are available whatever the phone is recognized or not by the application. What is only mandatory for flashing is to own the FTF file according to the device you want to flash it on.
Why should I use Flashtool?
Once bootloader unlocked, official sony tools do not work anymore.
Using official sony tools, you can only upgrade. No downgrade possible.
Using flashtool, you can choose what to flash and what not to flash. This said, many rooting scenarios are available implying kernel only downgrade to retrieve a patched rooting exploit and then flash back the right kernel.
You said unlocking bootloader?
This process gives you the opportunity to flash custom roms such as CyanogenMod ROMs.
I invite you to visit the FXP Project that brings CM and AOSP to xperia devices.
Click to expand...
Click to collapse
To complete this explanation, Sony devices know 2 bootloader based flash modes:
Flashmode (This is the S1 flash protocol @Androxyde wrote about)
Fastboot (This is the original, unmodified fastboot mode from Google)
In the past there was the Sony-Ericsson Update Software/Service (SEUS, later named SUS because Ericsson got removed from the name) which could update your device to the latest software or recover it from an inoperable state. PC Companion was less of a tool for updating and more of making backups, installing applications and managing the device storage. Sometime the past 3-4 years Sony merged the 2 programs, so if people on XDA or anywhere on the web talk about using PC Companion to restore their device, they are not wrong, they are simply using the latest version
Sony recently released their own package called 'flash tool' (to add to the confusion of noobs in the community), which deep down is a little easier to use and stripped down version of EMMA, which is a tool we mere mortals will probably never use as EMMA is the flash tool for Sony's repair shops and tech support. It's primary function is to allow owners of an unlocked bootloader device (or, 'open device' as Sony named it) to still use Sony firmwares and update their device, because as soon as you unlock the bootloader, the OTA updates will stop.
Things to remember on the files used by these tools:
An FTF file is basically not more then a ZIP archive containing multiple SIN files, you can open the FTF using 7z/WinZip/WinRar and look inside it.
A SIN file is a disk/partition image, which is encrypted by Sony. S1 (the bootloader) will check this encryption to make sure the image was not tampered with before it accepts it for flashing.
Fastboot flashing will always fail when the device is still in a locked bootloader state. For some models it is even disabled entirely or non-functional until you unlock the bootloader.
I am reading about the TA, what is it, why should I make a backup?
The TA partition (Trim Area) is a signed partition which holds various things which are unique to your device, like the device's IMEI, DRM keys and bootloader settings and configuration options. This partition can not be exchanged between devices, because it really is unique. If you would flash the TA backup from someone else it will cause a hard-brick rendering your device only useful as a paperweight...
When you unlock your bootloader you will lose all the DRM features on your device, this makes it valuable to have a backup of the unmodified version stowed away somewhere safe. You will need root level access to create that backup before unlocking. There is a tool called Backup TA which is widely used to create and restore backups of the TA partition. TWRP in XZDualRecovery can do the same.
When you restore the backup TA partition you made before unlocking the bootloader you will essentially re-lock the bootloader and restores the DRM keys. This process is (as far as we know up to now) undetectable by Sony's support staff, which makes it easy to restore the phone to stock for warranty driven support issues as unlocking your bootloader will void your warranty on the device (it is subject to local law though). That is why, for a lot of owners of a Sony device at least, it is considered to be the "Holy Grail" and is usually the reason for a lot of users to wait for a root exploit to be found before unlocking their bootloader.
Okay, I get it now. I would like to unlock my bootloader, how to proceed?
I'm not here to rewrite everything other people or Sony themselves can write just as well or even better, so I have a link for you:
http://developer.sonymobile.com/unlockbootloader/
Read it, it will teach you just about everything you need to know.
Once your bootloader is unlocked, your device will be much like a Nexus device when it comes to rooting, excluding the recovery partition, so that's why we flash or hotboot a custom kernel with a recovery, by using fastboot. If you are afraid of a terminal and typing commands, you can use a tool like QuickIMG or Flashtool to make your life easier.
Right, now I want root!
Well, if you have an 'open device', this is a lot easier then you think. Just remember that using root exploit kits is unnecessary and in some cases even risky as some packages do funky things or jeopardize your privacy.
Try to find a 'stock based' custom kernel. These are custom kernels built by the community to add features to the kernel but are meant to work with Sony's stock firmwares. I'm the maintainer of XZDualRecovery myself and created the Kernel Builder for the supported devices.
These custom kernels will NOT root your device (unless otherwise stated by the creator), but introduce a recovery to the boot process and with that you will be able to flash SuperSU to root your ROM.
But you just said Sony devices don't have a recovery partition, please... UN-confuse me!!
Yes, I did, and I'm right: there have been bright minds in the community who included a recovery in the boot image (the kernel partition) in the past and that way included a recovery on our Sony devices.
With the current 'open devices' policy from Sony, we now have:
Recovery stored inside the system partition, which is meant for locked bootloader devices (closed devices) because they can not run custom kernels;
Recovery stored in the boot image (for open devices);
Recovery stored on the FOTA partition, but with a trigger from the regular boot image at boot (also for open devices);
Recovery stored on the FOTA partition -renamed to recovery- together with an updated bootloader (for open devices, of course).
Hmm, okay... it's still confusing, but OK. My service menu says I'm rooted, but none of the root apps work properly, what gives?!
If you open the phone dialer app and on the keys see the letters below the digits, you can spell the word SERVICE. Type *#*#SERVICE#*#* and a service menu will pop up. Tap 'Service Info' and then 'Configuration'. Then you will see one of these lines there almost on the bottom of the list:
"Rooting status: unknown": it's probably unlocked, but it was unable to verify that;
"Rooting status: rooted": you have unlocked the bootloader;
"Unlock bootloader allowed: YES/NO": this tells you if the bootloader is (vendor-) locked or not, if it says NO, you're out of luck.
The rooting status there is not telling your system is rooted, it tells you your bootloader is and will allow custom rom/kernel flashing. Don't confuse these two.
I'm not allowed to unlock my bootloader But I still want root, can I?
In some cases you can. It depends on the bugs found in specific firmware versions which allow a root exploit to be developed.
From the 2015 range of Xperia devices Sony started using dm-verity, which causes a bootloop once the system partition is modified. This modification of the system partition will be required to include a SU binary in the system to obtain root, so until a dm-verity defeating option is found, locked bootloader root or recovery will not be possible.
For older models, check the device forums and the cross device development forums to check out the community rootkits available. Usually it will tell you what ROM version it is intended for. Be careful with rootkits/roottools though, some are also found to be introducing malware to your device or sending privacy sensitive data to the creators. Use common sense, if you have no valid use for the root user level, keep it off your phone. If you already have recovery, you can use that to modify or clean your device instead.
I have rooted my phone, but whenever I try to modify something on it it spontaneously reboots or I get a message 'Permission denied" when trying to remount the system partition R/W! Why is that?
Like all manufacturers, Sony tries to make it difficult (or downright impossible) to modify the Android base system they created. Because if you can, anyone or anything which obtains root access can. This is a serious security risk, because if it's malware which puts itself on the system partition and locks up your phone, the only way around this is to wipe your entire device and restore a stock ROM using PC Companion or Flashtool. Of course, they have their own proprietary software to protect as well, but security is the main objective here. The really sensitive bits are stored in the TA partition as I explained earlier.
Sony (-Ericsson) had a service called RIC, which in time moved partially in to a kernel feature. What it does is monitor if system is remounted writeable. This usually is a situation you want to avoid at all costs so RIC will deny you permission, cause a kernel panic OR simply reboots your device to get out of that state.
"Remount-Reboot fix", RICKiller, RICDefeat, and XZDualRecovery all (attempt to) disable this service or stop the kernel from acting on a remount of system.
Hard-bricks, Soft-bricks, bootloops??
They are simple to understand, really:
Hard-brick, TYPICALLY NOT RECOVERABLE: The bootloader stopped functioning, this can be caused by a bad flash/update or by restoring the wrong TA backup.
Soft-Brick, ALWAYS RECOVERABLE: the system partition is corrupted or just simply empty, this causes the device to stall at boot. A soft-brick can also make the screen remain off, because of a bad or missing kernel image.
Bootloops, ALWAYS RECOVERABLE: If the system gets powered up and then reboots during the start. This can be at the kernel splash screen or during the boot animation.
In case of a Soft-brick or Bootloop:
Use the installed recovery (if it still works), PC Companion, QuickIMG or Flashtool to restore your device to working order.
In case of a Hard-brick:
You can never recover from that state without physically opening your device and do some heavy duty engineering (JTagging) on it to flash back the correct bootloader/TA (read that link to see what it would take!). This is way too difficult for 98% of the community, which means that hard-bricking your device is typically the creation of a very expensive paper weight.
Please, be extremely careful when dealing with the TA partition.
*********************************************
I will be updating the above text for sure, if you feel anything is missing, please write a post in this thread with the text you wish to include. I want this to be a community driven guide and I know a lot, but I can't know everything
*********************************************
Extended the text some more to include ideas from:
@Klaos3000
@Yenkazu
Thanks for the suggestions/additions guys! :highfive:
As it concern the recovery, i think you can create a partition with EMMA.
Sent from Greece
kos25k said:
As it concern the recovery, i think you can create a partition with EMMA.
Sent from Greece
Click to expand...
Click to collapse
Please, re-read the first part...
Can I root my iPhone 6 with this guide?
That was a bad joke.
Very useful guide. We should probably educate people around here about what an unlocked bootloader actually means and what it let us do. I'm shocked by the number of people using Kingroot and other risky closed-sourced tools, especially the ones with an unlocked bootloader.
People of earth, if your bootloader is unlocked, it means that your device will be much like a Nexus device when it comes to rooting, sans the recovery partition, so that's why we flash or hotboot a custom kernel with a recovery, by using fastboot. If you're afraid of a terminal and commands, then you can use a tool like QuickIMG. After that, you simply flash SuperSU. That's it!
You can add something about TA Partition and RIC server. :3
Good thread btw
Yenkazu said:
You can add something about TA Partition and RIC server. :3
Good thread btw
Click to expand...
Click to collapse
I'd say, give me a piece of text on the subject for the OP and I'll include it :good:
[NUT] said:
I'd say, give me a piece of text on the subject for the OP and I'll include it :good:
Click to expand...
Click to collapse
RIC, from your thread :3
http://forum.xda-developers.com/xpe...b-definitive-root-remount-reboot-fix-t2317432
But, it's kinda useless if people already use your DualRec, since it's already integrated xD
But more info didn't hurt (?)
TA Partition
http://forum.xda-developers.com/xperia-z/help/ta-partition-t2451186
Not really details, but user should know the impact of unlocking bootloader
Updated the OP to include info on the TA partition and RIC protection. Also included a part of the post by @Klaos3000, because it contained some useful info
Thanks guys :highfive:
Very usefull! :good: But for me 2-3 Weeks to late. I'm still quite new on Z3C and I collect all those info the old style
Without this thread you would need days to catch all dependencies - With this you would need approx. 10 min!
Very helpfull and good to link new user to...
And yes - I came form the Sammy side (of the moon ) and was a bit shocked what sony did with "open source android".
Not because of SystemUI ( I love it...) but because of all this "anti modding" stuff they build in.
Sticky? Sure - must be!
Updated the OP to include info on Hard-bricks, Soft-bricks and bootloops.
Please people, if you have anything to add to the OP, let me know!
As I said, I know a lot, but I can't know everything there is to know about Sony devices...
Good work (...as usual from your side) :good:
Very useful tutorial.
No need to write long explanations to Sony beginners anymore - just add a link from here.
Really Helpful
Brilliant.....Really it deserves place at (Sticky Threads).I think if you add minimum One Custom Kernel(for stock firmware)
of every devices..That would b very helpful to recover from Soft bricks.Then this thread will be an "ALL IN 1" thread.Its my Opinion after all...Brilliant work.
Need a little advice.
Hi,
I have a ZL with Locked bootloader and your ZL-lockeddualrecovery2.8.22 installed
I am on stock 5.0.2 now Rooted thanks to your awesome recovery.
Question is now I have your dual recovery would I be able to simply flash crDroid CM zip Thread Here and others like it or would I still need to unlock the bootloader Edit OP of ROM says it is required
So if I flashed the above would it replace your recovery with the boot.img in the zip
Sorry for the noob questions but I am new to Sony devices and still taking baby steps with this phone
I can unlock the bootloader no problem but I am more concerned about your recovery been replaced.
Thanks in advance :good:
bigrammy said:
Hi,
I have a ZL with Locked bootloader and your ZL-lockeddualrecovery2.8.22 installed
I am on stock 5.0.2 now Rooted thanks to your awesome recovery.
Question is now I have your dual recovery would I be able to simply flash crDroid CM zip Thread Here and others like it or would I still need to unlock the bootloader Edit OP of ROM says it is required
So if I flashed the above would it replace your recovery with the boot.img in the zip
Sorry for the noob questions but I am new to Sony devices and still taking baby steps with this phone
I can unlock the bootloader no problem but I am more concerned about your recovery been replaced.
Thanks in advance :good:
Click to expand...
Click to collapse
As long as your phone is locked, you only can flash stockroms and stock-kernels.
You also have to use recovery for stockrom, because you kernel is "untouchable" and recovery have to put in /data and /system partition and can't be put in kernel.
All other roms/kernels will end in errors while flashing.
If you have unlocked your BL, you can flash any rom and kernel you want, as long as your phone is supporting it.
Yes, by flashing a zip, your kernel will be replaced and in most cases they have a recovery in it.
By flashing a rom from another version or changing from stock-based roms to i.e. CM-roms or Omni and vice versa, you have to unpack the kernel (boot.img) by hand and flash (fastboot) this first, before you flash (after a reboot in recovery) the whole zip.
Otherwise it could end in bootloop.
Because of (i most cases) wiping /system, /data while installation, your stock-recovery will deleted too. This depends of the work of the installer in the zip file.
Btw... before unlocking your phone, backup your TA ( with FlashTool). This TA is unique and you may use it to lock your phone again later.
And... if your phone is unlocked - no fear of losing recovery. You always can flash another one with fastboot again.
Someone correct me, if i was wrong or forgot something.
@bigrammi, you can always try yo repack the CM kernel using my kernel builder, that way you will still have XZDualRecovery but then included in the boot image, so no risk of losing it...
akkufix said:
As long as your phone is locked, you only can flash stockroms and stock-kernels.
You also have to use recovery for stockrom, because you kernel is "untouchable" and recovery have to put in /data and /system partition and can't be put in kernel.
All other roms/kernels will end in errors while flashing.
If you have unlocked your BL, you can flash any rom and kernel you want, as long as your phone is supporting it.
Yes, by flashing a zip, your kernel will be replaced and in most cases they have a recovery in it.
By flashing a rom from another version or changing from stock-based roms to i.e. CM-roms or Omni and vice versa, you have to unpack the kernel (boot.img) by hand and flash (fastboot) this first, before you flash (after a reboot in recovery) the whole zip.
Otherwise it could end in bootloop.
Because of (i most cases) wiping /system, /data while installation, your stock-recovery will deleted too. This depends of the work of the installer in the zip file.
Btw... before unlocking your phone, backup your TA ( with FlashTool). This TA is unique and you may use it to lock your phone again later.
And... if your phone is unlocked - no fear of losing recovery. You always can flash another one with fastboot again.
Someone correct me, if i was wrong or forgot something.
Click to expand...
Click to collapse
Thanks yet again bro :highfive:
Wow these Sony Xperia's take some figuring out :laugh:
I think I have just about got my head around it all now
I have managed to get the TA backed up with TWRP and Flashtool so I should be safe now
I will have to unlock the bootloader just to stop it nagging me to upgrade :laugh:
@Nut Thanks bro I will take a look at your suggestion it's a little more complicated than what I am used to or should I say different.
bigrammy said:
[...]
@Nut Thanks bro I will take a look at your suggestion it's a little more complicated than what I am used to or should I say different.
Click to expand...
Click to collapse
Well, i saw HTC M7 in your signature. If you were able to unlocked, s-off-ed, re-flashed firmware and rooted this beast - you don't need to have any fear about a Sony device.
[NUT] said:
@bigrammymi, you can always try yo repack the CM kernel using my kernel builder, that way you will still have XZDualRecovery but then included in the boot image, so no risk of losing it...
Click to expand...
Click to collapse
Hi @Nut,
I thought I would take your advice and expected to download a tool to unpack everything and pick through the files and start editing init.rc etc etc :silly:
I had no idea this was a fully automated Online tool
I still can't quite believe it you're a genius!! :angel:
A BIG THANKS to All the Xperia dev's helpful community members and especially the tool creators XZDualRecovery, Flashtool, XperiFirm and PRFCreator etc you're all Awesome :highfive:
I fear I will become lazy with such great dev's :laugh:
bigrammy said:
Hi @Nut,
I thought I would take your advice and expected to download a tool to unpack everything and pick through the files and start editing init.rc etc etc :silly:
I had no idea this was a fully automated Online tool
I still can't quite believe it you're a genius!! :angel:
A BIG THANKS to All the Xperia dev's helpful community members and especially the tool creators XZDualRecovery, Flashtool, XperiFirm and PRFCreator etc you're all Awesome :highfive:
I fear I will become lazy with such great dev's :laugh:
Click to expand...
Click to collapse
Thanks, glad to have been of help to you
So I wanted to create a thread dedicated to performing this function. I know as someone who does this quite often, I like to have all my ducks in a row to ensure everything works perfectly. I'm not big on fragging my phone and then frantically trying to find a way to undo all the chaos. I do a lot of research and ask a lot of questions before doing anything.
On that note I would like to first thank all the amazing people on here, whether they be developers or just experienced Tech Guru's, everyone is always a big help. I take absolutely no credit for any of the awesomeness that can be found on XDA, I'm just creating a thread that I hope will help folks find everything in one place for this function. So here we go, I'm going to explain the way I did it, which is the way I have been doing stuff like this for years. I have a preferred method as it has always resulted in perfect flashes and no bricks, not even soft bricks. So I feel it works pretty well.
Just so it is understood, this is for the Moto X Pure, which has been bootloader unlocked and has TWRP and root installed. Also it should be noted that you need to have Developer Options enabled and USB Debugging enabled. You should also be familiar with the ADB process, to some extent, maybe you have at least heard of it.
Steps to follow:
1. Use Titanium Backup and backup all your User Apps, NOT SYSTEM APP's, system apps will not restore across updates and will most often corrupt your new install.
2. Make a Nandroid backup using TWRP, I backed up system, boot, data, and EFS, but I don't think EFS is necessary.
3. Make sure you have the Motorola Drivers installed, get them from here http://www.motorola.com/getmdmwin
4. Get Shawn5162's Restore to Stock Tool, I know others have said it's not necessary to perform a complete restore, but this is part of my process that I have always done, and it's always worked. Get it here by using one of the mirror's created by patt2k in post 6, and don't forget to thank him for the mirrors http://forum.xda-developers.com/moto-x-style/development/windows-tool-moto-x-style-pure-edition-t3199905
5. Unzip Shawn5162's zip to a folder on your desktop, and before you move onto the next step, make sure you have backed up everything valuable on your phone, such as pictures, messages, etc..., because everything is going to be erased in the next step, except for the stuff on your MicroSD. I'm so anal, I even remove the MicroSD before flashing. Connect your phone to your computer using a USB and make sure you have USB debugging enabled under Developer Options.
6. Inside the folder you created run the FLASH-ALL.bat, which will reboot your device to the bootloader and begin the restore to stock flash. This will remove root and TWRP, but will not remove the fact you have an unlocked bootloader. Your phone will reboot when complete and should boot back into your system within a short period of time.
7. Once you are rebooted, you may need to do a little setup before you get the message that a System Update is available. DO NOT waste your time installing any apps, wait until you have full root on MM before doing any of that. Once the Update message appears, accept it and download the MM update file, then install it once it is finished downloading and asks if you want to install.
8. The update takes about 20 - 25 minutes so be patient. Once complete your phone will once again boot back to system, now you have MM in it's complete unrooted greatness.
9. Now go into settings, about phone, and tap on build number a bunch of times to enable Developer Options. Then go into developer options and enable USB Debugging.
10. Next download a bunch of stuff from the following links, if you desire to install TWRP and regain root.
TWRP 2.8.7.1 here https://dl.twrp.me/clark/twrp-2.8.7.1-clark.img
Modified Boot Image from here, required to perform systemless root , not sure about the Cowboy hat dude, but click on him, it will download the file.
SuperSU 2.52 from here https://download.chainfire.eu/743/SuperSU/BETA-SuperSU-v2.52.zip?retrieve_file=1
11. Next copy the modified boot file and SuperSU file directly to your internal or external SD on your phone, either works fine, although I prefer my External SD.
12. Next copy the TWRP file you downloaded into the same folder you made for Shawn5162's files. This folder has all the adb and fastboot files you need to perform the TWRP flash. Now hold shift and right click and choose open a command window here. Then ensure your device is detected by running the command adb devices, it should show your phones S/N and the word device. If it doesn't, you may need to look at your phone and respond to the prompt about allowing your computer to have access to adb. Try the command again after that. Then run the command adb reboot bootloader, which should reboot your phone to bootloader fastboot mode.
13. Once it fastboot mode run fastboot devices just to make sure your device is still detected, then run the command fastboot flash recovery twrp-2.8.7.1-clark.img. That will flash TWRP to your recovery partition. Then type the command fastboot reboot twrp-2.8.7.1-clark.img or use the volume rocker to toggle to recovery then select the power key to boot to it. Make sure you choose the slider at the bottom to allow modification. Once on the main screen you can choose reboot and then select recovery. This makes sure that you have booted to TWRP at least once, and ensures by rebooting to it, you can get back to it.
14. Now perform a Nandroid Backup, using the TWRP Backup option, of your completely stock MM system, data, boot, and EFS partitions. Enable compression if you like and store it to your External SD if you have one. This allows you to have an unrooted backup on your SD, which is good for future updates. After the Nandroid is complete now flash the modified boot image zip using the TWRP Install feature, and when it's complete, then flash the SuperSU zip file. After I always perform the option to erase Dalvik and Cache, I just think it is a good thing to do, it's probably placebo, but I do it anyhow.
15. Go back to TWRP Home and choose reboot and select system. Your device will reboot and you now have a fully updated and rooted Moto X Pure on MM.
Thanks go out to all the folks who have contributed to the many threads that contain this information. Special thanks to Shawn5162, DaMadOne, Chainfire, and Hashbang173 for their awesomeness. Hope this helps folks that are concerned about performing these procedures. I can say that it worked perfectly for me with no issues at all, but of course I take no responsibility if it doesn't work for you and causes your device to fail. Again these are similar steps I have taken in the past with other devices and I have never had a single brick, so hopefully it works for others as well.
Enjoy!!
I have a Moto X Pure as described with the bootloader unlocked and rooted. The popup message to upgrade to MM comes up constantly now - what happens if you just let it try to update?
I think I am in way over my head. I am receiving my phone Friday and was looking to unlock to root but from the looks of it, I will not be able to do that.
I've never unlocked & rooted a phone before. So all that looks like the bible to an uneducated man "me".
superkev72 said:
I have a Moto X Pure as described with the bootloader unlocked and rooted. The popup message to upgrade to MM comes up constantly now - what happens if you just let it try to update?
Click to expand...
Click to collapse
If I'm not mistaken it will download to your phone but not be able to be installed because of an error
Is there no way to upgrade from LP to MM without a wipe?
superkev72 said:
Is there no way to upgrade from LP to MM without a wipe?
Click to expand...
Click to collapse
Yeah, if you rooted already, you must reflash the original boot.img. Then update, and then restore your root. Read here:
http://forum.xda-developers.com/mot...t-moto-x-style-xt1572-br-marshmallow-t3259380
At the bottom of the post, you get the original file you need and it is mentioned here:
And enjoy!
Now you have a rooted MotoX Style Marshmallow. To apply any OTAs, you only need reflash stock boot.
K?
Why would you want to update without a wipe? You must like sluggish performance
i have no wifi after this
No WIFI either
I ended up with no WIFI after following these steps also.
is it true, we cannot downgrade from 601 to 6.0 or 5.1.1?
skimaniaz said:
I ended up with no WIFI after following these steps also.
Click to expand...
Click to collapse
Same here. Anybody got a fix?
So the last three posts complain of no wifi yet people keep using this method?
The modified boot zip breaks the wifi. You can root by flashing superSU 2.62, I think, or any SuperSU zip that is specifically systemless.
ilovemeow said:
is it true, we cannot downgrade from 601 to 6.0 or 5.1.1?
Click to expand...
Click to collapse
Not true.
lafester said:
Not true.
Click to expand...
Click to collapse
coz i tried before, it fail in first 2 flash steps
Are you unlocked?
ilovemeow said:
coz i tried before, it fail in first 2 flash steps
Click to expand...
Click to collapse
The partition always fails. Just ignore it. You should be able to downgrade the bootloader. I have been able to so I don't know why you would be having issues with that unless your bootloader is locked/re-locked.
Sent from my XT1575 using XDA Labs
So is this safe or not?
lafester said:
Are you unlocked?
Click to expand...
Click to collapse
yup, it's unlocked, but currently fine for using android M at this moment
At first I created a guide about rooting stock Marshmellow of Sony Xperia Z5 Premium. After some time I realized that it may be useful to users of virtually any recent Sony phone or tablet, so here is my Sony Cross-Device general rooting thread. I will mostly copy-paste bits from my previous guide, but using renewed screenshots and firmwares'/tools' versions.
Please write back in this thread which model of Sony phone you was able to root with the help of this guide.
This guide does not work for MediaTek devices.
INTRODUCTION
Sony historically provides own versions of Android OS, modified for Sony phones. These firmwares with added Sony apps are known as a stock firmware, contrary to vanilla Android developed by Google.
This guide will lead you through the process of rooting the stock firmware for your particular Sony phone. At the same time, your phone will be supercharged with TWRP recovery image, a useful tool for things such as an installation of system behavior altering apps to a whole device backup including all system partitions.
WHY ROOT?
Sony, just as any other smartphone vendor, ships its devices without the ability to alter inner system workings of Android OS. Technically speaking, default OS only allows use of non-administrator accounts, which have access only to their own user space.
Rooting is a process of allowing access to the administrator account, also known as root. This enables a possibility to alter/remove system parts of the OS: apps, settings, behaviors. For example, with root access you can block ads system-wide, from apps to browsers.
WHAT ARE CAVEATS
During the rooting procedure, the unique DRM keys will be removed from the phone. These keys are used to make some proprietary Sony features work, such as X-Reality for Mobile, camera denoise filter etc.
During the course of this guide a so called DRM fix will be apllied, which effectively emulates DRM keys, so many Sony features remain in working condition, even without actual keys. Some features, such as Widevine, will not work but majority of typical users won't even notice this. I think most of you even don't know what Widevine is.
However, in this guide I will present a way to backup your DRM keys, if you still think you need them. I will not deep dive though, since I never bothered with DRM keys export/import procedure myself and have no experience in doing this.
Some apps will refuse to work on rooted device, Pokemon Go and Android Pay are couple of notorious examples. Research your apps for rooted device compatibility. If you find such app and cannot live without it, don't root your phone.
ACCOLADES
The rooting of Sony stock firmware will not be possible without the work of these brilliant community developers:
@Androxyde — Flashtool
@IgorEisberg — XperiFirm (integrated into Flashtool)
@Dees_Troy et al. — TWRP
@Chainfire — SuperSU
@topjohnwu — Magisk
@tobias.waldvogel — Kernel repack script and DRM fix
@zxz0O0 — iovyroot
@rayman — TA Backup v2
STEPS
The whole process of rooting your stock firmware is divided into the following steps:
Getting your phone recognized by your computer (driver installation).
(optional) Backup your DRM keys.
Unlocking a bootloader.
Flashing stock firmware with Flashtool.
Repacking and flashing a kernel.
Installing SuperSU or Magisk.
(optional) Restore your DRM keys.
Optional tasks.
After the completion of this guide, your phone contents will be completely erased, so you may want to backup all what is important to you to some external locations. External microSD card will not be erased, so you may copy your stuff to it. If you are already use some rooted Android, you may want to use some specialized tools like Titanium Backup or like. TWRP also have a nice backup features, if you have one already installed.
Also, use Sony's own Backup & reset tool from the settings. You may backup your local contacts, messages and much of such stuff directly to your microSD card. After the rooting, same tool may be used to restore some (or all) of these things back.
I usually make a whole backup with TWRP, Titanium Backup for user apps and the Sony's Backup & reset for conversations and call logs.
The guide was developed using Windows 10 Pro 64-bit and Sony Xperia Z5 Premium Dual-SIM E6883 official model for the Russian market.
Let's go.
1. GETTING YOUR PHONE RECOGNIZED BY YOUR COMPUTER (DRIVER INSTALLATION)
During the course of this guide, your phone will comminicate with your computer in Fastboot and Flashmode connection modes. When connected in these modes, for the phone to be properly recognized by a computer, you have to provide special drivers. Thanks to Flashtool creators, it comes bundled with generic drivers compatible with all recent Windows operating systems, so at first you should install Flashtool. You can get installer from the official website.
Next, you should install Fastboot and Flashmode drivers for your phone.
One caveat here however, these drivers are not from a "recognized Windows developer", that is they are not Windows-certified, so to get them installed on Windows 8/10, you should reboot with the disabled driver signature enforcement. Use Google to know how to perform this.
Once booted in the aforementioned mode (or in a regular mode if you are still on Windows 7), proceed to the actual driver installation. The drivers are packed into the Flashtool\drivers\Flashtool-drivers.exe executable, but it didn't work on my system, perhaps because it is 64-bit (but feel free to try it yourself), so I simply unarchived it with 7-Zip (right-clicked it and chose 7-Zip > Extract to "Flashtool-drivers"). I got a Flashtool-drivers folder, which contained all the drivers from the executable.
Once drivers are unpacked, connect your phone in a Fastboot mode. Recent Sony devices can boot in Fastboot just like this: shutdown the phone, press and hold Volume Up rocker button and connect USB cable to the phone while the other end is connected to a running PC. The phone's LED will turn blue shortly. That's it, you are in a Fastboot mode. Open Device Manager (Win + X, Device Manager) and check if there is some unknown device (with the name S1Fastboot or something like this).
Double-click this unknown device in the Device Manager, click Update Driver..., then Browse my computer for driver software, and choose the Flashtool-drivers folder created earlier with 7-Zip (leave Include subfolders checked). Shortly you will get a red warning dialog window, which inform you that this driver doesn't have a proper signature:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Very scary. Just proceed with the install despite all the red flags, it's safe.
Once Fastboot driver is installed, plug out the USB cable off the phone and connect it in a FlashMode mode. This is done just like for Fastboot, but in this case you should press and hold Volume Down rocker button during the cable plugging in. The LED in this case will be green and not blue. The procedure to install the driver is exactly the same.
After the successful installation, try to reconnect the phone in these modes again couple more times to make sure all devices get properly recognized by Windows. If all seems good, proceed to the next step.
2. (OPTIONAL) BACKUP YOUR DRM KEYS
I encourage you to skip this step, but if you feel like you should do this anyway, here is some info.
There is a tool called iovyroot, with which you can backup your DRM keys from an unrooted phone, but at the time of the writing it doesn't support latest firmwares. It does support a lot of older firmwares so it may be useful to not upgrade your phone before checking up this tool.
If you're into this backup DRM thing, go to the original thread, download the latest version and check if it is working for you. For now I just skip this step. Basically, you want to download the zip, connect your phone in USB Debugging mode, run the tabackup.bat script and see the output.
Some people suggest to use the newer Universal (Dirtycow-based) TA Backup v2 tool instead of ageing iovyroot to backup you keys. Please check the official thread to get instructions (linked in the previous sentence).
I will not cover DRM keys extraction/restore in details, since I never did it, so I don't want to write about something I haven't myself performed. Please check corresponding threads.
Note that most proprietary Sony features will work even without DRM keys, such as X-Reality for Mobile, camera denoise filter and some others. DRM fix will be covered later in this guide. Some features will not work with DRM fix, Widevine for example. Most users will not even notice these.
3. UNLOCKING A BOOTLOADER
Sony does provide its own guide. It is a plain and simple and — good news! — if you have followed the previous steps, you just got all the prerequisites covered!
4. FLASHING STOCK FIRMWARE WITH FLASHTOOL
Now we will flash the latest available Sony firmware to the phone. In this step it will be untouched vanilla firmware, without root yet.
The Flashtool was installed on the completion of the first step, so let's start it. If you are on 64-bit Windows, start Flashtool64 (there is a shortcut in the Start menu). It does require administrator privileges.
Once you are in Flashtool, at first you need to obtain the most recent official stock firmware from Sony. Press the "XF" icon (the right-most one in the toolbar) to start XperiFirm. This is where it is:
The window will open, choose your phone from the left part of the window, then choose your particular model and after that choose your market and operator from the right part of the window. The entry will become highlighted and shortly there will be some info in the last column (Latest Firmware). This definition will be also in the right-most part of the window just under the phone thumbnail, click on it. Not a brilliant design decision, but that's it. Here is a screenshot for your reference:
If there are multiple firmwares available, pick the more recent (typically the top-most). The new window will pop up, press Download. The stock firmware will be downloaded to your computer and unpacked.
Once the download is completed, close all XperiFirm windows to return to the main Flashtool window. Flashtool will begin a creation of the .ftf file from the downloaded resources which will be used for a (subsequent) flashing. FTF-files are similar to ZIP-files, and may be opened with 7-Zip. For example, I've got E6883_32.3.A.0.376_1299-4828_R3D.ftf after the completion of this procedure. Flashtool places firmwares in the C:\Users\<Your Windows Username>\.flashTool\firmwares.
Now, once the stock firmware is downloaded, packed into .ftf and ready to be installed, let's do this.
Disconnect and switch off the phone for now, physically extract microSD card (if any) and press the left-most button on the Flashtool's toolbar (the "Lightning" one) and choose Flashmode. The Firmware Selector window will appear with a selected default folder and list of all firmware available for a flashing. I've got a single entry, the firmware I just downloaded. Before actual flashing, you can check some checkboxes from the Wipe section, I usually check all to start clean (all the data on the phone is erased). Once again, just to be safe, extract the microSD card from the phone at this moment. It is not needed for a flashing anyway. Here is how the window looked to me:
After all is set up, press Flash. The flashing process is not yet begun, since at first Flashtool just prepares firmware for a flashing.
After a while, a window will appear which will ask you to connect your phone in the Flashmode mode. With your phone off, hold the Volume Down button, connect the USB cable. Once Flashtool detects the phone in the Flashmode mode, it will start the actual flashing automatically. You may release the Volume Down button and go get some snack. The flashing will take some time.
After the completion of the flashing procedure, you'll get a stock Sony firmware installed, and now it is perfect time to proceed to the next step. You may leave your phone off at this moment, but if you are curious, start it up and check if the new Android is actually there. Note however that first start after the firmware installation takes a long time.
5. REPACKING AND FLASHING A KERNEL
Now it is a most interesting part: repacking and flashing a stock kernel. This procedure will allow the actual rooting.
To get the stock firmware rooted, you need a way to install SuperSU or Magisk. These are tools which enable root access to the Android system. To install them, you need TWRP. To run TWRP, you need a kernel, which supports both TWRP and your Android version.
Thankfully you can extract the kernel from the .ftf file, prepared by Flashtool earlier. Then you repack it, integrate TWRP (and DRM fix) into it, and finally flash it to your phone back modified. Sound like a complex task but it's definitely achievable. I did it multiple times mostly without any issues.
At first you should extract the actual kernel from the .ftf file. Reminder: it's in the C:\Users\<Your Windows Username>\.flashTool\firmwares folder and may be titled E6883_32.3.A.0.376_1299-4828_R3D.ftf or something like this. Open it as an archive (right-click on a file, 7-Zip > Open archive) and extract kernel.sin. It's your phone's packed kernel.
If it is packed, obviously you need to unpack it. Thankfully the almighty Flashtool can do this. Open Flashtool, navigate to the Tools > Sin Editor, select a kernel.sin you've just extracted and press Extract data. As a result, you'll get a kernel.elf file in the same directory where your packed kernel is residing. As you may have guessed, kernel.elf is an unpacked kernel. It can be modified, repacked and flashed back to the phone. Let's do this.
You will need a Stock kernel repack script from @tobias.waldvogel. Here is the original thread. Author of the script mentioned, that now it is hosted on GitHub, so let's just grab the latest version from there. Here is the link to the repository. In the upper-right corner there is a Clone or download button you may push it and choose Download ZIP from the menu. The script will be downloaded.
Once the contents of the zip-file with script are extracted to some directory, copy the kernel.elf there and summon command prompt in this directory (right-click in the empty space of this folder in File Explorer with the Shift button pressed and choose Open command window here).
In the command line type the following:
Code:
rootkernel.cmd kernel.elf boot.img
You'll get some questions about adding some features/tools to your kernel, feel free to answer "Yes" (type Y) to all of them. Screenshot for your reference:
If all went smoothly, you'll get a repacked kernel, boot.img in the script folder, supercharged with TWRP and DRM fix, and most importantly, which also supports rooting. Now it is time to flash it to your phone.
ATTENTION! Since the script is mostly unsupported, when new firmware get released, its kernel modules are not getting automagically added to the script package. You will get "Skipping TWRP recovery. No kernel modules for 3.10.84-perf-XXXXXXX available" error due to this. But don't worry, you can extract the required modules yourself from the firmware.
1. Open the FTF-file (firmware you downloaded) with 7-Zip, and extract system.sin file.
2. Open Flashtool, navigate to Tools > Sin Editor, choose this system.sin file, push Extract data. You'll get system.ext4 in the same directory.
3. Use the cool free Ext2Read tool to get into the ext4 filesystem in the system.ext4 (File > Open Image). Linux users can mount this filesystem as usual. Once you get into the filesystem, go to the lib/modules directory and grab the following files from there (Tools > Save):
core_ctl.ko
ecryptfs.ko
kscl.ko
mhl_sii8620_8061_drv.ko
texfat.ko
4. Once you get these files, create the 3.10.84-perf-XXXXXXX folder in the script's Android\twrp_common_kmodules directory. In my case I created 3.10.84-perf-g5e25a09 folder, just as was mentioned in the script's output in the console (when it complained about Skipping TWRP recovery). Copy these 5 files into this newly created folder.
5. Voilà! Re-run the script and see that now TWRP gets properly integrated! Thanks to @sceryavuz for his initial instructions. I just elaborated them a bit.
When all is clear, turn off your phone if it's on and connect it in a Fastboot mode: hold the Volume Up rocker button and connect USB cable. The LED on the phone will turn blue. Release the button.
Flashing images in this mode is typically done with a fastboot.exe from the Android SDK. Android SDK weighs many gigabytes but thankfully you don't need it. Fortunately Flashtool contains fastboot.exe from the SDK. It's in the Flashtool\x10flasher_lib folder. For the brevity of the following steps, I assume you have all necessary files there. To make it true, copy the newly generated boot.img to this folder.
Now Shift-right-click in the empty space of this folder window and choose Open command window here entry from the context menu. Windows console will appear.
At first try this command:
Code:
fastboot.exe devices
If all is good, there will be one device in the output of this command, just like this:
If not, perhaps there is some driver issue, so head back to the step #1 and make sure the drivers are installed correctly.
If your device is shown correctly, let's flash some files to the phone. Execute the following command to flash the modified kernel:
Code:
fastboot.exe flash boot boot.img
The proper output of this command will be like this:
If you get any errors, the first and more likely reason is that you still have a locked bootloader. Head to the step #3 to verify its state and unlock it if necessary.
If there were no errors — congratulations! — you now just flashed a stock kernel supercharged with TWRP recovery and DRM fix. You're almost done! You may plug out the cable from your phone. If you are attentive to the details, you'll notice that now, once your phone is started, its LED turns amber for 2-3 seconds. This is a special signal for those looking to boot into a recovery (TWRP). But you don't have to start your phone yet.
Although @tobias.waldvogel claims his script is able to also integrate SuperSU during the kernel repacking, I didn't managed to get this working, so the SuperSU (or Magisk) installation is a separate step in my guide. The next step.
6. INSTALLING SUPERSU OR MAGISK
Now when you have TWRP in place and latest Android installed, let's install SuperSU to it. SuperSU distributed in a TWRP-friendly .zip archives, so you should copy one to your microSD card. I used version 2.79 from here. Download TWRP / FlashFire installable ZIP, not the APK. At the time of your reading, there probably will be some newer versions available, feel free to install them them instead. Copy the downloaded ZIP-archive to your microSD. Don't bother to unpack the ZIP.
Once SuperSU zip-file is copied to your microSD card, place it into your phone and reboot to recovery (TWRP). To do this restart or power up your phone and look at the LED. Once it lights amber, press Volume Up rocker button and you'll get into recovery — TWRP. In my case it was TWRP v3.0.2-0.
To install SuperSU, press Install, go to the /external_sd and select the .zip (in my case SuperSU-v2.79-201612051815.zip). Swipe right to confirm installation. Once it is installed, press Reboot System button. Phone will reboot twice. Do not interfere with the process during these multiple reboots, the things are getting done, so just wait once Android is started. When it's started, the phone is rooted and functional!
If you would like to install Magisk instead, the instructions are exactly the same. Grab the latest ZIP from the original thread and flash it with TWRP. That's it!
7. (OPTIONAL) RESTORE YOUR DRM KEYS
If you had successfully backed up your DRM keys in step #2, it is now time to restore it back to the device. There is a flash_dk.cmd script shipped with the Root kernel repack script you used in the previous step. flash_dk.cmd can be used to flash the DRM partition back to your phone.
At first prepare the flashable .ftf:
Code:
flash_dk.cmd <ta backup image> dk.ftf
And then flash dk.ftf via Flashtool, just like you flashed the whole firmware in the step #4, but don't wipe anything this time.
8. OPTIONAL STEPS
8.1. Xposed installation
If you use Lollipop and later, you should install Xposed APK from here. At the time of writing there is XposedInstaller_3.0_alpha4.apk installer there.
Once APK is installed, grab the latest .zip from the repository, I've got xposed-v86-sdk23-arm64.zip. Install it in a regular TWRP way covered in step #6.
Once all these steps are done, you should have Xposed Installer app in your phone, and if you open it and check Framework section, if everything is alright, there will be text in green, something like "Xposed framework version 86 is active".
8.2. Resolving Voice Search and random volume up/down issues while using regular headphones
See this thread.
8.3. Disable startup notification if there is a newer firmware available
Some people get annoyed by a persistent notification, which is displayed once the new firmware become available (new Android version from Sony). Rooted users cannot just tap it and update over-the-air, because they need to perform a complex rooting procedure in beforehand (covered in this guide). It is possible to disable this notification. You may get these notifications by email anyway.
The easiest and safest way is to use some autorun manager. I used Autorun Manager Pro and disabled all receivers of system apps com.sonymobile.fota.service, fota update service and Software update. Notification vanished after a restart.
You may even freeze or remove these apps via some app manager like Titanium Backup Pro.
8.4. Disable that damned green LED light while phone is charged and attached to the cable or docked
This is a historic Xperia behavior, not easily fixable without the root. The notorious green LED is on all night no matter which settings you set up. In fact, there is no setting to switch it off.
However, if you are rooted, you can solve this issue easily. One method is to install a free Light Flow - LED Control app. Once it is installed, you need to enable the following settings in the Settings > Device Settings and Root section: Direct mode, Root mode and Run every command as root. Then you can mess around with individual notifications in the Notification settings, but I just cleared all in there and hey! — the annoying green LED is gone!
THAT'S IT
At this point you have a stock Sony Android enhanced with root privileges. SuperSU / Magisk app is also installed, so you are ready to use root right away. SuperSU now can be updated in a regular way via Play Store. Magisk has it's own updating capabilities.
P.S. WHEN NEW FIRMWARE IS AVAILABLE
Once the new firmware is released, you may perform the same procedure for it beginning from the step #4, but if it is a minor upgrade, you may want not to wipe anything during Flashtool flashing this time. If it is a major upgrade, e.g. Marshmallow > Nougat, you probably may want to start with a clean system and wipe all.
Fragmentation said:
Getting your phone recognized by your computer (driver installation).
(optional) Backup your DRM keys.
Unlocking a bootloader.
Flashing stock firmware with Flashtool.
Repacking and flashing a kernel.
Installing SuperSU.
(optional) Restore your DRM keys.
Optional tasks.
Click to expand...
Click to collapse
I'm pretty sure that once you have unlocked the bootloader, the easiest thing at that point is to use fastboot to flash a custom kernel/recovery, then boot to recovery, flash su, then reflash your original kernel. Then you're rooted.
Plus, rooting is easy now even with locked bl, since we have Kingroot, and new Sony bootloader with real recovery.
(However, I can't say for sure on every device... I appreciate you taking the time to post...)
levone1 said:
I'm pretty sure that once you have unlocked the bootloader, the easiest thing at that point is to use fastboot to flash a custom kernel/recovery, then boot to recovery, flash su, then reflash your original kernel. Then you're rooted.
Click to expand...
Click to collapse
Hey. If you'd say this to my mom, I'm sure she'll not understand any of these. And with this guide she at least have some chance of success.
levone1, why at the end would you flash your original kernel again instead of just running your custom kernel that you made like in the guide?
F2a said:
levone1, why at the end would you flash your original kernel again instead of just running your custom kernel that you made like in the guide?
Click to expand...
Click to collapse
If you flash stock-based kernel via boot.IMG in fastboot that will work with your stock ROM, great, keep it. I was just imagining easiest thing to be to flash, for example, CM boot IMG, just to be able to get into recovery to flash su. Usually stock-based kernels are zips, with other things besides just boot IMG. What I've usually done with unlocked BL and stock ROM is use fastboot to flash CM boot and recovery IMG, then go to recovery and flash supersu, then use flashtool to flash kernel only of stock ROM. Once you reboot, rooted, you can do whatever from there.
Which ROM have you flashed to 6883. The Nougat?
levone1 said:
If you flash stock-based kernel via boot.IMG in fastboot that will work with your stock ROM, great, keep it. I was just imagining easiest thing to be to flash, for example, CM boot IMG, just to be able to get into recovery to flash su. Usually stock-based kernels are zips, with other things besides just boot IMG. What I've usually done with unlocked BL and stock ROM is use fastboot to flash CM boot and recovery IMG, then go to recovery and flash supersu, then use flashtool to flash kernel only of stock ROM. Once you reboot, rooted, you can do whatever from there.
Click to expand...
Click to collapse
I am not quite sure what you mean tbh so forgive me if I missunderstand.
stock kernels are not zips they come in .elf hence the use of rootkernel to unpack/repack it to something more manageable. nowadays supersu makes changes to this partition once flashed, so if you flash stock kernel.sin containing kernel.elf again from flashtool changes will be reverted and you loose root.
the easiest way to get into twrp recovery without flashing anything is to just fastboot it.
nigeta_gr said:
Which ROM have you flashed to 6883. The Nougat?
Click to expand...
Click to collapse
Yes, the latest official firmware available for Z5P (E6883) is Nougat (7.0). I flashed it during the assembly of this guide.
I suppose it will work with my E6833 as well.
Fragmentation said:
Yes, the latest official firmware available for Z5P (E6883) is Nougat (7.0). I flashed it during the assembly of this guide.
Click to expand...
Click to collapse
nigeta_gr said:
I suppose it will work with my E6833 as well.
Click to expand...
Click to collapse
I'm sure it will.
Fragmentation said:
At first I created a guide about rooting stock Marshmellow of Sony Xperia Z5 Premium. After some time I realized that it may be useful to users of virtually any recent Sony phone, so here is my Sony Cross-Device general rooting thread. I will mostly copy-paste bits from my previous guide, but using renewed screenshots and firmwares'/tools' versions.
Click to expand...
Click to collapse
Ogromnoye spasibo bratan!
This helped me tremendously, just wanted to say thanks!
FYI, I'm using latest Nougat 333 UK firmware on Xperia X F5121 US version --- so that my fingerprint scanner works. Got stuck in a boot loop after installing TWRP but after reading your thread, I fully understood and fixed the reason why. The root tool from GitHub worked kinda --- meaning I had busybox and others but no su binary I still had to install SuperSU.zip via TWRP to actually have root. You documented a similar experience.
JZ SmartMort said:
Ogromnoye spasibo bratan!
This helped me tremendously, just wanted to say thanks!
FYI, I'm using latest Nougat 333 UK firmware on Xperia X F5121 US version --- so that my fingerprint scanner works. Got stuck in a boot loop after installing TWRP but after reading your thread, I fully understood and fixed the reason why. The root tool from GitHub worked kinda --- meaning I had busybox and others but no su binary I still had to install SuperSU.zip via TWRP to actually have root. You documented a similar experience.
Click to expand...
Click to collapse
You're welcome, zemlyak! Sure, for root you definitely need SuperSU, it just won't work without it this way. It's a shame US versions of Xperias don't have fingerprint scanner activated, but it's cool to hear, that flashing another region firmware helps.
Hi, I followed everything until the part where I need to flash the modified kernel in step 5. There is no error messages. the output is exactly like the screen captures. When I start the phone, I don't see the amber light. I cannot proceed. Where did I go wrong? Appreciate any help available.
Edit: Used a rooted stock kernel from another thread. Seems to work. Still not sure what I missed out though.
viperc said:
Hi, I followed everything until the part where I need to flash the modified kernel in step 5. There is no error messages. the output is exactly like the screen captures. When I start the phone, I don't see the amber light. I cannot proceed. Where did I go wrong? Appreciate any help available.
Edit: Used a rooted stock kernel from another thread. Seems to work. Still not sure what I missed out though.
Click to expand...
Click to collapse
Hey. If the phone don't turn on amber light for a while during the boot up, then TWRP is not there.
If you used the kernel repack script I mentioned in the guide with a very recent Sony's firmware, probably you didn't notice, that TWRP has not been integrated into the kernel due to some error. It is because this script should be frequently updated to work with any newly released firmware, and Tobias, its author, apparently have not time to do this.
However, you can update the script yourself, following this procedure.
viperc said:
Hi, I followed everything until the part where I need to flash the modified kernel in step 5. There is no error messages. the output is exactly like the screen captures. When I start the phone, I don't see the amber light. I cannot proceed. Where did I go wrong? Appreciate any help available.
Edit: Used a rooted stock kernel from another thread. Seems to work. Still not sure what I missed out though.
Click to expand...
Click to collapse
I don't have the amber LED light on boot up on my X Compact but everything works fine. I can't seem to find it but I recall reading somewhere an actual reason why I didn't see it but as far as I know it's not a problem.
Edit: Simple check, reboot and hold volume down. Do you enter TWRP? I do even though I never see the amber led.
F2a said:
I don't have the amber LED light on boot up on my X Compact but everything works fine. I can't seem to find it but I recall reading somewhere an actual reason why I didn't see it but as far as I know it's not a problem.
Edit: Simple check, reboot and hold volume down. Do you enter TWRP? I do even though I never see the amber led.
Click to expand...
Click to collapse
Maybe it wasn't a proper kernel for your rom or device, I also experienced some errors including yours but at last (after 12 try) I found a working kernel for me. I really don't know what the problem is, sometimes it just doesn't work...
Fragmentation said:
Hey. If the phone don't turn on amber light for a while during the boot up, then TWRP is not there.
If you used the kernel repack script I mentioned in the guide with a very recent Sony's firmware, probably you didn't notice, that TWRP has not been integrated into the kernel due to some error. It is because this script should be frequently updated to work with any newly released firmware, and Tobias, its author, apparently have not time to do this.
However, you can update the script yourself, following this procedure.
Click to expand...
Click to collapse
Thanks. I will look into that again when my region's Sony release the latest firmware.
F2a said:
I don't have the amber LED light on boot up on my X Compact but everything works fine. I can't seem to find it but I recall reading somewhere an actual reason why I didn't see it but as far as I know it's not a problem.
Edit: Simple check, reboot and hold volume down. Do you enter TWRP? I do even though I never see the amber led.
Click to expand...
Click to collapse
Interesting, didn't try that lol. I used another pre-rooted sick kernel to flash after my attempt failed. I can see the amber led now with the other kernel.
Tried again after re-downloading the script. It's working now. Thanks.
if not do drm-fix, and flash dk.ftf with old flashtool, the result is" FIDO KEYS NOT PROVISONED PROVISION FAILED"
any way to fix this?
This thread is a complete guide and must be sticked, Thanks :fingers-crossed:
You should add backupTA-V2 for Lollipop devices..
Thread : https://forum.xda-developers.com/crossdevice-dev/sony/universal-dirtycow-based-ta-backup-t3514236
iovyroot method is very old..
Hello,
my Sony Xperia Z1 Compact has the standard Android 5.1 version of Sony. Now I want to upgrade to a new Android version.
I need it for everyday-use and it should be relatively stable. The camera is not that important, but it should work. I use especially the browser, so the mobile datas should also work. Otherwise it should be only be stable and the battery should not discharge too fast. Is there any good build for me?
That one looks very interesting: AICP 7.1 ROM amami (I can't link the URL, because I am a new user )
Is it okay for a Custom-ROM beginner? I think I will find some instructions and tutorials how to install it. I just have to know if it is a good choice.
If there are any English mistakes, please correct me. I have to improve my English.
Thank you!
Skylac06 said:
Hello,
my Sony Xperia Z1 Compact has the standard Android 5.1 version of Sony. Now I want to upgrade to a new Android version.
I need it for everyday-use and it should be relatively stable. The camera is not that important, but it should work. I use especially the browser, so the mobile datas should also work. Otherwise it should be only be stable and the battery should not discharge too fast. Is there any good build for me?
That one looks very interesting: AICP 7.1 ROM amami (I can't link the URL, because I am a new user )
Is it okay for a Custom-ROM beginner? I think I will find some instructions and tutorials how to install it. I just have to know if it is a good choice.
If there are any English mistakes, please correct me. I have to improve my English.
Thank you!
Click to expand...
Click to collapse
Anything over LP 5.1 has an unusable camera, with one possible exception: DU Marshmallow rom with custom kernel. Read op of this thread - https://forum.xda-developers.com/sony-xperia-z1-compact/general/z1c-marshmallow-roms-t3372565 Note the addenda at the bottom.
levone1 said:
Anything over LP 5.1 has an unusable camera, with one possible exception: DU Marshmallow rom with custom kernel. Read op of this thread - https://forum.xda-developers.com/sony-xperia-z1-compact/general/z1c-marshmallow-roms-t3372565 Note the addenda at the bottom.
Click to expand...
Click to collapse
Thank you for your fast answer.
Is the camera completely unusable or just "not good"? I do not need the best quality, but it should at least work and you should be able to identify what the picture shows.
However, thank you for the link. I think I will try it. Android 6 is, I hope so, an improvement. Maybe I will then upgrade to Nougat.
There are no other options like Ubuntu Touch or Sailfish, right?
Skylac06 said:
Thank you for your fast answer.
Is the camera completely unusable or just "not good"? I do not need the best quality, but it should at least work and you should be able to identify what the picture shows.
However, thank you for the link. I think I will try it. Android 6 is, I hope so, an improvement. Maybe I will then upgrade to Nougat.
There are no other options like Ubuntu Touch or Sailfish, right?
Click to expand...
Click to collapse
Put a piece of tape over your camera lens, and turn off the lights, and shake the phone back and forth while taking a picture... That's what most of the photos will look like.
No Sailfish, and @munjeni has built Ubuntu touch for Z1c, but I couldn't get the Internet to work, (except for Ubuntu store, which downloads apps fine). - https://mega.nz/#!YEpCHLoS!tRxZpJHUSKL_cZz9wisGZvWl7igYAlYJRjwbcT_s868 Besides that, fxp has built Firefox OS, but probably hard to find at this point, and there are a few MIUI builds out there that are very good. Check here - https://forum.xda-developers.com/showpost.php?p=71329395&postcount=5 and here - https://forum.xda-developers.com/so...lopment/23-2015-miui-v6-5-5-22-d5503-t3116494
Hello again,
I decided to try out some Custom-ROMs.
Now I find many different ways how to root my phone and unlock the bootloader. Which way do you here recommend?
And how difficult is going back to the stock ROM and lock the bootloader againg, if nothing works?
Thank you!
Skylac06 said:
Hello again,
I decided to try out some Custom-ROMs.
Now I find many different ways how to root my phone and unlock the bootloader. Which way do you here recommend?
And how difficult is going back to the stock ROM and lock the bootloader againg, if nothing works?
Thank you!
Click to expand...
Click to collapse
Backup TA - https://forum.xda-developers.com/crossdevice-dev/sony/universal-dirtycow-based-ta-backup-t3514236
Unlock bl - https://developer.sonymobile.com/unlockbootloader/unlock-yourboot-loader
Root and recovery :
Download custom kernel to pc, and extract boot img to ADB directory - https://forum.xda-developers.com/so...rnel-advanced-14-5-0-242-kernel-v1-0-t3096060 and download twrp img to ADB directory - https://www.androidfilehost.com/?fid=457095661767147235 then use fastboot commands to flash boot and recovery. Now you have recovery, and you can either flash SuperSU zip, or flash custom rom.
Restore TA - https://forum.xda-developers.com/crossdevice-dev/sony/poc-real-trim-instead-drm-fix-t3552893 or use Flashtool relock bl option - http://www.flashtool.net/
levone1 said:
Backup TA - https://forum.xda-developers.com/crossdevice-dev/sony/universal-dirtycow-based-ta-backup-t3514236
Unlock bl - https://developer.sonymobile.com/unlockbootloader/unlock-yourboot-loader
Root and recovery :
Download custom kernel to pc, and extract boot img to ADB directory - https://forum.xda-developers.com/so...rnel-advanced-14-5-0-242-kernel-v1-0-t3096060 and download twrp img to ADB directory - https://www.androidfilehost.com/?fid=457095661767147235 then use fastboot commands to flash boot and recovery. Now you have recovery, and you can either flash SuperSU zip, or flash custom rom.
Restore TA - https://forum.xda-developers.com/crossdevice-dev/sony/poc-real-trim-instead-drm-fix-t3552893 or use Flashtool relock bl option - http://www.flashtool.net/
Click to expand...
Click to collapse
One little question: if I unlock my bootloader, my complete internal storage is wiped, right?
But if my bootloader is locked, I can not use the nandroid-backup-function of TWRP, because I can not use the custom kernel to root my phone. (Am I right? )
Currently I only have done your first step - backup the TA.
And of course, thank you again. :fingers-crossed:
Skylac06 said:
One little question: if I unlock my bootloader, my complete internal storage is wiped, right?
But if my bootloader is locked, I can not use the nandroid-backup-function of TWRP, because I can not use the custom kernel to root my phone. (Am I right? )
Currently I only have done your first step - backup the TA.
And of course, thank you again. :fingers-crossed:
Click to expand...
Click to collapse
You can root with locked bl, but your options are: 1) use Kingroot, (and it's generally preferred to not keep Kingroot, so after rooting you can replace Kingroot with SuperSU or wipe everything and flash a new rom with SuperSU), or 2) downgrade to KK and use doomlord rootkit, then flash LP prf.
levone1 said:
You can root with locked bl, but your options are: 1) use Kingroot, (and it's generally preferred to not keep Kingroot, so after rooting you can replace Kingroot with SuperSU or wipe everything and flash a new rom with SuperSU), or 2) downgrade to KK and use doomlord rootkit, then flash LP prf.
Click to expand...
Click to collapse
Okay.
I would like to avoid using Kingroot and downgrade to 4.4 is not even better.
But I found the Sony-Flashtool "Emma" for Windows. It seems to be able to restore completely the Stock-5.1-ROM. So I think I don't need a whole nandroid-backup. Am I right?
So I will unlock my bootloader, flash the custom kernel using TWRP-Tool and have a rooted phone. Then I am able to flash any custom-ROM I want to try out.
Did I misunderstand anything?
Skylac06 said:
Okay.
I would like to avoid using Kingroot and downgrade to 4.4 is not even better.
But I found the Sony-Flashtool "Emma" for Windows. It seems to be able to restore completely the Stock-5.1-ROM. So I think I don't need a whole nandroid-backup. Am I right?
So I will unlock my bootloader, flash the custom kernel using TWRP-Tool and have a rooted phone. Then I am able to flash any custom-ROM I want to try out.
Did I misunderstand anything?
Click to expand...
Click to collapse
True, Emma will restore you to stock. The backup would be if you want to restore the particular state of your phone right now.
Unlock bl, then flash the boot and recovery imgs, and you will be able to get into recovery. You'll want to have whatever rom you want to flash already downloaded on sdcard.
It works.
Now I have the AICP 12.1 7.1.2 Nightly Version.
Only the camera is not good, but better than expected. The aroma-GApps-package does not work, the GUI is hidden under the GUI of TWRP, but you can select your choice. However, after clicking install nothing was installed. After I downloaded and installed the super-GApps-package everything works fine.
If I find some issues, where can I report them? In the officiall AICP-12.1 N 7.1 amami Thread?
And at least a great thank you to levone1. :fingers-crossed:
Skylac06 said:
It works.
Now I have the AICP 12.1 7.1.2 Nightly Version.
Only the camera is not good, but better than expected. The aroma-GApps-package does not work, the GUI is hidden under the GUI of TWRP, but you can select your choice. However, after clicking install nothing was installed. After I downloaded and installed the super-GApps-package everything works fine.
If I find some issues, where can I report them? In the officiall AICP-12.1 N 7.1 amami Thread?
And at least a great thank you to levone1. :fingers-crossed:
Click to expand...
Click to collapse
https://forum.xda-developers.com/so...lopment/rom-aicp-11-0-mm-6-0-1-amami-t3428288
levone1 said:
https://forum.xda-developers.com/so...lopment/rom-aicp-11-0-mm-6-0-1-amami-t3428288
Click to expand...
Click to collapse
That is the thread I meant, but I can not post any URLs.
Best Custom ROM for Z1C
Not to open a new thread, which Custom ROM would you guys recommend to install on my Z1C?
I'm having some issues atm. It keeps restarting; I did a factory reset, it worked well for a while, now the issue is back. However, it does seem to work fine when hooked up to my PC (with the PC Companion active). Before I start shopping for a new phone, I'd like to root it first.
For this purpose, I'd like to know whick custom ROM is the most stable that you would recommend I install. Also, I'd be very helpful if you could direct to a good guide about the entire process.
Thank you in advance, I appreciate it!
levone1 said:
Backup TA - https://forum.xda-developers.com/crossdevice-dev/sony/universal-dirtycow-based-ta-backup-t3514236
Unlock bl - https://developer.sonymobile.com/unlockbootloader/unlock-yourboot-loader
Root and recovery :
Download custom kernel to pc, and extract boot img to ADB directory - https://forum.xda-developers.com/so...rnel-advanced-14-5-0-242-kernel-v1-0-t3096060 and download twrp img to ADB directory - https://www.androidfilehost.com/?fid=457095661767147235 then use fastboot commands to flash boot and recovery. Now you have recovery, and you can either flash SuperSU zip, or flash custom rom.
Restore TA - https://forum.xda-developers.com/crossdevice-dev/sony/poc-real-trim-instead-drm-fix-t3552893 or use Flashtool relock bl option - http://www.flashtool.net/
Click to expand...
Click to collapse
OP's intention is different than mine but this approach looks suit me well. I would like to keep my stock (14.6.A.1.236), so can I flash kernel.sin from Stock Rom via Flashtool after restoring TA and keep root status and recovery or should I use the custom kernel henceforth?
prustr said:
OP's intention is different than mine but this approach looks suit me well. I would like to keep my stock (14.6.A.1.236), so can I flash kernel.sin from Stock Rom via Flashtool after restoring TA and keep root status and recovery or should I use the custom kernel henceforth?
Click to expand...
Click to collapse
I don't think I've ever done it that way, but I don't see why not. As long as you don't wipe your recovery, you should still be good... (if you'd rather use stock kernel for whatever reason).
levone1 said:
I don't think I've ever done it that way, but I don't see why not. As long as you don't wipe your recovery, you should still be good... (if you'd rather use stock kernel for whatever reason).
Click to expand...
Click to collapse
Thanks for the answer. Actually the whole story is, the phone belongs to my wife and she is neither techsavvy nor has patience with electronics, especially when any problem come up. I would like to remove bloatwares and have backup yet keep the phone as Stock as possible. I'm trying to keep my ROM related modifications at minimum. That's been said, I would welcome any correction on this manner as I feel you found returning the stock kernel is pointless.
prustr said:
Thanks for the answer. Actually the whole story is, the phone belongs to my wife and she is neither techsavvy nor has patience with electronics, especially when any problem come up. I would like to remove bloatwares and have backup yet keep the phone as Stock as possible. I'm trying to keep my ROM related modifications at minimum. That's been said, I would welcome any correction on this manner as I feel you found returning the stock kernel is pointless.
Click to expand...
Click to collapse
I wouldn't say pointless, but for the most part, any custom kernel is an improvement. Most of the customizations wouldn't mean anything to someone like that, but I doubt there's any harm or risk in keeping it.
Alright so I apologize in advance if this thread has been posted a million times and believe me, I've spent the last 4-5 days combing through to make sure I could get every detail of this process done correctly. So I'm not just blindly asking for instructions on how to root my phone. Apologies also if I posted this in the wrong place.
For starters, I'm using Moto G4 Plus XT1641 6.0.1 Build Number MPJ24.139-23.3. My carrier is Koodo in Canada (unsure if that's important but I'll need to being it up again for another point). The files I downloaded were from a youtube tutorial and this includes ADB program, TWRP img 3.0.2.0, supersu zip 2.46 and Motorola Drivers 2.5.4, SOME of which I think may have been outdated versions.
So Saturday night I tried to root my phone with those files. I followed some more guides, I unlocked my bootloader and I think I mostly did everything right except for getting the right supersu version as I've seen up to version 2.82. I think this may have been my first mistake but maybe someone correct me if I'm wrong? My other mistake was not making a backup in TWRP. I'd read about possible wifi problems after rooting so I grabbed the elemental package and possibly even flashed that wrong. I can't even remember the steps of what I did but I'm sure it was all wrong.
Main point, after all that I didn't have ccell service, wifi, etc. The common problems that arise when you do it wrong. I ended up just taking my phone in and getting a new phone. Exact same one, same model. And this brings me to where I am now. I've downloaded some new files and I want to make sure that I've got everything right as to avoid misunderstanding some key parts to the process.
Minimal ADB and Fastboot 1.4.2, twrp-3.1.1-0-athene.img, SuperSU-v2.82-201705271822, Motorola Drivers 2.5.4, and lastly XT1641_ATHENE-TELUS_MPJ24.139-23.3_cid50_subsidy-TELUS_CFC.xml. Notice how that last one says Telus? It's the parent company of Koodo so I'm hoping I can use that as a failsafe.
I think I've covered all the key points so to sum up:
1. Did I use the wrong supersu zip version and could that be a reason why I had no wifi/cell service? Is that also possible because I may have flashed the wrong carrier athene file?
2. Are the files I have downloaded now the correct ones I need and up to date?
3. I'm following this guide. With the files I have downloaded, is it still a correct step by step process? Are there other guides that work better?(thats not a knock on the original guide I'm refering to). https://forum.xda-developers.com/moto-g4-plus/how-to/root-systemless-rooting-supersu-2-74-2-t3405772
I think I've got the right know how and tools to root my phone but I'm just nervous of doing what I did before again and would like some reassurance that I'm doing it right. I've just come from jailbreaks, the world of root is much different. I appreciate any help or tips you guys can throw me!
Hmm, that's odd how you lost radio signal when you rooted, did you obtain radio signal back after you unrooted?
A few things I noted:
1)You may wish to update your device to a newer build, you might get an OTA inviting you to update to MPJ24-139-63 (or 139-64), which was the latest Marshmallow build. Once you've rooted, you will not be able to install OTA updates until you have unrooted and restored the stock recovery (from the same build as you currently have). If you get an OTA notification for any build beginning with NPJ, that's for Nougat.
2)If you plan to stay on Marshmallow, you don't need the ElementalX kernel - a custom kernel like ElementalX is compulsory on Nougat, whereas Marshmallow is not as strict with regards to rooting.
3) I hope the carrier ROM is okay, though from other reports, flashing the incorrect ROM can corrupt device partitions, leaving with no IMEI/no service/no FP. We have possible ways of repairing that though.
The tools you've downloaded seem to be okay and Bender's guide is still okay - even though the tools they've used are out of date - so the general procedure would be (up to you if you've updated MM at this point):
Install adb on your computer.
Boot your device to the bootloader.
Flash TWRP 3.1.1 athene (either the offficial TWRP or an unofficial build from shreps or oadam11) as directed.
Reboot to recovery (to make sure the recovery sticks).
Back up all partitions on your device, make the name descriptive.
Make another backup of the boot partition - this contains your stock kernel, useful for switching root manager.
Once the backups have been made, flash SuperSU v2.82.
Wipe cache/Dalvik
Reboot.
echo92 said:
Hmm, that's odd how you lost radio signal when you rooted, did you obtain radio signal back after you unrooted?
A few things I noted:
1)You may wish to update your device to a newer build, you might get an OTA inviting you to update to MPJ24-139-63 (or 139-64), which was the latest Marshmallow build. Once you've rooted, you will not be able to install OTA updates until you have unrooted and restored the stock recovery (from the same build as you currently have). If you get an OTA notification for any build beginning with NPJ, that's for Nougat.
2)If you plan to stay on Marshmallow, you don't need the ElementalX kernel - a custom kernel like ElementalX is compulsory on Nougat, whereas Marshmallow is not as strict with regards to rooting.
3) I hope the carrier ROM is okay, though from other reports, flashing the incorrect ROM can corrupt device partitions, leaving with no IMEI/no service/no FP. We have possible ways of repairing that though.
The tools you've downloaded seem to be okay and Bender's guide is still okay - even though the tools they've used are out of date - so the general procedure would be (up to you if you've updated MM at this point):
Install adb on your computer.
Boot your device to the bootloader.
Flash TWRP 3.1.1 athene (either the offficial TWRP or an unofficial build from shreps or oadam11) as directed.
Reboot to recovery (to make sure the recovery sticks).
Back up all partitions on your device, make the name descriptive.
Make another backup of the boot partition - this contains your stock kernel, useful for switching root manager.
Once the backups have been made, flash SuperSU v2.82.
Wipe cache/Dalvik
Reboot.
Click to expand...
Click to collapse
Thanks for the reply, it helps me feel a little more confident in what I'm doing. I didn't get my cell service back as I just took my phone into Koodo and they just gave me a new one. A few questions.
Are there some clear guides on how to recover from lost wifi and cell service? I've seen a few but it appears they all have different directions so as a newcomer to Android it does seems a bit confusing to what the right way to do it is. I'm also hoping someone can chime in on the Telus carrier IMG file as that seems to be my backup in case anything goes terribly wrong again. I'd hate to have to bring my phone back again a second time. Also, is it an easy process to make a backup of the kernel in TWRP? I've figured out how to make a backup of the normal partition, just hoping backing up the kernel is just as easy.
I think I'm near ready to take the root plunge in the coming days. It's good to see such a strong community here. Totally different from the jailbreak scene.
lemonlimejones said:
Thanks for the reply, it helps me feel a little more confident in what I'm doing. I didn't get my cell service back as I just took my phone into Koodo and they just gave me a new one. A few questions.
Are there some clear guides on how to recover from lost wifi and cell service? I've seen a few but it appears they all have different directions so as a newcomer to Android it does seems a bit confusing to what the right way to do it is. I'm also hoping someone can chime in on the Telus carrier IMG file as that seems to be my backup in case anything goes terribly wrong again. I'd hate to have to bring my phone back again a second time. Also, is it an easy process to make a backup of the kernel in TWRP? I've figured out how to make a backup of the normal partition, just hoping backing up the kernel is just as easy.
I think I'm near ready to take the root plunge in the coming days. It's good to see such a strong community here. Totally different from the jailbreak scene.
Click to expand...
Click to collapse
Hmm, I'm not aware of any guides specifically dealing with lost Wi-Fi and lost mobile signal. There are a few posts where we've had some success in getting radios back, but it involves either hex editing https://forum.xda-developers.com/showpost.php?p=72340548&postcount=98 or flashing hw, modem or fsg partitions from a working device (in this case, XT1641) The instances I've seen of lost Wi-Fi/mobile signal appear to have occurred during a stock ROM fastboot flash, but hoping someone can chime in as to whether it was just flashing the wrong region firmware or something else.
If you want to back up your kernel in TWRP:
Boot to TWRP
Tap 'Backup' on the main menu
Select only the 'boot' partition - this is the partition that contains your kernel (should be stock and clean if you've not rooted).
Rename the file to remind you it's your kernel.
Swipe to back up.
If you need to revert to this kernel, unroot first (depending on your root manager, you may have to boot and then unroot. I recall SuperSU unroots via the SuperSU app settings), then boot to TWRP.
Tap 'Restore' on the main menu
Navigate to your boot backup
Flash your boot backup
You should now have a clean stock kernel, so if you wish to switch root managers, you should be able to obtain root with your new root manager. We want a clean kernel (no modifications made) since uninstalling the old root may leave traces of root on your existing kernel, and thus may cause issues if you re-root with a different manager.
Good luck in rooting
echo92 said:
Hmm, I'm not aware of any guides specifically dealing with lost Wi-Fi and lost mobile signal. There are a few posts where we've had some success in getting radios back, but it involves either hex editing https://forum.xda-developers.com/showpost.php?p=72340548&postcount=98 or flashing hw, modem or fsg partitions from a working device (in this case, XT1641) The instances I've seen of lost Wi-Fi/mobile signal appear to have occurred during a stock ROM fastboot flash, but hoping someone can chime in as to whether it was just flashing the wrong region firmware or something else.
If you want to back up your kernel in TWRP:
Boot to TWRP
Tap 'Backup' on the main menu
Select only the 'boot' partition - this is the partition that contains your kernel (should be stock and clean if you've not rooted).
Rename the file to remind you it's your kernel.
Swipe to back up.
If you need to revert to this kernel, unroot first (depending on your root manager, you may have to boot and then unroot. I recall SuperSU unroots via the SuperSU app settings), then boot to TWRP.
Tap 'Restore' on the main menu
Navigate to your boot backup
Flash your boot backup
You should now have a clean stock kernel, so if you wish to switch root managers, you should be able to obtain root with your new root manager. We want a clean kernel (no modifications made) since uninstalling the old root may leave traces of root on your existing kernel, and thus may cause issues if you re-root with a different manager.
Good luck in rooting
Click to expand...
Click to collapse
That's perfect thank you so much. Am I right to assume that if I get into a jam then I can just restore/reflash my backups and I'll be back to normal?
To be safe, flash the ElementalX kernel before rooting.
reCoded said:
To be safe, flash the ElementalX kernel before rooting.
Click to expand...
Click to collapse
See this is where I get confused, the guy above you said ElementalX isn't needed on Marshmallow but you say i should use it anyway? I've seen a few differing opinions on what should and shouldn't be done, just not sure which one is the right answer.
lemonlimejones said:
See this is where I get confused, the guy above you said ElementalX isn't needed on Marshmallow but you say i should use it anyway? I've seen a few differing opinions on what should and shouldn't be done, just not sure which one is the right answer.
Click to expand...
Click to collapse
ElementalX v0.07 is not required on Marshmallow (provided you are planning on staying on 6.0.1), you can root the stock ROM kernel. You may wish to flash the ElementalX kernel anyway as this custom kernel gives you more control and tuning options compared to the stock kernel. On stock Nougat, because the anti-rooting kernel security is much stricter and enforced (whereas on Marshmallow I don't think it's enforced), then you need ElementalX or vegito or a custom kernel to bypass the security, by in effect replacing the stock secure kernel with a kernel that doesn't have those restrictions. Without replacing the stock kernel on stock Nougat systems, you can run into a bootloop.
As an MM kernel as mentioned before has weaker security regarding rooting, it's up to you if you choose to root the stock kernel or ElementalX.
I've rooted MM (MPJ24.139-63) in the past with SuperSU (v2.79) and only used TWRP and SuperSU.
In response to your other post, the backups should get you out of a jam, since what you're doing should only affect the partitions you've backed up previously (they in theory shouldn't go anywhere near your modem, bootloader or critical firmware). Bear in mind that the TWRP backup if restored in full will revert your messages and data to that backup. You may wish to use Titanium Backup or other tools to take occasional snapshots of your apps data that you can restore should you have to roll back.
lemonlimejones said:
See this is where I get confused, the guy above you said ElementalX isn't needed on Marshmallow but you say i should use it anyway? I've seen a few differing opinions on what should and shouldn't be done, just not sure which one is the right answer.
Click to expand...
Click to collapse
If you're on Nougat, then you should use ElementalX. If you're on Marshmallow, you don't need it.
echo92 said:
ElementalX v0.07 is not required on Marshmallow (provided you are planning on staying on 6.0.1), you can root the stock ROM kernel. You may wish to flash the ElementalX kernel anyway as this custom kernel gives you more control and tuning options compared to the stock kernel. On stock Nougat, because the anti-rooting kernel security is much stricter and enforced (whereas on Marshmallow I don't think it's enforced), then you need ElementalX or vegito or a custom kernel to bypass the security, by in effect replacing the stock secure kernel with a kernel that doesn't have those restrictions. Without replacing the stock kernel on stock Nougat systems, you can run into a bootloop.
As an MM kernel as mentioned before has weaker security regarding rooting, it's up to you if you choose to root the stock kernel or ElementalX.
I've rooted MM (MPJ24.139-63) in the past with SuperSU (v2.79) and only used TWRP and SuperSU.
In response to your other post, the backups should get you out of a jam, since what you're doing should only affect the partitions you've backed up previously (they in theory shouldn't go anywhere near your modem, bootloader or critical firmware). Bear in mind that the TWRP backup if restored in full will revert your messages and data to that backup. You may wish to use Titanium Backup or other tools to take occasional snapshots of your apps data that you can restore should you have to roll back.
Click to expand...
Click to collapse
Right on, I think I feel comfortable with this now! One more question though, with newer versions of SuperSU is it still necessary to make the command echo systemless=true or was that mostly for older versions? Also if that part is needed, should I run SuperSU from the data folder in TWRP?
lemonlimejones said:
Right on, I think I feel comfortable with this now! One more question though, with newer versions of SuperSU is it still necessary to make the command echo systemless=true or was that mostly for older versions? Also if that part is needed, should I run SuperSU from the data folder in TWRP?
Click to expand...
Click to collapse
The 'echo systemless=true', as I understand it, isn't required on SuperSU 2.79 or newer, so if you're flashing 2.82, you should be able to flash as is without having to run the command too Also makes uninstalling easier!