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

write spinner selected value to database
Using AsyncTask to download an XML file
Screen resolution / Physical size
android - showDialog(); error
linux joining multicast group setsockopt returns errno 19 device not found
Foreign keys in android 2.2 and higher
HttpURLConnection, HttpClient and HttpPost request not working with POST request in Android
Android custom row layout in ListView with flexible height
Save image to sdcard from drawble resource on Android
Is it possible to combine an Accelerometer and Digital Compass to get a fine Gyroscope?
How to move a SurfaceView with transparent background?
maintaining view state android
Android: Setting the Zoom for the Map Intent
UDP or RTP streaming solution for android
Why does the list of unavailable voices is always empty?
Android: How to Change ProgressDialog's Text Color? [duplicate]

Categories

HOME
service-worker
angular2-material
rsa
hessian
can
nested-if
banner
webix
odoo-8
opengl-3
discrete-mathematics
computer-science
spin
arangodb
fabric.io
g++
categorical-data
automatic-ref-counting
nancy
symmetricds
gruntfile
chargify
nodemcu
gulp-watch
highstock
direct3d11
android-things
rpgle
vex
finagle
twos-complement
keras-layer
python-pptx
openproject
tex
xdocreport
filesystemwatcher
kill
tasm
xv6
trigonometry
movilizer
outputcache
wc
berkeley-db-je
facebook-social-plugins
monkey-testing
httr
x++
opennms
geotiff
identification
spring-data-couchbase
backbone-collections
bootstrap-tags-input
rocks
stax
redistributable
jclouds
google-query-language
database-relations
inf
linklabel
microsoft-reporting
fuelcms
rubaxa-sortable
ember-cli-rails
eoferror
skspritenode
ansi
xmltype
nodelist
theos
beatsmusic
webfinger
paw
wcm
xml-namespaces
cuba
personalization
grails-domain-class
matrix-inverse
dct
mutual-authentication
cffile
asdf
apache-abdera
booksleeve
fragmenttransaction
boost-msm
dajaxice
adobe-media-server
inkcanvas
cgimage
automationelement
http-daemon
photolibrary
silent
spread
build-environment
scrubyt
lemmatization
xslcompiledtransform

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