yashsingh1/xdaforums huggingface dataset:
[Fire HD 8 and HD 10 Original Android Development] blueman2:
Trying this on my new HD10 from prime. I have SuperSU installed using mtk-su then using Rortiz2 script. When I try to run step-1.sh, it just sits at "Testing root access". Any thoughts?
[Fire HD 8 and HD 10 Original Android Development] k4y0z:
Make sure you have SuperSU default set to grant and make sure you use a current version of adb.

Would have been easier to just use amonet with mtk-su directly instead of first installing SuperSU.
[Fire HD 8 and HD 10 Original Android Development] blueman2:
I was a bit of an idiot. I did not realize the the step between step-1.sh and step-2.sh was not needed for my firmware. I was just going step by step and missed that this was only needed if newer firmware (mine is from Nov 2018). I managed to put my device into black screen and it will not boot.

After messing around a bit, I pulled the power plug out and in several times, and it sure enough rebooted just fine. Completed step-2.sh and TWRP booted up! All is good. Thanks for the guidance, [MENTION=7104332]k4y0z[/MENTION]!
[Fire HD 8 and HD 10 Original Android Development] sgjahn:
So I'm a little confused and a complete newb to hacking Android.. I just got an HD10 and it's running 5.6.4.0. Do I run the step1 script first or do I run the commands in the notes section to downgrade first?
[Fire HD 8 and HD 10 Original Android Development] Tomkun.:
Hello.

I wonder if anyone can help me.

I am stuck in bootrom mode. I have tried to use bootrom-step and bootrom-step-minimal, but it always fails. I get one of three situations.

1. It hangs at "handshake" or "Disable Watchdog"

2. It gives the error "Serial protocol mismatch"

or, most commonly:

3. It gives the error "(device disconnected or multiple access on port?)"

lsusb tells me:

Bus 001 Device 060: ID 0e8d:2000 MediaTek Inc. MT65xx Preloader

But it also seems that the tablet is connecting/disconnecting constantly - is that normal?
[Fire HD 8 and HD 10 Original Android Development] k4y0z:
You always start with step-1.sh, then depending on your firmware-version you can either continue with step-2.sh, or it will ask you to brick and continue with bootrom-step-minimal.sh

As noted previously, reinstall the ROM and do a factory reset.
[Fire HD 8 and HD 10 Original Android Development] Rongict:
Can you tell me how to do it?

I followed the instructions https://www.google.com/amp/s/xdafor...-how-to-restore-frimware-device-t3238740/amp/ .

but failed.

When I checked with the adb devices command, I noticed that I got hd 10. fire, but when I used adb sideload command and pulled the rom file into cmd, it was not successful.

Can you tell me how to fix it?

thank you
[Fire HD 8 and HD 10 Original Android Development] k4y0z:
I'm sorry, this is out of the scope of this thread.

You haven't even said if you have TWRP or stock recovery.

Better ask in general section and open a new thread.
[Fire HD 8 and HD 10 Original Android Development] Parafly:
Hi all,

So I picked up two hd10's on Prime day after trading in some old tablets. Made it through the process on both of them (one had to go through the brick process as it was a higher OS version, the other one sailed right through).

Now I"m confused on what to do next. These are my kids tablets and my primary goal is to install Nova, play store, and mimic stock android as much as possible and remove Amazon bloatware that slows it down. And obviously stop OTA updates. Also i'd like to set them up with my kids google accounts so I can do some basic parental controls.

I installed Magisk also but unsure where to go next? anyone point me to good next steps. or suggestions?

---------- Post added at 12:42 PM ---------- Previous post was at 12:34 PM ----------

I also did it perfectly using virtual box with ubuntu. This post was very helpful for me.

https://xdaforums.com/showpost.php?p=79676336&postcount=661
[Fire HD 8 and HD 10 Original Android Development] Rongict:
Ok. Thakz
[Fire HD 8 and HD 10 Original Android Development] sgjahn:
Thanks for that. I'm running into an issue. When I type the first command to start step 1, nothing happens. I run the command "adb devices" and my device shows up as unauthorized. I never got a popup on the fire tablet to authorize the computer. Am I doing something wrong here.

Edit: I guess I should mention that I'm trying this using Ubuntu Live running from a USB stick.
[Fire HD 8 and HD 10 Original Android Development] sgjahn:
Ok. I finally got things to start moving in the right direction. I used a different version of Ubuntu on a USB stick. I booted to it. I ran the first 3 commands to install adb, fastboot, etc. I then plugged in my fire hd 10. This time the tablet asked for authorization which I allowed. I typed in "adb devices" and sure enough it showed up properly.

So I then ran "sudo ./step-1.sh". It said that I needed to downgrade (as expected) and that I'd have to brick. I typed "Yes". I then typed in "sudo systemctl stop ModemManager" and "sudo systemctl disable ModemManager" both of which were successful. I disconnected the tablet and ran "sudo ./bootrom-step-minimal.sh" and then reconnected the tablet. The script is hanging at this point and says "Waiting on bootrom". It doesn't continue and the tablet does not reboot. Any ideas? Thanks for all your help.

Edit: Ok, I just saw the post a few pages back that said to hold the power button for a while if it hangs at this point. I'll try this when I get home. Sorry for all the questions. I'm just heading into uncharted territory with this.
[Fire HD 8 and HD 10 Original Android Development] k4y0z:
You are not stuck in bootrom-mode, read the instructions again, especially Post #2, since it seems like you are trying to unbrick?

You haven't said what you did exactly.
[Fire HD 8 and HD 10 Original Android Development] idorobots:
I'm having a bit of trouble with my fire hd 10, while executing bootrom-step-minimal.sh the script stalled at flashing the preloader so I killed it

[2019-07-18 13:01:10.298386] Force fastboot
[2019-07-18 13:01:11.867953] Flash preloader
[361 / 361]
[171 / 353]
^CTraceback (most recent call last):
File "main.py", line 192, in <module>
main()
File "main.py", line 184, in main
flash_binary(dev, "../bin/preloader.bin", 520)
File "main.py", line 37, in flash_binary
flash_data(dev, data, start_block, max_size=0)
File "main.py", line 28, in flash_data
dev.emmc_write(start_block + x, data[x * 0x200:(x + 1) * 0x200])
File "/home/karam/Desktop/Fire/amonet/modules/common.py", line 207, in emmc_write
self.dev.write(p32_be(0x1001))
File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 538, in write
_, ready, _ = select.select([], [self.fd], [], None)
KeyboardInterrupt

I then ran the script again and this time I got the following error:

[2019-07-18 13:25:27.577281] Waiting for bootrom
[2019-07-18 13:25:40.696328] Found port = /dev/ttyACM0
[2019-07-18 13:25:40.696692] Handshake
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 495, in read
raise SerialException('device reports readiness to read but returned no data (device disconnected or multiple access on port?)')
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 192, in <module>
main()
File "main.py", line 82, in main
handshake(dev)
File "/home/karam/Desktop/Fire/amonet/modules/handshake.py", line 9, in handshake
dev.handshake()
File "/home/karam/Desktop/Fire/amonet/modules/common.py", line 103, in handshake
c = self._writeb(b'\xa0')
File "/home/karam/Desktop/Fire/amonet/modules/common.py", line 98, in _writeb
return self.dev.read()
File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 505, in read
raise SerialException('read failed: %s' % (e,))
serial.serialutil.SerialException: read failed: device reports readiness to read but returned no data (device disconnected or multiple access on port?)

And then my tablet booted up to a screen with the white amazon logo in the middle and the text "=> HACKED FASTBOOT mode: (0) - xyz, k4y0z" in the bottom left corner

I then attempted to run the script fastboot-step.sh but it got stuck at waiting for device

Your device will be reset to factory defaults...
Press Enter to Continue...

< waiting for device >
^C

Is there anything I can do to confirm that the preloader was flashed correctly? If it wasn't (based on the logs) then how should I proceed?

Thanks ahead of time
[Fire HD 8 and HD 10 Original Android Development] k4y0z:
If you see the "HACKED FASTBOOT" screen, then preloader is working fine!

There's actually two copies of preloader and the first one flashed fine, so that's ok.

Make sure you have current fastboot-version and run fastboot-step.sh with sudo.

Also check USB cable and ports.
[Fire HD 8 and HD 10 Original Android Development] Tomkun.:
Ah, yes I beg your pardon. That was a mistake. I am stuck in "preloader-mode". Sorry, I'm not familiar with all the terminology.

Anyway, I will take you step by step through what I did and hopefully, that'll shed some light on it.

I was/am trying to get root and install TWRP. I have a fully up to date Fire 10 7th gen. I am using Ubuntu in a VM on a Windows 10 laptop. I have previously used this setup to setup TWRP on a Fire 7 and a Fire HD 8, so have no reason to assume the environment is at fault.

I followed the steps up until the end of step 3, "fastboot-step". At this point, the tablet booted into TWRP earlier than expected (according to the instructions, that shouldn't happen until step 4). I didn't have Magisk on my tablet at this point so I rebooted into the OS, skipped the wifi setup and re-enabled ADB.

Next, I continued from step 4. "step-2.sh" and now I am in preloader mode and don't know how to get out of it.

Please help!
[Fire HD 8 and HD 10 Original Android Development] sgjahn:
I've tried using the "sudo ./bootrom-step-minimal.sh" command but it errors out with the following:

ubuntu@ubuntu:~/Desktop/FireHack/amonet$ sudo ./bootrom-step-minimal.sh

[2019-07-18 22:52:38.484060] Waiting for bootrom

[2019-07-18 22:53:00.986370] Found port = /dev/ttyACM0

[2019-07-18 22:53:01.025636] Handshake

[2019-07-18 22:53:01.046665] Disable watchdog

b''

b'\x00\x01'

Traceback (most recent call last):

File "main.py", line 192, in <module>

main()

File "main.py", line 82, in main

handshake(dev)

File "/home/ubuntu/Desktop/FireHack/amonet/modules/handshake.py", line 11, in handshake

dev.write32(0x10007000, 0x22000000)

File "/home/ubuntu/Desktop/FireHack/amonet/modules/common.py", line 163, in write32

self.check(self.dev.read(2), b'\x00\x01') # arg check

File "/home/ubuntu/Desktop/FireHack/amonet/modules/common.py", line 90, in check

raise RuntimeError("ERROR: Serial protocol mismatch")

RuntimeError: ERROR: Serial protocol mismatch

I've followed the instructions but something seems to not be working. Any help is appreciated.
[Fire HD 8 and HD 10 Original Android Development] k4y0z:
So running step-2.sh should not have been necessary if you went the brick-route and already had TWRP.

It should not have caused the brick you have now either, hard to tell what happened without the output of the script.

Try holding power for 30 seconds and then try turning it back on.

If that doesn't work you will have to open the device and follow the unbrick procedure in Post #2.

Do you have ModemManager disabled?
[Fire HD 8 and HD 10 Original Android Development] sgjahn:
I believe so. I put in the 2 commands:

sudo systemctl stop ModemManager

sudo systemctl disable ModemManager

is there any way to tell?
[Fire HD 8 and HD 10 Original Android Development] k4y0z:
If the commands were successful it should be disabled.

You can check with

sudo systemctl status ModemManager

Did you run step-1.sh first and confirmed bricking? Does the tablet still power on?

what is the output of lsusb with the tablet connected?
[Fire HD 8 and HD 10 Original Android Development] sgjahn:
This is what came up:

Jul 18 10:21:45 ubuntu systemd[1]: Started Modem Manager.
Jul 18 10:21:48 ubuntu ModemManager[1269]: <info> Couldn't check support for de
Jul 18 10:21:48 ubuntu ModemManager[1269]: <info> Couldn't check support for de
Jul 18 10:22:15 ubuntu ModemManager[1269]: <info> Couldn't check support for de
Jul 18 10:22:15 ubuntu ModemManager[1269]: <info> Couldn't check support for de
Jul 18 10:28:34 ubuntu ModemManager[1269]: <info> Caught signal, shutting down.
Jul 18 10:28:34 ubuntu systemd[1]: Stopping Modem Manager...
Jul 18 10:28:34 ubuntu ModemManager[1269]: <info> ModemManager is shut down
Jul 18 10:28:34 ubuntu systemd[1]: ModemManager.service: Succeeded.
Jul 18 10:28:34 ubuntu systemd[1]: Stopped Modem Manager.
[Fire HD 8 and HD 10 Original Android Development] sgjahn:
So I don't know if this helps but when i use the command

sudo ./bootrom-step-minimal.sh

the terminal says "waiting on bootloader"

I then issue the command

adb reboot bootloader

from another terminal window.

The tablet reboots, I get the serial error, but the tablet is booted into fastboot mode.

Then when I issue the command

sudo ./fastboot-step.sh

I get a transfer error due to locked hardware. I'm guessing the hacked fastboot never transferred. It seems that since I have to force the reboot (it doesn't reboot on it's own), the script loses connectivity long enough to error out.
[Fire HD 8 and HD 10 Original Android Development] idorobots:
I'm running the script with sudo and I tried a different USB cable and port. fastboot still gets stuck at < waiting for device >

I'm fairly certain it is up to date, here are the contents of the script

#!/bin/bash

set -e

echo "Your device will be reset to factory defaults..."
echo "Press Enter to Continue..."
read

fastboot flash recovery_x bin/twrp.img
fastboot erase userdata
#fastboot format userdata
fastboot oem reboot-recovery

echo ""
echo ""
echo "Your device should now reboot into TWRP"
echo ""

---------- Post added at 02:39 AM ---------- Previous post was at 02:23 AM ----------

No devices show up when I run adb devices or fastboot devices and the problem isn't the usb port or usb cable

---------- Post added at 03:03 AM ---------- Previous post was at 02:39 AM ----------

I've also tried running both commands as root (both by using sudo and by entering the root shell on my laptop)
[Fire HD 8 and HD 10 Original Android Development] sgjahn:
I just had success. It turns out that my USB cable had to be connected to the USB ports directly on my motherboard. The scripts did not work if I used the USB ports on the front panel. Hopefully this will help someone in the future.
[Fire HD 8 and HD 10 Original Android Development] Tomkun.:
The 30 seconds off thing didn't work, so I ended up taking the tablet apart and finally got it fixed. Thanks for your advice.

I think that the instructions in the OP need to be updated to warn users that step 2 isn't necessary if they did the downgrade step. I've had a lot of headache over something that I shouldn't have done, even though I followed the instructions to the letter.
[Fire HD 8 and HD 10 Original Android Development] k4y0z:
I am talking about the version of your fastboot.

If the device is showing "HACKED FASTBOOT" it should be detected, try powering it off an on again (Don't try to enter recovery).

Try different usb-ports and cables, try if it is detected in windows.

It's not an issue with the tablet.

Glad you got it fixed.

As said even though not strictly necessary, running step-2.sh should not have caused the brick.

So without the output I don't really know what happened.

step-2 does a few additional steps that aren't done when you go the brick route, such as writing the backup GPT.
[Fire HD 8 and HD 10 Original Android Development] idorobots:
The version of my fastboot is (1:6.0.1+r16-3) and I just reinstalled it but it still did not detect the tablet. I don't know if this is odd but whenever I turn the tablet off, it turns right back on on its own still showing "HACKED FASTBOOT mode: (0) - xyz, k4y0z" I tried different cables and ports, I'll now try going into windows

I also checked that the tablet is at the very least showing up as a device somewhere and it is under lsusb - Bus 001 Device 031: ID 1949:0280 Lab126, Inc.
[Fire HD 8 and HD 10 Original Android Development] k4y0z:
That is an old version, try installing a newer one

sudo apt update
sudo apt remove android-tools-fastboot
sudo apt install fastboot

Or download the current version from here: https://developer.android.com/studio/releases/platform-tools

Yes, that is on purpose, so you can use hacked fastboot to flash twrp (using fastboot-step.sh script)

That confirms that the tablet is in fastboot-mode, so the tablet isn't the issue here.
[Fire HD 8 and HD 10 Original Android Development] -BoneZ-:
That last person didn't report back, and I'm also stuck on Hacked Fastboot mode on the tablet, while my console in Linux is "Waiting for Device". I've shut the tablet down and it comes back on by itself, but no changes to console or the tablet. Not sure how to proceed from this point.

**Edit** I'm thinking part of the problem is that there is no Android-Tools-Fastboot installed. It's only Android-SDK, then Platform-Tools, then Fastboot. That's what got installed from the beginning of the steps. And because of this naming, maybe the script can't launch Fastboot?

There's an Android folder and Android-SDK folder in usr/lib. The SDK is the one with Platform-Tools and Fastboot. There are no folders in the Android folder, only files. No fastboot. I'm wondering if I need to create the "Tools" folder inside the Android folder, then put "Fastboot" in there, if that would work?

**Edit 2** Making a tools folder inside the Android folder, and then putting Fastboot in there didn't work either. I still think this is a folder/file location problem. Still stuck and waiting for further instructions.

---------- Post added at 05:19 PM ---------- Previous post was at 04:46 PM ----------

My previous post above was for you. Just posting this to tag you.
[Fire HD 8 and HD 10 Original Android Development] k4y0z:
The "Waiting for Device" is coming from fastboot...

Just try to run fastboot manually (and find out it's version):

fastboot --version
[Fire HD 8 and HD 10 Original Android Development] -BoneZ-:
It says this:

fastboot version debian
[Fire HD 8 and HD 10 Original Android Development] idorobots:
I couldn't get it to work until I downloaded the platform tools directly from https://developer.android.com/studio/releases/platform-tools and just executed the commands from the fastboot script manually (you could probably just add the platform-tools to your path, uninstall fastboot and run the script though).

I'm not sure why the repositories that apt-get have access to aren't updated with the latest version of fastboot.
[Fire HD 8 and HD 10 Original Android Development] k4y0z:
Is that all it says? It should print out a version-number.

Yes, that should work, I have suggested it earlier.

It really depends on the distro and version you are using, which fastboot-version you'll be getting.

Using an up-to-date Ubuntu or Debian should get you a current version if you use the "fastboot" package instead of the "android-tools-fastboot" package.
[Fire HD 8 and HD 10 Original Android Development] -BoneZ-:
Would you mind going into a bit more detail when you get a free minute or two? I've installed Java, and my tablet is in Hacked Bootloader mode. I just need to get a working fastboot so that the commands can finish. I'm a Linux noob, so not sure how to do things manually like you suggested.
[Fire HD 8 and HD 10 Original Android Development] eyok:
Stuck on Waiting for bootrom

After running

sudo ./bootrom-step-minimal.sh​

sudo systemctl stop ModemManager​

sudo systemctl disable ModemManager​

I unplugged the tablet and ran

sudo ./bootrom-step-minimal.sh​

However, I'm getting stuck on [2019-07-21 02:38:00.539914] Waiting for bootrom and nothing is happening.

What may be the problem and how do I resolve it?

Reading through the code, it looks like the device isn't being found. That makes sense because we were trying to brick it...
[Fire HD 8 and HD 10 Original Android Development] Turkishflavor:
WSL? World Surf League?
[Fire HD 8 and HD 10 Original Android Development] eldu69:
No it is for Windows Subsystem for Linux. Go to microsoft store, download ubuntu, and follow k4y0z's procedure
[Fire HD 8 and HD 10 Original Android Development] idorobots:
The contents of the script fastboot-step.sh are

#!/bin/bash

set -e

echo "Your device will be reset to factory defaults..."
echo "Press Enter to Continue..."
read

fastboot flash recovery_x bin/twrp.img
fastboot erase userdata
#fastboot format userdata
fastboot oem reboot-recovery

echo ""
echo ""
echo "Your device should now reboot into TWRP"
echo ""

The only 3 commands that need executing are

fastboot flash recovery_x bin/twrp.img
fastboot erase userdata
fastboot oem reboot-recovery

and they need to be ran as root (using sudo) so I ran the following commands out of amonet's parent directory (I also put platform-tools in that directory)

sudo ./platform-tools/fastboot flash recovery_x amonet/bin/twrp.img
sudo ./platform-tools/fastboot erase userdata
sudo ./platform-tools/fastboot oem reboot-recovery
[Fire HD 8 and HD 10 Original Android Development] -BoneZ-:
That worked perfectly. Now I'm stuck on the last step lol:

sudo ./step-2.sh

It's giving me this output:

./step-2.sh: line 9: adb: command not found

Now what I did was keep the Platform-Tools in the directory you suggested, then changed the $Path in the .bashrc file to point to that directory for ADB. ADB works just fine everywhere, but step-2.sh is still erroring on the adb command which is "wait-for-device". When I type that adb command in any terminal window, it works just fine. I'm not sure why it's not working using the script.

What happens when I start typing the commands manually from the script is that when I get to Line 9 "adb wait-for-device", something thinks ADB isn't installed. That's the output from the terminal, is that I need to install ADB.

I'm now stuck once again, this time on the final step lol.
[Fire HD 8 and HD 10 Original Android Development] idorobots:
you don't need to run step-2.sh since you went with the bricking route. The OP should be updated since it's misleading
[Fire HD 8 and HD 10 Original Android Development] -BoneZ-:
Tagging you as well for this for my post above. Thank you.

---------- Post added at 04:16 PM ---------- Previous post was at 04:12 PM ----------

Alright, when I'm reading the commands in step-2.sh, it's pushing root. Since I didn't have root before, how do I know whether I have it now or not?
[Fire HD 8 and HD 10 Original Android Development] idorobots:
after the fastboot step you should boot into TWRP from where you can begin flashing magisk (I followed steps here - https://www.xda-developers.com/how-to-install-magisk/) and then you should have root set up
[Fire HD 8 and HD 10 Original Android Development] -BoneZ-:
Thanks for all your help! It's much appreciated. I'll just install the ROM that already has Magisk and everything else ready to go. Wish I could give more thanks to you!
[Fire HD 8 and HD 10 Original Android Development] idorobots:
Glad to help :) I'd appreciate it if you could point me to the ROM you're talking about! I'm also just starting to look into that stuff now
[Fire HD 8 and HD 10 Original Android Development] -BoneZ-:
https://xdaforums.com/hd8-hd10/development/rom-t3929969/

And in this order from the OP:

https://xdaforums.com/showpost.php?p=79684141&postcount=78

Just put the zips onto your tablet and flash with TWRP. Super-simple.
[Fire HD 8 and HD 10 Original Android Development] idorobots:
Thanks! Do you know how to do the first step (format /system)?