[Nexus 5 General] wkwkwk:
Should you find yourself in a legit need to change the mac address (for testing, debugging etc), a simple 'busybox ifconfig wlan0 hwaddr' won't work (returning auth errors).

It looks like the mac address needs to be encoded into /persist/wifi/.macaddr

Backup the .macaddr file and issue the following:

echo -e "\x00\x11\x22\x33\x44\x55" > /persist/wifi/.macaddr

Turn the wifi off and on and the resulting MAC will be 00:11:22:33:44:55

If you want to emulate an Apple device (can obviously be anything but this was easy to extract), the following script will give you a random MAC:

#!/system/xbin/bash
apple=( 00:03:93 00:05:02 00:0A:27 00:0A:95 00:0D:93 00:10:FA 00:11:24 00:14:51 00:16:CB 00:17:F2 00:19:E3 00:1B:63 00:1C:B3 00:1D:4F 00:1E:52 00:1E:C2 00:1F:5B 00:1F:F3 00:21:E9 00:22:41 00:23:12 00:23:32 00:23:6C 00:23:DF 00:24:36 00:25:00 00:25:4B 00:25:BC 00:26:08 00:26:4A 00:26:B0 00:26:BB 00:30:65 00:3E:E1 00:50:E4 00:61:71 00:6D:52 00:88:65 00:A0:40 00:C6:10 00:F4:B9 00:F7:6F 04:0C:CE 04:15:52 04:1E:64 04:26:65 04:48:9A 04:54:53 04:69:F8 04:DB:56 04:E5:36 04:F1:3E 04:F7:E4 08:00:07 08:70:45 08:74:02 0C:15:39 0C:30:21 0C:3E:9F 0C:4D:E9 0C:74:C2 0C:77:1A 0C:BC:9F 10:1C:0C 10:40:F3 10:41:7F 10:93:E9 10:9A:DD 10:DD:B1 14:10:9F 14:5A:05 14:8F:C6 14:99:E2 18:20:32 18:34:51 18:9E:FC 18:AF:61 18:AF:8F 18:E7:F4 18:EE:69 18:F6:43 1C:1A:C0 1C:AB:A7 1C:E6:2B 20:78:F0 20:7D:74 20:9B:CD 20:A2:E4 20:C9:D0 24:24:0E 24:A0:74 24:A2:E1 24:AB:81 24:E3:14 28:0B:5C 28:37:37 28:5A:EB 28:6A:B8 28:6A:BA 28:CF:DA 28:CF:E9 28:E0:2C 28:E1:4C 28:E7:CF 28:F0:76 2C:1F:23 2C:B4:3A 2C:BE:08 2C:F0:EE 30:10:E4 30:90:AB 30:F7:C5 34:12:98 34:15:9E 34:36:3B 34:51:C9 34:A3:95 34:C0:59 34:E2:FD 38:0F:4A 38:48:4C 38:C9:86 3C:07:54 3C:15:C2 3C:AB:8E 3C:D0:F8 3C:E0:72 40:30:04 40:33:1A 40:3C:FC 40:6C:8F 40:A6:D9 40:B3:95 40:D3:2D 44:2A:60 44:4C:0C 44:D8:84 44:FB:42 48:43:7C 48:60:BC 48:74:6E 48:D7:05 48:E9:F1 4C:7C:5F 4C:8D:79 4C:B1:99 50:7A:55 50:EA:D6 54:26:96 54:4E:90 54:72:4F 54:9F:13 54:AE:27 54:E4:3A 54:EA:A8 58:1F:AA 58:55:CA 58:7F:57 58:B0:35 5C:59:48 5C:8D:4E 5C:95:AE 5C:96:9D 5C:97:F3 5C:AD:CF 5C:F5:DA 5C:F9:38 60:03:08 60:33:4B 60:69:44 60:92:17 60:C5:47 60:D9:C7 60:F8:1D 60:FA:CD 60:FB:42 60:FE:C5 64:20:0C 64:76:BA 64:9A:BE 64:A3:CB 64:B9:E8 64:E6:82 68:09:27 68:5B:35 68:64:4B 68:96:7B 68:9C:70 68:A8:6D 68:AE:20 68:D9:3C 6C:3E:6D 6C:40:08 6C:70:9F 6C:94:F8 6C:C2:6B 70:11:24 70:14:A6 70:3E:AC 70:48:0F 70:56:81 70:73:CB 70:CD:60 70:DE:E2 70:E7:2C 70:EC:E4 74:81:14 74:E1:B6 74:E2:F5 78:31:C1 78:3A:84 78:6C:1C 78:7E:61 78:9F:70 78:A3:E4 78:CA:39 78:D7:5F 78:FD:94 7C:01:91 7C:11:BE 7C:6D:62 7C:6D:F8 7C:C3:A1 7C:C5:37 7C:D1:C3 7C:F0:5F 7C:FA:DF 80:00:6E 80:49:71 80:92:9F 80:BE:05 80:D6:05 80:E6:50 80:EA:96 84:29:99 84:38:35 84:78:8B 84:85:06 84:8E:0C 84:B1:53 84:FC:FE 88:1F:A1 88:53:95 88:63:DF 88:C6:63 88:CB:87 8C:00:6D 8C:29:37 8C:2D:AA 8C:58:77 8C:7B:9D 8C:7C:92 8C:FA:BA 90:27:E4 90:3C:92 90:72:40 90:84:0D 90:8D:6C 90:B2:1F 90:B9:31 90:FD:61 94:94:26 94:E9:6A 94:F6:A3 98:03:D8 98:5A:EB 98:B8:E3 98:D6:BB 98:E0:D9 98:F0:AB 98:FE:94 9C:04:EB 9C:20:7B 9C:29:3F 9C:35:EB 9C:F3:87 9C:FC:01 A0:18:28 A0:99:9B A0:ED:CD A4:31:35 A4:5E:60 A4:67:06 A4:B1:97 A4:B8:05 A4:C3:61 A4:D1:D2 A8:20:66 A8:5B:78 A8:66:7F A8:86:DD A8:88:08 A8:8E:24 A8:96:8A A8:BB:CF A8:FA:D8 AC:29:3A AC:3C:0B AC:7F:3E AC:87:A3 AC:BC:32 AC:CF:5C AC:FD:EC B0:34:95 B0:65:BD B0:9F:BA B4:18:D1 B4:F0:AB B8:09:8A B8:17:C2 B8:44:D9 B8:78:2E B8:8D:12 B8:C7:5D B8:E8:56 B8:F6:B1 B8:FF:61 BC:3B:AF BC:4C:C4 BC:52:B7 BC:67:78 BC:6C:21 BC:92:6B C0:1A:DA C0:63:94 C0:84:7A C0:9F:42 C0:CE:CD C0:F2:FB C4:2C:03 C8:1E:E7 C8:2A:14 C8:33:4B C8:69:CD C8:6F:1D C8:85:50 C8:B5:B7 C8:BC:C8 C8:E0:EB C8:F6:50 CC:08:E0 CC:20:E8 CC:29:F5 CC:78:5F CC:C7:60 D0:03:4B D0:23:DB D0:25:98 D0:33:11 D0:4F:7E D0:A6:37 D0:E1:40 D4:9A:20 D4:F4:6F D8:00:4D D8:1D:72 D8:30:62 D8:96:95 D8:9E:3F D8:A2:5E D8:BB:2C D8:CF:9C D8:D1:CB DC:2B:2A DC:2B:61 DC:37:14 DC:86:D8 DC:9B:9C E0:66:78 E0:AC:CB E0:B5:2D E0:B9:BA E0:C9:7A E0:F5:C6 E0:F8:47 E4:25:E7 E4:8B:7F E4:98:D6 E4:C6:3D E4:CE:8F E8:04:0B E8:06:88 E8:80:2E E8:8D:28 EC:35:86 EC:85:2F F0:24:75 F0:99:BF F0:B0:E7 F0:B4:79 F0:C1:F1 F0:CB:A1 F0:D1:A9 F0:DB:E2 F0:DB:F8 F0:DC:E2 F0:F6:1C F4:1B:A1 F4:37:B7 F4:F1:5A F4:F9:51 F8:1E:DF F8:27:93 FC:25:3F FC:E9:98 FC:FC:48 )

array=( 1 2 3 4 5 6 7 8 9 0 a b c d e f )

newmac=\\x${array[$RANDOM%16]}\\x${array[$RANDOM%16]}:\\x${array[$RANDOM%16]}${array[$RANDOM%16]}:\\x${array[$RANDOM%16]}\\x${array[$RANDOM%16]}
vendor=$(echo "${apple[$RANDOM%406]}"|sed 's/:/\\x/g')

echo -e "\x$vendor$newmac" > /persist/wifi/.macaddr

Can be combined with Tasker if you want to randomize it every time Wi-Fi is turned off/on.

*NOTE - this has been tested on KitKat 4.4.4 - not sure if it still works on 5.x