gnuroot icon indicating copy to clipboard operation
gnuroot copied to clipboard

Libreoffice wheezy does not start

Open tonigi opened this issue 10 years ago • 20 comments

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

tonigi avatar Jul 01 '14 15:07 tonigi

@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.

cedric-vincent avatar Jul 01 '14 17:07 cedric-vincent

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

corbinlc avatar Jul 03 '14 05:07 corbinlc

@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

cedric-vincent avatar Jul 03 '14 11:07 cedric-vincent

Wow, nice catch.

tonigi avatar Jul 03 '14 12:07 tonigi

@pelya, you may be interested by this issue.

cedric-vincent avatar Jul 04 '14 08:07 cedric-vincent

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 avatar Jul 04 '14 09:07 pelya

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

pelya avatar Jul 04 '14 09:07 pelya

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

tonigi avatar Jul 04 '14 09:07 tonigi

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" [email protected] 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.

pelya avatar Jul 04 '14 10:07 pelya

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)?

cedric-vincent avatar Jul 04 '14 10:07 cedric-vincent

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 [email protected] 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.

pelya avatar Jul 04 '14 19:07 pelya

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 avatar Jul 08 '14 05:07 corbinlc

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 avatar Jan 07 '15 23:01 corbinlc

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

corbinlc avatar Jan 08 '15 04:01 corbinlc

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.

DavideRossi avatar Feb 11 '15 23:02 DavideRossi

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:

  • for x86_64: http://static.proot.me/proot-x86_64
  • for x86: http://static.proot.me/proot-x86

Regards, C�dric.

cedric-vincent avatar Feb 17 '15 11:02 cedric-vincent

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).

DavideRossi avatar Feb 17 '15 11:02 DavideRossi

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" [email protected] 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.

pelya avatar Feb 17 '15 11:02 pelya

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").

cedric-vincent avatar Feb 17 '15 14:02 cedric-vincent

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?

zekeb avatar Mar 30 '15 04:03 zekeb