HTC One firmware in fastboot

    How I “cut off tonsils with an autogenome, through my back”


    How it all began

    It all started quite prosaically. The HTC One phone displayed a message that it couldn’t charge in Host mode ... I brought it out and brought it out, I brought it out, so I removed it without giving any value, but in vain! When the battery started to run out, the phone was connected to the USB cable and ... nothing happened ... at all, that is, the reaction was zero ... I
    went to Google ... there were found a couple of tips for starting in different modes with various button combinations. The tips did not help, but it turned out that in the “fastboot” mode the phone was visible via USB. Here it was decided to “flash” ... And it began ...
    They told me, back up "our ALL"

    Since access to the phone via USB is only in fastboot mode, no back up was done, but all the sections of the internal memory that we could get to were formatted ... But, in order:
    • Unlocked the device ( detailed instructions here )
    • Filled the recovery from TWRP
    • Filled, via bluetooth, USB does not work, alternative firmware from CyanogenMod to the device
    • It did not help ... USB only in fastboot, as it was, it remains
    • !!! Having rubbed all the sections that TWRP could reach !!!
    • Restarted and ... voila ... the "brick" without the operating system is there ...

    And everything would be fine if not for one “BUT”. USB only works in fastboot, that is, you can now upload something to the device only in fastboot, here it is the joy of a candy bar without an external flash card. And here is the second ambush: the S_ON key, which does not allow filling in earlier versions or changing HBOOT.
    Searching of decisions

    The most correct in such a situation, in my opinion, would be to use the ROM Upgrade Utility (RUU), but either I searched poorly, or HTC hides so well, but I could not find the "fresh" version of RUU ... It's a pity, but the thought continues to work.
    The fastboot utility allows you to upload an image file to some sections, including the system section. But where to get the image of the system section. Searches for the finished result did not bring. There was an idea to make a section from the system folder from a zip file with firmware.
    The forum found a way to get the image file, experimentally obtained an algorithm for creating the "correct", from the point of view of HTC, the image and ...
    Small retreat

    There were two problems:
    1. Or I didn’t understand something from the description, or one of the two, but to get the “correct” image, you had to first create it with make_ext4fs and then convert it with simg2img
    2. The size of the image flooded using the fastboot utility is limited, somewhere in the region a little more than one gigabyte

    Continuing to “use autogen”

    Due to image size limitations, I had to slightly cut the system folder from the stock firmware.
    After pouring the resulting image with the system, the device started, not without glitches, but the main goal was achieved - it became possible to use Bluetooth (USB is only in fastboot mode)
    Using Bluetooth to transfer files the size of a gigabyte, more ... pleasure ... After the third transmission break at the very end of the file, the thought accelerated and ...
    And here are the glands

    And so we have:
    • Using the fastboot utility, we can fill in the system section with some image
    • Image is a set of files
    • TWRP can mount the system partition and manipulate files from it

    It is necessary:
    • Pour a zip file with firmware onto the phone’s internal memory

    Problem:
    • USB only works in fastboot mode

    Decision:
    • Create an image containing only the firmware file (due to image size limitations, firmware from CyanogenMod was selected)
    • Pour the resulting image into the system section with the fastboot utility
    • In TWRP, we mount the system section and transfer the zip file from it to the user zone from it (/ sdcard / downloads for example)
    • In TWRP, flashing the device

    HURRAH!!! Earned ... not everything ... USB continues to “fail”, but sometimes it turns on ...
    After all these adventures, the device was returned to the stock firmware, but that's another story, the main thing that worked.

    Also popular now: