FORUMS
Remove All Ads from XDA

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

51 posts
Thanks Meter: 55
 
By SteadyQuad, Member on 10th June 2015, 11:05 AM
Post Reply Email Thread
20th June 2015, 12:17 PM |#21  
Senior Member
Thanks Meter: 72
 
More
I wonder if we could modify the updater-script, then repackage the whole update and then flash it via adb sideload in the modified recovery? Because the updater-script starts like this:
ui_print("Verifying current system...");
getprop("ro.build.fingerprint") == "YotaPhone/yotaphone2/yotaphone2:5.0/LRX21M/5.0.0-EU1.1.39:user/release-keys" ||
getprop("ro.build.fingerprint") == "YotaPhone/yotaphone2/yotaphone2:5.0/LRX21M/5.0.0-EU1.1.44:user/release-keys" ||
abort("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 " + getprop("ro.build.fingerprint") + ".");


So basically if those lines were to... disappear... then the update process should just skip that check...
Is it possible? Can the update be modified and repackaged?

Edit: Now that I further investigated the file, for me the update fails on the fingerprint check if it's tried to flash via adb sideload. If the OTA process is allowed to do it's job normally, the update process halts to this line:
(range_sha1("/dev/block/platform/msm_sdcc.1/by-name/system", "2,0,1") == "20cf74300e388ef1140796901a2c8a2e8a423ead") || abort("/dev/block/platform/msm_sdcc.1/by-name/system has been remounted R/W; reflash device to reenable OTA updates");
So... Any idea what it means? What's going wrong?

Edit2: Ok. I can confirm that the updater-script can be modified and then be executed. Basically all the checks on system-partition have to be removed. I did not, however, dare to go through with this. Mostly because I am not fully comfortable making these changes and rather not try these out on a 700 euro phone. If it successfully updates some of the images, but fails on the others, it might just brick the device.

If someone wants to try out, download the OTA update on your phone, grab the .zip from /cache/update/, modify the updater-script in folder \META-INF\com\google\android\ inside the .zip, sign the package again with testkeys following SteadyQuad's instructions, and finally try to flash the zip via adb sideload from the customized recovery from the opening post of this thread. Easy, right?

I think the safest method to do this would be to restore the system partition to it's original (Read-only) state and then try the OTA update normally. Any idea where one could find the original system.img for lollipop?

Edit3: My monologue continues: to answer my own question, the Lollipop firmware can be found here.
 
 
20th June 2015, 03:43 PM |#22  
Senior Member
Thanks Meter: 72
 
More
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.
The Following 2 Users Say Thank You to Jeopardy For This Useful Post: [ View ] Gift Jeopardy Ad-Free
20th June 2015, 03:46 PM |#23  
adamo86's Avatar
Senior Member
Thanks Meter: 122
 
More
Quote:
Originally Posted by Jeopardy

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/Yot...e2_flasher.exe
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.

The link is dead

Sent from my YD201 using Tapatalk
20th June 2015, 03:51 PM |#24  
Senior Member
Thanks Meter: 72
 
More
Quote:
Originally Posted by adamo86

The link is dead

Sent from my YD201 using Tapatalk

Hmm.. Not for me. Try accessing the ftp from here instead: http://filemare.com/en-fi/browse/5.2...taPhoneFlasher
The Following User Says Thank You to Jeopardy For This Useful Post: [ View ] Gift Jeopardy Ad-Free
20th June 2015, 04:00 PM |#25  
Gojira-r32's Avatar
Senior Member
Flag zero and ones
Thanks Meter: 20
 
Donate to Me
More
needs to be stock recovery.

i got it, stock recovery, wipe cache, and flash stock system.img, reboot,
you will get the anoying yotahub demo etc, when done, look for OTA update and install, DONE

next root
20th June 2015, 04:02 PM |#26  
Senior Member
Thanks Meter: 72
 
More
Quote:
Originally Posted by Gojira-r32

needs to be stock recovery.

i got it, stock recovery, wipe cache, and flash stock system.img, reboot,
you will get the anoying yotahub demo etc, when done, look for OTA update and install, DONE

next root

The flasher utility will flash pretty much everything back to stock: boot, cache, recovery, system, radio and optionally userdata.
20th June 2015, 04:05 PM |#27  
Gojira-r32's Avatar
Senior Member
Flag zero and ones
Thanks Meter: 20
 
Donate to Me
More
not tru,

it will only flash what you put in the folder "firmware", if you put only boot.img and nothing else in that folder, it will only flash boot.

so for the update only put recovery and system.img + system.map in that folder.
Flash it, reboot and download+install update, done
20th June 2015, 04:11 PM |#28  
Senior Member
Thanks Meter: 72
 
More
Ah, yes. But by default it will flash everything if you just download the firmware with the tool and don't touch it.

But on a different topic: This update does not look good. Now my battery usage counter estimates only 5 hours of use for my almost full battery. Used to be 5 days... I think I might rollback to the previous update.
20th June 2015, 04:37 PM |#29  
adamo86's Avatar
Senior Member
Thanks Meter: 122
 
More
Is the Eu firmware same as uk

Sent from my YD201 using Tapatalk
20th June 2015, 04:44 PM |#30  
Senior Member
Thanks Meter: 72
 
More
Quote:
Originally Posted by adamo86

Is the Eu firmware same as uk

Sent from my YD201 using Tapatalk

My guess is yes, but to be sure check what your current build is. Settings - About phone - Build number. The region code should be part of the build number, i.e. EU1.1.39.
20th June 2015, 04:48 PM |#31  
adamo86's Avatar
Senior Member
Thanks Meter: 122
 
More
Quote:
Originally Posted by Jeopardy

My guess is yes, but to be sure check what your current build is. Settings - About phone - Build number. The region code should be part of the build number, i.e. EU1.1.39.

is it EU
Click image for larger version

Name:	uploadfromtaptalk1434815301922.png
Views:	422
Size:	138.1 KB
ID:	3371252

Sent from my YD201 using Tapatalk
Post Reply Subscribe to Thread

Tags
lollipop, recovery, root, supersu, yotaphone2

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes