Legal" (or not) might be a too heavy word for it.
As a matter of fact, the file resides on your machine, and you're free to tamper with it for many reasons.
One might state that you're not "living up to the agreement" between you and Adobe. And if anything else bad happens by doing so, Adobe obviously can't be held responsible for any damage or consequence. (Can they ever, at all, I wonder ?)
If you really can't afford to pay for a tool you need (for a hobby or profession), then you should consider doing something different.
Oorspronkelijk geplaatst op Quora: Is it legal to change Adobe application.xml just to get another trial number?"