How to Fix 02:00:00 MAC Address in Android Custom ROMs

Some people have encountered an issue with flashing custom ROM suchs as LineageOS, OxygenOS, CyanogenMod, etc. to their Android device; after flashing the ROM, their MAC address becomes corrupted and displays as 20:00:00:00 or some other incorrect number.

This is effecting a range of devices, and it seems to be caused by devices that have random MAC generators built into the kernel code. Please note that I am only addressing incorrect MAC address after flashing a custom ROM – if you’re on stock ROM and have never flashed a custom ROM, yet your MAC address is faulty, it very well could be a hardware problem.

The Solution

First try this very simple solution:

Settings -> Backup and Reset -> Reset Network settings -> Reset

If that did not work, we will need to get a bit more technical, so follow me closely. There are several reasons why the MAC address may be corrupted, so we will try to address each one until your issue is resolved.

To continue troubleshooting, you should have ADB installed on your computer – please see “How to Install ADB on Windows” – Mac / Linux users have a far easier method that do not require a guide.

In any case, once you have ADB running on your PC, you should also grab a hex editor. I use Notepad++ with hex editor plugin, but other hex editor software should be fine.

With your phone connected to your PC, verify that ADB detects the USB connection by typing ‘adb devices’. If it displays a unique ID for your device, continue.

Type these following commands into ADB:

adb shell “su -c ‘dd if=/dev/block/bootdevice/by-name/misc of=/sdcard/misc.img'”
adb pull /sdcard/misc.img

Now you should be able to find misc.img in your ADB root folder. Open it with the hex editor software of your choice.

Find the hex offset 3000, and edit hex offsets 3000 to 3005 with your wifi MAC address – “00 90 3D F1 A2 31″ for example. Save and close the hex editor.

Now we’re going to push it back to your device through ADB, so type into ADB terminal:

adb push misc.img /sdcard/misc_edited.img
adb shell “su -c ‘dd if=/sdcard/misc_edited.img of=/dev/block/bootdevice/by-name/misc'”

Now type ‘adb reboot’ and after your phone restarts, check if the MAC address is okay. If not, lets continue.

The last step to try is to use a root file explorer to look inside persist/wifi/.macaddr and open .macaddr with a text editor. Add your MAC address inside this file, save it, and restart your device.

If none of these solutions worked for you, it very well likely could be a hardware problem – perhaps your WiFi antenna has become loose from the motherboard and needs to be soldered back on, or some related problem like that.


Kevin Arrows

Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.