[TUT] Install [FireOS 5.4.0.1], ROOT & GAPPS

Search This thread

bibikalka

Senior Member
May 14, 2015
1,408
1,101
FireOS 5.2.2 preview (aka Lollipop 5.1) is captured and tested by siegesoldier, and appears to work fine. So the upgrade instructions are amended in order to explain how to go from the 5.2.0 preview to 5.2.2
 

DoLooper

Senior Member
Oct 1, 2014
771
336
Update3: time to update the instructions for 5.2.2.
Update2: siegesoldier has captured the FireOS 5.2.2 (Lollipop), and pretty much blazed the entire trail (go give him lots of thanks!) http://forum.xda-developers.com/fire-hd/general/lolipop-ota-capture-t3141810
I reinstalled TWRP yesterday and updated 5.2.0 to 5.2.2 and it went off without a hitch. Thank you! :D Here's some minor feedback:

FireOS 5.2.2 is based on Lollipop 5.1, so you will need Xposed for 5.1, and also GAPPS don't work right away, and need to have HDXposed module enabled.
HDXposed: I didn't need this to fix play store (but we all resort to whatever works.) :) I fixed it by renaming /system/etc/hosts file to hostsBAK and rebooting. (I'm going to activate Adaway, which may reverse the fix, but so far so good.) Maybe you can add this to the HDXposed fix. Personally, I'm a little leary of throwing HDX xposed modules at our device, but as said, must confirm my fix lasts for the long haul

For lazy ones I recommend skipping factory reset in Step 1) below if you already have 5.2.0.
. . .
To update to 5.2.2 from 5.2.0, you need to boot into TWRP, and in order to achieve this, you flash 4.5.3 bootloaders and TWRP as in here :
http://forum.xda-developers.com/showpost.php?p=62011272&postcount=2 [only step 1) is necessary]

1) boot into TWRP, and, in a single session (!!!!!)
do factory reset (skip if you already have 5.2.0 ?),
I didn't skip factory reset and have a question: This didn't wipe data and I don't understand why. (Same thing happened when i updated 4.5.4 to lollipop). All my "personal" dirs are still in /data, and settings like ES FE favorites, are active again after reinstalling the app. Can you tell me why? I thought wipe data meant, uh, wipe data :)

Thanks again :good:
 
  • Like
Reactions: bibikalka

bibikalka

Senior Member
May 14, 2015
1,408
1,101
I reinstalled TWRP yesterday and updated 5.2.0 to 5.2.2 and it went off without a hitch. Thank you! :D Here's some minor feedback:

HDXposed: I didn't need this to fix play store (but we all resort to whatever works.) :) I fixed it by renaming /system/etc/hosts file to hostsBAK and rebooting. (I'm going to activate Adaway, which may reverse the fix, but so far so good.) Maybe you can add this to the HDXposed fix. Personally, I'm a little leary of throwing HDX xposed modules at our device, but as said, must confirm my fix lasts for the long haul

Awesome to hear that the upgrade went well! A positive report goes a long way! Thanks!!!

Also, I've added the reference on the "hosts" file trick to the guide! I am now thinking that in post #2 I should probably update 5.2.0 bootloaders to 5.2.2, since these are different Lollipop versions. So, just in case :D

I didn't skip factory reset and have a question: This didn't wipe data and I don't understand why. (Same thing happened when i updated 4.5.4 to lollipop). All my "personal" dirs are still in /data, and settings like ES FE favorites, are active again after reinstalling the app. Can you tell me why? I thought wipe data meant, uh, wipe data :)

Thanks again :good:

That is weird. I think it may keep stuff in /media (while removing settings in /data). But without some test factory resets it may take some serious detective work to understand what happened there ;) Perhaps, TWRP is not actually doing what's being requested?
 

devicer

Senior Member
May 24, 2011
53
2
Can anyone make order to the OP content? I really do not understand which steps are needed and which are obsolete; I'm currently running 4.5.4 rooted with TWRP. Very thanks

Solved
 
Last edited:

meganoahj

Senior Member
Dec 30, 2014
81
35
Update3: time to update the instructions for 5.2.2.
The 5.2.0 writing is hidden, click below:

#################################################
5.2.0

Update : Quite a few successful reports of this procedure working well, so do pay attention, but don't let your hands shake too much as do this ;)

This is a blueprint for a reasonably safe journey to rooted Lollipop. The key is to flash 5.2.0 recovery right after flashing 5.2.0 stock, this way there is an option to recover if something goes wrong.

Disclaimer : most of the info is compiled from other threads. Myself, I have tested flashing the attached 5.2.0 stock recovery zip from TWRP, it works fine.

Big credit here hawkazn for blazing the trail, and getting to a working rooted Lollipop first, then dumping the stock recovery:
http://forum.xda-developers.com/showpost.php?p=62009468&postcount=75

0) I assume you have TWRP installed and working, which means you've followed the guide to step 3) only, [and skip all the steps after 3) , since nobody is going to care, no extra credit here!]:
http://forum.xda-developers.com/fire-hd/general/root-v2-0-fireos-4-5-4-gapps-t3150613

1) boot into TWRP, and, in a single session (!!!!!)
do factory reset,
flash the 5.2.0 update from this post (the official 5.2.0 zip will work just fine):
http://forum.xda-developers.com/fire-hd/general/lolipop-ota-capture-t3141810
flash the attached 5.2.0_stock_recovery_only.zip
flash Xposed for Lollipop, and GAPPS (see the note below for details)
and finally, when TWRP asks you to install root, say "yes"
Thanks to Remolten, there is a very detailed write up regarding all of this:
http://forum.xda-developers.com/showpost.php?p=62018692&postcount=6

Note that this is the last time you see TWRP (unless you do what I recommend in post #2), so take the opportunity to flash other stuff such as Xposed, thanks to siegesoldier for pointing this out:
http://forum.xda-developers.com/showpost.php?p=62021411&postcount=13
Update:GAPPS can be flashed safely at this step as well (and should be flashed here!!!), 2 reports have confirmed this:
http://forum.xda-developers.com/showpost.php?p=62208098&postcount=16
http://forum.xda-developers.com/showpost.php?p=62296848&postcount=47

Let's pause for a second and realize what we did here - we've put full stock 5.2.0, added root, and, most importantly, overwrote TWRP with 5.2.0 stock recovery.

2) reboot to recovery, you should see stock 5.2.0 recovery (this is just to see if it works, for troubleshooting, but otherwise a meaningless step from the update perspective ...)

3) reboot to 5.2.0 OS, and hopefully, it works. Install SuperSu to manage root requests.

4) if step 3) fails, you get into working 5.2.0 recovery by pressing "Pwr & Vol+". At this point you sideload 4.5.3 stock, and go back to step 0). Come back here and ask questions (and thank me again for being able to recover so easily !!! :D )

GAPPS can also be installed via the JMZ tool (not recommended, and skip if you flashed GAPPS via TWRP), there are reports that everything works just fine:
http://forum.xda-developers.com/fir...ool-jmz-fire-hd-7-tool-gapps-disable-t3113655

The next post discusses how to get into TWRP temporarily with 5.2.0 installed, and come back to 5.2.0
#################################################


Update2: siegesoldier has captured the FireOS 5.2.2 (Lollipop), and pretty much blazed the entire trail (go give him lots of thanks!)
http://forum.xda-developers.com/fire-hd/general/lolipop-ota-capture-t3141810
FireOS 5.2.2 is based on Lollipop 5.1, so you will need Xposed for 5.1, and also GAPPS don't work right away, and need to have HDXposed module enabled. Update: a simpler way to fix GAPPS is suggested by DoLooper (without HDXposed):
http://forum.xda-developers.com/showpost.php?p=62446653&postcount=64

For lazy ones I recommend skipping factory reset in Step 1) below if you already have 5.2.0.
0) I assume you have TWRP installed and working (if coming from 4.5.x):
http://forum.xda-developers.com/fire-hd/general/root-v2-0-fireos-4-5-4-gapps-t3150613
To update to 5.2.2 from 5.2.0, you need to boot into TWRP, and in order to achieve this, you flash 4.5.3 bootloaders and TWRP as in here :
http://forum.xda-developers.com/showpost.php?p=62011272&postcount=2
[only step 1) is necessary]
A report of a successful update from 5.2.0 to 5.2.2 has been posted by DoLooper, so this trail has been blazed!

1) boot into TWRP, and, in a single session (!!!!!)
do factory reset (skip if you already have 5.2.0 ?),
flash the 5.2.2 update from this thread:
http://forum.xda-developers.com/fire-hd/general/lolipop-ota-capture-t3141810
flash the attached 5.2.0_stock_recovery_only.zip
flash Xposed for Lollipop 5.1
http://forum.xda-developers.com/xposed/super-alpha-posted-permission-xposed-t3072979
flash Pico GAPPS for 5.1
http://www.androidrootz.com/2015/03/download-android-51x-lollipop-pa-gapps.html

2) reboot to recovery, you should see stock 5.2.0 recovery (this is just to see if it works, for troubleshooting, but otherwise a meaningless step from the update perspective ...)

3) reboot to 5.2.2 OS, and hopefully, it works. Install SuperSu to manage root requests.

4) if step 3) fails, you get into working 5.2.0 recovery by pressing "Pwr & Vol+". At this point you sideload 4.5.3 stock, and go back to step 0). Come back here and ask questions (and thank me again for being able to recover so easily !!! :D )

The next post discusses how to get into TWRP temporarily with 5.2.2 installed, and come back to 5.2.2

Please Use up to date gapps from tk: http://forum.xda-developers.com/android/software/tk-gapps-t3116347

Cause these gapps you linked are not up to date!
 

bibikalka

Senior Member
May 14, 2015
1,408
1,101

meganoahj

Senior Member
Dec 30, 2014
81
35
b) what is your actual concern? GAPPS tend to update themselves all the time, so whatever you flash into /system, it will fairly soon become obsolete anyway because the update will download fresher versions

and

a) is there any point in quoting the entire guide? :D

lulz i dunno want to copy the guide :D

its better to install actual gapps

---------- Post added at 01:37 PM ---------- Previous post was at 01:37 PM ----------

I reinstalled TWRP yesterday and updated 5.2.0 to 5.2.2 and it went off without a hitch. Thank you! :D Here's some minor feedback:

HDXposed: I didn't need this to fix play store (but we all resort to whatever works.) :) I fixed it by renaming /system/etc/hosts file to hostsBAK and rebooting. (I'm going to activate Adaway, which may reverse the fix, but so far so good.) Maybe you can add this to the HDXposed fix. Personally, I'm a little leary of throwing HDX xposed modules at our device, but as said, must confirm my fix lasts for the long haul


I didn't skip factory reset and have a question: This didn't wipe data and I don't understand why. (Same thing happened when i updated 4.5.4 to lollipop). All my "personal" dirs are still in /data, and settings like ES FE favorites, are active again after reinstalling the app. Can you tell me why? I thought wipe data meant, uh, wipe data :)

Thanks again :good:

The fix with the hosts file doesnt worked for me, only the HDXposed module worked for me!
 

DoLooper

Senior Member
Oct 1, 2014
771
336
Also, I've added the reference on the "hosts" file trick to the guide!
Sorry. Better get out your red pencil again, I spoke too soon. Play store has stopped opening. After trying long time to reinvent @siegesoldier's wheel, I am going to resort to HDXposed.

I am now thinking that in post #2 I should probably update 5.2.0 bootloaders to 5.2.2, since these are different Lollipop versions. So, just in case :D
I agree (for what that's worth!) Also was wondering whether we should be flashing 5.2.2 recovery.
 

llranga

Member
May 26, 2013
37
4
Colombo
Thanks for this bro! I can confirm this process works, and I will show the steps I took here (clarification for people who want to do this).

1. I started on 4.5.4 + Root + TWRP with adb installed on my Mac
2. I connected fire to computer, and did (in terminal window)
adb backup -apk -shared -all ~/Downloads
to save my data before factory reset (this should work on Mac + Linux).
3. Rebooted to TWRP
4. Performed a Factory Reset (the default one under Wipe on TWRP)
5. Installed the 5.2.0 bin file with adb sideload
6. Installed 5.20 stock recovery with adb sideload
7. Went to Reboot page and chose reboot recovery
8. TWRP will prompt you to install root, do it
9. It will then reboot into stock Amazon recovery, choose to reboot your system
10. Mine took forever, but it finally booted into 5.2.0
11. If you're plugged into the computer, it gives you the option to enable usb debugging, do this
12. I completed the setup process
13. Downloaded SupersSU from here on computer
14. Used
adb install -r supersu.apk
(or whatever your's is named)
15. Check you have root by running
adb shell
su
16. You should have root installed!
17. Now run
adb restore backup.ab
which will restore your data (apps)
18. SKIP UNLESS YOU HAD XPOSED INSTALLED If you had Xposed installed, it is not compatible now, so uninstall all of your modules (if you want to save space). I believe the problem with Xposed is that we need to change a build.prop sdk/api value, but that's something for us to figure out later.
19. Install jmz fire tools from here
20. Run it and choose install Gapps, your device will reboot
21. Sucess!!! Lollipop + Root + Gapps :D

Anyways, good luck to everyone :) I hope this helps someone in the future!

---------- Post added at 10:33 AM ---------- Previous post was at 10:32 AM ----------





I fixed this by running
adb install -r eu.chainfire.supersu.apk
or whatever your supersu file is named.

everything was fine up to installing Gapps using jmz fire tool. mine is hd 6.
it dowloaded Gapps. showing message "extracting and installing playstores and will reboot once completed"
after 10 min, message disappeared and device didn't reboot.
since it's mentioned in jmz fire tool that "do not use install Gapps, more than once ", i didn't try again.
if anyone having same issue, or way to fix this, it's highly appreciated.
thanks
 

Wol Nguyen

Member
Aug 17, 2015
5
0
I completed all steps and succeeded. My fire 6 was rooted with lollipop OS and gapps

I was happy when google play could work. However, after I signed in google account, it immediately crashed.

I've tried doing "force stop" and opening again but it still does not work.:crying:
:crying::crying:
can anybody help me please? thanks :(:(:(

plus, I installed lollipop 5.1 (fire 5.2.2), but it shows "fireOS 5.0" in setting. I dont know what was wrong?
 

siegesoldier

Senior Member
Aug 22, 2012
105
49
I completed all steps and succeeded. My fire 6 was rooted with lollipop OS and gapps

I was happy when google play could work. However, after I signed in google account, it immediately crashed.

I've tried doing "force stop" and opening again but it still does not work.:crying:
:crying::crying:
can anybody help me please? thanks :(:(:(

plus, I installed lollipop 5.1 (fire 5.2.2), but it shows "fireOS 5.0" in setting. I dont know what was wrong?
Install HDXposed. It's not going to work without it atm
 

DoLooper

Senior Member
Oct 1, 2014
771
336
I was happy when google play could work. However, after I signed in google account, it immediately crashed.
Yes, play store seems not to be working on latest lollipop. The update at top of this post seems to be the only fix.

plus, I installed lollipop 5.1 (fire 5.2.2), but it shows "fireOS 5.0" in setting. I dont know what was wrong?
That's how it displays. If build date is July 20, you've got 5.2.2.
 
  • Like
Reactions: Wol Nguyen

bibikalka

Senior Member
May 14, 2015
1,408
1,101
Install HDXposed. It's not going to work without it atm
Solid info here, thanks again for finding the fix!!!

Sorry. Better get out your red pencil again, I spoke too soon. Play store has stopped opening. After trying long time to reinvent @siegesoldier's wheel, I am going to resort to HDXposed.

I agree (for what that's worth!) Also was wondering whether we should be flashing 5.2.2 recovery.

I've removed the recommendation not to run HDXposed.

For 5.2.2 recovery, it's a bit of pain to get it (need to unpack OTA into files on a PC with a couple of tools, find the recovery update script, run it on Fire, then dd the recovery out). Most importantly, 5.2.0 recovery is fully functional, so little upside if any at all.
 
Last edited:
  • Like
Reactions: DoLooper

devicer

Senior Member
May 24, 2011
53
2
Hi, I'm unable to install 5.2.2 over 4.5.3/4.5.4 rooted with TWRP. The flash process is stopped to "Patching system image unconditionally..." and the only way to exit is forcing with power button and in this case TWRP is unable anymore to mount /system, so I have to install 5.2.0 recovery and sideload 4.5.3 to unbrick the device. Any solution? Very thanks
 

bibikalka

Senior Member
May 14, 2015
1,408
1,101
Hi, I'm unable to install 5.2.2 over 4.5.3/4.5.4 rooted with TWRP. The flash process is stopped to "Patching system image unconditionally..." and the only way to exit is forcing with power button and in this case TWRP is unable anymore to mount /system, so I have to install 5.2.0 recovery and sideload 4.5.3 to unbrick the device. Any solution? Very thanks

In TWRP you should try to format /system as ext3, then format as ext4. Then try the 5.2.2 update again. If it fails, don't reinstall 4.5.3, but come back here with questions. You will still have TWRP working, so that's good enough.
 
  • Like
Reactions: devicer

devicer

Senior Member
May 24, 2011
53
2
In TWRP you should try to format /system as ext3, then format as ext4. Then try the 5.2.2 update again. If it fails, don't reinstall 4.5.3, but come back here with questions. You will still have TWRP working, so that's good enough.

Formatting /system with ext3/ext4 solved the mount error but 5.2.2 still fails to install. Here the log:

Updating partition details...
...done
Full SELinux support is present.
MTP Enabled
Installing '/sdcard/Fire5.2.2/update-kindle-devpreview_ariel-20.5.2.2_user_522041550.zip'...
Checking for MD5 file...
Skipping MD5 check: no MD5 file found
Patching system image unconditionally...
 

bibikalka

Senior Member
May 14, 2015
1,408
1,101
Formatting /system with ext3/ext4 solved the mount error but 5.2.2 still fails to install. Here the log:

Can you try to install 5.2.0 instead ?

Have the 4.5.3 bootloader handy ( uboot_4.5.3.zip ), so you can flash it right away if 5.2.0 install is successful (this way you'll return to TWRP after upgrade to 5.2.0) :
http://forum.xda-developers.com/fire-hd/general/how-to-upgrade-to-4-5-4-twrp-root-t3141648

So the sequence is ext3/ext4 format, install 5.2.0, flash uboot_4.5.3 if successful. If not, it'll hang, so come back.
 

Wol Nguyen

Member
Aug 17, 2015
5
0
My fire is in fire 5.2.2, then I install twrp by flashify, and now it can't boot into recovery.

Does anyone have any idea?#
 

Top Liked Posts

  • There are no posts matching your filters.
  • 86
    Update13, Oct 23, 2017: Everything still works with the latest 5.4.0.1, just grab the correct ROM file

    Update12, Jul 23, 2016: Upgraded to FireOS 5.3.1, everything went smooth. It's not clear yet if 5.3.1 can be safely downgraded to 5.1.2 in order to get root. Stay put until we get some confirmation! It has been reported that the downgrade from 5.3.1 to 5.1.2 bricks the Fire HD!!! So downgrade to FireOS 4.5.3 instead, root, quickly turn off the WiFi, and then use this guide to go back to 5.3.1 (and do use 5.3.1 bootloaders!):
    http://forum.xda-developers.com/fire-hd/development/unbrick-fire-hd-6-7-flashing-lollipop-t3405797

    Update11, Apr 29, 2016: I installed the new 5.1.2 build from Mar 30, 2016 via the instructions below (using TWRP), and everything worked fine. This version is not rootable by Kingroot (yet). One good option (if you have this version now) is to sideload via the stock recovery the rootable 5.1.2 from Feb 26 https://kindle-fire-updates.s3.amaz...HBV/update-kindle-20.5.4.2_user_542168620.bin , and then run Kingroot. See Update10 for other tips on what to do.

    Update10, Apr 8, 2016: According to the reports, the stock 5.1.2 (Feb 26, 2016 build) is rootable via Kingroot (update to 5.1.2 via the standard Amazon procedures, try Kingroot several times). Block OTA updates (to prevent surprises): In Explorer go to /system/priv-app/DeviceSoftwareOTA and rename DeviceSoftwareOTA.apk to .apk_ . Then you can install GAPPS as per these instructions : http://forum.xda-developers.com/showpost.php?p=65405511&postcount=268 Note that you will still benefit if you follow this guide: install TWRP, and reinstall 5.1.2 via the steps below and get all the Android goodies loaded at once (including Xposed) on an entirely clean /system partition with no Kingroot files.

    Update9, Mar 21, 2016: The instructions below are updated for 5.1.2 . Kingroot does not work under 5.1.2, use adb sideload to 4.5.3 to get root! It seems that 5.1.2 has a bug where /sdcard is not visible for root (the issue seems to be this newer SuperSu version, not FireOS 5.1.2 ... I went back to SuperSu 2.46, and now it works as before). To be on the safe side, I modified scripts in post #2 to work with the newer SuperSu as well (but I don't recommend this newer SuperSu version ...) . According to a report, 5.1.1 bootloaders can be run after 5.1.2 without bricking. Regardless, here, all the bootloaders will be kept as 5.1.1 just to be sure

    Update7, Feb 13, 2016: Instructions for the latest 5.4.1 update file (FireOS 5.1.1 -Bellini - with "blue shade") - Note that the instructions can be confusing, don't rush if you are not sure what you are doing (and especially if your Amazon warranty already expired) !!!

    Update6: Since early Oct, there is a new evil (!!!) update named here as 5.2.2u2 (which bricked a few Fires), but thankfully the update glitches has been worked out!!! Back to business !!! Observe that once you booted 5.2.2u2 bootloaders (either through the Amazon update or the procedure below), there is no going back !!! The only other bootloaders you can run at this point are 4.5.3 as per post #2

    Update4: Please do not deviate from the instructions, and do flash GAPPS during Step 1), together with Xposed. JMZ tool for installing GAPPS is not recommended!

    For lazy ones I recommend skipping factory reset in Step 1) below if you already have Lollipop.

    Install instructions.

    Unless you have 4.5.3 bootloaders and TWRP at the moment, your path into TWRP goes via post #2 (and you do need TWRP to proceed!!!). No need to fear, I have made a simple script to flash 4.5.3 bootloaders and TWRP in just one click, see section "101" in post #2 !!!

    Before proceeding, please write down your current FireOS version, and its date. To install the latest Lollipop you can pretty much start anywhere, these are rough suggestions how to get TWRP running in the quickest way possible :
    1. unrooted Lollipop, pre-5.1.2 or 5.1.2, root via KingRoot (try several times), use post #2 for TWRP, re-load 5.1.2 from TWRP by following this post
    2. unrooted Lollipop, alternative option, (note the version you have!!!), downgrade to 4.5.3 via stock recovery ADB sideload option (block updates immediately!!!), root 4.5.3, use post #2 to install TWRP
    3. already rooted Lollipop, use post #2 to boot into TWRP, the bat script in section "101" is recommended (and can do a clean re-install of your current Lollipop version with the same procedure if you care)
    4. rooted FireOS 4.5.x (latest Kingroot is known to root either 4.5.3 or 4.5.5.1, perhaps 4.5.4 & 4.5.5 as well) -then post #2 (if the bootloaders are not 4.5.3)
    5. unrooted 4.5.x (>4.5.3 such as 4.5.4 or 4.5.5 but pre-4.5.5.1): disable OTA, run latest Kingroot, report back if failure, use post #2 for TWRP
    6. unrooted whatever - write directly into memory 4.5.3 bootloaders & TWRP (somewhat slow, but can be an attractive option if you cannot root your version of Lollipop directly, and don't want to factory reset the device memore during the downgrade to 4.5.3 in order to root) :
      http://forum.xda-developers.com/fire-hd/development/unbrick-fire-hd-6-7-flashing-lollipop-t3405797

    0) Before proceeding, ensure that you have a functional non-system launcher (install any as user app), or enable the stock Amazon launcher via adb if it's blocked (pm enable com.amazon.firelauncher) !!! Make sure it works. This will ensure that you can avoid problems later on when the /system partition is overwritten, and your non-Amazon launcher that was installed as a system app is gone. I had Nova as the system app (overwritten by the upgrade!), and Amazon launcher blocked, so after the upgrade to 5.1.2 there was no working launcher. Not good ... Had to do a couple of system resets and TWRP restores until I figured out what was happening ...

    1) boot into TWRP, and, in a single session (!!!!!)
    1. (Optional) clear cache/dalvik (to shrink the backup size), run TWRP backup to a USB drive via USBOTG cable for your /data partition
    2. (Optional) do factory reset (can skip if you already have Lollipop),
    3. flash the latest FireOS from this official Amazon link (rename *bin to *zip such that TWRP can recognize it):
      https://www.amazon.com/gp/help/customer/display.html?nodeId=201596850
      If for some reason you need a different FireOS version, grab the file you need from the links in this post.
    4. flash 5.2.0_stock_recovery_only.zip below. If you kept track of your prior FireOS versions and know what you are doing, you can flash
      5.4.1_1133_stock_recovery_uboot.zip from post #2 (this will flash 5.2.0 stock recovery & 5.4.1 bootloaders). Note that if you downgraded from FireOS 5.3.1 to 4.5.3 to root, you must flash 5.5.2_1534_stock_recovery_uboot.zip instead, this will put the required 5.3.1 bootloaders back.
    5. flash the attached make_space_v02.zip (this will remove moffice and weather to make room in /system for GAPPS , can always install this stuff from Play Store)
    6. flash Supersu.zip https://download.chainfire.eu/696/SuperSU/UPDATE-SuperSU-v2.46.zip
    7. flash Xposed for Lollipop 5.1 (if you want it for misc modules, highly recommended to do this just in case)
      http://forum.xda-developers.com/showthread.php?t=3034811
      (version xposed-vXX-sdk22-arm.zip )
    8. flash Pico (Uni) GAPPS for 5.1 :
      http://forum.xda-developers.com/android/software/tk-gapps-t3116347
    9. clear cache/dalvik in TWRP
    10. Another reminder: If you are absolutely sure that you have never run FireOS 4.5.5.1 bootloaders or Lollipop with anything but 5.2.0 bootloaders, you can flash 5.2.0_stock_recovery_uboot.zip from post #2 here, this way you preserve the well behaved 5.2.0 bootloaders. If you are not sure about any of this, don't do it !!!

    2) reboot to recovery, you should see stock 5.2.0 recovery (this is just to see if it works, for troubleshooting, but otherwise a meaningless step from the update perspective ...). Notice that at this point you no longer have TWRP. Since it does not boot with the 5.x bootloaders anyway, TWRP was replaced with the stock recovery that has some useful features, such as adb sideload. Later on it's possible to get back into TWRP from within the rooted Lollipop by following post #2.

    3) reboot to Lollipop (takes ~15 minutes), and hopefully, it works.

    Bricking warning !!! If you flashed the wrong bootloaders, and you get a black screen upon reboot, there is good news - you can UNBRICK !!! The bad news is that the procedure is quite involved, and may take quite a bit of effort. So measure twice, cut once !!! If unsure about bootloaders, ask here first before flashing, instead of coming back to complain about the brick later.

    4) if step 3) fails, you get into working 5.2.0 recovery by pressing "Pwr & Vol+". At this point you sideload 4.5.3 stock, and go back to step 0). Come back here and ask questions (and thank me again for being able to recover so easily !!! :D )

    5) make_space_v02.zip already disabled OTA updates , but please verify that you now have DeviceSoftwareOTA.apk_ block OTA updates (to prevent surprises): In Explorer go to /system/priv-app/DeviceSoftwareOTA and rename DeviceSoftwareOTA.apk to .apk_

    6) Consider adding an option to switch from pure Amazon interface to almost pure Android and back on the fly:
    http://forum.xda-developers.com/fire-hd/general/fireos-4-5-x-root-quickly-switch-to-t3145613

    Note: Using JMZ tool for installing GAPPS is not recommended, please flash GAPPS as per Step 1)

    The next post discusses how to get into TWRP temporarily with Lollipop installed, and come back to Lollipop
    Want to say thanks by clicking the "Thanks" button ? ;)
    1452654044767407_animate.gif
    46
    Higher skill level operation - proceed with care !!!

    Update3.5 : Updates for 5.3.1 !!! Please use 5.5.2_1534_stock_recovery_uboot.zip if you downgraded from stock FireOS 5.3.1 to 4.5.3 for rooting, meaning that you now have 5.3.1 bootloaders

    Update3.4 : Updates for 5.1.2 !!! Please use the new WindowsAutoTWRP_v03.zip with 5.1.2 (backward compatible to 5.1.1 and before). There are tons of verification messages in the new script, please read carefully !!! It appears that in 5.1.2 there is a bug such that root cannot see /sdcard/gscript properly (this was the issue caused by the latest SuperSu I tried). To handle this, I redirected the path to /data/media/0/gscript . If you are using Gscript, delete the flash_453(_stay) scripts in Gscript, and open them again after you run WindowsAutoTWRP_v03 once. This way Gscript will pick up the corrected scripts with the updated path. Pay attention to the checksums !!!

    Update3.3 : And now "Newbie Friendly" !!! Just one simple *.bat script under Windows !!! See section "101"

    Update3.2 : If you are unsure what bootloader file to use, go with 5.4.1_1133_stock_recovery_uboot.zip

    Update2: If you ever booted the Sept 2015 Lollipop (FireOS 5.0.1, called here 5.2.2u2), DO NOT use 5.2.0_stock_recovery_uboot.zip , it will brick!!!

    Update1: Instructions are clarified with more detail on how to use "dd" correctly.
    Important : do not try to use Flashify!!! Flashify cannot access all partitions that you need to flash !!! Flashify will brick your Fire !!!


    Here you get to run TWRP again, and then return to Lollipop.

    The steps must be executed with precision (all 3 files must be dd'ed successfully). Keep the 5.4.1_1133_stock_recovery_uboot.zip file from below on the device, in its /images directory you have 3 images for 5.4.1 which you can flash back right away if you need to abort. If something is wrong, DO NOT reboot for as long as it takes. Keep the device without reboots, and come back here for guidance.

    To understand a bit what we are doing in this post, read this :

    A bit of background. Fire HD boots TEE1 -> UBOOT -> recovery. With 4.5.3, we lucked out that TEE1 & UBOOT accepted unsigned recovery (aka TWRP). No such luck with 5.2.x - TEE1 & UBOOT expect signed recovery (for example, stock one). That's why I had everybody overwrite TWRP with stock recovery in post #1 as the last step in the upgrade. Otherwise after the upgrade to 5.2.x, TWRP would still be sitting in recovery, and being unsigned, it cannot boot !!! A few bricks were created because of this last point. But with the stock 5.2.0 recovery (which it will boot), at least there is an option to sideload another update file.

    So, the key to running TWRP while in 5.2.x is to overwrite the 3 key components together (TEE1, UBOOT, recovery), and then return things to 5.2.x once TWRP is no longer needed.


    For convenience, before proceeding save all the attached files on your Fire in "/sdcard/gscript"


    101 - Automatic installation under Windows !!!

    I managed to debug it and not to brick !!! Tested personally (gotta eat your dog food !!!) Heavily inspired by glitch3yf0x in http://forum.xda-developers.com/amazon-fire/general/root-playstore-busybox-optimize-flash-t3281804

    1. Save the necessary Lollipop bootloaders zip into /sdcard/gscript on Fire HD, this will get you back into Lollipop
    2. Download WindowsAutoTWRP_v03.zip to your PC with some Windows on it, unpack anywhere
    3. Run the commands below, and make sure you authorize root access for adb when the question pops up on your Fire:
      Code:
      adb shell
      su
      exit
      exit
    4. Enable apps from unknown sources
    5. Run 1_FIRE_HD_4TH_GEN_TWRP.bat
    6. At the bottom you should see these checksums :
      Code:
      3a1f3cd1ef405eaeec719eaeb41ab791  /dev/block/mmcblk0p3
      d605e31a180652c65d6957b58d2d8501  /dev/block/mmcblk0p5
      305a5546ff8960b51cd573b59a05cde6  /dev/block/mmcblk0p7
      Make sure the checksums are correct before rebooting !!! Do not reboot if checksums are wrong, keep the Fire running, and come back here to ask questions !!! I almost bricked under 5.1.2 due to the newer SuperSu version, but managed to catch the wrong checksums, and updated the scripts to have additional verifications.

      A possible issue here is that you did not have root access, so the "dd" commands could not succeed. At this point you can go to method A since the script left all the necessary ingredients on the device, so all you need to do is to run the script from Gscript (installed for you!), make sure you click "needs SU". Delete the old flash_453 and flash_453_stay scripts from Gscript, and re-open them again after you run WindowsAutoTWRP_v03 at least once.
    7. Verify again that you have 5.x.x bootloaders zip file on Fire HD which you will access from TWRP (it can also be on a USB drive if you got USB OTG cable) - Out of kindness I've provided the most popular bootloaders zip at the moment - 5.4.1 version, you can find it in /sdcard/gscript, it's TWRP ready, just flash it if 5.4.1 is OK for you (5.4.1 bootloaders will also work with FireOS 5.1.2 )
    8. Type "adb reboot recovery"
    9. In TWRP, after you are done with everything, don't forget to flash the 5.x.x bootloaders zip file in order to boot back into Lollipop!

    After the batch file runs, you will have Gscript installed, together with the required script & image files in /sdcard/gscript, so you can head over to the next section (section A), and set up TWRP access without using a PC! You will also have scripts in there to enable/disable Amazon's stuff on the fly, as described in here :
    http://forum.xda-developers.com/fire-hd/general/fireos-4-5-x-root-quickly-switch-to-t3145613

    A - Instructions with Gscript.

    Due to popular demand (looking at DoLooper here :D), the approach is simplified and all the bootloaders are flashed via a script, and this assumes that you have Gscript installed (here : https://bitbucket.org/Equidamoid/gscript/downloads )
    1. Download the attached "453_key_images.zip" to your Fire, create a folder (if does not exist) "/sdcard/gscript", and unpack this zip file in "/sdcard/gscript" (so all *bins sit in this directory)
      [*]Download the attached "flash453.zip", copy to "/sdcard/gscript", unpack
    2. Run the bat from WindowsAutoTWRP_v03 in section "101" at least once
    3. Go to Gscript/Add script/Need Su (yes, check)/Load file "flash_453_stay.sh"
    4. From Gscript run this "flash_453_stay.sh", and verify the checksums
    5. If you are using versions prior to FireOS 5.1.2, you can use "flash_453.sh" and you should end up in TWRP (it will reboot automatically)
    6. If unhappy about auto-reboot, use "flash_453_stay.sh" script, it will only do "dd" and exit back to the current OS (no auto-reboot to recovery)

    B - Alternative (old) instructions via ADB
    1. Download the attached "453_key_images.zip" to your Fire, create a folder "/sdcard/gscript", and unpack this zip file in "/sdcard/gscript". From the PC side, open ADB and start typing :

      adb shell
      su
      cd /sdcard/gscript
      ls
      dd if=453_tee1.img of=/dev/block/mmcblk0p3
      dd if=453_uboot.img of=/dev/block/mmcblk0p5
      dd if=453_twrp.img of=/dev/block/mmcblk0p7
      exit
      exit
      adb reboot recovery


      These are 4.5.3 bootloaders, and TWRP. Just like in the good old days under FireOS 4.5.x

      This is a sample log, your output should look similar (typed commands are colored in red) :

      C:\Program Files\Minimal ADB and Fastboot>adb devices
      List of devices attached
      0000000000000XXX device

      C:\Program Files\Minimal ADB and Fastboot>adb shell
      [email protected]:/ $ su
      su
      [email protected]:/ # cd /sdcard/gscript
      cd /sdcard/gscript
      [email protected]:/sdcard/gscript # ls
      ls
      453_key_images.zip
      453_tee1.img
      453_twrp.img
      453_uboot.img
      [email protected]:/sdcard/gscript # dd if=453_tee1.img of=/dev/block/mmcblk0p3
      dd if=453_tee1.img of=/dev/block/mmcblk0p3
      6364+1 records in
      6364+1 records out
      3258876 bytes transferred in 0.543 secs (6001613 bytes/sec)
      [email protected]:/sdcard/gscript # dd if=453_uboot.img of=/dev/block/mmcblk0p5
      dd if=453_uboot.img of=/dev/block/mmcblk0p5
      414+1 records in
      414+1 records out
      212116 bytes transferred in 0.041 secs (5173560 bytes/sec)
      [email protected]:/sdcard/gscript # dd if=453_twrp.img of=/dev/block/mmcblk0p7
      dd if=453_twrp.img of=/dev/block/mmcblk0p7
      14004+0 records in
      14004+0 records out
      7170048 bytes transferred in 1.103 secs (6500496 bytes/sec)
      [email protected]:/sdcard/gscript # exit
      exit
      [email protected]:/ $ exit
      exit

      C:\Program Files\Minimal ADB and Fastboot>adb reboot recovery
    2. Reboot into recovery, and you should be in TWRP.

    C - What am I doing in TWRP ???


    -- Well, you tell me ;)

    1. Generally, you want to flash something (Xposed, GAPPS?). Keep flashing whatever else you need! Note that at this point you won't be able to boot into 5.2.x, siegesoldier has established this fact with his early upgrade attempts. 4.5.3 bootloaders will not boot 5.2.x kernel due to some missing parameters !
    2. When you want to go back to Lollipop, in TWRP flash the attached 5.4.1_1133_stock_recovery_uboot.zip (or 5.5.2_1534_stock_recovery_uboot.zip). This will put 5.4.1 (or 5.5.2) bootloaders back, as well as 5.2.0 stock recovery. Note if you are sure that you never had 5.4.1, 5.2.2u3 or 5.2.2u2 bootloaders running (or stock FireOS 4.5.5.1), use 5.2.0_stock_recovery_uboot.zip (this is rare now, be very sure !!!) If you forget to flash the 5.x.x bootloaders, the device will cycle upon reboot with the Amazon logo continuously. This is not a big issue ! Just hold the power button until the Fire shuts off. Then from the turned off state turn it on by pressing power and Vol+ buttons together, and this will get you back into TWRP where you can flash the 5.x.x bootloaders and reboot to Lollipop.
    3. Now reboot to system, and you should have your Lollipop :p
    Want to say thanks by clicking the "Thanks" button ? ;)
    1452654044767407_animate.gif
    5
    Thanks for this bro! I can confirm this process works, and I will show the steps I took here (clarification for people who want to do this).

    1. I started on 4.5.4 + Root + TWRP with adb installed on my Mac
    2. I connected fire to computer, and did (in terminal window)
    adb backup -apk -shared -all ~/Downloads
    to save my data before factory reset (this should work on Mac + Linux).
    3. Rebooted to TWRP
    4. Performed a Factory Reset (the default one under Wipe on TWRP)
    5. Installed the 5.2.0 bin file with adb sideload
    6. Installed 5.20 stock recovery with adb sideload
    7. Went to Reboot page and chose reboot recovery
    8. TWRP will prompt you to install root, do it
    9. It will then reboot into stock Amazon recovery, choose to reboot your system
    10. Mine took forever, but it finally booted into 5.2.0
    11. If you're plugged into the computer, it gives you the option to enable usb debugging, do this
    12. I completed the setup process
    13. Downloaded SupersSU from here on computer
    14. Used
    adb install -r supersu.apk
    (or whatever your's is named)
    15. Check you have root by running
    adb shell
    su
    16. You should have root installed!
    17. Now run
    adb restore backup.ab
    which will restore your data (apps)
    18. SKIP UNLESS YOU HAD XPOSED INSTALLED If you had Xposed installed, it is not compatible now, so uninstall all of your modules (if you want to save space). I believe the problem with Xposed is that we need to change a build.prop sdk/api value, but that's something for us to figure out later.
    19. Install jmz fire tools from here
    20. Run it and choose install Gapps, your device will reboot
    21. Sucess!!! Lollipop + Root + Gapps :D

    Anyways, good luck to everyone :) I hope this helps someone in the future!

    ---------- Post added at 10:33 AM ---------- Previous post was at 10:32 AM ----------

    Yahoo! :) I'm either almost there or am no longer rooted. adb shell, su doesn't return #-sign, but I can "cd" and "ls" all around /system. SuperSU installer says I'm "not fully rooted," but if you press Play (store) Amazon wants to open appstore of course, and no TWRP. Tried adb install, which failed:
    Desktop>adb install eu.chainfire.supersu.apk
    3017 KB/s (5904943 bytes in 1.911s)
    pkg: /data/local/tmp/eu.chainfire.supersu.apk
    Failure [INSTALL_FAILED_ALREADY_EXISTS]​
    Guess I'm partially rooted? Need some reassurance because had a little trouble flashing (which I won't explain unless I must) :eek:. Anyway, I have 5.2.0 recovery and if superuser is as expected, I'll go for post 2 (i think)! Thanks!

    Managed to get the upgrade from reading the last thread, but no TWRP. Thanks!!


    This happened to me as well... the su binary was in /system/xbin but wasn't working, and the app said I had to flash or install from the Play Store. I copied the Superuser.apk to /sdcard and installed it device side, worked fine.

    I fixed this by running
    adb install -r eu.chainfire.supersu.apk
    or whatever your supersu file is named.
    5
    This Tutorial Works for FireOS 5.3.3.0

    I can confirm that the tutorial in post #1 still works, even for 5.3.3.0. Basically I downgraded to 4.5.3, rooted, and then upgraded back to 5.3.3.0. These are the simplified steps I followed:

    1. Enable ADB on your device and set up ADB on your computer
    2. Download 4.5.3 firmware
    3. Connect device to computer and run "adb reboot recovery"
    4. Use volume keys and power button to navigate to "Apply update from ADB"
    5. From computer type "adb sideload update-kindle-20.4.5.3_user_453011120.bin"
    6. From tablet select "wipe data/factory reset"
    7. From tablet select "reboot system"
    8. Complete setup (do not connect to a wifi network yet)
    9. Disable OTA updates ( adb shell ; pm block com.amazon.dcp or "Debloater"),
    10. Sideload Kingroot & let it root
    11. Flash openrecovery-twrp-2.8.6.0-ariel.img TWRP image via Flashify (backup stock recovery first)
    12. Download all files and store them on the Fire
    13. Boot into TWRP, flash 4.5.3_twrp_recovery_full_ariel_string.zip. Reboot to recovery (TWRP) adb reboot recovery
    14. Do factory reset
    15. Flash FireOS 5.3.3.0 (rename *bin to *zip so that TWRP can recognize it)
    16. Flash 5.5.2_1534_stock_recovery_uboot.zip, this will put the required 5.3.1 bootloader back
    17. Flash make_space_v02.zip (this will remove moffice and weather to make room in /system for GAPPs, can always install this stuff from Play Store). However, I still did not have enough room for Pico GAPPs
    18. Flash Supersu.zip https://download.chainfire.eu/696/SuperSU/ (link in OP is wrong)
    19. Clear cache/dalvik in TWRP
    20. Reboot to recovery: adb reboot recovery. This will be stock recovery now because TWRP doesn’t boot with 5.x bootloaders.
    21. Reboot to FireOS (could take ~15 minutes, but took less than 5 for me)

    Everything seems to work fine. The important think is that it booted and did not bootloop. I have not yet tried the steps in post #2 to reinstall TWRP. Those seem to be a bit more straightforward, but I will report back if I run across any problems.
    2
    Managed to get the upgrade from reading the last thread, but no TWRP. Thanks!!

    Yahoo! :) I'm either almost there or am no longer rooted. adb shell, su doesn't return #-sign, but I can "cd" and "ls" all around /system. SuperSU installer says I'm "not fully rooted," but if you press Play (store) Amazon wants to open appstore of course, and no TWRP. Tried adb install, which failed:
    Desktop>adb install eu.chainfire.supersu.apk
    3017 KB/s (5904943 bytes in 1.911s)
    pkg: /data/local/tmp/eu.chainfire.supersu.apk
    Failure [INSTALL_FAILED_ALREADY_EXISTS]​
    Guess I'm partially rooted? Need some reassurance because had a little trouble flashing (which I won't explain unless I must) :eek:. Anyway, I have 5.2.0 recovery and if superuser is as expected, I'll go for post 2 (i think)! Thanks!
    This happened to me as well... the su binary was in /system/xbin but wasn't working, and the app said I had to flash or install from the Play Store. I copied the Superuser.apk to /sdcard and installed it device side, worked fine.