I found a rather kludgey workaround.
Before booting android, get a root shell in sailfish, and execute the command:
chattr +i /nvdata/APCFG/APRDEB/WIFI
Apparently android wants to munge this file and change the MAC address. This prevents that from happening.
Android will still (annoyingly) assign a random (00:08:22:XX:XX:XX) address to the interface, but this will no longer affect sailfish.
Thank you so much for the tip.
My problem was solved after your tip. My mac address is the same in android and in debian. (and not changed anymore ).
First I've installed from planet images a fresh install ( firmware upgrade ).
Then booted in debian and set the internet ( SSID and password ).
Did a backup of the contents of nvdata.
So, I've removed the contents of nvdata. ( never remove this contents if you already booted first in android , because your sim card will not be detected : see my previous post here).
Then booted again in debian. The network is saved. ( mac address is like 00:09:34:XX:XX:XX )
After this I've booted the first time in android. Checked the mac address . It is the same of debian.
But when I boot again in debian it has changed the mac address. ( 00:08:22:XX:XX:XX )
Copied the contents of the backup I did ( nvdata ) to the correct location of nvdata.
Booted again in debian. Network was saved with the same mac address.( 00:09:34:XX:XX:XX ).
Did what you said : chattr +i /nvdata/APCFG/APRDEB/WIFI
Booted again in debian : everything is fine.
Booted in android : everything is fine.
Booted in debian : everything is fine.
Both mac address in android and in debian are the same -- 00:09:34:XX:XX:XX.
Interesting is that mac address 00:09:34 and 00:08:22 are from different manufaturers.
well, that is it.