Skip to content

vvigilante/drivefs-wsl2-patch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Google Drive File Stream finally works with WSL 2 ?

Steps:

  • make sure you have wsl 2 (wsl -l -v). If you have version 1 you need to upgrade (GIYF)
  • make sure you have version 3301 of dokanccXXXX.dll in your Google Drive installation directory.
  • make sure you have python3 installed
  • run python idadif.py dokancc3301.dll dokancc3301.dif
    • change the path to the dll as appropriate for your case
  • restart

Do this at your own risk: the patch is offered "as is", without any warranty. If Google Drive decides to delete all your files and call you names, that is on you, not me.

What is this magic?

The library on which the Google Drive Filesystem is based (dokany) had a "bug" where it returned STATUS_NOT_IMPLEMENTED (0xc0000002) where it should have been STATUS_NOT_SUPPORTED (0xc00000bb).

Unfortunately Google did not port this fix into their software and we do not have their latest source code. Good news is: after a little bit of digging with Ghidra I was able to make a patch that works for me, just one byte needs to be changed

What problem does it solve?

Without this patch, it was not possible to enumerate the files in google drive (while it was possible to read or write a specific file). E.g. the command ls /mnt/g/ prints ls: reading directory: Function not implemented as shown in this issue: microsoft/WSL#2999

With the patch many commands work correctly, including ls and tar.

Known issues with this solution:

  • git misbehaves under WSL

About

Google Drive File Stream finally works with WSL 2 ?

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages