Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client.openProcStat(serial[, callback]) Android 7 #66

Open
anaraquelazevedo opened this issue Mar 7, 2017 · 5 comments
Open

client.openProcStat(serial[, callback]) Android 7 #66

anaraquelazevedo opened this issue Mar 7, 2017 · 5 comments

Comments

@anaraquelazevedo
Copy link

I´m having a problem accessing the data in some mobiles models, with android 7 (for instance, nexus 6). With android 7 i cannot access the system files, proc/stat for example, and since adbkit´s method client.openProcStat(serial[, callback]) tries to read that data. I can´t garantee an appropriate error handling while acessing that data and i get this error:

Unhandled rejection FailError: Failure: open failed: Permission denied'
at /stf/node_modules/adbkit/lib/adb/sync.js:305:33
at tryCatcher (/stf/node_modules/adbkit/node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (/stf/node_modules/adbkit/node_modules/bluebird/js/main/promise.js:503:31)
at Promise._settlePromiseAt (/stf/node_modules/adbkit/node_modules/bluebird/js/main/promise.js:577:18)
at Promise._settlePromises (/stf/node_modules/adbkit/node_modules/bluebird/js/main/promise.js:693:14)
at Async._drainQueue (/stf/node_modules/adbkit/node_modules/bluebird/js/main/async.js:123:16)
at Async._drainQueues (/stf/node_modules/adbkit/node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues (/stf/node_modules/adbkit/node_modules/bluebird/js/main/async.js:15:14)
at runCallback (timers.js:637:20)
at tryOnImmediate (timers.js:610:5)
at processImmediate [as _immediateCallback] (timers.js:582:5)

Can anyone shoot any ideas? or new aproaches to this problem!? Thanx in advance!

@sorccu
Copy link
Member

sorccu commented Mar 7, 2017

Run adb shell cat /proc/stat. If that gives you permission denied, then there isn't anything we can do about it. You could possibly use dumpsys with .shell() to access similar information.

@anaraquelazevedo
Copy link
Author

anaraquelazevedo commented Mar 10, 2017

with adb shell cat /proc/stat i have permission to access file!
How can I make this method (OpenProcStat) for all phones with adb shell?

@sorccu
Copy link
Member

sorccu commented Mar 10, 2017

Hmmm that's weird... what's the model? Run adb devices -l and paste the line here (you can remove the serial number though if you like).

@anaraquelazevedo
Copy link
Author

List of devices attached
########## device usb:1-2 product:shamu model:Nexus_6 device:shamu

@pnagele
Copy link

pnagele commented Oct 24, 2017

Hi,
got the same problem that openProcStat fails with permission denied, while I can access proc/stat without any problems.

XXXXXXXXXXX device usb:336592896X product:LON-L29 model:LON_L29 device:HWLON

(Huawei Mate 9 Pro)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants