RSD Lite for Mac and Linux

RSD Lite for Mac and Linux

Screen Shot 2016-07-14 at 5.24.12 PM

So many people have asked me if RSD lite Program works on Mac or Linux and every time i have to tell them “Nope only windows”. I was on XDA developers and a user named Liboicl uploaded a awesome script that turns Motorola Firmware XML files into fastboot commands for a linux machine. After Downloading and checking it out I decided that I would also make it work on Mac and give it a little face lift. 🙂 NOTE This script also checks the MD5 of each file and compares them to the XML file list.

How to use RSD-FLASH.SH file on your Mac or Linux machines.

  1.  Download the RSD-Lite-Mac-Linux.zip here. scroll down the page a little
  2. Extract the zip to your desktop leaving you with a folders called RSD-Lite-Mac-Linux
  3. Download the Motorola Firmware you need from HERE or HERE then extract all files in firmware.zip to RSD-Lite-Mac-Linux folder.
  4. open a Terminal and CD to folder RSD-Lite-Mac-Linux
  5. Command to flash device is ./rsd-flash.sh [name of xml file you want to use]  EXAMPLES flashfile.xml or servicefile.xml
  6. press enter to start the flash from terminal
  7. watch for any errors. If no errors at the end of the script then press enter to reboot the device.

NOTE

Motorola devices must be in bootloader / AP fastboot mode to use this tool.

  1. Power off device
  2. hold volume down and power to boot the device into AP fastboot mode so that you can flash.

If you have a windows machine that is fine also as you can still use RSD lite form Motorola

KPh1j

Learn more about RSDlite and other firmware flashing tricks HERE

 

Amazon Ads & Bloat Removed from the Motorola Moto G 4th gen
PhonLab E-Campus

Super Fans always leave a comment :-)

25 thoughts on “RSD Lite for Mac and Linux”

  1. I’m running on linux and i’m getting “permission denied” error. When I run as root, it runs but then I get the same error for the intermediate steps.

    Reply
  2. Hi. Thanks for the script and the tutorial.

    In order to execute the steps I had to replace the first line of the script to “!/bin/bash” and execute the script with sudo, like “sudo ./rsd-flash.sh flashfile.xml”.

    I had this two erros:
    “`
    max-sparse-size: 268435456
    finished. total time: 0.000s

    OKAY [ 0.005s]
    finished. total time: 0.005s
    target reported max download size of 536870912 bytes
    sending ‘partition’ (32 KB)…
    OKAY [ 0.004s]
    writing ‘partition’…
    (bootloader) Preflash validation failed
    FAILED (remote failure)
    finished. total time: 0.105s
    target reported max download size of 536870912 bytes
    sending ‘motoboot’ (2163 KB)…
    OKAY [ 0.069s]
    writing ‘motoboot’…
    (bootloader) Motoboot: Preflash validation for aboot
    (bootloader) Preflash validation failed
    FAILED (remote failure)
    finished. total time: 0.161s
    […]
    “`

    But everything is working fine.

    My system is Debian GNU/Linux 9.0 (stretch) and my phone is Moto Maxx (XT1225).

    Reply
  3. Great tool, but I’m wondering if there is a version with the ARM versions of the Fastboot and ADB files available. I tried to use this on a Raspberry Pi and have been running into issues with the bin files in ./files

    The message that I get is: rsd-flash.sh: line 67: files/./fastbootlinux: cannot execute binary file: Exec format error
    which suggests that I’m executing .bin files in the wrong architecture, which I am. Thanks!

    Reply
      • I found a solution in the ARM version of Ubuntu Mate 16.04:

        Install ADB and Fastboot Via
        sudo add-apt-repository ppa:phablet-team/tools && sudo apt-get update
        and
        sudo apt-get install android-tools-adb android-tools-fastboot

        Change the Variables in the script to just the commands.

        If there is a place that I can submit my changes to you, I would love to do so.

        Thanks!

        Reply
    • Basta excluir os textos “files/./” e os finais “linux” dos endereços ADB e FASTBOOT no arquivo “rsd-flash.sh”:
      :
      ADB=”files/./adblinux”
      FASTBOOT=”files/./fastbootlinux”

      modifique para

      ADB=”adb”
      FASTBOOT=”fastboot”

      Reply
  4. Hi,
    I’m trying to use RSD-Lite for Mac/Linux to refresh my wife’s RAZR M. I pulled a bunch of different firmware files including the latest from here: https://www.androidfilehost.com/?a=show&w=files&flid=44743.

    The zips do not contain a flash file.xml or service file.xml but if I run it against the main version.xml I get the following output:
    ___ ____ ____ _____ ____ ___ ____ ____ __ ________ _ _
    / _ \/ _ \/ _ \/_ _/_ / / / / / \/ / //_/\ \/ / / __/ _ \/ \/ \
    / , _/ |_| / |_| / / / / // / /_/ / / < \ /_/ /_/ |_| / , , \
    /_/|_|\____/\____/ /_/ \___/\____/_/\_/_/\_/ /_/_/___/\____/_/ \/ \_\

    —————————————————————————-
    Welcome to RSD Lite For Mac and Linux press enter to start your flash
    —————————————————————————-

    max-download-size: 31457280
    finished. total time: 0.004s

    OKAY [ 0.014s]
    finished. total time: 0.014s
    (bootloader) Variable not supported!
    target reported max download size of 31457280 bytes
    sending 'partition' (32 KB)…
    OKAY [ 0.020s]
    writing 'partition'…
    (bootloader) This may take a few seconds, if a
    (bootloader) different partition table is being
    (bootloader) flashed since we need to backup
    (bootloader) and restore a few partitions
    OKAY [ 0.479s]
    finished. total time: 0.499s
    (bootloader) Variable not supported!
    target reported max download size of 31457280 bytes
    sending 'sbl1' (101 KB)…
    OKAY [ 0.025s]
    writing 'sbl1'…
    OKAY [ 0.626s]
    finished. total time: 0.651s
    (bootloader) Variable not supported!
    target reported max download size of 31457280 bytes
    sending 'sbl2' (127 KB)…
    OKAY [ 0.023s]
    writing 'sbl2'…
    OKAY [ 1.034s]
    finished. total time: 1.058s
    (bootloader) Variable not supported!
    target reported max download size of 31457280 bytes
    sending 'sbl3' (512 KB)…
    OKAY [ 0.057s]
    writing 'sbl3'…
    OKAY [ 1.206s]
    finished. total time: 1.263s
    (bootloader) Variable not supported!
    target reported max download size of 31457280 bytes
    sending 'rpm' (140 KB)…
    OKAY [ 0.023s]
    writing 'rpm'…
    OKAY [ 0.526s]
    finished. total time: 0.549s
    (bootloader) Variable not supported!
    target reported max download size of 31457280 bytes
    sending 'tz' (210 KB)…
    OKAY [ 0.027s]
    writing 'tz'…
    OKAY [ 0.571s]
    finished. total time: 0.598s
    (bootloader) Variable not supported!
    target reported max download size of 31457280 bytes
    sending 'aboot' (256 KB)…
    OKAY [ 0.030s]
    writing 'aboot'…
    OKAY [ 0.870s]
    finished. total time: 0.900s
    (bootloader) Variable not supported!
    target reported max download size of 31457280 bytes
    Invalid sparse file format at header magi
    sending sparse 'modem' (28224 KB)…
    OKAY [ 2.204s]
    writing 'modem'…
    (bootloader) Unknown chunk type
    FAILED (remote failure)
    finished. total time: 3.723s
    (bootloader) Variable not supported!
    target reported max download size of 31457280 bytes
    sending 'fsg' (170 KB)…
    OKAY [ 0.031s]
    writing 'fsg'…
    OKAY [ 0.964s]
    finished. total time: 0.995s
    (bootloader) Variable not supported!
    erasing 'modemst1'…
    OKAY [ 0.736s]
    finished. total time: 0.737s
    (bootloader) Variable not supported!
    erasing 'modemst2'…
    OKAY [ 0.730s]
    finished. total time: 0.730s
    (bootloader) Variable not supported!
    target reported max download size of 31457280 bytes
    sending 'logo' (1709 KB)…
    OKAY [ 0.141s]
    writing 'logo'…
    OKAY [ 1.438s]
    finished. total time: 1.579s
    (bootloader) Variable not supported!
    target reported max download size of 31457280 bytes
    sending 'boot' (10240 KB)…
    OKAY [ 0.800s]
    writing 'boot'…
    OKAY [ 4.040s]
    finished. total time: 4.839s
    (bootloader) Variable not supported!
    target reported max download size of 31457280 bytes
    sending 'recovery' (10240 KB)…
    OKAY [ 0.802s]
    writing 'recovery'…
    OKAY [ 3.205s]
    finished. total time: 4.008s
    (bootloader) Variable not supported!
    target reported max download size of 31457280 bytes
    Invalid sparse file format at header magi
    error: write_sparse_skip_chunk: don't care size 1007911900 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 976458716 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 944976860 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 913519580 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 881660892 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 850039772 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 818586588 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 789300188 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 757847004 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 726275036 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 694563804 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 663045084 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 631591900 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 600122332 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 568611804 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 537117660 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 508584924 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 477103068 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 445633500 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 414180316 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 382653404 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 351200220 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 319747036 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 288285660 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 256828380 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 225346524 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 196105180 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 164619228 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 133166044 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 101712860 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 70259676 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 38777820 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 7312348 is not a multiple of the block size 4096
    sending sparse 'system' (30716 KB)…
    error: write_sparse_skip_chunk: don't care size 1007911900 is not a multiple of the block size 4096
    error: write_sparse_skip_chunk: don't care size 1007911900 is not a multiple of the block size 4096
    OKAY [ 2.382s]
    writing 'system'…
    (bootloader) Preflash validation failed
    FAILED (remote failure)
    finished. total time: 2.641s
    (bootloader) Variable not supported!
    erasing 'tombstones'…
    OKAY [ 0.936s]
    finished. total time: 0.936s
    (bootloader) Variable not supported!
    erasing 'cache'…
    OKAY [ 2.395s]
    finished. total time: 2.395s
    (bootloader) Variable not supported!
    erasing 'userdata'…
    OKAY [ 35.320s]
    finished. total time: 35.320s

    OKAY [ 0.006s]
    finished. total time: 0.006s
    ———————————————————
    Please check for errors then press enter to reboot device
    ———————————————————

    Any suggestions?

    Reply
  5. hello i am stuck in bootloop showing an unauthorized sw has been detected. i was on 139-48 and now showing 139-64 athene i have tried reflashing your xml file of the 139-48 but i get fail notification thru rsdlite and .bat file.
    i have done this over and over a few times with no luck. is there something i am doing wrong or missing to complete flashing moto g4 back to life?

    Reply
  6. I’m using Ubuntu 14.04. I faced two issues:

    (1)
    After runing:
    $ ./rsd-flash.sh flashfile.xml

    I got:
    ./rsd-flash.sh: 4: ./rsd-flash.sh: function: not found
    ./rsd-flash.sh: 25: ./rsd-flash.sh: platform: not found

    To overcome that, I typed bash instead of ./ (dot slash) :
    $ bash rsd-flash.sh flashfile.xml

    (2)
    Then I got stuck in the message: “”
    Usually I don’t have problems with USB connection, I tried with sudo and did the trick (I haven’t deeply investigate this)
    $ sudo bash rsd-flash.sh flashfile.xml

    Reply

Leave a Comment

Loading Facebook Comments ...