Temporarily rooting an old 2nd generation Moto G - how can it be done? I have an old Android phone (Moto G 2nd generation, running 5.0.2), from which I need to access files in the data\system folder.  As I still do use this phone, I'd rather not permanently root it.  However, I've been doing some reading, and it looks like it's possible to temporarily root it in a way that lasts until the phone is next rebooted.

I've never rooted anything before, and my Googling of this only finds seemingly permanent rooting solutions.  I can only assume that the terminology I'm using to search for how to do this is wrong.

I'm a reasonably technical person, but I confess I am rather lost as to the correct way to proceed.  Is what I'm trying to do even possible (WITHOUT wiping the phone)?

TLDR: How can I temporarily root my Moto G 2nd Gen phone running Android 5.0.2?
If there is a way to "temporary root" your device it can be usually used by any app - unless you are able to fix the used vulnerability on-the-fly (but I think there are only a few people world-wide who could do so). 

IMHO the best way to unlock the bootloader, install LineageOS. Even the nightly releases of Lineage are usually very stable. Lineage is by default not rooted. After installing Lineage you can activate encryption using a long password (have to be entered only at boot). 

A unlocked bootloader is not nice but way more secure than a vulnerable system which can be exploited by any app. An unlocked bootloader at least requires physical access to your device. If your user data is encrypted only the system could be modified. Hence it would be only a problem in the "evil maid" scenario, but not in case of a device loss.