[Fire HD 8 and HD 10 Original Android Development] deathlessster:
this method success and output script for first device is :

khalid@DESKTOP-B1I4TKE:/mnt/d/fire hd 8 2017 ar/amonet-douglas-test/amonet$ ./step-2.sh

Testing root access...

uid=0(root) gid=0(root) context=u:r:init:s0

Looking for partition-suffix

lrwxrwxrwx root root 2010-01-30 03:51 recovery_tmp -> /dev/block/mmcblk0p18

Couldn't find GPT files, regenerating from device

Dumping GPT

34+0 records in

34+0 records out

17408 bytes transferred in 0.011 secs (1582545 bytes/sec)

/data/local/tmp/gpt.bin: 1 file pulled. 5.2 MB/s (17408 bytes in 0.003s)

Unpatching GPT

[2019-09-11 17:40:05.664834] Input GPT:

[2019-09-11 17:40:05.666280]

[2019-09-11 17:40:05.666650] Sector size (logical): 512 bytes

[2019-09-11 17:40:05.667126] Disk identifier (GUID): 6679D4EB-2287-4373-B34B-34015A123D2A

[2019-09-11 17:40:05.667565] Partition table holds up to 128 entries

[2019-09-11 17:40:05.667962] This partition table begins at sector 2 and ends at sector 33

[2019-09-11 17:40:05.668315] First usable sector is 34, last usable sector is 30777310

[2019-09-11 17:40:05.668655] Other partition table is at sector 30777343

[2019-09-11 17:40:05.668956]

[2019-09-11 17:40:05.669321] Number Start (sector) End (sector) Size Name

[2019-09-11 17:40:05.692612] 1 1024 7167 3.00 MiB proinfo

[2019-09-11 17:40:05.693845] 2 7168 16383 4.50 MiB PMT

[2019-09-11 17:40:05.694824] 3 16384 17407 512.00 KiB lk

[2019-09-11 17:40:05.695734] 4 17408 18431 512.00 KiB lk2

[2019-09-11 17:40:05.696577] 5 18432 51199 16.00 MiB boot

[2019-09-11 17:40:05.697423] 6 51200 86015 17.00 MiB recovery

[2019-09-11 17:40:05.698583] 7 86016 96255 5.00 MiB tee1

[2019-09-11 17:40:05.699409] 8 96256 106495 5.00 MiB tee2

[2019-09-11 17:40:05.700301] 9 106496 187391 39.50 MiB metadata

[2019-09-11 17:40:05.701260] 10 187392 189439 1024.00 KiB kb

[2019-09-11 17:40:05.702186] 11 189440 191487 1024.00 KiB dkb

[2019-09-11 17:40:05.703363] 12 191488 192511 512.00 KiB MISC

[2019-09-11 17:40:05.704509] 13 192512 208895 8.00 MiB reserved

[2019-09-11 17:40:05.705344] 14 208896 3515391 1.58 GiB system

[2019-09-11 17:40:05.706126] 15 3515392 4383743 424.00 MiB cache

[2019-09-11 17:40:05.707023] 16 4383744 30325759 12.37 GiB userdata

[2019-09-11 17:40:05.708254] 17 30325760 30551039 110.00 MiB boot_tmp

[2019-09-11 17:40:05.709392] 18 30551040 30776319 110.00 MiB recovery_tmp

[2019-09-11 17:40:05.751127]

[2019-09-11 17:40:05.751978] Regenerate primary and backup GPT from input

[2019-09-11 17:40:05.752827] Writing regenerated GPT to gpt-D01EB0A014660Q99-regen/gpt.bin.gpt

[2019-09-11 17:40:05.753826] Writing regenerated backup GPT to gpt-D01EB0A014660Q99-regen/gpt.bin.bak

[2019-09-11 17:40:05.755029] Writing backup GPT offset to gpt-D01EB0A014660Q99-regen/gpt.bin.offset

[2019-09-11 17:40:05.756446]

[2019-09-11 17:40:05.756953] Unpatched GPT:

[2019-09-11 17:40:05.758575]

[2019-09-11 17:40:05.759106] Sector size (logical): 512 bytes

[2019-09-11 17:40:05.759568] Disk identifier (GUID): 6679D4EB-2287-4373-B34B-34015A123D2A

[2019-09-11 17:40:05.760048] Partition table holds up to 128 entries

[2019-09-11 17:40:05.760572] This partition table begins at sector 2 and ends at sector 33

[2019-09-11 17:40:05.761246] First usable sector is 34, last usable sector is 30777310

[2019-09-11 17:40:05.761691] Other partition table is at sector 30777343

[2019-09-11 17:40:05.762242]

[2019-09-11 17:40:05.762796] Number Start (sector) End (sector) Size Name

[2019-09-11 17:40:05.763826] 1 1024 7167 3.00 MiB proinfo

[2019-09-11 17:40:05.764713] 2 7168 16383 4.50 MiB PMT

[2019-09-11 17:40:05.765612] 3 16384 17407 512.00 KiB lk

[2019-09-11 17:40:05.766546] 4 17408 18431 512.00 KiB lk2

[2019-09-11 17:40:05.767639] 5 18432 51199 16.00 MiB boot

[2019-09-11 17:40:05.768577] 6 51200 86015 17.00 MiB recovery

[2019-09-11 17:40:05.769535] 7 86016 96255 5.00 MiB tee1

[2019-09-11 17:40:05.770411] 8 96256 106495 5.00 MiB tee2

[2019-09-11 17:40:05.771309] 9 106496 187391 39.50 MiB metadata

[2019-09-11 17:40:05.772229] 10 187392 189439 1024.00 KiB kb

[2019-09-11 17:40:05.775233] 11 189440 191487 1024.00 KiB dkb

[2019-09-11 17:40:05.776271] 12 191488 192511 512.00 KiB MISC

[2019-09-11 17:40:05.777072] 13 192512 208895 8.00 MiB reserved

[2019-09-11 17:40:05.777794] 14 208896 3515391 1.58 GiB system

[2019-09-11 17:40:05.778577] 15 3515392 4383743 424.00 MiB cache

[2019-09-11 17:40:05.779389] 16 4383744 30777310 12.59 GiB userdata

[2019-09-11 17:40:05.815551]

[2019-09-11 17:40:05.816207] Writing primary GPT (unpatched) to gpt-D01EB0A014660Q99-regen/gpt.bin.unpatched.gpt

[2019-09-11 17:40:05.817125] Writing backup GPT (unpatched) to gpt-D01EB0A014660Q99-regen/gpt.bin.unpatched.bak

Modifying GPT

[2019-09-11 17:40:06.116053] Input GPT:

[2019-09-11 17:40:06.118124]

[2019-09-11 17:40:06.118649] Sector size (logical): 512 bytes

[2019-09-11 17:40:06.119978] Disk identifier (GUID): 6679D4EB-2287-4373-B34B-34015A123D2A

[2019-09-11 17:40:06.120484] Partition table holds up to 128 entries

[2019-09-11 17:40:06.121058] This partition table begins at sector 2 and ends at sector 33

[2019-09-11 17:40:06.121634] First usable sector is 34, last usable sector is 30777310

[2019-09-11 17:40:06.122210] Other partition table is at sector 30777343

[2019-09-11 17:40:06.122848]

[2019-09-11 17:40:06.123387] Number Start (sector) End (sector) Size Name

[2019-09-11 17:40:06.124761] 1 1024 7167 3.00 MiB proinfo

[2019-09-11 17:40:06.125549] 2 7168 16383 4.50 MiB PMT

[2019-09-11 17:40:06.126316] 3 16384 17407 512.00 KiB lk

[2019-09-11 17:40:06.127110] 4 17408 18431 512.00 KiB lk2

[2019-09-11 17:40:06.127915] 5 18432 51199 16.00 MiB boot

[2019-09-11 17:40:06.128868] 6 51200 86015 17.00 MiB recovery

[2019-09-11 17:40:06.129696] 7 86016 96255 5.00 MiB tee1

[2019-09-11 17:40:06.130497] 8 96256 106495 5.00 MiB tee2

[2019-09-11 17:40:06.131286] 9 106496 187391 39.50 MiB metadata

[2019-09-11 17:40:06.132245] 10 187392 189439 1024.00 KiB kb

[2019-09-11 17:40:06.135150] 11 189440 191487 1024.00 KiB dkb

[2019-09-11 17:40:06.136157] 12 191488 192511 512.00 KiB MISC

[2019-09-11 17:40:06.137045] 13 192512 208895 8.00 MiB reserved

[2019-09-11 17:40:06.137899] 14 208896 3515391 1.58 GiB system

[2019-09-11 17:40:06.138727] 15 3515392 4383743 424.00 MiB cache

[2019-09-11 17:40:06.139571] 16 4383744 30777310 12.59 GiB userdata

[2019-09-11 17:40:06.173245]

[2019-09-11 17:40:06.173920] Regenerate primary and backup GPT from input

[2019-09-11 17:40:06.174624] Writing regenerated GPT to gpt-D01EB0A014660Q99/gpt.bin.gpt

[2019-09-11 17:40:06.175930] Writing regenerated backup GPT to gpt-D01EB0A014660Q99/gpt.bin.bak

[2019-09-11 17:40:06.176704] Writing backup GPT offset to gpt-D01EB0A014660Q99/gpt.bin.offset

[2019-09-11 17:40:06.178213]

[2019-09-11 17:40:06.178681] Modified GPT Step 1:

[2019-09-11 17:40:06.180233]

[2019-09-11 17:40:06.180673] Sector size (logical): 512 bytes

[2019-09-11 17:40:06.181201] Disk identifier (GUID): 6679D4EB-2287-4373-B34B-34015A123D2A

[2019-09-11 17:40:06.181652] Partition table holds up to 128 entries

[2019-09-11 17:40:06.182144] This partition table begins at sector 2 and ends at sector 33

[2019-09-11 17:40:06.182641] First usable sector is 34, last usable sector is 30777310

[2019-09-11 17:40:06.183133] Other partition table is at sector 30777343

[2019-09-11 17:40:06.183745]

[2019-09-11 17:40:06.184381] Number Start (sector) End (sector) Size Name

[2019-09-11 17:40:06.185382] 1 1024 7167 3.00 MiB proinfo

[2019-09-11 17:40:06.186147] 2 7168 16383 4.50 MiB PMT

[2019-09-11 17:40:06.186839] 3 16384 17407 512.00 KiB lk

[2019-09-11 17:40:06.187582] 4 17408 18431 512.00 KiB lk2

[2019-09-11 17:40:06.188326] 5 18432 51199 16.00 MiB boot

[2019-09-11 17:40:06.189048] 6 51200 86015 17.00 MiB recovery

[2019-09-11 17:40:06.189789] 7 86016 96255 5.00 MiB tee1

[2019-09-11 17:40:06.190544] 8 96256 106495 5.00 MiB tee2

[2019-09-11 17:40:06.191306] 9 106496 187391 39.50 MiB metadata

[2019-09-11 17:40:06.192070] 10 187392 189439 1024.00 KiB kb

[2019-09-11 17:40:06.192790] 11 189440 191487 1024.00 KiB dkb

[2019-09-11 17:40:06.193511] 12 191488 192511 512.00 KiB MISC

[2019-09-11 17:40:06.194259] 13 192512 208895 8.00 MiB reserved

[2019-09-11 17:40:06.196770] 14 208896 3515391 1.58 GiB system

[2019-09-11 17:40:06.197627] 15 3515392 4383743 424.00 MiB cache

[2019-09-11 17:40:06.198368] 16 4383744 30325759 12.37 GiB userdata

[2019-09-11 17:40:06.199089] 17 30325760 30551039 110.00 MiB boot_tmp

[2019-09-11 17:40:06.199819] 18 30551040 30776319 110.00 MiB recovery_tmp

[2019-09-11 17:40:06.233865]

[2019-09-11 17:40:06.234581] Writing primary GPT (part 1) to gpt-D01EB0A014660Q99/gpt.bin.step1.gpt

[2019-09-11 17:40:06.235883] Writing backup GPT (part 1) to gpt-D01EB0A014660Q99/gpt.bin.step1.bak

[2019-09-11 17:40:06.238241]

[2019-09-11 17:40:06.238567] Modified GPT Step 2:

[2019-09-11 17:40:06.239724]

[2019-09-11 17:40:06.240197] Sector size (logical): 512 bytes

[2019-09-11 17:40:06.240859] Disk identifier (GUID): 6679D4EB-2287-4373-B34B-34015A123D2A

[2019-09-11 17:40:06.241537] Partition table holds up to 128 entries

[2019-09-11 17:40:06.242103] This partition table begins at sector 2 and ends at sector 33

[2019-09-11 17:40:06.242760] First usable sector is 34, last usable sector is 30777310

[2019-09-11 17:40:06.243314] Other partition table is at sector 30777343

[2019-09-11 17:40:06.243903]

[2019-09-11 17:40:06.244517] Number Start (sector) End (sector) Size Name

[2019-09-11 17:40:06.245643] 1 1024 7167 3.00 MiB proinfo

[2019-09-11 17:40:06.246395] 2 7168 16383 4.50 MiB PMT

[2019-09-11 17:40:06.247282] 3 16384 17407 512.00 KiB lk

[2019-09-11 17:40:06.247995] 4 17408 18431 512.00 KiB lk2

[2019-09-11 17:40:06.248710] 5 18432 51199 16.00 MiB boot_x

[2019-09-11 17:40:06.249453] 6 51200 86015 17.00 MiB recovery_x

[2019-09-11 17:40:06.250265] 7 86016 96255 5.00 MiB tee1

[2019-09-11 17:40:06.251278] 8 96256 106495 5.00 MiB tee2

[2019-09-11 17:40:06.252080] 9 106496 187391 39.50 MiB metadata

[2019-09-11 17:40:06.252809] 10 187392 189439 1024.00 KiB kb

[2019-09-11 17:40:06.253527] 11 189440 191487 1024.00 KiB dkb

[2019-09-11 17:40:06.254273] 12 191488 192511 512.00 KiB MISC

[2019-09-11 17:40:06.255014] 13 192512 208895 8.00 MiB reserved

[2019-09-11 17:40:06.255761] 14 208896 3515391 1.58 GiB system

[2019-09-11 17:40:06.256518] 15 3515392 4383743 424.00 MiB cache

[2019-09-11 17:40:06.257539] 16 4383744 30325759 12.37 GiB userdata

[2019-09-11 17:40:06.260194] 17 30325760 30551039 110.00 MiB boot

[2019-09-11 17:40:06.260980] 18 30551040 30776319 110.00 MiB recovery

[2019-09-11 17:40:06.297956]

[2019-09-11 17:40:06.298647] Writing primary GPT (part 2) to gpt-D01EB0A014660Q99/gpt.bin.step2.gpt

[2019-09-11 17:40:06.299734] Writing backup GPT (part 2) to gpt-D01EB0A014660Q99/gpt.bin.step2.bak

Flashing exploit

bin/boot.hdr: 1 file pushed. 0.2 MB/s (4096 bytes in 0.026s)

bin/boot.payload: 1 file pushed. 5.9 MB/s (492132 bytes in 0.079s)

8+0 records in

8+0 records out

4096 bytes transferred in 0.001 secs (4096000 bytes/sec)

961+1 records in

961+1 records out

492132 bytes transferred in 0.026 secs (18928153 bytes/sec)

8+0 records in

8+0 records out

4096 bytes transferred in 0.002 secs (2048000 bytes/sec)

961+1 records in

961+1 records out

492132 bytes transferred in 0.026 secs (18928153 bytes/sec)

Flashing LK

bin/lk.bin: 1 file pushed. 5.9 MB/s (485988 bytes in 0.079s)

949+1 records in

949+1 records out

485988 bytes transferred in 0.030 secs (16199600 bytes/sec)

Flashing TZ

bin/tz.img: 1 file pushed. 5.7 MB/s (3307008 bytes in 0.550s)

6459+0 records in

6459+0 records out

3307008 bytes transferred in 0.158 secs (20930430 bytes/sec)

6459+0 records in

6459+0 records out

3307008 bytes transferred in 0.232 secs (14254344 bytes/sec)

Flashing Preloader

bin/preloader.hdr0: 1 file pushed. 1.0 MB/s (2048 bytes in 0.002s)

bin/preloader.hdr1: 1 file pushed. 0.8 MB/s (2048 bytes in 0.002s)

bin/preloader.bin: 1 file pushed. 5.6 MB/s (138924 bytes in 0.024s)

4+0 records in

4+0 records out

2048 bytes transferred in 0.009 secs (227555 bytes/sec)

4+0 records in

4+0 records out

2048 bytes transferred in 0.003 secs (682666 bytes/sec)

271+1 records in

271+1 records out

138924 bytes transferred in 0.016 secs (8682750 bytes/sec)

271+1 records in

271+1 records out

138924 bytes transferred in 0.016 secs (8682750 bytes/sec)

Flashing final GPT

gpt-D01EB0A014660Q99/gpt.bin.step2.gpt: 1 file pushed. 4.0 MB/s (17408 bytes in 0.004s)

34+0 records in

34+0 records out

17408 bytes transferred in 0.001 secs (17408000 bytes/sec)

Flashing final GPT (backup)

gpt-D01EB0A014660Q99/gpt.bin.step2.bak: 1 file pushed. 3.6 MB/s (16896 bytes in 0.004s)

adb shell su -c "dd if=/data/local/tmp/gpt.bin.step2.bak of=/dev/block/mmcblk0 bs=512 seek=30777311"

Flashing TWRP

bin/twrp.img: 1 file pushed. 5.6 MB/s (13512704 bytes in 2.282s)

26392+0 records in

26392+0 records out

13512704 bytes transferred in 1.125 secs (12011292 bytes/sec)

Rebooting into TWRP

and for other device is :

khalid@DESKTOP-B1I4TKE:/mnt/d/fire hd 8 2017 ar/amonet-douglas-test/amonet$ ./step-2.sh

Testing root access...

uid=0(root) gid=0(root) context=u:r:init:s0

Looking for partition-suffix

lrwxrwxrwx root root 2010-01-26 13:03 recovery_tmp -> /dev/block/mmcblk0p18

Flashing exploit

bin/boot.hdr: 1 file pushed. 0.3 MB/s (4096 bytes in 0.014s)

bin/boot.payload: 1 file pushed. 4.8 MB/s (492132 bytes in 0.097s)

8+0 records in

8+0 records out

4096 bytes transferred in 0.001 secs (4096000 bytes/sec)

961+1 records in

961+1 records out

492132 bytes transferred in 0.026 secs (18928153 bytes/sec)

8+0 records in

8+0 records out

4096 bytes transferred in 0.001 secs (4096000 bytes/sec)

961+1 records in

961+1 records out

492132 bytes transferred in 0.026 secs (18928153 bytes/sec)

Flashing LK

bin/lk.bin: 1 file pushed. 4.9 MB/s (485988 bytes in 0.094s)

949+1 records in

949+1 records out

485988 bytes transferred in 0.026 secs (18691846 bytes/sec)

Flashing TZ

bin/tz.img: 1 file pushed. 3.6 MB/s (3307008 bytes in 0.876s)

6459+0 records in

6459+0 records out

3307008 bytes transferred in 0.194 secs (17046432 bytes/sec)

6459+0 records in

6459+0 records out

3307008 bytes transferred in 0.179 secs (18474905 bytes/sec)

Flashing Preloader

bin/preloader.hdr0: 1 file pushed. 0.4 MB/s (2048 bytes in 0.004s)

bin/preloader.hdr1: 1 file pushed. 0.9 MB/s (2048 bytes in 0.002s)

bin/preloader.bin: 1 file pushed. 5.5 MB/s (138924 bytes in 0.024s)

4+0 records in

4+0 records out

2048 bytes transferred in 0.075 secs (27306 bytes/sec)

4+0 records in

4+0 records out

2048 bytes transferred in 0.003 secs (682666 bytes/sec)

271+1 records in

271+1 records out

138924 bytes transferred in 0.016 secs (8682750 bytes/sec)

271+1 records in

271+1 records out

138924 bytes transferred in 0.016 secs (8682750 bytes/sec)

Flashing final GPT

gpt-D01EB0A014660Q99/gpt.bin.step2.gpt: 1 file pushed. 2.4 MB/s (17408 bytes in 0.007s)

34+0 records in

34+0 records out

17408 bytes transferred in 0.007 secs (2486857 bytes/sec)

Flashing final GPT (backup)

gpt-D01EB0A014660Q99/gpt.bin.step2.bak: 1 file pushed. 1.8 MB/s (16896 bytes in 0.009s)

adb shell su -c "dd if=/data/local/tmp/gpt.bin.step2.bak of=/dev/block/mmcblk0 bs=512 seek=30777311"

Flashing TWRP

bin/twrp.img: 1 file pushed. 5.8 MB/s (13512704 bytes in 2.239s)

26392+0 records in

26392+0 records out

13512704 bytes transferred in 0.990 secs (13649195 bytes/sec)

Rebooting into TWRP

and i will test it for more devices

thanks my friend