Status of Proot

312 views
Skip to first unread message

Chris Lapa

unread,
Jul 14, 2015, 8:06:13 AM7/14/15
to proo...@googlegroups.com
Just curious if anyone is still maintaining the code on Github?
I would love to contribute and help if someone could give me some direction on important issues that need attention.

Sergii Pylypenko

unread,
Jul 14, 2015, 8:51:56 AM7/14/15
to proo...@googlegroups.com
Main developer, Cedric, is not very active, and other ones, me and Corbin, are mostly maintainers, we will merge your patches after some testing, but unfortunately won't give you much directions.
The most requested feature by Android users is executing stuff from partition mounted noexec, such as SD card.
https://groups.google.com/forum/m/#!topic/proot_me/RVg5XIUc4CU

On Tue, Jul 14, 2015 at 3:06 PM, Chris Lapa <odde...@gmail.com> wrote:
Just curious if anyone is still maintaining the code on Github?
I would love to contribute and help if someone could give me some direction on important issues that need attention.

--

---
You received this message because you are subscribed to the Google Groups "PRoot" group.
To unsubscribe from this group and stop receiving emails from it, send an email to proot_me+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Patrick Cerri

unread,
Jul 14, 2015, 8:59:38 AM7/14/15
to proo...@googlegroups.com
AND  - has the $TMPDIR option been added as a command line parameter - and to the static ARM build yet !?

That way we can run it on Android..

Thank you!
  

Sergii Pylypenko

unread,
Jul 14, 2015, 10:35:06 AM7/14/15
to proo...@googlegroups.com
There is a variable PROOT_TMP_DIR inside 'next' branch, but it's not in any release yet.

You can also use precompiled proot from here:
https://github.com/pelya/cuntubuntu/tree/master/dist
it uses variable PROOT_TMPDIR (note different name), but it's not statically linked and fails on some static executables.

Patrick Cerri

unread,
Jul 14, 2015, 11:42:46 AM7/14/15
to proo...@googlegroups.com
Yes, I have seen this version in Debian NoRoot.. Thanks Sergii. 

But this version does not have all the latest stuff, like correct 'ps', working.. I think this is 5.1.. And I really need that stuff..

Cedric !? If you could just quickly do a static ARM rebuild with all this latest stuff in it, I would be happier than I already am with proot.. ;-p
 
I'm sorry to ask, I know what it's like to get pestered for things.. 

cdc

unread,
Jul 16, 2015, 4:00:13 AM7/16/15
to proo...@googlegroups.com
On Tue, Jul 14, 2015 at 04:42:45PM +0100, Patrick Cerri wrote:
> Yes, I have seen this version in Debian NoRoot.. Thanks Sergii.
>
> But this version does not have all the latest stuff, like correct 'ps',
> working.. I think this is 5.1.. And I really need that stuff..
>
> Cedric !? If you could just quickly do a static ARM rebuild with all this
> latest stuff in it, I would be happier than I already am with proot.. ;-p

For the record: I sent the binary directly to Patrick. I'll try to
upload it to github soon.

Corbin Champion

unread,
Jul 17, 2015, 1:23:00 PM7/17/15
to proo...@googlegroups.com, pr...@6dof.xyz, pr...@6dof.xyz
Cedric,

The new executable you provided proves again that there is an issue I really need your help solving.  I am still having an issue where the static executables you create work fine, while mine SEGV on certain versions of Android running certain commands (debugging hasn't given any real clues).  I think it has to do with either what compiler is used or what flags are used while compiling. 
I would like to do an experiment.  Can we do these two steps:

1) more important: You provide directions from scratch of how you setup your rootfs that you do your static builds under and then I try do the same and build a static executable?  There were some steps missing from the last time you provided instructions that I wasn't able to easily find answers to using google.  A less preferred version, but probably easier in the short term, of this would be if you make a tar file of your rootfs and hand it off in some fashion.  That would solve the issue of me not being able to build properly, but not allow me or others to do so from scratch.

2) less important, but interesting:  If I give you a tar file of my proot src directory, can you build it and hand back the executable?

I know you don't have much time for this.  But this issue I haven't yet been able to solve.

On another more upbeat point, I have a couple of new extensions working 1) that puts the rootfs on the sdcard (something I wanted to do for a while) and 2) one that hides files and directories that start with a certain prefix (i do the 2nd one to hide how i am handling fake hard links and putting the rootfs on the sdcard).  The one that puts the rootfs on the sdcard is not optimized for performance yet, but does work.  I have a new solution, not finished coding, that will make the impact of files being on the sdcard much less noticeable.  The one that hides files was written by the intern I have for the summer.  I wish push all of these back on a new branch, so other people looking for proot extension examples can use them.  The one that hides files is a great example of using chained system calls.

Thanks,
Corbin

pr...@6dof.xyz

unread,
Jul 20, 2015, 7:01:30 AM7/20/15
to Corbin Champion, proo...@googlegroups.com
Hello Corbin,

> Date: Fri, 17 Jul 2015 19:23:00 +0200
> From: Corbin Champion <corb...@gmail.com>
>
> 1) more important: You provide directions from scratch of how you
> setup your rootfs that you do your static builds under and then I
> try do the same and build a static executable?

I've just rebuilt my build environment from scratch -- assuming the
host OS is *not* Slackware -- this way:

# Get Slackware/ARM packages:
wget -r -np http://ftp.arm.slackware.com/slackwarearm/slackwarearm-14.1/slackware/{a,ap,d,e,l,n,tcl}/
mkdir ~/rootfs/slackwarearm-14.1

# Extract only a minimal subset (ignore errors):
ls ftp.arm.slackware.com/slackwarearm/slackwarearm-14.1/slackware/{a,l}/*.t?z | xargs -n 1 tar -C ~/rootfs/slackwarearm-14.1 -xf

# Do a minimal post-installation setup:
mv ~/rootfs/slackwarearm-14.1/lib/incoming/* ~/rootfs/slackwarearm-14.1/lib/
mv ~/rootfs/slackwarearm-14.1/bin/bash4.new ~/rootfs/slackwarearm-14.1/bin/bash
proot -q qemu-arm -r ~/rootfs/slackwarearm-14.1 /sbin/ldconfig
proot -q qemu-arm -r ~/rootfs/slackwarearm-14.1 ln -s /bin/bash /bin/sh

# Install all package correcty (ignore warnings):
ls ftp.arm.slackware.com/slackwarearm/slackwarearm-14.1/slackware/*/*.t?z | xargs -n 1 proot -q qemu-arm -S ~/rootfs/slackwarearm-14.1 -b ftp.arm.slackware.com installpkg

Now, I'm currently building PRoot as described below but it is not
finished yet, so I'll tell you if something goes wrong:

# Build PRoot/ARM statically:
cd ~/git/proot-static-build
mkdir build-arm
cd build-arm
proot -R ~/rootfs/slackwarearm-14.1 -b $(which cmake) -q qemu-arm make glibc-version=glibc-2.18 -f ../GNUmakefile proot -j4


> 2) less important, but interesting: If I give you a tar file of my
> proot src directory, can you build it and hand back the executable?

Yes, feel free to send me your sources.


> On another more upbeat point, I have a couple of new extensions
> working 1) that puts the rootfs on the sdcard (something I wanted to
> do for a while)

Awesome! :D


> and 2) one that hides files and directories that start with a
> certain and putting the rootfs on the sdcard). The one that puts
> the rootfs on the sdcard is not optimized for performance yet, but
> does work. I have a new solution, not finished coding, that will
> make the that hides files was written by the intern I have for the
> summer. I wish push all of these back on a new branch, so other
> people looking for proot extension examples can use them. The one
> that hides files is a great example of using chained system calls.

Indeed, that would be great :)


Cédric.

cdc

unread,
Jul 20, 2015, 9:15:58 AM7/20/15
to Corbin Champion, proo...@googlegroups.com
On Mon, Jul 20, 2015 at 01:04:04PM +0200, pr...@6dof.xyz wrote:
> Now, I'm currently building PRoot as described below but it is not
> finished yet, so I'll tell you if something goes wrong

The build has finished correctly:

~/git/proot-static-build/build-arm$ qemu-arm ./proot -V | head -11
_____ _____ ___
| __ \ __ \_____ _____| |_
| __/ / _ \/ _ \ _|
|__| |__|__\_____/\_____/\____| 5.1.0

built-in accelerators: process_vm = yes, seccomp_filter = yes

Visit http://proot.me for help, bug reports, suggestions, patchs, ...
Copyright (C) 2014 STMicroelectronics, licensed under GPL v2 or later.

This version of PRoot is statically linked to the following software.

Regards,
Cédric.

corbin....@gmail.com

unread,
Jul 20, 2015, 12:10:54 PM7/20/15
to proo...@googlegroups.com, corb...@gmail.com, pr...@6dof.xyz
>  The build has finished correctly

Great!  I will follow the steps you have described and see where that puts me.  

Thanks!
Corbin

Corbin Champion

unread,
Jul 21, 2015, 2:50:23 PM7/21/15
to proo...@googlegroups.com, corbin....@gmail.com, corb...@gmail.com, corbin....@gmail.com
The provided instructions do indeed provide a working static proot.  That being said, it looks like what is actually causing my version of proot to fail is the link2symlink extension.  I haven't investigated what yet, but newer version of Android, on certain devices, don't like something that extension is doing.  Interesting.

Thanks!
Corbin

Sergii Pylypenko

unread,
Jul 23, 2015, 2:50:50 PM7/23/15
to proo...@googlegroups.com, Corbin Champion
I've made a pair of shell scrips to set up minimal 500Mb Slackware environment and compile a static ARM proot binary using it.
I've pushed them to the 'next' branch to directory 'build', maybe the directory can be renamed to something more clear.

What about x86 and MIPS binaries? Do we need scripts for them? Are they experiencing same issues as ARM version?

cdc

unread,
Jul 23, 2015, 3:08:13 PM7/23/15
to Sergii Pylypenko, proo...@googlegroups.com, Corbin Champion
On Thu, Jul 23, 2015 at 09:50:49PM +0300, Sergii Pylypenko wrote:
> I've made a pair of shell scrips to set up minimal 500Mb Slackware
> environment and compile a static ARM proot binary using it.
> I've pushed them to the 'next' branch to directory 'build', maybe the
> directory can be renamed to something more clear.

Great! I agree, the directory should be renamed to avoid confusion.
Maybe something like "cross-build-env", but it's just a suggestion.


> What about x86 and MIPS binaries?
> Do we need scripts for them?

I used to build the x86 binary the same way:

https://github.com/proot-me/proot-static-build/blob/master/GNUmakefile#L3
https://github.com/proot-me/proot-static-build/blob/master/GNUmakefile#L8

As far as I know, PRoot is not ported to MIPS. Although, This is just
a matter of programming.


> Are they experiencing same issues as ARM version?

Corbin, do you know?


Cédric.

Sergii Pylypenko

unread,
Jul 23, 2015, 3:51:18 PM7/23/15
to cdc, proo...@googlegroups.com, Corbin Champion
Okay, I've renamed the directory, and also added similar scripts to build x86 version.

Corbin Champion

unread,
Jul 23, 2015, 3:51:49 PM7/23/15
to PRoot, pr...@6dof.xyz, x.pe...@gmail.com, pr...@6dof.xyz
>As far as I know, PRoot is not ported to MIPS.  Although, This is just a matter of programming.

Correct.  There is still no support for MIPS.  This is a nice to have for me, but I won't have time to look at it anytime soon.


>> Are they experiencing same issues as ARM version?

The x86 one I built works fine, as far as I know.  I have run it against an x86 emulator running 5.1 and an x86 device running 4.4.  No problems in either case, but that is not an exhaustive list.

Let me clear one point of confusion that I caused.  It ended up being that it was not how I was building that was making me have non-function proot versions on newer versions of Android on some devices.  It is instead an issue with the link2symlink extension, but it looks like my extension that puts most the rootfs on the sdcard also causes a similar issue.  I have not debugged what those two extensions are doing that causes the crash.  If I disable those two extensions, things work fine.  The link2symlink is only needed on some devices (no idea which devices but it includes one of my test devices).  The extension that puts the rootfs on the sdcard is only needed for people with not enough internal storage.  I can go without them for newer versions of Android for now and work through this.

Thanks,
Corbin

trung...@gmail.com

unread,
Oct 5, 2015, 12:36:30 PM10/5/15
to PRoot
Hi Corbin,

Can you guide me on how to disable the link2symlink extension? I have an issue with this (I think) on Android 5.

Many thanks for all the great work.

Trung.

Corbin Champion

unread,
Oct 5, 2015, 12:41:42 PM10/5/15
to PRoot, trung...@gmail.com
> Can you guide me on how to disable the link2symlink extension? I have an issue with this (I think) on Android 5. 

What app are you using?  In GNURoot Debian, I have made it so the link2symlink extension is disabled if you are running a newer version of android (including 5.0).

Thanks,
Corbin

Trung Le

unread,
Oct 5, 2015, 12:50:40 PM10/5/15
to Corbin Champion, PRoot
Hi Corbin,

Thanks so much. I'm trying to include your code into an application I'm developing to install R (R-project.org). The idea is to include all the things we need (r-base and necessary packages) and the tar them to an .obb file to simply and shorten the installing process of R for users. It seems to work well with Adroid 4X, but it breaks in Lollipop. I think it went wrong with the symbolic link files but I'm not sure.
It might have been wrong with the way I build the obb. If you have any advice for me I'm really grateful (I'm already grateful much to you for making such great gnuRoot Debian).

Best,
Trung

Corbin Champion

unread,
Oct 5, 2015, 1:31:31 PM10/5/15
to PRoot, corb...@gmail.com, trung...@gmail.com
If you are using the version of PRoot from GNURoot Debian ( https://github.com/corbinlc/GNURootDebian not the older version of GNURoot), just don't use the -l switch.  If you are using the version of PRoot from one of my other apps, you cannot get rid of the link2symlink.  I suggest you make your life much easier and create an app like GNURoot Octave ( https://github.com/corbinlc/GNURootOctave ) which extends the base class found here ( https://github.com/corbinlc/GNURootLibrary ) to be able to install tar files or packages into GNURoot Debian.  If you install your tar file or packages into GNURoot Debian, your users will be able to also install whatever packages they want, graphical support is already present and you won't have to worry about things like PRoot, because I am taking care of that for you.  You will get the feature improvements I add over time and you get my support if you go this route.  Tell me what you decide and point me at your repository once it is ready.  

Thanks,
Corbin

Sergii Pylypenko

unread,
Oct 5, 2015, 2:12:03 PM10/5/15
to proo...@googlegroups.com, Corbin Champion, trung...@gmail.com
Hi Corbin. Did you manage to integrate XSDL into your apps?

I've launched R on my Debian noroot app, with simple 'sudo apt-get install r-base' and then 'env LD_PRELOAD= R', it fails to launch with shared memory emulation active, so you need to clean LD_PRELOAD to disable it. Debian noroot is however very heavy compared to GNURoot, because I do not bother moving non-executable files to SD card, I did that long time ago and it introduced bugs.

--

Corbin Champion

unread,
Oct 6, 2015, 4:38:27 PM10/6/15
to PRoot, corb...@gmail.com, trung...@gmail.com
I had an intern over the summer helping me with a few things and while he did well at some tasks, he was not able to get your make flow working for him.  I did not have time to help other than generic suggestions, contact you, general debugging suggestions, etc.  As an alternate suggestion, I had him grab and strip down bVNC viewer and provide that to me as a library project.  That is currently how graphics are displayed.  I may revisit this again as there are obvious advantages to XSDL.  

GNURoot Debian is not on the sdcard as I hoped to provide as an option to people.  1) the performance was not good enough and 2) the extension crashed on devices running > 5.0 and some others but not sure what was similar about those devices.  I know how to solve 1) now but I have not had time to do that or to look at why 2) happened.  I simply disabled it.  It totally works for me on a couple of my devices, but not all and that is not good enough.  Ugh!  I'll get to it.  Btw... did you see that 6.0 allows you to format your sdcard as an extension of the internal storage?  This solves this issue for people as they migrate to that version, if they are ok with formatting it as such.  

Corbin

Sergii Pylypenko

unread,
Oct 6, 2015, 5:08:19 PM10/6/15
to proo...@googlegroups.com, Corbin Champion, Trung Dang Le

That's disappointing, considering that I've provided instructions to him how to set up a clean Debian chroot build environment, I've tested them myself so I'm sure they work:
https://github.com/pelya/commandergenius/blob/sdl_android/project/jni/application/xserver/readme.txt

Moving only non-executable files to SD card allows to move around 2/3 of Debian system image by size, however you need an ungodly amount of symlinks on the /data partition, basically a symlink for each moved file.
Thankfully the progress in hardware is happening fast - there is no flagship phone today with 8 Gb of storage, 16 Gb is the minimum, so my position is to stop bothering about storage, and tell people to upgrade their devices.

--
Reply all
Reply to author
Forward
0 new messages