This topic was last addressed back in August 2013 without a clear resolution.
http://forum.avast.com/index.php?topic=132606.msg977163a
I am now experiencing the same problem. Suddenly, without warning, Avast Mobile Security (AMS) Anti-Virus reports nearly every programme I open has a “problem”. The problem always turns out to be “Invalid context during scan”.
“youngsmarttech” (http://forum.avast.com/index.php?action=profile;u=471287) who started the thread listed above did some research that indicated that Internet connectivity needs to be turned off, then the data needs to be cleared from AMS under Android: Settings → Apps → AMS → Clear Data.
For some reason, youngsmarttech got no further than that.
In my case, relaunching AMS caused it to rebuild its database on all my apps. Then the “Privacy Advisor” began to rebuild its database, but got stuck on 13% progress.
I then rebooted the phone – which BTW is an HTC Incredible (produced 2010) now running Android Jelly Bean 4.2 via CyanogenMod 10.2 modded by Tiny to work on this phone model. Truly, this little smartphone lives up to its name!
Launching AMS again led me through steps that appeared to require me to uninstall Anti-Theft because it could act as an administrator. Then I had to go through all the steps of reinstalling Anti-Theft, including choosing a PIN and listing a friend’s mobile number to send/receive SMS from the lost/stolen phone. Finally, I re-permitted it to act as an administrator.
Once all that was done, AMS Privacy Manager launched into rebuilding its database, this time successfully in just a few minutes.
In the meantime, the virus definitions had somehow been updated in the background. Manual update produced no additional results.
Then I decided to run Backup to see if it needed to rebuild its database. It began “collecting file data”, which took quite a while (~30 min)
Once all that was done, things seemed to be back to normal with AMS.
Hopefully, this is a very rare occurrence. Even if I had known exactly what to do from the start, it would have taken about 30-60 min to handle all the twists and turns (and waiting) required.
I am also hopeful that I have left nothing undone that could come back to haunt me later!
I would welcome expert review and feedback about all this.
Cheers!