[General Questions and Answers] Kenora_I:
~~~~~GUIDE TO SOLVE FLASHING ERRORS WITH QUALCOMM BASED ANDROID DEVICES~~~~~~~~

Windows under certain circumstances seems to block some port communication.

tl;dr​

Instead of Windows, use a Linux system with the Qualcomm USB flashing tool to flash your device.

Requirements​

You will need

a stock image from the manufacturer (or any other image you like) for your device;

a Linux based system (eg. a Raspberry PI with Rasbian installed)

Required Tool: ADB and Fastboot (download and installation instruction below)

Required Tool: Qualcomm USB flashing tool for Linux by ndechesne, tonyMakkiel and ric96 (can be downloaded here)

Recommended tool: TWRP

your device, a free USB port and an appropriate USB cable (no special flashing cable required).

Furthermore, it could be possible that you have to be able to unlock your the bootloader if your device. I'm not sure about that, as I had unlocked my tablet before I found the working solution.

Step-by-step approach​

Backup your device​

Make a complete and reliable backup of your android device first.

Write down your serial number​

My had device lost its serial number after flashing. I don't know if this has any further impact - I didn't recognize on. Maybe you should take a note of your serial number before flashing your device.

Unzip your image file​

You need to unzip the image file. You should get many files, including

a *.mbn file (mine was `prog_emmc_firehose_8953_ddr.mbn`)

a *.xml file that contains information on how the image is the be assembled - mine was `rawprogram_unsparse.xml`)

a *.xml file that contains information on how the image has to be patched - mine was `patch0.xml`)

All of this files have the suit the chip type of your Android device - I highly recommend not trying this with files that were compiled for other chips.

Preparation on your Linux device​

I've setup up my Raspberry PI 3B+ from scratch with Raspbian.

Install ADB and Fastboot on it:

sudo apt-get install android-tools-adb android-tools-fastboot

Download Qualcomm USB flashing tool for Linux:

git clone https://git.linaro.org/landing-teams/working/qualcomm/qdl.git

Change to the new qdl directory

cd qdl

and compile the software:

make

Return to the previous directory:

cd ..

Stop the Modem Manager (I've found this in one instruction - didn't do anything as I hadn't had it installed)

sudo systemctl stop ModemManager

Get ready to reboot your device in EDL mode​

Option 1: You can still access your Android system​

Connect your Android devices to your Linux system using the USB cable.

Start your Android device normally. Enable the developer options:

Open the Settings screen, scroll down to the bottom, and tap About phone or About tablet.

Scroll down to the bottom of the About screen and find the Build number.

Tap the Build number field seven times to enable Developer Options. Tap a few times and you'll see a toast notification with a countdown that reads "You are now X steps way from being a developer."

When you're done, you'll see the message "You are now a developer!"

Tap the Back button and you'll see the Developer options menu just above the "About Phone" section in Settings.

To enable USB Debugging, you’ll need to jump into the Developer options menu, scroll down to the Debugging section, and enable the "USB Debugging" slider.

Android will prompt you to allow USB debugging (unless you had already granted access for your Linux system before). Check "Always allow from this computer" and tab "OK".

Go back to your Linux system, and check to connection:

adb devices

If the daemon is not running, it will be started.

You should see your device as (single) entry in the device list. Otherwise check the device, the connection and the settings again.

Go on to Unlock bootloader below.

Option 2: You cannot access your Android system (almost bricked)​

Android devices have key combinations that allow you to boot them in different modes. Please check on the internet how to boot your device in the EDL Mode(Emergency Download Mode). For my device it's

press and hold `on off key` for about 20 seconds, release it

press and hold `vol up key`

press and hold `on off key` (still hold the `vol up key`)

wait for a short vibration

release the `vol up key` first

release the 'on off key`

Be careful, it make a diffence whether an USB cable is connected or not. Connecting the USB cable can have the same effect as pressing the power key.

Getting into the right boot mode can really be a mess. That's why it's the easiest way to work with TWRP (Team Win Recovery Project).

To do so, download the latest version of TWRP. You need a the appropriate img file for your device (for my device: twrp_x605f.img).

Reboot your device in fastboot mode (as described by the manufacturer of your device). For my device it's

press and hold `on off key` for about 20 seconds, release it

press and hold `vol down key`

press and hold `on off key` (still hold the `vol up key`)

wait for a short vibration

release the `vol up key` first

release the 'on off key`

On success, the device will show 'fastboot mode' in the corner.

Connect your device with the USB cable and check the connection:

fastboot devices

You should see your device as (single) entry in the device list. Otherwise check the device, the connection and try to reboot in fastboot mode again.

Make sure your TWRP image file is in the current directory. Install it by typing

fastboot flash recovery <TWRP image file> (replace with the actual file name)

Reboot your device in recovery mode (as described by the manufacturer of your device). For my device it's

press and hold `on off key` for about 20 seconds, release it

press and hold `vol up+down keys`

press and hold `on off key` (still hold the `vol up key`)

wait for a short vibration

release the `vol up+down keys` first

release the `on off key`

On success, TWRP will start. OK, it took my two to three attempts to get there, but it helps a lot as you can reboot precisely in the mode you need from the TWRP Reboot menu.

System boots to your system.

Recovery boots back to TWRP (or your recovery menu).

Bootloader boots to fastboot mode.

EDL boots to EDL.

Unlock bootloader (not sure if this is required - you can try it and skip this)​

Having done that, unlock your bootloader. To do so, boot your device in fastboot mode

by using the key combination, see above OR

by typing `adb reboot bootloader` (when the device is connected and the Android system is running or TWRP is running), see above

Type

fastboot flashing unlock

and

fastboot oem unlock-go

Flash your device​

Reboot your device to the Android system or to TWRP.

Prepare the flashing command (in one line) and do not hit enter yet

./qdl --debug --storage emmc --include '<path to the unzipped firmware files>' '<path to the unzipped firmware files>/<mbn file>' '<path to the unzipped firmware files>/rawprogram_unsparse.xml' '<path to the unzipped firmware files>/patch0.xml'

For me, that was (in one line) and do not hit enter yet

./qdl --debug --storage emmc --include 'TB-X605L_USER_S000020_20180921_Q00020_ROW' 'TB-X605L_USER_S000020_20180921_Q00020_ROW/prog_emmc_firehose_8953_ddr.mbn' 'TB-X605L_USER_S000020_20180921_Q00020_ROW/rawprogram_unsparse.xml' '/TB-X605L_USER_S000020_20180921_Q00020_ROW/patch0.xml'

Open another command prompt, and prepare the reboot EDL command adb reboot edl

Now, enjoy the following:

Run the flashing command (as prepared above), it should stop with the message 'Waiting for EDL device'

Run the reboot command from the second command prompt (as prepared above).

Note that you can of course enter the EDL mode in any other way - but as some instructions say that you have only a couple of seconds to start EDL mode, before the flashing is aborted.

The --debug option obviously isn't necessary, but you see much more action, and the flashing takes about 10 to 20 minutes.

Enjoy your unbricked devices!

##Sorry about making you install Linux but Windows seems to mess up with com port communication so there really isn't any alternative.