Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Side by Side Diff: build/android/tombstones.py

Issue 26364002: [android] FlagChanger should only require root to set flags for Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bug Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2013 The Chromium Authors. All rights reserved. 3 # Copyright 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 # 6 #
7 # Find the most recent tombstone file(s) on all connected devices 7 # Find the most recent tombstone file(s) on all connected devices
8 # and prints their stacks. 8 # and prints their stacks.
9 # 9 #
10 # Assumes tombstone file was created with current symbols. 10 # Assumes tombstone file was created with current symbols.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 """ 63 """
64 return adb.GetProtectedFileContents('/data/tombstones/' + tombstone_file) 64 return adb.GetProtectedFileContents('/data/tombstones/' + tombstone_file)
65 65
66 66
67 def _EraseTombstone(adb, tombstone_file): 67 def _EraseTombstone(adb, tombstone_file):
68 """Deletes a tombstone from the device. 68 """Deletes a tombstone from the device.
69 69
70 Args: 70 Args:
71 tombstone_file: the tombstone to delete. 71 tombstone_file: the tombstone to delete.
72 """ 72 """
73 return adb.RunShellCommand('su -c rm /data/tombstones/' + tombstone_file) 73 return adb.RunShellCommandWithSU('rm /data/tombstones/' + tombstone_file)
74 74
75 75
76 def _ResolveSymbols(tombstone_data, include_stack): 76 def _ResolveSymbols(tombstone_data, include_stack):
77 """Run the stack tool for given tombstone input. 77 """Run the stack tool for given tombstone input.
78 78
79 Args: 79 Args:
80 tombstone_data: a list of strings of tombstone data. 80 tombstone_data: a list of strings of tombstone data.
81 include_stack: boolean whether to include stack data in output. 81 include_stack: boolean whether to include stack data in output.
82 82
83 Yields: 83 Yields:
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 186
187 tombstones = [] 187 tombstones = []
188 for device in devices: 188 for device in devices:
189 adb = android_commands.AndroidCommands(device) 189 adb = android_commands.AndroidCommands(device)
190 tombstones += _GetTombstonesForDevice(adb, options) 190 tombstones += _GetTombstonesForDevice(adb, options)
191 191
192 _ResolveTombstones(options.jobs, tombstones) 192 _ResolveTombstones(options.jobs, tombstones)
193 193
194 if __name__ == '__main__': 194 if __name__ == '__main__':
195 sys.exit(main()) 195 sys.exit(main())
OLDNEW
« build/android/pylib/flag_changer.py ('K') | « build/android/pylib/flag_changer.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698