Linux native flashing

Discussion of LibreDrive mode, compatible drives and firmwares
kahomono
Posts: 7
Joined: Mon Apr 10, 2017 10:40 am

Re: Linux native flashing

Post by kahomono »

Thanks, Mike!
spl147
Posts: 295
Joined: Mon Dec 10, 2012 4:59 pm

Re: Linux native flashing

Post by spl147 »

i cannot get this to work!

Code: Select all

~ # /opt/makemkv/bin/makemkvcon f -d /dev/sr0 -f /config/data/sdf_00000070.bin flash -i /
config/data/WH16NS60-1.02.bin

Unknown command

Command produced error code 0x8fffffff
Big-rome
Posts: 30
Joined: Wed Dec 26, 2018 11:59 pm

Re: Linux native flashing

Post by Big-rome »

I got this to work on my synology nas running makemkv in a docker container.
Big-rome
Posts: 30
Joined: Wed Dec 26, 2018 11:59 pm

Re: Linux native flashing

Post by Big-rome »

flashing instructions on a synology nas with docker

Code: Select all

sudo docker exec -ti CONTAINERNAME sh
wget http://www.makemkv.com/svq/sdf.bin
chmod +x sdf.bin
wget https://www.makemkv.com/download/mk-firmware-pack-20200720.zip
unzip -q mk-firmware-pack-20200720.zip
cd /opt/makemkv/bin
./sdftool --list
./sdftool --sdf-file=/tmp/sdf.bin -d /dev/sg* rawflash -i /tmp/mk-firmware-pack-20200720/MK/bla/bla/bla.bin 
pr0999
Posts: 1
Joined: Sun Aug 30, 2020 9:23 pm

Re: Linux native flashing

Post by pr0999 »

HereInPlainSight wrote:
Wed Apr 01, 2020 11:19 pm

Code: Select all

Drive Information
OS device name: /dev/sr0
Current profile: DVD-ROM
Manufacturer: ASUS
Product: BC-12B1ST
Revision: 1.01
Serial number: <removed>
Firmware date: 
Bus encryption flags: 12
But, when I try to do anything of interest with the sdftool, I'm not sure if it has anything to do with the firmware date being missing, but I keep hitting a wall, which seems best surmised with:

Code: Select all

$ ./sdftool.sh -d /dev/sr0 help
No drive tool logic found in SDF.bin
Internal error 0x8d000000
and:

Code: Select all

$ ./sdftool.sh -d /dev/sr0 --info
SDF.bin version: 0x006D
Drive Tool SDF not present
Drive Specific SDF not present
Identification SDF present
Of the two missing -- am I supposed to do anything specific to get / provide them? It looks like my drive is supported, just not on this specific firmware, which is... obviously exactly what I'm trying to fix (though I'm not entirely certain if I'm supposed to update to the latest for my system and then downgrade to the BW-16D1HT 3.02 firmware, that seems like what's being recommended but I'm a bit too new to understand the exact benefits, people just keep saying it can be done).

Any guidance on what I'm missing to be able to at least update my firmware would be great.
Did you ever solve this? I also have a 12B1ST at 1.01 and am trying to update it to a libredrive compatible fw, and running into the exact same problem. The devilsclaw flasher from OP also doesn't seem to work...
Billycar11
Posts: 3766
Joined: Sun Aug 24, 2014 5:49 am

Re: Linux native flashing

Post by Billycar11 »

pr0999 wrote:
Sun Aug 30, 2020 9:28 pm

Did you ever solve this? I also have a 12B1ST at 1.01 and am trying to update it to a libredrive compatible fw, and running into the exact same problem. The devilsclaw flasher from OP also doesn't seem to work...
dont mess with an asus on 1.01 your asking for trouble only do this if they have 3.xx not worth it for the other drives
Buy a UHD drive from the guide and how to video maker: https://www.makemkv.com/forum/viewtopic ... 20&t=17831
UHD Drives Guide: https://www.makemkv.com/forum/viewtopic ... 16&t=19634
Auto flash kit $25 Email me for one Billycar5924@gmail.com
hatch
Posts: 1
Joined: Sat Dec 12, 2020 7:02 pm

Re: Linux native flashing

Post by hatch »

I have an ASUS BW-16D1HT made in March 2020 and I'm having a problem: BD discs do not work after the flashing. CD and DVD discs work. I only tried one BD disc, and it worked before flashing, though it took a while. When inserting the disc, after a while of making "horrible" noises (as described in the Sleep bug), MakeMKV reports "No disc inserted".

I followed these steps:

- Downloaded https://www.makemkv.com/sdf.bin, copied it to /root/.MakeMKV/
- Downloaded https://www.makemkv.com/download/mk-fir ... 200720.zip
- Downloaded and installed makemkv-oss-1.15.3.tar.gz and makemkv-bin-1.15.4.tar.gz (I used a custom installation directory and LD_LIBRARY_PATH to point to the right libmakemkv, if that matters)
- sdftool --info output:

Code: Select all

$ sdftool -d /dev/sr0 --info
SDF.bin version: 0x007D

Drive Tool SDF present

Drive Specific SDF present

[Drive Specific SDF] Embedded Info Strings:
8000:LibreDrive Information

8013:Status
8109:Possible (with patched firmware)

8001:Drive platform
:MT1959

8010:Harware support
8100:Yes

8011:Firmware support
8101:No

8002:Firmware type
8108:Original (patched version available)

8003:Firmware version
:3.10

8005:DVD all regions
8109:Possible (with patched firmware)

8006:BD raw data read
8109:Possible (with patched firmware)

8007:BD raw metadata read
8109:Possible (with patched firmware)

8009:Unrestricted read speed
8109:Possible (with patched firmware)


[Drive Specific SDF] Embedded Status Message:
8096:LibreDrive mode for this drive is only possible with firmware upgrade (id=%1)
:1C602C3A8BBC


Identification SDF present

[Identification SDF] Embedded Info Strings:
8000:LibreDrive Information

8013:Status
8102:Possible, not yet enabled

8001:Drive platform
:MT1959


[Identification SDF] Drive autodetect string:
mtk:19:59:JB8 :ASUS    :BW-16D1HT       3.10:W001601:-
- Flashed with:

Code: Select all

$ sdftool -d /dev/sr0 -v rawflash -i mk-firmware-pack-20200720/MK/ASUS/BW-16D1HT/ASUS-BW-16D1HT-3.10-WM01601-211901041014.bin 
Loaded SDF.bin version 0x7d

Reading input file mk-firmware-pack-20200720/MK/ASUS/BW-16D1HT/ASUS-BW-16D1HT-3.10-WM01601-211901041014.bin
Flashing flags = 0x0 : 0 0 0 0 : ---- ---- ---- ----
Current Drive ID: ASUS_BW-16D1HT_3.10_211901041014_KLOK3TB0433
Ready to write drive flash memory.
Type "yes" to continue, "no" to abort
yes
Operation started: Sending flash image to drive
 100% Operation finished                                
Operation started: Programming flash
 100% Operation finished                                
Done successfully

Command produced 0 file(s)
$ 
Output of --info after flashing was:

Code: Select all

sdftool -d /dev/sr0 --info
SDF.bin version: 0x007D

Drive Tool SDF present

Drive Specific SDF present

[Drive Specific SDF] Embedded Info Strings:
8000:LibreDrive Information

8013:Status
8105:Enabled

8001:Drive platform
:MT1959

8002:Firmware type
8107:Patched (microcode access re-enabled)

8003:Firmware version
:3.10

8005:DVD all regions
8100:Yes

8006:BD raw data read
8100:Yes

8007:BD raw metadata read
8100:Yes

8009:Unrestricted read speed
8100:Yes


[Drive Specific SDF] Embedded Status Message:
8099:Using LibreDrive mode (v%1 id=%2)
:06.2
:0FA242DD4D0B


Identification SDF present

[Identification SDF] Embedded Info Strings:
8000:LibreDrive Information

8013:Status
8102:Possible, not yet enabled

8001:Drive platform
:MT1959


[Identification SDF] Drive autodetect string:
mtk:19:59:JB8 :ASUS    :BW-16D1HT       3.10:WM01601:-
- I tried and the BDs that worked before, no longer worked. I checked in a player and the discs keep working, so that's not it.
- I realized that the instructions mention that the firmware needs to be updated with the 'enc' option, so I tried flashing again:

Code: Select all

sdftool -d /dev/sr0 -v rawflash enc -i mk-firmware-pack-20200720/MK/ASUS/BW-16D1HT/ASUS-BW-16D1HT-3.10-WM01601-211901041014.bin 
Loaded SDF.bin version 0x7d

Reading input file mk-firmware-pack-20200720/MK/ASUS/BW-16D1HT/ASUS-BW-16D1HT-3.10-WM01601-211901041014.bin
Flashing flags = 0x0 : 0 0 0 0 : ---- ---- ---- ----
Sending image in encrypted format
Current Drive ID: ASUS_BW-16D1HT_3.10_211901041014_KLOK3TB0433
Ready to write drive flash memory.
Type "yes" to continue, "no" to abort
yes
Operation started: Sending flash image to drive
 100% Operation finished                                
Operation started: Programming flash
 100% Operation finished                                
Done successfully

Command produced 0 file(s)
But that did not restore access to the BR discs.

Did I brick my unit by forgetting to upload the firmware with the 'enc' option the first time?

Did I miss any steps? Should I downgrade in order to get firmware that fixes the sleep bug? Where I can find information about downgrading? Where can I get the downgraded firmware for this drive? Putting together all the information necessary to reach this point has already been a bit of a hell.
Skalli
Posts: 1
Joined: Wed Jun 16, 2021 12:53 pm

Re: Linux native flashing

Post by Skalli »

I've wanted to watch BluRays on my Linux PC too, but more importantly help my father get it done. So I bought a drive and this thread helped me a lot, since I stumbled across a few problems, but the solutions were missing, so I registered to write down the steps that helped me, so it might help others too.

Some background, I'm on Manjaro, so MakeMKV ist available via the Arch User Repositories (AUR). Easy to install which also gives the sdftool command line tool. No big effort there, luckily.
I got the drive ASUS BW-16D1HT simply because it was the cheapest compatible drive I could find with ~70€ on Amazon as the time of writing.
But here I ran in the first problem as others: When running sdftool -d /dev/sr0 --info it returned

Code: Select all

Drive "/dev/sr0" not found
.
The path to the disc was correct as it showed it had loaded a disk.
The solution for this was, that the drive was working, but the generic SCSI module was not loaded. The command

Code: Select all

sudo modprobe sg
fixed that. sdftool now could access the disc (so could MakeMKV).

In order to load that always you can do this:

Code: Select all

su root
echo sg > /etc/modules-load.d/sg.conf
exit
Then MakeMKV can open the disc without the need to run the command each time.

Code: Select all

SDF.bin version: 0x007E

Drive Tool SDF present

Drive Specific SDF present

[Drive Specific SDF] Embedded Info Strings:
8000:LibreDrive Information

8013:Status
8109:Possible (with patched firmware)

8001:Drive platform
:MT1959

8010:Harware support
8100:Yes

8011:Firmware support
8101:No

8002:Firmware type
8108:Original (patched version available)

8003:Firmware version
:3.10

8005:DVD all regions
8109:Possible (with patched firmware)

8006:BD raw data read
8109:Possible (with patched firmware)

8007:BD raw metadata read
8109:Possible (with patched firmware)

8009:Unrestricted read speed
8109:Possible (with patched firmware)


[Drive Specific SDF] Embedded Status Message:
8096:LibreDrive mode for this drive is only possible with firmware upgrade (id=%1)
:1C602C3A8BBC


Identification SDF present

[Identification SDF] Embedded Info Strings:
8000:LibreDrive Information

8013:Status
8102:Possible, not yet enabled

8001:Drive platform
:MT1959
The only thing missing was now the right firmware.
I used these.

Then figuring out the correct command took a bit as I also got the classic

Code: Select all

Unknown command

Command produced error code 0x8fffffff
error messages.

Long story short, after reading this thread it worked for me. So I got it to work with this command:

Code: Select all

sdftool -d /dev/sr0 -v rawflash -i ~/Downloads/firmware/BW-16D1HT/ASUS-BW-16D1HT-3.10-WM01601-211901041014.bin
Of course that only works for the ASUS BW-16D1HT. For other drives you need to choose the correct firmware.

After these steps, playback with VLC worked, and backing up with MakeMKV runs fine too.

I hope this helps, in the end it was pretty straight forward, just took a time to gather all the information and filter out what's not applicable.
blazini36
Posts: 1
Joined: Wed Aug 18, 2021 3:37 am

Re: Linux native flashing

Post by blazini36 »

I'm also a die hard Linux guy so I always like to stumble across threads like this so I had to join. I didn't actually realize BluRays were such an issue on PCs and to be honest I probably played 2 BluRays 10 years ago. I picked up an external drive (Pioneer BDR-XS07S) because I found out that an old anime I'm fond of was released on BluRay and I couldn't find it anywhere else. Tried to play it on my new drive and realized.........blurays are fun lol

I wasn't able to read it with makemkv at first but Skalli's post about loading the module did it. So now I have a disk transcoding. Looks like there is no Libredrive firmware for it yet but I'll be sending the firmware to support so hopefully someone will come up with something.
AndrewR
Posts: 2
Joined: Fri Dec 30, 2022 9:24 pm

Re: Linux native flashing

Post by AndrewR »

I have

Code: Select all

# /usr/bin/sdftool -d /dev/sr0 --info
SDF.bin version: 0x0096

Drive Tool SDF present

Drive Specific SDF not present

Identification SDF present

[Identification SDF] Embedded Info Strings:
8000:LibreDrive Information

8013:Status
8102:Possible, not yet enabled

8001:Drive platform
:MT1959


[Identification SDF] Drive autodetect string:
mtk:19:59:JB8 :ASUS    :BW-16D1HT       3.11:W000600:-

Code: Select all

# /usr/bin/sdftool --l
Found 1 drives(s)
00: dev_21:1, /dev/sr0, /dev/sr0
  ASUS_BW-16D1HT_3.11_212012011759_KL4LC9F5139

Unfortunately attempt at making full firmware dump meet with:

Code: Select all

# /usr/bin/sdftool -d /dev/sr0 dump full

Error: full dump is disabled in this firmware version
DEBUG: Code 4279205893 at viMquYt1v=$Gzk%Z~&aQ#/W!W1[^Pbye:29395034

Command produced error code 0xff0f8005

MakeMKV 1.17.2 is compiled/installed for 32-bit userspace

Partial dump is possible but I guess it will not give me something to flash back if something goes wrong?
Coopervid
Posts: 1145
Joined: Tue Feb 19, 2019 10:32 pm

Re: Linux native flashing

Post by Coopervid »

You need to flash your drive to MK firmware using -enc since your firmware is encrypted. Use search or start with the tutorial.

viewtopic.php?f=16&t=19634
AndrewR
Posts: 2
Joined: Fri Dec 30, 2022 9:24 pm

Re: Linux native flashing

Post by AndrewR »

so there is currently no way to backup *original* (from my own drive) firmware? I think I'll wait for some time and try pre-installed firmware first ( right now I am more interested in burning, not in UHD ripping. while idea of (partially) open firmware looks attractive ..as long as one can reflash some known-stable variant ...)
d00zah
Posts: 1414
Joined: Mon Jun 06, 2016 8:23 pm

Re: Linux native flashing

Post by d00zah »

AndrewR wrote:
Sun Jan 01, 2023 5:04 am
so there is currently no way to backup *original* (from my own drive) firmware? I think I'll wait for some time and try pre-installed firmware first ( right now I am more interested in burning, not in UHD ripping. while idea of (partially) open firmware looks attractive ..as long as one can reflash some known-stable variant ...)
Only 1 version back...

https://dlcdnets.asus.com/pub/ASUS/ODD/ ... 190306.zip

viewtopic.php?t=19065#p72109

viewtopic.php?f=19&t=19116#p72108

Note: Functionally, there is little difference between stock & 'patched' FWs other than some 'single-bit' & decryption tweaks:

- downgrade bit ("DE", downgrade (re)enabled)
- microcode access re-enabled ("MK", by MakeMKV author)
- decrypted
Post Reply