Related
No need for scripts. Search for GL to SD app, much easier.
------
I'm not a heavy gamer, but usually have tons of games installed on my phone for my kid to play with (trying to resist to the "daddy, I wanna a PSP" while I can, at least with the phone I can control when he plays ).
With the advent of HD games, it become more and more difficult to manage multiple game installations on sdcard. The last drop was Asphalt6, with its +500M of downloaded files.... soon will have to use external hard disks to use games on our phones . Most of the "heavy" games are from Gameloft, and the problem lies on the installation pack that doesn't ask for a location to install additional files, always assuming sdcard.
Looked around, and the only workaround I've found was a crack that opens the game apk and changes the download destination directory. Well, I wasn't very comfortable in using this, and it only worked on some games.
So I configured the following "dirty" workaround, I know it's not perfect, but it resolved my problem so I decided to share here.
Basically I've moved gameloft directory from sdcard to external_sd and created a bind mount point called gameloft on sdcard pointing to external_sd. This has the problem that you can only mount that bind point before using the gameloft games, because if you keep it mounted and use storage usb you'll have problems mounting sdcard.
So I've created two scripts - one to mount it, another to unmount it -, and using script manager created a shortcut (actually is a script manager widget) to both scripts on my screen. Whenever I want to use/install gameloft games I mount it, and in the end dismount the bind.
Additional steps for gamming, but restored my sdcard space and now I can use my 16G external sd for that files. Note that if your external card is slow, the game load will be slower.
EDIT: This procedure needs root and busybox. Sorry forgot to mention earlier, I never had my phone not rooted
So, the how-to for anyone who wants to try:
1 - copy /sdcard/gameloft to /sdcard/external_sd/gameloft (if you don't have any GL games installed just create the folder /sdcard/external_sd/gameloft)
2 - remove /sdcard/gameloft/ contents
3 - create the following scripts on sdcard:
mount_gl.sh
Code:
#!/system/bin/sh
# mounts bind point
if [ -e /sdcard/gameloft ];
then
if [ -e /sdcard/external_sd/gameloft ];
then
busybox mount -o bind /sdcard/external_sd/gameloft/ /sdcard/gameloft
else
echo "no gameloft dir on external_sd"
fi;
else
echo "no gameloft dir on sdcard"
fi;
umount_gl.sh
Code:
#!/system/bin/sh
# UNmounts bind point
if [ -e /sdcard/gameloft ];
then
busybox umount -l /sdcard/gameloft
else
echo "no gameloft dir on sdcard"
fi;
Run first to mount, and check /sdcard/gameloft/ contents. If everything ok, start game and try.
Remember that to simplify you can create shortcuts of the scripts using script manager.
Try not to leave the bind mounted. If by any chance you forget to unmount the bind and use usb storage, you wont be able to mount sdcard, but there's no need to stress . Just unmount usb storage, open adb shell (or a terminal on phone) and issue the command:
# umount /sdcard/gameloft
after that mount usb storage, unmount it again, and everything will be back to normal.
If you at some point regret the change, just move the content of /sdcard/external_sd/gameloft to /sdcard/gameloft/.
The usual disclaimer: I provide this to share my findings, use it at your own risk. AFAIK there's no risk on this operation, besides the fact you could have to download files again if something goes wrong, but I didn't test this on any other phones besides mine.
EDIT 08/19: updated scripts with feedback from thread - added busybox to mount/umount and added -l switch to umount.
Cheers
nice idea.
Can I do this method with symbolic link too?
No. Symlinks are not supported by fat filesystem, the only way I've found was trough bind mount point.
Sent from my GT-I9000 using XDA App
I tried this method and didn't worked for me =(.
When i execute the script in script manager show me this error:
exec sh '/mnt/sdcard/mount_gl.sh'
$ exec sh '/mnt/sdcard/mount_gl.sh'
: not found
/mnt/sdcard/mount_gl.sh: 11: Syntax error: "fi"
unexpected (expecting "then")
tanke234 said:
I tried this method and didn't worked for me =(.
When i execute the script in script manager show me this error:
exec sh '/mnt/sdcard/mount_gl.sh'
$ exec sh '/mnt/sdcard/mount_gl.sh'
: not found
/mnt/sdcard/mount_gl.sh: 11: Syntax error: "fi"
unexpected (expecting "then")
Click to expand...
Click to collapse
It looks like you don't have busybox installed. Do you have it?
My bad, didn't mention it on OP, sorry.
Try to open a terminal emulator on phone and execute:
$ sh /mnt/sdcard/mount_gl.sh
just to make sure its not script manager related.
Sent from my GT-I9000 using XDA App
u can use busybox umount -l /sdcard/gameloft in case umount doesn't work. when sdcard being used by some background program, normal umount not working. Tested with O2X though
I use JVR with latest semaphore kernel and i guess that this kernel has busybox v1.16.2. Am i wrong?
lunasea said:
Try to open a terminal emulator on phone and execute:
$ sh /mnt/sdcard/mount_gl.sh
just to make sure its not script manager related.
Click to expand...
Click to collapse
I tried that on terminal emulator and i get the same error ;S
tanke234 said:
I use JVR with latest semaphore kernel and i guess that this kernel has busybox v1.16.2. Am i wrong?
I tried that on terminal emulator and i get the same error ;S
Click to expand...
Click to collapse
The code is wrong in the mount script, there's duplication
it should be:
Code:
#!/system/bin/sh
# mounts bind point
if [ -e /sdcard/gameloft ];
then
mount -o bind /sdcard/external_sd/gameloft/ /sdcard/gameloft
else
echo "no gameloft dir on external_sd"
fi;
and make sure you leave the /sdcard/gameloft folder where it is (even though it'll be empty)
shinigamis said:
u can use busybox umount -l /sdcard/gameloft in case umount doesn't work. when sdcard being used by some background program, normal umount not working. Tested with O2X though
Click to expand...
Click to collapse
can confirm this works, OP's unmount brings up 'files in use' or similar error sometimes..
on a side note, didn't know android was so picky when it comes to case.. if "Busybox" is used then you get a busybox: not found error, has to be lowercase
anyway, for the sake of clarity for other users:
Code:
busybox umount -l /sdcard/gameloft
viva.fidel said:
The code is wrong in the mount script, there's duplication
it should be:
Code:
#!/system/bin/sh
# mounts bind point
if [ -e /sdcard/gameloft ];
then
mount -o bind /sdcard/external_sd/gameloft/ /sdcard/gameloft
else
echo "no gameloft dir on external_sd"
fi;
and make sure you leave the /sdcard/gameloft folder where it is (even though it'll be empty)
Click to expand...
Click to collapse
I'm testing different locations, so no duplication. But be free to optimize the scripts, my programing is quite rusty this days.
Android is linux based, thus sensitive to capitalised words. About mount needing busybox, already happened to me on some rom/kernel combination. Using surface + talon and don't need to add busybox before the commands thought.
Sorry about the problems, like I said only tested on my sgs.
Cheers
Sent from my GT-I9000 using XDA App
Already tested this "script method" and working flawlessly.
Just a note: Hero of Sparta bounced to homescreen when loading main menu (after the opening video). But I can assure you this is not the fault of the script because HoS also not working when using patching method.
XA-R01 said:
Already tested this "script method" and working flawlessly.
Just a note: Hero of Sparta bounced to homescreen when loading main menu (after the opening video). But I can assure you this is not the fault of the script because HoS also not working when using patching method.
Click to expand...
Click to collapse
Dont have HoS, so thanks for the feedback. Maybe gameloft is making some control over the installed files because of illegal copy. Wish they put the same effort on resolving the installation issue, dont know why its so hard to ask the location instead of assuming a location for the download files.
Sent from my GT-I9000 using XDA App
I thought symlinks could do the trick as well (you wouldn't need scripts), but using mount points is a smart way as well! Thanks for sharing!
Will this work on SG2?
justmiike said:
Will this work on SG2?
Click to expand...
Click to collapse
Don't know mate, the scripts are pretty generic thought, as long there's a sdcard and an external_sd dir.
Taptalked... holding it the right way.
good guide!will try it later...coz im a heavy gamer ..cant resist any RPG game..and it really eat so much space in my int SD, here a "thanks" for u
sgsmaniac said:
good guide!will try it later...coz im a heavy gamer ..cant resist any RPG game..and it really eat so much space in my int SD, here a "thanks" for u
Click to expand...
Click to collapse
Thanks... happy gaming
Taptalked... holding it the right way.
justmiike said:
Will this work on SG2?
Click to expand...
Click to collapse
Yes..
The script is generic, you can make it work on another Android Phone with internal SD such as LG, Atrix, etc.
I'm using this patch (Auto_Patch_APK_for_Samsung_by_Duero__include_Java_.exe) in order to place the game data into external memory. Most of Gameloft games work using this method except games which download from market. Just patch the apk file and after install them your game data will stored in folder Gl at your external memory.
So far only this games which not able to patch into external SD
-assassin creed
-hero of sparta
-hawk
Is it possible to mount and unmount usb storage via script?
What I'd like to achieve is the following:
usb storage mount script:
1. unbind directories
2. mount as usb storage
usb storage unmount script:
1. unmount usb storage
2. 10 sec pause
3. bind directories
This way, instead of running the script when playing games (or in my case, using music streaming app such as MOG and Grooveshark), I can run the scripts when I want to mount/unmount as usb storage. After all, I'd be using music apps more than I would use usb storage.
Hi guys,
I'm really new here, I can't post in this thread: http://forum.xda-developers.com/showthread.php?t=836022
I created a working ubuntu11.04 .img, with unity-2d. I don't know if anybody cares, it was funny to make.
It is just a minimal install with unity-2d and tightvncserver. Really minimal. Firefox, office applications, anything else DOES NOT installed.
However, you can install anything using apt-get install.
I installed wget and nano, because it was needed to configure the vnc. I plan to make a bigger one with all the programs and stuff installed. Maybe tomorrow. Or next week.
How to use: Unzip, rename to ubuntu.img and simply replace the original ubuntu.img with this one. Use root as user/nickname and ubuntu as password, as usual.
Download link to .img:
Download link to the other files needed:
Links tomorrow. "New" .img too.
If you are a mod and you're reading this, please move this post it the thread I linked in the beginning, or anywhere where this post is in its place.
-Sorry for my english.
Please help! Give me additional space by using my referral: http://db.tt/W0knUea
edit1: So, now I've got 10 comments, I don't have to write everything in separate comments. What I've done yet: make some simple script to automatically turn on/off the vncserver (1024x600, tab native res, I found it enough), and get tired of the resource hungriness of unity-2d. I mean it needs about the same CPU power (I guess) as the galaxy tab has, and it needs about 200MB RAM. But this is to run native. The VNC version is far from native, so it's slow as f..., I mean, very slow. Then I looked for a little less resource-hungry desktop environment, and I found lxde. I made an image with that. It's slow too, but much faster than unity-2d. I need to configure it a little more, to be more touch-friendly. And I want to do a few other thing, and write a how to make your own .img file thing. If you want to do it now, here some links, I will write about it sometimes.
http://androlinux.com/android-ubuntu-development/how-to-install-ubuntu-on-android/
https://wiki.ubuntu.com/ARM/RootfsFromScratch
http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
http://galaxytabhacks.com/galaxy-ta...tall-ubuntu-linux-on-galaxy-tab-10-1-tabuntu/
http://androlinux.com/android-ubuntu-development/how-to-build-chroot-arm-ubuntu-images-for-android/
I also suggest reading mount, umount and rootstock man pages.
This image works quite well. As with every VNC build, its a bit slow and Unity doesn't help that (even in its nice Unity-2d form), but if you want Ubuntu on your Tab this is a pretty sweet image. Ultra-lightweight, too. Nice work, OP!
Firstly, thankyou for not making 10 spam posts just to get this posted in the Development section, shouldnt take you long to get 10 posts under your belt in this thread then I'll move it into the dev section for you
Good job by the way..
how to run this?
http://forum.xda-developers.com/showthread.php?t=836022
It's writen down here.
The link to the files is in the first post.
Do I write 'bootubuntu' in command line instead of 'bootlinux' or do I have to change the filename of 'bootubuntu' file? I guess first of the two is correct, but it's better to ask than to brick
Oh and is the AndroidSDK really needed? I don't see anything about usage of it in instruction....
maslak666 said:
Do I write 'bootubuntu' in command line instead of 'bootlinux' or do I have to change the filename of 'bootubuntu' file? I guess first of the two is correct, but it's better to ask than to brick
Oh and is the AndroidSDK really needed? I don't see anything about usage of it in instruction....
Click to expand...
Click to collapse
Hi!
The SDK is not strictly necessary since you could use a Terminal Emulator to run the necessary commands but using an ADB shell is just bit easier sometimes. That being said, you should install the SDK if you ever want to do much with an Android. It's easy to install and very powerful.
And yes, write bootubuntu instead of bootlinux when prompted. I know what you mean
Allright, I went through it and now got it installed . But I can't see firefox nor any office application... How to access them? Also can't get into terminal to write 'apt-install' there.....
maslak666 said:
But I can't see firefox nor any office application... How to access them?
Click to expand...
Click to collapse
sisa7 said:
Really minimal. Firefox, office applications, anything else DOES NOT installed.
However, you can install anything using apt-get install.
Click to expand...
Click to collapse
I'll write a howto tonight or next day or I don't know. I need to study to university too. You need adb or android terminal emulator (from the market) to use apt. Short version: when your prompt is "[email protected]:/#" simply do this command: "apt-get install firefox"
Just poked around a little. Now I know (or at least I think I now) what else I have to do.
http://dl.dropbox.com/u/41806444/bootubuntu2
Cleaned up version of bootubuntu. Copy it to /sdcard/ubuntu and simply run it. You need to use the sh command, so type "sh bootubuntu2" in android terminal emulator or adb shell in /sdcard/ubuntu foler.
Oh, sorry I forgot to mention, this script only works with overcome kernel and rom. You shold modify the
mount -o remount,rw -t ext4 /dev/block/stl9 /system
and the
mount -o remount,ro -t ext4 /dev/block/stl9 /system
rows. Enter "mount" to android terminal to see your /system dir type and path.
Synaptic looks like to work, software-center doesn't even start.
To really enjoy full linux distros like this, one should have a swap-enabled kernel. Instead, kernel on the Tab has no swap, and if you dare open some large app, the lack of ram makes it slow and unresponsive.
This is the main problem imho.
Ernesto de Bernardis
N900 - Galaxy Tab 7"
sisa7 said:
Oh, sorry I forgot to mention, this script only works with overcome kernel and rom. You shold modify the
mount -o remount,rw -t ext4 /dev/block/stl9 /system
and the
mount -o remount,ro -t ext4 /dev/block/stl9 /system
rows. Enter "mount" to android terminal to see your /system dir type and path.
Click to expand...
Click to collapse
Or keep it simple silly
mount -o remount,rw /dev/block/stl9 /system
mount -o remount,ro /dev/block/stl9 /system
cdesai said:
Or keep it simple silly
mount -o remount,rw /dev/block/stl9 /system
mount -o remount,ro /dev/block/stl9 /system
Click to expand...
Click to collapse
The /dev/block/stl9 part is changing too.
debernardis said:
one should have a swap-enabled kernel. Instead, kernel on the Tab has no swap
Click to expand...
Click to collapse
Thanks. I didn't know this is the problem. I will try out http://forum.xda-developers.com/showthread.php?t=483110 this and see what happens.
@sisa7 do you have any update?
debernardis said:
@sisa7 do you have any update?
Click to expand...
Click to collapse
Yep.
This email is an automated notification from Dropbox that your Public links have been temporarily suspended for generating excessive traffic. Your Dropbox will continue to function normally with the exception of Public links.
This suspension is temporary (3 days for the first time).
Sorry guys. Anybody know a decent upload site?
Also, I'm working on LXDE desktop. But the university makes me busy, so I haven't got too much time. Sorry.
Minus.com
Box.net
Multiupload.com
Is this still alive?
I tried installing the one in the other [MOD] Forum but when I try to install apps to Ubuntu I get a conection "404" error
Do you guys think this image will work?
The actual creation of an arm linux chroot image is probably out here on teh internetz somewhere, but I can assist with my mounting shell script (which works).
My image is of a debian arm chroot, and the image filesystem is ext2 (a good idea for fewer writes. ie innately non-journaling), has been used extensively on fw DE .17 and I'm currently trying it out on WW .29 (thank you, miloj).
I would upload my debian img somewhere, but I've actually broken it somewhat (it works for my needs, but it's nonetheless a bit too hacked up to be reliable).
I've modified it somewhat for generalization, some of it is probably wrong and/or redundant, and it IS hackish and ugly, but it works for me (tm).
* the chroot image only need a root account (and probably bash installed, but it usually is)
* You need busybox installed.
* You need to upload your chroot image named linux.img to the internal sdcard in a folder named linux
A shell script to set things up is attached.
What you need to do:
push the install script and run it:
Code:
adb push installlinuxstuff.sh /data/local/
adb shell sh /data/local/installlinuxstuff.sh
Now you can (from adb shell or terminal emulator on device):
Code:
su -
/data/local/mnt/linux.sh
/data/local/mnt/notlinux.sh
Feel free to remove the install script at
/data/local/installlinuxstuff.sh
when you've got it up and running.
Alternative way to run the scripts from adb shell:
Code:
adb shell su -c /data/local/mnt/linux.sh
adb shell su -c /data/local/mnt/notlinux.sh
I usually symlink start and stop (in my case deb and undeb) shell scripts placed in /data/local/mnt in /system/bin (ie shell scripts with 'su -c /data/local/mnt/whatever.sh' in them) for easy start an stop from terminal emulator, and if you've gotten this far you may welcome the small advice. (in other words - don't do this unless you _really_ know what you're doing)
Debian ARMHF or ARMEL?
If you would uploaded it (good place is google drive , sharing as public, as there are no ads or bull**** and the download is extremely fast) I would love to try your image - after modifying your script so it can work on a UHS-1 class MicroSD I want to try running this off of (should give it a little more speed).
zamaditix said:
Debian ARMHF or ARMEL?
If you would uploaded it (good place is google drive , sharing as public, as there are no ads or bull**** and the download is extremely fast) I would love to try your image - after modifying your script so it can work on a UHS-1 class MicroSD I want to try running this off of (should give it a little more speed).
Click to expand...
Click to collapse
Armel (I use the same chroot installation on my phone in a smaller image file (with less stuff installed)). I've got loads of personal stuff all over it and besides - it's somewhat broken. I really don't want to try to fix it.
So I'm working on retracing my steps, creating a clean armhf ext2 image (debian wheezy base installation for now) and redo the mount script, but I can't make any promises on a release date.
Anyhu - there are loads of images (armel, at least) on teh internetz (BT5 and too many ubuntu, for instance).
Just check so our kernel can mount the filesystem.
Edit: if not you can just create a new image file with a filsystem that's mountable and copy the chroot files to it.
So the ideal image for this tablet is armhf? If I wanted to create a Gentoo image, I would go with armv7? I'm just not sure exactly which ARM architecture this tablet is.
EndlessDissent said:
So the ideal image for this tablet is armhf? If I wanted to create a Gentoo image, I would go with armv7? I'm just not sure exactly which ARM architecture this tablet is.
Click to expand...
Click to collapse
The CPU is the Tegra 3 if you want to google it and it is an ARMv7 w/ NEON extensions chip. ARMv7 specification requires hardware fp so naturally it is ARMhf.
Nice to hear, keep us updated on your progress. I'm currently running an armel copy of Ubuntu 12.04 but it has problems with some packages and others are armhf only.
When I run linux.sh, I get an error that /sdcard can't be mounted because it doesn't exist.
Code:
mount: mounting /sdcard on /data/local/mnt/linux/sdcard failed: No such file or directory
I also tried changing the script to mount /mnt/sdcard, but that didn't work either.
EndlessDissent said:
When I run linux.sh, I get an error that /sdcard can't be mounted because it doesn't exist.
Code:
mount: mounting /sdcard on /data/local/mnt/linux/sdcard failed: No such file or directory
I also tried changing the script to mount /mnt/sdcard, but that didn't work either.
Click to expand...
Click to collapse
Yes, it is somewhat hackish, like I wrote. My image has got an sdcard folder (/sdcard) inside of it where I mount /sdcard from android. (Ie chroot and mkdir /sdcard)
followed this:
http://androlinux.com/android-ubuntu-development/how-to-install-ubuntu-on-rooted-transformer-prime/
make sure you have busybox installed der. Or at least the cp command in /system/bin
works well on my TF300T, Yea its not native but im currently configuring it for kernel building ;-D
FlyingPoo said:
followed this:
http://androlinux.com/android-ubuntu-development/how-to-install-ubuntu-on-rooted-transformer-prime/
make sure you have busybox installed der. Or at least the cp command in /system/bin
works well on my TF300T, Yea its not native but im currently configuring it for kernel building ;-D
Click to expand...
Click to collapse
Why does the mount script remount a non-existing block device with an ancient (according to android) filesystem?
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
Edit: I read all the scripts, and they all mount that crap. It's not made for transformers, and on the android device it's made for it leaves /system mounted rw after you've run it, and WHEN run (installed) it modifies too much in /system/bin
Code:
# At first it copies loads of crap to /system/bin, and then:
cd /system/bin/
chmod 4777 *
It's not even "hackish" - it's just... wrong...
Will loop1 work every mount?
Code:
mknod /dev/loop1 b 7 0
losetup /dev/block/loop1
I'm almost only asking, since this thread was supposed to be about scripts?
gasingvar said:
Yes, it is somewhat hackish, like I wrote. My image has got an sdcard folder (/sdcard) inside of it where I mount /sdcard from android. (Ie chroot and mkdir /sdcard)
Click to expand...
Click to collapse
Thanks. I created /sdcard, and it works almost perfectly now. However, mounting devpts at /dev/pts doesn't seem to work. I replaced that line with
Code:
mount --bind /dev $mnt/dev
and it seems to work fine. Is there anything wrong with my method?
/dev/void said:
Why does the mount script remount a non-existing block device with an ancient (according to android) filesystem?
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
Edit: I read all the scripts, and they all mount that crap. It's not made for transformers, and on the android device it's made for it leaves /system mounted rw after you've run it, and WHEN run (installed) it modifies too much in /system/bin
Code:
# At first it copies loads of crap to /system/bin, and then:
cd /system/bin/
chmod 4777 *
It's not even "hackish" - it's just... wrong...
Will loop1 work every mount?
Code:
mknod /dev/loop1 b 7 0
losetup /dev/block/loop1
I'm almost only asking, since this thread was supposed to be about scripts?
Click to expand...
Click to collapse
I'm assuming you're talking about the link in the post you quoted, even though you seem to be referencing the OP's use of the word "hackish". The script in the OP doesn't do any of that stuff. It just creates a few directories in /data/local/mnt/ and writes the mount/unmount scripts, which themselves only un/mount appropriate directories for the tablet. As for your question, I'm not nearly experienced enough to answer it. Sorry.
EndlessDissent said:
Thanks. I created /sdcard, and it works almost perfectly now. However, mounting devpts at /dev/pts doesn't seem to work. I replaced that line with
Code:
mount --bind /dev $mnt/dev
and it seems to work fine. Is there anything wrong with my method?
Click to expand...
Click to collapse
AFAIK your mount seems to be more complete, ie more android hardware goodies accessable from the chroot environment. However - that means more things possibly going wrong (like writing to a device who's critical to the android environment).
Personally I'd try to find what "hardware goodies" and whatnot I'd need to get the chroot environment working optimally, and not mount ALL of /dev.
EndlessDissent said:
I'm assuming you're talking about the link in the post you quoted, even though you seem to be referencing the OP's use of the word "hackish". The script in the OP doesn't do any of that stuff. It just creates a few directories in /data/local/mnt/ and writes the mount/unmount scripts, which themselves only un/mount appropriate directories for the tablet. As for your question, I'm not nearly experienced enough to answer it. Sorry.
Click to expand...
Click to collapse
Yes, and the OP is very honest about his script(s) being "hackish", which I interpret to mean 'not optimal, possibly redundant but working', all of which it is (and I applaud the early release, since for instance I could get things rolling), but the ubuntu image installation and mounting scripts from the other poster ( whom I was addressing ) are plain faulty.
I am looking for a armhf build of ubuntu or debian that I can chroot (newer the better), if anyone knows of such a build that would be fantastic but if not does anyone know of an easy to follow guide to compile such a thing?
I found two pretty good guides. I mostly followed THIS ONE, but I found that it doesn't mount enough before "first boot", so what I did was follow the guide until the point where you move the image to the tablet. Then I ran the OP's installlinux.sh script, and then the mount script. However, the mount/unmount scripts need to be edited before using them. Comment out the sdcard line and probably the devpts line (mounting devpts didn't work; Bash complained that devpts didn't exist; I had to replace it with the line I mentioned a few posts above, but as /dev/void says, it could be problematic, so be careful). Mount the image, make the /sdcard directory, exit, unmount, and edit the scripts again to mount/unmount /sdcard.
Next time you enter the chroot, feel free to run the
Code:
sh /debootstrap/debootstrap --second-stage
command to build the image, and follow the linked guide until the next time it tells you to exit the session (NOTE: The second echo "whatever" > sources.list command is wrong; it should be echo "whatever" >> sources.list; Also, remember to replace "squeeze" with the appropriate Debian version, in my case, "testing"). Instead of exiting right after the apt-get update, I'd recommend playing around with the chroot and configuring whatever apps you install. You can just use the OP's scripts now and ignore the script in the linked guide.
When the guide I linked above gets to this line:
Code:
sudo debootstrap --verbose --arch armel --foreign squeeze /mnt/squeeze/ http://ftp.debian.org/debian
just replace armel with armhf, and if you want a testing image, replace squeeze with testing.
Sorry I'm not attaching my image. I made it gigantic (5GB), so I don't really have anywhere to store it, and you probably wouldn't want to download a file that big. Plus, it already has Openbox and a bunch of other things you probably don't want installed. I'm assuming you'd want GNOME or KDE instead.
Hi folks!
I searched the forum, but couldn't find a proper solution yet.
Is it possible to create a shared ("public") folder, which is accessible for every user on the N7?
As the user accounts seem to be managed under /data/media/ID I already tried:
adb shell
su
mkdir /data/media/pub
chmod 777 /data/media/pub
chown media_rw.media_rw /data/media/pub
ln -s /data/media/pub /data/media/0/pub
So logically the symlink is correct, unfortunately the user doesn't have access to /data/media (which I suspected), so the symlink to /data/media/pub is inaccessible for user 0.
Also other locations doesn't seem to work. On / and /mnt I cannot create a folder, as this is read-only mounted by default, and I don't want to fiddle around with various "mount -o rw/ro" scripts on bootup etc.
Does anybody managed to create a shared folder for every user?
Thanks in advance!
ryazor said:
Hi folks!
I searched the forum, but couldn't find a proper solution yet.
Is it possible to create a shared ("public") folder, which is accessible for every user on the N7?
As the user accounts seem to be managed under /data/media/ID I already tried:
adb shell
su
mkdir /data/media/pub
chmod 777 /data/media/pub
chown media_rw.media_rw /data/media/pub
ln -s /data/media/pub /data/media/0/pub
So logically the symlink is correct, unfortunately the user doesn't have access to /data/media (which I suspected), so the symlink to /data/media/pub is inaccessible for user 0.
Also other locations doesn't seem to work. On / and /mnt I cannot create a folder, as this is read-only mounted by default, and I don't want to fiddle around with various "mount -o rw/ro" scripts on bootup etc.
Does anybody managed to create a shared folder for every user?
Thanks in advance!
Click to expand...
Click to collapse
I'm having the same problem. I have a owner account in which I put some files (4 Gb) that should be available to every user. But user 10 and 11 can't access these files. Where Can I put those files, so that every account can easily access them?
I figured out that each user has a directory under /mnt/shell/emulated (0, 10, 11, etc.). So I created a directory "public" via root under /mnt/shell/emulated/public and made it worldwide writable via chmod -R 777 /mnt/shell/emulated/public. Afterwards I created public folders in each user directories.
It works like a charm when mounting via:
Code:
mount -o bind,allow_other /mnt/shell/emulated/public/ /mnt/shell/emulated/0/public/
I tried to build a simple script and it works when executing it in root shell via ADB. Unfortunately I didn't manage to automate this on boot. I couldn't find any "init.d" directory and also via "Script Manager - SManager" it wasn't working.
Code:
#!/system/bin/sh
PUBLIC_DIR=public
if [ -d /mnt/shell/emulated/$PUBLIC_DIR ]; then
for USER_PATH in /mnt/shell/emulated/*; do
if [ -d $USER_PATH/$PUBLIC_DIR ]; then
busybox mount -o bind,allow_other /mnt/shell/emulated/$PUBLIC_DIR $USER_PATH/$PUBLIC_DIR
fi
done
fi
Any ideas?
It's a start. It would be nice to incorporate it in an app.
It would be even better if it is a standard option in Android 4.2
Sent from my HTC Wildfire S A510e using xda app-developers app
adonet said:
It's a start. It would be nice to incorporate it in an app.
It would be even better if it is a standard option in Android 4.2
Click to expand...
Click to collapse
I agree. At the moment, it seems to be possible only with a lot of fiddle and root including busybox. I don't know, if Google ever will implement such a feature, since it kind of breaks the separation idea of multi user spaces.
I hope, I'm able to figure out, how to get the script working. Everything works except the mount line which requires root privileges. Furthermore the script works correctly when executed from root shell via ADB.
Regards!
Did the updated super SU change anything?
Sent from my HTC Wildfire S A510e using xda app-developers app
I found an easy to implement solution to make a shared directory on the Nexus 7
I used ES file-explorer and set the setting so that it had all the read and write permissions and can go upwards to /
Then I make a new directory in /storage/emulated and give it some name. E.g. /storage/emulated/allusers
Then select the properties of this directory and change it so that everyone has all available permissions.
Now copy the files you want to share in this directory and change the permissions of these files as well.
Now you van change to another account and still read and write these files.
It's a bit of a hassle but it works
★******************
Well I Was too quick. The directory I created suddenly disappeared. I can't find the contents anymore. Where o where would these files go?
Jeroen
Sent from my Nexus 7 using xda app-developers app
Has anyone tried “mkdir /data/media/legacy/pub" instead of “mkdir /data/media/pub"?
I noticed that every user has full access to this legacy folder... In fact, I kinda use this folder to move files between different users!
Well, yes it works. Need to be root though. But it works. Thanks a lot.
I found a solution.
Use the android/obb folder since it is shared space. I added a Movies folder there can can access it from multiple accounts. For MX player to see the movie files I had to uncheck the recognize no media option under settings but it works.
Thank you, I'll try this option too, Better than the solution mentioned above that needs root.
BigJArm said:
I found a solution.
Use the android/obb folder since it is shared space. I added a Movies folder there can can access it from multiple accounts. For MX player to see the movie files I had to uncheck the recognize no media option under settings but it works.
Click to expand...
Click to collapse
I too created a folder in obb but i am not able to access it any reasons??
BigJArm said:
I found a solution.
Use the android/obb folder since it is shared space. I added a Movies folder there can can access it from multiple accounts. For MX player to see the movie files I had to uncheck the recognize no media option under settings but it works.
Click to expand...
Click to collapse
How about using a folder /data/local/tmp for a similar purposes?
Hi there,
few days ago I got a NVidia Shield (model 2017) and to use it as media player with Kodi (seems to work perfect), and also for a little bit of retrogaming.
Retro Gaming will be started from Kodi (with Advanced Emulator Launcher) and the games are stored on my NAS.
So at least I need a mount link from the "internal storage" to my NAS.
I tried several methods (cifsmanager, manual mount from console) but I got only read access to my NAS.
If I create a source inside of Kodi to my storage it is working (also with write access), but then I can't use retrogaming with external emulators.
So my idea is to automount a share (doesn't matter if CIFS or NFS) during boot sequence..
Does anyone has an idea how to do this?
My Shield is rooted, so in my mind the basics are there
Thanks for your help
OK, after some more searching I found a solution with cifs
Maybe someone needs it too
- Shield must be rooted
- Install patched cifsmanager -> Link
- Install busybox
On console try
mkdir /data/media/0/mounts
chown 777 /data/media/0/mounts
su --mount-master -c busybox mount -o username=xxx,password=xxx,rw,noperm,iocharset=utf8 -t cifs << CIFS share - example //192.168.99.6/public/shield >> /data/media/0/mounts
For automount at system boot "Rom Toolbox" is perfect, as you can define scripts, which will be executed at boot.
Shadow128 said:
OK, after some more searching I found a solution with cifs
Maybe someone needs it too
- Shield must be rooted
- Install patched cifsmanager -> Link
- Install busybox
On console try
mkdir /data/media/0/mounts
chown 777 /data/media/0/mounts
su --mount-master -c busybox mount -o username=xxx,password=xxx,rw,noperm,iocharset=utf8 -t cifs << CIFS share - example //192.168.99.6/public/shield >> /data/media/0/mounts
For automount at system boot "Rom Toolbox" is perfect, as you can define scripts, which will be executed at boot.
Click to expand...
Click to collapse
Hi, no idea if you're reading this after such a long time.
The patched cifs manager in the link says it needs supersu. My shield is rooted using magisk, with busybox as a magisk module. Do you think this can also work with magisk? I don't want to mess sth. up.
Second question is: Mounting smb shares this way, will they show up as "hdds" on the Shield? I mean can the mounts be used by all other apps?