Printable Version of Topic

Click here to view this topic in its original format

OESF Portables Forum _ Gemini PDA - General Discussion _ Firmware causes wifi mac address change on reboot

Posted by: Vincent Jun 12 2019, 12:26 PM

Beginning 2019 i flashed the Gemini to dual boot for Sailfish and Android 7.1. There were no issues then. Recently Android 8.1 came available, and because i have the dual boot the OTA did not work and i had to reflash the dual boot together with Android 8.1. Everything seemed fine, until i found out that ever since (10-06-2019) the wifi mac address changed its number 4 and 5 hex digit at every reboot.

I tested rebooting in Sailfish and Android, and both show the wifi mac address change. Therefore i think it happens in the Gemini firmware that enables dual boot.

This is rather a problem, because some servers i connect to rely on my mac address. Does anyone else notice this wifi mac address changing at reboot with a dual boot flashed Gemini since the Android 8.1 came available? If so, does anyone know how to stop this wifi mac address changing at reboot?

Posted by: flotsam Jun 13 2019, 03:41 AM

QUOTE(Vincent @ Jun 12 2019, 10:26 PM) *
If so, does anyone know how to stop this wifi mac address changing at reboot?

See https://www.oesf.org/forum/index.php?showtopic=35795. It has a kludge that helps somewhat. The results that I have (using the fix) are that sailfish keeps the correct mac address, but android changes it. Someone else reported it working with android also.

Posted by: Vincent Jun 13 2019, 09:20 AM

Did the chattr thing in Sailfish and rebooted in Sailfish. Still a different wifi mac address.

Posted by: flotsam Jun 17 2019, 05:09 AM

QUOTE(Vincent @ Jun 13 2019, 07:20 PM) *
Did the chattr thing in Sailfish and rebooted in Sailfish. Still a different wifi mac address.

Did you do the "chattr" first thing after a full flash (i.e. "firmware upgrade"), and before booting Android? I don't know of a way to restore the contents of that file other than a full flash, once it has been trashed, which is what Android seems to do to it. Maybe someone more knowledgable than myself can tell us how to generate the NVDATA and NVCFG partitions from the data in the NVRAM partition.

Posted by: Vincent Jun 18 2019, 11:05 AM

Ok, i have got it done for Sailfish without a full reflash. I do not want to lose any settings that may reside in userdata. Android is still swapping the mac address. But i could not care less about that.

What i did is:
1) hexedit /nvdata/APCFG/APRDEB/WIFI and set the mac address in bytes 04-09 (mind that the base is 0, so it starts at the 5th byte) of the first row (0).
2) set the i attr on the file

Originally bytes 04-09 contained zeros, so i suppose that causes the system to generate a fake mac address.

There is lots of talk about it on the internet by Android people. Search something like "hex edit nvram wifi mac address". Note that the Android people talk about nvram instead of nvdata. They have a similar file in /data/nvram/...

Posted by: pbek Jul 23 2019, 04:46 AM

Thanks a lot for the instructions and explanations. They worked great for my Gemini Wifi.

I've updated https://github.com/gemian/gemini-keyboard-apps/wiki/DebianTP3#connman and other wiki entries.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)