2

I'm running a Samsung Galaxy J110H, Android KitKat 4.4.4, rooted.

Is it possible to attain real superuser privilege on GNURoot Debian instead of fakerootfs? Is there any way as in when I type in su; there is an actual su prompt asking me to allow it? This is the outcome when I type in su:

root@localhost:/# su
setgid: Permission denied
root@localhost:/#
- - snip - -

Also apt-get update && apt-get upgrade returns:

unpacking python (from .../python_2.7.3-4+deb7u1_all.deb) ...
Processing triggers for man-db ...
/usr/bin/mandb: can't set effective uid: Permission denied
Setting up libexpat1:armel (2.1.0-1+deb7u2) ...
Setting up python2.7-minimal (2.7.3-6+deb7u2) ...
- - snip - -
3
  • 2
    You don't need proot if your device is rooted. And you don't need any app to run some Linux distro on Android. Just download the rootfs and create a simple shell script to start and stop Linux environment from adb shell or any terminal emulator app. I've been using Ubuntu, ArchLinux and Void Linux the same way on Termux and ssh for years. All that you need to do is a few bind mounts and chroot. Mount namesapce adds further isolation. I've built my kernel with support for network, pid and uts namespaces as well to further isolate both environments. Dec 22, 2019 at 10:06
  • Damn I need a tutorial on that!!
    – losethos
    Dec 22, 2019 at 12:00
  • 1
    i am not sure why you get permission denied. but sudo apt-get runs fine here (i am using Linux Deploy app via dropbearmulti ssh on terminal emulator, Android 7, settings: global namespaces in root app, permissive in SelinuxModeChanger app)
    – alecxs
    Dec 22, 2019 at 13:13

2 Answers 2

2

I too am getting this error in GNURoot. Search google and saw your question posted in many stack forums. I wanted to change from armel to armhf and followed the instructions on the Debian website but came to the error you stated. What I had to do was chown u+s /usr/bin/mandb. The error still popped up but everything worked like a charm.

I think you need to chmod dpkg again and then everything will run well. Btw I too am still running KitKat.

Edit: After further testing and usage of gnuroot, it turns out that the method i stated above on bypassing the permission denied error does not solve all problems. After looking at /etc/fstab in the proot environment, there are no mount points. If you run the command mount from the gnuroot terminal you will notice that it will show mount points of the host system. Also you will notice that running chmod 4777 / or chmod u+s / the permission denied error will appear. If yoy run ls -l /acct it will list the /acct of the host system not of the proot.

I havent tested this but since the proot environment needs the suid flags you will need to unpack the booting image of you android device edit the fstab and change the mount options removing nosuid option, repack and flash the boot image to solve your problem. Remounting in the terminal as root (not proot) does not solve the problem because even after remounting, the fstab file remains the same.

By the way this is just my theory and i will edit the answer if it works perfectly.

A quote extracted from an answer in reddit

If you have root, chroot. In a nutshell, a chroot will spawn processes straight in the Linux userland whereas a proot will do it from the Android environment and be limited by Android resource limitations. A chroot can also run more closely to a desktop environment; full blown window managers, browsers and what not. Can even run Java and Android Studio.

Linux Deploy is different from Gnuroot because Linux deploy uses chroot while gnuroot uses proot thats the reason they work differently.

Edit2: After even futher testing, i discovered that i needed to run apt-get install fakeroot then fakeroot /bin/bash After running these commands, the error disappeared. Chmoding turned out to not solve entirely the error. Also if you get installation errors try doing fakeroot /bin/sh or fakeroot /bin/dash Proof that fakeroot works am now in debian 10(buster) after patient upgrades.enter image description here

Gnu root debian is like Termux but for old android versions.Regarding the su matter of calling su binary from inside proot, you need to install the tsu binary. Since gnuroot does not have pkg in termux, the same binary can be install via python2. So first install Python pip then run pip install tsu then run the tsu binary and maybe you will be lucky and gain real root permissions. It wont work on stock wheezy (have tested it) debian but try upgrading to jessie or stretch and maybe you will be lucky.

1
  • I think i should post the tutorial somewhere and maybe someone out there is searching for it.
    – Silent
    Nov 2, 2021 at 9:17
0

Alternatively, you could use Another Term an updated maintained Gnu terminal in proot environment with updated proot binary which in my opinion can also be an alternaive to Termux. It supports as low as android version 4.0 and no root is needed. Here and here are links to the project to get more infor.

Some screenshot i took on my android 4.4.4 Tab Running on Buster: enter image description here

And enter image description here

I havent tested it but i think you can VNC and get a desktop environment.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .