Hello,
you can back up to Google Drive and Google Photos, click sync, it will virus scan the files.
Disconnect wifi and internet data, wipe phone, if you do not disconnect from internet it will wipe from the Google drive and photos when you delete from the phone, it will resync and the files will come back to the phone, if not you can click by selecting all of them and then click sync, if it won't work you can select them and download to device, to restore them.
Check it first before wiping, with a file to be sure.
Or dropbox if it scans uploaded files and then back to the Linux folder from it ?
On Android phone you can use Malwarebytes app
For Ubuntu this thread discusses options.
you can back up to Google Drive and Google Photos, click sync, it will virus scan the files.
Disconnect wifi and internet data, wipe phone, if you do not disconnect from internet it will wipe from the Google drive and photos when you delete from the phone, it will resync and the files will come back to the phone, if not you can click by selecting all of them and then click sync, if it won't work you can select them and download to device, to restore them.
Check it first before wiping, with a file to be sure.
Or dropbox if it scans uploaded files and then back to the Linux folder from it ?
On Android phone you can use Malwarebytes app
For Ubuntu this thread discusses options.