0

I have a Sony Xperia SP with 'Bootloader unlock allowed: No'. I want to flash a custom ROM to the device but there seems to be no recovery partition on it, so I cannot install TWRP or use fastboot. Using adb and ls -l yields (output cropped):

...
dr-xr-xr-x root     root              1970-01-01 01:00 proc
-rw-r--r-- root     root         2109 1970-01-01 01:00 property_contexts
drwxr-xr-x root     root              1970-01-01 01:00 res
drwx------ root     root              2014-05-11 12:44 root
drwxr-x--- root     root              1970-01-25 01:39 sbin
lrwxrwxrwx root     root              1970-01-25 01:39 sdcard -> /storage/emulated/legacy
lrwxrwxrwx root     root              1970-01-25 01:39 sdcard1 -> /storage/removable/sdcard1
...

ls -al /dev/block/platform/msm_sdcc.1/by-name yields:

lrwxrwxrwx root     root              1970-01-25 01:39 Boot -> /dev/block/mmcblk0p2
lrwxrwxrwx root     root              1970-01-25 01:39 Boot2 -> /dev/block/mmcblk0p3
lrwxrwxrwx root     root              1970-01-25 01:39 Cache -> /dev/block/mmcblk0p14
lrwxrwxrwx root     root              1970-01-25 01:39 FOTAKernel -> /dev/block/mmcblk0p11
lrwxrwxrwx root     root              1970-01-25 01:39 Kernel -> /dev/block/mmcblk0p4
lrwxrwxrwx root     root              1970-01-25 01:39 LTALabel -> /dev/block/mmcblk0p12
lrwxrwxrwx root     root              1970-01-25 01:39 System -> /dev/block/mmcblk0p13
lrwxrwxrwx root     root              1970-01-25 01:39 TA -> /dev/block/mmcblk0p1
lrwxrwxrwx root     root              1970-01-25 01:39 TZ -> /dev/block/mmcblk0p5
lrwxrwxrwx root     root              1970-01-25 01:39 Userdata -> /dev/block/mmcblk0p15
lrwxrwxrwx root     root              1970-01-25 01:39 apps_log -> /dev/block/mmcblk0p10
lrwxrwxrwx root     root              1970-01-25 01:39 fsg -> /dev/block/mmcblk0p8
lrwxrwxrwx root     root              1970-01-25 01:39 modemst1 -> /dev/block/mmcblk0p6
lrwxrwxrwx root     root              1970-01-25 01:39 modemst2 -> /dev/block/mmcblk0p7
lrwxrwxrwx root     root              1970-01-25 01:39 ramdump -> /dev/block/mmcblk0p9

My question is: Is it possible to create a new recovery partition, and if so, how does it have to be done? Or is it possible to flash a custom ROM without this partition? Thanks.

  • 2
    Bootloader unlock allowed: No basically denies all your intentions... – Andy Yan Aug 15 '17 at 3:20
  • @Gokul NC: It's stock Jelly Bean and my device is already rooted with TowelRoot. What commands are used for flashing via Terminal? – atarax42 Aug 15 '17 at 9:09
  • Please limit comments to solving the problem. This isn't the place to complain about vendors' or carriers' desire to stop you messing with the phone. – Dan Hulme Aug 15 '17 at 14:48
  • Comments are not for extended discussion; this conversation has been moved to chat. – Dan Hulme Aug 15 '17 at 14:49
2

Is it possible to create a new recovery partition, and if so, how does it have to be done?

No, it is not possible... later Sony devices use what is called "Recovery in Boot" and recovery resides inside the boot partition... Makes it much more difficult to install TWRP or other custom recovery or software because a custom boot image (kernel) is required.

Or is it possible to flash a custom ROM without this partition?

Yes you can, in fact it is a requirement since stock software won't work with TWRP installed (the boot image fails validation, at least last time I looked), because there is a way to patch the boot partition and install TWRP.

So is the question how to install TWRP? No, that isn't really it either because with a locked bootloader you cannot.

This is a journey you can take with help in a more relevant place... I already answered your questions as asked, but will give you some references to start reading about all the steps required.

Unlock bootloader

Official TWRP information

Install TWRP and FOTAkernel

  • Thank you. There are customs ROMs out there that seem to work even with locked bootloader. So there should be a way to achieve this. Unfortunately, the download links are dead :-( – atarax42 Aug 15 '17 at 7:59
  • I found a new download source of a tool that claims to bring recoveries to an Xperia SP with locked bootloader. Since it is a third party product I am a little hesitant about using it. Can anyone make a statement about its trustworthiness, maybe from viewing the code? – atarax42 Aug 15 '17 at 18:45
  • @atarax42 That is the old Clockwork Mod Recovery that is deprecated over a year ago... I would suggest reading through the links I provided. – acejavelin Aug 15 '17 at 18:57
  • Unlock bootloader: The device does not allow me to unlock my bootloader, because the rooting status is set to 'Bootloader unlock allowed: No'. The Sony website confirms this. Instead I flashed TWRP to the FOTAKernel partition using the dd method with adb as mentioned on the TWRP website. But adb reboot recovery does not boot TWRP but the stock firmware. I tried TWRP 3.0.2 and 3.1.1 with same result. – atarax42 Aug 15 '17 at 20:58
  • That command won't work because there's no recovery partition in the first place. The FOTAKernel recovery will only get booted when 1) the kernel supports it (which rules out stock kernel), and 2) you press VOLUME during bootup when LED lights up. – Andy Yan Aug 17 '17 at 4:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.