What's wrong with that? Convert the bytes 0x77, 0x08 from little endian to a number, you get:So in HEX it is77080000
, which makes no sense when converted to binary so Dortania manual is not correct:
0x877 - that's 12 bits for Big Sur with 5 of them not set.
10 bits for High Sierra = 0x3FF (last bit is CSR_ALLOW_UNAPPROVED_KEXTS = 0x200)
11 bits for Catalina and Mojave = 0x7FF (adds CSR_ALLOW_EXECUTABLE_POLICY_OVERRIDE = 0x400)
12 bits for Big Sur = 0xFFF (the new bit is authenticated-root = 0x800)
[automerge]1595902426[/automerge]
I use this function:that is weird. And this?:
Code:nvram 7C436110-AB2A-4BBB-A880-FE41995C9F82:csr-active-config| awk '{split($NF,chars,""); for(n=0;n<256;n++){ord[sprintf("%c",n)]=n}; i=1; j=0; while(i<=length($NF)){if(substr($NF,i,1)=="%"){printf "%s",toupper(substr($NF,i+1,2)); i=i+2} else {printf "%x",toupper(ord[chars[i]])} j=j+2; i++} print("")}'
Code:
nvramp () {
local thename="$1"
local thedata="" # must declare local separately for $? to get the error
thedata="$(nvram $thename)"
local theerr=$?
printf "$(sed -E '/^'$thename'./s///;s/\\/\\\\/g;s/%/\\x/g' <<< "$thedata")"
return $theerr
}
xxd -p
like this: nvramp 7C436110-AB2A-4BBB-A880-FE41995C9F82:csr-active-config | xxd -p
It has the benefit of returning an error, which I use in other functions in the attached script (I use
source gfxutil.sh
to load the functions).