1. chetmanley's Avatar

    I hadn't seen any discussion on this topic, so I thought I would create a brief how-to for anyone who uses Linux exclusively (no dual boot or second computer) and would still like to be able to update their phones with an autoloader.

    For some background, I completed this using Manjaro (Gnome version) and the Gnome Boxes virtual machine software package.

    I first attempted this by using Wine. While I was able to run the .bat file, it never detected my phone in Fastboot. There might be a way to get Wine to use USB, but it's beyond me at this point.

    So then I tried using Gnome Boxes with Windows 7. Before attempting the autoloader, I ensured all Windows 7 updates were applied in the virtual machine.

    Here are two videos (Initial config and then install) of setting up Gnome Boxes and Windows

    Part 1 Gnome Boxes | Initial Setup and Configuration | Ubuntu 18.04

    Part 2 Gnome Boxes | Installing Windows 10 on Linux

    It's explained in the 2nd video that you will need to install drivers from Splice Guest Tools from within the WIndows VM
    https://www.spice-space.org/download.html Scroll down to Windows Binaries and download Windows Guest Tools

    You can also install the WebDAV tool (optional with respect to using the autoloader, but it's a handly tool regardless which allows Linux drive access from the VM).

    Word of caution regarding the WebDAV component - I initially tried running the autoloader via WebDAV which linked my VM Windows install to a real drive on Linux.

    Turns out, WebDAV has a file transfer size limit, and it was causing my autoloader to fail when it got to the large images. So don't try this! Just make sure your autoloader is actually saved to the VM harddrive in Windows.

    Okay, so with the Splice tools installed, it's time to install the necessary Blackberry USB drivers, again, from within the Windows VM:


    That concludes the initial setup. You can now prepare your BB Android for the autoloader as per normal (Backup data, Remove password, and restart into Fastboot)

    Now, in order for the Windows VM to see your Blackberry connected via USB, you need to first start the Windows VM, Once Windows is running, then click the Boxes "back" arrow in the top left corner to return to the main Boxes screen (Windows will still be running in the background).

    Next, Right click on the Windows VM icon and select Properties. From there, open the Devices and Share tab. In there, you should see a toggle for the Blackberry. Turn this on.

    Windows should now see the Blackberry connected via USB. It might show some "installing drivers" notifications in the bottom right corner by the task bar. Let this complete. If you start the autoloader and it doesn't detect the device, try reconnecting the phone to the computer while it's running normally as if you wanted to do a file transfer. This might be required to trigger the drivers.

    If the autoloader is detecting the device, then we are ready to proceed.

    Start the autoloader process as normal. It will reboot the Blackberry. BE WARNED. The act of rebooting the BB causes it to disconnect from the VM, and the VM may actually close back to the Linux desktop. Don't panic, the Windows VM should still be running. Just re-open Boxes,

    Before clicking the Windows VM icon to return to Windows, you once again need to right click, go to properties and re-enable the Blackberry USB connection as describe above.

    Try to do this quickly. The Autoloader should be waiting in the Windows VM for it to detect the now re-connected device. As soon as it does, the autoloader will continue without any user intervention.

    Now just allow it time to complete. I found this took a few minutes longer than if I did this will a true Windows install on bare metal. But fortunately it worked.

    Potential Issues I ran into:

    1 ) As already mentioned, do not attempt to run the Autoloader from your Linux drive via WebDAV - it can't transfer the large image files. This caused my autoloader install to fail half way through and prevented my BB from booting into anything but Fastboot. Fortunately, none of my files were affected (I used nowipe autoloader).

    2 ) At the halfway point where Boxes will close back to the Linux desktop when the BB reboots - this might cause the Windows VM to lock up and not start. If this happens, don't panic. You can force close the Windows VM, and you will need to attempt the autoloader process again. Your files should still be intact.

    I hope this is clear enough. I've included a couple screen shots below to illustrate the different menus I've described above.

    Attached Thumbnails How-To: Installing an Autoloader using Linux.-screenshot-2020-04-15-18-30-11.png   How-To: Installing an Autoloader using Linux.-screenshot-2020-04-15-18-29-32.png  
    Last edited by chetmanley; 09-13-20 at 11:48 AM.
    Jake2826 and berradicted_fr like this.
    04-15-20 09:09 PM
  2. Dunt Dunt Dunt's Avatar
    Good to know...
    04-16-20 09:49 AM
  3. SatoshiX's Avatar
    very helpful. thanks for all the time and effort putting this together
    05-17-20 03:53 PM
  4. chetmanley's Avatar
    I have learned how to install the Blackberry images without the use of the .bat autoloader script, or a Windows VM. All can be done in Linux.

    This method simply uses the fastboot commands contained within the .bat script in a linux terminal window. In the future, I may try to create a linux friendly script that performs the same function as the Windows .bat autoloader, but for now, simply applying the commands manually does the trick, it just takes a few minutes longer.

    If not already installed, you will need to install Android Platform Tools 'android-tools' which includes the 'adb' and 'fastboot' packages.

    Disclaimer - I've tried this once - Backup your device as always. The only difference between the "flashall.bat" and flashallnowipe.bat" autoloaders is a single command. If the user wants to wipe the device of all user data and applications, then they flash the 'userdata.img' file, if they don't want to wipe the device, then they simply skip this step. We'll come back to this in the instructions below.

    Step 1: Download & Extract the autoloader .zip
    Step 2: Open a terminal and navigate (cd) to the 'img' folder contained in this new directory. For example: \Key2_ACU282_univ\img\

    This \img folder contains the files which will be flashed to the device.

    Step 3: Prepare your BB as normal for autoloader install (remove password, reboot into Fastboot Mode).

    Step 4: Enter the following commands into the terminal. Try without sudo, but I found Fastboot would not detect the device without it and would simply show 'waiting for device'.

    This command will tell you which variant you have. This is important because we will need to know this to flash the correct modem NON-HLOS-%device variant%.bin file later.
    sudo fastboot getvar device
    In my case, it returned 'variant: americas'. Therefore the .bin file I will use later is NON-HLOS-americas.bin

    This next command will tell you which of the two bootchain slots is currently active, a or b. The order of the output will indicate the currently active bootchain slot.
    For example, 'bootchain-slot: ba' indicates that slot b is currently active, and vice versa.
    sudo fastboot getvar bootchain-slots
    In my case, the output was 'ab', indicating the slot a was active.

    Whichever slot is inactive will be the slot we use to flash the new images. If you try to flash images to the active slot, it will give you an error 'FAILED (remote: Modifying active BC denied)'

    Therefore, in my case, I had to use slot b in the following commands. Every time you use an autoloader, the slot priority will be switched. So the next time I update my Key2, I'll be using slot a instead of b.

    Now that we have the device variant and the bootchain-slot to use, we can begin flashing the device.

    Just enter the following commands in order:

    sudo fastboot flash tz_%slot% tz.mbn
    Where you see %slot%, replace that with the slot letter as determined earlier. For example: sudo fastboot flash tz_b tz.mbn

    sudo fastboot flash devcfg_%slot% devcfg.mbn
    sudo fastboot flash rpm_%slot% rpm.mbn
    sudo fastboot flash xbl_%slot% xbl.elf
    sudo fastboot flash devcfg_%slot% devcfg.mbn
    sudo fastboot flash rpm_%slot% rpm.mbn
    sudo fastboot flash xbl_%slot% xbl.elf
    sudo fastboot flash hyp_%slot% hyp.signed.mbn
    sudo fastboot flash pmic_%slot% pmic.elf
    sudo fastboot flash abl_%slot% abl.elf
    sudo fastboot flash cmnlib_%slot% cmnlib.signed.mbn
    sudo fastboot flash cmnlib64_%slot% cmnlib64.signed.mbn
    sudo fastboot flash keymaster_%slot% keymaster64.signed.mbn
    sudo fastboot flash mdtpsecapp_%slot% mdtpsecapp.signed.mbn
    This command switches the active bootchain-slot in preparation for flashing the images.
    sudo fastboot oem switch-bootchain:%slot%
    This command will reboot the device following the bootchain-slot switch.
    sudo fastboot reboot bootloader
    Once the device is back in Fastboot mode, continue with flashing the images with the following commands:

    sudo fastboot flash bootsig boot.img.sig
    sudo fastboot flash recoverysig recovery.img.sig
    sudo fastboot flash boot boot.img
    sudo fastboot flash recovery recovery.img
    sudo fastboot flash cache cache.img

    Only enter the following command if you want to wipe your device to a factory state. This will remove all user data. If you want to keep all of you settings, applications and user data, then skip this command and continue with the remaining steps.
    sudo fastboot flash userdata userdata.img

    This command is where the device variant we determined earlier comes in. Replace %dev_variant% with your device variant. For example, NON-HLOS-americas.bin
    sudo fastboot flash modem NON-HLOS-%dev_variant%.bin
    sudo fastboot flash dsp dspso.bin
    sudo fastboot flash bluetooth BTFM.bin
    sudo fastboot flash vendor vendor.img
    sudo fastboot flash system system.img
    sudo fastboot flash oem oem.img
    And finally, this last command will reboot the device. You can now unplug the device from the computer.
    sudo fastboot reboot
    Last edited by chetmanley; 01-21-21 at 12:51 PM.
    01-21-21 02:43 AM

Similar Threads

  1. Which BlackBerry gives you the most satisfaction when using it?
    By FrankUnderwood in forum General BlackBerry News, Discussion & Rumors
    Replies: 22
    Last Post: 05-23-20, 01:46 AM
  2. Can I still use a new BlackBerry Passport in May of 2020 ?
    By GreatLeap in forum BlackBerry 10 OS
    Replies: 14
    Last Post: 05-21-20, 03:38 PM
  3. I'm considering upgrading to Key2?
    By DOCTOREVIL8 in forum BlackBerry KEY2
    Replies: 23
    Last Post: 05-20-20, 10:18 AM
  4. Replies: 3
    Last Post: 05-17-20, 12:53 PM
  5. Becoming a better writer can help you in many facets of life—this bundle is designed to turn you int
    By CrackBerry News in forum CrackBerry.com News Discussion & Contests
    Replies: 0
    Last Post: 05-16-20, 09:40 PM