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

Unified Diff: build/android/adb_gdb

Issue 422863003: adb_gdb : Change Device's SELinux mode as part of adb_gdb script (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes to set Permissive mode when Enforcing mode is detected Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/adb_gdb
diff --git a/build/android/adb_gdb b/build/android/adb_gdb
index 84cf9715ed76a4176692212f2162820cad837e2a..a1e2fad0ba0d08ab5cff9c815b97ff7da9078f79 100755
--- a/build/android/adb_gdb
+++ b/build/android/adb_gdb
@@ -964,9 +964,20 @@ log "Job control: $(jobs -l)"
STATE=$(jobs -l | awk '$2 == "'$GDBSERVER_PID'" { print $3; }')
if [ "$STATE" != "Running" ]; then
echo "ERROR: GDBServer could not attach to PID $PID!"
- echo "Failure log (use --verbose for more information):"
- cat $GDBSERVER_LOG
- exit 1
+ if [ $(adb_shell su -c getenforce) != "Permissive" ]; then
+ echo "Device mode is Enforcing. Changing Device mode to Permissive "
+ $(adb_shell su -c setenforce 0)
+ if [ $(adb_shell su -c getenforce) != "Permissive" ]; then
+ echo "ERROR: Failed to Change Device mode to Permissive"
+ echo "Failure log (use --verbose for more information):"
+ cat $GDBSERVER_LOG
+ exit 1
+ fi
+ else
+ echo "Failure log (use --verbose for more information):"
+ cat $GDBSERVER_LOG
+ exit 1
+ fi
fi
# Generate a file containing useful GDB initialization commands
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698