[RECOVERY][YotaPhone2][Lollipop][ROOT]Modified YotaPhone 2 Stock Recovery for ROOT

Search This thread

SteadyQuad

Senior Member
Jun 9, 2015
51
55
YotaPhone 2 ROOT with modified stock recovery​

NOTE:
Check out the more functional TWRP recovery for YotaPhone 2.


Since not much dev work is happening on the YotaPhone 2, I though I'd kick off by publishing a recovery image that will hopefully allow you to root your YotaPhone 2 device with lollipop, and e.g. make partition backups.

First off: Disclaimer!
I am not responsible for damaged or bricked devices. If you follow instructions in this post, then YOU are making the choice to tinker with your device, and you are likely to void your warranty by doing so. You might even damage or brick your device, so ask yourself if the benefits outweigh the risks, because after proceeding you are pretty much on your own.


What is it?
It's a slightly modified stock recovery that allows to install packages signed with testkeys, plus adb root access and busybox for e.g. shell. That's it.

What can you do with it?
- adb root & shell access (e.g. to manually backup partitions or modify system files)
- install update zips signed with testkeys (e.g. SuperSU) in addition to original Yota Devices software
- root your device

What can it NOT do?
- probably can NOT install unsigned zips (must be signed by YD (like fota update zips), OR signed with standard testkeys)
- no fancy features, just boring AOSP stock recovery as included in stock firmware
- installing of apks/zips only through adb sideload, not from (emulated) SD card


What do you need?
- YotaPhone 2 (YD201) with Lollipop 5.0, I used firmware 1.39 YMMV with other versions
- Some technical confidence
- USB cable with a PC or laptop on one end

Steps overview:
1) First read the whole post to understand what's going to happen
2) backup (sync stuff, copy photos off, use a backup app etc, use search if unsure how to)
3) Unlock the bootloader
4) Install adb and fastboot if not yet installed. (For Windows look e.g. here, for linux the fastest is probably to install Android SDK with platform tools, see here If this is not enough info to get you started, please use xda search!)
5) Download recovery image: yd201_reco_139_testkeys_v01.img
6) boot the recovery image
7) root the device by sideloading SuperSU,

Unlocking bootloader:
Warning 1: It is currently not known how to re-lock the bootloader. (fastboot oem lock just hangs). This means you cannot completely undo the next step as of yet. This might have consequences for sending the device in for repairs, if they check for this, and deem it a (warranty) problem.
Warning 2: on some devices unlocking the bootloader wipes the device clean to factory defaults. I didn't see this happening on my YD201, but be warned, backup first!
On Linux:
Code:
sdk/platform-tools$ sudo ./fastboot oem unlock
...
OKAY [  0.002s]
finished. total time: 0.002s

On Windows:
Code:
C:\android-sdk-windows\platform-tools>fastboot oem unlock
...
OKAY [  0.002s]
finished. total time: 0.002s

Maybe Windows will install some extra drivers in the process.

BOOT the recovery image:
a) First: put the device in fastboot/download mode:
method 1: Power off with USB cable disconnected, then hold volume down key while inserting USB cable (which should already be in your PC on the other end).
method 2: do a
Code:
adb reboot bootloader
You should see a black screen with a tiny white: downloading...
b) boot the recovery image:
On linux:
Code:
sdk/platform-tools$ sudo ./fastboot devices
Should show a connected device in fastboot mode, then proceed:
Code:
sdk/platform-tools$ sudo ./fastboot boot <path>/<to>/yd201_reco_139_testkeys_v01.img
Where <path>/<to>/yd201_reco_139_testkeys_v01.img is the path you downloaded the image file to (e.g. ~/Download/yd201_reco_139_testkeys_v01.img)

On Windows:
copy the yd201_reco_139_testkeys_v01.img file to the folder with fastboot.exe (here assuming C:\android-sdk-windows\platform-tools, and D:\downloads as download location for the img)
* snippet below is fabricated, but you get the idea
Code:
D:\>C:
C:\>cd C:\android-sdk-windows\platform-tools
C:\android-sdk-windows\platform-tools>fastboot.exe devices
Should show a connected device in fastboot mode, then proceed:
Code:
C:\android-sdk-windows\platform-tools>copy D:\downloads\yd201_reco_139_testkeys_v01.img .       [i]note the dot at the end[/i
C:\android-sdk-windows\platform-tools>fastboot.exe boot yd201_reco_139_testkeys_v01.img

Hopefully you see the screen go completely black after a few seconds, and recovery menu will appear. Like stock recovery, it will show an error (E:Cannot load volume /misc) but you can ignore that, along with the 'error' triangle icon that goes with it.
If booting fails with a signature error, the bootloader is probably not properly unlocked, try again.
Note that this recovery image could be flashed too (I haven't actually tried to flash yet), but if you're cautious (as we are in this post) you can just boot it every time you need it.

SuperSU flashing:
1) download Chainfire's SuperSU flashable zip from this page, filename is:UPDATE-SuperSU-v2.46.zip
2) Assuming you're still in custom recovery, otherwise boot into custom recovery again as outlined above
3) choose "apply update from ADB" from the menu (choose with volume up/down keys, confirm with power key). Recovery now waits for a file.
4) on the connected PC:
on Linux:
Code:
sdk/platform-tools$ adb sideload <path>/<to>/UPDATE-SuperSU-v2.46.zip
on Windows:
Code:
D:\>C:
C:\>cd C:\android-sdk-windows\platform-tools
C:\android-sdk-windows\platform-tools>copy D:\downloads\UPDATE-SuperSU-v2.46.zip .
C:\android-sdk-windows\platform-tools>adb.exe sideload UPDATE-SuperSU-v2.46.zip
5) on the phone you should see SuperSU installing.
6) reboot when done
7) if SuperSU app is not visible in launcher, download & install SuperSU from playstore.

To verify if rooting worked, start SuperSU. If that looks OK, start an app that requires root (like e.g. betterbatterystats) or use a simple checkroot app from the store. Reboot and check again if it persisted.

NOTE: you could also FLASH this image, replacing the stock recovery on the recovery partition permanently (until you flash again). Above we're just BOOTing it once, next time entering recovery in the standard way will just load the stock recovery from the recovery partition). You would use fastboot flash instead of fastboot boot above. Flashing is UNTESTED.

Problems & FAQ
Q: It doesn't work!!1!
A: Please provide plenty of detail about error messages, which step, what versions etc. Without providing any detail you'll look silly.

Q: I don't know how to <backup/adb/download/reboot/flash>
A: Please use the search button, xda forums have lots of info

Q: How can I tell if I'm in stock recovery or modded stock recovery? They look the same!
A: The Droid error icon with the triangle in the centre of the modded recovery screen has some white text (yd201_cr0.1), the stock one doesn't.

Future development
I hope that there are some devs out there willing to work on the YotaPhone 2 in the near future. I'll try to tinker a bit every now and then, but I cannot promise anything as I'm no expert. To enable proper development of custom ROMs and better recoveries (e.g. TWRP) it would be great if Yota Devices released their Kernel sourcecode for the kernel they use in their YotaPhone 2 ROMs. I know they have been asked to release sources before (and they should in order to comply with the GPL license), but so far without response.
Good news is that You Can Help! Please stimulate Yota to publish Kernel sourcecode for YotaPhone 2 through their support page (hint: choose 'sales' as category, otherwise you'll have to enter lots of details. Be polite!).

Info::
Mod by: SteadyQuad
Version: 0.1 based on YD stock recovery 5.0 1.39 EU
Thanks to: Yota Devices for a great device, Jeopardy for testing and suggestions, Chainfire for SuperSU

Created: 2015-06-10
Last Updated: 2015-06-20 (added warning about current inability to re-lock bootloader)
 
Last edited:

Jeopardy

Senior Member
Jan 24, 2007
156
72
As SteadyQuad already mentioned, I can confirm that this method works.
Bye bye Google Newsstand! Goodbye Google Books!
(When uninstalling system apps Lollipop handles a bit differently from Kitkat, and I had to always restart the device after deleting.)

Thank you very much for your effort SteadyQuad.
 
  • Like
Reactions: zencooler

zencooler

Senior Member
Jul 9, 2008
789
247
Xiaomi Mi 11 Ultra
Allelujah! ;)
Thanks SteadyQuad for this great job! It works like a charm!
:good:
Anybody tried to install xposed module on rooted Yotaphone2? (alpha 4 modules)?
I think it little bit risky that's why I'm asking...
Or maybe somebody know how to make a full backup Yotaphone (like in CWM)?

Thanks in advance again for a really great job!
 

Jeopardy

Senior Member
Jan 24, 2007
156
72
Allelujah! ;)
Thanks SteadyQuad for this great job! It works like a charm!
:good:
Anybody tried to install xposed module on rooted Yotaphone2? (alpha 4 modules)?
I think it little bit risky that's why I'm asking...
Or maybe somebody know how to make a full backup Yotaphone (like in CWM)?

Thanks in advance again for a really great job!

I haven't tried testing xposed yet, but am planning to sooner or later.
Running that custom recovery we do have root level access to everything, so it should be possible to create a backup from there with the help of a computer. Have to look into this.
 

Gojira-r32

Senior Member
Jan 1, 2013
162
27
zero and ones
the recovery download doesn't work.
EDIT : it worked on laptop :)

How about somebody can compile a TWRP recovery because Yotaphone has posted there SDK ?
So we can make Nandroid backup.
 
Last edited:

Gojira-r32

Senior Member
Jan 1, 2013
162
27
zero and ones
a question : if you can modify stock recovery,

can't you compile from TWRP source and yotaphone SDK a TWRP recovery for the yotaphone 2 users ?

just my 2 cents, i evenly willing to pay for it
 

adamo86

Senior Member
Mar 5, 2009
1,383
119
Can the bootloader be re locked And can the root be removed for warranty purposes

Sent from my YD201 using Tapatalk
 

dai75

Member
Feb 26, 2007
25
1
Good work. A pity Xposed framework isn't compatible yet.

Sent from my YD201 using XDA Free mobile app
 

SteadyQuad

Senior Member
Jun 9, 2015
51
55
Can the bootloader be re locked And can the root be removed for warranty purposes

Sent from my YD201 using Tapatalk

I haven't been able to re-lock it when I last tried (fastboot oem lock just hung). If anyone did succeed to lock, let us know! (Gojira-r32: did you actually execute the fastboot oem lock?)
 

dai75

Member
Feb 26, 2007
25
1
I also failed to lock it back . I wanted to install the new update 1.44 that arrive in France but it failed at the recovery stage. E:Error in cache/update/yota....zip (status 7)
I did a wipe cache partition but not a wipe data as I don't want to lose all my settings. Anyone achieved to install the new Yota update version? And then root?
 

adamo86

Senior Member
Mar 5, 2009
1,383
119
I just updated to latest update in UK. But I tried Kingo no success still.

Sent from my YD201 using Tapatalk
 

dai75

Member
Feb 26, 2007
25
1
Has anyone the stock recovery image? Maybe I'll achieve to get the OTA update after unrooting my YD201 with the original stock recovery firmware.
 

Gojira-r32

Senior Member
Jan 1, 2013
162
27
zero and ones
stock recovery, boot, sustem img, unrooted, everything tried

also got other build, fixed that.

now yotaphone is completly stock and get :

error in update zip "status 7"

so i think this update is no good, some faults in it, that's why we can't flash it yet, also chaged some things in OTA and resigned it etc... no good
 

Jeopardy

Senior Member
Jan 24, 2007
156
72
stock recovery, boot, sustem img, unrooted, everything tried

also got other build, fixed that.

now yotaphone is completly stock and get :

error in update zip "status 7"

so i think this update is no good, some faults in it, that's why we can't flash it yet, also chaged some things in OTA and resigned it etc... no good

Did you try to flash the OTA update via adb sideload in the modified recovery? I'm having the same problem.
Edit: I just tried to flash the update via adb sideload - no joy. I got the following error:
Package expects build fingerprint of YotaPhone/yotaphone2/yotaphone2:5.0/LRX21M/5.0.0-EU1.1.39:user/release-keys or Yotaphone/yotaphone2/yotaphone2:5.0/LRX21M/5.0.0-EU1.1.44:user/release-keys; this device has Yotaphone/yotaphone2/yotaphone:5.0/LRX21M/5.0
E:Error in /sideload/package.zip
(Status 7)


I also tried resigning the package with testkeys, but that didn't work either. Same error. So something has changed in the rooting process, because some people in the forum have managed to update normally, presumably on their nonrooted devices.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 14
    YotaPhone 2 ROOT with modified stock recovery​

    NOTE:
    Check out the more functional TWRP recovery for YotaPhone 2.


    Since not much dev work is happening on the YotaPhone 2, I though I'd kick off by publishing a recovery image that will hopefully allow you to root your YotaPhone 2 device with lollipop, and e.g. make partition backups.

    First off: Disclaimer!
    I am not responsible for damaged or bricked devices. If you follow instructions in this post, then YOU are making the choice to tinker with your device, and you are likely to void your warranty by doing so. You might even damage or brick your device, so ask yourself if the benefits outweigh the risks, because after proceeding you are pretty much on your own.


    What is it?
    It's a slightly modified stock recovery that allows to install packages signed with testkeys, plus adb root access and busybox for e.g. shell. That's it.

    What can you do with it?
    - adb root & shell access (e.g. to manually backup partitions or modify system files)
    - install update zips signed with testkeys (e.g. SuperSU) in addition to original Yota Devices software
    - root your device

    What can it NOT do?
    - probably can NOT install unsigned zips (must be signed by YD (like fota update zips), OR signed with standard testkeys)
    - no fancy features, just boring AOSP stock recovery as included in stock firmware
    - installing of apks/zips only through adb sideload, not from (emulated) SD card


    What do you need?
    - YotaPhone 2 (YD201) with Lollipop 5.0, I used firmware 1.39 YMMV with other versions
    - Some technical confidence
    - USB cable with a PC or laptop on one end

    Steps overview:
    1) First read the whole post to understand what's going to happen
    2) backup (sync stuff, copy photos off, use a backup app etc, use search if unsure how to)
    3) Unlock the bootloader
    4) Install adb and fastboot if not yet installed. (For Windows look e.g. here, for linux the fastest is probably to install Android SDK with platform tools, see here If this is not enough info to get you started, please use xda search!)
    5) Download recovery image: yd201_reco_139_testkeys_v01.img
    6) boot the recovery image
    7) root the device by sideloading SuperSU,

    Unlocking bootloader:
    Warning 1: It is currently not known how to re-lock the bootloader. (fastboot oem lock just hangs). This means you cannot completely undo the next step as of yet. This might have consequences for sending the device in for repairs, if they check for this, and deem it a (warranty) problem.
    Warning 2: on some devices unlocking the bootloader wipes the device clean to factory defaults. I didn't see this happening on my YD201, but be warned, backup first!
    On Linux:
    Code:
    sdk/platform-tools$ sudo ./fastboot oem unlock
    ...
    OKAY [  0.002s]
    finished. total time: 0.002s

    On Windows:
    Code:
    C:\android-sdk-windows\platform-tools>fastboot oem unlock
    ...
    OKAY [  0.002s]
    finished. total time: 0.002s

    Maybe Windows will install some extra drivers in the process.

    BOOT the recovery image:
    a) First: put the device in fastboot/download mode:
    method 1: Power off with USB cable disconnected, then hold volume down key while inserting USB cable (which should already be in your PC on the other end).
    method 2: do a
    Code:
    adb reboot bootloader
    You should see a black screen with a tiny white: downloading...
    b) boot the recovery image:
    On linux:
    Code:
    sdk/platform-tools$ sudo ./fastboot devices
    Should show a connected device in fastboot mode, then proceed:
    Code:
    sdk/platform-tools$ sudo ./fastboot boot <path>/<to>/yd201_reco_139_testkeys_v01.img
    Where <path>/<to>/yd201_reco_139_testkeys_v01.img is the path you downloaded the image file to (e.g. ~/Download/yd201_reco_139_testkeys_v01.img)

    On Windows:
    copy the yd201_reco_139_testkeys_v01.img file to the folder with fastboot.exe (here assuming C:\android-sdk-windows\platform-tools, and D:\downloads as download location for the img)
    * snippet below is fabricated, but you get the idea
    Code:
    D:\>C:
    C:\>cd C:\android-sdk-windows\platform-tools
    C:\android-sdk-windows\platform-tools>fastboot.exe devices
    Should show a connected device in fastboot mode, then proceed:
    Code:
    C:\android-sdk-windows\platform-tools>copy D:\downloads\yd201_reco_139_testkeys_v01.img .       [i]note the dot at the end[/i
    C:\android-sdk-windows\platform-tools>fastboot.exe boot yd201_reco_139_testkeys_v01.img

    Hopefully you see the screen go completely black after a few seconds, and recovery menu will appear. Like stock recovery, it will show an error (E:Cannot load volume /misc) but you can ignore that, along with the 'error' triangle icon that goes with it.
    If booting fails with a signature error, the bootloader is probably not properly unlocked, try again.
    Note that this recovery image could be flashed too (I haven't actually tried to flash yet), but if you're cautious (as we are in this post) you can just boot it every time you need it.

    SuperSU flashing:
    1) download Chainfire's SuperSU flashable zip from this page, filename is:UPDATE-SuperSU-v2.46.zip
    2) Assuming you're still in custom recovery, otherwise boot into custom recovery again as outlined above
    3) choose "apply update from ADB" from the menu (choose with volume up/down keys, confirm with power key). Recovery now waits for a file.
    4) on the connected PC:
    on Linux:
    Code:
    sdk/platform-tools$ adb sideload <path>/<to>/UPDATE-SuperSU-v2.46.zip
    on Windows:
    Code:
    D:\>C:
    C:\>cd C:\android-sdk-windows\platform-tools
    C:\android-sdk-windows\platform-tools>copy D:\downloads\UPDATE-SuperSU-v2.46.zip .
    C:\android-sdk-windows\platform-tools>adb.exe sideload UPDATE-SuperSU-v2.46.zip
    5) on the phone you should see SuperSU installing.
    6) reboot when done
    7) if SuperSU app is not visible in launcher, download & install SuperSU from playstore.

    To verify if rooting worked, start SuperSU. If that looks OK, start an app that requires root (like e.g. betterbatterystats) or use a simple checkroot app from the store. Reboot and check again if it persisted.

    NOTE: you could also FLASH this image, replacing the stock recovery on the recovery partition permanently (until you flash again). Above we're just BOOTing it once, next time entering recovery in the standard way will just load the stock recovery from the recovery partition). You would use fastboot flash instead of fastboot boot above. Flashing is UNTESTED.

    Problems & FAQ
    Q: It doesn't work!!1!
    A: Please provide plenty of detail about error messages, which step, what versions etc. Without providing any detail you'll look silly.

    Q: I don't know how to <backup/adb/download/reboot/flash>
    A: Please use the search button, xda forums have lots of info

    Q: How can I tell if I'm in stock recovery or modded stock recovery? They look the same!
    A: The Droid error icon with the triangle in the centre of the modded recovery screen has some white text (yd201_cr0.1), the stock one doesn't.

    Future development
    I hope that there are some devs out there willing to work on the YotaPhone 2 in the near future. I'll try to tinker a bit every now and then, but I cannot promise anything as I'm no expert. To enable proper development of custom ROMs and better recoveries (e.g. TWRP) it would be great if Yota Devices released their Kernel sourcecode for the kernel they use in their YotaPhone 2 ROMs. I know they have been asked to release sources before (and they should in order to comply with the GPL license), but so far without response.
    Good news is that You Can Help! Please stimulate Yota to publish Kernel sourcecode for YotaPhone 2 through their support page (hint: choose 'sales' as category, otherwise you'll have to enter lots of details. Be polite!).

    Info::
    Mod by: SteadyQuad
    Version: 0.1 based on YD stock recovery 5.0 1.39 EU
    Thanks to: Yota Devices for a great device, Jeopardy for testing and suggestions, Chainfire for SuperSU

    Created: 2015-06-10
    Last Updated: 2015-06-20 (added warning about current inability to re-lock bootloader)
    5
    Dear friends,

    Did anybody tried to install new firmware? There is a version 1.60 already available (5.0.0-EU1.1.60.zip). Here are images:
    ftp://fw.ydevices.com/YotaPhone2/Firmwares/EU/
    I have a question what is the best way to install it if I have modded recvovery (TWRP) installed?
    Do I need to use Yotaflasher and flash just everything without boot.img, cache.img and userdata.img?
    If I do like this I have everything back to stock + my personal data and then I need install TWRP and root again? Is this a way I should proceed or there is a some simpler way (e.g. flashing via TWRP etc.)

    Thanks in advance for an advice and feedback regarding 1.60 firmware (if tested).

    I've been running 1.60 for some days now (alternating it with my own very raw and buggy initial AOSP builds ;) and I've had no problems with it.

    I did not use the specific zip you mentioned to install 1.60, yours is specifically for use with Yotaflasher. (probably manual fastboot flash install would work too).

    First of all: use TWRP to make a backup of system, boot and data (and preferably copy the backup off of your phone to a PC)

    I didn't use Yotaflasher myself before, but if it lets you choose the partitions, you could try flashing boot.img (with kernel in it) and system.img (with Android in it) only, to keep your data and apps. I wouldn't select emmc_appsboot.mbn or recovery.mbn to make sure you don't lose TWRP. Then flash supersu (firstly) and xposed (secondly) afterwards. Installing of Xposed needs supersu, so install that first.

    If however Yotaflash does not allow to select individual partitions, then you will probably loose everything by flashing this zip (including your backup if you didn't copy it off of your phone!). So take a backup to be sure anyway, a well invested 15 minutes.

    edit:
    That's what you get for writing TL;DR answers: Gojira-r32 beat me to it. :p

    edit2:
    Here's a flashable zip of the EU1 1.60 ROM (you can just install it from within TWRP, unlike the zip zencooler mentioned. I used this one myself)

    edit3:
    For non-rooted users it's probably easiest just to update officially over-the-air (if automatic update checking is off, check settings, about phone, system updates -> check for update)
    4
    i am running on 1.60 from this night,

    unroot, flash stock recovery, use yotaflasher with all files.
    boot to twrp recovery flash SU zip, reboot, optimize all apps, reboot and flash TWRP recovery if you whant it always

    no problems here, rooted and all, but can see in software that there are small changes
    3
    SteadyQuad you are simply the best :)
    I will use this flashable zip as it is the simplest way for rooted phone with TWRP.
    How did you find this flashable zip???

    Once again big thanks!

    My memory is a bit hazy as to where I found it, but it's signed by Yota, so it's not some random shady zip. :angel:

    To keep this thread on-topic: I plan to release a new TWRP recovery image with minor tweaks: I left a debugging flag in alpha2, and maybe try to get mtp to work.
    2
    Okay, finally updated to 1.44.

    Here's how to do it safely if you are rooted.
    1. Do a full unroot from SuperSU and restart your device. (Settings - Full unroot)
    2. Download yotaphone2_flasher.exe from here: ftp://fw.ydevices.com/YotaPhone2/YotaPhoneFlasher
    3. Install the flasher and use the utility to download the original Lollipop firmware. Pay attention when it asks for region.
    4. Turn off your device and plug the usb in while holding volume down -button. It will enter the download-mode.
    5. Flash the device using the flasher-tool. MAKE SURE TO ANSWER "NO" WHEN IT ASKS IF YOU WANT TO FLASH USER-PARTITION. OTHERWISE YOU WILL LOSE YOUR STUFF!
    6. Wait for the flashing to complete (takes ~5 minutes) and for your phone to restart.
    7. Download the OTA update from your device normally (Settings - About phone - System update) and install it.

    Now I'm going to try to root the device again using this modded recovery method. Wish me luck.

    Edit: Root successful.