My housekeeper's phone, a Sony Z3, has been on its last legs for a while, so I gave her my Pixel 2 XL as a replacement. I also helped her migrate all her accounts and data. It ended up being more complicated than I expected so I wanted to share some little tricks and solutions to get the job done.
It was complicated because:
She'd dropped it before so the screen had to be replaced. However, the replacement screen's touch sensitivity was still dodgy, with sections of it not registering taps.
She lost her old sim card so she didn't have the original phone number her various accounts were registered with.
She had forgotten all her old passwords for Facebook and Google.
Her Facebook account was registered with a Yahoo Mail account that no longer existed.
Her phone had been invaded with some basic Malware, causing a lot of unnecessary pop ups.
Solutions:
For the sections of the screen that wouldn't register taps, I rotated the phone so that what I needed to tap moved into an area that was working. From there, I enabled Developer Options (tap Android Version 5 times in the About Phone section of Settings), then enabled USB Debugging. This allowed me to use an app I come back to time and time again: Vysor. It lets you control your phone via your computer so you can use keyboard and mouse input. It made interacting with the phone much easier!
Although the original phone number, e-mail address and passwords were no longer available, her Facebook account was still active on her phone. You cannot directly change a password if you don't have the original password but you can request a password reset to the contact details set in your profile. In her case, her original e-mail address was no longer available but there is a workaround. There are no extra security checks for adding a phone number or e-mail address to your personal profile, and you can use those additional phone numbers or e-mail addresses to reset passwords. So, I added my personal phone number and reset her Facebook password from my phone.
There were two types of Malware on her phone throwing up the pop-ups. One was ads masquerading as notifications generated via Chrome that would pop up throughout the day. You can find those via Chrome Settings -> (Advanced) Site Settings -> Notifications and you'll see a list of what is Blocked or Allowed. She had inadvertently allowed a lot of ad sites that were generating these notifcations, so I set them all to Block.
The other type of Malware was via a rogue app that she had downloaded. It would throw up full screen ads and it wasn't clear what app was generating the ad. To track down what app it was, I went into the task switcher. On older versions of Android, it's the little square button at the bottom right. That will report what apps are running so you can switch back and forth between them quickly. Turns out it was an innocuous sounding app called Downloader. I long pressed the app, which took me to its properties page, cleared all its data then uninstalled it. Good riddance.
The only data I really needed to migrate that wasn't in the cloud were the various photos she'd accumulated via Camera, Facebook, Messenger, etc. The easiest way to do that was to just upload it all to Google Photos. Normal Google Photos only backs up Camera photos so you will need to enable backing up everything. Go to Settings -> Backup & Sync -> Back up Device Folders and then flip the switch on whatever you need.
With the new phone, I made sure she knew her new passwords and had backups for if she ever needed to reset them. I also gave her a thicker phone case so her screen won't break again!