Ouya SD Card Mount Enable [SD Card Read FIX] - Ouya General

Lets start by saying i did not have anything to do with the making of this I'm just re-posting for the people who had it tough like me.
What i did was use Ouya Tool Box to root, su, busy box etc.
Installed ES file explorer, ES Task Man
Edited /system/etc/vold.fstab
--------------------------------------------
alynnafoxie Posts: 2Member
June 27 edited June 27 in General Development
This should be able to be done on any Ouya since they are all rooted, but you have to have root access.
This fix will give you full access to your USB flash drive as a "sd card". It will even be listed in the 'storage settings' and will be visible from Windows under the "Ouya Console" drive that pops up when it is connected.
First you must mount /system read-write. You can either use adb shell, or sideload "Android Terminal emulator" if you have a keyboard:
adb shell
mount -o remount,rw /system
After this you need to edit the file /system/etc/vold.fstab. There will be two lines at the end:
Change this:
dev_mount sdcard /storage/sdcard1 auto /devices/platform/sdhci-tegra.0/mmc_host/mmc2
dev_mount usbdrive /mnt/usbdrive auto /devices/platform/tegra-ehci.2/usb2
to this:
#dev_mount sdcard /storage/sdcard1 auto /devices/platform/sdhci-tegra.0/mmc_host/mmc2
dev_mount usbdrive /storage/sdcard1 auto /devices/platform/tegra-ehci.2/usb2
How does this work? Well, the first line, we comment out. It refers to a storage device on the tegra that is connected to nothing at all, basically the on chip SD/MMC that we have no slot to stick said MMC card to. The second line, we tell vold to detect the USB stick we boot with or insert, as a SD card. Really any storage device can be here (try it with a hard disk!) but in our case we want the first USB storage device to be here. In theory this hotplugs well, as I have tested removing it and reinserting it locally. It will look like an SD card to the Ouya. I am going to test moving an app to it and running it in a moment.
Really this file hack should not be necessary, the proper way to do this is editing init.rc and changing
export SECONDARY_STORAGE /storage/sdcard1
to
export SECONDARY_STORAGE /mnt/usbdrive
However /init.rc cannot be edited without modifying the bootloader, and since Ouya has no button to go into recovery yet, I am not willing to risk or even talk about editing /init.rc in your boot image.
Anyway, if anyone else wants to try this and confirm it works for them i'll watch this thread for a bit. Maybe the Ouya devs can incorporate it into a build, or just set SECONDARY_STORAGE in /init.rc right.
However the fix I just gave is easier because if you change SECONDARY_STORAGE you're gonna have to change every reference to /storage/sdcard1 down the line.
--Alynna
Post edited by alynnafoxie on June 27

good info thanks

Secondary storage
m03m1x said:
Lets start by saying i did not have anything to do with the making of this I'm just re-posting for the people who had it tough like me.
What i did was use Ouya Tool Box to root, su, busy box etc.
Installed ES file explorer, ES Task Man
Edited /system/etc/vold.fstab
--------------------------------------------
alynnafoxie Posts: 2Member
June 27 edited June 27 in General Development
This should be able to be done on any Ouya since they are all rooted, but you have to have root access.
This fix will give you full access to your USB flash drive as a "sd card". It will even be listed in the 'storage settings' and will be visible from Windows under the "Ouya Console" drive that pops up when it is connected.
First you must mount /system read-write. You can either use adb shell, or sideload "Android Terminal emulator" if you have a keyboard:
adb shell
mount -o remount,rw /system
After this you need to edit the file /system/etc/vold.fstab. There will be two lines at the end:
Change this:
dev_mount sdcard /storage/sdcard1 auto /devices/platform/sdhci-tegra.0/mmc_host/mmc2
dev_mount usbdrive /mnt/usbdrive auto /devices/platform/tegra-ehci.2/usb2
to this:
#dev_mount sdcard /storage/sdcard1 auto /devices/platform/sdhci-tegra.0/mmc_host/mmc2
dev_mount usbdrive /storage/sdcard1 auto /devices/platform/tegra-ehci.2/usb2
How does this work? Well, the first line, we comment out. It refers to a storage device on the tegra that is connected to nothing at all, basically the on chip SD/MMC that we have no slot to stick said MMC card to. The second line, we tell vold to detect the USB stick we boot with or insert, as a SD card. Really any storage device can be here (try it with a hard disk!) but in our case we want the first USB storage device to be here. In theory this hotplugs well, as I have tested removing it and reinserting it locally. It will look like an SD card to the Ouya. I am going to test moving an app to it and running it in a moment.
Really this file hack should not be necessary, the proper way to do this is editing init.rc and changing
export SECONDARY_STORAGE /storage/sdcard1
to
export SECONDARY_STORAGE /mnt/usbdrive
However /init.rc cannot be edited without modifying the bootloader, and since Ouya has no button to go into recovery yet, I am not willing to risk or even talk about editing /init.rc in your boot image.
Anyway, if anyone else wants to try this and confirm it works for them i'll watch this thread for a bit. Maybe the Ouya devs can incorporate it into a build, or just set SECONDARY_STORAGE in /init.rc right.
However the fix I just gave is easier because if you change SECONDARY_STORAGE you're gonna have to change every reference to /storage/sdcard1 down the line.
--Alynna
Post edited by alynnafoxie on June 27
Click to expand...
Click to collapse
FYI, they might have included it in an upgraded, since my usb cards gets mounted to: /mnt/usbdrive, but there also seams to be a symbolic link in the root folder, which is quite nice.

TobiasFP said:
FYI, they might have included it in an upgraded, since my usb cards gets mounted to: /mnt/usbdrive, but there also seams to be a symbolic link in the root folder, which is quite nice.
Click to expand...
Click to collapse
sadly I I did not like the way that was working. So I found this method. It shows you in the storage menu that you have something mounted (SD it says) It feels more natural and I don't know if its a placebo effect but things are faster and xfering faster

Help?
I feel like I'm doing everything right...
[email protected]~/android/platform-tools $ sudo adb devices
[sudo] password for joshua_munoz:
List of devices attached
015d4a8245200a00 device
[email protected]~/android/platform-tools $ adb shell
[email protected]:/$ su
[email protected]:/# mount -o rw,remount /system
[email protected]:/# exit
[email protected]:/$ exit
[email protected]~/android/platform-tools $ adb push vold.fstab /system/etc/vold.fstab
failed to copy 'vold.fstab' to '/system/etc/vold.fstab': Permission denied
[email protected]PadT420S~/android/platform-tools $ sudo adb push vold.fstab /system/etc/vold.fstab
failed to copy 'vold.fstab' to '/system/etc/vold.fstab': Permission denied
Can you discern what I might be doing wrong? I'm trying to push the edited vold.fstab file back into /system/etc (since that's where I adb pulled it from to edit it), but CANNOT get the dang thing to be rw for the life of me. As such, I haven't been able to see if this fix works, and my 32GB USB drive shows up as an empty, blank sdcard1 when I plug it in.

!!!! please don't use this method now. I tried it a few days ago and it did not work after a Ouya Update. sorry. i should have mentioned.
HashBrownJM said:
I feel like I'm doing everything right...
[email protected]~/android/platform-tools $ sudo adb devices
[sudo] password for joshua_munoz:
List of devices attached
015d4a8245200a00 device
[email protected]~/android/platform-tools $ adb shell
[email protected]:/$ su
[email protected]:/# mount -o rw,remount /system
[email protected]:/# exit
[email protected]:/$ exit
[email protected]~/android/platform-tools $ adb push vold.fstab /system/etc/vold.fstab
failed to copy 'vold.fstab' to '/system/etc/vold.fstab': Permission denied
[email protected]~/android/platform-tools $ sudo adb push vold.fstab /system/etc/vold.fstab
failed to copy 'vold.fstab' to '/system/etc/vold.fstab': Permission denied
Can you discern what I might be doing wrong? I'm trying to push the edited vold.fstab file back into /system/etc (since that's where I adb pulled it from to edit it), but CANNOT get the dang thing to be rw for the life of me. As such, I haven't been able to see if this fix works, and my 32GB USB drive shows up as an empty, blank sdcard1 when I plug it in.
Click to expand...
Click to collapse

Well, shoot. Then I guess I'm up a creek in terms of getting my USB drive to read?

HashBrownJM said:
Well, shoot. Then I guess I'm up a creek in terms of getting my USB drive to read?
Click to expand...
Click to collapse
no it should be auto mounting as /mnt/usbdrive
install ES file manager after your Root and get SuperUser.
i use the on ouya root.
http://forum.xda-developers.com/showthread.php?t=2387507

m03m1x said:
no it should be auto mounting as /mnt/usbdrive
install ES file manager after your Root and get SuperUser.
i use the on ouya root.
http://forum.xda-developers.com/showthread.php?t=2387507
Click to expand...
Click to collapse
ES definitely shows the USB drive as a USB drive, which as a result, has made ePSXe (installed from the Play Store) able to find my PSX ROMs. RetroArch still says sdcard0 and sdcard1, and on sdcard1 (the USB drive), it shows as empty.
What to do?

HashBrownJM said:
ES definitely shows the USB drive as a USB drive, which as a result, has made ePSXe (installed from the Play Store) able to find my PSX ROMs. RetroArch still says sdcard0 and sdcard1, and on sdcard1 (the USB drive), it shows as empty.
What to do?
Click to expand...
Click to collapse
i dont know what else to tell you homie. when my ouya turns on i look to see if the LED indicator is blinking "access" behaviour. If it doesn't it didn't read it. If you don't have a LED sorry. check /mnt/usbdrive thats what i use now. all my emus etc. can see it.

m03m1x said:
i dont know what else to tell you homie. when my ouya turns on i look to see if the LED indicator is blinking "access" behaviour. If it doesn't it didn't read it. If you don't have a LED sorry. check /mnt/usbdrive thats what i use now. all my emus etc. can see it.
Click to expand...
Click to collapse
It's definitely being read. Has a little blinking LED. If ES and ePSXe are reading it, I know it's working. Just gotta figure out why RetroArch won't read it, or find some other emulators that will.
What emulators are you using?

If you got the PSX emulator to read your Roms already then it sounds like it is the Retroarch messing up. I would recommend loading individual emulators anyways.

Related

New Hero will not take recovery image

I have been lurking on this site for sometime in anticipation of my new Sprint Hero.
I got mine the other day.
Of course I want to put a custom image on it.
So I start with this link to start the process and get a recovery image on it.
I am following The Rest that guys guide.
When I get to step 13
adb push recovery-RA-heroc-v1.5.2.img /sdcard
I get a permission denied error.
What are some ways around this or am I doing something incorrect?
I have searched the forums to no avail
Thanks in advance.
My Hero has this software versions:
Kernel 2.6.27-533ce29d
Build # 1.56.651.2 CL85027 release keys
Software version # 1.56.651.2
Hardware version # 0002
Did you "unmount the sdcard then enable your USB debugging"?
Unmount and enable USB Debugging from the applications menu.
And I think its "Theres That Guy"... Could be wrong.
Here are the contents of my command window.
I unmounted the sd card then I enabled the usb debugging.
I cannot even see the sd card in windows but the phone is seeing the correct capacity.
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\gpoulos>cd C:\android-sdk-windows\tools
C:\android-sdk-windows\tools>adb devices
adb server is out of date. killing...
* daemon started successfully *
List of devices attached
HT9CWHF05632 device
C:\android-sdk-windows\tools>adb push asroot2 /data/local/
706 KB/s (74512 bytes in 0.103s)
C:\android-sdk-windows\tools>adb shell
$ chmod 0755 /data/local/asroot2
chmod 0755 /data/local/asroot2
$ /data/local/asroot2 /system/bin/sh
/data/local/asroot2 /system/bin/sh
[+] Using newer pipe_inode_info layout
Opening: /proc/671/fd/3
SUCCESS: Enjoy the shell.
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
# cd /system/bin
cd /system/bin
# cat sh > su
cat sh > su
# chmod 4755 su
chmod 4755 su
# exit
exit
$ exit
exit
C:\android-sdk-windows\tools>adb push recovery-RA-heroc-v1.5.2.img /sdcard
failed to copy 'recovery-RA-heroc-v1.5.2.img' to '/sdcard/recovery-RA-heroc-v1.5
.2.img': Permission denied
C:\android-sdk-windows\tools>
Uh Oh, did Sprint patch our root???
Sucks if they did, it looks like everything is done right.
My other suggestion is to go down load the pre-kitchen from
Geekfor.me
Downloads are on the right.
Use Auto-rooter.
Troopermoonchild said:
I have been lurking on this site for sometime in anticipation of my new Sprint Hero.
I got mine the other day.
Of course I want to put a custom image on it.
So I start with this link to start the process and get a recovery image on it.
I am following The Rest that guys guide.
When I get to step 13
adb push recovery-RA-heroc-v1.5.2.img /sdcard
I get a permission denied error.
What are some ways around this or am I doing something incorrect?
I have searched the forums to no avail
Thanks in advance.
My Hero has this software versions:
Kernel 2.6.27-533ce29d
Build # 1.56.651.2 CL85027 release keys
Software version # 1.56.651.2
Hardware version # 0002
Click to expand...
Click to collapse
I have always had an issue doing it from adb shell, or flashrec, even though it would work perfect on the old ladys phone. If your phone is rooted, put recovery on root of sdcard, download command executer from market. Open it, check superuser, and type.
flash_image recovery /sdcard/recovery-RA-heroc-v1.5.2.img
I can't remember if recovery is needed or not after flash image. If it doesn't work, try the other way. Also make sure you spell the file name right. It should take about 30 seconds, then reboot into recovery. This way, can be done quickly, from your phone. Also, if anything in the command is entered improperly, it won't work.
Wait never mind, its not Root thats failing its the Recovery Image.
Do this:
Rename the recovery image file something easy like RA152.img
Copy it to your SD card from windows. Which means you have to slide down the notifications bar and mount it for Windows to see it.
Once you have it on the ROOT of the SD card, not in a folder.
Go into CMD and do this.
CD C:\AndroidSDK\Tools
adb shell
su
flash_image recovery /sdcard/RA152.img
Kcarpenter said:
Uh Oh, did Sprint patch our root???
Sucks if they did, it looks like everything is done right.
My other suggestion is to go down load the pre-kitchen from
Geekfor.me
Downloads are on the right.
Use Auto-rooter.
Click to expand...
Click to collapse
It looks like he has root already.
Troopermoonchild said:
I have been lurking on this site for sometime in anticipation of my new Sprint Hero.
I got mine the other day.
Of course I want to put a custom image on it.
So I start with this link to start the process and get a recovery image on it.
I am following The Rest that guys guide.
When I get to step 13
adb push recovery-RA-heroc-v1.5.2.img /sdcard
I get a permission denied error.
What are some ways around this or am I doing something incorrect?
I have searched the forums to no avail
Thanks in advance.
My Hero has this software versions:
Kernel 2.6.27-533ce29d
Build # 1.56.651.2 CL85027 release keys
Software version # 1.56.651.2
Hardware version # 0002
Click to expand...
Click to collapse
I just got mine yesterday same spec as your hero. Using flipz pre kitchen work just fine.
Wow you guys are awesome.
Where do I do for flipz pre kitchen?
Thanks again.
forum.xda-developers.com/showthread.php?t=606172
Just mount your SD card via USB to your computer and copy it over. Then unmount and flash it.
I tried the Fresh Kitchen
When I try to auto root it says cannot find asroot2 please redownload the kitchen. I did that same results.
When I try to push a recovery image ontot the SD card it says kitchen cannot find the filepush.bat please redownlaod the kitchen. Which I did.
So frustrating!!!!!!!!!!!!!!
Troopermoonchild said:
I tried the Fresh Kitchen
When I try to auto root it says cannot find asroot2 please redownload the kitchen. I did that same results.
When I try to push a recovery image ontot the SD card it says kitchen cannot find the filepush.bat please redownlaod the kitchen. Which I did.
So frustrating!!!!!!!!!!!!!!
Click to expand...
Click to collapse
Try this. Go to Setting -> SD Card & Phone Storage and see if you have an option to mount the SD card. If you do, try tapping the option to mount.
If you have 'Unmount SD card', try tapping that option, ejecting the SD card, reinsert it again, and (if needed) tap the 'Mount SD Card' option.
The only other option I can think of is to reformat the SD card in a card reader in Windows...could be a bad format.
Also i cannot see the SD card in Windows. I ahve tried it on a Windows 7 and a Windows XP machine.
I know the phone sees the card because its showing the correct size.
tkirton said:
Try this. Go to Setting -> SD Card & Phone Storage and see if you have an option to mount the SD card. If you do, try tapping the option to mount.
If you have 'Unmount SD card', try tapping that option, ejecting the SD card, reinsert it again, and (if needed) tap the 'Mount SD Card' option.
The only other option I can think of is to reformat the SD card in a card reader in Windows...could be a bad format.
Click to expand...
Click to collapse
I never get a mount option. No matter what I try.
After I unmount the sd card. I can then remove the card from the phone.
Then when I insert it. The phone recognizes it and automatically mounts the card.
Plug the phone into your computer. Drag down the notification bar. Mount it. Then copy using Windows Explorer.
jonnythan said:
Plug the phone into your computer. Drag down the notification bar. Mount it. Then copy using Windows Explorer.
Click to expand...
Click to collapse
Please describe better. I dont understand.
to move something to your SD card such as music or in this case the recovery image touch and hold at the very top of your screen and slide your finger down to the bottom. this should show a couple different options one will say USB connected. press that option and it will bring up a dialog box asking if you want to mount the card press mount. If you have windows then autoplay sould pop up on your comp and say open folder to view files choose that. you then drag and drop the recovery image to the SD card. once again go to notifications and choose the same option and unmount the card.
you then go to cmd and type this
Code:
cd/
cd /where_ever_you _have_SDK/tools/
adb shell
su
cd /sdcard/
flash_image recovery recovery-RA-heroc-v1.5.2.img
wait untill you see the '#' symbol and type
Code:
reboot recovery
that should do it

Symlinking SD card to internal storage

Hy
Is there a way to link our external SD to internal storage?
I've tried:
Code:
cd /mnt/sdcard
mkdir sdcardname
mount -o bind /mnt/external_sd /mnt/sdcard/sdcardname
The following command works but it gets lost after a reboot.
Symlinking with ln -s doesn't seem to work- It gives a "link failed Function not implemented" error. Busybox is installed.
symlinks (ln -s) doesn't work because /sdcard is fat32. It doesn't support symlink. You can indeed mount the external_sd underneat /sdcard, but as you say, it's lost after reboot. You have to do it everytime you boot.
The only other way is if it's supported with a custom rom.
Blast. Then I'll probably format my card to EXT and mount it like that,
I didn't know that I can't mount FAT.
EDIT: Success! It's possible using Tasker and Locale Execute Plug-in. Now the card gets mounted at boot and you can transfer files directly to it.
Ok here are the results after some testing:
+ SD card is now a part of internal memory so I can save an view files without messing arround
+ You can copy files directly to SD now without jumping through hoops
- You have to have a rooted tablet runing Tasker and Locale Execute Plug-in which is quite a lot for a simple fix
- PC doesn't see the files you copy to your SD through the tablet even though it sees the files that you've transfered through PC. Both are seen on the tablet though.
I can provide instructions if anyone is interested.
I'm interested.
Ok you have to install Tasker, Locale Execute Plug-in and root the device.
Then:
- Make a folder on your internal memory where the files will be located (SD in my case)
- Go into Tasker and click on New
- Click on Event/System and select Device Boot
- Click on New Task and press OK
- Click on the + button and select plugin (if you don't have any plugins listed you didn't install the execute plugin)
- Select Execute and click on Edit
- Type (without quotes) "! mount -o bind /mnt/external_sd /mnt/sdcard/SD" (replace the SD with your folder name)
- Click on the menu button and you'll see a bar which will be empty. Just click on the last button and you'll see that the command is saved.
- Now click on Done twice and you're set
Reboot the device and check if it works.
Thanks so much for this. Now I never have to remove my micro-sd card. This is huge!
hi... this is great..,
but 1 questions
1. does it effect when clockworkmod read the external sd ?
The script runs after you boot Android (when it comes to the lock screen) so no it shouldn't affect anything because the bind doesn't work after a reboot.
That's why I use Tasker to run the command. Tasker actually only enters the command for you (previously I had to type the command manually).
tried this and excellent,
but what about the battery ? is the tasker application eating battery much or not ?
whats youe experience?
I have it on my tablet and my phone and I never noticed a drop in battery consumption so I think that we're talking about minutes here at most.
PC actually sees a CramFS userspace partition, which is an image of /data/local/
bpivk said:
Ok here are the results after some testing:
+ SD card is now a part of internal memory so I can save an view files without messing arround
+ You can copy files directly to SD now without jumping through hoops
- You have to have a rooted tablet runing Tasker and Locale Execute Plug-in which is quite a lot for a simple fix
- PC doesn't see the files you copy to your SD through the tablet even though it sees the files that you've transfered through PC. Both are seen on the tablet though.
I can provide instructions if anyone is interested.
Click to expand...
Click to collapse
Whatever I try, i cant get it to work. If i enter the command in tasker:
! mount -o bind /mnt/external_sd /mnt/sdcard/SD
it shortens it to:
! mount -o bind /mnt/external_sd /mnt/sd
What should i do so tasker understands/saves/remembers the complete line?
Are you typing it in Tasker or Locale Execute Plug-in. Because you should use the latter.
CheopsChefren said:
Whatever I try, i cant get it to work. If i enter the command in tasker:
! mount -o bind /mnt/external_sd /mnt/sdcard/SD
it shortens it to:
! mount -o bind /mnt/external_sd /mnt/sd
What should i do so tasker understands/saves/remembers the complete line?
Click to expand...
Click to collapse
Me too So should I typing it in Tasker or Locale? I don't have Locale.
Sheesh guys. Just follow the post #6.
You need a rooted device and Locale Execute Plug-in. Locale Execute Plug-in is not Locale but a plugin and a free one as that.
Follow the instructions. They are clearley written and you should have no problems. Just don't skip steps.
You are the best Thanks for help. I forgot about su premission (What a shame).
My 3.1 is rooted, i have su access, and it even remembers it.
I type the command in the locale plug-in as per instructions on the first page.
But still it abbreviates the command.
And if i attach the Iconia to my pc, and open the Acer Iconia icon, its empty, which means, i think, it points to a non-existing directory?
Any help would be appreciated.
CheopsChefren said:
And if i attach the Iconia to my pc, and open the Acer Iconia icon, its empty, which means, i think, it points to a non-existing directory?
Click to expand...
Click to collapse
Off course it does. It just points to an empty map if the command isn't entered properly.
I don't know about abbreviating the command. It works fine on my Acer and on some others that reported good results.
Edit: But when you enter the command.... Do you see the abbreviated command in tasker or in plug-in if you return to it? Because Tasker won't show the full command only a few words but you should be able to see the whole command if you click on Edit and check it in the plug-in.
CheopsChefren said:
Any help would be appreciated.
Click to expand...
Click to collapse
You should click "allow" in Locale Execute Plug-in when superuser ask you about it and don't forget about spacebar between:
mount -o bind /mnt/external_sd(here spacebar)/mnt/sdcard/SD

[HOWTO] for Gamers: dirty workaround to have Gameloft files on external_sd

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.

[Q] How do I install parted command?

I'm trying to wipe and format a microSD card that I have plugged in via OTG and already have it wiped with this;
Code:
dd if=/dev/zero of=/dev/block/sda
Now I'm looking into how to recreate a MBR and partition table and it says to use the parted command, which I'm glad about as I'm familiar with the command from using Ubuntu but it's not installed and I can not find any instructions on how to get it. Can anyone explain how to install it? I know I could just plug the SD card into a computer and do it but I'm having fun doing all this on a tablet. Lol
Bump
Anyone?
I have got the same question, any other solutions?
This is the most complete information I have found yet, but it doesn't work. Either from me messing something up or it not being correct for the Nexus 7 being that it was made two years ago. http://www.droidforums.net/forum/htc-droid-eris/78650-internal-storage-partitions-screwed-up.html
I pushed all six files to /sbin/ with no errors and changed their permissions with no issues but I restart the tablet and none of the six files are in /sbin/
Just for the heck of it I extracted the six files to the SD card in the tablet, CD'd to it and used chmod 0755 on all six files then tried to run it and this is what I get.
Code:
[email protected]:/storage/emulated/legacy/folder # parted
sh: parted: not found
127|[email protected]:/storage/emulated/legacy/folder # ls
e2fsck
mke2fs
parted
resize2fs
sdparted
tune2fs
... how can you NOT find that?
herqulees said:
... how can you NOT find that?
Click to expand...
Click to collapse
Depending on how your PATH env var is set, the current directory might or might not be being searched for program load(s). So indicating the current directory explicitly with a leading "./" such as
$ ./parted
will certainly work (if a read & execute bit set on file, and the filesystem is not mounted -noexec ) .
But...
...if those files are dynamically linked rather than statically linked, and the appropriate link-libraries they reference come up missing during run-time linking it is possible to still see a "not found" message. Sort of a red-herring error message, but there you go.
I just looked in TWRP's /sbin (ramdisk) just now. Don't see parted in there.
[Edit] I do see the string "fdisk" inside the busybox executable though! - maybe boot into recovery and see what
busybox fdisk /dev/block/sda
gets you? (I suppose result depends on whether or not TWRP kernel plumbs the device into place.)
Perhaps the quickest solution is to simply use a PC and media reader to do the partitioning from a PC instead of the N7. You might even want to boot a "Live CD" version of Linux to get at the tools you need. (BTW, I think that Ubuntu's Live CD mounts a fuse FS over the top of the RO DVD/CD, so you can even download and install packages as needed).
I managed to get everything to work by doing this:
1. Using this app https://play.google.com/store/apps/details?id=com.beansoft.mount_system&hl=en I remounted /system as RW
2. Using the CyanogenMod File Manager I copied the parted file to /system/bin (from the root of the SD card)
3. Then using the File Manager still, go to the Properties of the parted file and go to Permissions and under R, W, and X put a check mark in the three boxes bellow each. (I don't know which ones it needs permissions for so I just give it permissions to everything, kinda frowned upon to do but I trust this program so...)
By doing this you can completely stay out of command line, but at the same time you're installing a command line program so you shouldn't be afraid of the command line in the first place. Lol.
Note: After this you can go to a terminal window and type su to get root access then type
Code:
parted /dev/block/sda
you will of opened your external memory card, now use parted as you would normally.

Getting rid of FAT, UMS, vold

FAT (the old DOS-based file system) is a bad idea.
It's ugly, doesn't mix well with Linux and saves timestamps in local time.
Moreover, the Nook has problems with FAT, randomly changing timestamps a number of hours.
Certainly at daylight savings time transitions everything changes.
If you use timestamps as an indication for syncing files from a host, this is a problem.
UMS (USB Mass Storage) is a bad idea.
It takes a happily mounted volume from an OS, and hands it in a raw block view to a remote system.
Outside of using noogie for full physical backups or initial partitioning and formatting there is no need for UMS.
The last need of UMS was the Adobe Digital Editions which was discussed and obviated in this thread
Finally, there are some devices and occasions where you'd want to hot swap SD cards.
A camera taking megapixels shots might have a need for swapping SD cards.
Our Nooks use SD cards more as permanent expansion units.
Get a 32 GB card, stick it in and never take it out.
Then we wouldn't need vold (the volume daemon).
In another thread I posted a modified vold so that the SD card could be ext3 formatted.
To my mind, the cleanest solution to all this is to:
Format the SD card with ext3
Mount the SD card in init.rc inside the uRamdisk
Disable UMS
Disable vold
Right now I'm running into problems mounting the SD card inside init.rc
Code:
mount ext3 /dev/block/mmcblk1p1 /sdcard wait nosuid nodev noatime nodiratime
chown system sdcard_rw /sdcard
chmod 0777 /sdcard
init has not very useful error reporting, it returns an error of -1 for any condition.
I was trying to build init that could tell me something more.
This is a work in progress.
(If we get rid of vold, we'll have to strip the Android MountWatcher so that it doesn't flail.)
I found out what the problem with doing a normal mount in init.rc was.
The system had not found /dev/block/mmcblk1p1 yet.
I'm still working on this.
For now I have a oneshot service that mounts /sdcard.
It uses a little executable that waits until /dev/block/mmcblk1p1 appears.
I disabled vold.
I would have liked to be able to mount the SD card inside init.rc,
but apparently /dev/block/mmcblk1p1 has not appeared by then.
You need to have a service do the job, a few seconds later.
Yes, you could probably write a little script, but I'd rather write a little Linux program.
I'm still wondering if there is an easier solution to mount inside init.rc
People use their Nooks in such different way.
I would really like to know what exactly people are interested in this thread.
There is a poll at the top to fill in, please.
Pieces of the pie ready to go now:
mke2fs
tune2fs -j
Mods to init.rc - disable vold, enable mntsdcard
mntsdcard - a Linux program
Patches to MountService to disable it.
Is anybody interested in trying this?
Well, if you want to give it a go, here's how.
Black = commands to the Nook shell over ADB
Blue = commands to the Windows shell
Convert your SD card to ext 3
Backup the data on your SD card (or just let it all get deleted).
You can use adbsync.exe if you like:
Code:
[color=blue]mkdir sdcard[/color]
[color=blue]adbsync /hscu /s C:\sdcard sdcard[/color]
Then you can re-partition the SD card.
Code:
umount /sdcard
busybox fdisk -H 255 -S 63 /dev/block/mmcblk1
Do the commands to delete (D) old partitions, create a new (N) primary partition.
Then write (W).
Then format the SD card in ext2, upgrade to ext3 and check the mount.
Code:
mke2fs /dev/block/mmcblk1p1
tune2fs -j /dev/block/mmcblk1p1
mount -t ext3 /dev/block/mmcblk1p1 /sdcard
Install mntsdcard
Copy over mntsdcard:
Code:
mount -o rw,remount /dev/block/mmcblk0p5 /system
[color=blue]adb push mntsdcard /system/bin[/color]
chmod 755 /system/bin/mntsdcard
Get uRamdisk and extract init.rc:
Code:
mount -o rw,remount rootfs /
mkdir /boot
mount -t vfat /dev/block/mmcblk0p1 /boot
[color=blue]adb pull /boot/uRamdisk[/color]
[color=blue]bootutil /x /v uRamdisk init.rc[/color]
Add in a mount for media (we'll leave it FAT for now):
Code:
mount ext2 /dev/block/mmcblk0p5 /system
mount ext2 /dev/block/mmcblk0p5 /system ro remount
[b] mount vfat /dev/block/mmcblk0p6 /media sync noatime nodiratime uid=1000,gid=1000[/b]
Comment the old vold stuff out:
Code:
#service vold /system/bin/vold
# socket vold stream 0660 root mount
Add in the mntsdcard stuff at the end of init.rc:
Code:
service mntsdcard /system/bin/mntsdcard
oneshot
Replace init.rc and push the uRamdisk back:
Code:
[color=blue]bootutil /r /v uRamdisk init.rc
adb push uRamdisk /boot[/color]
reboot
If there are any problems, look in /data/mntsdcard.log
Restore your SD card
Code:
[color=blue]adbsync /ascu /s C:\sdcard sdcard[/color]
Wow, this seems like a lot of stuff to do! :cyclops:
Thanks so much for all this great dev work, Renate!
:good:
BUT!
Will this definitely make noogie not function correctly? (I make new backups with it, like, once every week and a half, so that would definitely stop me from trying this)?
What will this do to the regular USB mounting onto a PC?
What will this do to mounting USB devices on the Nook using host mode?
And, finally: Will this mean I can't ever remove my SD card to use for something else temporarily (or to write a Nook-bootable image to it for miscellaneous reasons)?
Thanks,
3N
It's ugly, doesn't mix well with Linux and saves timestamps in local time.
Click to expand...
Click to collapse
That isn't correct. Linux has had support for FAT file systems very early on
and Linux support is quite stable. Saving timestamps in local time should not be a problem.
These mods look like it would make it non-trivial to side load content (unless you are using Linux for a main PC) for no reason.
smeezekitty said:
...These mods look like it would make it non-trivial to side load content (unless you are using Linux for a main PC) for no reason.
Click to expand...
Click to collapse
Hmmm. Good point. Thanks for pointing this out, as I use a Windows 7.
Here's your first post thank!
smeezekitty said:
TSaving timestamps in local time should not be a problem.
Click to expand...
Click to collapse
It's a problem twice a year when daylight savings time makes all your file times shift one hour.
Also, try moving timezones on your device.
smeezekitty said:
These mods look like it would make it non-trivial to side load content (unless you are using Linux for a main PC) for no reason.
Click to expand...
Click to collapse
Mmm, not really. I have a Windows desktop and I use ADB push/pull and my adbsync utility.
Moreover, I can easily sync all my Android devices before going out the door.
Renate NST said:
...Mmm, not really. I have a Windows desktop and I use ADB push/pull and my adbsync utility.
Moreover, I can easily sync all my Android devices before going out the door.
Click to expand...
Click to collapse
But if we wanted to transfer files without WiFi, ADB wouldn't be available, and so how would we sideload our files w/out ADB?
I agree ADB file transfer is more fun - heck, you can use an FTP Server app and manage your whole filesystem in the comfort of Windows Explorer! But without WiFi...
thenookieforlife3 said:
But if we wanted to transfer files without WiFi, ADB wouldn't be available, and so how would we sideload our files w/out ADB?
I agree ADB file transfer is more fun - heck, you can use an FTP Server app and manage your whole filesystem in the comfort of Windows Explorer! But without WiFi...
Click to expand...
Click to collapse
It is a little harder to set up, but adb usb has been available in the Nook since it was first rooted. This is just one of the multiple threads here that gives instructions....
Getting USB-enabled ADB working
thenookieforlife3 said:
But if we wanted to transfer files without WiFi, ADB wouldn't be available, and so how would we sideload our files w/out ADB?
I agree ADB file transfer is more fun - heck, you can use an FTP Server app and manage your whole filesystem in the comfort of Windows Explorer! But without WiFi...
Click to expand...
Click to collapse
ADB is something a little advanced for me at this point. But regardless of if you want to use it or not,
It is still very handy to be able to just copy files on and off the device just by moving the SD card or mounting by USB
I suggest that the OP adds a note for less experienced users so they know that you lose those capabilities if you do these mods.
smeezekitty said:
ADB is something a little advanced for me at this point. But regardless of if you want to use it or not,
It is still very handy to be able to just copy files on and off the device just by moving the SD card or mounting by USB
I suggest that the OP adds a note for less experienced users so they know that you lose those capabilities if you do these mods.
Click to expand...
Click to collapse
I entirely agree. Although ADB is fantastic and I absolutely love it, it's good to still have the USB mounting option instead.
The post you replied to was actually pointed toward Renate, so yeah.
---------- Post added at 02:50 PM ---------- Previous post was at 02:48 PM ----------
David0226 said:
It is a little harder to set up, but adb usb has been available in the Nook since it was first rooted. This is just one of the multiple threads here that gives instructions....
Getting USB-enabled ADB working
Click to expand...
Click to collapse
Thanks for the link - this topic has given me grief for the whole month, as I just can't seem to get the danged thing working! :laugh:
thenookieforlife3 said:
Thanks for the link - this topic has given me grief for the whole month, as I just can't seem to get the danged thing working! :laugh:
Click to expand...
Click to collapse
Good luck. My experience is that much depends on the model you have and the rooting method used. I have an original NST on which ADB over USB works without an issue. I also have a NST with Glowlight (rooted with NookManager) that I can't seem to get it working on. (I can't remember how I rooted the NST, it was a couple of years ago.)
David0226 said:
Good luck. My experience is that much depends on the model you have and the rooting method used. I have an original NST on which ADB over USB works without an issue. I also have a NST with Glowlight (rooted with NookManager) that I can't seem to get it working on. (I can't remember how I rooted the NST, it was a couple of years ago.)
Click to expand...
Click to collapse
AH! Good to know! I thought that I was just being a dumbo not being able to get ADB USB working (I have an NSTG rooted w/NookManager), but now that I hear that you're having problems, too, maybe I won't worry so much!
Getting ADB to work should be easy, especially if you have a few devices and can see if the problem is with the device or the host.
On Windows getting ADB over USBcan be a pain. There are a few roadblocks:
Make sure that your device is using USB and not WiFi for ADB. The option is set in init.rc in uRamdisk. Use bootutil.exe to check/edit.
Getting the WinUSB driver loaded. Use the driver package from here: http://forum.xda-developers.com/showthread.php?p=49665945#post49665945
Getting ADB to recognize B&N devices. The newer adb.exe has the VID for B&N built in. The older adb.exe required fiddling with adb_usb.ini
Renate NST said:
Getting ADB to work should be easy, especially if you have a few devices and can see if the problem is with the device or the host.
On Windows getting ADB over USBcan be a pain. There are a few roadblocks:
Make sure that your device is using USB and not WiFi for ADB. The option is set in init.rc in uRamdisk. Use bootutil.exe to check/edit.
Getting the WinUSB driver loaded. Use the driver package from here: http://forum.xda-developers.com/showthread.php?p=49665945#post49665945
Getting ADB to recognize B&N devices. The newer adb.exe has the VID for B&N built in. The older adb.exe required fiddling with adb_usb.ini
Click to expand...
Click to collapse
Yep, already seen these in previous posts. Modifying uRamdisk doesn't seem to work, as I can still use wireless ADB with or without the mentioned changes. Already edited adb_usb.ini to include B&N. And, I think, already got the WinUSB driver. I'll check that, though.
As stated many times, if you can connect to ADB over WiFi then you can not connect to ADB over USB.
Renate NST said:
As stated many times, if you can connect to ADB over WiFi then you can not connect to ADB over USB.
Click to expand...
Click to collapse
Yes, I know that, too. The problem, as stated, is that I always can connect over WiFi, and never USB!
No matter what mods I apply to any system file, it's the same result!
thenookieforlife3 said:
No matter what mods I apply to any system file, it's the same result!
Click to expand...
Click to collapse
Are you modifying init.rc inside uRamdisk? (Not the one that appears in the root after you have booted.)
What about default.prop in uRamdisk?
Do you see a 5555 anywhere?
Are you using some amazing-super-duper-ADB-instant-turn-on-offer-application?
Well, don't.
Renate NST said:
Are you modifying init.rc inside uRamdisk? (Not the one that appears in the root after you have booted.)
What about default.prop in uRamdisk?
Do you see a 5555 anywhere?
Are you using some amazing-super-duper-ADB-instant-turn-on-offer-application?
Well, don't.
Click to expand...
Click to collapse
Answer 1: Yes, I most definitely am. In fact, I am using your bootutil.exe program to do it.
Answer 2: Yes, I also edited that to match what you wrote in the Minimal rooting - back to basics thread.
Answer 3: Yes, in the line of code
Code:
setprop service.adb.tcp.port 5555
It doesn't matter if I comment it out, it still connects wirelessly.
Answer 4: Yes, I am. But if I don't use one, then how will I turn ADB on or off?

Categories

Resources