Author Topic: "Invalid context during scan" on my android device -- continued  (Read 5353 times)

0 Members and 1 Guest are viewing this topic.

kirkers

  • Guest
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!


Offline Filip Havlicek

  • Avast team
  • Massive Poster
  • *
  • Posts: 2647
Re: "Invalid context during scan" on my android device -- continued
« Reply #1 on: November 22, 2013, 01:41:18 PM »
Hi,

I actually think that clearing up AMS data like you did should be enough to fix this.

The bad thing is this error is so rare (usually happens to less than 5 users/month based on what I read here on the forum and on Google Play) that I have not been able to reproduce it successfully or to get my hands on a device that's currently experiencing this error, meaning I can't really fix it :( From time to time I get an idea and change some small bits of code, but it never seem to help so the cause is still unknown to me.

I'm glad you got your installation up and working again though.

Filip

kirkers

  • Guest
Re: "Invalid context during scan" on my android device -- continued
« Reply #2 on: November 23, 2013, 06:34:56 AM »
Filip -- is there some logging function for AMS that users could turn to monitor the situation in case this happens again?  Then we could send it to you for your inspection.  Or perhaps you have other suggestions for users like me?

Offline Filip Havlicek

  • Avast team
  • Massive Poster
  • *
  • Posts: 2647
Re: "Invalid context during scan" on my android device -- continued
« Reply #3 on: November 23, 2013, 09:20:49 AM »
You can turn on debug logging by tapping 5 times on the version section in Settings-About and if it happens again, send us feedback using Settings-About-Send us feedback and ticking all the checkboxes. Although I'm not sure if the logs will help me, we (you) can surely try.

Filip

kirkers

  • Guest
Re: "Invalid context during scan" on my android device -- continued
« Reply #4 on: November 24, 2013, 09:49:00 AM »
Thanks Filip.  I'm willing to give it a go.  Any idea how large the logs will become over time?  Can I erase them and start over if nothing happens for an extended period?

Offline Filip Havlicek

  • Avast team
  • Massive Poster
  • *
  • Posts: 2647
Re: "Invalid context during scan" on my android device -- continued
« Reply #5 on: November 24, 2013, 12:11:54 PM »
They are actually going to delete themselves automatically after some time based on your device (that's how things work on Android). That also means that you should send the logs as soon as you discover it's broken again :)

Filip

kirkers

  • Guest
Re: "Invalid context during scan" on my android device -- continued
« Reply #6 on: November 25, 2013, 01:58:10 PM »
Understood about the auto-deletion of logs in Android and the need to send them right away if this problem (or any other) recurs.

Can you tell me where the logs are stored?  My HTC Droid Incredible (Dinc) is rooted, so I have full access with a root file explorer app.