You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
what is the possible reason of " Unable to initialize SurfaceComposerClient " ? #26
Normal applications don't have permission to access SurfaceComposerClient. Only system apps can do it, or you can try rooting your device. Alternatively, if you're OK with supporting only Android 5.0+, try adding the CAPTURE_VIDEO_OUTPUT permission. I haven't tried it myself but it might work. Although if you're OK with 5.0+, you should use the official public APIs instead.
this is my test code , because of my original code :
// Create a Surface for the virtual display to write to.
LOG("Creating SurfaceComposerClient");
android::spandroid::SurfaceComposerClient sc = new android::SurfaceComposerClient();
Activity
sorccu commentedon Mar 23, 2016
Normal applications don't have permission to access SurfaceComposerClient. Only system apps can do it, or you can try rooting your device. Alternatively, if you're OK with supporting only Android 5.0+, try adding the
CAPTURE_VIDEO_OUTPUTpermission. I haven't tried it myself but it might work. Although if you're OK with 5.0+, you should use the official public APIs instead.workzj commentedon Mar 23, 2016
but,my device is root . and i run app on android 4.4. is any other reason?
sorccu commentedon Mar 23, 2016
Does your app run as root?
workzj commentedon Mar 23, 2016
yes, this is my test code:
sorccu commentedon Mar 23, 2016
That's not how
suworks... you only get root permissions inside su's child processes. Your code doesn't do anything.sorccu commentedon Mar 23, 2016
Also what does this have to do with minicap?
workzj commentedon Mar 23, 2016
this is my test code , because of my original code :
// Create a Surface for the virtual display to write to.
LOG("Creating SurfaceComposerClient");
android::spandroid::SurfaceComposerClient sc = new android::SurfaceComposerClient();
is " Unable to initialize SurfaceComposerClient ".so i write this test.
sorccu commentedon Mar 23, 2016
I see. Well, you need to fix your su usage somehow, but if you get that fixed I think it will work.
workzj commentedon Mar 23, 2016
i don't understand ... you means , my app has not get the root authority ?
sorccu commentedon Mar 23, 2016
Yes, because that's not how
suworks.workzj commentedon Mar 23, 2016
thank you ~! i try
Merge pull request openstf#26 from yusunan/master