This guide is for A780 but should work with other Ezxphones too.
Thank goes to mickeymouse0007 for finding this out.
Pre-requisites:
This assumes that you can get a shell on the cellphone.
The /ezxlocal filesystem is not accessible without that.
the master security code is stored in the file /exzlocal/download/appwrite/setup/ezx_system.cfg in the "SecuritySecurityCode=" line. Just below that, the phone unlock code is also stored as "SecurityUnlockCode=". Note that the codes are not stored in plaintext, but are encoded in some manner, which I did not try & investigate.
To change the master security code, you need to directly plug-in a value for SecuritySecurityCode (not in plaintext, but in the encoded form). So if you know your phone unlock code, change it to a 6-digit code (this because the master security code MUST be a 6-digit number), if its not already so, & just copy & paste the encoded value under SecurityUnlockCode to SecuritySecurityCode & voila, your master security code has been reset to be the same as your phone unlock code!
Thx