If you have a T-Mobile or MetroPCS Samsung Galaxy On5, it is now possible to install custom firmwares on it thanks to availability of TWRP custom recovery. You will also be able to root it easily as well.
In this process, you will need four things, ODIN, TWRP file, Super SU for root and official Samsung drivers to let you connect and install the TWRP and root files. After that follow these steps.
On the phone goto Settings->About and tap “Build Number” 10 times to enable Developer Mode.
Go to Settings->Developer Mode and select “Enable OEM Unlock”
Then power off the device.
With the device powered off hold “VOL-DOWN + HOME + PWR” until Download mode appears.
Plug the phone into the computer and start ODIN with Administrator Rights.
Open Odin and place that TWRP TAR file in the [AP] slot, under Options tab disable Auto Reboot, then press [Start]
When ODIN says the flash is complete in the log window, pull the battery and put the battery back in.
Before turning back on hold “VOL-UP + HOME + PWR” to enter recovery.
Once in recovery go to Mount->Enable USB Mass Storage
Copy the SuperSU zip to the phone’s storage
Disable USB Mass Storage
Go to Backup->Start Backup to backup the phone IN CASE OF ISSUES!!
Go to Install->Select SuperSU zip file and wait.
Once done, reboot the phone and you should be good.