Commit 9b092e56 authored by kishor.ag@samsung.com's avatar kishor.ag@samsung.com

adb_gdb : Changing the Device's SELinux Mode to Permissive when Enforcing Mode is detected


BUG= 399517

Review URL: https://codereview.chromium.org/422863003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287353 0039d316-1c4b-4281-b951-d872f2087c98
parent edd4a25d
...@@ -964,9 +964,20 @@ log "Job control: $(jobs -l)" ...@@ -964,9 +964,20 @@ log "Job control: $(jobs -l)"
STATE=$(jobs -l | awk '$2 == "'$GDBSERVER_PID'" { print $3; }') STATE=$(jobs -l | awk '$2 == "'$GDBSERVER_PID'" { print $3; }')
if [ "$STATE" != "Running" ]; then if [ "$STATE" != "Running" ]; then
echo "ERROR: GDBServer could not attach to PID $PID!" echo "ERROR: GDBServer could not attach to PID $PID!"
echo "Failure log (use --verbose for more information):" if [ $(adb_shell su -c getenforce) != "Permissive" ]; then
cat $GDBSERVER_LOG echo "Device mode is Enforcing. Changing Device mode to Permissive "
exit 1 $(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 fi
# Generate a file containing useful GDB initialization commands # Generate a file containing useful GDB initialization commands
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment