yashsingh1/xdaforums huggingface dataset:
[Android Q&A, Help & Troubleshooting] DoggieChick:
Well, we're making progress. Following your instructions the bootscript ran further, with a few errors, then asked me if I wanted to use the check sum. I responded "yes" and received an error that the file was corrupted (or not found?). I ran the commands again and this time responded "no" and the script appeared to run to the end. I managed to connect via the vnc but received a grey screen and an error (which I don't recall - will try the whole procedure again after I get some sleep...)
[Android Q&A, Help & Troubleshooting] wrsg:
Edit:

Just for reference to anyone having trouble on a Samsh!t phone:

Even when the SELinux mode is switched on a Samsh!t stock kernel to Permissive it restores itself to Enforced so anyone using a Samsh!t phone will need to compile a stock kernel from source without SELinux enabled or just download a stock kernel without it.

Being rooted or removing Knox makes no difference to this at all.

Old post:

Running the app version 3.0.0 alpha 2 on official Kitkat (released a couple of days ag) on N7100. SELinux is Permissive. Rooted with Philz 6.26.6.

I have installed Busybox (Stericson) and tried renaming the one in the linuxonandroid/files folder.

The error I am getting now is this:

​
u0_a196@t03g:/ $
u0_a196@t03g:/ $ cd /sdcard/ubuntu
u0_a196@t03g:/sdcard/ubuntu $ su
sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh /sdcard/ubuntu/ubuntu.img
sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh /sdcard/ubuntu/ubuntu.img
android/files/bootscript.sh /sdcard/ubuntu/ubuntu.img <
Checking loop device... MISSING
Creating loop device... mknod: /dev/block/loop255: Operation not permitted
FAILED
Error: Unable to create test loop device!
1|root@t03g:/storage/emulated/legacy/ubuntu #
[Android Q&A, Help & Troubleshooting] Slayerrider:
Same problem here. Can someone help us please?
[Android Q&A, Help & Troubleshooting] adroidgalaxy:
I got this working on 4.3.3 finally!

All it was: change kernel to anything but stock.

Anyway now it is working I have an issue with the vnc viewer lol.

There is no mouse pointer any more? What are the working settings you guys have?

Thank you for your help

Sent from my SAMSUNG-SGH-I747 running S3Rx w/4.3!
[Android Q&A, Help & Troubleshooting] wrsg:
I think on most or all Sam**** stock ROMs, the stock kernel is probably what is preventing this app from working fine, so you're correct. It's really as simple as using a non-Samsung stock kernel.
[Android Q&A, Help & Troubleshooting] mrhnet:
just to inform..

Tried Debian Small (debian-v4-small) on xperia sp (android 4.3), and got the infamous grey screen in vnc. Added the following line to the xstartup file (in /home/debian/.vnc/).

xfce4-session

started Debian again, now can see the xfce desktop as expected.
[Android Q&A, Help & Troubleshooting] whatsandroid:
Cool!

tested Ubuntu 12 on my Samsung Galaxy tab 8.9 LTE, very easy to set up with the guide in the app!

i have one question, is there any way to get VNC viewer to open up a keyboard automaticly, or do you have to use the 'send text' button?

edit: think i know the answer already; i need to buy the full version of VNC viewer right? i can see there is an on-screen keyboard in the features there..
[Android Q&A, Help & Troubleshooting] farzad23:
app_126@android:/ $ export PATH=/data/local/bin:$PATH

app_126@android:/ $ cd /sdcard/archlinux

app_126@android:/sdcard/archlinux $ su

onandroid.opensource/files/bootscript.sh /sdcard/archlinux/archlinux.img <

/data/data/com.zpwebsites.linuxonandroid.opensource/files/bootscript.sh[36]: dirname: not found

Checking loop device... MISSING

Creating loop device... OK

/data/data/com.zpwebsites.linuxonandroid.opensource/files/bootscript.sh[143]: dirname: not found

mount: can't read '/etc/fstab': No such file or directory

No user defined mount points

net.ipv4.ip_forward = 1

/data/data/com.zpwebsites.linuxonandroid.opensource/files/bootscript.sh[222]: basename: not found

Config file loaded

New 'X' desktop is localhost:0

Starting applications specified in /root/.vnc/xstartup

Log file is /root/.vnc/localhost:0.log

If you see the message 'New 'X' Desktop is localhost:0' then you are ready to VNC into your debian OS..

If connection from a different machine on the same network as the android device use the address below:

eth0: error fetching interface information: Device not found

If using androidVNC, change the 'Color Format' setting to 24-bit colour, and once you've VNC'd in, change the 'input mode' to touchpad (in settings)

/root/init.sh: line 145: /etc/init.d/ssh: No such file or directory

To shut down the Linux environment, just enter 'exit' at this terminal - and WAIT for all shutdown routines to finish!

[root@localhost /]# exit

exit

Killing Xvnc process ID 2471

/root/init.sh: line 191: /etc/init.d/ssh: No such file or directory

Shutting down Linux ARM

umount: can't umount /data/local/mnt/root/cfg: Invalid argument

umount: can't umount /data/local/mnt/external_sd: Invalid argument

1|root@android:/mnt/sdcard/archlinux #

this is what i got .any help please.

ta nx in advanced
[Android Q&A, Help & Troubleshooting] devwithzachary:
Whats the issue your having?

Everything seems to boot fine (although with a few errors) and you get to the promt, and then you exit and everything seems to shut down to
[Android Q&A, Help & Troubleshooting] nickhimself:
Once this is all finished and running, can this replace stock ROMs and community projects like AOSP / AOKP / etc builds and command all features of your phone, or is this basically going to be a "hey look what else we've put linux onto" project?

I'm definitely interested in this project as I've had very little linux experience but feel like having it on my phone would give me the motivation to get more use out of it and learn more about it (since my phone's always with me) which would be good for knowledge and experience.

Is there a "devices we're trying to push support to" link, or something showing what IS supported/being worked on versus what you'd LIKE support on?
[Android Q&A, Help & Troubleshooting] farzad23:
hi

i can not see the desktop (GUI) of linux and how can i solve the errors ?

thanx
[Android Q&A, Help & Troubleshooting] fixero:
i have a problem..why vnc grey screen.. i attachment ss..

please help me.
[Android Q&A, Help & Troubleshooting] k3v0:
What image are you using?
[Android Q&A, Help & Troubleshooting] fixero:
ubuntu 12.04....
[Android Q&A, Help & Troubleshooting] devwithzachary:
Yes but which size, core, small or large?
[Android Q&A, Help & Troubleshooting] devwithzachary:
Well it will most likely for the foreseeable future still be something you install over linux, so will not replace anything, but we are looking into making our own light weight ROM to improve using linux. As well as integrating more features into Linux, including working sound, native graphics better usb support etc.

You need to start up the vnc client and enter the settings as per the install guide.

And the errors should be nothing to worry about
[Android Q&A, Help & Troubleshooting] farzad23:
tanx for u'r reply.it works tanx

i have one more queschen .how can ichane screen size ?when iuse xrendr it said can not open the screen ,something like that
[Android Q&A, Help & Troubleshooting] Kevin.Silbstedt:
Sorry for posting in the wrong thread before, I didn't know, that this Q&A thread existed.

Anyway:

This guy here runs ubuntu natively (without VNC) on his galaxy S2 by "killing" the android UI and the bootanimation and then starting an Xserver. (I don't know, if his sound works and I don't know, if landscape mode is possible with this method.) He doesn't respond to the questions in the comments and has not presented the necessary commands or his script.

So does anyone have an idea, how he did that?
[Android Q&A, Help & Troubleshooting] schosslarock:
Image is not booting...

Hi Guys, just a quick question. I tried to install the debian image but the installtion hangs at the add user line and doesen't go any further. I have a Samsung S3 with Cyanogen Nightly with its stock kernel (I used Siyah before). Does anyone know the problem and got a solution for me.
[Android Q&A, Help & Troubleshooting] markgoespop:
Disorderly exit

I have started using your scripts to run Linux on my phone. This is a useful project!

I was astonished to find myself using emacs on the phone remotely over SSH, editing dynamically syncing files in my dropbox directory mounted from android. So good.

Anyway, it is annoying to have to restart my phone if I want to run Ubuntu twice. I am getting the disorderly un-mounting problems that others seem to have had. Is there a solution to this problem, I haven't found one?

Thanks,

Mark

Ubuntu 12 core / CM7.2 / T-Mobile G2
[Android Q&A, Help & Troubleshooting] k3v0:
@Mark

I put a .nomedia file in / of the image file and in /data/local/mnt of the android filesystem. I suspect the media scanner service was indexing the mounted image.

I haven't had the problem since, but it could just be coincidence.
[Android Q&A, Help & Troubleshooting] devwithzachary:
If you have a donation key you can do this from the config menu within the launcher.

If not you will find a file in the same location as our .img file called .config

In this is a line to change the screen size, then just reboot linux for the change to take effect

Yes this is pretty much as far as we have gotten, by taking over the android frame buffer you can have linux using native(ish) graphics.

However this gives to downsides, no way back to android without a reboot, and no touch screen support.

What we are aiming to do is something like this however provide a compatibly layer so that you can get back to Android and so that touch screen etc works within Linux on all devices

the nomedia should help, also sometimes processors running within Linux do not get killed on shut down which prevent the image from being unmounted, for now the only method is a reboot, but we will work on a more aggressive killing of linux processors before unmounting

Could you please included a screen shoot of the terminal
[Android Q&A, Help & Troubleshooting] Culex316:
Question: Is there any way to VNC into the chrooted Linux environment via USB?

What I've done is the following:

Connected my Galaxy Nexus to my Ubuntu Laptop and went into adb shell and issued "stop" to stop the Android runtime (and free up more memory) then I ran the "bootscript.sh" in the same directory as my Ubuntu medium image (after having to chmod 777 it from recovery) and it booted just fine over adb shell, however I cannot seem to VNC into it from my laptop via USB...I've tried localhost:5900, 127.0.0.0 and nothing works, and I've also tried googling extensively for more info but no avail...is it possible at all?

Thanks :laugh::good:
[Android Q&A, Help & Troubleshooting] mscion:
Hi zacthespack. When I had the problem in regards to properly umounting ubuntu after update such that one had to reboot to

get back to ubuntu, I checked my old bootscript.sh file that worked in the past and noticed that it did not have the line

$bbox mount -o bind /dev $mnt/dev

So after removing this line from bootscript.sh the umounting problem went away and I've had no problem restarting ubuntu. I did not need to use a .nomedia file

Does this make sense? Why is this mount needed?

BTW, I also made a couple other changes (I'm basically repeating what I put in the developers tread) that are Note 2 specific and not general.

replace

if [ -d /sdcard/external_sd ]; then

$bbox mount -o bind /sdcard/external_sd $mnt/external_sd

with

if [ -d /storage/extSdCard ]; then

$bbox mount -o bind /storage/extSdCard $mnt/external_sd

comment out the three lines of an if statement in the next lines concerning

HD version of the Archos 70. Keeping these lines leads to an error statement when exiting ubuntu but

I think it is harmless...
[Android Q&A, Help & Troubleshooting] markgoespop:
I have tried that now, but I am still getting the same problem. Thanks though.
[Android Q&A, Help & Troubleshooting] Kevin.Silbstedt:
Could you please share such a script? I got a Galaxy S3 (i9300) and a smartdock and I want to try, if I can turn the phone into an ubuntu computer with mouse, keyboard and HDMI.

I don't think the dock mode will be possible on the S3 with the coming ubuntu touch port, since HDMI is proprietary, which is also the reason it doesn't work with cyanogenmod. (Thanks Samsung)

Sounds cool, but I wouldn't have the slightest idea, how you could do that. I tried to use the xserver app, but it is not anywhere near being usable for this. Everything is messed up.
[Android Q&A, Help & Troubleshooting] xfim:
Is there any way to improve drivers on PowerVr ?

Sent from my GSmart Sierra S1 MT6589T
[Android Q&A, Help & Troubleshooting] wrsg:
I used Dr. Ketans Multitool v6 to 'deknoxify' the ROM. The kernel is just the stock (official) Kitkat kernel for the n7100, Kitkat was only officially released a few days ago so the sources haven't appeared on Samsung's Open Source area yet.

I have loop devices from 0-7 so I'll try 1-7 and see whether those instructions you gave will work. Will report back in a bit, maybe tomorrow.

Edit:

New error, 'unable to attach loop device'. Tried %s/loop255/loop3/g in vi on the bootscript.sh file in the 'com.zp...' directory while root.

Checking loop device... FOUND
/data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh[134]: /data/data/com.zpwebsites.linuxonandroid/files/busybox: Permission denied
Error: Unable to attach image to loop device! (Image = /sdcard/ubuntu/ubuntu.img)
1|root@t03g:/storage/emulated/legacy/ubuntu #
[Android Q&A, Help & Troubleshooting] adroidgalaxy:
Yeah wish I tired that sooner lol i had a lot of stuff saved to my last image of ubuntu.

Anyway, any idea why I have no mouse input, or touch in put for that matter?

Sent from my SAMSUNG-SGH-I747 running S3Rx w/4.3!
[Android Q&A, Help & Troubleshooting] mrhnet:
Feedback:

In debian-v4-small, issuing su command inside vnc results in "Authentication failure", although password is "correct". To fix this, run these in terminal emulator prompt of Android

chmod +s /bin/su
passwd root

..and give a password for root account. Then do "su" in vnc, give password of the root account to get su privileges there.

Source: http://forums.debian.net/viewtopic.php?f=5&t=67583
[Android Q&A, Help & Troubleshooting] adroidgalaxy:
Any ideas on missing mouse pointer?

Sent from my SAMSUNG-SGH-I747 running S3Rx w/4.3!
[Android Q&A, Help & Troubleshooting] kuitsu:
I am getting this same error when trying to use sudo in terminal inside VNC session in Galaxy Note 10.1 (N8000) with leaked Samsung KitKat ROM. This ROM does not have Knox. I am using SELinuxModeChanger to switch SELinux to Permissive mode. I also installed Busybox separately and renamed the one included to Complete Linux Installer to force it to use separate busybox since included one caused an error when trying to boot linux (found instruction for this somewhere here). With these I was able to install Ubuntu and start it.

I have root user access to Ubuntu in terminal where Linux is started by Complete Linux Installer but cannot use root inside VNC session. This same problem happens with all Ubuntu images. Has anyone experiencing same problem succeeded to fix this issue? I did not find any replies to original question in this thread.
[Android Q&A, Help & Troubleshooting] wrsg:
When you check your SELinux mode in About Phone, does it stay at Permissive? On my official Kitkat n7100 ROM, it keeps reverting back to Enforced even when I use SELinuxModeChanger as you have.
[Android Q&A, Help & Troubleshooting] kuitsu:
Yes it would seem to stay at Permissive mode. My ROM does not show SELinux mode in About Phone in Settings but running getenforce command in terminal returns Permissive.
[Android Q&A, Help & Troubleshooting] wrsg:
It's strange that the kernel with that leaked ROM is not as strict about SELinux as my official ROM's kernel.
[Android Q&A, Help & Troubleshooting] robherc:
Please try the following fix, posted by mrhnet in post #386:

--Thanks for that useful input, mrhnet. kuitsu, if that doesn't work for you, let us know & I'll see what I can find out hacking around int he ubuntu images on my device.

Can you tel us what VNC client you are using, and what you client's "input mode" is set to please?
[Android Q&A, Help & Troubleshooting] kuitsu:
Still no root access in vnc.

After running commands as root in terminal

chmod +s /bin/su
passwd root

running su command in vnc gives an error

ubuntu@localhost: ~$ su
Password:
setgid: Permission denied

I did quick search for setgid as root in terminal

root@localhost: /# find / -name setgid
/selinux/class/capability/perms/setgid

So I would assume it is SELinux that prevents me from getting root access even though getenforce command in Android terminal returns Permissive which should mean that SELinux is disabled or something like that.

Anyone know how SELinux really works?
[Android Q&A, Help & Troubleshooting] mrhnet:
That was needed in Debian because giving su (substitute user) would call for root account password and for that to work, we need to setup a root pass. Sudoing (sudo su) did not work in debian. It says that user (debian) is not in sudoers file.

But in ubuntu, 'sudo su' worked out of the box. It basically elevates the privileges of the user (ubuntu), so giving the user password works. 'Su' also works after setting a password for root account. If 'sudo su' doesn't work for you, it might be a broblem related to SElinux as you described.

Edit: One problem of "su" (running as root user) is that, gui apps running as root don't have access permissions to X server, so some GTK error (can't access Display localhost 0:0) would occur. One solution found when googling, I'll quote the whole thing below..

echo $DISPLAY # you'll be needing this value 3 lines below
sudo -i # or "su -" on older Slackwares
xauth merge ~alien/.Xauthority # use your own username here instead of "alien"
export DISPLAY=:0.0 # use the value of DISPLAY you've seen 3 lines before

Have to give those commands while in VNC. I didn't test it.

I used another way. Add the following line to end of .bashrc file in home folder..

export XAUTHORITY=/home/ubuntu/.Xauthority

And then delete the .Xauthority file in /root folder. Then restart ubuntu/debian. (Alter the above line if debian). I don't know what security issues it would cause.. but it worked for me. I found these googling :D
[Android Q&A, Help & Troubleshooting] imamsyaif:
can't browse sdcard and eksternal_sd

Hi, i am a noob user

Tried Backtrack 5 on my mt6589 device running jb 4.2.2 os..i was read post by post before on this great thread,but i'm still can not open storage with notify permission denied like ss below.

and this is my vold.fstab

## Vold 2.0 Generic fstab
## - San Mehat (san@android.com)
##

#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################

## Example of a standard sdcard mount for the emulator / Dream
# Mounts the first usable partition of the specified device
dev_mount sdcard /storage/sdcard0 emmc@fat /devices/platform/goldfish_mmc.0 /devices/platform/mtk-msdc.0/mmc_host
dev_mount sdcard2 /storage/sdcard1 auto /devices/platform/goldfish_mmc.1 /devices/platform/mtk-msdc.1/mmc_host
## Example of a dual card setup
# dev_mount left_sdcard /mnt/sdcard1 auto /devices/platform/goldfish_mmc.0 /devices/platform/mtk-sd.0/mmc_host/mmc0
# dev_mount right_sdcard /mnt/sdcard2 auto /devices/platform/goldfish_mmc.1 /devices/platform/mtk-sd.2/mmc_host/mmc2

## Example of specifying a specific partition for mounts
# dev_mount sdcard /mnt/sdcard 2 /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1

# usb otg disk
dev_mount usbotg /mnt/usbotg auto /devices/platform/mt_usb /devices/platform/musbfsh_hdrc

anyone help me please....can i solved by editing bootscript code..?

sorry for my bad english and thank alot before...
[Android Q&A, Help & Troubleshooting] robherc:
OK, first you show us a screenshot of a permission denied error you get from a custom link you added to your backtrack desktop. This does not tell us if you are trying to use internal storage, external_sd, or USB storage.

If you will post links to a copy of the init.sh file from your /root/ directory in backtrack, as well as telling us the exact link from your desktop (i.e. does it point to /sdcard or to /external_sd , and let us see the output from typing: mount -l from a root prompt on your android terminal emulator (NOT while backtrack is running), that will give us much better information to help you with.

---------- Post added at 09:26 PM ---------- Previous post was at 09:14 PM ----------

After a quick search for "selinux permissions" I found a few interesting results showing that, apparently, selinux is a pretty thorough suite of security coverages, not just something that blocks scripts running as root (permissive/enforcing modes). Here's a link to a resource I'm trying to read through right now: https://access.redhat.com/site/docu..._SELinux-SELinux_Contexts_Labeling_Files.html I have a fairly insane schedule today, so I won't be able to get much reading on your issue done until probably Tuesday or Wednesday, so i'll leave the link here in hopes that you may be able to get the info you need before then ;)

Sorry I haven't gotten back with you on this wrsg. I'm going to try to rewrite a custom bootscript for you that'll try a few different ideas I have to troubleshoot this problem better for us. However, I had to go out of town to deal with a pretty nasty problem that came up with my livestock this week, so now I'm about 5.5 days behind on all my work for this week. Will get back to you on this ASAP.
[Android Q&A, Help & Troubleshooting] wrsg:
No problem. I've temporarily reverted to 4.3 just to solve this (and it works fine now) so please do not worry about it too much. I have a feeling it will be less of an issue once the kernel source for KK is released.
[Android Q&A, Help & Troubleshooting] robherc:
Hey wrsg,

Here's the loop device debugging script I promised. Rename your /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh file to .../bootscript.old then copy the file linked below to /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh and chmod it to 0755.

After a reboot, you can run the debug script by telling the CLI app to boot your image normally (the bootscript.debug.sh script will automatically run, testing your device's ability to mount your image file on /dev/block/loop255, and /dev/block/loop1 through loop5, then exit. Please run the script this way at least once, then post the script output from your terminal here, so we can see how your device responded to the attempts. After that, you can rename bootscript.old back to bootscript.sh, and chmod to 0755, allowing CLI to load your image normally.

Script: http://www.robherc.com/hosted/linuxonandroid/bootscript.loopdebug.sh
[Android Q&A, Help & Troubleshooting] robherc:
robherc's LinuxOnAndroid FAQ

Hey all, I've noticed several people have been having problems that weren't addressed in the "official" linuxonandroid FAQ, so I have started building my own unofficial "add-on FAQ" here: http://www.robherc.com/hosted/linuxonandroid/FAQ.html

It's by no means an exhaustive resource, but it should help several of you at least get a head-start on the troubleshooting process while you're first working on getting LinuxOnAndroid, or the Complete Linux Installer app, running on your device. Over the next several weeks, I'll be continuing to add new topics to expand my FAQ, so check it regularly for updates, and please let me know if there's anything you'd like to see added. :good: