Try factory reset your device again from recovery menu. It should remove whatever clog is causing services to behave erratically. Also, setup your device as a fresh device add your Google account after device has been setup.
This is what I normally do when I run into setup problems.
Which phone model and company?I installed the original firmware from "apply update from adb" and fixed it.
Which phone model and company?
There is no relation between usb debugging and connecting to pc.I tried using ADB method to install new firmware but the phones doesn't get detected because usb debugging cannot be turned on.
I need a solution to connect the phone to pc so that i can install the new firmware.