[Android Q&A, Help & Troubleshooting] arana1:
Ok first let me tell you guys that i have never seen this problem before and all of a sudden TODAY I saw it in two unrelated phones, one huawey ascend 530 something , and the other one a no brand chinese dual sim note 3 or note 4 knockoff , bot phones where stock , and users dont even know what rooting is, let alone custom roms.

The problem was popups , lots of them , some with pr0n ads, others with "security software" ads, some more for games, this popups started as soon as the phone booted, no need to enter a browser or app at all, then it started downloading some more apps with weird names (weird as apparently random garbage names), and some other apps for coupons, games, launchers etc, tons of crap, every time one finished downloading it was asking for which method to use for installation :google verification or something else I think "package installer" that i don't remember now, but that I know both are legit apps from android to install stuff, of course I said no every time but it just kept asking so I figured I will factory reset this because I have no time but he is a friend so I need to help him, but have not much time so I thought that was the best thing to do.

WRONG, after factory reset (from settings menu) popups where still there, so I just figured I would do it from recovery screen, and I did, ... surprise, popups still there and also the downloading notifications of more unknown apps, as I said before some of them had names like games or security software, other were just random gibberish, sometimes an app with chinesse name crashed (force stop) , when I saw that the first time I immediately knew it was some chinesse malware crap, ok I guessed maybe the sdcard had something sticky on it , hidden partition or something, so I removed it, and reset again, ... problem persists, oh and let me tell you, this problem showed up immediately after boot, I didn't even have the chance to register a google account, so crap was not coming from a google sync data or or synced apps or browsers or something , well then I had the idea of turning off the wifi and see if they stop, some of the popups opened browser pages and other popups just opened by themselves as if it was from an already installed app.

results: the damn thing turned wifi ON by itself to keep downloading their ****y apps, so I just deleted the saved wifi networks, and the damn thing started using the mobile data to keep doing its stuff (it even turned data on).

There was only one 2 things left to do, either try to root the phone and dive in the apps to try and remove any suspicious ones, or reflash with stock.

Well I had to leave by that time and told my friend i would like to help him, but it would have to be some other time, coz I know how hard it is to try and find a rom for an unknown chinese manufacturer even if I find one, trying to figure out the links in chinesse pages I doubt it would be an exact match (had done that before, so I know its difficult and takes many hours of your time) it had JB on it.

Then I arrived to work and a coworker asked if I could help him , it was a Huawei ascend G527-U081. exact same symptoms and behavior, ok so again I did factory resets blah blah erase sdcard etc etc, same results malware persisted, but in this case, it took me less than 5 mins to find the stock rom at huawey support page, downloaded it, did update via sdcard, and VOILA FIXED.

So someone who knows more about how could this infection happen can take some time and try to explain me?

My uneducated guess is that some side-loaded app or downloaded app from the webpages ads or something like that got ROOT access to the phone internally or even rooted the phone with their own root renamed app, and somehow put themselves in the system partition or the place where the factory apps are installed from, i guess that's why only a full flash fixed it.

Could that be it?

I hope no one here gets that crap, I have never had any malware in any of my phones and I am even surprised and wonder what people can possible do to get infected that bad, lol, I don't think I could even on purpose, but then again, having an adaway app takes most of the dangerous ads away so no risk clicking them by mistake.