This guide is only for the Fire TV 2 2015 (not stick) codenamed "sloane" with mt8173.
This will flash correct partitions and TWRP into it.
This WILL NOT clean RPMB neither will unlock the device.
I am not responsable of any physical damage in your device, YOU choose to make this modifications.
NOTE: Full unlock has been released, please refer to this thread: https://forum.xda-developers.com/t/unlock-root-twrp-unbrick-firetv-2-sloane.4222331/
NOTE: You will need to open the device so be prepared
NOTE: This will flash 5.6.2.8 images meaning RPMB will be updated.
MATERIAL NEEDED:
Linux based system.
USB A-A Cable.
Something conductive (paperclip, tweezers, etc).
Something to open the device.
- Install python3, PySerial, adb, fastboot:
Code:
sudo apt update
sudo add-apt-repository universe
sudo apt install python3 python3-serial adb fastboot
- Uninstall/disable modemmanager:
Code:
sudo apt remove modemmanager
PROCEDURE:
0. Open up the device. You can use a pick or a kinfe or any special tool to open it up.
1. Locate DAT0 in the attatched image. You will need to flip the motherboard.
2. Download amonet-mt8173-sloane from downloads and unpack it.
3. Open the unpacked folder of amonet, open a terminal inside it and type:
Code:
sudo ./bootrom-step.sh
4. Wait until you see something like:
Code:
[2019-02-07 14:35:59.478924] Waiting for bootrom
5. Once that message shows up, connect the A-A cable but not the power supply. After that, prepare the short and at same time you short DAT0 with GND, plug in the power supply to the wall.
6. The script will ask you to remove the short. When this happens, stop shorting DAT0 and then press enter.
7. Wait until it finishes.
8. The device should now reboot into TWRP. Please, consider now flashing a prerooted ROM or LineageOS 12.1 for get full TWRP.
NOTES:
In lsusb boot-rom shows up as:
Code:
Bus 001 Device 009: ID 0e8d:0003 MediaTek Inc. MT6227 phone
If you see:
Code:
Bus 001 Device 013: ID 0e8d:2000 MediaTek Inc. MT65xx Preloader
means you're in preloader mode. Try shorting again.
If somehow you have a corrupt gpt (shouldn't happen), just run:
Code:
sudo ./gpt-fix.sh
If TWRP freezes, DON'T UNPLUG THE THE POWER SUPPLY, instead, open an adb shell session and type the following command to restart TWRP:
Code:
killall recovery
Please, your bootloader is still LOCKED. If you flash custom kernels/unsigned boots (i.e: Magisk Manager, etc) the bootloader will refuse to load the boot image and you will be not able to boot in TWRP anymore unless you re-unbrick the device.
THANKS:
- @CFKod for his patience and for test the script
- @retyre & @k4y0z for the initial port to mt8173
- @xyz` for his original exploit for the HD8 2018.
- @Sus_i for locate DAT0, DAT1 and DAT2.
- @rbox for TWRP/Boot menu.
DOWNLOAD:
amonet-sloane-v1.3.zip (Or attachments)
Source Code: https://github.com/R0rt1z2/amonet/tree/mt8173-sloane
Brick no more!!
thank you for your patience and knowledge.
My brick was because I wiped system.
I've added another photo, I simply shorted against the metal hole circled in the picture. This is so useful, it not only unbricks, it allows for downgrade of preloader
Meaning I was then able to resolve my lack of system with @rbox unbrick image.
Also it's so much quicker than flashing via mediatek inject. Wooooo
Rortiz2 said:
8. Now your device should start booting back to FireOS. Mount it and enjoy your unbricked TV.
Click to expand...
Click to collapse
Looks good. :good:
I suppose if step 8 (reboot to system) fails for someone, i.e. something in /system is messed up, the old unbrick solution from @rbox comes handy, in order to flash a system?
Don't know, don't own that box, but maybe it's possible to add a 'flash TWRP to recovery partition' to your unbrick solution? As last point, instead of boot system, boot to recovery... Then users could flash the latest prerooted rom from @rbox, and skip the old unbrick solution? Just a thought... as I said, I don't know details about that box.
Edit: probably flash TWRP won't work, since the bootloader isn't unlocked?
Sus_i said:
Looks good. :good:
I suppose if step 8 (reboot to system) fails for someone, i.e. something in /system is messed up, the old unbrick solution from @rbox comes handy, in order to flash a system?
Don't know, don't own that box, but maybe it's possible to add a 'flash TWRP to recovery partition' to your unbrick solution? As last point, instead of boot system, boot to recovery... Then users could flash the latest prerooted rom from @rbox, and skip the old unbrick solution? Just a thought... as I said, I don't know details about that box.
Click to expand...
Click to collapse
Sure. I can use MISC flags for boot to recovery.
But the question is: Does the twrp can be loaded with newest preloader?
Also if my memory is OK, I remember it's a ramdisk
Cheers.
Rortiz2 said:
Sure. I can use MISC flags for boot to recovery.
But the question is: Does the twrp can be loaded with newest preloader?
Also if my memory is OK, I remember it's a ramdisk
Cheers.
Click to expand...
Click to collapse
If I remember right, @k4y0z said that the recovery is flashed out of the boot.img at first boot... and if the TWRP solution is a ramdisk like on the first fireTV, then flashing a TWRP image to the recovery partition will probably not work. Don't know.
Sus_i said:
If I remember right, @k4y0z said that the recovery is flashed out of the boot.img at first boot... and if the TWRP solution is a ramdisk like on the first fireTV, then flashing a TWRP image to the recovery partition will probably not work. Don't know.
Click to expand...
Click to collapse
Correct. TWRP is actually a ramdisk.cpio.
rbox flashes it using his 2ndinit script which needs to be runned with "su".
This script, simply put SeLinux in permissive mode and boots TWRP at every boot:
https://github.com/androidrbox/firetv-2ndinit/blob/master/jni/2ndinit.c
As you said, flashing the ramdisk directly into /recovery partition will not work since in needs to be signed.
Cheers.
Rortiz2 said:
Correct. TWRP is actually a ramdisk.cpio.
rbox flashes it using his 2ndinit script which needs to be runned with "su".
This script, simply put SeLinux in permissive mode and boots TWRP at every boot:
https://github.com/androidrbox/firetv-2ndinit/blob/master/jni/2ndinit.c
As you said, flashing the ramdisk directly into /recovery partition will not work since in needs to be signed.
Cheers.
Click to expand...
Click to collapse
Ok. I know that from the 1gen stick/box.
Maybe there is a way to (push and) boot that recovery ramdisk as last step with your script, in order to have the option for flashing the latest prerooted?
Don't know... If you could manage that somehow, you can add the [ROOT] tag into the thread headline
@rbox, what do you think?
Sus_i said:
Ok. I know that from the 1gen stick/box.
Maybe there is a way to (push and) boot that recovery ramdisk as last step with your script, in order to have the option for flashing the latest prerooted?
Don't know... If you could manage that somehow, you can add the [ROOT] tag into the thread headline
@rbox, what do you think?
Click to expand...
Click to collapse
Yeah it will be pretty nice.
If we can't, we can downgrade preloader, run unbrick image via Preloader and then run a second part of the script that restores correct preloader.
Idk, just for throw ideas.
I added source code in the second post for rbox.
Cheers.
Rortiz2 said:
This guide is only for the Fire TV Stick 2 codenamed "sloane" with mt8173.
Click to expand...
Click to collapse
Sloane it's Fire TV 2 Gen, not Stick
Kramar111 said:
Sloane it's Fire TV 2 Gen, not Stick
Click to expand...
Click to collapse
Thanks
@Sus_i I think I have an idea
https://forum.xda-developers.com/fire-tv/orig-development/firetv-2-recovery-installer-t3309785
That installer will help us since it talks with the preloader.
Well, I've a added an argv in the main.py that allows you to downgrade the preloader in order to be able to use rbox tools.
After the downgrade, the scripts reboots the TV and immediatelly it starts with the .sh by rbox that injects the necessary files into the /system/partition.
This is what should do the (let's say step-1.sh). When it finishes, the idea is that the user can run bootrom-step.sh to restore new preloader (shorting again obv) and allow the device to boot with the injected TWRP
What do you think?
Best regards!
Rortiz2 said:
@Sus_i I think I have an idea
https://forum.xda-developers.com/fire-tv/orig-development/firetv-2-recovery-installer-t3309785
That installer will help us since it talks with the preloader.
Well, I've a added an argv in the main.py that allows you to downgrade the preloader in order to be able to use rbox tools.
After the downgrade, the scripts reboots the TV and immediatelly it starts with the .sh by rbox that injects the necessary files into the /system/partition.
Click to expand...
Click to collapse
Yeah, sounds good, if the system is in good condition it should work fine.
If system is somewhat corrupt, maybe by an interrupted or failed update or so, I don't know if it will work.
Maybe we think to complex. I assume the amonet script can flash all partitions!? Why not flash a whole new system with that.
Since the prerooted rom is in sparse image format and the updater script does all the rooting stuff after flashing, we can't use that.
But maybe it's possible to write a dd image of a allready rooted /system partition with the amonet script.
Just an idea, don't know if that will work.
Sus_i said:
Yeah, sounds good, if the system is in good condition it should work fine.
If system is somewhat corrupt, maybe by an interrupted or failed update or so, I don't know if it will work.
Maybe we think to complex. I assume the amonet script can flash all partitions!? Why not flash a whole new system with that.
Since the prerooted rom is in sparse image format and the updater script does all the rooting stuff after flashing, we can't use that.
But maybe it's possible to write a dd image of a allready rooted /system partition with the amonet script.
Just an idea, don't know if that will work.
Click to expand...
Click to collapse
/system doesn't need to be ok. We need a working boot.img that loads the 2ndinit.
We can't flash a system with bootROM, it will take 1 day lol.
Take this commit as reference:
https://github.com/R0rt1z2/amonet/commit/339bb4ab2055507f2ed72ebea3861dbdfef67484
Rortiz2 said:
/system doesn't need to be ok. We need a working boot.img that loads the 2ndinit.
We can't flash a system with bootROM, it will take 1 day lol.
Take this commit as reference:
https://github.com/R0rt1z2/amonet/commit/339bb4ab2055507f2ed72ebea3861dbdfef67484
Click to expand...
Click to collapse
lol, as I said, don't know if that is possible with the amonet script
Yeah, if the boot.img will load 2ndinit, i.e. the recovery, that should do the trick fine :good:
Sus_i said:
lol, as I said, don't know if that is possible with the amonet script
Yeah, if the boot.img will load 2ndinit, i.e. the recovery, that should do the trick fine :good:
Click to expand...
Click to collapse
Let's see if we can try today.
Also it will require to copy the ramdisk recovery to an external usb or external sd.
Regards!
Rortiz2 said:
Let's see if we can try today.
Also it will require to copy the ramdisk recovery to an external usb or external sd.
Regards!
Click to expand...
Click to collapse
Yes, have seen it on github, but both is possible with the second gen FireTV box... only the usb port could be a problem, if usb debugging is enabled (but I don't know if debugging is aviable at this early stage?).
Sus_i said:
Yes, have seen it on github, but both is possible with the second gen FireTV box... only the usb port could be a problem, if usb debugging is enabled (but I don't know if debugging is aviable at this early stage?).
Click to expand...
Click to collapse
I don't think usb debugging is aviable at Preloader Stage
Basically would be this:
Format the sdcard/usb and copy the .cpio on it, then insert sdcard/usb into the TV.
Run first step:
Code:
sudo ./step-1.sh
It will downgrade preloader & inject 2ndinit.
After that, you disconnect the tv and run bootrom-step for restore working imgs:
Code:
sudo ./bootrom-step.sh
After that will reboot and since we have 2ndinit as pppd it will boot in TWRP.
From there you flash prerooted ROM and you're done
That's my idea but maybe doesn't work.
Cheers.
Rortiz2 said:
That's my idea but maybe doesn't work.
Cheers.
Click to expand...
Click to collapse
Sounds and looks good. :good:
I'm confident that it will work :fingers-crossed:
only sad thing is that I can't test it
Hey @Rortiz2, thanks for this! My sloane has been bricked for a few months after trying to root - this script ran & uploaded the boot.img to the device, but unfortunately it still won't boot (flashing with amazon logo).
I tried using your twrp test, but that results in terminal hanging at the below:
I was hoping I could get twrp running & then flash a pre-rooted image so that it clears whatever's wrong with the unit, but as above, I don't seem to be able to get it to boot
Any ideas?
Edit: welp, after cancelling the terminal command she now won't boot at all, lol... no signs of life but I'll keep this updated if I get can resurrect her.
Related
Hi all. Quick notice:
Usual disclaimers apply.
This is an Unsecure boot.img I made for Android 4.2 on the Nexus 4.
Okay cool... but what is an insecure boot.img?
An insecure boot.img allows the device to be booted with permissions to be mounted as root. This is a way of being able to push SuperSU/Superuser.apk to /system/app and the Su Binaries to /bin
adb shell
su
mount -o remount,rw /system
exit
See more here: External Link
_____________________________________________________________________________________________________________
To use this you must be unlocked, not familar with unlocking a Nexus device? Easy. In fastboot mode type "fastboot oem unlock" this wipes all data on the device (virtual sd included).
A nice article regarding this thread was published here: http://www.addictivetips.com/android/root-google-nexus-4-install-clockworkmod-recovery/
To boot this boot.img:
must be in the platform-tools folder in the android-sdk
must be in fastboot mode (power+vol-)
First use: fastboot boot "boot.img" (no ")
Why boot? I have not tested this image as I don't have a Nexus 4 as of yet.**
**Some users report flashing the image makes the phone in need of a fastboot stock flashing session, stick to booting for now.
Thank you for helping!
-fkrone
-Ranguvar
-USSENTERNCC1701E
This is mainly for development purposes to obtain root on this device, it will be an easier process when a recovery is published and you can flash a su.zip. (see attached)
DOWNLOAD HERE: http://www.androidfilehost.com/?fid=9390169635556426389
Note, this is in Nexus 7 folder as Nexus 4 does not have its own atm.
Click to expand...
Click to collapse
Please Lock!
Placeholder reserve
Harry GT-S5830 said:
Anyone able to get me recovery.fstab from recovery image and ill try make a cwm6 touch recovery for us.
I wouldn't be lazy and do it myself but PC is off
Sent from a phone
Click to expand...
Click to collapse
sgs2ext4 doesn't work on the recovery.img and the image isn't mountable by itself in Windows.
Too lazy to reboot into Linux, for now.. any other way to crack it open?
Ranguvar said:
sgs2ext4 doesn't work on the recovery.img and the image isn't mountable by itself in Windows.
Too lazy to reboot into Linux, for now.. any other way to crack it open?
Click to expand...
Click to collapse
Pull it apart in hex editor
Sent from my HTC Explorer A310e using xda app-developers app
Harry GT-S5830 said:
Anyone able to get me recovery.fstab from recovery image and ill try make a cwm6 touch recovery for us.
Sent from a phone
Click to expand...
Click to collapse
I've got the recovery.img, can I get the .fstab out without loop mounting? I don't have a linux machine set up right now.
USSENTERNCC1701E said:
I've got the recovery.img, can I get the .fstab out without loop mounting? I don't have a linux machine set up right now.
Click to expand...
Click to collapse
Old fashioned HxD
See here: http://forum.xda-developers.com/showthread.php?t=443994
I could probably do it without this, but it probably wouldn't mount data/media (what emulates the SD) so it would be relatively useless as that's where zips are
Also this might prove useful: http://forum.xda-developers.com/showthread.php?t=1494036 (requires Cygwin or Linux environment)
Harry GT-S5830 said:
Old fashioned HxD
See here: http://forum.xda-developers.com/showthread.php?t=443994
Click to expand...
Click to collapse
Hell, I wouldn't trust myself to rip it out with a hex editor. I'm setting up a VM right now, but I could just upload the recovery.img for you. I pulled it out of the stock image that google uploaded today.
USSENTERNCC1701E said:
Hell, I wouldn't trust myself to rip it out with a hex editor. I'm setting up a VM right now, but I could just upload the recovery.img for you. I pulled it out of the stock image that google uploaded today.
Click to expand...
Click to collapse
Cheers, that's where I had mine but I corrupted it :/ ill try pull it apart on the 600MHz wonder pico
Or perhaps not... 3.2" is too small for hex
Harry GT-S5830 said:
Cheers, that's where I had mine but I corrupted it :/ ill try pull it apart on the 600MHz wonder pico
Or perhaps not... 3.2" is too small for hex
Click to expand...
Click to collapse
Lol, I'm having a hell of a time getting Slax as a cooperative VM, might have to go all out with ubuntu
Got it!
Thanks for the tutorials. It was just fun to to something short after midnight (Germany). I was a little bit bored Would be nice if you can mention me in the people helped to create this recovery
http://www.mediafire.com/?mlv72phch1tgd5y Mediafire-Mirror
Dammit, beat me to it!
Serves me right for making dinner first
http://ompldr.org/vZ2ExYQ/recovery.fstab
Can i ask something as a future buyer of nexus 4 and older user of another phone...the fastboot is the "bootloader" (pink screen on my older phone) the state of the phone where i can connect it to my computer and see the folder containing the recovery.img boot.img...etc???
pikachukaki said:
Can i ask something as a future buyer of nexus 4 and older user of another phone...the fastboot is the "bootloader" (pink screen on my older phone) the state of the phone where i can connect it to my computer and see the folder containing the recovery.img boot.img...etc???
Click to expand...
Click to collapse
That's not quite how it works. These .img files we are talking about are pictures of the stock version of those paritions. Try reading this article for an explanation of Android partitioning.
There is also a great graphic here. The site is in Spanish, I haven't used Google to translate it, but the picture there is in English. Take your time with it, there's a lot of info there.
To get into Fastboot mode, do you just hold the volume down button while powering on? Never used a Nexus device before. Have been strictly on HTC up until now. I'm picking up my Nexus 4 in the morning and don't mind trying, as long as there's a way to undo anything in case something goes wrong.
Stryder5 said:
To get into Fastboot mode, do you just hold the volume down button while powering on? Never used a Nexus device before. Have been strictly on HTC up until now. I'm picking up my Nexus 4 in the morning and don't mind trying, as long as there's a way to undo anything in case something goes wrong.
Click to expand...
Click to collapse
Or you can enable adb and
Code:
adb reboot bootloader
The command
Code:
fastboot boot boot.img
is temporary. All it does is boot, one time only, the image you specify. Once you've mounted system as rw however, everything you do in /system before rebooting is permanent.
USSENTERNCC1701E said:
Or you can enable adb and
Code:
adb reboot bootloader
The command
Code:
fastboot boot boot.img
is temporary. All it does is boot, one time only, the image you specify. Once you've mounted system as rw however, everything you do in /system before rebooting is permanent.
Click to expand...
Click to collapse
So does adding the su binaries and the superuser apk give you permanent root after this then?
And exactly what binaries are needed to gain root? I've never gained root using that method before so am a little unfamiliar in this territory.
Stryder5 said:
So does adding the su binaries and the superuser apk give you permanent root after this then?
And exactly what binaries are needed to gain root? I've never gained root using that method before so am a little unfamiliar in this territory.
Click to expand...
Click to collapse
Woops, wrong thread.
Yes, if you push the su binary from a superuser flashable zip to /system/bin/ and chmod 0655, plus the superuser apk, you will have permanent root after.
Also, there is a recovery.img now, so you can test that out, if it works, flash it from fastboot, then flash a superuser zip from that recovery.
Thank you for getting it (recovery.fstab), looks like someone beat me to it though!
Sorry for late response I have to sleep as I'm in last school year
Ill cook up a recovery just to make your efforts worthwhile
It's in OP, its probably 99.9% the same as the other guys so i'm not going to make duplicate thread, use who evers recovery you wish.
____________________________________________________________________________________________________________________________________
Reason I say fastboot boot first is because it allows you to boot the image without permanently (well, unless you flash another over) flashing a partition without knowing it works.
Booted fine when I ran fastboot boot boot.img, but when I actually flashed it, it's giving me a boot loop now Booting back into fastboot shows secure boot still enabled. Any suggestions? Or do you have the original bootloader image?
Stryder5 said:
Booted fine when I ran fastboot boot boot.img, but when I actually flashed it, it's giving me a boot loop now Booting back into fastboot shows secure boot still enabled. Any suggestions? Or do you have the original bootloader image?
Click to expand...
Click to collapse
Not at my comp now or I'd upload it, bit of you rip open the fa Tory image from the Google servers you should find it
---------- Post added at 02:44 PM ---------- Previous post was at 02:43 PM ----------
On a side note, what possessed you to do that?
Preamble
As the title suggests, I had a Nexus 5 running stock Android 5.0, with root and TWRP, and wanted to update to Android 5.0.1 (without losing all my data, of course). I couldn't find any guides for my particular circumstances, so after working out how to do it myself, I thought I'd share my method.
Note: This guide is not for the uninitiated. Be prepared to Google something for yourself if you don't understand it.
Prerequisites
Before starting this guide, you should have:
A Nexus 5 that running stock Android. The presence of root/Xposed/custom recovery (maybe custom kernels?) shouldn't be relevant, but I can't vouch for the efficacy of this guide if you've done something obscure to your install.
Android SDK tools, specifically the ADB and fastboot binaries. Additional USB drivers may be required on Windows.
The factory image for the Android version you are currently running.
1. Uninstall root and other /system modifications
If you have rooted your Android, and/or installed BusyBox, Xposed or other modifications to /system, you will need to uninstall these modifications. Failing to do so will cause the OTA to complain that there's something funky going on in your /system partition.
You may be able to manually uninstall each of these modifications, but this was not enough for my install – doing a ‘Full unroot’ in SuperSU still left behind files in /system. The easiest way to uninstall all /system modifications is to reflash the /system partition.
Extract the Nexus 5 factory image (e.g. hammerhead-lrx21o-factory-01315e08.tgz), yielding a directory with files such as flash-all.bat and image-hammerhead-XXXXXX.zip. Do not use the flash-all script, as this will unnecessarily wipe all data on the device.
Extract the image-hammerhead-XXXXXX.zip file, specifically the system.img file.
Open a command prompt/terminal window.
Connect the phone to the computer with a USB cable.
Boot the phone into the bootloader.
Method 1: Power down the phone, then hold VolUp + VolDn + Power until the phone boots into the bootloader.
Method 2: From the terminal, run adb reboot bootloader while the phone is still powered on.
From the terminal, run fastboot flash system /path/to/system.img.
2. Uninstall any custom recovery
Custom recoveries don't seem to support OTA updates, making it necessary to uninstall the custom recovery by reflashing the stock recovery.
Extract the recovery.img file from the factory image, as in Part 1.
Open a command prompt/terminal window, connect the phone to the computer, and boot into the bootloader, as in Part 1.
From the terminal, run fastboot flash recovery /path/to/recovery.img.
Optional: Reflash boot.img and/or cache.img
Some users have reported that reflashing system.img was not sufficient, and that reflashing boot.img and/or cache.img was also necessary. I did not have this problem, but if you do:
Extract the boot.img and/or cache.img files from the factory image, as in Part 1.
Open a command prompt/terminal window, connect the phone to the computer, and boot into the bootloader, as in Part 1.
From the terminal, run fastboot flash boot /path/to/boot.img.
From the terminal, run fastboot flash cache /path/to/cache.img.
3. Apply the OTA update
The simple part. In the bootloader, use the VolUp/VolDn buttons to select ‘Start’, then press the Power button, to reboot into Android. Follow the system update instructions to install the OTA update.
4. Reflash the custom recovery and re-root
Also self-explanatory.
Hey,
I just wanted to say thanks. This totally fixed the problem I was having. I also want to add that after I flashed the system.img, I was getting errors related to "EMMC:/dev/block/platform/msm_sdcc.1/by-name/boot" with a bunch of numbers after. I googled it and found I had to also flash boot.img, and after that, the OTA worked fine. I would assume if anyone else gets errors like this, they should flash whatever img it shows in the error (ie: mine said /by-name/boot so I flashed boot.img).
-BGM
It worked for me
I've always been using a toolkit for my rooting purposes, I have done Full Unroot on SuperSU, but still getting an error when trying to update to 5.0.1
Will flashing stock wipe everything(whatsapp image, camera's,messages, etc etc)on my phone?
azlan96 said:
I've always been using a toolkit for my rooting purposes, I have done Full Unroot on SuperSU, but still getting an error when trying to update to 5.0.1
Will flashing stock wipe everything(whatsapp image, camera's,messages, etc etc)on my phone?
Click to expand...
Click to collapse
I also had problems using ‘Full Unroot’ in SuperSU. It's not actually as ‘full’ as it sounds.
Flashing a full factory image would normally wipe everything, but carefully following this guide will only reset the /system partition, not any user data.
I'd like to say thank you very much! I was looking for this kind of tutorial... I encountered an error while following all the steps because I forgot I had a custom kernel. So I wanted to add that if you have a custom kernel remember to do the same steps as described above for the kernel (return to stock) and then follow the system and recovery steps afterwards.
If you don't like running commands in terminal you can use Nexus Root Toolkit, on advanced, you have all the commands you need available.
Thank you very much RunasSudo
Taiyo85 said:
I'd like to say thank you very much! I was looking for this kind of tutorial... I encountered an error while following all the steps because I forgot I had a custom kernel. So I wanted to add that if you have a custom kernel remember to do the same steps as described above for the kernel (return to stock) and then follow the system and recovery steps afterwards.
If you don't like running commands in terminal you can use Nexus Root Toolkit, on advanced, you have all the commands you need available.
Thank you very much RunasSudo
Click to expand...
Click to collapse
I have my ADB and Fastboot ok as confirmed by nexus root toolkit, but I am not sure on how to use terminal.. I launched command prompt but it doest recognise all the commands..
Tried Flash Stock + Unroot on Nexus Root Toolkit but the software will crash (fastboot.exe has stopped responding)
I am really clueless on what to do next..
azlan96 said:
I have my ADB and Fastboot ok as confirmed by nexus root toolkit, but I am not sure on how to use terminal.. I launched command prompt but it doest recognise all the commands..
Tried Flash Stock + Unroot on Nexus Root Toolkit but the software will crash (fastboot.exe has stopped responding)
I am really clueless on what to do next..
Click to expand...
Click to collapse
Flash Stock + Unroot wipes everything and defeats the purpose of the tutorial made by RunasSudo
First and foremost you should download Android SDK (Tools only) on http://developer.android.com/sdk/index.html and then ask to install the extra: Google USB Driver.
With Nexus Root Toolkit you don't need terminal, click on advanced and you should see options to flash through fastboot the system only, recovery and kernel. It is pretty straighforward and it asks where the .img are in your computer
Thanks! This guide worked.
For Ubuntu users, you need to install adb and fastboot with these commands :
sudo add-apt-repository ppahablet-team/tools && sudo apt-get update (optional)
sudo apt-get install android-tools-adb android-tools-fastboot
Thanks for the great step by step.
As with some of the other posters, re-flashing system.img was not enough for me, I had to also re-flash the boot.img. Once that was done, I had no problems side loading the update and am now running LRX22C.
I only seem to fiddle with adb once a year - when it OTA time comes - and can never seem to remember some of the steps that need to be taken. Reading through some of the other threads, I have a feeling a lot of people who rooted/custom recovery and cant do the OTA are going to be doing complete image re-flashes when this guide makes that completely unecessary.
thanks again,
.d
BananasGoMoo said:
I googled it and found I had to also flash boot.img, and after that, the OTA worked fine.
Click to expand...
Click to collapse
datcon said:
As with some of the other posters, re-flashing system.img was not enough for me, I had to also re-flash the boot.img.
Click to expand...
Click to collapse
Thanks for the feedback! I've added a note about boot.img to the OP.
+1 for flashing boot.img worked perfect after I did that.
I tried with this tutorial. I flashed system and recovery and then restart. Confirm OTA but I get ERROR.
Then I flashed boot as it was described. Now I don't get OTA In About phone, I'm still on 5.0.0, Check for updates now don't find update
Any idea?
UPDATE - UPDATE: After hour now it is here ... super, it works.
This walkthrough was most helpful! Ended up replacing the boot.img as well since I had ElementalX installed. My apps are optimizing as we speak. Thank you!
Worked for me. What a hassle!
Here is a summary of the process for those looking for a less wordy procedure, with a few added steps:
Download Nexus 5 5.0 (LRX21O) file (note: NOT 5.0.1 yet) https://developers.google.com/android/nexus/images
Unzip via 7-zip multiple times in order to get boot.img, recovery.img, system.img
Enable USB debugging: http://www.kingoapp.com/root-tutorials/how-to-enable-usb-debugging-mode-on-android-5-lollipop.htm
Plug phone into PC > cmd prompt where adb is installed > type "adb devices" to ensure connection is valid (will need to authorize via popup on phone > then "adb devices" should return your device id and "device"; if it says "unauthorized" then look for the popup on your phone)
adb reboot bootloader
Put system.img, recovery.img, and boot.img in same folder as fastboot.exe
Run commands:
fastboot flash system system.img
fastboot flash recovery recovery.img
fastboot flash boot boot.img
fastboot erase cache (this is optional. I didn't have to do it, but you might)
Use Volume Up/Down to select Start > press Power Button to reboot
Update via Settings > About Phone > System Update
Re-flash TWRP recovery:
Get the file from here: http://forum.xda-developers.com/showpost.php?p=57580889&postcount=1
adb reboot bootloader
fastboot flash recovery openrecovery-twrp-2.8.1.0-hammerhead.img
Paul22000 said:
Worked for me. What a hassle!
Here is a summary of the process for those looking for a less wordy procedure, with a few added steps:
1. Download Nexus 5 5.0 (LRX21O) file (note: NOT 5.0.1 yet) https://developers.google.com/android/nexus/images
2. Unzip via 7-zip multiple times in order to get boot.img, recovery.img, system.img
3. Enable USB debugging: http://www.kingoapp.com/root-tutorials/how-to-enable-usb-debugging-mode-on-android-5-lollipop.htm
4. Plug phone into PC > cmd prompt where adb is installed > type "adb devices" to ensure connection is valid (will need to authorize via popup on phone > then "adb devices" should return your device id and "device"; if it says "unauthorized" then look for the popup on your phone)
5. adb reboot bootloader
6. Put system.img, recovery.img, and boot.img in same folder as fastboot.exe
7. Run commands:
fastboot flash system system.img
fastboot flash recovery recovery.img
fastboot flash boot boot.img
8. Use Volume Up/Down to select Start > press Power Button to reboot
9. Update via Settings > About Phone > System Update
Click to expand...
Click to collapse
Maybe you could add `fastboot erase cache` as stepp 8.
gee2012 said:
Maybe you could add `fastboot erase cache` as stepp 8.
Click to expand...
Click to collapse
I added it to step 7, thanks. :good: I also cleaned up the formatting and added step 10 about re-flashing TWRP.
Loading problem
I flashed system, recovery & boot images strictly following the instructions, restarted the phone. It got stuck in loading where balls in four colors keep running for half an hour. Shall I keep waiting? I think there must be something wrong. Your advises are welcome.
guangy said:
I flashed system, recovery & boot images strictly following the instructions, restarted the phone. It got stuck in loading where balls in four colors keep running for half an hour. Shall I keep waiting? I think there must be something wrong. Your advises are welcome.
Click to expand...
Click to collapse
Try flash the partitions again. If it's still not working, you may need to reflash a factory image.
RunasSudo said:
Try flash the partitions again. If it's still not working, you may need to reflash a factory image.
Click to expand...
Click to collapse
I flashed the cache image as well, then the problem solved. Thanks
Hello, a few days ago my zenfone started acting up (again), with built in applications crashing randomly and failing to boot half of the times. I always managed to fix it downloading the firmware from Asus' website and re-upgrate it, but this time it didn't worked out quite well. It now refuses to boot (sometimes gets stucked at boot, simetimes I manage to have asus screen). Booting into recovery prints `E:mount fail, change path to mount /dev/block/mmcblk1`, then errors about cache partiton not being found.
I've tried pretty much anything that would not result in data loss:
Wiping cache doesn't report errors, but doesn't help either,
Flashing stock boot.img and droidboot.img don't report error, but doesn't help either,
Flashing TWRP to recovery reports success, but I still get stock recovery,
Sideload fails coz it doesn't find expected mounts
Adb shell doesn't work as it can't find `/system/bin/whatever`
`adb pull /proc/partitions` returns what looks like a legit partitions list for mmcblk0 to me
Does anyone know what else I can try to rescue the data on the phone?
WobLight said:
Hello, a few days ago my zenfone started acting up (again), with built in applications crashing randomly and failing to boot half of the times. I always managed to fix it downloading the firmware from Asus' website and re-upgrate it, but this time it didn't worked out quite well. It now refuses to boot (sometimes gets stucked at boot, simetimes I manage to have asus screen). Booting into recovery prints `E:mount fail, change path to mount /dev/block/mmcblk1`, then errors about cache partiton not being found.
I've tried pretty much anything that would not result in data loss:
Wiping cache doesn't report errors, but doesn't help either,
Flashing stock boot.img and droidboot.img don't report error, but doesn't help either,
Flashing TWRP to recovery reports success, but I still get stock recovery,
Sideload fails coz it doesn't find expected mounts
Adb shell doesn't work as it can't find `/system/bin/whatever`
`adb pull /proc/partitions` returns what looks like a legit partitions list for mmcblk0 to me
Does anyone know what else I can try to rescue the data on the phone?
Click to expand...
Click to collapse
When you flash TWRP and try to boot into recovery, have you tried using adb with "adb reboot" command?
Have you tried the "fastboot boot twrp.img" command"(with the TWRP file renamed to "twrp.img")? If you can get that to work, you can temporarily boot a TWRP session and then use it to make a nandroid backup.
Have you tried creating an adb backup, as described in the link below?
https://forum.xda-developers.com/galaxy-nexus/general/guide-phone-backup-unlock-root-t1420351
If you have corrupted partitions, you might not retrive anything, you might have no choice but to use an option that wipes, repartitions and flashes the device.
Sent from my LGL84VL using Tapatalk
Droidriven said:
When you flash TWRP and try to boot into recovery, have you tried using adb with "adb reboot" command?
Have you tried the "fastboot boot twrp.img" command"(with the TWRP file renamed to "twrp.img")? If you can get that to work, you can temporarily boot a TWRP session and then use it to make a nandroid backup.
Have you tried creating an adb backup, as described in the link below?
https://forum.xda-developers.com/galaxy-nexus/general/guide-phone-backup-unlock-root-t1420351
If you have corrupted partitions, you might not retrive anything, you might have no choice but to use an option that wipes, repartitions and flashes the device.
Sent from my LGL84VL using Tapatalk
Click to expand...
Click to collapse
thanks for suggestions,
adb backup doesn't work. It complains about /system/bin/sh not found (looks like either the partition isn't mounted or the failed update erased it).
fastboot boot doesn't work. I was messing with boot.img before, and I found out that intel's boot.img (my zenfone is x86) is not standard format. fastboot logs `creating boot image...`, I suspect it doesn't work at all for intel's. It reports 'booting OK' but the phone doesn't reboot at all.
fastboot flash recovery twrp.img returns OK but still stock recovery...
WobLight said:
thanks for suggestions,
adb backup doesn't work. It complains about /system/bin/sh not found (looks like either the partition isn't mounted or the failed update erased it).
fastboot boot doesn't work. I was messing with boot.img before, and I found out that intel's boot.img (my zenfone is x86) is not standard format. fastboot logs `creating boot image...`, I suspect it doesn't work at all for intel's. It reports 'booting OK' but the phone doesn't reboot at all.
fastboot flash recovery twrp.img returns OK but still stock recovery...
Click to expand...
Click to collapse
I have an intel atom tablet that I used this tool to boot TWRP then root and create nandroid backups with.
https://forum.xda-developers.com/android/development/intel-android-devices-root-temp-cwm-t2975096
There may be similar tools for your intel tablet, or maybe you can modify this tool or work out something similar.
There is another similar tool that I used on an intel based RCA Viking III tablet.
Sent from my LGL84VL using Tapatalk
Droidriven said:
I have an intel atom tablet that I used this tool to boot TWRP then root and create nandroid backups with.
https://forum.xda-developers.com/android/development/intel-android-devices-root-temp-cwm-t2975096
There may be similar tools for your intel tablet, or maybe you can modify this tool or work out something similar.
There is another similar tool that I used on an intel based RCA Viking III tablet.
Sent from my LGL84VL using Tapatalk
Click to expand...
Click to collapse
It worked!!! :victory:
Thank you so much for helping me out with this, I spent over a week trying to fix/backup data, I was going to give up.
After backing up things properly I'll play with it, see if I can have it booting again (maybe not stock system ).
WobLight said:
It worked!!! :victory:
Thank you so much for helping me out with this, I spent over a week trying to fix/backup data, I was going to give up.
After backing up things properly I'll play with it, see if I can have it booting again (maybe not stock system ).
Click to expand...
Click to collapse
Be careful, this tool is built to work on a lot of different devices with different hardware and different partitioning, the differences in partitions means that it cannot create or restore nandroid backups on all devices that the tool can boot on. Some intel devices that this tool works on can create and restore nandroid backups, some can't, it just depends on how the device is partitioned. It can also be used to flash ROMs on some devices but not on others.
This tool can boot a temporary recovery session on a lot of devices but not all of them can use all of the features in the recovery that it boots.
This difference in partitioning means that trying to restore a backup or flash a ROM can break some devices because the partitioning isn't right. So just be warned, you will be exposing your device to a certain amount of risk if you try using all of the features in the temporary recovery session.
Also, this tool was designed to boot a temporary recovery session on intel devices that have a locked bootloader, this recovery session can not flash ROMs on intel devices that have a locked bootloader, it can only be used to flash devices that have an unlocked bootloader. If your bootloader is locked, you'll brick your device if you attempt flashing a ROM on your device using this recovery session.
Sent from my LGL84VL using Tapatalk
Droidriven said:
Be careful, this tool is built to work on a lot of different devices with different hardware and different partitioning, the differences in partitions means that it cannot create or restore nandroid backups on all devices that the tool can boot on. Some intel devices that this tool works on can create and restore nandroid backups, some can't, it just depends on how the device is partitioned. It can also be used to flash ROMs on some devices but not on others.
This tool can boot a temporary recovery session on a lot of devices but not all of them can use all of the features in the recovery that it boots.
This difference in partitioning means that trying to restore a backup or flash a ROM can break some devices because the partitioning isn't right. So just be warned, you will be exposing your device to a certain amount of risk if you try using all of the features in the temporary recovery session.
Also, this tool was designed to boot a temporary recovery session on intel devices that have a locked bootloader, this recovery session can not flash ROMs on intel devices that have a locked bootloader, it can only be used to flash devices that have an unlocked bootloader. If your bootloader is locked, you'll brick your device if you attempt flashing a ROM on your device using this recovery session.
Sent from my LGL84VL using Tapatalk
Click to expand...
Click to collapse
Thank for your concern, I've backed up contents of the sdcard and data partition (other partitions fails to mount) to an external SD. Ofc sdcard contents are just copy/pasted, as for data partition I've checked and looks like I can open the twrp archives from linux. I'm gonna try to clone the whole mmcblk0 before trying anything weird tho .
WobLight said:
Thank for your concern, I've backed up contents of the sdcard and data partition (other partitions fails to mount) to an external SD. Ofc sdcard contents are just copy/pasted, as for data partition I've checked and looks like I can open the twrp archives from linux. I'm gonna try to clone the whole mmcblk0 before trying anything weird tho .
Click to expand...
Click to collapse
You might can modify the tool itself or the TWRP .img that is built into the tool to modify it to work with the way that your device is partitioned, that way it mounts, reads and writes those partitions correctly.
Sent from my LGL84VL using Tapatalk
Droidriven said:
You might can modify the tool itself or the TWRP .img that is built into the tool to modify it to work with the way that your device is partitioned, that way it mounts, reads and writes those partitions correctly.
Sent from my LGL84VL using Tapatalk
Click to expand...
Click to collapse
I've tried to use the twrp for z00d I have previously downloaded, I have to do some tweaking to make it boot. Even tho it looks like a newer version, console is crashing and partitions won't work anyway. Since stock recovery fails to mount cache I guess there's corruption somewhere on the device. I might have found the stock partitions.tbl, but if I manage to clone mmcblk0 to an external sd, I can perhaps mess with the image with linux and confirm whether is there's corruption.
WobLight said:
I've tried to use the twrp for z00d I have previously downloaded, I have to do some tweaking to make it boot. Even tho it looks like a newer version, console is crashing and partitions won't work anyway. Since stock recovery fails to mount cache I guess there's corruption somewhere on the device. I might have found the stock partitions.tbl, but if I manage to clone mmcblk0 to an external sd, I can perhaps mess with the image with linux and confirm whether is there's corruption.
Click to expand...
Click to collapse
Here is another tool that I used on an intel based RCA tablet, it might can be adapted to be used on your device if you know or can find out where the tool can be modified to work on your device.
https://forum.xda-developers.com/general/general/guide-rca-voyager-rct6873w42-unlock-t3582973
Sent from my LGL84VL using Tapatalk
Droidriven said:
Here is another tool that I used on an intel based RCA tablet, it might can be adapted to be used on your device if you know or can find out where the tool can be modified to work on your device.
https://forum.xda-developers.com/general/general/guide-rca-voyager-rct6873w42-unlock-t3582973
Sent from my LGL84VL using Tapatalk
Click to expand...
Click to collapse
Hello, I've tried a few more stuff today, by the looks of it, the device silently fails to write anything.
I've tried to use adb push to flash a fixed image to /dev/block/mmcblk0, tried fastboot flash, tried dd from the recovery, even tho it reports ok, nothing is actually written on the device. I've tried to rename a file in data (which does mount), but after unmounting/remounting the partition the file still have the old name.
Maybe I can try loading a system on the external sd instead, but that's it.
Thanks again for your help, I was able to recover the data which was actually my priority.
EDIT: partition command also fails
I couldn't find any guide for rooting the V40, so I thought I'd write down the steps I took to root my new EUR V40 - LMV405EBW. Maybe it will help others. Sorry if this is somewhat confusing, I didn't have time to make a polished version. It's basically made from my notes during the process with the commands copied from bash history.
-First, unlock the bootloader following LG's instructions here: https://developer.lge.com/resource/mobile/RetrieveBootloader.dev
There's no TWRP for the V40 and the one made for G7 doesn't work. I don't have the time and knowledge to even attempt to compile TWRP for the V40, so I proceeded with just patching an original boot image with Magisk.
You can get the patched boot images that I used from here:
Oreo 10e: boot_a_magisk_patched_10e.img
Oreo 20f: boot_a_magisk_patched_10f.img
Pie 20a: boot_a_magisk_patched_20a.img
Pie 20b: boot_a_magisk_patched_20b.img
Pie 20f: boot_a_magisk_patched_20f.img
Pie 20g: boot_a_magisk_patched_20g.img
Q 30b: boot_a_magisk_patched_30b.img (this requires flashing to the active boot partition).
Q 30c: boot_a_magisk_patched_30c.img (this requires flashing to the active boot partition)
Q 30d: boot_a_magisk_patched_30d.image (this may or may not work with "fastboot boot" and could require flashing to the active boot partition. I haven't tested if live boot still works. I just did fastboot flash boot_x img_file).
You can try to boot it with with fastboot if you have a LNV405EBW and skip the KDZ extraction part.
Installing Magisk:
Flashing this image isn't necessary, just straight boot should be sufficient and safe.
First install Magisk Manager 7 on the phone then connect the phone to the PC and run:
Code:
adb reboot bootloader
fastboot boot boot_a_magisk_patched_10e.img
After the phone boots the OS with the external boot image, open Magisk Manager and tap on Install. Select the option to Direct install to the active slot. I played it safe and decided to NOT flash also on the inactive slot. I've left it alone so I can use it in case of need of recovery.
You'll probably notice that you don't have a connection to the carrier. Just ignore it, it will back once the phone is booted normally.
Reboot and you will have permanent root until you switch the A/B slots.
In case my patched boot image doesn't work, you can just make your own.
Tools needed:
Magisk Manager 7.0.0 installed on the phone
LG Bridge installed on a Windows machine.
a Linux machine or VM (I used the latest ubuntu desktop), python3 with the zstandard module installed and kdztools from steadfasterX's repo. Maybe kdztools would work on Windows too, I haven't tried it.
adb, fastboot
You need to procure an original ROM file for your phone model. It can be downloaded easily with LG Bridge. Just connect the phone to a Windows PC, start LG bridge, go to the Software update tab and click on Update error recovery. Wait for the download to start and disconnect the phone. Ignore LG Bridge complains about not being able to flash after the downloading stage is completed. Don't click anything in Bridge and before closing it go to C:\Users\<your_username>\AppData\Local\LG Electronics\LG Bridge\SWUpgrade and copy your KDZ somewhere else. Preferably send it to the Linux VM to the LG work folder, it'll be needed there.
On Linux open a terminal:
Code:
cd ~/Documents
mkdir LG
cd LG
git clone https://github.com/steadfasterX/kdztools.git
cd kdztools
nano undz.py -c
For kdztools to be able to extract the V40 images, I needed to edit undz.py and comment the lines 88-90. So, this block should all be commented or undz will fail to extract the boot partitions.
Code:
#if len(dz_item['pad']) != 0:
# print("[!] Error: pad is not empty", file=sys.stderr)
# sys.exit(1)
To extract, with the KDZ copied to ~/Documents/LG/
Code:
cd ~/Documents/LG/kdztools
./unkdz.py -f ../V405EBW10e_00_OPEN_EU_DS_OP_0109.kdz -x
cd kdzextracted/
List the partitions contents and look for the IDs of boot_a and/or boot_b. In my case they were 44 for boot_a and 63 for boot_b
Code:
../undz.py -f V40510e_00.dz -l
Extract boot_a or boot_b or both, they're identical:
Code:
../undz.py -f V40510e_00.dz -s 44
../undz.py -f V40510e_00.dz -s 63
You can find the extracted boot images in the dzextracted subfolder. Get boot_a.image or boot_b.image or both from there and send them to the phone in a location accessible by Magisk Manager. The Download folder should do fine.
Open Magisk Manager and tap Install, select Patch Boot Image file and patch the image file(s) you extracted. Get the patched_boot.img that Magisk Manager saves in the Download folder and send it to a PC where you have adb and fastboot.
Go to the beginning of the post to the Installing Magisk section.
Damned tempting, but I'll wait until after Pie drops.
Sent from my LM-V405 using Tapatalk
Glad to see this, hopefully it's a start for all of us.
If anything, at least a way to unlock the bootloader via legitimate channels! Gonna be generating that string, next chance I get, to be ready.
Sent from my LM-V405 using Tapatalk
Once runningnak3d gets a hold of this, we should be good with the v40. Cool beans.
Hey do the unlock codes online work for $ 12-15 on sprint? I used to flash phones back in the day and got a great deal on a bad IMEI sprint lg v40, but so far I can see there isn’t a way yet. On top off all that I m in Europe and don’t want to get the error message that I m out of the Region. I would have to go to USA just to unlock the phone.
@runningnak3d
Can't I install the firmware on a different device?
V version can not unlock BL, so envious
Getting a boot image like that works but I find it stupid to not upload it so that the others don't have to do it. Besides only one model can be bl unlocked so there won't be any model mismatch (except firmware versions but keeping up with them is not that hard)
LameMonster82 said:
Getting a boot image like that works but I find it stupid to not upload it so that the others don't have to do it. Besides only one model can be bl unlocked so there won't be any model mismatch (except firmware versions but keeping up with them is not that hard)
Click to expand...
Click to collapse
Or I could find you stupid for not noticing the patched image is in my first post.
DLS123 said:
I find you stupid for not noticing the patched images are in my first post.
Click to expand...
Click to collapse
I recommend labeling the boot images with their firmware since future firmwares won't be able to run the same boot image but other than that I'm really sorry.
LameMonster82 said:
I recommend labeling the boot images with their firmware since future firmwares won't be able to run the same boot image but other than that I'm really sorry.
Click to expand...
Click to collapse
I mentioned in the description 1 line below the link that it's for 10e. There was no other update in a long time. I don't think there can be any confusion for now. I can edit and label the file when there's will be another fw update.
It looks like unlocking the bootloader breaks Widevine L1 on the V40 and downgrades is to L3. No more HD or UHD Netflix.
I couldn't find any other solution than to re-lock the bootloader to restore L1.
This doesn't happen on the V30.
@DLS123
Thank you for all!
I ask you for more details; i'm stuck at flashing first image in adb; it returns an error; have LMV405EBW with 10f. unlocked bootloader of course
Thx again for your support!
@daphix what do you mean by flashing the first image? You're not supposed to flash my patched boot image. Just boot it without flashing and Direct install Magisk from it with Magisk Manager.
DLS123 said:
@daphix what do you mean by flashing the first image? You're not supposed to flash my patched boot image. Just boot it without flashing and Direct install Magisk from it with Magisk Manager.
Click to expand...
Click to collapse
Thx for answer; i not have too much experience in working with Magisk;
i just folowed your steps:
First install Magisk Manager 7 on the phone then connect the phone to the PC and run:
adb reboot bootloader
fastboot boot patched_boot_a.img
when i run fastboot comand for flash, is runing, but is returning "an error at line x"
i suppose is something wrong in this instructions.
daphix said:
Thx for answer; i not have too much experience in working with Magisk;
i just folowed your steps:
First install Magisk Manager 7 on the phone then connect the phone to the PC and run:
adb reboot bootloader
fastboot boot patched_boot_a.img
when i run fastboot comand for flash, is runing, but is returning "an error at line x"
Anyway; understand now what to do;
Steps are below:
- first install magisk manager
- download magisk zip from magisk site or from magisk manager himself on phone
- download patched_boot_a.img to phone from our good contributor
- use magisk manager and select inslall image of patched_boot_a.img from phone
- magisk manager will generate a magisk patched image
- transfer this magisk patched image (not patched_boot_a.img) to pc in ADB folder
- flash with Adb this magisk patched image from pc to phone.
Thx to our friend!
---------- Post added at 09:53 AM ---------- Previous post was at 09:21 AM ----------
DLS123 said:
@daphix what do you mean by flashing the first image? You're not supposed to flash my patched boot image. Just boot it without flashing and Direct install Magisk from it with Magisk Manager.
Click to expand...
Click to collapse
Hi;
using Magisk mamanger and your file was generated a file: magisk_patched.img
pls support; trying to flash that image from PC with adb not work:
fastboot flash partition_a magisk_patched.img
Click to expand...
Click to collapse
@daphix
Whatver you're trying to do, is nowhere in the procedure I used. If you already booted with my boot image why are you making another boot image with Magisk and why are you trying to flash that? I never wrote anything of the sort.
if you booted with my patched image you already have temporary root and can use Magisk Manager to Direct install Magisk itself.
DLS123 said:
@daphix
Whatver you're trying to do, is nowhere in the procedure I used. If you already booted with my boot image why are you making another boot image with Magisk and why are you trying to flash that? I never wrote anything of the sort.
if you booted with my patched image you already have temporary root and can use Magisk Manager to Direct install Magisk itself.
Click to expand...
Click to collapse
Hi , thank you for reply;
I tried many combinations of your commands;
maybe due that am noob, but succesion below simply is not working:
First install Magisk Manager 7 on the phone then connect the phone to the PC and run:
adb reboot bootloader
fastboot boot patched_boot_a.img
Read this whole guide before starting.
This is for the 2nd gen Fire TV (sloane)
Current relase: amonet-sloane-v1.1
NOTE: This process does not require you to open your device if you're already rooted or you have TWRP.
NOTE: If something goes horribly wrong and your device gets bricked, you'll have to open it and unbrick it through bootrom (post 2).
NOTE: This process will modify the partition-table (GPT) of your device.
NOTE: Your device will be reset to factory defaults (including internal storage) during this process.
NOTE: Flashing prerooted ROM will disable unlocked TWRP. It's recommended to flash an stock update.bin until that gets sorted out.
To update to the current release if you are already unlocked, just flash the zip in TWRP.
What you need:
A Linux installation or live-system
A a-a cable
1. Download the attached zip-file "amonet-sloane-v1.1zip".
2. Copy the zip-file to the internal storage of the box or copy the zip-file to an external SD/USB storage and connect it to the box.
3. Reboot the FireTV to rbox's TWRP recovery and flash the zip-file.
NOTE: If you are on firmware 5.2.7.3 or newer, a downgrade is necessary, this requires bricking the device temporarily. (The screen won't come on at all)
If you chose the brick option, you need to continue with bootrom-step-minimal.sh:
NOTE: Please refer to the #2 post on how to prepare your environment before proceeding.
NOTE: If you use this method to unlock the device you don't need to flash the unlock-zip once you're in TWRP.
Once the zip-file finished flashing, disconnect the device and run:
Code:
sudo ./bootrom-step-minimal.sh
Then plug the device back in.
The device will reboot to hacked fastboot mode (Static Amazon White Logo + white blinking LED).
Then run:
Code:
sudo ./fastboot-step.sh
After that, the device will reboot to unlocked TWRP. Then go to Wipe > Format Data and type "YES".
You can now install Magisk from there.
Important information
NOTE: This has nothing to do with the unlock process.
You have 10 seconds to force TWRP to keep ADB over USB active by using
Code:
adb wait-for-recovery && adb shell setprop twrp.usb.mode 0
In the new partitioning scheme your boot/recovery-images will be in boot_x/recovery_x respectively, while boot/recovery will hold the exploit.
TWRP takes care of remapping these for you, so installing zips/images from TWRP will work as expected.
Don't flash boot/recovery images from FireOS (FlashFire, MagiskManager etc.) (If you do anyway, make sure you flash them to boot_x/recovery_x)
Should you accidentally overwrite the wrong boot, but your TWRP is still working, rebooting into TWRP will fix that automatically.
TWRP will prevent updates from overwriting LK/Preloader/TZ, so generally installing an update should work without issues (only full updates, incremental updates won't work).
For ROM developers there is still an option to overwrite these, which should only be done after thorough testing and if needed (LK should never be updated).
It is still advised to disable OTA.
Very special thanks to @k4y0z and @t0x1cSH for making all this possible by porting the LK exploit to sloane and implementing the RPMB-key derivation for sloane.
Special thanks also to @xyz` for making all this possible and releasing the original amonet exploit for karnak.
Special thanks also to @retyre for porting the bootrom-exploit to mt8173.
Special thanks also to @Sus_i and @DanielF50 for testing.
Special thanks also to @diplomatic for his wonderfull mtk-su, allowing you to unlock without opening the device.
Unbricking / Unlocking with non-rooted Firmware
Prepare the environment, disable modemmanager and install the required packages:
Code:
sudo apt update
sudo add-apt-repository universe
sudo apt install python3 python3-serial adb fastboot dos2unix
Code:
sudo systemctl stop ModemManager
sudo systemctl disable ModemManager
NOTE: If you use this method to unlock the device you don't need to flash the unlock-zip linked in the first post (OP).
If FireOS is still accessible there are other means of recovery, don't continue.
If your device shows one of the following symptoms:
It doesn't show any life (screen stays dark)
You see the white amazon logo, but cannot access FireOS.
If you have a Type 1 brick, you may not have to open the device, if your device comes up in bootrom-mode (See Checking USB connection below).
Unplug the device from the wall
Start bootrom-step.sh
Plug in the power source and then the USB
NOTE: If you have issues running the scripts, you might have to run them using sudo.
Also try using different USB-ports (preferably USB-2.0-ports)
1. Extract the attached zip-file "amonet-sloane-v1.1.zip" and open a terminal in that directory.
2. Start the script:
Code:
sudo ./bootrom-step.sh
It should now say Waiting for bootrom.
3. Connect the USB A-A cable, short the board according to the picture (DAT0 with GND), and connect the power supply.
4. When the script asks you to remove the short, remove the short and press enter.
5. Wait for the script to finish.
If it stalls at some point, stop it and restart the process from step 2.
6. Your device should now reboot into unlocked fastboot state.
7. Run
Code:
sudo ./fastboot-step.sh
8. Wait for the device to reboot into TWRP.
9. Format data and use TWRP to flash a custom ROM, Magisk or SuperSU.
Checking USB connection
In lsusb the boot-rom shows up as:
Code:
Bus 002 Device 013: ID 0e8d:0003 MediaTek Inc. MT6227 phone
If it shows up as:
Code:
Bus 002 Device 014: ID 0e8d:2000 MediaTek Inc. MT65xx Preloader
instead, you are in preloader-mode, try again.
dmesg lists the correct device as:
Code:
[ 6383.962057] usb 2-2: New USB device found, idVendor=0e8d, idProduct=0003, bcdDevice= 1.00
Unlocking with ADB + root
NOTE: Please refer to the #2 post on how to prepare your environment before proceeding.
1. Extract the attached zip-file "amonet-sloane-v1.0.1.zip" and open a terminal in that directory.
NOTE: If you are already rooted, continue with the next step, otherwise get mtk-su by @diplomatic from here and place (the unpacked binary) into amonet/bin folder
2. Enable ADB in Developer Settings.
3. Start the script:
Code:
sudo ./step-1.sh
Your device will now reboot into recovery and perform a factory reset.
NOTE: If you are on firmware 5.2.7.3 or newer, a downgrade is necessary, this requires bricking the device temporarily. (The screen won't come on at all)
If you chose the brick option, you need to continue with bootrom-step-minimal.sh:
NOTE: Please refer to the #2 post on how to prepare your environment before proceeding.
NOTE: If you use this method to unlock the device you don't need to flash the unlock-zip once you're in TWRP.
Once the zip-file finished flashing, disconnect the device and run:
Code:
sudo ./bootrom-step-minimal.sh
Then plug the device back in.
The device will reboot to hacked fastboot mode (Static Amazon White Logo + white blinking LED).
Then run:
Code:
sudo ./fastboot-step.sh
After that, the device will reboot to unlocked TWRP. Then go to Wipe > Format Data and type "YES".
If you used this method (brick), you're done with the unlock. Skip the step 4.
NOTE: Make sure you re-enable ADB after Factory Reset.
4. Start the script:
Code:
sudo ./step-2.sh
The exploit will now be flashed and your device will reboot into TWRP.
You can now install Magisk from there.
There are three options for interacting with TWRP:
A mouse/keyboard via USB
ADB over ethernet/USB
TWRP commandline via adb: https://twrp.me/faq/openrecoveryscript.html
Via /cache/recovery/command
Example for /cache/recovery/command:
Code:
echo "--update_package=/path/to/zipfile" > /cache/recovery/command
echo "--wipe_cache" >> /cache/recovery/command
reboot recovery
If you somehow end in a bootloop you can boot into hacked fastboot or recovery using.
Code:
sudo ./boot-fastboot.sh
Code:
sudo ./boot-recovery.sh
NOTE: This will only work if the boot-exploit is still there.
Source Code:
https://github.com/chaosmaster/amonet-sloane
https://github.com/R0rt1z2/android_device_amazon_sloane
https://github.com/chaosmaster/android_bootable_recovery
Reserved
Nice to see this released - it's been a while in the making... just glad that me and my multiple sloanes could be of service to the community
edit: obviously Magisk works with a full unlock, but as Rortiz2 states above this must be flashed to boot_x - I would advise you pull your ROM's boot.img, patch it with MagiskManager & then flash this manually via hacked fastboot, otherwise it won't work & you'll probably brick your device again.
DanielF50 said:
Nice to see this released - it's been a while in the making... just glad that me and my multiple sloanes could be of service to the community
Click to expand...
Click to collapse
Yeah I'll second that, It works perfect and flawlessly. Be sure to follow the guide to the letter ..... .... It's good to see development continue to make progress on what I would say is the best amazon device of them all.
Well done. All your hardwork is greatly appreciated. @k4y0z , @Rortiz2 , @t0x1cSH, @Sus_i , @retyre , @diplomatic @DanielF50 without you guys continued attention and testing of these sticks/boxes we would be stuck with plain old boring devices.
Cheers again
regards
DanielF50 said:
I would advise you pull your ROM's boot.img, patch it with MagiskManager & then flash this manually via hacked fastboot, otherwise it won't work & you'll probably brick your device again.
Click to expand...
Click to collapse
Don't worry, magisk flashing in TWRP works (now).
Time to pull the Sloanes out of the drawer!
Ok, so I ran into some issues. I flashed the zip in the pre-rooted TWRP. No errors and reboots into unlocked TWRP. From unlocked TWRP i format data and type yes, then reboot. Now i am at the black amazon fire logo and nothing happens. I think i missed or didnt understand the downgrading part to older than 5.2.7.3. So, i think i have to do the shorting method now? Also, does anyone know where i can find a old version <5.2.7.3 .bin to flash? Is there anyway to get back into unlocked TWRP now?
http://aftvhacks.de/downloads/rooting/fire-tv-2/sloane-5.2.7.0-rooted_r1.zip
http://aftvhacks.de/downloads/rooting/fire-tv-2/sloane-5.2.6.7-rooted_r1.zip
All here, scroll down
Fire TV & Fire TV Stick Downloads: APKs von Apps & Games
Fire TV Downloads Sammlung von Android Apps (APK-Dateien), die man herunterladen und auf dem Amazon Fire TV und Fire TV Stick 4k installieren kann.
aftvhacks.de
0815hoffi said:
http://aftvhacks.de/downloads/rooting/fire-tv-2/sloane-5.2.7.0-rooted_r1.zip
http://aftvhacks.de/downloads/rooting/fire-tv-2/sloane-5.2.6.7-rooted_r1.zip
All here, scroll down
Fire TV & Fire TV Stick Downloads: APKs von Apps & Games
Fire TV Downloads Sammlung von Android Apps (APK-Dateien), die man herunterladen und auf dem Amazon Fire TV und Fire TV Stick 4k installieren kann.
aftvhacks.de
Click to expand...
Click to collapse
Thanks, great resource. I am looking for stock though...
" NOTE: Flashing prerooted ROM will disable unlocked TWRP. It's recommended to flash an stock update.bin until that gets sorted out. "
Michajin said:
Ok, so I ran into some issues. I flashed the zip in the pre-rooted TWRP. No errors and reboots into unlocked TWRP. From unlocked TWRP i format data and type yes, then reboot. Now i am at the black amazon fire logo and nothing happens. I think i missed or didnt understand the downgrading part to older than 5.2.7.3. So, i think i have to do the shorting method now? Also, does anyone know where i can find a old version <5.2.7.3 .bin to flash? Is there anyway to get back into unlocked TWRP now?
Click to expand...
Click to collapse
If the zip flashed fine forget about the downgrading part. Are you able to boot unlocked TWRP using boot-recovery.sh?
Here's an stock update.bin: https://d1s31zyz7dcc2d.cloudfront.n...indle-full_sloane-36.6.4.8_user_648594820.bin
Rortiz2 said:
If the zip flashed fine forget about the downgrading part. Are you able to boot unlocked TWRP using boot-recovery.sh?
Here's an stock update.bin: https://d1s31zyz7dcc2d.cloudfront.n...indle-full_sloane-36.6.4.8_user_648594820.bin
Click to expand...
Click to collapse
yes, boot-recovery works perfect. That is exactly what I needed thanks!
In case someone needs some newer 'full OTA update' packages of the stock rom, only for sloane:
Fire OS 5.2.7.3 (652614020).
https://d1s31zyz7dcc2d.cloudfront.net/7af0a9a31621db60bf48d23e680751d3/update-kindle-full_sloane-36.6.5.2_user_652614020.bin
Fire OS 5.2.7.4 (656638420).
https://d1s31zyz7dcc2d.cloudfront.net/7758ad70f668023cc93ddee2655c6226/update-kindle-full_sloane-36.6.5.6_user_656638420.bin
Fire OS 5.2.7.6 (659654620).
https://d1s31zyz7dcc2d.cloudfront.net/c5b513d2116f5ad2942426ab79bb437b/update-kindle-full_sloane-36.6.5.9_user_659654620.bin
5.2.7.6 is the latest OS (as of today).
Don't forget to rename the file, i.e. .bin to .zip.
Sus_i said:
Don't worry, magisk flashing in TWRP works (now).
Click to expand...
Click to collapse
Oh, awesome news!
Hey guys, So do users of the new unlocked twrp to only use the clean update.bin files provided by @Sus_i and not the rbox prerooted stock (supersu) roms? Just to clarify for the sake of Magisk clashing with Supersu prerooted firmware incase it throws some nasty surprises.
Regards
Next OTA update incoming...
Full OTA update package (latest stock) for sloane:
Fire OS 5.2.7.7 (662663720).
https://d1s31zyz7dcc2d.cloudfront.net/b9f7c8f9a8a4ba1f34da8ce7a8077474/update-kindle-full_sloane-36.6.6.2_user_662663720.bin
Sus_i said:
Next OTA update incoming...
Full OTA update package (latest stock) for sloane:
Fire OS 5.2.7.7 (662663720).
https://d1s31zyz7dcc2d.cloudfront.net/b9f7c8f9a8a4ba1f34da8ce7a8077474/update-kindle-full_sloane-36.6.6.2_user_662663720.bin
Click to expand...
Click to collapse
5.2.7.7 yipeee
Seconds later bootloader is locked lol
I'm currently on 5.2.7.4 I think I'll stay there. This is the os before big A started messing with adb and accessibility (launchers) you can just disable launcher and firehomestarter apk provided there is a settings apk installed (hoffis is great).
lol