[Fire TV Android Development] snebojsa:
Done everything, no luck.

I have shortened the wires and removed pins, think couldn't be shorter.

Here is everything I've done from beginning:

Shorted down the wires.

Power down and restart laptop.

Place the script on desktop.

Plug in the usb stick with the shared folder.

Done the pv install, set permissions and run the script with sudo.

Shared folder address is: SHARED="/media/ubuntu/KINGSTON/1/Shared"

Sdat address: SDAT2IMG=~/Desktop/Shared/sdat2img.py

First script is done ok and I have system_sdat2img.img in /media/ubuntu/KINGSTON/1/Shared/bueller-5.2.7.0-rooted_r1 so no need to do it again.

Second script (named flash.sh in sdat2img folder on desktop) look like this:

#!/bin/sh

# THANKS TO: rbox, maximus64, zenofex, everyone at exploitee.rs

# WARNING: Use at your own risk.

# Script to flash prerooted zip images to 1st Gen Amazon Fire TV

# Requires soldering and connecting to an eMMC reader found here https://shop.exploitee.rs/

# This is my folder where I put backups and the zip files

UNLOCKED="no"

SHARED="/media/ubuntu/KINGSTON/1/Shared"

# Unzip rbox's prerooted zips to your $SHARED folder then set this to the location of that folder

# Get those here: https://xdaforums.com/fire-tv/development/prerooted-stock-images-t2882337

ZIP="${SHARED}/bueller-5.2.7.0-rooted_r1"

# Location where the backups of the CURRENT image on the fire tv will go before it's overwritten

BACKUP="${SHARED}/backup"

# Download here https://github.com/xpirt/sdat2img

# Then change this to the location of the python script

SDAT2IMG=~/Desktop/Shared/sdat2img.py

# This should be the same on most linux systems (tested on Kali linux)

DEVDIR="/dev/disk/by-partlabel"

# Where to mount the mmc partitions

MNT="/mnt/emmc"

SYSTEM=$MNT/system

# Back everything up JUST IN CASE...

DATE=`date +"%Y-%m-%d-%H%M"`

echo -n "Unmounting system..."

umount $DEVDIR/system

echo "Done."

# echo "Backing up... "

mkdir -p $BACKUP/$DATE

dd if=$DEVDIR/system | pv -s 805306368 | dd of=$BACKUP/$DATE/system.img

dd if=$DEVDIR/recovery | pv -s 9773056 | dd of=$BACKUP/$DATE/recovery.img

# Make sure to use unlocked bootloader when possible (UNTESTED!)

BOOT=$([ "$UNLOCKED" == "yes" ] && echo "boot_unlocked.img" || echo "boot.img")

dd if=$DEVDIR/boot | pv -s 6627328 | dd of=$BACKUP/$DATE/$BOOT

echo "Done!"

# echo -n "Clearing data..."

mkfs.ext4 $DEVDIR/userdata

echo "Done."

echo -n "Clearing cache..."

mkfs.ext4 $DEVDIR/cache

echo "Done."

# WORKING

# Extract the image from the ZIP

if [ ! -e "${ZIP}/system_sdat2img.img" ]

then

echo -n "Converting system.new.dat to img format... "

$SDAT2IMG $ZIP/system.transfer.list $ZIP/system.new.dat $ZIP/system_sdat2img.img

echo "Done!"

else

echo "sdat2img already exists."

fi

# Write the images

# WORKING - Don't use bs=1024 ?? Stalled at 507mb

# dd if=/media/sf_Shared/system_sdat2img.img | pv -s 805306368 | dd of=/dev/disk/by-partlabel/system

dd if=$ZIP/system_sdat2img.img | pv -s 805306368 | dd of=$DEVDIR/system || exit 1

# dd if=/media/sf_Shared/images/boot.img | pv -s 6627328 | dd of=/dev/disk/by-partlabel/boot

dd if=$ZIP/boot.img | pv -s 6627328 | dd of=$DEVIR/boot

# dd if=/media/sf_Shared/images/recovery.img | pv -s 9773056 | dd of=/dev/disk/by-partlabel/recovery

dd if=$ZIP/recovery/recovery.img | pv -s 9773056 | dd of=$DEVIR/recovery

# Mount system

echo "Mounting system..."

mkdir -p $SYSTEM

mount -o rw $DEVDIR/system $SYSTEM || exit 1

if [ ! -e "${SYSTEM}/xbin" ]; then

echo "ERROR: couldn't find /system/xbin - is the mount point correct?"

exit 1

fi

# Now copy stuff and root it

echo "Installing TWRP..."

cp -r $ZIP/recovery $SYSTEM

rm -f $SYSTEM/recovery/recovery.img

echo "Chmodding and chconing RECOVERY..."

chown -R 0:0 $SYSTEM/recovery

chmod -R 0755 $SYSTEM/recovery

chcon -R --reference=$SYSTEM/bin $SYSTEM/recovery

# Backing up e2fsck and symlinking it to 2ndinitstub...

mv -i $SYSTEM/bin/e2fsck $SYSTEM/bin/e2fsck.real

echo "Symlink e2fsck to 2ndinitstub..."

ln -sf ../recovery/2ndinitstub $SYSTEM/bin/e2fsck

chcon --reference=$SYSTEM/bin/e2fsck.real -h $SYSTEM/bin/e2fsck

echo "Installing SU..."

cp -f $ZIP/su/su $ZIP/su/supolicy $SYSTEM/xbin/

chown 0:2000 $SYSTEM/xbin/su $SYSTEM/xbin/supolicy

chmod 0755 $SYSTEM/xbin/su $SYSTEM/xbin/supolicy

chcon --reference=$SYSTEM/xbin/trapz $SYSTEM/xbin/su $SYSTEM/xbin/supolicy

ln -sf su $SYSTEM/xbin/daemonsu

chcon --reference=$SYSTEM/xbin/trapz -h $SYSTEM/xbin/daemonsu

cp $ZIP/su/libsupol.so $SYSTEM/lib/

chmod 0644 $SYSTEM/lib/libsupol.so

chown 0:0 $SYSTEM/lib/libsupol.so

chcon --reference=$SYSTEM/lib/libsuspend.so $SYSTEM/lib/libsupol.so

cp -r $ZIP/su/SuperSU $SYSTEM/app/

chown -R 0:0 $SYSTEM/app/SuperSU

chmod -R 0755 $SYSTEM/app/SuperSU

chcon --reference=$SYSTEM/app/Bluetooth -R $SYSTEM/app/SuperSU

echo "Unmounting system..."

umount $SYSTEM

echo "PWNED!"

Then right click on sdat2img folder and click Open in Terminal

Here is terminal output:

ubuntu@ubuntu:~/Desktop/sdat2img$ sudo add-apt-repository universe

'universe' distribution component enabled for all sources.

Ign:1 cdrom://Ubuntu 18.04.3 LTS _Bionic Beaver_ - Release amd64 (20190805) bionic InRelease

Hit:2 cdrom://Ubuntu 18.04.3 LTS _Bionic Beaver_ - Release amd64 (20190805) bionic Release

Hit:3 http://archive.ubuntu.com/ubuntu bionic InRelease

Get:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]

Get:6 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]

Get:7 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [8,570 kB]

Get:8 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [523 kB]

Get:9 http://security.ubuntu.com/ubuntu bionic-security/main Translation-en [175 kB]

Get:10 http://security.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [38.6 kB]

Get:11 http://security.ubuntu.com/ubuntu bionic-security/main DEP-11 48x48 Icons [17.6 kB]

Get:12 http://security.ubuntu.com/ubuntu bionic-security/main DEP-11 64x64 Icons [41.5 kB]

Get:13 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [8,192 B]

Get:14 http://security.ubuntu.com/ubuntu bionic-security/restricted Translation-en [3,180 B]

Get:15 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [609 kB]

Get:16 http://archive.ubuntu.com/ubuntu bionic/universe Translation-en [4,941 kB]

Get:17 http://security.ubuntu.com/ubuntu bionic-security/universe Translation-en [203 kB]

Get:18 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [42.1 kB]

Get:19 http://security.ubuntu.com/ubuntu bionic-security/universe DEP-11 48x48 Icons [16.4 kB]

Get:20 http://security.ubuntu.com/ubuntu bionic-security/universe DEP-11 64x64 Icons [111 kB]

Get:21 http://archive.ubuntu.com/ubuntu bionic/universe amd64 DEP-11 Metadata [3,287 kB]

Get:22 http://archive.ubuntu.com/ubuntu bionic/universe DEP-11 48x48 Icons [2,151 kB]

Get:23 http://archive.ubuntu.com/ubuntu bionic/universe DEP-11 64x64 Icons [8,420 kB]

Get:24 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [746 kB]

Get:25 http://archive.ubuntu.com/ubuntu bionic-updates/main Translation-en [268 kB]

Get:26 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 DEP-11 Metadata [295 kB]

Get:27 http://archive.ubuntu.com/ubuntu bionic-updates/main DEP-11 48x48 Icons [73.8 kB]

Get:28 http://archive.ubuntu.com/ubuntu bionic-updates/main DEP-11 64x64 Icons [147 kB]

Get:29 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [15.1 kB]

Get:30 http://archive.ubuntu.com/ubuntu bionic-updates/restricted Translation-en [4,844 B]

Get:31 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1,008 kB]

Get:32 http://archive.ubuntu.com/ubuntu bionic-updates/universe Translation-en [310 kB]

Get:33 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [254 kB]

Get:34 http://archive.ubuntu.com/ubuntu bionic-updates/universe DEP-11 48x48 Icons [192 kB]

Get:35 http://archive.ubuntu.com/ubuntu bionic-updates/universe DEP-11 64x64 Icons [443 kB]

Fetched 33.1 MB in 22s (1,536 kB/s)

Reading package lists... Done

ubuntu@ubuntu:~/Desktop/sdat2img$ sudo apt update

Ign:1 cdrom://Ubuntu 18.04.3 LTS _Bionic Beaver_ - Release amd64 (20190805) bionic InRelease

Hit:2 cdrom://Ubuntu 18.04.3 LTS _Bionic Beaver_ - Release amd64 (20190805) bionic Release

Hit:3 http://archive.ubuntu.com/ubuntu bionic InRelease

Hit:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease

Hit:6 http://security.ubuntu.com/ubuntu bionic-security InRelease

Reading package lists... Done

Building dependency tree

Reading state information... Done

188 packages can be upgraded. Run 'apt list --upgradable' to see them.

ubuntu@ubuntu:~/Desktop/sdat2img$ sudo apt install dos2unix

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following NEW packages will be installed:

dos2unix

0 upgraded, 1 newly installed, 0 to remove and 188 not upgraded.

Need to get 351 kB of archives.

After this operation, 1,267 kB of additional disk space will be used.

Get:1 http://archive.ubuntu.com/ubuntu bionic/universe amd64 dos2unix amd64 7.3.4-3 [351 kB]

Fetched 351 kB in 0s (882 kB/s)

Selecting previously unselected package dos2unix.

(Reading database ... 144547 files and directories currently installed.)

Preparing to unpack .../dos2unix_7.3.4-3_amd64.deb ...

Unpacking dos2unix (7.3.4-3) ...

Setting up dos2unix (7.3.4-3) ...

Processing triggers for man-db (2.8.3-2ubuntu0.1) ...

ubuntu@ubuntu:~/Desktop/sdat2img$ sudo apt install pv

Reading package lists... Done

Building dependency tree

Reading state information... Done

Suggested packages:

doc-base

The following NEW packages will be installed:

pv

0 upgraded, 1 newly installed, 0 to remove and 188 not upgraded.

Need to get 48.3 kB of archives.

After this operation, 123 kB of additional disk space will be used.

Get:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 pv amd64 1.6.6-1 [48.3 kB]

Fetched 48.3 kB in 0s (268 kB/s)

Selecting previously unselected package pv.

(Reading database ... 144648 files and directories currently installed.)

Preparing to unpack .../archives/pv_1.6.6-1_amd64.deb ...

Unpacking pv (1.6.6-1) ...

Setting up pv (1.6.6-1) ...

Processing triggers for man-db (2.8.3-2ubuntu0.1) ...

ubuntu@ubuntu:~/Desktop/sdat2img$ sudo dos2unix flash.sh

dos2unix: converting file flash.sh to Unix format...

ubuntu@ubuntu:~/Desktop/sdat2img$ sudo chmod u+x flash.sh

ubuntu@ubuntu:~/Desktop/sdat2img$ sudo ./flash.sh

Unmounting system...Done.

1572864+0 records in7MiB/s] [================================> ] 99% ETA 0:00:00

1572864+0 records out

805306368 bytes (805 MB, 768 MiB) copied, 146.033 s, 5.5 MB/s

768MiB 0:02:26 [5.26MiB/s] [================================>] 100%

1572864+0 records in

1572864+0 records out

805306368 bytes (805 MB, 768 MiB) copied, 200.206 s, 4.0 MB/s

20480+0 records in.14MiB/s] [==================> ] 56% ETA 0:00:00

20480+0 records out

10.0MiB 0:00:01 [5.21MiB/s] [=================================] 107%

10485760 bytes (10 MB, 10 MiB) copied, 1.91953 s, 5.5 MB/s

20480+0 records in

20480+0 records out

10485760 bytes (10 MB, 10 MiB) copied, 5.70847 s, 1.8 MB/s

./flash.sh: 46: [: no: unexpected operator

20480+0 records in.19MiB/s] [==========================> ] 82% ETA 0:00:00

20480+0 records out

10485760 bytes (10 MB, 10 MiB) copied, 1.95092 s, 5.4 MB/s

10.0MiB 0:00:01 [5.13MiB/s] [=================================] 158%

20480+0 records in

20480+0 records out

10485760 bytes (10 MB, 10 MiB) copied, 3.61749 s, 2.9 MB/s

Done!

mke2fs 1.44.1 (24-Mar-2018)

/dev/disk/by-partlabel/userdata contains a ext4 file system

last mounted on /data on Thu Jan 1 01:00:07 1970

Proceed anyway? (y,N) y

/dev/disk/by-partlabel/userdata: Read-only file system while setting up superblock

Done.

Clearing cache...mke2fs 1.44.1 (24-Mar-2018)

/dev/disk/by-partlabel/cache contains a ext4 file system

last mounted on /cache on Thu Jan 1 01:00:03 1970

Proceed anyway? (y,N) y

/dev/disk/by-partlabel/cache: Read-only file system while setting up superblock

Done.

sdat2img already exists.

dd: failed to open '/dev/disk/by-partlabel/system': Read-only file system

0.00 B 0:00:00 [0.00 B/s] [> ] 0%

ubuntu@ubuntu:~/Desktop/sdat2img$

Again read-only error.

What else to try?

---------- Post added at 05:40 PM ---------- Previous post was at 05:07 PM ----------

Here are AFTV volumes that I get when plug in SD adapter:

17MB volume have only one folder, Image

6.0GB volume is not accessible, read-only

805MB volume is not accessible, read-only

Second 805MB volume is accessible

8.4MB volume is accessible

Second 8.4MB volume is not accessible, read-only.