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

Error at running #4

Open
brijagstu7 opened this issue Apr 26, 2021 · 10 comments
Open

Error at running #4

brijagstu7 opened this issue Apr 26, 2021 · 10 comments

Comments

@brijagstu7
Copy link

I am on an ARM64 phone (OnePlus 7) with Android 11 (PixelExperience), when I tried running I met with these:

guacamoleb:/data/local/tmp/dist_arm64 $ ./run
  be Installing /data/local/tmp/dist_arm64/_bin/infolauncher.apk +0ms
  be InfoLauncher started (or already started) +32ms
/data/local/tmp/dist_arm64/ServiceManager.js:209
        let lines = proc.stdout.toString().split(/\n/);
                                ^

TypeError: Cannot read property 'toString' of null
    at VndServiceManager.fetch (/data/local/tmp/dist_arm64/ServiceManager.js:209:33)
    at BinderWatcher.scanBinderServices (/data/local/tmp/dist_arm64/binderWatcher.js:153:51)
    at Timeout._onTimeout (/data/local/tmp/dist_arm64/binderWatcher.js:65:33)
    at listOnTimeout (internal/timers.js:549:17)
    at processTimers (internal/timers.js:492:7)

So what's going on ?

@fdgonthier
Copy link
Contributor

I commend you for trying to run this, at all. Very few have tried and reported to me! Thank you for this.

I think the problem is likely because the "grabservice" binary cannot be run for some reason. I would like to see a whole log for this but I need to first ask on what kind of Android device you've tried to run this? Because of SELinux protections, this program is not going to work on any modern stock Android device. We've tried but Google has long since cut us from the source of information we need to build the Binder Explorer display.

@brijagstu7
Copy link
Author

@fdgonthier thank you for your concern, I'll post some photos in an app called DevCheck to tell the device I'm using. If you need more feel free to tell me.Screenshot_20210426-112540.pngScreenshot_20210426-112453.pngScreenshot_20210426-112445.pngScreenshot_20210426-112438.pngScreenshot_20210426-112429.png

@brijagstu7
Copy link
Author

brijagstu7 commented Apr 26, 2021

I disabled SELinux (setenforce 0) and switched to root and ran again, still failed but the messages differed:

guacamoleb:/data/local/tmp/dist_arm64 # ./run
  be Installing /data/local/tmp/dist_arm64/_bin/infolauncher.apk +0ms
  be InfoLauncher started (or already started) +30ms
events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: ENOENT: no such file or directory, open '/dev/binderfs/binder_logs/state'
Emitted 'error' event on ReadStream instance at:
    at internal/fs/streams.js:136:12
    at FSReqCallback.oncomplete (fs.js:156:23) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/dev/binderfs/binder_logs/state'
}

I suppose you need logcat to see a whole log but that might be way too much from recognizing the true problem.

@fdgonthier
Copy link
Contributor

Good job. We're getting somewhere:

Error: ENOENT: no such file or directory, open '/dev/binderfs/binder_logs/state'

This means that /dev/binderfs is not mounted or not accessible. You can try this:

mkdir /dev/binderfs
mount -t binder binder /dev/binderfs

And see if it gets your your /dev/binderfs

@brijagstu7
Copy link
Author

mount -t binder binder /dev/binderfs

I get mount: 'binder'->'/dev/binderfs': No such device

@brijagstu7
Copy link
Author

Another thing is that /dev/binderfs already exists but no content in it

@mirfatif
Copy link

mount -t binder binder /dev/binderfs

I get mount: 'binder'->'/dev/binderfs': No such device

It means that your kernel is not built with CONFIG_ANDROID_BINDERFS.

I face the same problem when testing with SELinux set permissive.

@fdgonthier is binderfs a must? If so I'll rebuild my kernel.

Another thing: does binder-explorer-web explore only the framework services registered with the system service manager? What about the binder transactions occurring between two apps (e.g. when an app binds to another app's service)? Or what if a process sends a strong Binder reference in an Intent to an app, and then both do IPC through that binder? Would such IPC be visible in binder-explorer-web?

Thank you.

@Binozo
Copy link

Binozo commented Dec 3, 2023

I am facing the same problem here :/

biscuit_puffin:/data/local/tmp/binder_explorer # ./run
/data/local/tmp/binder_explorer/PackageManager.js:27
lines = proc.stdout.toString().split(/\n/);
^

TypeError: Cannot read property 'toString' of null
at new PackageManager (/data/local/tmp/binder_explorer/PackageManager.js:27:29)
at Object.<anonymous> (/data/local/tmp/binder_explorer/app.js:297:10)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47

But my target Android is actually a rooted echo dot 2. gen running Android 7.1.2 armv5 if it helps

I got that following error too:

mount -t binder binder /dev/binderfs

I get mount: 'binder'->'/dev/binderfs': No such device

@fdgonthier
Copy link
Contributor

binderfs is absolutely mandatory for Binder Explorer to work, as it was designed to work to interpret the data available in binderfs to build up its display. If you can't get binderfs to work, you won't get Binder Explorer.

Unfortunately, I no longer work for the company that employed me to work on Binder Explorer. The software is probably accumulating some significant technical debts as Android keeps evolving.

@Binozo
Copy link

Binozo commented Dec 3, 2023

Ok thank you for your quick reply, that Android here I am working here is actually massively stripped down. So I don't think binderfs has any chance to work.

Still an awesome looking project, didn't thought you could run node so easily on that thing😄

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

4 participants