You can certainly flash the software of a device dependent on the phone. For example, if you have an Android handset look into rooting and flashing Custom ROM's on your device. You'd be flashing your phone off stock firmware to a custom build with enhanced performance and various tweaks to the operating system.
Any basic devices, non-smartphones - can generally be de-branded/unbranded dependent again on the model. This involves the process of removing all carrier restrictions and modifications and reverting the phone to a generic manufacturer firmware with no added carrier branding.
For Blackberry handsets you can install Hybrid Rom's which is modified firmware with added tweaks based on the stock software image.