mirror of
https://github.com/kacos2000/Queries
synced 2024-11-16 06:12:50 +00:00
111 lines
4.6 KiB
XML
111 lines
4.6 KiB
XML
|
<?xml version="1.0" encoding="utf-8"?>
|
||
|
<Artifacts version="2.0">
|
||
|
<Artifact type="SqliteArtifact" name="Android logs.db (Samsung Calls/messages)" version="1" platform="Android">
|
||
|
<Source type="FileName">logs.db</Source>
|
||
|
<Query>
|
||
|
-- sec = (Samsung Electronics Corporation)
|
||
|
-- \data\com.sec.android.provider.logsproviders\logs.db
|
||
|
|
||
|
Select
|
||
|
logs._id as 'id',
|
||
|
logs.geocoded_location||' ('||logs.countryiso||')' as 'Location',
|
||
|
logs.name,
|
||
|
logs.number,
|
||
|
case logs.numbertype
|
||
|
when 1 then 'Home'
|
||
|
when 2 then 'Mobile'
|
||
|
when 3 then 'Work'
|
||
|
when 4 then 'Fax_Work'
|
||
|
when 5 then 'Fax_Home'
|
||
|
when 6 then 'Pager'
|
||
|
when 7 then 'Other'
|
||
|
when 8 then 'Callback'
|
||
|
when 9 then 'Car'
|
||
|
when 10 then 'Company_Main'
|
||
|
when 11 then 'ISDN'
|
||
|
when 12 then 'Main'
|
||
|
when 13 then 'Other_Fax'
|
||
|
when 14 then 'Radio'
|
||
|
when 15 then 'Telex'
|
||
|
when 16 then 'TTY_TDD'
|
||
|
when 17 then 'Work_Mobile'
|
||
|
when 18 then 'Work_Pager'
|
||
|
when 19 then 'Assistant'
|
||
|
when 20 then 'MMS'
|
||
|
else logs.numbertype
|
||
|
end as 'numbertype',
|
||
|
case logs.presentation
|
||
|
when 1 then 'allowed' --Number is allowed to display for caller id
|
||
|
when 2 then 'restricted' --Number is blocked by user
|
||
|
when 3 then 'unknown' --Number is not specified or unknown by network
|
||
|
when 4 then 'pay phone' --Number is a pay phone
|
||
|
else logs.presentation
|
||
|
end as 'CallerID',
|
||
|
logs.date as 'lDate',
|
||
|
case
|
||
|
when logs.duration != 0
|
||
|
then Time(logs.duration, 'unixepoch')
|
||
|
end as 'Duration',--The duration of the call in seconds
|
||
|
case logs.type
|
||
|
when 1 then 'incoming' --incoming calls
|
||
|
when 2 then 'outgoing' --outgoing calls
|
||
|
when 3 then 'missed' --missed calls
|
||
|
when 4 then 'voicemail' --Call log type for voicemails
|
||
|
when 5 then 'rejected' --rejected by direct user action
|
||
|
when 6 then 'blocked' --calls blocked automatically
|
||
|
when 7 then 'answered externally' --call which was answered on another device
|
||
|
else logs.type
|
||
|
end as 'type',
|
||
|
case
|
||
|
when logs.logtype in (100)
|
||
|
then 'Call ('||logs.logtype||')'
|
||
|
when logs.logtype in (300)
|
||
|
then 'SMS ('||logs.logtype||')'
|
||
|
when logs.logtype in (400)
|
||
|
then 'Email ('||logs.logtype||')'
|
||
|
else 'Other ('||logs.logtype||')'
|
||
|
end as 'logtype',
|
||
|
logs.messageid,
|
||
|
case logs.is_read
|
||
|
when 0 then 'No'
|
||
|
when 1 then 'Yes'
|
||
|
end as 'IsRead',
|
||
|
logs.m_subject as 'MessageSubject',
|
||
|
logs.m_content as 'MessageContent',
|
||
|
case logs."new"
|
||
|
when 1 then 'Yes'
|
||
|
end as 'New',
|
||
|
logs.contactid,
|
||
|
logs.raw_contact_id as 'rawcontactid',
|
||
|
logs.lookup_uri as 'lookupuri',
|
||
|
logs.photo_id as 'photoid',
|
||
|
logs.account_name||' ('||logs.account_id||')' as 'Account'
|
||
|
from logs
|
||
|
-- order by lDate desc
|
||
|
</Query>
|
||
|
<Fragments>
|
||
|
<Fragment source="id" alias="ID" datatype="Integer" category="None" />
|
||
|
<Fragment source="Location" alias="Location" datatype="String" category="None" />
|
||
|
<Fragment source="name" alias="Name" datatype="String" category="PersonIdentifier" />
|
||
|
<Fragment source="number" alias="Number" datatype="String" category="PersonIdentifier " />
|
||
|
<Fragment source="numbertype" alias="Number Type" datatype="String" category="None" />
|
||
|
<Fragment source="CallerID" alias="CallerID" datatype="String" category="None" />
|
||
|
<Fragment source="lDate" alias="Date" datatype="DateTime" dateformat="UNIX Time (ms)" category="DateTime" />
|
||
|
<Fragment source="Duration" alias="Duration" datatype="String" category="None" />
|
||
|
<Fragment source="type" alias="Type" datatype="String" category="None" />
|
||
|
<Fragment source="logtype" alias="Log Type" datatype="String" category="None" />
|
||
|
<Fragment source="messageid" alias="Message ID" datatype="Integer" category="None" />
|
||
|
<Fragment source="IsRead" alias="Is Read " datatype="String" category="None" />
|
||
|
<Fragment source="MessageSubject" alias="Message Subject" datatype="String" category="None" />
|
||
|
<Fragment source="MessageContent" alias="MessageC ontent" datatype="String" category="None" />
|
||
|
<Fragment source="New" alias="New" datatype="String" category="None" />
|
||
|
<Fragment source="contactid" alias="Contact Id" datatype="String" category="None" />
|
||
|
<Fragment source="rawcontactid" alias="Raw Contact Id" datatype="String" category="None" />
|
||
|
<Fragment source="lookupuri" alias="LookUp URI" datatype="String" category="None" />
|
||
|
<Fragment source="photoid" alias="Photo ID" datatype="String" category="None" />
|
||
|
<Fragment source="Account" alias="Account" datatype="String" category="None" />
|
||
|
</Fragments>
|
||
|
</Artifact>
|
||
|
<Signature>
|
||
|
</Signature>
|
||
|
</Artifacts>
|