Some malware remains after factory reset
Other solution, more easy, is to root your device then :
1- block access to internet for these apps : install the firewall AFWall to block apps to access to internet. https://play.google.com/store/apps/details?id=dev.ukanth.ufirewall&amp;hl
2- install an ad blocker : https://f-droid.org/repository/browse/?fdid=org.adaway&amp;fdpage=2