Acquisition methods · Lesson 5 of 7
Android logical acquisition: adb, bugreport and content providers
11 min read
On Android, the Android Debug Bridge (adb) is the examiner's standard way to talk to an unlocked phone without exploits. Through it you can copy shared storage, query the system's databases through content providers, and collect diagnostic reports full of system state. What adb no longer does well is the job it used to do best: backing up app data. This lesson explains how to set up an adb connection on an evidence phone, what each logical method recovers on Android 16 and 17, how adb backup behaves today, and what remains out of reach without the methods of lesson 2.6.
Preparing the connection
adb works only when USB debugging is on. On most phones you enable Developer options by tapping the build number in Settings › About phone seven times, then turn on USB debugging in Developer options. Both actions need an unlocked phone and are changes to the device, so record them with times.
When the computer first connects, the phone shows the computer's RSA key fingerprint and asks whether to allow debugging. The computer's key pair is stored on the computer, by default in ~/.android/adbkey, and the phone stores the keys it has accepted with "Always allow" in /data/misc/adb/adb_keys. On Android 10 and later, keys that have not been used for seven days expire by default, and the system records each key's last connection time in /data/misc/adb/adb_temp_keys.xml. A key found on a suspect's phone therefore suggests recent use, unless the user turned the timeout off in Developer options (Android 11 and later); because expired keys are removed by a system job, treat this as an indication and check the recorded times.
Several features can block adb:
- Samsung Auto Blocker (One UI 6 and later) can block commands sent over USB. If it is on, it must be turned off from the unlocked phone, which is a recorded change.
- Advanced Protection's USB protection blocks new USB data connections while the phone is locked, on Pixel 6 and later and selected Android 17 devices. Connections made while unlocked continue after locking.
- Work-profile and device management policies can disable Developer options or USB debugging entirely.
Once connected, record the device's identity and build before anything else. adb devices -l lists the device's serial number and model. adb shell getprop prints system properties; save the full output and note ro.build.fingerprint, ro.build.version.release, ro.build.version.security_patch, ro.product.model and persist.sys.timezone. adb shell pm list users shows every user on the device, including work profiles and Samsung's Secure Folder, each with its own user ID (lesson 1.3).
Shared storage with adb pull
Shared storage is the area the user sees as "Internal storage": /sdcard, which points to /storage/emulated/0 and is stored in /data/media/0. It holds DCIM (camera photos and videos), Pictures, Download, Documents, Movies, and media that apps save for the user, often under Android/media/<package>. Other users have their own areas, for example /storage/emulated/10, but adb does not reach them: the adb daemon runs as user 0, /sdcard resolves to that user, and AOSP documents that access to the /sdcard paths of secondary users is denied since Android 9. The shared storage of a work profile, a secondary user or a Secure Folder is therefore missed, so record which users the extraction did not cover.
To copy it, use adb pull -a /sdcard/ followed by a local folder. The -a option preserves each file's modification time and mode; without it, copied files get the time of the copy. Even with it, only the modification time survives on the workstation, so first record a listing made on the device. For example, adb shell "find /sdcard/ -type f -exec stat -c %s,%Y,%n {} +" > listing.txt writes the size, the modification time in Unix seconds and the path of every file to listing.txt on the workstation, which you save with the extraction. Type straight double quotes: adb passes the quoted text to the phone's shell, which interprets it a second time, so a character such as | or ; inside it would act on the phone. The command works as printed in Linux and macOS shells and in Windows Command Prompt; in a batch file, double each percent sign, and avoid Windows PowerShell here, because it re-encodes redirected output.
Watch the pull output for errors. Since Android 11, the app-specific directories Android/data and Android/obb are restricted to their own apps. Whether adb can still read them varies by version and manufacturer, and access denials have been reported on Android 16. Record what could not be copied. MTP file transfer through a file manager is an alternative, but it gives less control over metadata and logging.
adb backup today
adb backup was once the main way to copy app data without root. It still exists, but it now prints a warning that it is deprecated and may be removed in a future release. Its usefulness ended with Android 12: for apps that target Android 12 (API level 31) or higher, app data is excluded from adb backup unless the app is marked debuggable, which release apps are not supposed to be. Since 31 August 2026, Google Play requires new apps and updates to target Android 16 (API level 36), so almost every current app is excluded.
If you run adb backup -all -f followed by a file name, the phone asks the user to confirm on screen and offers an optional password. The result is an AB file: a short text header (the line ANDROID BACKUP, a version number, a compression flag and either none or AES-256) followed by a compressed TAR archive. On current phones it is usually close to empty. Some system packages may still contribute; for example, open-source collection tools try adb backup com.android.providers.telephony to obtain SMS, with results that vary by device. On older phones running Android 11 or earlier, adb backup can still recover data from apps that allow backups.
Some commercial tools temporarily replace an installed app with an older version that still allows backups, back it up and reinstall the current one. This "APK downgrade" (an APK is an app's installation package) changes the app on the evidence phone and can fail or alter data. If a tool does it, the report must say so.
Content providers
Android apps share structured data through content providers, system interfaces identified by a content:// address. The adb shell user can query several of them with the content command, for example adb shell content query --uri content://call_log/calls. Useful providers include:
| Data | Provider address | Notes |
|---|---|---|
| Call log | content://call_log/calls | number, date, duration in seconds, type (1 incoming, 2 outgoing, 3 missed, 4 voicemail, 5 rejected, 6 blocked, 7 answered on another device) |
| SMS | content://sms | address, date, body, type (1 received, 2 sent) |
| MMS | content://mms | message headers; parts at content://mms/part |
| Contacts | content://com.android.contacts/data | names, numbers and other details |
| Calendar | content://com.android.calendar/events | events and times |
| Media | content://media/external/images/media | the MediaStore index of shared photos |
The Shell package in AOSP declares permissions such as READ_SMS, READ_CALL_LOG and READ_CONTACTS, which is why these queries often work. Manufacturers can restrict them, so check the output for permission errors and test on a reference device.
The date fields in the call log and SMS providers are Unix time in milliseconds. In the Corvane case, the call log row for the Day 1 call has the date value 1773165930000 (illustrative). That is 1,773,165,930 seconds after 1970-01-01 00:00:00 UTC, which is 2026-03-10 18:05:30 UTC, or 19:05:30 in the case's time zone, UTC+01:00. Providers return the current rows as the system presents them: no deleted rows, no internal columns, and no data from app-private databases. On Android 17, the SMS provider also withholds messages that carry one-time codes from most callers for three hours after they arrive. Whether the adb shell user is affected is not documented, so note the time of the query and repeat it later if recent messages matter. Messaging apps such as WhatsApp keep their messages in their own databases, not in these providers.
Some tools install a small collection app on the phone that requests these permissions and exports the provider data. That is another change to the device to document.
Bug reports and dumpsys
adb bugreport followed by a folder produces a ZIP named bugreport-BUILD_ID-DATE.zip. The report is created on the phone and remains in /bugreports after adb has copied it, so record it as a change, and list that folder before you start, so that earlier reports can be told apart from yours. Its main file, bugreport-BUILD_ID-DATE.txt, contains diagnostic output from system services (dumpsys), error logs (dumpstate) and system logs (logcat). The ZIP also contains version.txt and an FS folder with copies of files from the device. A bug report takes a few minutes and contains no app-private databases, but it is rich in system state:
- Installed packages with first install and last update times, installer and permissions (dumpsys package).
- Accounts signed in on the device (dumpsys account).
- App usage events and intervals (dumpsys usagestats), covered in lesson 3.4.
- Notifications, Wi-Fi state, battery history, connectivity and location provider state.
- Recent logs from logcat buffers, which are small and overwritten quickly, so collect them early.
You can also run individual commands, such as adb shell pm list packages -f, which lists each installed package with the path of its APK, or adb shell dumpsys package com.whatsapp. Many dumpsys sections print times as local-time text without a zone, so record the device's time zone and clock offset with the extraction (lesson 6.4).
Open-source collection tools, such as androidqf from the Mobile Verification Toolkit (mvt) project, automate these steps: they collect getprop, settings, the package list and APKs, dumpsys, a bug report, logcat, a file listing and optionally adb backup output, without rooting the device.
Manufacturer backups and app exports
Where adb backup no longer helps, other features partly fill the gap. Manufacturer desktop backup tools, such as Samsung Smart Switch, can back up messages, call history, contacts, calendar events, some settings and media to a computer, in a proprietary format whose contents depend on the version; validate what a given version captures. Apps offer their own exports, such as exporting a WhatsApp chat as a text file with media. Exports are created on the phone and lose most metadata, so treat them as a form of manual extraction. Cloud backups are covered in lesson 2.7.
What remains out of reach
Logical methods cannot read /data/user/0/<package>, where apps keep their databases, nor most of /data/system and /data/system_ce. They return no deleted provider records. For messaging content, app-private settings and many system artifacts in Module 3, you need a full file system extraction, which lesson 2.6 covers.
Applying this to the Corvane case
About ten weeks after Day 1, under a court-ordered protocol, Victor unlocks his Galaxy A phone for the examiner. The examiner records Android 16, the One UI 8 build and the security patch level, checks that Auto Blocker is off, enables USB debugging and authorizes the workstation, noting each step. adb shell pm list users shows user 0 and user 150, a Secure Folder. The protocol does not cover it, so it stays locked and is reported as not examined. adb pull -a copies the shared storage of user 0, including the three images that WhatsApp downloaded on Day 2, IMG-20260311-WA0001.jpg to IMG-20260311-WA0003.jpg, with a device-side listing of their modification times. The call log provider returns the row converted above: an incoming call (type 1) from Lena's number at 19:05:30 local time on Day 1, lasting under a minute, which can later be compared with carrier records (lesson 1.4). The bug report lists WhatsApp with its install and update times. The WhatsApp message database is not reachable with these methods.
Exam focus: Know how adb authorization works and what can block it, how to copy shared storage while preserving and recording metadata, and why adb backup returns little on current Android versions. Be able to name the main content providers and their time format, and describe what a bug report contains and what logical methods cannot reach.
Practice questions
Check your understanding. These questions do not count towards the exam.
Sign in to save your progress and continue where you left off. It is free. Sign in