yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] zdoe:
yes, saw the youtube tutorial. i believe i'm doing things the way i'm supposed to.

attached an XML of a similar mount that's also not working. a system app can write to source, a non-system one can't write to either source or target. (though when i first had created this bind, it seemed to work on initial testing.)

and it can't be switched off. the app asks if i want to copy files, then does something, but the mount remains on. the only thing i can do is to delete the bind.

and yes, this is similar as the one i really need, internalSD > externalSD. i deleted that bind and restored a TWRP to get the app back on.
[Android Apps and Games] martyfender:
I updated my post with the by name; p3 is the 2nd partition, p2 is the meta.

so this with an .sh file extension?

if ! mountpoint -q /data/sdext2
then
mount -t ext2 -o noatime,rw /dev/block/mmcblk1p3 /data/sdext2
fi

Then select that created file in the task scheduler creator?
[Android Apps and Games] vickybonick:
Goto Script manager and create a root script with below code then goto Task scheduler and create a Script task

if ! mountpoint -q /data/sdext2
then
mount -t ext2 -o noatime,rw /dev/block/mmcblk1p3 /data/sdext2
fi
[Android Apps and Games] vickybonick:
What is your Android version and are you using Magisk?
[Android Apps and Games] martyfender:
After I created it in Linux Mint and copied it through mtp, I had figured out that I needed to do it in your script editor. I had forgot you had one built in.

I have created it an I will let you know later if it works, or not.

I have to get ready to go to work.

Thanks, Again
[Android Apps and Games] zdoe:
android 7.0 (moto 5G stock), magisk 11.6 (the one that roots this).
[Android Apps and Games] vickybonick:
does it use esdfs filesystem instead of fuse or sdcardfs? if so then bind will not work
[Android Apps and Games] martyfender:
I get in the script manager log:

syntax error: 'if' unmatched

script finished with exit code: 1.

I am out of time to type all of it though, it has a path: /data/user/in.co.pricealert.--------------------------.
[Android Apps and Games] vickybonick:
Import the script in the script manager.

Let me know if the 2nd partition is mounted on vold or normal block (e.g /dev/block/mmcblk1p3 or /dev/block/vold/public:[\d]+,[\d]+). If so I'll edit the script
[Android Apps and Games] zdoe:
according to diskinfo, the data partition is f2fs. if this is not bindable, maybe it could be reformatted to something that is? and restore its data from TWRP....
[Android Apps and Games] martyfender:
I believe it is normal block because I see vold as: disk:179,64 and public: 179,65 before I even mount the second partition with: remount 2nd partition in:link apps to SD card.

Actually, looking at the times of those, I am not really sure, after all.

When I look at mmcblk1p3->/dev/block/mmcblk1p2 I see the date and time the same as vold: 12:45AM.

I tried your script by importing to the script editor and then to the task scheduler. When I run it in the task scheduler I get: a dialog box: running please wait, forever. I have to quit apps2sd in to recent items to stop it.
[Android Apps and Games] vickybonick:
Can you attach the output of mount
[Android Apps and Games] vickybonick:
I meant the sd cards (emulated and external) . Please attach output of mount
[Android Apps and Games] vickybonick:
I don't see the 2nd partition in the output. Please mount it then attach the output again
[Android Apps and Games] martyfender:
See the attachment.
[Android Apps and Games] vickybonick:
The script is correct. Run the script in script manager and make sure it's working
[Android Apps and Games] martyfender:
I get: SD card 2nd partition already mounted!

script finished with exit code: 0.

but the 2nd partition is not mounted. I can mount it in link apps to SD card, though.

Thanks
[Android Apps and Games] vickybonick:
Remove the mountpoint check then just keep the mount command
[Android Apps and Games] martyfender:
Here is a logcat from my device:

https://pastebin.com/QZunJw40

---------- Post added at 01:53 AM ---------- Previous post was at 01:50 AM ----------

Sorry, I'm not sure what you mean?

This:

if ! mountpoint -q /data/sdext2

then

?

This is what I have now:

<?xml version="1.0" encoding="UTF-8"?><apps2sd><script><name>Mount 2nd partition</name><content>#!/system/bin/sh

if ! mountpoint -q /data/sdext2

then

if mount -t ext2 -o noatime,rw /dev/block/mmcblk1p3 /data/sdext2

then

echo "SD card 2nd partition mounted @ $(date)"

fi

else

echo "SD card 2nd partition already mounted!"

fi</content><root>1</root><close>0</close></script></apps2sd>

Thanks
[Android Apps and Games] vickybonick:
Try this script
[Android Apps and Games] martyfender:
mount: Device or resource busy

Script finished with exit code: 0

I check the root box.

apps2sd logcat:

https://pastebin.com/HBNSfsRp

This may be a lost cause.
[Android Apps and Games] vickybonick:
That means it's already mounted
[Android Apps and Games] martyfender:
But at /data/sdext2 it shows a empty in both Total Commander and Mixplorer, unless I mount it in Link apps to SD card: Remount 2nd partition. I then see all of the 2nd partition directories.
[Android Apps and Games] vickybonick:
Disable mount name separation if you're using SuperSu or set it to Global namespace if you're using Magisk. If this doesn't solve the issue then I'm out of ideas
[Android Apps and Games] koyo:
When I restore apps, are they supposed to be partially linked? It seems like I restore the apps but then I have to relink them. And it seems like I have to relink the ENTIRE apps. This makes for duplicates in the 2nd partition, which needlessly fills it up.
[Android Apps and Games] vickybonick:
Use the broken app cleaner to remove leftover files
[Android Apps and Games] martyfender:
Yes, it is disabled in Supersu. Did you find anything revealing in the provided logcats?

Thank You for all of the effort. I look forward to the next version of Apps2sd. It gets better with every version. I am discovering some of the features in the Pro version and the restore apps(sdext2) is the most important feature I was missing on my newer, working great, devices.

Thanks once again.
[Android Apps and Games] vickybonick:
I don't see any issue
[Android Apps and Games] treble1:
Dear Vicky: Thanks to your great app & broken app cleaner, I have just regained almost 1GB of disk space.

The only issue which I can't seem to resolve is updating apps installed in adopted storage.. The updates get re-installed in the internal sd card instead of adopted storage. What is your advice on this to make sure adopted apps are updated properly.
[Android Apps and Games] chandr1000:
It didn't work.

looping external storage path check script were added to address this problem, but the apps periodically changed the modified mount script.

This script will wait until defined file path is detected (due to external sd card not mounted) and mount it.

I'm using image file to avoid sd card re-partition. So i wrote "/path/to/extsd/<image_file>.img" on the textbox as replacement.
[Android Apps and Games] elbarto0:
is it working with andorid 7 ? i have made a partition for fat32 and a partition ext4 but in my huawei p8 lite 2017 shows only the fat32 partition

is it normal ?
[Android Apps and Games] vickybonick:
Mounting ext2/ext3/ext4/f2fs filesystem to other filesystems doesn't work due to permission issues
[Android Apps and Games] zdoe:
so how did the folder mount app developer succeed in doing exactly that? or - the permissions have changed with later versions of android?
[Android Apps and Games] vickybonick:
It works between emulated storage and sd card. Emulated storage is mounted as fuse or sdcardfs or esdfs. These don't allow to set permission, owner, group or selinux context. You can create these pairs with Apps2SD Folder mount as well
[Android Apps and Games] tjaschka:
odex link keeps linked app stop working

Hi, if I link the odex part of some apps (e.g. Airbnb) the apps won't start and end after 1s with the app stopped message. While other apps (e.g. Iberia) are working with linked odex. (Linking everything else is working fine)

I have on my S5 MM (Super slimfit) and superSU root. I'm using the pro version and have on every start the recommended SDFIX task. Is it a known problem? Can I support more information?

Cherio
[Android Apps and Games] zdoe:
the full path of the folder i want to mount on externalSD is: /storage/emulated/0/tencent/MicroMsg/CrypticFolderName - e.g. maybe it is "emulated storage" after all. but i though it resides on /data -partition thats f2fs. anyway, i tried the mount (as in a few posts before) and the app couldn't see the data when mounted. what gives?
[Android Apps and Games] Cadfael_the_elder:
2nd partition mount failed

Hello,

I have done : recreate mount script, then Remound 2nd partition.

Results Ok (script created, 2nd partition mounted).

SuperSU with fixes as indicated (blank space in names suppressed, allow SU during boot)

When trying to link, I get error message saying 2nd partition not mounted.

During boot, I usually get a message sying also 2nd partition not mounted. If I reboot as suggested, nothing happen.

What should I do?

My phone : Samsung Galaxy J3, rooted, running Lineage OS 14.1

-------------------------------------------------------------

Jan 02 : Solved - I re-created the partitions with Apps2SD Pro (Vicky Bonick), and everything was fixed.
[Android Apps and Games] koyo:
I attempted to convert apps Greenify, TextMe Up, and Titanium Backup to System. Suddenly, all apps started crashing and when I restarted, ALL OF MY APPS WERE GONE. What happened? This happened multiple times across multiple versions of Apps2SD (across years)
[Android Apps and Games] vickybonick:
Some apps may not work due to large odex size and slow SD card. I recommend using a class 10 UHS card
[Android Apps and Games] vickybonick:
Converting User apps to System apps may work or not work depending on your ROM
[Android Apps and Games] vickybonick:
Some users have reported mount issues with Magisk (probably due to namespace introduction). I've contacted the Magisk dev and waiting for his response.

You can set Namespace to Global in Magisk manger, reboot then mount the pair and see if it works
[Android Apps and Games] patrickdrd:
as long as the phone supports this type of card,

for us with older devices (and in major need of apps2sd on the other hand because of limited space),

I don't think it's supported
[Android Apps and Games] zdoe:
very cool.

extra hurdle - i'm on an old version of magisk (11.6) that my phone allegedly needs to stay rooted, so there appears to be no setting for the namespace.
[Android Apps and Games] vickybonick:
Is it possible to update Magisk?
[Android Apps and Games] vickybonick:
Use the fastest supported card. I may be wrong but i think UHS card is supported by almost every device
[Android Apps and Games] zdoe:
all the rooting threads for the stock ROM on moto G5 say that it needs 11.6. i have not experimented - just took their word for it.
[Android Apps and Games] martyfender:
I would ask on that moto G5 thread if anyone has tried Magisk 15.1 or 15.2. There have been many bug fixes in those two releases. V15.0, however, was a night mare.

it did not patch the boot.img properly on many devices, (mine included) and froze on the splash screen.

On 2 of my devices I am testing on, both 15.1 and 15.2 have been great after using it for several days. So, again, ask on that forum before trying it. I believe in one of the changelogs I saw mount namespace fixes of some sort?
[Android Apps and Games] vickybonick:
11.6 didn't have the namespace isolation so it may be a different issue. Follow below steps:

1) Mount a pair

2) Open respective app and see if files are accessible

3) Link obb of any game and try to play it

4) Capture logcat. Attach logcat and mention package name of the app and game

5) Open Apps2SD, goto Error report screen, set your email id, send device info from menu then pm me the email address
[Android Apps and Games] vickybonick:
Can you link the changelog?
[Android Apps and Games] martyfender:
https://github.com/topjohnwu/Magisk/commits/master

https://xdaforums.com/showpost.php?p=74158225&postcount=31

https://xdaforums.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445

I couldn't find any reference to Mount Namespace Separation in the changelogs, it was apparently posts I read on one of the many, Magisk threads I visit.
[Android Apps and Games] blooder91:
thanks
[Android Apps and Games] zdoe:
i will. however, odd as it is, i seem to be about the only one to use stock on my 5G, so the thread is inactive and likely i'll get no answers.
[Android Apps and Games] zdoe:
ok - so, have tried this, with not much success. created a pair for catlog and for camcard.

catlog reports it can't save to the mount - but also the app doesn't seem to work - nothing visible on its screen.

camcard, that initially seemed ok with this, can't save its goods either, reports incorrectly the file is not JPG when trying to scan a card, and can't read the pre-existing card images that are on the mounted pair as they should be.

while attempting to logcat from ADB with the mount on, get the following:

su
cedric:/ # adb logcat -v long > name of problem.txt
adb logcat -v long > name of problem.txt
sh: can't create name: Read-only file system
1|cedric:/ #

and - as on my previous try, unbinding the bind-pairs fails, so edit is not possible. deletion does succeed.
[Android Apps and Games] vickybonick:
Save the logcat to sdcard you are saving it in current directory (/) which is readonly. Or use Apps2SD logcat to save/share log
[Android Apps and Games] zdoe:
how do i do this on ADB? change the folder before running the adb logcat command?
[Android Apps and Games] vickybonick:
use Apps2SD logcat to save/share log
[Android Apps and Games] zdoe:
forgive my ignorance, but i don't know how to. if i go to the logcat tab of your app, i get an empty screen.
[Android Apps and Games] vickybonick:
From menu option save it
[Android Apps and Games] zdoe:
i get a toast "logcat read failure".
[Android Apps and Games] vickybonick:
Then use adb to save the logcat. Make sure output location is writable and doesn't contain spaces
[Android Apps and Games] martyfender:
Is it possible that debugging is disabled in your ROM? I wouldn't think it would be if it is stock.

You aren't by chance using lspeed and have it disabled in that app?
[Android Apps and Games] invisiblewave:
I'm getting the invalid argument error when mounting. Running Resurrection Remix (Lineage) 7.x with Magisk v15.2. I've tried the global namespace option, and also tried changing the the mount point to mmcblk1p2, both with the same result. I have two partitions on the SD card, FAT32 & EXT4, partitioned with GParted on Mint.
[Android Apps and Games] prorokrak:
Hi, could anybody help me to make the app work on my tablet?

Here is my situation:

I have SM-T805 tablet with Resurrection Remix ROM, Nougat 7.1.2, rooted with Magisk 15.2.

I have had 64GB SD card with 2 partitions: 1st partition FAT32 (or exFAT?), 2nd partition formatted as ext4.

On my previous Lollipop ROM I have used this card with Link2SD app. Since the app is not supported on Nougat I wanted to try App2SD.

After boot, every partition of the SD card is recognized by the system, and I can see files on both partitions. (see screenshots from Settings > Storage and from Total Commander).

However, when I try to mount 2nd partition in App2SD I keep getting this error:

mount: mounting /dev/block/mmcblk1p2 on /data/sdext2 failed: Invalid argument
mount: mounting /dev/block/vold/public:179_34 on /data/sdext2 failed: Invalid argument

I tried all four linking methods but result is always the same.

And App2SD cannot see the 2nd partition:

I can confirm that I /data/sdext2 directory does exist in my system.

This is the content of my /proc/partitions (in case it is helpful in any way). See also logcat in the attachment.

major minor #blocks name

7 0 65536 loop0
179 0 15388672 mmcblk0
179 1 4096 mmcblk0p1
179 2 4096 mmcblk0p2
179 3 20480 mmcblk0p3
179 4 4096 mmcblk0p4
179 5 4096 mmcblk0p5
179 6 4096 mmcblk0p6
179 7 4096 mmcblk0p7
259 0 8192 mmcblk0p8
259 1 8192 mmcblk0p9
259 2 10240 mmcblk0p10
259 3 10240 mmcblk0p11
259 4 4096 mmcblk0p12
259 5 49152 mmcblk0p13
259 6 4096 mmcblk0p14
259 7 4096 mmcblk0p15
259 8 12288 mmcblk0p16
259 9 4096 mmcblk0p17
259 10 2447360 mmcblk0p18
259 11 204800 mmcblk0p19
259 12 235520 mmcblk0p20
259 13 12333056 mmcblk0p21
179 24 4096 mmcblk0rpmb
179 16 4096 mmcblk0boot1
179 8 4096 mmcblk0boot0
179 32 61407232 mmcblk1
179 33 54852608 mmcblk1p1
179 34 6553600 mmcblk1p2

I would be very thankful if anybody could help me out.
[Android Apps and Games] invisiblewave:
Yeah, what he said! That's a far more comprehensive description of my problem, using the same ROM.
[Android Apps and Games] martyfender:
[MENTION=2031683]invisiblewave[/MENTION]

From my past correspondence with Vicky, I understand that one must use the inbuilt partition tool to create the partitions in Android 6 and above.

It uses the GUID or GPT partition scheme and creates three partitions:

The first partition is FAT32.

The second partition is a GUID metadata partition used by Apps2SD

The third partition is an Ext 2, 3 or 4 partition where your apps are moved to.

It is my understanding that no other tool can create this metadata partition.

Hopefully Vicky will clarify this if I have any of this wrong.

Outdated info in his FAQ does state that tools such as MiniTool can be used. I believe that was true with older android versions such as Android 5 using the old, MBR partitioning scheme.

I for one wish that other tools could be used for this, both in Windows and in Linux, especially for checking and repairing the partitions, but it does not sound like that is possible.

---------- Post added at 02:27 AM ---------- Previous post was at 02:14 AM ----------

Try recreating your partitions on your on your Ext. SD with the built in partition tool. I understand that is required with Android 6 and above. I don't see the metadata partition at: mmcblk1p2 and the 2nd Ext partition at: mmcblk1p3.

Vicky, I am trying to help you out here, but please clarify if I have any of this wrong.
[Android Apps and Games] vickybonick:
You are pretty much right. Also i'll check if the faq needs to be updated
[Android Apps and Games] martyfender:
It was somewhere at:

http://www.apps2sd.info/

It may not have been in the FAQ.
[Android Apps and Games] invisiblewave:
Thanks Marty!
[Android Apps and Games] martyfender:
Did that solve your problem?
[Android Apps and Games] invisiblewave:
Not sure yet. I have ~90gb on the card, so I have to back that up & run a TWRP backup before proceeding, and before that I'm going to do a little more experimentation with running the SD card as extended internal storage, which is my preferred option but last time I tried it I couldn't get the Linux MTP client to recognize the extended memory.
[Android Apps and Games] martyfender:
I have never tried adoptable storage, myself, as I don't want to lock down my External SD to one device only.
[Android Apps and Games] invisiblewave:
I'm not particularly keen on the idea myself either. I'd be a lot happier if it worked with a data & app partition on the card, but I'd live with it if it was truly an extension of the internal storage, but my initial testing indicates otherwise. MTP sees the phone as only having 16gb total, so the only way to get external data in and out is through something like Wifi Explorer, where an app on the phone (other than MTP) is writing to storage. And don't get me started on the whole MTP nonsense.....
[Android Apps and Games] martyfender:
Yes, MTP is a mess. On Windows 7 copying is pretty reliable, but on my daily driver, Linux Mint Mate, it is very unreliable in copying. Sometimes it succceeds, often times, not. I use it mainly to copy TWRP backups to my computer.
[Android Apps and Games] invisiblewave:
I've just moved from Ubuntu 12.04 to Mint 18.3 and MTP now works as advertised, which it never did for me before. The only roadblock I've run into is the way adoptable storage seems to be viewed externally. It was almost worth the pain of configuring RAID manually now the alternate installer has been canned.....
[Android Apps and Games] invisiblewave:
I got a bit further but have run into another error. I repartitioned using the tool, the mount script now works, but when I try to move an app it fails saying "no suitable external storage available".

My storage settings shows two SD cards, one not inserted, and sdcard1 with 112gb in it.
[Android Apps and Games] prorokrak:
Thanks a lot for the tip. I will try to do that during the weekend when I have some free time. I hoped I can avoid deleting and restoring over 40 GB of data on my SD card but it seems to be not possible. Then I will provide an update.

----------------

EDIT:

Took a little bit longer but after using the in-built partiotion tool in App2SD, the SD card now works as expected. It can be used for expanding internal storage and for moving apps.
[Android Apps and Games] martyfender:
Have you tried recreating your mount script choosing the type of partition you have: ext4, ext3, ext2 or f2fs, I've su.d support on my device/I use Magisk interface, or the advanced method, then choosing "Remount 2nd partition?

Are you still using adoptable storage or portable?
[Android Apps and Games] martyfender:
Here is some info on the status of f2fs patches on the SuperSu Beta forum:

https://xdaforums.com/showpost.php?p=75130783&postcount=11796
[Android Apps and Games] vickybonick:
Use the Link apps to SD card option instead of Move to SD (native APP2SD)
[Android Apps and Games] invisiblewave:
I don't understand the instruction. After I create the script, the only option I see is to "Link Apps to SD Card". When I go into that, it brings up the list of apps, and the only option is "move to SD".

---------- Post added at 07:46 AM ---------- Previous post was at 07:45 AM ----------

Storage is portable. I'm using Magisk, and I've tried the remount option. Partition type is ext4, which I double-checked with gparted.
[Android Apps and Games] martyfender:
Go to: Link Apps to SD Card click on the app you want to link, a window will open with a pie chart, click the blue Link button, choose the select all check box in the next window that appears. I uncheck Disable app before linking option, myself, but now have this disabled in the main settings instead.

( [MENTION=6726362]vickybonick[/MENTION] : I would like to know what the purpose is of that option to disable the app before linking, in the first place?)

Now click ok and you will get a working dialog that the linking is taking place. A very large game, for example, will take quite a while to move. Then you will get a success dialog. now you can go back to the main link apps to sd card window and the app should say: linked. using the menu in the upper right you have various sorting options and you can multiselect apps there, also.

I find the multi select useful when I reinstall my Rom to remove a few system apps I don't use and foreign language keyboards, such as google play books, google play movie and tv, etc. I am very conservative here as removing the wrong system apps can really mess your system up.

In the past I have converted Greenify to a privileged system app with the convert to system app option. On my 2 tablets I am currently testing Magisk 15.3 I am using the module in it for Greenify, instead.
[Android Apps and Games] invisiblewave:
Oh my god, this is akin to pulling teeth! Thanks for the tip about the link button, it was obscured under the ad at the bottom of the screen..... It failed on the first attempt so I recreated the script, replied No to modifying /system, and then the link finally worked!!
[Android Apps and Games] vickybonick:
Some apps may crash while linking if they are running in the background
[Android Apps and Games] vickybonick:
No it'll not work