yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] idkmanimjustlookingforans:
I'll try this, but should I move the folder manually or use the a2sd app link functionality that moves the game data(ext) folder and then create an empty folder with the same name in "/mnt/runtime/write/emulated/0/Android/data" and use the Folder Mount applet to target the game data(ext) folder on my external SD card? does the partition and partition FS matter?

I tried using the Folder Mount applet on its own before, I recall it involved moving the files from one location to the next, following this step won't move the game data(ext) folder from where I want it, will it?

Lol, please stay with me here, I'm far from an android dev or guru, just a guy who's too broke to buy a phone with 256gb internal :D

Hi again, hope you aren't tired of me yet, I don't recall seeing any art or infographic on how to link it properly. Well, now I just tried using A2sd, I used the "Link app" feature to link only the Data(Ext) from "/mnt/runtime/write/emulated/0/Android/data/appname" to "/data/sdext2/Android/data/appname" in the second partition.

I made sure there was a folder with the same name in "/mnt/runtime/write/emulated/0/Android/data" (though when I checked, it was already there and it was 0B) then I used the folder mount function and set the above paths to source and destination folder respectively, I un-ticked all boxes and saved it, then I switched it on by tapping "Mount Only". Is that the correct way? because I rebooted my phone, mounted everything and it didn't work, the game still doesn't recognise the linked Data(Ext) folder.

Just earlier this month, on the same ROM, I was able to achieve all this with a single tap of a button in Link2SD and an un-partitioned SD card, 😔
[Android Apps and Games] sieger007:
I think had to level down. Let s try baby steps

send me the output of the following i assume your rooted. Open up an adb shell prompt or termux and type

1) mount

2) du -hs /mnt/runtime/write/emulated/0/Android/data/app

ls -al $_

du -hs /data/sdext2/Android/data/app

ls -al $_

3) getenforce
also
4) du -hs and ls -al on /data/data/appname

/CODE]
[Android Apps and Games] idkmanimjustlookingforans:
Ok, I'll create an empty folder with the same name in the destination directory, will run the code and tell you what I get.

Hi, so the game's data is currently in "/mnt/runtime/write/emulated/0/Android/data/com.miHoYo.GenshinImpact", I made an empty folder like this "/data/sdext2/Android/data/com.miHoYo.GenshinImpact" then I ran everything above on my laptop connected to my device in ADB mode, I pasted 2) in a single line, I hope that's ok, I tried making a .bat file but I failed to run it, idk lol

here's the output;
[Android Apps and Games] sieger007:
ok sorry I was off counter.... My WhatsApp has becomes F**App it does not let me in anymore .

Based on this

/mnt/runtime/write/emulated/0/Android/data/com.miHoYo.GenshinImpact/cache
25G /mnt/runtime/write/emulated/0/Android/data/com.miHoYo.GenshinImpact
du: ls: No such file or directory
du: mount: No such file or directory
du: du: No such file or directory
4.0K /data/sdext2/Android/data/com.miHoYo.GenshinImpact
du: ls: No such file or directory
du: mount: No such file or directory
1|joyeuse:/ # getenforce
Permissive
joyeuse:/ # du -hs /data/data/com.miHoYo.GenshinImpact
18M /data/data/com.miHoYo.GenshinImpact
joyeuse:/ # ls -al /data/data/com.miHoYo.GenshinImpact

do these steps

1) MagiskManager --> settings --> Mount settings --> Global Mount Space

2) df -h /data/sdext2

should be at least 30G+ see cover 25G and going for your game

3( Run this command on adb prompt or termux

1st backup your game data some place

3) pm disable com.miHoYo.GenshinImpact

4)

see the onwership of /mnt/runtime/write/emulated/0/Android/data/com.miHoYo.GenshinImpact

ls -al /mnt/runtime/write/emulated/0/Android/data/com.miHoYo.GenshinImpact

e.g. ua_112x:media_rw /mnt/runtime/write/emulated/0/Android/data/com.miHoYo.GenshinImpact

cp -r /mnt/runtime/write/emulated/0/Android/data/com.miHoYo.GenshinImpact /data/sdext2/Android/data/

after you backed up you can delete the source data

rm -rf /mnt/runtime/write/emulated/0/Android/data/com.miHoYo.GenshinImpact/*

remember the parent dir has to be kept . Contents to be deleted. This is not compulsory. EVEN if you dont do after bind mount you will write to sdext2 just that your phone will carry 2X data for the game

chown new dir to same owner and user

chown -R ua_112x:media_rw /data/sdext2/Android/data/com.miHoYo.GenshinImpact

make it rw just to be sure

chmod -R 755 /data/sdext2/Android/data/com.miHoYo.GenshinImpact

5) after copy is over confirm dir is empty if you chose to del

du -hs /mnt/runtime/write/emulated/0/Android/data/com.miHoYo.GenshinImpact

should be like 4K to 12K around depending on main or sub dir

6) bind mount . There are other cool ops also in bind check them out if needed

mount -o,bind,rw /data/sdext2/Android/data/com.miHoYo.GenshinImpact /mnt/runtime/write/emulated/0/Android/data/com.miHoYo.GenshinImpact

7) finally check if its working

ls -al /data/sdext2/Android/data/com.miHoYo.GenshinImpact

du -hs $_

8) enable app and see if it works

pm enable com.miHoYo.GenshinImpact

You have to do this at every boot. So you can write a prog that runs under service.d ( /data/adb/service.d ) to do that at boot or do this everytime u reboot else game wont work

( size shuld be 25G+ )

should work
[Android Apps and Games] idkmanimjustlookingforans:
Thanks, I'll give this a shot

are you referring to just step 6? Can apps2sd do this? cuz I have no idea how to automate it as you suggested
[Android Apps and Games] sieger007:
yes a2sd -->> folder mount. move the dat urself upto 5. Dont let a2sd do it cos it lousy. Move is 1 time. Then on use :mount only op
[Android Apps and Games] idkmanimjustlookingforans:
This is what I see in termux:

0/Android/data/com.miHoYo.GenshinImpact <

total 14

drwxrwx--- 3 u0_a309 everybody 3488 2024-06-28 00:23 .

drwxrwx--- 85 root everybody 8192 2024-06-28 16:34 ..

drwxrwx--- 11 u0_a309 everybody 3488 2024-06-27 16:41 files

sigh, It didn't work, followed each step religiously, though I'm not sure about step 4

I input:

chown -R u0_a309:media_rw /data/sdext2/Android/data/com.miHoYo.GenshinImpact
[Android Apps and Games] sieger007:
did u run this on termux or adb . what happens

mount -o,bind,rw /data/sdext2/Android/data/com.miHoYo.GenshinImpact /mnt/runtime/write/emulated/0/Android/data/com.miHoYo.GenshinImpact

then do

ls -al both source and target should look alike

also

mount | grep -i com.miHoYo.GenshinImpact
[Android Apps and Games] idkmanimjustlookingforans:
Will try it, guess apps2sd just won't work in this case

in termux, I get

mount | grep -i com.miHoYo.GenshinImpact <

/dev/block/mmcblk0p3 on /mnt/runtime/write/emulated/0/Android/data/com.miHoYo.GenshinImpact type ext4 (rw,seclabel,noatime,data=ordered)

ls -al both dir looked identical, I'm about to try the game

Ok, so I checked the folder size at /mnt/runtime/write/emulated/0/Android/data/com.miHoYo.GenshinImpact

It's 25G, and I have free space on my internal storage, which means it was successfully mounted right? I launch the game and it starts downloading data again, I'm gonna try and do everything again step by step and see what happens.
[Android Apps and Games] sieger007:
mount | grep -i <appname>

should list the mounting I mentioned zbove then your good
[Android Apps and Games] idkmanimjustlookingforans:
I'd already used that command, but it didn't give me the desired result. I'm gonna do everything from scratch and see how that goes, I may have messed up somewhere

I'm trying to delete both folders but it's not letting me, is the mount getting in the way?

Also, how do I disable truncation in termux or cmd prompt on PC?

did all the steps, It didn't work, the game just won't listen, keeps downloading new data :(
[Android Apps and Games] dbzzz:
Well, is it possible to change link2sd code (not by me - by you :) ) so that custom recoveries can store ext partition too?

Are there some obstacles because of app2sd compatibility? If not, why not to do that? ;) Unfortunately, I don't know how app2sd works (in deep), but I think that custom recoveries assume that app2sd is used when doing ext partition backup. And if so, we probably can "spoof" them so that ext partition used by link2sd can be stored.

Am I right?.. in general :)

It's very... strange to do full backup from recovery and not save ext partition :) All my symlinks will be broken, and I can format ext partition at all, and having no backup for it I cannot restore my data. Maybe it's not a deal of link2sd and not your deal, I don't know, really. Please, clarify.

Thanks!
[Android Apps and Games] erickwill:
Thank you very much!

First of all, thank you very much for your handy and very useful application! I really appreciate that!

I just wondering if is possible to create a "Batch" feature to link many applications in a batch to SD Card, similar as Titanium Backup Batch. It would be a very useful feature for people that constantly re-flash their devices like me.

Thank you very much!

Regards,

Erick
[Android Apps and Games] bakpinar:
You can create a symlink to "spoof" your custom recovery.

ln -s /data/sdext2 /system/sd

By the way, I'm planning on adding a backup/restore function for a future release.
[Android Apps and Games] dbzzz:
Great news!!!

Thank you very much for your hard work!
[Android Apps and Games] BMFDUARTE:
That´s what i´ve already done, format SD card in mobile, creat FAT32 and ext2 in MiniTool Partition, put then in SD slot and same problem :(

Thanks for help till now

Best regards
[Android Apps and Games] donetus:
great app but here are some of the 'problems' that i've encountered with the app.

1. i have an ext3 partition on my memory card and when i was prompted with an option as to what i should use and i selected 'ext3', it failed to mount the said partition.

2. moving the dalvik-cache of the app works but if you go to Market, it no longer doesn't see the app that you've downloaded and installed thus losing the option of updating a certain app if they've released a new version
[Android Apps and Games] dbzzz:
One more question - should it be exactly ext2 partition, or it can be any ext2/ext3/ext4/fat32?

Just tried many times on both custom recoveries and had no success...
[Android Apps and Games] bakpinar:
1. This is not a Link2SD error, your kernel gives the error when executing mount.

Try select "ext2", it will work with ext3 partition (backward compatibility).

2. use "Market Fix"
[Android Apps and Games] twredsea0726:
Dear Bakpinar, When will the next version release? Thanks!!
[Android Apps and Games] donetus:
oh i see .. thanks .. it's working .. :D
[Android Apps and Games] bakpinar:
I hope I can release a new version by the end of next week. It will be version 1.5.2.

Listed below are changes and new features (more or less).

- added ability to link updated system apps (that are located in /data/app)

- added "Clean up the 2nd partition" menu

- added "Clean up the dalvik-cache" menu

- optimized refreshing of the app list after linking

- changed App2sd checking

- added support in detecting and mounting the second partition for some roms

- some bugfixes
[Android Apps and Games] matthack:
Hmmm

right i installed this on my X10 and no problem so figured i install it on my sons Samsung Galaxy 5 I5500 so its rooted with SU but it just wont let me get it to work:(

ive tried second partition both with FAT32 and as ext2 but nada... and i i got TB installed with latest busybox and still it wont let me run it. just get that "mark what partitionformat FAT32/ext2/3/4 and after it gets root permission its back to reboot phone so it doesnt let l2sd mount part 2 any ideas why?
[Android Apps and Games] twredsea0726:
Dear Bakpinar,

Thank you very much.
[Android Apps and Games] pingwin321:
If I may suggest...

Maybe it would be a simple yet flexible solution to add an "Advanced parametres" section to the Link2SD menu and place a new option there: "Mountpoint to look for:".

The default value of this parameter would be "/data/sdext2", but it could offer a list of all mounted partitions of SD card... If you like Link2SD to use different partition, you will be able to choose it here.

This way Link2SD could cooperate with App2SD. If you have App2SD and it uses the second SD partition, but the SD card has eg. 4 partitions, you could choose the right partition for Link2SD here.
[Android Apps and Games] mauam:
Thanks alot for this app bakpinar,:)
[Android Apps and Games] ChungHung.Chen:
Dear bakpinar,

Some question about procedure after factory reset / wipe data.

Is any easy way to quick recovery linked app??

Since APK & dex file is remained in SD card, so copy them back into /data/app and reboot??

Or we can just re-install Link2SD and Link2SD can detect & re-create the link?

Perhaps this will be feature question because of Ti Backup / MyBackup can't backup linked apps.

BR,

Chung-Hung
[Android Apps and Games] bakpinar:
Yes, this would be the easiest way. Just copy APKs from sdcard 2nd partition (/data/sdext2) to /data/app and reboot. dex files will be regenarated in /data/dalvik-cache.

Then you can re-link your apps. One by one for now, I am working on batch (multi) linking/unlinking.
[Android Apps and Games] nibras_reeza:
you should be root and the apps should be killed before you do this. am scared to try this because if these files ate needed at boot time, it might brick the device.
[Android Apps and Games] donetus:
if incase i have to repair my phone via SEUS or PC Companion, do i have to reinstall the apps?

i've been an app2sd user so once you enable app2sd, all apps are automatically present.
[Android Apps and Games] ChungHung.Chen:
Dear bakpinar,

How about Link2SD auto detect apk in SD but not in /data/app, then notify user for re-link?

It should be more friendly. Perhaps this could be in wish list?

BTW, move apk back to /data/app is best way for now.

Thanks for your great work.

BR,

ChungHung
[Android Apps and Games] TangVLD:
After 5-10 seconds after starting, the application is shut with the error in com.buak. Link2SD.apk

xperia x10
[Android Apps and Games] bakpinar:
seems that automount script (/system/etc/install-recovery.sh) does not work on some phones.

Therefore I've changed the application and uploaded new release.

In new release Link2SD does not mount ext2 partition at startup, instead, it only creates automount script and asks for a restart.

After restart if ext2 is mounted you can create link for applications, otherwise not.

Much safer...

You can install the new version (1.0.4) from first post.
[Android Apps and Games] AllGamer:
looking forward to try the new version

thanks!
[Android Apps and Games] bakpinar:
FAT16 or FAT32, doesn't matter.

What is important is FAT partition should be first partition.
[Android Apps and Games] marro93:
Thanks a lot its works good on my phone ( Lg GT540 2.1 uptade 1 ) Sorry for my poor english ;)
[Android Apps and Games] Riley600:
It was unable to mount the ext2 partition in 1.0.3 on my Motorola XT720 (I have it set up properly, as it works with Apps2SD and App2Card). I tried 1.0.4 but I'm still getting the error that it can't mount the partition. Is there anything I can try in order to remedy this situation? I really like the idea of your program and would like to use.

Strangely enough, if I start App2Card first - then Link2SD will see the partition.
[Android Apps and Games] Thambom:
I followed your instructions, but when I opened Link2SD it said "ext2 not found - Make sure you have ext2 partition on your SD card....."

What did I do wrong and how can I fix it :(

Thanks :)
[Android Apps and Games] altma001:
yes. make sure to copy your backed up files back onto your sd card prior to turning off your phone. this eliminates the issue for me
[Android Apps and Games] bakpinar:
Have you tried with the new version (1.0.4) ?
[Android Apps and Games] xCookie:
Suggestion...

Can I suggest something to the developer of this GREAT piece of software? :D

If yes, here it is:

Why don't you put a script (or something) for reverse linking automation?

For example:

Link2SD create a list of apps that are linked and then if user want to mount a card as usb mass storage or want to safely remove card - then Link2SD start with reversing from card to internal... when card is remounted Link2SD check the card and then do the autolinking/copying of those apps in the list back to the card. :eek:

Only problem with this is capacity of phone memory (smaller then on card) but then again the user himself can choose within Link2SD which apps to be auto relinked... like checkbox or similar.

What do you think? :rolleyes:

p.s.-Something like this Link2SD already do at the phone booting.
[Android Apps and Games] bakpinar:
Thanks for your suggestion, I will consider this feature for a future release.

Currently I'm working on to make Link2SD usable on more roms.

Meanwhile I would like to point out that if you mount your sd card as usb mass storage, applications which are linked by Link2SD will not be affected, they will run without any problems.
[Android Apps and Games] Riley600:
My assumption is that the path is wrong in the mounting script - which is why it cannot mount the partition. Is there any way to find the proper path and then manually edit the script to point that way?
[Android Apps and Games] MegaBubbletea:
Do you mean when you connect to PC via USB?

Also...

I have partitioned my 8GB MicroSD into 6GB(FAT) and 2GB(ext2).

I linked some apps (Angry Birds, Fruit Ninja) to SD.

Rebooted. (Turning off and turning on phone)

However on startup, the apps does not display the app icon and displays the app name as com.rovio..... etc

When try to launch will always FC.

I have tried relinking but no luck.

Any help? Suggestions? Ideas?

[LG GT540 v2.1 Stock]
[Android Apps and Games] bakpinar:
Yes, connect to PC as mass storage. Android unmounts FAT partition and make it visible to PC as a drive for this. But ext2 mount remains, that's why linked applications are not affected.

Broken Android permissions may cause force closes.

Can you try to re-install one of the applications which has force close problem, and then if it works create link again with Link2SD.
[Android Apps and Games] MegaBubbletea:
I reinstalled one of the apps, then created link. Reboot. Still cannot open. FC and missing icon.

I am thinking that maybe the MicroSD card is not mounting fast enough for the system to load the apps...

Also...

Should I try using ext3 or ext4 instead?
[Android Apps and Games] vanguard7:
Hi,

no porblmes so far with new version.

thank you very much.
[Android Apps and Games] MegaBubbletea:
Yes I am using the latest version.
[Android Apps and Games] romualdrichard:
Hi, I am using 1.0.4 but no the ext2 partition is not mounted.

Android 2.2.1 htc desire hd 1.72 rooted.
[Android Apps and Games] narendrakini:
Super app. Works fine on my x8... (instead of "Create link" change the word to "Move To SD Card" )
[Android Apps and Games] rnayden:
hello,

I am using it on gt 540 (2.1-update1), but sometimes during the day the card is auto-remounted and then the apps that are on the ext2 partition are not visible.

This is making the phone to restart and is showing only ANDROID screen, which makes me go and remove the battery to start it back again, which eventually makes everything back to normal.

What might be causing this behavior?

rooted with superuser v2.3.6.1, su binary v2.3.1-ef
[Android Apps and Games] boardlord:
Hmm. It seems no N1 users on CM6.1.1 are among us. Regardless, I tried it and Link2SD failed to detect the *mounted* sd-ext partition (used firerat's sd-ext mount script, as CM6.1.1 doesn't mount the ext partition by default).

Output of mount:

Microsoft Windows [Version 6.1.7600]

Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\AndroidSDK\android-sdk-windows\tools>adb shell

# su

su

# mount

mount

rootfs on / type rootfs (ro,relatime)

tmpfs on /dev type tmpfs (rw,relatime,mode=755)

devpts on /dev/pts type devpts (rw,relatime,mode=600)

proc on /proc type proc (rw,relatime)

sysfs on /sys type sysfs (rw,relatime)

tmpfs on /mnt/asec type tmpfs (rw,relatime,mode=755,gid=1000)

/dev/block/mtdblock3 on /system type yaffs2 (ro,relatime)

/dev/block/mtdblock5 on /data type yaffs2 (rw,nosuid,nodev,relatime)

/dev/block/mtdblock4 on /cache type yaffs2 (rw,nosuid,nodev,relatime)

/dev/block/mmcblk0p2 on /sd-ext type ext2 (rw,noatime,nodiratime,barrier=1,data=

ordered)

/dev/block/mmcblk0p2 on /data/dalvik-cache type ext2 (rw,noatime,nodiratime,barr

ier=1,data=ordered)

/dev/block/mmcblk0p2 on /data/app type ext2 (rw,noatime,nodiratime,barrier=1,dat

a=ordered)

/dev/block/mmcblk0p2 on /data/app-private type ext2 (rw,noatime,nodiratime,barri

er=1,data=ordered)

/sys/kernel/debug on /sys/kernel/debug type debugfs (rw,relatime)

/dev/block/vold/179:1 on /mnt/sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,r

elatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,

iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)

/dev/block/vold/179:1 on /mnt/secure/asec type vfat (rw,dirsync,nosuid,nodev,noe

xec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=c

p437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)

tmpfs on /mnt/sdcard/.android_secure type tmpfs (ro,relatime,size=0k,mode=000)

#

Output of ls -l /dev/block

ls -l /dev/block

brw------- 1 root root 7, 0 Mar 8 15:25 loop0

brw------- 1 root root 7, 1 Mar 8 15:25 loop1

brw------- 1 root root 7, 2 Mar 8 15:25 loop2

brw------- 1 root root 7, 3 Mar 8 15:25 loop3

brw------- 1 root root 7, 4 Mar 8 15:25 loop4

brw------- 1 root root 7, 5 Mar 8 15:25 loop5

brw------- 1 root root 7, 6 Mar 8 15:25 loop6

brw------- 1 root root 7, 7 Mar 8 15:25 loop7

brw------- 1 root root 179, 0 Mar 8 15:25 mmcblk0

brw------- 1 root root 179, 1 Mar 8 15:25 mmcblk0p1

brw------- 1 root root 179, 2 Mar 8 15:25 mmcblk0p2

brw------- 1 root root 179, 3 Mar 8 15:25 mmcblk0p3

brw------- 1 root root 31, 0 Mar 8 15:25 mtdblock0

brw------- 1 root root 31, 1 Mar 8 15:25 mtdblock1

brw------- 1 root root 31, 2 Mar 8 15:25 mtdblock2

brw------- 1 root root 31, 3 Mar 8 15:25 mtdblock3

brw------- 1 root root 31, 4 Mar 8 15:25 mtdblock4

brw------- 1 root root 31, 5 Mar 8 15:25 mtdblock5

drwxr-xr-x 2 root root 100 Mar 8 15:25 vold

#

As a note, firerat's a2sdext script is also installed (apps and dalvik cache on ext). But I'd like to have a gui... You should also beware that I use ext4, not ext2, this is only a cosmetic fluke.

Could you support this setup with v1.5.2? Thanks!
[Android Apps and Games] danceswithbongs:
bakpinar,

I managed to fix the issues that occurred after trying to use latest MIUI which rendered my mounting abilities to null.

As always it is now running super smooth and amazing.

Quick question for you.

Usually every once in a while I like to clear out my dalvik and have it rebuild during boot.

It seems that this is not possible to do with the dalvik on ext, so my question is if I delete the dalvik file located with the apps in data/ext2, then reboot and then click the attach dalvik button in your brilliant app, will it relink all the dalvik that was just rebuilt or does it automatically get rebuilt in a recreated dalvik folder in data/ext2.

Or do I need to leave the folder or remake on in the data/ext2 after deleting it and it will be automatically repopulated when dalvik is rebuilt?

thanks and if someone else has this answer, it would be great so that bakpinar doesn't have to deal with this and continue his invaluable work.

Thanks all and especially the master app man bakpinar
[Android Apps and Games] bakpinar:
I will fix in 1.5.2.
[Android Apps and Games] boardlord:
Excellent! I'd also like to donate to honour your efforts :)
[Android Apps and Games] bakpinar:
You can clear out the /data/dalvik-cache folder, after reboot dex files will be regenerated in that folder. Then you can re-link all the dex files with "Link dalvik-cache files" menu at once.

Good news is that, the new version (1.5.2) will have "Clean up the dalvik-cache" and "Clean up the 2nd partition" functions and you can use these functions to clean up instead of manual delete operations.