yashsingh1/xdaforums huggingface dataset:
[Android Q&A, Help & Troubleshooting] imamsyaif:
Thanks foy your quick reply,

actually my problem is about read/write sdcard issue. where there's always permission denied will be appeare on accessing sdcard/eksternal_sd in any activities (i.e : mozilla can't save downloded files on sdcard, or like screenshot before).

And I've tried changing owner permissions to read and write...

At first, I didn't set it recursively on all folders... and then the second time, I've set it recursively on all folders and yet,for some strange reason the permissions don't stick..

After it set all permissions, when I look at properties again, I still have the sameowner:backtrack

and permissions: none for owner, group-read and write and for others:read only..

But, i can open folder of sdcard/eksternal with command :

sudo gksu nautilus /sdcard

as long as on nautilus command ,we can..

but when exit ,we can't again...

and how about this :

.....

mount: mounting /sdcard on /data/local/mnt/sdcard failed: No such file or directory

......

what's the problem...?

regarding your answer,maybe this attachment will answer your questions,

if you have any further needed,please let me know, thank you so much for your help
[Android Q&A, Help & Troubleshooting] robherc:
#1: Unfortunately, I was not able to open your attachment. both of my programs said it was a corrupted file. However, from your clarifying that you're having permissions errors specifically on external_sd, I can guess at the problem. Apparently, the init.sh script in *several* of the images has a misspelling in it. If you open /root/init.sh in a text editor while in linux, find the line that contains "external-sd" and replace it with "external_sd". It is a tiny error, and not easy to notice until you know it's there, but it is a line that sets permissions for the external_sd device, so can cause many problems.

After you edit the file, you will need to re-set the priviliges of that file by going into the terminal on your android device that is running linux (i.e. the terminal app window that Complete Linux Installer opened when you started linux) and typing the following commands:

chmod 0755 /root/init.sh
rm /root/DONOTDELETE.txt

The first line sets the modified init.sh file to be allowed to execute, and the second line deletes a file that tells init.sh that the initial configuration (where it sets correct permissions for external_sd access) has already been completed. By deleting that file, it will tell init.sh to redo the initial setup it did the first time you booted your image.

IMPORTANT: The next time you start linux after doing this, you will get several error messages. Most of the error messages just mean that init.sh is trying to do things it already did the first time, but try to save a screenshot of all the error messages it gives (some will only be shown this one time) so we can check through them if anything doesn't work right after.

#2: On the mount error about /sdcard not wanting to mount to /data/local/mnt/sdcard please check in the same terminal as I had you use to fix init.sh for a /sdcard folder. If there is none, type the following:

mkdir /sdcard

in that terminal, to create the folder for your internal memory's emulated sdcard to be mounted.

If, however, you *do* have a /sdcard folder in linux, then we will need to check and make sure your internal memory is mounted at /sdcard in your android (have to check after shutting down linux). If it isn't then I can send you a modified bootscript.sh file to fix that.
[Android Q&A, Help & Troubleshooting] adroidgalaxy:
Yes, and thank you for the reply.

I'm using android vnc viewer. Touch pad for the input.

It's strange all I see is a centered black X as if there is no mouse drivers...

Sent from my SAMSUNG-SGH-I747 running S3Rx w/4.3!
[Android Q&A, Help & Troubleshooting] robherc:
OK, that's more informative...

First off, just to be sure, are you seeing a "normal" desktop image besides the "X" (i.e. is it a crosshatched grey background, or is it a desktop pic with toolbars displayed?), and which linux image are you currently using?

If you're seeing a "normal" desktop, then try switching your input mode to "mouse pointer control" and tap on the screen in a couple different places. If that moves the "X", then we'll know that something's going awry with your touchpad mode, and if not, then we'll know that it's most likely either a VNC app error, or a linux error.

In that case, if you could download another VNC client app from Play Store, just to confirm, it would be helpful if you tried connecting through another vnc app, as that will tell us for sure if it's a VNC app problem, or a linux problem. ... then we can proceed from there. ;)
[Android Q&A, Help & Troubleshooting] imamsyaif:
after I check it, there external_sd in it, so I did not do any editing in init.sh. and fyi, my device not have external_sd,but of sdcard as external storage and sdcard2 as internal storage, please check out my attachment

i was check it too with root explorer while backtrack running, sdcard alredy exist on /data/local/mnt/...

everything seemed nothing wrong,right? but why the problem has not been fix as well

i dont know and confused what the problem,probably you can find it for me ,check my file below please, and thanks for any help.....
[Android Q&A, Help & Troubleshooting] robherc:
Unfortunately, with all the thousands of different android-powered devices out there, we can't possibly buy one of each to test with, so many timewhen we write a script to work on "all tested devices," there are still devices we didn't test yet that it may not work on. That is why you are finding errors that have not yet been fixed.

I think that, for some reason, your device may not have /mnt/sdcard1 tied to /sdcard ... if that is true, then it explains why you are getting the error: "mount: mounting /sdcard on /data/local/mnt/sdcard failed". I can easily modify a bootscript.sh file for you, if that is the problem.

About your other problems, I am working on them too, but need to read your files & think about them more before I can answer. Sorry for the delay, but I had a livestock emergency last week, and have final exams next week, so I will be slow answering until after those are over.
[Android Q&A, Help & Troubleshooting] imamsyaif:
Thank you so much for your help,it does mean a lot to me,don't worry, I'll be waiting. Have a good exam brother..God bless you

My regards
[Android Q&A, Help & Troubleshooting] robherc:
Actually, external_sd is where linux is *supposed* to see sdcard2 (or /storage/sdcard1 ... same card, diferent names). however, you are using an outdated bootscript.sh file, so it's not being correctly mounted. I've attached a .tar.gz to this message with an updated bootscript.sh file for you to use; it should fix that problem (see instructions in my FAQ if you don't remember how to enable the new bootscript.sh file)

Actually, I was able to notice in your list of mounts from inside backtrack, that /sdcard was mounted with 0 permissions for user: backtrack, good permissions for group: root, and read-only permissions for everyone else. Inside the .tar.gz file I'm attaching to this message, you'll find a modified version of your init.sh file that I altered to (hopefully) fix this problem. You will need to copy the new init.sh file to the /root/ folder in backtrack, then you will need to chmod it to 0755 after copying. Also, before restarting backtrack after doing that, I need you to delete the file /root/DONOTDELETE.txt in backtrack, so that the new init.sh script can fix the settings.
[Android Q&A, Help & Troubleshooting] djawho:
hi

i've galaxy note 3 in 4.4.2,have you a little idea of my problem :

u0_a274@lte:/ $

u0_a274@lte:/ $ cd /storage/extSdCard/ubuntu/ubuntu-13.10.LARGE.ext4.v2

u0_a274@lte:/storage/extSdCard/ubuntu/ubuntu-13.10.LARGE.ext4.v2 $ su

sh /data/data/com.zepwebsites.linuxandroid/files/bootscript.sh /storage/extSdCard/ubuntu/ubuntu-13.10.LARGE.ext4.v2 /ubuntu-13.10.LARGE.ext4.img

sh /data/data/com.zepwebsites.linuxandroid/files/bootscript.sh /storage/extSdCard/ubuntu/ubuntu-13.10.LARGE.ext4.v2 /ubuntu-13.10.LARGE.ext4.img

Checking loop device... FOUND

mount: mounting /storage on /data/local/mnt/external_sd failed: Invalid argument

No user defined mount points

net.ipv4.ip-forward = 1

chroot: can't execute '/root/init.sh': permission denied

Shutting down Linux ARM

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

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

1|root@hlte:/storage/extSdCard/ubuntu/ubuntu-13.10.LARGE.ext4.v2 #

thanks
[Android Q&A, Help & Troubleshooting] robherc:
This error message is caused by a line in the bootscript.sh script that's required for compatibility with a few devices. When it gives this error, it simply means that it did not find an sd card plugged into your device.

This is a problem I've seen twice now, but haven't yet been able to "solve." Both times, it has appeared on a Samsung tablet running android 4.4.2; so far, the best workaround seems to be using an earlier version of android. ... If enough people start having this problem, and/or I gain access to one of these devices, then I'll try to get to the bottom of it, but I'm afraid that'll mean several hours with direct access to the device for me to find a fix. :/

This error is the "other end" of the first mount error you had, it simply means that you don't have an sd card inserted that LinuxOnAndroid was able to mount.

This error is a result of a glitch in the bootscript.sh fie that has since been rapaired. This tells me that you're using a bootscript.sh script with version 8.0 or earlier.. Please follow the instructions in This FAQ to update your script to the newest (currently version 9.0) version to fix this, and a couple of other glitches, as well as adding support for recognizing the sd card port on your samsung device.

---------- Post added at 10:52 PM ---------- Previous post was at 10:49 PM ----------

By the way, imamsyaif, did those two new scripts solve your problem, or is there more work still needed to get your device "up to speed?"
[Android Q&A, Help & Troubleshooting] djawho:
thanks

but no better

chroot: can't execute '/root/init.sh': Permission denied

shutting down Linux ARM

/data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh[271]: s: not found

umount: can't umount /data/local/mnt/dev: No such file or directory

umount: can't umount /data/local/mnt/proc: No such file or directory

umount: can't umount /data/local/mnt/sys: No such file or directory

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

1|root@hlte:/storage/emulated/legacy/ubuntu/ubuntu-13.10.LARGE.ext4.v2 #

for the moment , it's dead for my device, exactly ?

thanks
[Android Q&A, Help & Troubleshooting] robherc:
Yes, this is likely to continue to be a problem for you, unless you're willing to downgrade your device back to Android 4.3, in which this problem has never, to my knowledge, occurred. I haven't found what exactly is causing this error yet, but it seems to be restricted to only occurring on Samsung tablets that are running Android v4.4.2 so far.

Thank you VERY MUCH for posting this part. Apparently, the copy of bootscript.sh on the server got corrupted at some point, and the last several lines of the exit code were altered. Your posting this brought my attention to that error, so now I've repaired the copy on the server.

If ANYONE else gets an error: "bootscript.sh[271]: s: not found" PLEASE re-download and update your bootscript.sh file from www.robherc.com/hosted/linuxonandroid/bootscript.sh and accept my apologies for the corrupting of that file.
[Android Q&A, Help & Troubleshooting] djawho:
thanks

it' a little better , just the init.sh:

chroot: can't execute '/root/init.sh': Permission denied

shutting down Linux ARM

1|root@hlte:/storage/emulated/legacy/ubuntu/ubuntu-13.10.LARGE.ext4.v2 #

the probleme with kk in galaxy note 3 that not downgredable , or phone bricked
[Android Q&A, Help & Troubleshooting] robherc:
OK, just to be sure, since the other samsung that had this problem was a tab 10.1, let's try the following commands in a terminal emulator session:

su
cd /storage/extSdCard/ubuntu/ubuntu-13.10.LARGE.ext4.v2
export bbox=/data/data/com.zpwebsites.linuxonandroid/files/busybox
$bbox losetup /dev/block/loop2 ./ubuntu-13.10.LARGE.ext4.img
$bbox mount -t ext4 /dev/block/loop2 /data/local/mnt
$bbox chown root:root /data/local/mnt/root/init.cfg
$bbox chmod 0755 /data/local/mnt/root/init.cfg
$bbox umount /data/local/mnt
$bbox losetup -d /dev/block/loop2
/data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh /storage/extSdCard/ubuntu/ubuntu-13.10.LARGE.ext4.v2/ubuntu-13.10.LARGE.ext4.img

If that works, it'll start your ubuntu after that last line, and if it doesn't, then there's something in the android 4.4.2 ROM on Samsung devices that's blocking script execution in a chroot environment on us. The next thing to try, since you say you cannot downgrade to 4.3, I guess would be to see if you can flash a non-stock 4.4.2 ROM to the device & see if it will work with the new ROM. (The good news is that I've worked with several people who HAVE gotten LinuxOnAndroid to work on 4.4.2 devices, and several who have gotten it to run on Samsung devices, so there is still hope ;) )
[Android Q&A, Help & Troubleshooting] djawho:
$bbox mount -t ext4 /dev/block/loop2 /data/local/mnt

mount: mounting /dev/block/loop2 on /data/local/mnt failed: Device or Ressource busy

$bbox chmod 0755 /data/local/mnt/root/init.cfg

chmod: /data/local/mnt/root/init.cfg: No such file or directory

$bbox umount /data/local/mnt

umount: can't umount /data/local/mnt: Invalid argument
[Android Q&A, Help & Troubleshooting] robherc:
Please try rebooting your device, then attempt the commands again. If you still get "device or resource busy" then try loop1 or loop3 instead of loop2.

Thank you for your quick feedback, it makes it easier to help you troubleshoot your device when I can get nearly-instant feedback on what worked, or failed :)
[Android Q&A, Help & Troubleshooting] djawho:
no change with loop1 or loop3
[Android Q&A, Help & Troubleshooting] robherc:
OK, let me work on a script to do this for you then. Since you're not getting any mount errors from the v9.0 bootscript. I'll base it off of that one. When finished, I'll attach the script for you to use to this post.

--------EDIT--------

Well, after about 5 hrs I decided that the slick method of getting this file to delete itself & replace your bootscript.old back as bootscript.sh+autoboot it wasn't worth any more hours' work today, so here it is without that one feature: http://www.robherc.com/hosted/linuxonandroid/bootscript.perms.sh

Once you've downloaded that file, please rename your current /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh file to /data/data/com.zpwebsites.linuxonandroid/files/bootscript.old

then copy the new file to /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh and chmod to 0755 (same as you did with the bootscript.sh version9.0 file using my FAQ).

Once that's done, go ahead and attempt to start linux using the Complete Linux Installer app; this will run the new script, with the app passing the address of your image file to it. Once that finishes (should take less than 2 seconds), rename /data/data/com.zpwebsites.linuxonandroid/files/bootscript.old back to /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh & chmod to 0755.

After that, you should be able to boot properly using the Complete Linux Installer app.
[Android Q&A, Help & Troubleshooting] djawho:
thank for your help robherc ,that really cool
[Android Q&A, Help & Troubleshooting] wrsg:
I'm fairly sure it's not working on Samsung KK roms because of how the stock samsung kernel is configured and how it is still somehow tied ij with KNOX or just limiting access to some areas of the system. This is why having the kernel source for your ROM matters so the capability that is being disabled or blocked on stock kernels is removed.
[Android Q&A, Help & Troubleshooting] djawho:
thank

after change the new script bootscript.perms.sh in bootscript.sh run terminal with faq code and restart the phone . I start linux, i've "init.shSUCCESS" but i don't understand after , i close the terminal with exit ,exit ,i rename the bootscript.old on bootscript.sh and the new in .perms ,and i re-launch Complete Linux Installer normally ??
[Android Q&A, Help & Troubleshooting] robherc:
First, you need to run the new script using the Complete Linux Installer app, this way it will work on the image file you're using for your linux.

Second, after it has run once, you rename bootscript.old back to bootscript.sh and run command /data/data/com.zpwebsites.linuxonandroid/files/busybox chmod 0755 /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh

Third, try to start linux normally, using the Complete Linux Installer app. If it still failes with "init.sh permission denied" then, like wrsg said, you need to get a non-stock kernel installed, and maybe even a non-stock ROM too. AmonY, if you can catch him in the irc channel #linuxonandroid-help or in here, might be able to help you, since I know he likes samsung devices, and seems to know quite a lot about how to make them work with linuxonandroid. ;)
[Android Q&A, Help & Troubleshooting] djawho:
I've root and custom rom on my device.

Your script it's good, but i really understand the méthod.

i use the Complete Linux Installer app ,and i launch start linux, i've :

Setting Permissions for init.shSUCCESS

1|root@hlte:/storage/emulated/legacy/ubuntu/ubuntu-13.10.LARGE.ext4.v2 #

Here i close with exit,exit or not ?

I overwrite the news bootscript.sh or i read bootscript.perms.sh for the new ?

I run command in terminal launch by Complete Linux Installer app ,or in new session of terminal with the terminal launch by Complete Linux Installer close, or open ?

this is in 2 lines code or one ?

just before that all it's close ?

thanks
[Android Q&A, Help & Troubleshooting] robherc:
OK, now that I see the script worked right for you, we'll try a less complicated way to get back to running normal.

First: exit out of any running terminal windows.

Second: follow the FAQ directions to re-install bootscript.sh (v9.0) from http://www.robherc.com/hosted/linuxonandroid/bootscript.sh

Third: after that is done reboot your device, then start linux using Complete Linux Installer app.

This will do the same thing as I tried to explain earlier, but should be an easier way to get it done. :good:
[Android Q&A, Help & Troubleshooting] djawho:
sorry the new bootscript.sh (9.08 ko) not work.

chroot: can't execute '/root/init.sh': Permission denied
[Android Q&A, Help & Troubleshooting] robherc:
The bootscript should be V9.0, not 9.08 ko.

Aside from that, yes, we have now confirmed that your kernel/ROM combination is not compatible with running a second script in a chroot environment from one that's not in the chroot environ. The only way that we can likely fix this would be to install a new kernel on your device. Unfortunately, I'm not very experienced with that part, so I'll defer to AmonY or wrsg to help you with that one. They have more knowledge about that than I do.
[Android Q&A, Help & Troubleshooting] djawho:
great, great thanks for your help, my device turn on with Xnote v15 of xda member, i look for change that .

ps: it's the v9 , 9.08 it's the size.
[Android Q&A, Help & Troubleshooting] robherc:
Oops, I forgot you're Francais. En Englais, il sont 9.08kb. ... we say size in bytes, not octets, so I was confused. ;)
[Android Q&A, Help & Troubleshooting] enedil:
I found a bug. Using Archlinux, I cannot install anything via package manager, because pacman requires /etc/mtab file which is not present.
[Android Q&A, Help & Troubleshooting] robherc:
Thanks for the report enedil. If you'd like to help us further troubleshoot that one, please download+install the latest bootscript.sh script according to the instructions in This FAQ, then verify if it has already been repaired with that bootscript or not. If not, then I'll start work immediately on a fix to see if I can get the linux in chrooted environment to be able to "see" the /etc/mtab mount record(s).
[Android Q&A, Help & Troubleshooting] imamsyaif:
thanks for every help robherc, but it still can not solved my problem yet,and i dont know why,though I have done all directions from you...

I have to be satisfied for enjoy it the Backtrack with that problem for a while, and i think this Distro too complicated for new users like me,Maybe I'll try another image like ubuntu or debian..
[Android Q&A, Help & Troubleshooting] enedil:
Actually, I managed Arch to work. I mounted /proc directory from Android device (with bind option):

# mount -o bind /proc /data/local/mnt/proc

I'll check if error still exists in newer versions of initial script.
[Android Q&A, Help & Troubleshooting] robherc:
If you are still having trouble with the /external_sd folder in backtrack after updating those scripts and forcing them to re-run their initial setup, then could you please tell me any errors that the scripts gave you when running them for the first time after that? Even if you decide to go with an ubuntu image instead, for an easier setup, this might still help me fix the problem better for others.

Thank You

---------- Post added at 10:04 PM ---------- Previous post was at 10:01 PM ----------

That's one of the workarounds I was considering. Let me know if it causes you andy errors, and I'll start testing it to see if I can catch any errors from that method, so it can maybe be included in a newer revision of the bootscript.sh script.
[Android Q&A, Help & Troubleshooting] :
Device: Nexus 7 2013

ROM: CM11 Nightly

Kernel: Glitch

Linux distro: 13.10 Ubuntu ext 4

Question: how can I install chrome stable? Needs armhf support? Tried to force architecture, no luck....

Can't add Google ppa because of no gpg key? I wanna run chrome stable on my n7 to cast to my chromecast...
[Android Q&A, Help & Troubleshooting] robherc:
Are you trying to install ChromeOS or Chrome web browser? I don't know of anyone who has reported success running chrome browser on linux in their androids yet, chromium, however, might be worth a try, though I'm not sure about its support for sending to chromecast.

On and aside, I see that you're running Ubuntu 13.10 on a CM11 ROM; did you have any trouble with the CLI app failing to execute bootscript.sh in the Terminal Emulator window, as several other users have reported that error when using CM11 ROMs?
[Android Q&A, Help & Troubleshooting] enedil:
If I am right, Google does't build Chrome for Linux ARM. http://raspberrypi.stackexchange.com/questions/374/how-do-i-install-google-chrome Here's a question on Raspberry Pi Stack Exchange site.
[Android Q&A, Help & Troubleshooting] enedil:
On chromium, install that extension to use chromecast. As I said, chromium will work on Arm.

https://chrome.google.com/webstore/detail/google-cast/boadgeojelhgndaghljhdicfkmllpafd

---------- Post added at 10:59 AM ---------- Previous post was at 10:52 AM ----------

And another bug. Can't unmount /dev fs. Rom: CM10.1.3, standard kernel, tablet: Samsung GT-P5100. GNU/Linux OS: Ubuntu 13.10.

root@localhost:/# exit
exit
Killing Xtightvnc process ID 22730
* Stopping OpenBSD Secure Shell server sshd [ OK ] Shutting down Linux ARM
umount: can't umount /data/local/mnt/dev: Invalid argument
1|u0_a42@android:/storage/emulated/0/Download/images #
[Android Q&A, Help & Troubleshooting] robherc:
If you haven't upgrade to the v9.0 bootscript.sh file, then you're receiving that error because the previous version attempts to umount /dev without ever having mounted it. ;)

In bootscript.sh v9.0 /dev is properly mounted to the chroot environment, and properly umounted, on all devices tested so far.
[Android Q&A, Help & Troubleshooting] enedil:
I cannot update scripts :/
[Android Q&A, Help & Troubleshooting] enedil:
Now it works. Thanks. And it seems that Archlinux's working too!