nvrm_back.sh 545 B

12345678910111213
  1. #!/bin/sh
  2. a=$(/usr/sbin/ioreg -w0 -l -rd1 -n AppleBCMWLANCore | grep ModuleDictionary | awk '{print $4}' | cut -d'=' -f2 | sed 's/\./\\./g')
  3. vendor=$(/usr/sbin/ioreg -w0 -l -rd1 -n AppleBCMWLANCore | grep ModuleDictionary | awk '{print $5}' | cut -d"\"" -f1)
  4. c=$(cat /AppleInternal/Diags/WiFiFirmware/J34/WifiFirmware.prm | grep "$a" | grep "$vendor" | awk '{print $5}')
  5. loc="/AppleInternal/Diags/WiFiFirmware/J34/";
  6. filename=$(echo $c | cut -d'.' -f1)
  7. exts=$(echo $c | cut -d'.' -f2)
  8. newfname=$filename"-orig."$exts
  9. mv $loc$newfname $loc$c