yashsingh1/xdaforums huggingface dataset:
[Fire General] Hallo32:
Sure the permissions are the easy steps and flashing the official recovery forward and backward seems to work.

In the boot.img are informations which seems to be a signature.

It seems, that the boot.img will be patched to a recovery image. But this may still need a closer look.

Is there an easy way to see the difference in the behaviour of two different executables?

Is it possible to emulate the fire and trace the file access?
[Fire General] DB126:
Although within my 'pay scale' the topic fall outside personal interest given previous attempts to hack Amazon firmware which last bore fruit with 3rd gen HDX (still a great device). There are other threads in this forum dedicated to pursuing potential bootloader vulnerabilities...all largely inactive in recent months. OT for this thread. Suggest looking in the Android Development section for related threads:

https://xdaforums.com/amazon-fire/development
[Fire General] Hallo32:
Hacking the bootloader is not the point.

I'm interested in the way, how Amazon has loocked the device and how the modification of the "system" partition with FlashFire differs from the modification of the ramdisk.
[Fire General] DB126:
See other threads (wildly OT here) for prelims; you'll likely have to do some further digging in other forums/boards for minutiae on FlashFire operation. Lots to explore and learn; enjoy!
[Fire General] Hallo32:
Sideload the firmware on the recovery fails with the following message after using Fireflash.

error: insufficient permissions for device

Any ideas?

Edit:

Updating adb did fix the problem. The latest version is always available directly by google on the following side:

https://developer.android.com/studio/releases/platform-tools.html
[Fire General] DB126:
Or just use 'minimal adb and fastboot' which is a fraction the size and equally effective.
[Fire General] Hallo32:
The size for the windows version is around 7,5 MB and doesn't have an installer. ;)

Just a simple zip file with the tools, that is the style I love.

In this case it is also possible to use a simple script to catch adb without much trouble.
[Fire General] DB126:
Same for minimal tools if that's the way you like it. Either will work fine (obviously).
[Fire General] Hallo32:
The version I found has been only available with an installer. :D

Nice to see also portable versions. :)
[Fire General] eyeofthenyte:
Would anyone know why things wouldn't even come up on screen following the "Flash"? it went to reboot and just stayed back for hours now.
[Fire General] DragonFire1024:
Does everything work now? If not, did you have an OS version ***LESS*** than 5.3.2.1? Any OS on 5.3.2.1 or greater cannot be rooted. If you are on OS 5.4.0.0, you can downgrade to 5.3.2.1, but it serves no real purpose without root.
[Fire General] eyeofthenyte:
I was on 5.1.1 and no it still hasn't turned on. Normally I see some sort of command line error for a bricked tablet or something. Its never been just blank.
[Fire General] Hallo32:
What did you exactly flash?
[Fire General] eyeofthenyte:
I did a factory reset and tried to flash everything on the list under point B on the OP (latest OTA, the fire_boot 5.1.1, SuperSU, xposed and gapps)

I left the settings as listed in the post. Hit the flash button everything I saw said success it went to restart and never turned on again. Or at least I assume it was restarting.
[Fire General] DragonFire1024:
Can you get to the recovery screen at all? Turn off completely, then when off, press first the volume down button and hold it down, then press the power button and hold it down too until the amazon logo appears. If it won't boot up to the recovery screen, your tablet is probably hard bricked unless there is firmware to flash.
[Fire General] beezar:
A bit confused here. So if I'm on 5.3.1.0, rooted, and with the good bootloader 5.0.1, then I cannot upgrade past 5.3.2.1 and keep root even if I have the good bootloader?
[Fire General] DragonFire1024:
Correct. You won't be able to upgrade to a newer FireOS version. You have to stay on FireOS 5.3.1 or lose root forever.
[Fire General] DB126:
Actually, you can but it's risky with little room for error. In a nutshell you must manually install the desired FireOS build (eg: 5.6.0.1) then immediately replace the imbedded bootloader with a v5.0.1 bootloader WITHOUT rebooting. There is no assurance the old bootloader and new ROM will be compatible although so far that has not been a problem. Once the updated ROM boots you must immediately reroot and disable OTA updates.

If interested in pursuing this path I can dig up the relevant links. Personally I wouldn't go there as any miscalculation could brick the device or yield an unrootable build of FireOS. My recommendation: bite the bullet and install one of [MENTION=5749760]ggow[/MENTION]'s custom ROMs which will continue to receive updates for the foreseeable future.
[Fire General] beezar:
Great, thx for the info. Which of ggow's ROMs is the most stable? I'm assuming Fire Nexus?
[Fire General] DB126:
Both are stable and feature complete. Fire Nexus is pure AOSP that can be easily extended via Xposed framework; LineageOS has a few additional UI tweaks baked in. Choose your candy.
[Fire General] Anonturtle:
Would this work if already on 5.6? just curious, my dad bought an iPad and kinda forgot about this so I got bored and started messing with it but its not rooted and I haven't bothered to check the bootloader version yet
[Fire General] DB126:
Nope - no root, custom ROMs or bootable recovery once past 5.3.2 and 5.01, respectively.
[Fire General] Anonturtle:
Damn, thats a real shame, I get that Amazon doesn't want us to get rid of the ads unless we pay but cmon
[Fire General] DB126:
More to so with ecosystem lock-in and security than running ads. I would do the same thing if running Amazon's device division. Notice most Android/iOS Gizmo's are unlockable/unrootable? Yeah - there's a reason for that. If there was money to be made selling unlocked device you'd see a boatload on the market. The <5% (probably closer to 1%) crowd that make up noisy Android enthusiasts doesn't move the needle.
[Fire General] wfg97079:
Got a fire HD6 4th gen at 5.3.1.0 but doesnt seem to have any recover installed. Does have root via kingroot. What are my options for getting a recovery on there?
[Fire General] DB126:
Wrong forum; ask here: https://xdaforums.com/fire-hd
[Fire General] bibikalka:
Tried the approach just now, and updated the instructions in post #1 - probably will help 1 or 2 individuals at most ;)

Newest ROMs are not compatible with the older bootloaders, so there is a ceiling on the ROM version that's recommended. Weirdly enough, I managed to get through 1 bootloop successfully by somehow pushing the Pwr button (with version 5.6.0.1), but then I could never repeat the trick, and had to sideload the older version.
[Fire General] aylfila465:
Google play
[Fire General] aylfila465:
G900f
[Fire General] aylfila465:
J700f
[Fire General] i.REN:
Can this be used to restore a 2015 Ford to stock? It's currently running Nexus Rom, which is at 5.1.1. I'm not sure what FireOS version it was on before I put the custom rom on it or even what the process was to get the custom rom on it. I'm pretty sure this is at least the second rom I've had on it since I've had the device (I might have had others to try them out). Ideally, what I would really like to do is flash a new custom rom since I've already been able to do that before and it is currently rooted but without TWRP I don't know how to do that.

Device purchased August 2016. It's unlikely I ever updated the FireOS so whatever it came with at the time is most likely what it had when I first made any modifications.
[Fire General] Pond-life:
Yeah that blueshade is rather extreme. The colouring, hmmm can't imagine using it, Lux ftw.

Seems to be an extra option for things you can push to sd, but I can't recall what the original 3 were. :o

It might be the pushing apps there.

Seems to be more settings in the apps and games section, but maybe I didn't look there well enough before.

Keyboard seems to have changed name. Not sure if it's same one or not, still doesn't have swype function, still defaults to blocking my potty mouth.

Don't seem to be any extra system languages
[Fire General] bibikalka:
I've explained the update a bit better in the original post in order for people to understand what the process does.

Also, for missing languages, use "More Locale 2" from the PlayStore (or Internet). I installed it and was able to turn on Russian. While it's not perfect (a lot of things are still in English), over time it looks like it converted more and more things to Russian.
[Fire General] Pond-life:
Ah got it, so if step three fails, though can't think why it would, you'd end up with same problems as those that did the OTA?
[Fire General] bibikalka:
The zip file flashes fine, I've flashed it without problems. If 5.1.1 does not boot for some reason, one has 5.0.1 bootloaders & recovery and so can run either TWRP via fastboot, or sideload 5.0.1 via recovery without issues.
[Fire General] DoLooper:
:victory: This is an incredible gift! I hit thanks, but just wanted to say so, too.
[Fire General] julianpaul:
dem kids gonna hate 5-11
[Fire General] newuzer1:
Any way to do this (root, GAPPS, recovery/TWRP access) if you're on 5.1.1? Unfortunately, I got it yesterday, started the update process, then came to the forums while it was updating to 5.1.1.... :facepalm:
[Fire General] Pond-life:
Not currently. Mixed results on getting Gapps though through http://xdaforums.com/amazon-fire/general/installing-google-framework-playstore-t3216122
[Fire General] seanferd:
I was able to follow another thread to get root at 5.01, I'm trying to follow the instructions here and I don't understand what to do for steps 2.2 and 2.3 - I can get to TWRP and I've downloaded the files .. I assume I just need to have TWRP Install the zips now, right? How do I get the device to see them; do I have to move them over to the SD card first? I'm seeing that since I'm in TWRP my computer no longer recognizes the device so I can't mount it. What am I missing here?

Sorry if this is a dumb question, this is my first foray into rooting/flashing.

**Edit**

I did some googling and it does look like I manually need to move the files to the device to get TWRP to use them. I was just confused as the first steps on this article say to boot into TWRP, then download the files, etc.
[Fire General] Pond-life:
Yep you've got it right, just move the files to SD card and flash steps 1.2 and 1.3. If you want to block future OTA you need root so 1.4 too. If you want google play store you need 1.5 as well.
[Fire General] newuzer1:
Bummer. Does this seem like something developers can eventually work around? If not, I might scramble to get an exchange and hope its not 5.1.1.
[Fire General] DB126:
Root was obtained pretty quickly on 5.0.0/5.0.1. Really depends what vulnerabilities were exploited and how aggressive Amazon is about blocking them. On other devices and versions of FireOS Amazon has been increasingly effective closing vulnerabilities. They really don't want people altering devices that are essentially Amazon shopping portals.
[Fire General] seanferd:
Guys, I was able to follow the OP's instructions after figuring out the flash part. Worked flawlessly for me. Thank you all so much!
[Fire General] DB126:
Sweet

Worked fine. Retained all settings including SuperSu app permissions. Flashed items 2-4 individually (can also be combined), cleared cache/dalvik before rebooting system and confirmed fastboot/twrp access retained. Base 5.0.1 -> 5.1.1. Build date remained unchanged - Dec 2, 2015 12:29 AM

Reminder: Don't forget to reblock OTA (scan thread for filename/location).
[Fire General] abacabie:
Flawless upgrade

I was on stock 5.01 with root and Google , flashed 5.1.1, then fire_boot, Supersu and Pico (Uni) GAPPS , worked a treat with no problems and i have TWRP access.

I also noticed that when i disabled the app called "special offers" in titanium back up the lock screen ads have stopped, i had read that the old way on 5.01 doesn't work with this build so hopefully this sorts it.

thank you bibikalka for the guide.
[Fire General] trueno2k:
I have just one question!..

Does it have to be this particular GAPPS?.. Can I try Open GAPPS?.. Would appreciate the response please?.. Thanks...
[Fire General] Pond-life:
People reported problems with recent Opengapps on the third party roms, not sure if it was the same on the stock too, but I didn't chance it. I used open_gapps-arm-5.1-mini-20151129 with PicoGApps in a gapps-config.txt initially and then ran it again and let a few more Gapps install after emptying out the system partition a little.

So can use OpenGapps, but maybe not current ones.
[Fire General] trueno2k:
Not quite understand what you're trying to say in regards to Open GAPPS with PICO GAPPS and the ran it again to let a few more GAPPS install?.. Please clarify?..
[Fire General] Pond-life:
As it boots the system partition is quite full.

I had the mini gapps version already so added Picogapps written in a text file named gapps-config.txt in the same folder as the gapps file it installs Gapps as though it was the pico version.

Once I'd emptied it out I changed the gapps-config.txt file to add some more Google apps into the cleared system space.

It's one of the things opengapps can do.

https://github.com/opengapps/opengapps/wiki/Advanced-Features-and-Options
[Fire General] trueno2k:
Are there some differences for each new release of OPEN GAPPS?.. Is there some underlying structure change every day they release a new update?..

I just thought it's mainly the latest apps that's being integrated in to OPEN GAPPS that's the difference... How would the latest release not work compared to the miniOpen GAPPS you kept?..

I've deleted all of my old backups and have downloaded the latest ones not too long ago... :mad: Do you not recommend using these then?..

Any one out there using the latest OPEN GAPPS?..
[Fire General] 87racer:
Just curious, since we have the play store what is the advantage of using a GAPPS zip? Aren't all the Google apps pretty much available in the play store anyway? I just go install them from there and choose the ones I want. Then they are automatically updated by the play store too...
[Fire General] Pond-life:
Someone mentioned in another thread that opengapps keep the old ones. 4th was when they went awry, here's pico from the third.

https://github.com/opengapps/arm/releases/download/20151203/open_gapps-arm-5.1-pico-20151203.zip

check it with the md5

5011cfcb2ccd072726aaff421ca20e6d

---------- Post added at 01:40 AM ---------- Previous post was at 01:37 AM ----------

That's a fair point though I know a couple I wanted weren't about, and it does push them into system which saves me trying to push them there from titanium backup before finding once again that it can't actually do what it claims. They still get updated.
[Fire General] trueno2k:
Thanks for the link, though, is it really not recommended to use any of the others after the 3rd that is not the 4th release?..
[Fire General] hp420:
Has anyone tried systemless root on the 5.1.1 update?
[Fire General] trueno2k:
Seeing as I can't get a sure answer to my question with flashing OPEN GAPPS I guess I'll just soft install the 4 apks to get Play Store!.. I don't wanna risk the flash as this is a friends device and having to painstakingly trying to restore back to stock firmware after getting it to 5.1.1 with root for it, is something I will like to avoid completely!..
[Fire General] blueberry.sky:
Isn't Chainfire's systemless root only for Marshmallow (+ touchwiz based on 5.1)?

I guess if it can work on one 5.1 then there is a chance it could work the Fire OS.
[Fire General] hp420:
you're right, my mistake ;)
[Fire General] inscythe:
I checked the bootloader files you've provided, then I noticed that the boot.img (the kernel) has the same hash as the one from FireOS 5.0.1... Doesn't this mean that you are making the older kernel run FireOS 5.1.1?
[Fire General] quickben:
Damn, I just got a new one from the $35 sale, and it auto-updated to 5.1.1! Guess I'm stuck with this for now.
[Fire General] blueberry.sky:
I edited my post before I reloaded the page & saw you reply.

Actually, trying systemless root on FireOS 5.1.1 might be worth a shot. If it can work on one version of android 5.1 (touchwiz based on 5.1) then there is a chance. At first I thought it was solely for Marshmallow.
[Fire General] Jekodark:
Guys i have a problem. I followed the instructionts and now i have 5.1.1 and root. But i can't use adb shell pm hide or go to TWRP recovery (i can see my device if i write adb devices) because it says "< waiting for devices >". I'm 99 % sure i flashed the first 3 files :o .
[Fire General] Pond-life:
The shell hide not working is expected I believe hence the op saying to rename the OTA file not hide it.

What is on the tablet screen when the pc says <waiting for devices>?
[Fire General] Jekodark:
nothing. it just says that adb is activated.
[Fire General] 87racer:
If you are booted into android type adb reboot-bootloader. this will reboot to fastboot. then type fastboot boot <recoveryname>

waiting for device usually means device isnt connect, device isn't in fastboot mode, or drivers aren't working\installed.
[Fire General] bibikalka:
Indeed, I made the update file out of the 5.0.1 version, and forgot to delete boot.img. Note however that the actual script does not write boot.img anywhere, since the relevant line in "META-INF\com\google\android\updater-script" is commented out. So it just sits there doing nothing.
[Fire General] parkerlreed:
How are we supposed to load zip files if USB is completely broken in TWRP? I'm using the provided image (http://xdaforums.com/amazon-fire/orig-development/twrp-recovery-t3242548) but on two tablets now the USB devices shows up as corrupted on the computer. Tried multiple cables too. It just seems like an issue with TWRP on the device.
[Fire General] DB126:
Well, a few ways come to mind (worked with my devices; rooted and happily rocking 5.1.1 per OP) ...

- tether and copy files to internal storage

- put files on SD card

- adb push ...

Perhaps I don't understand the obstacle (yeah - OTG may not be working but there are other ways to skin the cat)
[Fire General] parkerlreed:
Yeah I just ended up using the SD card from my other one. It just seems weird I haven't seen any mention of USB not working in TWRP. It's happening on two Fire 2015's for me. I don't think there is anything wrong with my computer.
[Fire General] bibikalka:
That's weird since OTG is working for me just fine in TWRP, so I can install things from a USB drive with no issues ...
[Fire General] DB126:
Confirming OTG also works on my device (in addition to the other three methods). Possible device might not like [MENTION=2099136]parkerlreed[/MENTION] USB drive and/or OTG dongle.

Suppose it's worth noting mounting an external file system (eg: host drives) in TWRP is not currently supported. Works in many TWRP implementations but not on HDX or (apparently) 2015 variants. On the HDX (with locked bootloader) it is a death sentence if one does not keep a flashable OS on internal storage and can only boot into TWRP (eg: if system fails to start). HDX does not support OTG and has no SD slot. Thank goodness both on the newest Fire!
[Fire General] dony71:
I don't understand this

If now Amazon already push OTA for rev.5.1.2, how are you going to block update after in rev.5.1.1 ?

To block OTA, in Explorer go to In Explorer go to /system/priv-app/DeviceSoftwareOTA and rename DeviceSoftwareOTA.apk to .apk_and rename DeviceSoftwareOTA.apk to .apk_

which means have to load firmware first, but OTA update happens while boot process before finishing loading firmware

Can somebody explain step by step process to block?
[Fire General] DB126:
Two scenarios (assuming rooted 5.x.x with 5.0.1 bootloader and twrp):

- If 5.1.2 is already on your device you will need to go directly into fastboot (several methods), boot twrp and then execute a 'Factory Reset' from the Wipe menu (slider at bottom of screen). This should remove the pending 5.1.2 update. Take device to a location where it can not connect to wifi via an existing profile, reboot system and block OTA as described.

- If 5.1.2 has not been downloaded simply invoke airplane/flight mode and block OTA as described.

If unsure follow first step. Note: I am not sure the data partition needs to be wiped (taking all your personal data and side loaded apps); some have said clearing cache will prevent downloaded an OTA update from installing. Until confirmed by an experienced contributor I would take the more cautious route and do the 'Factory Reset'.
[Fire General] hp420:
The device uses wifi. Even if you leave wifi enabled and it tries to connect immediately at boot all you have to do is ensure there's no wifi to connect to by turning your router off. All you need to do is ensure there's no way for it to connect when it boots. Disabling wifi on the tab isn't the only way to do that ;)

twrp also has a root-capable file browser...just sayin' ;)
[Fire General] dony71:
Thanks for the hint

Since rev.5.1.2 already out, do you know whether I can use rev.5.1.2 with 5.0.1 boot loader?
[Fire General] parkerlreed:
I am NOT using a USB drive or OTG cable. I am talking about plugging into a computer and using adb push/sideload FROM the computer. It doesn't show up correctly on the computer. I was just wondering if this was a known issue.
[Fire General] bibikalka:
Is it out ? Where ?

If you can capture the update file, it should be easy to re-run TWRP with the new version. Since 5.1.1 works with the older bootloaders, chances are 5.1.2 will be just fine too. In any event, if it does not work, you can re-load either 5.1.1 or even 5.0.1 via TWRP.
[Fire General] DB126:
It is - as noted in the second part of my earlier response. Similar situation on other Amazon devices. Not critical on 2015 Fire (imo) due to SD slot and OTG support. Glad you were able to work through it.

---------- Post added at 10:05 PM ---------- Previous post was at 09:59 PM ----------

Just don't let it (any upgrade) install as it will likely wipe out root, 5.0.1 bootloader and access to fastboot. Capture and then wipe from device. Notify community so a dev can take a look. Of course, you need to have OTA enabled to capture the update and pay close attention to what your device is doing.
[Fire General] hp420:
I didn't even update to 5.1.1. I just flashed cm straight out of the box, rather than worry about it.
[Fire General] Pond-life:
I think the 5.1.2 was just hypothetical as it's only place I've seen it mentioned and sentence started If...

That was what I was just wondering, so I don't need to reboot to check now :D
[Fire General] psrose:
TWRP Boot Failure from Fastboot

I keep trying to boot TWRP to flash CM12 and keep getting this error. The tablet screen says USB Transmission is OK but never boots into TWRP. I installed the drivers and confirmed the Fire tablet is recognized by the computer. Could it be an old driver causing this? Can someone help me figure out why I can't boot TWRP? Once I get TWRP to boot I know everything else to install CM, Gapps, and SuperSU. My knowledge of adb is very minimal. Thanks.

[IMG="Boot TWRP Failure"]https://dl.dropboxusercontent.com/u/14626340/Capture.PNG[/IMG]

Tablet recognized by computer
[Fire General] Pond-life:
Did you follow the method in this thread to get to 5.1.1? Or is it on 5.1.1 from OTA? Or still on 5.0.1?

Guessing it's not the first as twrp as presuming you've not got twrp to work to follow it, but second one seems most likely.

If it's the second you can't use twrp at the moment, hence this thread for getting people to 5.1.1 without ota to keep root and twrp access

If it's the last judging by it transferring the boot image the fastboot driver seems to be working, so that'd be most confusing.