android tombstone
$ adb shell dumpsys dropbox --print
라고 하면 tombstone 이 출력 됨.
출처 :https://stackoverflow.com/questions/28105054/default-tombstones-location-in-android
기본 위치는 여기. 재부팅 할때 dropbox 로 옮겨져.
/data/system/dropbox
dropbox 는 일정 용량 넘어가면 지워져.
Not to say this can't change in the future (and of course, being open source any vendor could modify this if they choose), but tombstone files are written by debuggerd
in the engrave_tombstone()
function implemented in tombstone.cpp
(formerly tombstone.c
):
This uses a hardcoded path using the macro:
#define TOMBSTONE_DIR "/data/tombstones"
Even the Java side of Android uses the hardcoded path:
And it appears that using /data/tombstones
goes at least back to Android 1.6 Donut's debuggerd
출처 : https://developer.android.com/reference/android/os/DropBoxManager?authuser=0&hl=ro
Enqueues chunks of data (from various sources -- application crashes, kernel log records, etc.). The queue is size bounded and will drop old data if the enqueued data exceeds the maximum size. You can think of this as a persistent, system-wide, blob-oriented "logcat".
DropBoxManager entries are not sent anywhere directly, but other system services and debugging tools may scan and upload entries for processing.
출처 : https://android.googlesource.com/platform/frameworks/base/+/android-6.0.1_r46/core/java/com/android/server/BootReceiver.java?fbclid=IwAR3p3j_bca4utCJB2XDDWjKlJuhkK_VilfH984lXXeYeAz0_xlhdD3CDBjw#153
// Scan existing tombstones (in case any new ones appeared) | |
File[] tombstoneFiles = TOMBSTONE_DIR.listFiles(); | |
for (int i = 0; tombstoneFiles != null && i < tombstoneFiles.length; i++) { | |
if (tombstoneFiles[i].isFile()) { | |
addFileToDropBox(db, prefs, headers, tombstoneFiles[i].getPath(), | |
LOG_SIZE, "SYSTEM_TOMBSTONE"); | |
} | |
} |
출처 :
/frameworks/base/core/java/android/provider/Settings.java
/** 7892 * Maximum number of entry files which {@link DropBoxManager} will keep 7893 * around. 7894 * 7895 * @hide 7896 */ 7897 public static final String DROPBOX_MAX_FILES = "dropbox_max_files"; 7898
7970 /** 7971 * Maximum byte size of the low storage threshold. This is to ensure 7972 * that {@link #SYS_STORAGE_THRESHOLD_PERCENTAGE} does not result in an 7973 * overly large threshold for large storage devices. Currently this must 7974 * be less than 2GB. This default is 500MB. 7975 * 7976 * @hide 7977 */ 7978 public static final String 7979 SYS_STORAGE_THRESHOLD_MAX_BYTES = "sys_storage_threshold_max_bytes";
40 // Copied from android.os.StorageManager 41 private static final int DEFAULT_THRESHOLD_PERCENTAGE = 10; 42 private static final long DEFAULT_THRESHOLD_MAX_BYTES = 500L * 1024 * 1024;
59/** 60 * Implementation of {@link IDropBoxManagerService} using the filesystem. 61 * Clients use {@link DropBoxManager} to access this service. 62 */ 63public final class DropBoxManagerService extends SystemService { 64 private static final String TAG = "DropBoxManagerService"; 65 private static final int DEFAULT_AGE_SECONDS = 3 * 86400; 66 private static final int DEFAULT_MAX_FILES = 1000; 67 private static final int DEFAULT_QUOTA_KB = 5 * 1024; 68 private static final int DEFAULT_QUOTA_PERCENT = 10; 69 private static final int DEFAULT_RESERVE_PERCENT = 10; 70 private static final int QUOTA_RESCAN_MILLIS = 5000;
'Android' 카테고리의 다른 글
Android.bp build Soong (0) | 2018.12.28 |
---|---|
android keyboard input keyrepeatdelay 값 kl 파일 (0) | 2018.07.27 |
getting android SystemProperties (0) | 2018.06.04 |