How to get rid of annoying pop up ads? When I connect the internet and open any app, a pop-up ad appears randomly.
Ads are still showing, although I did factory reset the phone (all installed apps removed) as well. I also tried to remove the malware app with Avast. Avast detected the issue as well. But couldn't able to remove as well. I uninstalled the malware app which Avast detected. The malware apps installed automatically with another name after uninstalling it. 
How can I get rid of that annoying issue? 

Some screenshots of that issue have attached here.
Your phone is infected by malwares. If you check your app list, you'll notice that there are unusual apps with sometimes weird names. 

To get rid of that, all you have is to uninstall them. There is two methods: 

DISCLAIMER: Do it at your own risk, I won't be held responsible if anything goes wrong.


First the root method: You have to root your phone and then using adb shell, uninstall the apps - a bit tricky and risky as well. You need to install ADB server on your PC (search for Minimal ADB and Fastboot).
Open it and tape the following: 

adb shell

`su`

`mount -o remount, rw /system`

`cd /system/app`

`ls (this list all apps on your phone)`



Then: 

rm "app_name"


You must tape the exact app name + .apk or .odex 

Do this to all unwanted apps.
You may encounter with apps that can't be removed (operation not permitted), then you need BusyBox installed (Google for that). just let's know, we'll try to help.


The second method, less tricky but always risky, is to download Debloater, open the USB debugging mode, connect your phone to your computer. You'll see all the installed applications. Just check those you want to remove. 


Et voilà.

DON'T REMOVE AN APP IF YOU'RE NOT SURE ABOUT, YOU MAY BRICK YOUR PHONE.