corbinlc / gnuroot

154 stars 29 forks source link

Libreoffice wheezy does not start #16

Open tonigi opened 10 years ago

tonigi commented 10 years ago

Splash screen appears and then disappears, with no error message.

cedric-vincent commented 10 years ago

@corbinlc, IIRC this is a bug in PRoot. It should be fixed in v4.1 (v4.0 due this week). In the mean time, I'll send you a workaround.

corbinlc commented 10 years ago

@cedric-vincent Ok great! What is the underlying issue?

cedric-vincent commented 10 years ago

@corbinlc, this issue is due to the maximum path length allowed for named sockets. It can only be 104 bytes long, and LibreOffice uses relatively long path for its named sockets, like:

/tmp/OSL_PIPE_1000_SingleOfficeIPC_43da364bf2fe05a6935db1c26d2a7e

When such a path is translated by PRoot (wrt. to configured bindings), it might exceed 104 bytes, hence the issue. In this case, a workaround is to bind a shorter path over /tmp. For instance, using "-b /data/local/tmp:/tmp", the translated path is then less than 104 bytes:

/data/local/tmp/OSL_PIPE_1000_SingleOfficeIPC_43da364bf2fe05a6935db1c26d2a7e
tonigi commented 10 years ago

Wow, nice catch.

cedric-vincent commented 10 years ago

@pelya, you may be interested by this issue.

pelya commented 10 years ago

I've got lucky with this bug - in Debian and GIMP apps, the socket path is /data/data/org.gimp.inkscape/files/img/tmp/OSL_PIPE_10318_SingleOfficeIPC_23f203a9dc0bbc9d2dd55c0463effce which is 105 bytes, with maximum path being 108 bytes, as described in 'man 7 unix'.

Android does not have /tmp path, and no shorter app-writable path, which allows to create Unixy stuff like sockets, so we don't have much options besides keeping app package name shorter.

pelya commented 10 years ago

BTW the path /data/local/tmp is not writable for regular apps, it's writable only when you connect with ADB.

tonigi commented 10 years ago

Perhaps proot can catch requests to open those files and map them to shorter file names if necessary?

pelya commented 10 years ago

Then you'll have to keep the ttranslation table somewhere in the file system, I think it's easier to recompile abusing apps, such as LibreOffice, to use shorter socket names. On Jul 4, 2014 12:32 PM, "Toni G" notifications@github.com wrote:

Perhaps proot can catch requests to open those files and map them to shorter file names if necessary?

— Reply to this email directly or view it on GitHub https://github.com/corbinlc/gnuroot/issues/16#issuecomment-48025036.

cedric-vincent commented 10 years ago

Perhaps proot can catch requests to open those files and map them to shorter file names if necessary?

@tonigi; yes, this is planned for v4.1

BTW the path /data/local/tmp is not writable for regular apps, it's writable only when you connect with ADB.

@pelya; PRoot uses P_tmpdir (exported by the libc) as temporary directory (assumed to be writable). Do you know its value on Android (I thought it is /data/local/tmp)?

pelya commented 10 years ago

P_tmpdir in Android libc headers is just define to "/tmp/", also tmpfile() will try to create a file inside both /data/local/tmp and /tmp, both of which will fail. There's TODO comment in the code, stating that they should get this app's temporary directory from the framework, so maybe tmpfile() will work on Android in some distant future.

On Fri, Jul 4, 2014 at 1:27 PM, Cédric VINCENT notifications@github.com wrote:

Perhaps proot can catch requests to open those files and map them to shorter file names if necessary?

@tonigi https://github.com/tonigi; yes, this is planned for v4.1

BTW the path /data/local/tmp is not writable for regular apps, it's writable only when you connect with ADB.

@pelya https://github.com/pelya; PRoot uses P_tmpdir (exported by the libc) as temporary directory (assumed to be writable). Do you know its value on Android (I thought it is /data/local/tmp)?

— Reply to this email directly or view it on GitHub https://github.com/corbinlc/gnuroot/issues/16#issuecomment-48029091.

corbinlc commented 10 years ago

My path is barely too long. I can shorten it quite a bit. This will get this going for now. Future version of PRoot sounds exciting.

corbinlc commented 9 years ago

Sorry it has been so long. Can you update to the latest gnuroot and gnuroot wheezyX test apks found here: https://www.dropbox.com/sh/xjbg1z49ur3t5b6/AAAoBzmCK3A27Sk9DZAeolLla?dl=0 This uses proot v5.0. Can you then try again and tell me what you see?

corbinlc commented 9 years ago

By the way, please update to the latest versions for the Play Store before installing these versions.

DavideRossi commented 9 years ago

I'm having (possibly) the same problem but I'm on a x86 machine so I can't test it. Is a x86 version with proot v5.0 available somewhere? BTW: I'm saying possibly beacuse I get an exception message if I start libreoffice from the prompt, it's not the same "no error message" behavior reported by the OP.

cedric-vincent commented 9 years ago

Hello @DavideRossi,

On Wed, Feb 11, 2015 at 03:32:37PM -0800, DavideRossi wrote:

I'm having (possibly) the same problem but I'm on a x86 machine so I can't test it. Is a x86 version with proot v5.0 available somewhere?

PRoot binaries (v5.1) are here:

Regards, C�dric.

DavideRossi commented 9 years ago

Thanks Cédric, but I don't think I can just replace the proot executable, this is an unrooted android machine. Because of Android security scheme I could do that only from within the app itself but I'm guessing the shell itself is run by proot (I admit I haven't checked really how it works so I may be mistaken on that).

pelya commented 9 years ago

I think you can replace proot binary while it's running. But I dpn't know where it's located in GNURoot On Feb 17, 2015 1:22 PM, "DavideRossi" notifications@github.com wrote:

Thanks Cédric, but I don't think I can just replace the proot executable, this is an unrooted android machine. Because of Android security scheme I could do that only from within the app itself but I'm guessing the shell itself is run by proot (I admit I haven't checked really how it works so I may be mistaken on that).

— Reply to this email directly or view it on GitHub https://github.com/corbinlc/gnuroot/issues/16#issuecomment-74653288.

cedric-vincent commented 9 years ago

On Tue, Feb 17, 2015 at 03:22:54AM -0800, DavideRossi wrote:

Thanks C�dric, but I don't think I can just replace the proot executable, this is an unrooted android machine. Because of Android security scheme I could do that only from within the app itself but I'm guessing the shell itself is run by proot (I admit I haven't checked really how it works so I may be mistaken on that).

Oops, I thought you were talking about a "regular" Linux/x86 distro. My mistake. These binaries are not suitable in your case since they lack a feature required by GNURoot ("link2symlink").

zekeb commented 9 years ago

I am still having this problem using a fresh install of the current version (today) in the play store. I am not sure what version of Proot I am using.Can you tell me the workaround to try?