GENERAL INFO;
Device: GT-i9100
ROM: CM10
Kernel: Stock CM10
Avast Anti-Theft: 2.0.2571
The following issues just can’t exist in such an application…
ISSUE #1
I performed a “Wipe Data/Factory Reset” with hard-reset proof settings just to check if you would be able to send commands to the phone. My results;
- Commands through web portal - FAIL
- Commands through SMS - SUCCESS
Error generated by your web interface;
What I had to do to resolve this was to open up the anti-theft application on the phone, disconnect from my Avast account and then reconnect again, from suggestion by the built in connection control feature;
After repairing with my account, using the web interface was possible. What thief will do this for me?
ISSUE #2
You got 3 ways to store settings on;
- Direct Write Method
- Recovery Image Method
- Modify custom backup list
This issue is related to the third option, Modify custom backup list. This has in fact never been working. Even if the custom_backup_list.txt with the correct content exists at the right place, it wont work. The app will have gone after a ROM flash. This backup-feature doesn’t seems to exist no more in the newer versions of CM (9 and 10). I don’t know whether the custom-backup-list-method or my addon.d-method works on CM7. That’s up to you to check if it does or not, I don’t think my method works on CM7. Either way, I’ll explain my working method of surviving a CM9/10 flash.
In all CM9/10 installations, there is a folder: /system/addon.d
In this folder there is a file by default : 50-cm.sh
This file does nothing other than backing up specified files in the /system directory. By default, the only thing it backs up is /system/etc/hosts. So this does basically the exact same thing as the custom_backup_list.txt does in CM7.
Source: http://forum.xda-developers.com/showthread.php?t=1617356
What I did: I copied /system/addon.d/50-cm.sh to the computer and opened it in notepad++. I deleted the only line that tells it to backup /system/etc/hosts, then I placed these two lines there instead;
app/com.avast.android.antitheft.apk
etc/com.avast.android.antitheft.backup.enc
Then I saved the file, renamed it to “AVAST_BACKUP” and placed it in /system/addon.d. There are 2 files in that folder now, the original 50-cm.sh and the additional AVAST_BACKUP file.
Then I immediately tried flashing a CM10 zip to confirm success, and it worked! The application was left untouched. Here is the file I use: https://docs.google.com/open?id=0B4I9PcsfiZ0mTG9IN1RFWTdZVHc
Now, how you are gonna manage to use both methods depending on which version of CM the user is on, is your problem. Either you integrate both methods in your app or you one version for each CM version.
These 2 issues are major, and you have to fix them quite fast!
ISSUE #3
This issue is somewhat relating to issue #1.
When using my method in issue #2 to backup the anti-theft app while flashing CyanogenMod ROMs, I get principally the same error as in issue #1. I do not get the “Database” error, but instead I get “Command timed out” (as seen in the background of the first screenshot) in the web interface as of in the application itself I get this error when checking with the built in connection control feature;
Doing as suggested in the screenshot above solves it, till I flash a new, updated version of the ROM.