I messed up with some internal core apks of nexus 5 running 5.1 (android L) to be particular Google play services.
I want to get back the original apks. Would flashing factory image help me with that ?
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It only takes a minute to sign up.Sign up to join this community
Yes, flashing a factory image will completely wipe your device and will flash each partition back to 'stock', meaning all system apks will be back to their original version.
If Google Play Services is the only app that you need to restore you can simply uninstall any updates by going to
Google Play Services and clicking the 'Uninstall updates' button. Google pushes updated versions of Google Play Services out automatically so it will automatically get upgraded again to the latest version. If you are unable to uninstall updates due to the button being greyed out then you can see my answer here which explains how to enable the button.
Go to settings>apps and scroll down to Google Play Services. You can uninstall updates from there. And yes, flashing the factory image would help, but is probably overkill for your problem.