[HOWTO] for Gamers: dirty workaround to have Gameloft files on external_sd - Galaxy S I9000 General

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.

Related

[SCRIPT][1/22/2011] A Simple Cache2Cache for CM 6.x and 7.x ROMs

Due to a number of requests I have built a flashable .zip that will install a simple cache2cache script for CyanogenMod 6.x and 7.x ROMs.
NAND backup BEFORE you try this!
From user feedback it seems that if you are ALREADY running Apps2sd this causes issues with apps that where installed to the SD card and you will have to remove and re download them. There have been no reports of issues if you flash PRIOR to enabling Apps2sd ...
Per dingermtb: check out post http://forum.xda-developers.com/showpost.php?p=11487856&postcount=58 for an easy fix for Apps2sd.
By using this script the dalvik-cache has been relocated from the internal /data/dalvik-cache/ directory to the internal /cache/dalvik-cache directory. The Eris comes with an internal /cache/ file block of 130mb that is not used much (CyanogenMod does store the cache of system apps in the /cache file block but NOT any apps that are downloaded from the market)! So by moving the dalvik-cache to this free area you now have more space on internal /data/ for apps and over 75mb in internal /cache/ for dalvik-cache. This means that you can probably install close to 75-100 apps WITHOUT having to worry about apps2sd!
This IS NOT a Custom MTD script as I wanted to keep it simple. This solution is not as "ideal" as a Custom MTD scripts work but it is a bit easier, safer, and simpler... Plus it works
How do I know it worked?
So why does my Settings>SD card & phone storage>Internal phone storage only show 150mb or less? This is because this number ONLY reflects the /data/ file block on your phone and does not "see" the /cache/ block that is now being used for dalvik-cache storage.
From adb or Terminal Emulator (you can get it free from the market if your ROM does not already have it) run the follow command:
Code:
df -h
You will see that your /cache partition now is more used and that your /data partition is less used.
Also you can browse to the /cache/dalvik-cache/ folder using your favorite file explorer and see that you now have files starting with "[email protected]" and not just "[email protected]"
What does it do?
Since CyanogenMod already uses an init.d framework that runs during boot on his ROMs it was easy to add a new shell script that would automatically run with the other boot scripts in the /system/etc/init.d/ folder.
This simply adds the following 07cache2cache file to /system/etc/init.d/
Code:
# !/system/bin/sh
#
# Author: zach.xtr Jan 2011
# Moves the /data/dalvik-cache files to largely unused /cache/dalvik-cache location and symlinks
# This code is intended for the ERIS, use on other phones may not work due to predefined file block sizes...
log -p i -t cache2cache "Running cache2cache to move data/dalvik-cache to cache/dalvik-cache...";
# Mount filesystem
/system/xbin/busybox mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
# Make sure final /cache/ location is setup correctly
if [ ! -d /cache/dalvik-cache ];
then
log -p i -t cache2cache "/cache/dalvik-cache directory not found, creating and adding permissions...";
/system/xbin/busybox mkdir /cache/dalvik-cache;
/system/xbin/busybox chown 1000:1000 /cache/dalvik-cache;
/system/xbin/busybox chmod 777 /cache/dalvik-cache
fi;
if [ -d /data/dalvik-cache ] && [ ! -h /data/dalvik-cache ];
then
log -p i -t cache2cache "Moving files from /data/dalvik-cache to /cache/dalvik-cache";
/system/xbin/busybox cp -fp /data/dalvik-cache/* /cache/dalvik-cache;
/system/xbin/busybox rm -r /data/dalvik-cache;
log -p i -t cache2cache "Creating Symbolic Link of /cache/dalvik-cache as /data/dalvik-cache";
/system/xbin/busybox ln -s /cache/dalvik-cache /data/dalvik-cache;
/system/xbin/busybox chown 1000:1000 /data/dalvik-cache
/system/xbin/busybox chmod 0771 /data/dalvik-cache
fi;
# Clean up
/system/xbin/busybox mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system
How do I remove it?
Since it only adds 1 file all you need to do is delete the /system/etc/init.d/07cache2cache file and reboot your phone. One could use adb or RootExplorer (or similar) file manager.
NOTE: if you have been using this for a while and have installed enough apps and THEN remove it I am not sure what will happen when you reboot... Basically you may not have enough space in the /data file block alone.
awesome i will try this now
Oh my gosh, bless you! This is great.
Downloading and installing onto CELB 4.3 right now...
[edit - Reported phone storage remaining went from 28 MB to 70 MB free. It did restart my phone on the first restart; I'm not sure if that's normal, but things seem to be working fine.]
korben dallas said:
awesome i will try this now
Click to expand...
Click to collapse
Success?
Sent from my ERIS using XDA App
Flash success on floyo 5.0. Gave e another 25 or so MB. Great work!!
Sent from my Floyo using XDA App
Thank you! Works great on my CELB4.2 . Gained an extra 25MB.
Sent from my ERIS using XDA App
Nicely done. Nonsensikal 16.1 went from 17 or 18 megs free to 67 megs. Working fine so far..
Pretty cool. I'm never low on space so I won't need this, but thanks for creating it.
Is it possible for this to cause apps to slow down, since when they try to access the cache it'll be on the (slower) SD card?
However, app2sd is now a little confused, and the apps it thinks are on the sd card cannot be found when I try to move them back to the phone. However, they are operable.
Hungry Man said:
Pretty cool. I'm never low on space so I won't need this, but thanks for creating it.
Is it possible for this to cause apps to slow down, since when they try to access the cache it'll be on the (slower) SD card?
Click to expand...
Click to collapse
No
This does not use the SD card in any way; it only redistributes from the INTERNAL /data file block to the INTERNAL /cache file block...
If anything you may gaine a minor permormance improvement as you will have more "working" space...
galbro said:
However, app2sd is now a little confused, and the apps it thinks are on the sd card cannot be found when I try to move them back to the phone. However, they are operable.
Click to expand...
Click to collapse
Hmm...
Are you using the built in Froyo style Apps2sd or the flashable?
Thanks Zach!
I have it on CELBFroyo 4.3. Will this will survive a flash to a later version of the ROM if no wiping happens?
strongergravity said:
Thanks Zach!
I have it on CELBFroyo 4.3. Will this will survive a flash to a later version of the ROM if no wiping happens?
Click to expand...
Click to collapse
No you will have to reflash the .zip even with a no wipe update as it is a /system file
Thank you! When I get some free time I'll flash CELB, test, and report back.
Sent from my Eris using XDA App
I installed onto my phone running Vanilla FroShedyo. It is running like a champ so far and all the apps seems to work as usual. I went from 59.07MB free to 83.14MB! I know I am a minimalist when it comes to apps on my phone but man does it fly now. Thank you for this script and keep up the good work!
44mb to 74mb on nonsensikal v12.5. thanks and gotta love this place called XDA!
58mb to 77mb FroShedYo Vanilla
Linpack pre-script 4.8-5.1
Linpack post-script 4.8
Quadrant pre 380-420
Quadrant post 376
Thanks for the extra space and sharing
Flashed on CELB and lost access to all of my apps on the sdcard. I'm using the built in Froyo apps2sd. Also broke my widgets on the home screens.
magnethart said:
Flashed on CELB and lost access to all of my apps on the sdcard. I'm using the built in Froyo apps2sd. Also broke my widgets on the home screens.
Click to expand...
Click to collapse
Can you try clearing dalvik-cache and rebooting?
zach.xtr said:
Can you try clearing dalvik-cache and rebooting?
Click to expand...
Click to collapse
dalvick wipe did not change anything. still have broken widgets and no access to apps installed on sd.

[HOW-TO] Move /data/data to SDCard

As some people experienced, default partinitioning of internal ROM is a bit missed than usual needs and our ZTE's still complains about disk space running out.
One of the solutions is to move /data/data to SD-ext partinition (only with A2SD enabled!)
how to do that?
Start an adb shell
Code:
rm -r /system/sd/data
cp -pr /data/data /system/sd/data
cd /data/data
now use
Code:
du -hs *
to check which directories are the biggest and contains non-critical software added by user (eg another music player or GPS navigation) and remove them to reduce disk usage (system will start to complain about disk space).
Use text editor to create a file "05data"
Code:
#!/system/bin/sh
# mount /system/sd/data to /data/data
if [ -d /system/sd/data ];
then
/system/xbin/mount -o bind /system/sd/data /data/data
fi
then push it to android device
Code:
adb remount
adb push path_to_file /etc/init.d/05data
adb shell chmod +x /etc/init.d/05data
Disclaimer:
I am using GSF B27 rom with A2SD, solution to symlink /data/data with /system/sd/data folder failed on my phone (bootloop) so I've created solution mentioned above. Binding than symlinking is safer, because original /data/data is a failover container for user files.
to move data to SD card it needs apps2sd text in init.rc then the bin files! ex this:
#!/system/bin/sh
# mount /system/sd/data to /data/data
if [ -d /system/sd/data ];
then
/system/xbin/mount -o bind /system/sd/data /data/data
if it have that then edit it!
and then the init files in /system/etc/init.d maybe them can edit on Linux or if can't then needs to use other program or then notepad or other programs on windows to edit init.d folder files...
then... it needs APP2SD files which works on Blade...
Now the Data(s)/APP(S) moving needs to be enabled....
If wants something else DATA to move SD Card then I don't know how... (maybe with File Explorer apps)...
Hi!
I am using GSF b27 on my Blade and because I was running out of internal memory, created a partition using clockworkmod (v5) recovery, following this tutorial:
http://android.modaco.com/topic/331205-guide-how-to-get-more-free-space-for-your-apps/
After reboot and trying to (re)install some apps, nothing changed...all my apps are still installed on my internal memory (that is full).
I checked the folder /system/sd but all the folders inside it are empty...it looks like A2SD is not running!
Isn't A2SD included in GSF27 and supposed to run automatically after a ext partition has been created?
Any help is welcome! Thanks
Tuc
A2SD is enabled after you create an ext2 partinition, right.
Now You have to copy *all* directories from /data/data to /system/sd/data
(how-to in post #1) AND delete directories of no-so-critical applications like Your another MP3 player or less played game from /data/data folder. You should have ~50MiB free on /data partiniton
Then, creating an initscript mentioned above will make an overlay of /system/sd/data folder on /data/data folder, so all needed files are on their place. Overlay instead of symlinking is better, because You have (stil aging, so old) backup of most important things, so in case of ****up You'll loose less.
Thanks for those details.
Everything went smooth until the following command:
adb shell chmod +x /etc/init.d/05data
Click to expand...
Click to collapse
ADB answers "Bad mode"...
I'm really not familiar with this ADB tools
EDIT: The folders in system/sd are still empty...Is there any SIMPLE solution to activate A2SD without ADB shell stuffs???! I don't mind uninstall all my apps to re-install them in this system/sd folder, I just need to know how to activate automatic installations in this folder instead of the internal memory... Thanks
Tuc
It's not about deleting apps and installing them.
It's about moving ALL data from /data/data to /system/sd/data, removing unnecessary files from /data/data (to get more free space to make android stop to complain about free space) and creating overlay from SD card on /data partiniton to make them back.
There's no directory called /system/sd/* on my LG P690. Can't I use the /sdcard/data directory or the /data/sdext2/data instead?
abhishek046 said:
There's no directory called /system/sd/* on my LG P690. Can't I use the /sdcard/data directory or the /data/sdext2/data instead?
Click to expand...
Click to collapse
yes u can
Blade Q Maxi aps2 sd
Hi I need help in moving apps to SD on a Blade Q Maxi phone.Tried with a terminal emulator app but no luck.Please assist.
it works on other ROMS, like TouchWiz?

Linux chroot mount scripts

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.

[TIPS][SCRIPTS][ROOT]egingell's scripts. Updated 11/22/13 11:30 MST

I will be using this thread to post my scripts and link them to other threads as needed. For this thread, I am assuming you know what you're doing. You don't need mad hacking skills and you don't need to be an expert (I'm sure as hell not), but knowing your way around the file system and basic shell scripting are helpful.
Some background: I am using the stock ROM and kernel (SGS2 - GB27, SGS4 - MDC), so all of my tips revolve around using stock and all of my scripts (even the flashable ones) will work without flashing from recovery (just extract the script from the ZIP and execute it while the phone is in phone-mode - you know... powered on ).
You are welcome to use my scripts in your apps. I only ask that you give me some credit.
I am not responsible for bricking your phone. I have only tested my scripts on my personal Samsung Galaxy S2 and S4 from Sprint. You are welcome to try on your phone, but I offer no warranties or guarantees as to whether they will work or not. Back up your ****!
All of this requires root!
Below is a list of the scripts I have written for y'alls. Enjoy.
Custom df: Shows where irregular mounts ("mount -o bind") are mounted. [ Forum post | Download ]
Currently doesn't work on my SGS4.
Easily move Phonesky.apk and GoogleServicesFramework.apk to /system or /preload for Multi DPI Play Store. [ Forum post | Download ]
Untested on my SGS4, but there's no reason to think that it won't work.
Use your SGS2's internal SD card for Link2SD instead of making a second partition on your external SD card (although, depending on the setup, you may still need to make a tiny partition on your external SD card) and your external SD card as your internal SD card [ Forum post ]
Untested on my SGS4. I have no need for it.
Clean up Link2SD: Delete files associated with Link2SD when uninstalling it. It does not revert the links Link2SD makes. It only deletes the mount scripts. [ Forum post | Download ]
If you use the debuggerd script to enable init.d, running this script will cause you to lose init.d.
Untested on my SGS4, but there's no reason to think that it won't work.
Delete Samsung's bloatware from the Sprint SGS2. [ Forum post | Download ]
Untested on my SGS4, but there's no reason to think that it won't work; however, it was written specifically for the SGS2's bloatware. See thread S4 System Apps Safe To Remove for a list of SGS4 bloatware apps.
Google Home Launcher (from Kit Kat).
Works on Jelly Bean.
Below are some other tweaks.
You can use custom boot animations with the stock ROM. All you need to do is swipe a "/system/bin/bootanimation" binary file from another ROM (such as @rujelus22's Blu Kuban FL24 (ICS) or Blu Kuban GB27 (JB 4.1.2)), paste it into "/system/bin", and make it executable.
For JB 4.2.2, make sure the user and group are root and shell respectively. This doesn't seem to be a problem with JB 4.1.2 and below. It's also possible that my initial testing involved a boot animation that didn't work on my SGS4, so if it works with root as both user and group, then roll with it. :good:
Also for JB 4.2.2, use the file from a JB 4.2.2 ROM, such as The Blu Kuban S4.
You can enable init.d scripts very easily by renaming "/system/bin/debuggerd" to "/system/bin/debuggerd.bin", replace it with the following, and make both files executable. If "/system/bin/debugger.bin" already exists, then edit "/system/xbin/busybox run-parts /system/etc/init.d" into "/system/bin/debuggerd".
As with the above, make sure the user and group are root and shell.
Code:
[color=green]#!/system/bin/sh[/color]
LOG=/data/debuggerd.log
echo "$(date)" > $LOG
echo "init.d" >> $LOG
/system/xbin/busybox run-parts /system/etc/init.d 1>>$LOG 2>>$LOG
echo "$(date) finished" >> $LOG
echo debuggerd.bin launched >> $LOG
exec /system/bin/debuggerd.bin
Below are some tips.
Most of the things you can do with a custom kernel, you can do with the stock kernel, it just requires more work and more risk.
If you replace an odexed system app with a deodexed system app, make sure you delete the app's ODEX file (it's the same file name except with the extension .odex).
Conversely: if you replace a deodexed system app with an odexed system app, you better have the ODEX file to go with it.
You can clear the dalvik-cache without a custom kernel by deleting the contents of "/data/dalvik-cache". You can even delete an individual app's dalvik-cache by finding the file "/data/dalvik-cache/[email protected]@[email protected]" or "/data/dalvik-cache/[email protected]@[email protected]" and delete it.
You can manually uninstall a system app's update by finding the file "/data/app/.apk" and delete it.
You can manually delete all user data by deleting the contents of "/data/data". You can even delete an individual app's data by finding the folder "/data/data/" and delete it.
Making scripts and binaries executable:
They must be on an EXT formatted filesystem (e.g. /data, /system, /preload).
They must be at least readable and executable by the user 'shell' (755 (read/execute for all, write only for user - "u=rwx,a=rx" if your busybox supports that method) is what I usually use).
Code:
chown root:shell ""
chmod 755 ""
chmod u=rwx,a=rx "" # busybox must support symbolic modes
Changing file permissions requires read/write access to the filesystem on which the file resides:
Code:
mount -o remount,rw /system # make the /system partition read/write
mount -o remount,ro /system # make the /system partition read only
The stock kernel is considered "production" whether or not it's rooted; therefore, you cannot use ADB to push or pull files directly to or from protected partitions, nor run ADB as root, nor use ADB's remount command, so you have to use unprotected partitions as a sort of buffer. You can, however, access the ADB shell and issue the "su" command wherein you can use "cp" to copy files to or from protected partitions prior to using ADB to push or pull the desired file. However, there is an app aptly named [root] adbd Insecure by @Chainfire that patches the ADB daemon to get around this limitation.
Example:
Code:
c:/android-sdk> adb shell
[email protected]:/ $ su
[email protected]:/ # cp /system/bin/debuggerd /sdcard/debuggerd
[COLOR="green"]-- open a new command prompt window --[/COLOR]
c:\android-sdk> adb pull /sdcard/debuggerd debuggerd
c:\android-sdk> adb push debuggerd /sdcard/debuggerd
[COLOR="green"]-- switch to the first command prompt window --[/color]
[email protected]:/ # mount -o remount,rw /system
[email protected]:/ # cp /sdcard/debuggerd /system/bin/debuggerd
[email protected]:/ # chown root:shell /system/bin/debuggerd
[email protected]:/ # chmod 755 /system/bin/debuggerd
[email protected]:/ # mount -o remount,ro /system
Some noteworthy files and folders:
/proc/self/mountinfo: If you can read it, it tells you where your partitions and folder binds are mounted.
/proc/partitions: Shows all of your SD card's partitions, how many blocks each has, and their vold numbers (eg "179 1 30578964 mmcnlk0p1").
/dev/block/platform/dw_mmc/by-name: This folder contains symlinks to your internal eMMC's partitions indexed by what they are for (eg UMS for your internal SD card - "realpath /dev/block/platform/dw_mmc/by-name/UMS" will print out the device path (ie "/dev/block/mmcblk0p11")).
/dev/block/platform/dw_mmc/by-num: This folder is like the previous except that they are indexed by partition number (eg "p11").
/proc/version: Shows what version of Linux is currently being used.
/data/system/batterystats.bin: Delete this when your battery is fully charged and still plugged in to recalibrate it.
Footnotes:
For "/data/app", "/data/data", and "/data/dalvik-cache" files you need to know the package name. There are various apps that will tell you, including Link2SD (mentioned above), Titanium Backup, and the web URL of the app in the Play Store (ex: https://play.google.com/store/apps/details?id=com.devname.appname).
More:
Random boot sound using your notification sounds
Make ADB work for all users - Jelly Bean 4.2.2 (Updated 07/15/13 00:35 MST)
Stock ROM - SGS4 - init.d
No-data restore tips
SGS4 Bloatware Remover
Make apps run faster and increase battery life
Random boot sound using your notification sounds
The attached ZIP contains a script that can be run pre or post boot. It just needs to be executable.
Preboot requires init.d. See the OP for enabling it if you are on a stock rooted ROM and requires the file to be readable and executable ("chmod 755" works fine).
Postboot requires an app such as Scripter (ROM Toolbox) or Script Manager to execute the script at boot.
Requires the variable $RANDOM. You can make sure it's available from the command line ("echo $RANDOM").
Use this script at your own risk. I provide no warranties or guarantees.
What does this script do?
Check for carrier boot up sounds (sub folders in the "/system/media/audio/ui" folder) and moves them to "/system/media/audio/notifications" renaming them as needed.
Create symlinks in the above folders to "/system/media/audio/ui/PowerOn.ogg".
Check if "/system/media/audio/notifications/PowerOn.ogg" is present and copy it to "/system/media/audio/ui/PowerOn.ogg" it's not.
Count the number of files in "/system/media/audio/notifications".
Grab a random number between 1 and the number of files found inclusive (math notation: "[1, numFiles]").
Go through "/system/media/audio/notifications" and copy the file at index random to "/system/media/audio/ui/PowerOn.ogg".
Notes:
The stock file is included. If you want a different sound in its place, you can either comment out that line in the script and delete the "/system/media/audio/notifications/<subfolder>_PowerOn.ogg" files from "/system/media/audio/notifications" or just replace "/system/media/audio/notifications/PowerOn.ogg" with some other sound file and still delete the "/system/media/audio/notifications/<subfolder>_PowerOn.ogg" files from "/system/media/audio/notifications".
If you want more sounds, just copy them to "/system/media/audio/notifications" (OGG files only).
The script does not check for valid files and blindly renames the destination file to "PowerOn.ogg".
It does not look in "/sdcard/media/audio/notifications" or anywhere else for audio files.
I do not recommend using alarms or ringtones files as they are usually looped which can cause the media scanner to get stuck and overheat your phone or tablet - those files may continue to play even if you can't hear them.
If you can't hear a sound on boot, it is likely that the file is either invalid or has no audio (ex: my /system/media/audio/ui/BST/PowerOn.ogg has no audio).
It was tested and works on a Samsung Galaxy S2 (stock JB 4.1.2) and a Samsung Galaxy S4 (stock JB 4.2.2) both from Sprint and using stock kernels.
There's no obvious reason it won't work on other phones and tablets with other ROMs from other carriers.
Nice work E.
cerj said:
Nice work E.
Click to expand...
Click to collapse
:good:
Make ADB work for all users - Jelly Bean 4.2.2 (Updated 07/15/13 00:35 MST)
With Android 4.2.2, ADB now requires RSA keys. This poses a problem when attempting to connect to the device's ADB server from the device itself and the device won't ask for authorization unless it's connected via USB. Well, there's hope, yet.
For the following, I'm assuming you used my method for adding init.d support to your device.
Use these scripts at your own risk. I provide no warranties or guarantees.
Add the following script to /system/bin/debuggerd. If you use an alternate method, please note that it must be executed by the debugger daemon. You must do this first or you'll have to manually restart the debugger daemon after editing this file and executing the run-once script (next step), so edit this file first and save it.
Code:
if [ ! -e "/.android" ]; then
busybox mount -o rw,remount /
mkdir /.android
mount -o bind /data/.android /.android
busybox mount -o ro,remount /
fi
Then run this script once from the device (not over ADB on your PC).
Code:
[COLOR="Green"]#!/system/bin/sh[/COLOR]
HOME=/data
adb kill-server
adb start-server
stop adbd
cat /data/.android/adbkey.pub >> /data/misc/adb/adb_keys
echo "" >> /data/misc/adb/adb_keys # Add a blank line at the end of the file
start adbd
HOME=/
adb kill-server
stop debuggerd
start debuggerd
Notes:
You can also find the abdkey.pub file on your Windows' PC here, C:\Users\<user name>\.android\adbkey.pub. Copy it to your device by whatever means necessary, then append it to /data/misc/adb/adb_keys and you won't need to initially use the USB to allow the PC connection. Not really necessary unless your PC has no USB or you've broken your USB cable.
This may have inadvertently corrected the mounting issue introduced in Jelly Bean 4.2.2.
You can also allow other Android 4.2.2 devices, but it requires ADB version 1.0.31 and for you to manually append the contents of /data/.android/adbkey.pub from device A (the one you want to use to ADB on) to /data/misc/adb/adb_keys on device B (the target device).
Don't delete /data/.android
This won't fix apps. Just allow you to use ADB to connect to your device from itself.
Tested on my SGS4. No reason it won't work on other devices.
If you already have a /data/.android directory, you may not need to do this. On my SGS4, HOME defaults to "/" which the ADB daemon can't write to, so it can't make the RSA key.
The run-once script temporarily changes HOME to "/data", a writable directory, so the ADB daemon can write the RSA key then it append it to the allowed clients file then restarts the debugger daemon thus binding /data/.android to the /.android directory allowing all Linux users ADB access to the device.
Reassigning HOME to a new value on one user only changes its value for that user which is why I'm binding /data/.android to /.android.
Code:
# Example
[email protected]:/ $ echo $HOME
/
[email protected]:/ $ HOME=/data
[email protected]:/ $ echo $HOME
/data
[email protected]:/ $ su 1000
[email protected]:/ $ echo $HOME
/
Alternatively (much easier):
Make the .android folder in /data (mkdir /data/.android).
Add the script, the first code block in this post, to your debuggerd file or an init.d script.
Restart the debugger (stop debuggerd; start debuggerd) or reboot the phone.
Restart ADB (stop adbd; start adbd).
Copy the newly created public key to the allowed clients (cat /data/.android/adbkey.pub >> /data/misc/adb/adb_keys; echo "" >> /data/misc/adb/adb_keys).
Restart the ADB server (adb kill-server; adb start-server).
SGS4 Bloatware Remover
I have written a live-script to delete all of the SGS4 bloatware except GoogleContactsSycAdapter and SecLauncher3. If you want to delete those, remove the "#" from that line in the script. If you want to exclude an app, add a "#" to that line and put the app name in quotes (ie AppName / becomes "#AppName" / (including the forward slash) or just remove that line. If you remove the last item (YouTube in this case), remove the forward slash from the previous line.
Use this scripts at your own risk. I provide no warranties or guarantees.
What this script does:
Move the app's APK and ODEX to /sdcard/SystemAppsBackup.
Delete its dalvik-cache.
Reboot the phone. If it doesn't reboot, you'll have to do this yourself.
What this script does not do:
Delete the app's data. Because the script doesn't know the package name.
Delete its Play Store update (located in /data/app). Because the script doesn't know the package name.
Mount the SD card if it's not mounted. If you want backups, make sure the SD card is mounted.
Care if you delete a system app you wanted to keep. Most apps that you would want to keep may be available in the Play Store.
Restore apps.
Notes:
Apps will crash left and right when you execute this script in running mode. Don't fret, this is normal.
This is a live-script which means you have to manually execute the script either with a terminal emulator, a script executor like Scripter, or ADB.
This is not flashable.
If executing via ADB in Recovery mode, you may need to mount the SD card to /storage/sdcard0 manually or settle for no backups.
If you restore an app from /sdcard/SystemAppsBackup, make sure you get the ODEX file if present and set the permissions for both to 644.
This list is based off the list in the thread, S4 System Apps Safe To Remove.
Here You Go Guys, I took me about 30 mins, but I have successfully added all the app in the Op to a flashable Zip.
The Zip is base of TrulyClean v1.6 script code, I just deleted his ;delete/system/...apk and replaced it with all the ones from the OP
bigtobitobs said:
Here You Go Guys, I took me about 30 mins, but I have successfully added all the app in the Op to a flashable Zip.
The Zip is base of TrulyClean v1.6 script code, I just deleted his ;delete/system/...apk and replaced it with all the ones from the OP
Click to expand...
Click to collapse
Looks like you're deleting bloatware, perhaps you should post that in the right thread... or at least a more appropriate thread.
Sent from my SGS4.
egingell said:
Looks like you're deleting bloatware, perhaps you should post that in the right thread... or at least a more appropriate thread.
Sent from my SGS4.
Click to expand...
Click to collapse
LOL OMG I am so sorry, I had multiple tabs open and put this in the wrong forum. Please Delete
bigtobitobs said:
LOL OMG I am so sorry, I had multiple tabs open and put this in the wrong forum. Please Delete
Click to expand...
Click to collapse
Would that I could.
Sent from my SGS4.
Make apps run faster and increase battery life using Xposed App Settings.
Did you install GravityBox on your SGS4 then uninstall it and now you can't hear your games or music?
I think it has to do with GravityBox's "Volume Steps" option not undoing when GB is uninstalled. This is how I fixed it (forum post).
Stock ROM - SGS4 - init.d
I recently found out that my debuggerd hack to enable init.d support on my stock SGS4 wasn't working. So, I did this and now it works.
Make a file named "install-recovery.sh" and drop it into /system/etc. Whatever script you put in here will execute at boot up so long as the user/permissions are correct.
Code:
chown shell:shell "/system/etc/install-recovery.sh"
chmod 755 "/system/etc/install-recovery.sh"
chmod u=rwx,a=rx "/system/etc/install-recovery.sh" # busybox must support symbolic modes
Use this script at your own risk. I provide no warranties or guarantees.
My "/system/etc/install-recovery.sh" script:
Code:
[COLOR="Green"]#!/system/bin/sh[/COLOR]
LOG="/data/install-recovery.log";
echo "Executing install-recovery.sh" > $LOG;
echo "" >> $LOG;
echo "$(date) install-recovery hack..." > $LOG
echo "" >> $LOG
echo "init.d" >> $LOG
[COLOR="green"]# I can't get run-parts to work for some reason, but this will run every *.sh script in /system/etc/init.d as root.[/COLOR]
for N in /system/etc/init.d/*.sh; do
su -c "$N" 1>>$LOG 2>>$LOG
done;
Notes:
Mount binding (in JB 4.2.2+) seems to work. E.g. mount -o bind /folder1 /folder2
$(date) does not provide the correct date (mine said: "Wed Apr 15 13:24:13 MST 1970").
The Package Manager is not available. (There may be other unavailabilities, but I don't intend to test it thoroughly.)
Somethings I discovered recently while doing a no-data system restore for the second time in the same night and some tips relating to system restores:
* When doing a no-data restore, disabled/frozen system apps remain disabled.
* Apps that can't be disabled even with Titanium Backup will not remain disabled after a reboot and will sometimes crash/FC repeatedly until uninstalled.
* If an app won't open or FCs, try converting it to a system app and back to user app or vice versa.
* Don't integrate system app updates into the ROM. In the event that you have to do a no-data restore, those updates will be retained.
* Don't convert user apps to system apps for the same reason.
* Disregard the previous two tips if disk space is a problem. It's just more time consuming (redownloading updates, reintegrating, and reinstalling) after a restore.
* Save all modified system files, such as /system/bin/debuggerd, /system/build.prop, /system/etc/install-recovery.sh, and if your ROM uses /system/etc/unit.d, any modified or extra files there. If you use them, you'll need them after a restore.
* For a smoother post no-data restore, use Titanium Backup's labels so you can batch-uninstall those pesky system apps you don't want.
SGS2 - JB 4.1.2 GB27
SGS4 - JB 4.2.2 MF9
any command for updater script to make directory in root of android ??
HassanMirza01 said:
any command for updater script to make directory in root of android ??
Click to expand...
Click to collapse
Creating directories in / and all the files contained therein must be redone on every boot. That said, you just need to make root writable and make the directory.
mount -o remount,rw /
mkdir /whatever
mount -o remount,ro /
Note: Every time you wish to create, modify, or delete files you'll have to make root writable.
Sent from my LG-H811 using Tapatalk
egingell said:
Creating directories in / and all the files contained therein must be redone on every boot. That said, you just need to make root writable and make the directory.
mount -o remount,rw /
mkdir /whatever
mount -o remount,ro /
Note: Every time you wish to create, modify, or delete files you'll have to make root writable.
Sent from my LG-H811 using Tapatalk
Click to expand...
Click to collapse
Actually.... I wanna add some files within folder in root of android root... So i need to use above three commands nd then after making directory, i should extract files to that folder ??
HassanMirza01 said:
Actually.... I wanna add some files within folder in root of android root... So i need to use above three commands nd then after making directory, i should extract files to that folder ??
Click to expand...
Click to collapse
Yes.
Sent from my LG-H811 using Tapatalk
:good:

Ouya SD Card Mount Enable [SD Card Read FIX]

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.

Categories

Resources