This isn't a virus. Ignore every solution telling you how to clean it- they won't work. At worst, you'll be tricked into GETTING a virus.
I've been pulling together information about this for two days straight trying to fix this myself. Here's the filthy secret:
There's nothing to fix.
These pop-ups are coming to you embedded in ads that are served from s3.amazonaws.com. They're Javascript code being embedded into legitimate pages running ads infected with the malicious code. I've gotten them from m.phys.org, of all places.
I even got one through an ad running ON THIS VERY SITE.
Do NOT clear the cache, clear data, factory reset, install a browser, install this, or install that. Don't waste your time cleaning or doing a factory reset. You CAN'T "remove" this because there's nothing to remove.
I just tried blocking *.amazonaws.com at the router I'm connected to here at home. While that MIGHT fix the issue for me while on my home wifi, it won't do diddly-poo for me anywhere else.
You'll find a lot of so-called "solutions" for this if you Google
s3.amazonaws.com pop-up
s3.amazonaws.com android
s3.amazonaws.com virus
s3.amazonaws.com malware
None of the hits you get have a working solution, and almost every one tells you to do something different. That's the hint that something else is going on other than a virus.
Again: you'll see this EVEN ON LEGIT SITES LIKE THE NEW YORK TIMES. It's coming from the ads themselves.
And THAT sucks.