gnuroot
gnuroot copied to clipboard
Cannot run executables that are outside of the fake root (like ping)
When I try this: /system/bin/ping From within GNURoot, it fails with a segmentation fault.
When I do the same, in a standard terminal (not within GNURoot) /system/bin/ping works properly.
What is the best way to start debug? What is the proper verbosity setting for proot to get useful information?
Thanks, Corbin
This is a known issue: PRoot can't be used to execute programs based on Bionic libc because its ELF interpreter can't be used as a loader. This can be fixed only once PRoot moves to its own loader (planned in the next next release).
@corbinlc, you can assign this issue to me.
Another solution is to tell PRoot not to attach programs that are outside the guest rootfs. I'll try to write you a proof-of-concept next week.
I have assigned this to you. I am glad it is a known issue. I assumed it had something to do with the ELF interpreter, but wasn't sure of that. I would greatly appreciate the proof of concept. The future release where PRoot acts as a loader is quite interesting as well, but I don't know the timeline.
For the proof of concept or general work in this area, it seems that you may need environment variables setup differently when running android executables. LD_LIBRARY_PATH, LD_PRELOAD (some versions of the android link listen to these) are examples that come to mind, but probably some generic method for setting alternate environment variables would be desirable.
I am very happy to have you paying attention to these issues. I think you have more time and some of these issues are more related to PRoot than the things that I have added ontop of that.
Thanks! Corbin
Did you have time to work on a proof of concept?
No sorry, I didn't take time to work on this issue. I'll keep you informed.
That is ok. I don't have any time right now and would be slow at trying it out. My son was just born a little over 2 weeks ago and having 2 kids is quite a new experience/challenge. There might be a chance that I will have significantly more time for this and similar soon. Just fire away when you have it (or explain what needs to be done) and I will try it out when I can. I haven't finished the experiment of running from the sdcard, but proved the concept we were discussing does work.
I closed issue #63 as a duplicate of this, but just want to record a workaround. If adb tcp interface is enabled, I can launch am commands over it. On some devices enabling adb over network option is provided in settings. On some one has to connect the device over usb to enable the option (which is a pain though). On devices I have seen, if you reboot, you'll have to enable adb all over again (which is another pain). Anyway, until this issue is resolved, one can consider this workaround.
@mayureshw:
Another workaround, which doesn't require you to use adb
, is to use a terminal emulator running on your Android device outside of GNURoot.
One good choice is "Terminal Emulator for Android" (jackpal.androidterm
). You can download it for free, and it takes up very little storage space.
@jasonspiro
Yes. I am actually using Terminal IDE by Spartacus Rex where native binaries work.
Key applications for me are bash, ssh, vim and git, all of which work on Terminal IDE out of the box.
GNURoot is still attractive because I can run virtually any Linux application. Looking forward to native launch support from GNURoot.
Hi Also trying to run 'am' and failing similarly to the way reported here. Any one know of workarounds other than running two separate shell sessions? (one in proot and one outside)