DB Wipe detection
- Create a check file for each database in order to detect 1) an unexpected DB file removal 2) DB wipe caused by a DB corruption. - Either case, do a WTF to collect information on APR. - Also print file timestamps in "dumpsys dbinfo". Example: ===================== Database files in /data/system: locksettings.db 20480b ctime=2018-10-23T22:48:35Z mtime=2018-10-23T22:48:35Z atime=2018-10-23T18:54:12Z locksettings.db-wipecheck 0b ctime=2018-10-23T18:54:12Z mtime=2018-10-23T18:54:12Z atime=2018-10-23T18:54:12Z notification_log.db 45056b ctime=2018-10-23T22:48:08Z mtime=2018-10-23T22:48:08Z atime=2018-10-23T18:54:13Z : ===================== Change-Id: I77fbeb0bb635c787aba797412f116475fecbe41c Fixes: 117886381 Test: manual test Test 1: corruption 1. Stop CP2 process (adb shell killall android.process.acore) 2. shell 'echo abc > /data/user/0/com.android.providers.contacts/databases/contacts2.db' 3. Launch the contacts app. Test 2: Unexpected file removal 1. Stop CP2 process (adb shell killall android.process.acore) 2. shell 'rm -f /data/user/0/com.android.providers.contacts/databases/contacts2.db' 3. Launch the contacts app. In both cases, logcat shows a client side stacktrace and also a WTF. (am_wtf)
Loading
Please register or sign in to comment