1

Today I upgraded to Android 10, more precisely to unofficial build of Lineage OS. My phone is Xiaomi Redmi Note 5 Pro (whyred). I am used to changing my MAC address, because our school tracks network usage. I got around it by setting my MAC to MAC of one of schools iPads. After the upgrade I can't change my MAC anymore! I turn the WiFi off as always (otherwise I would get some error like resource busy) and set the MAC using following command:

ip link set wlan0 address MACHERE

Or

busybox ifconfig wlan0 hw ether MACHERE

In both cases the MAC gets changed, but after turning the WiFi on again and connecting to WiFi, it gets resettled back to where it was.

Any ideas what can be causing this? I have tried (so far):

  • multiple different kernels
  • rebooting

Fixed by editing wlan_mac.bin:

4
  • Why don't you add the solution to an answer with some explanation for others benefit? – Irfan Latif Feb 24 '20 at 14:26
  • Android 10 has by default MAC randomization activated: source.android.com/devices/tech/connect/wifi-mac-randomization – Robert Feb 24 '20 at 19:01
  • @Robert that's why it'd be interesting to know how OP got a fixed MAC address by modifying a WiFi firmware file. – Irfan Latif Feb 24 '20 at 20:09
  • 1
    @Robert The WiFi driver needs special implementation for random MACs. I was also checking that. My build has it disabled. I have permanently changed the MAC by modifying /persist/wlan_mac.bin as shown above in edit. I think that the fact I can not change my mac as I used to do before is because this ROM uses Xiaomi official WiFi driver. The fix sadly probably only works for devices with same driver/modem configuration. – Samuel Tulach Feb 24 '20 at 20:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.