Invalidate the warranty - fine.

But you can't stop someone from modifying hardware they actually own.

Where does that stop ?
ford prosecuting someone for changing their own tires ?