android


Systrace no longer works on Nexus 6 in Marshmallow because of SELinux? Has anyone got it working again?


I used to be able to run systrace on my Nexus 6, but recently it stopped working (probably after one of the recent monthly updates): systrace hangs trying to download the trace off my device.
In adb logcat, I see a bunch of lines like
05-26 14:57:08.567 4933 4933 W <my.app.package>: type=1400 audit(0.0:23388710): avc: denied { getattr } for comm=66627379737472616365206E6F7469 path="/sys/kernel/debug/tracing/trace" dev="debugfs" ino=4158 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:debugfs:s0 tclass=file permissive=0
I know systrace uses debugfs, and this appears to be a SELinux permission issue (see https://source.android.com/security/selinux/validate.html). Has anyone got this working again?
This is by design. Debugfs has a lot of deangerous bits in it, hence the split to tracefs. For more information these articles are handy:
https://www.phoronix.com/scan.php?page=news_item&px=TraceFS-Linux-Tracing-FS
https://lwn.net/Articles/630526/
in system/sepolicy on AOSP, one can find neverallows on this:
96b1c9ca (Nick Kralevich 2015-12-17 16:38:21 -0800 564) neverallow { domain -init -system_server -dumpstate } debugfs:file no_rw_file_perms;
As well as read for untrusted_app (which is covered by the above and seems superfluous):
$ git blame -L106,106 untrusted_app.te
96b1c9ca (Nick Kralevich 2015-12-17 16:38:21 -0800 106) neverallow untrusted_app debugfs_type:file read;
By the way, if you get hex-encoded comm fields, one can decode them like so, using Python:
'66627379737472616365206E6F7469'.decode('hex')
'fbsystrace noti

Related Links

React Native app keeps closing on android emulator
android setOnFocusChangeListener get value from post execute
Hide fab on other tabs
How to stop my android NFC scanning when I close an activity?
Does GPU Overdraw slow down the app?
A simple kotlin class with mockito test caused MissingMethodInvocationException
ListView behaviour varies on different android versions
Android: Arabic speech recognition - offline
FacebookCallback<LoginResult> doesn't execute all the code -android
Android CheckBox and Row-OnClickListener
WPS connection programmatically in Android?
Launcher icon not loaded from mipmap folder
Run a gradle task before resolving dependencies
Callback functions are not called in Android Facebook Login
ExpandableListView getChildView() “View recycling”
Apple Wallet Animation for Android

Categories

HOME
paraview
amp-html
jax-rs
pda
depth
case
pclxl
appcelerator
google-apps
tail
owin
emoji
automatic-ref-counting
endpoint
onedrive-api
flatpak
powershell-v5.0
mvc-mini-profiler
firefox-addon
gmm
replication
squashfs
href
postscript
inno-download-plugin
joptionpane
interpreter
onload
custom-post-type
progress-bar
winexe
ceylon
openmdao
user-defined-functions
iis-express
google-earth
send
xbox
record
cart
twos-complement
installshield-le
slacktextviewcontroller
lubridate
xajax
graphhopper
nohup
railstutorial.org
smoothstate.js
signal-strength
snapchat
textsum
openrasta
hammer.js
context-switch
boxing
oracleclient
git-flow
cpu-cache
django-1.10
angular2-testing
parfor
segment-io
myspace
spring-cloud-feign
angular-ui-typeahead
hadoop-partitioning
fuzzywuzzy
false-sharing
ess
xvim
doctype
lasso
baasbox
git-ftp
adehabitathr
viewer
administration
rickshaw
psr-4
dsym
amslidemenu
ora-06550
artemis
cocoalibspotify-2.0
ui-select2
font-awesome-4.0.0
onload-event
cascadingdropdown
chart-director
qtconcurrent
xcode3.2
multiplexing
convention
screen-size
android-holo-everywhere
photolibrary
django-piston
dsl-tools
visualj#
fault-tolerance
firefox-3
flvplayback
lemmatization

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App