[Q] Unable to configure App2sd ver2 with Kyrillos 8 - Galaxy 3 General

Hi all,
I am having issues activating app2sd ver2 with Kyrillos 8! After flashing the ROM, i removed the script "Hybrid Data2SD" inside the /etc/init.d and pushed the script "Apps2sd" ver 2. After that i rebooted in recovery, created ext partition, wiped data. But even after that i cannot see that partition in TB! Is it such that in G3MOD 2.0, TB will not show the partition irrespective of the script.
When i looked at the log(app2sd.log) of app2sd inside /data/misc/app2sd, i could see some errors like shown below :-
mount: mounting /dev/block/mmcblk0p2 on /system/sd failed: Device or resource busy
mount: mounting /system/sd/app on /data/app failed: No such file or directory
mount: mounting /system/sd/log on /data/log failed: No such file or directory
mount: mounting /system/sd/dalvik-cache on /data/dalvik-cache failed: No such file or directory
Should i manually create the folders inside /system/sd? Could anyone tell me as to what is that which i am doing wrong in order to activate app2sd ver2?
PS: I have raised this query in general as well as dvpmt forums of Kyrillos, but didnt get any response.
Thanks in advance!

Update to 8.1. It has modified App2SD script which works.

dhirend_6d said:
Update to 8.1. It has modified App2SD script which works.
Click to expand...
Click to collapse
I updated to 8.1 !! And still when i check the log folder inside "/data/misc/app2sd.log", i see the previous errors which i have stated in my earlier post. And inside the /system/sd there are no folders, whereas as per the script it should have folders like "log","app" and "dalvik-cache".
I just want to enable App2sd in this ROM! I tried with the G3MOD app also to activate App2sd, but still doesnt work! When i check via G3MOD app, it says the app2sd is not activated whereas when i check in KMApp it says its been activated!
For me Hybrid data2sd feels sluggish and thus i would like to use App2sd! Could you just share the steps to be followed to use App2sd in kyrillos 8.1. I havent copied the folders to sdcard and so i guess i havent enabled hybrid data2sd! After flashing, i have just created partition and waiting for a solution to enable app2sd!

mrn123 said:
I updated to 8.1 !! And still when i check the log folder inside "/data/misc/app2sd.log", i see the previous errors which i have stated in my earlier post. And inside the /system/sd there are no folders, whereas as per the script it should have folders like "log","app" and "dalvik-cache".
I just want to enable App2sd in this ROM! I tried with the G3MOD app also to activate App2sd, but still doesnt work! When i check via G3MOD app, it says the app2sd is not activated whereas when i check in KMApp it says its been activated!
For me Hybrid data2sd feels sluggish and thus i would like to use App2sd! Could you just share the steps to be followed to use App2sd in kyrillos 8.1. I havent copied the folders to sdcard and so i guess i havent enabled hybrid data2sd! After flashing, i have just created partition and waiting for a solution to enable app2sd!
Click to expand...
Click to collapse
First of all place the app2sdv2 script in /system/etc/init.d
Then remove Hybriddata2sd scipt
Then....execute the following commands using terminal emulator or ADB....
su
mount -o rw,remount /dev/block/stl6 /system
chmod 777 /system/etc/init.d/*
chown 0.0 /system/etc/init.d/*
Then reboot in recovery and do a wipe data/factory reset
u r done....

raja4sure said:
First of all place the app2sdv2 script in /system/etc/init.d
Then remove Hybriddata2sd scipt
Then....execute the following commands using terminal emulator or ADB....
su
mount -o rw,remount /dev/block/stl6 /system
chmod 777 /system/etc/init.d/*
chown 0.0 /system/etc/init.d/*
Then reboot in recovery and do a wipe data/factory reset
u r done....
Click to expand...
Click to collapse
I did the same steps, and got the error in the log file which i have stated in my first post.
And I guess Hybrid data2sd is not an init.d script. Hillbeast says that deleting won't disable it. You need to delete the fs.data2sd from the G3MOD config folder.
Now after trying link2sd, it looks cool to me! If i just delete the script of data2sd or app2sd from /etc/init.d, would it make sure that none of them will be getting used.

mrn123 said:
I did the same steps, and got the error in the log file which i have stated in my first post.
And I guess Hybrid data2sd is not an init.d script. Hillbeast says that deleting won't disable it. You need to delete the fs.data2sd from the G3MOD config folder.
Now after trying link2sd, it looks cool to me! If i just delete the script of data2sd or app2sd from /etc/init.d, would it make sure that none of them will be getting used.
Click to expand...
Click to collapse
if you want to switch to appsd2 delete hybriddata2sd from init.d...then go to sdcard/android/data/g3mod/...and delete fs.data2sd...that should work....
Sent from my hybrid sg3
Kyorarom Infinity b2 powered by hillbeasts test 073 OC

I replied to your comment in kyrillos thread...
I said try deleting the files that you place into your sd card to enable hybrid data2sd when you flash kyrillos. This might be the reason. I'm not very advanced when it comes to technology so i'm limited to how i can help

Please (to the OP)
Donot go about opening new threads like this.
You have already posted your problem in the ROM thread.
Wait for the answer here http://forum.xda-developers.com/showthread.php?t=957123 or you can check here http://forum.xda-developers.com/showthread.php?t=1058071
Cheers!

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.

[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.

How do I convert rfs to ext2 or ext4 MANUALLY?

How do I convert partitions manually? What are the commands or procedures without using software?
If you have fugumod or g3mod kernel you can put a fs.convert in their respective folders.
Just make a file with notepad and write for example:
stl6 ext4
And save it without .txt extension and put in /sdcard/Android/data/fugumod (if you use fugumod) or sdcard/Android/g3mod (if you use fugumod)
Remember:
stl6 is system
stl7 is data
stl8 is cache
ale_bot from xda app
I said I wanted to know the manual method But thanks for you willing to help!
Because I have another Android phone as well and I want to make a universal file system conversion application... To make life easier for every Android owner.
I was hoping someone could tell me everything I needed...
djjonastybe said:
I said I wanted to know the manual method But thanks for you willing to help!
Because I have another Android phone as well and I want to make a universal file system conversion application... To make life easier for every Android owner.
I was hoping someone could tell me everything I needed...
Click to expand...
Click to collapse
For that u'll need the kernel to support the fs so it cant be universal
also the manual way is different in different devices
P.S. : This ain't development, ask your questions in general or q/a
Please notice that even if you do convert manually, kernel is still supposed to support ext2/4 file system. Stock kernel does not support it, so in some way you have always to take in consideration which kernel you are running.
My kernel supports ext2
All I need is now some scripts...
for example /dev/stl12 is /system
djjonastybe said:
My kernel supports ext2
All I need is now some scripts...
for example /dev/stl12 is /system
Click to expand...
Click to collapse
I think "universal" is not so easy possible as you would like. Every device has another hardware and so the OS (although it's android) is not the same...
On Galaxy 3 the /system parition is /dev/stl6... not stl12
There is the app G3mod by Dympy / Dharam.
The "manual" way is advised here for you (convert.fs - file)
both ways only work on G3 with fugmod or G3mod-kernel...
If you wanna make your own "universal" app you need to do it the linux-way with mkfs -t ext?? /dev/stl??
with manual commands or within a script (maybe with cases --> "universal") in adb shell during CWM or script at booting, as the filesystems must not be mounted while converting!
However you won't be coming around learning to handle linux!
So I can do this?
su
mount -o remount,rw /dev/stl12 /system
busybox cp /system/* /sdcard/system_backup/
reboot recovery
Click to expand...
Click to collapse
# Now we are in CWM and we unmount /system manually (unless someone gives me the command I can replace this with the command to unmount /system???)
mkfs -t ext2 /dev/stl12
mount -o remount,rw /dev/stl12 /system
busybox cp /sdcard/system_backup/* /system/*
chmod 644 /system/*
sync
reboot
Click to expand...
Click to collapse
Do you think this process would work??? OR do I need to do something more? I believe ALL my commands are correct. Can I proceed or do I have to declare something somewhere so Android knows it's ext2 or is this fine ?
I hope this is ok ? I am going to try it out in two hours...
I tried it to convert it to ext2...
The conversion went succesfull
But after reboot it detects any partition I convert to ext2 as ext4... But ext4 is not supported :/ WTF?
Should I try mke2fs instead?

[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?

[Solved] Link2sd "mount warning" fix for all samsungs and android 5.1.1+ stock ROM

[Solved] Link2sd "mount warning" fix for all samsungs and android 5.1.1+ stock ROM
Hi.
I suppose many samsung and some sony devices have the problem "mount warning" displayed by Link2sd after installing it for manage second partition on external sd card. You do not have to generate mounting scripts again and again and restart system by Link2sd's own menu option to fix this. This solution lets to mount second partition automatic in boot phase.
Thank you to Warre101 for the idea.
If you want to use Link2sd you have to have rooted device. I did it on samsung galaxy tab 4 with stock ROM 5.1.1..
The best application for make all operations is Total Commander (TC).
1. Create subdirectory su.d in directory /system where you store your script, do it in left window of TC.
/system/su.d
2. Set 700 (RWX) permision for new created directory in Propertis TC's menu option . (Long tap directory name)
3. In the right window of TC open directory : /data/data/com.buak.Link2SD/files/
4. Copy the file init-link2sd.sh from right to left window. (If this file does not exist , create your own text file and paste the content from the example)
5. Change name of this file in the left window (/system/su.d directory) to 11link2sd
6. Copy renamed file back to right window and open it in Totalcmd-Editor (installed with TC)
7. Remove not needed text , the result should be:
Code:
#!/system/bin/sh
sleep 4
mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2
8. Write changes and leave editor.
9. Copy changed file back to /system/su.d (left window). Overwrite existing file.
10. Set 700 (RWX) permision for this file . /system/su.d/11link2sd
11. Restart the device.
The new created script will mount partition needed by Link2sd for manage second partition on your external sd card during the booting phase of device/system .
This is not 100% sure if /su.d solution will work in every ROM. If you will find one not working, please comment here.
Help
Tomek0000 said:
Hi.
I suppose many samsung and some sony devices have the problem "mount warning" displayed by Link2sd after installing it for manage second partition on external sd card. You do not have to generate mounting scripts again and again and restart system by Link2sd's own menu option to fix this. This solution lets to mount second partition automatic in boot phase.
Thank you to Warre101 for the idea.
If you want to use Link2sd you have to have rooted device. I did it on samsung galaxy tab 4 with stock ROM 5.1.1..
The best application for make all operation is Total Commander (TC).
1. Create subdirectory su.d in directory /system where you store your script, do it in left window of TC.
/system/su.d
2. Set 700 (RWX) permision for new created directory in Propertis TC's menu option . (Long tap directory name)
3. In the right window of TC open directory : /data/data/com.buak.Link2SD/files/
4. Copy the file init-link2sd.sh from right to left window.
5. Change name of this file in the left window (/system/su.d directory) to 11link2sd
6. Copy renamed file back to right window and open it in Totalcmd-Editor (installed with TC)
7. Remove not needed text , the result should be:
Code:
#!/system/bin/sh
sleep 4
mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2
8. Write changes and leave editor.
9. Copy changed file back to /system/su.d (left window). Overwrite existing file.
10. Set 700 (RWX) permision for this file . /system/su.d/11link2sd
The new created script will mount partition needed be Link2sd for manage second partition on your external sd card during the booting phase of device/system .
This is not 100% sure if /su.d solution will work in every ROM. If you will find one not working, please comment here.
Click to expand...
Click to collapse
in the directory : /data/data/com.buak.Link2SD/files/ , i cannot find the file init-link2sd.sh, only 2 files "link2sd_b and link2sd.log" and link2sd_b cannot be edited. My account haven't post 10 posts yet, so i cannot upload image for you to check.
can i creat the new init-link2sd.sh and continue your intructions ?
My device: Samsung galaxy A7 2016 (android 6.0.1 Rusia)
Hi _DoomD_ .
You should see this file if you installed current version of link2sd. If this file does not exist, you can use other text file or create new and copy the content from the example. If you use windows, do not use copy/paste. Linux uses different end line char. You does not do it on Tab 4 I suppose ... no mater , it will work on others if only your system will support new created /system/su.d/ .
Please let us know if it will work in android 6.0.1 .
Bye
Tomek0000 said:
Hi _DoomD_ .
You should see this file if you installed current version of link2sd. If this file does not exist, you can use other text file or create new and copy the content from the example. If you use windows, do not use copy/paste. Linux uses different end line char. You does not do it on Tab 4 I suppose ... no mater , it will work on others if only your system will support new created /system/su.d/ .
Please let us know if it will work in android 6.0.1 .
Bye
Click to expand...
Click to collapse
At step 8, i couldnot save changes. It gived me a writing error. I tried to change permission but it didnot work. I couldnot finish your intruction using totalcommand. I tried to use root explorer to edit and finished your intruction. But mount warning didnot fix.
I think your solution cannot work on android 6.0.1. Now i use apps2sd instead. Anyway, thanks for your help.
The problem with saveing exists in /system/... location. This is a reason i write abot coping renamed file back to link2sd's subdirectory and do all changes here. If your TC has root permision, it saves changes here. If this is not working, I do not know where is a source of problem.
File permision 700 lets the root do anything with file. TC with root permission uses root priv. for this operation. Maybe wrong owner of file, should be root...
A nifty thing one can do on a setup without built-in init.d, but recent SuperSU root with su.d, is to create and bind system/etc/init.d. I use a script in su.d to do this:
00000mounts:
Code:
mount -o bind,rw /su/su.d /system/etc/init.d;
In my case, I'm using systemless root, thus the '/su/su.d' location. Change it to your su.d folder location if it differs. This one line gives what amounts to standard init.d support, and any apps that create init.d scripts will see the /system/etc/init.d folder, use it, and their scripts end up in su.d and get executed on boot by SuperSU.
(And yes, this makes link2sd mounting work out of the box. Well, YMMV, but it worked for me.)
Filesystem for the second partition.
Code:
#!/system/bin/sh
sleep 4
mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2
The important thing is that if you are using different filesystem for the second partition you should change `ext2` after `mount -t` to whatever filesystem you use. Maybe someone has posted it already but I do not have a time to check it. In my case I use `ext4` so it looks like this:
Code:
#!/system/bin/sh
sleep 4
mount -t ext4 -o rw /dev/block/mmcblk1p2 /data/sdext2
After this change Link2SD works perfectly on my Samsung Galaxy J3 (2016) aka SM-J320FN with stock Samsung ROM. Thanx.
@HostisSupremus
it has sense. I am always format it to ext2 on all my devices because of undelete support for ext2 and a lack of this support for ext4.
I found interesting fact on some of my devices . When you install link2sd, it wants to create initial script when you have to select your filesystem of second partition. I have always ext2, but some my devices works if I select ext2 and some do not. If do not, it works if I select ext4 , and it works with realy ext2 phisical partition. I do not know why .
dosent work for me, samsung galaxy tab a6 2016 android 5.1 rooted with magisk
This is what finally worked for me after three days of trying everything, thank you OP, you are my saviour
Difficult to believe after all these years of development link2sd does not verify init.d support.
I am using LOS 14.1 (Android 7.1) on my LG L70 and encounter the same mounting-failed problem.
I pull the file init-link2sd.sh out and it reads:
set +e
echo "$(date) mounting..." > $LOG
sleep 2
mount -t vfat -o rw,uid=1000,gid=1000,umask=133,dmask=0002 /dev/block/vold/public:179_66 /data/sdext2 1>>$LOG 2>>$LOG
mount -t vfat -o rw,uid=1000,gid=1000,umask=133,dmask=0002 /dev/block/mmcblk1p2 /data/sdext2 1>>$LOG 2>>$LOG
mount >> $LOG
echo "$(date) mount finished" >> $LOG
chmod 773 /data/dalvik-cache
Is there anything wrong? Why the 2nd partition can be mounted automatically at boot?
Also if there is a problem can I edit the file then push back directly?
I tried to edit the file init-link2sd.sh and pushed it back to phone. Not working...
thanks.
perfect..
my DEVICE J320G:good:
As a magisk user, I created a mount .sh script at /sbin/.magisk/img/.core/post-fs-data.d which seems to execute at boot time but not solve the issue

Categories

Resources