ea / bosch_headunit_root

Documentation and code for rooting and extending a Bosch car head unit (lcn2kai)
398 stars 57 forks source link

Made rootshell.sh script macOS compatible. #24

Closed Lukas1h closed 2 years ago

Lukas1h commented 2 years ago

Replaced me2fs, which is unavailable on macOS with genext2fs. Should still be compatible with other Linux distros too.

EDIT: Just realized that genext2fs does not allow for setting custom UUID. Will have to look for another solution.

ea commented 2 years ago

mke2fs is available as part of e2fsprogs package on homebrew for macos , although for some reason it's in ...../sbin/ not ..../bin/... so it doesn't show up in $PATH. I've actually opened an issue for it with homebrew repo.

ea commented 2 years ago

Actually , it's not a bug , it's intentional as some of e2fsprogs would override macOS defaults , i just didn't read carefully

e2fsprogs is keg-only, which means it was not symlinked into /usr/local,
because this installs several executables which shadow macOS system commands.

If you need to have e2fsprogs first in your PATH, run:
  echo 'export PATH="/usr/local/opt/e2fsprogs/bin:$PATH"' >> ~/.zshrc
  echo 'export PATH="/usr/local/opt/e2fsprogs/sbin:$PATH"' >> ~/.zshrc
Lukas1h commented 2 years ago

Yeah. I figured it out. It kind of ruins making the script 'Download and run'. But whatever.