yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] EqUaTe:
Hi Vicky/All,

After recently updating to RR 5.8.2 (20170304 build, klte), I've seen some rather odd behaviour.

Specifically:

Initially, post-reboot, the 2nd partition would not be mounted, apps that had been fully linked to sdext2 would no longer show as installed.

Restoring Apps would result in a partially linked state, with apk and odex on system storage.

Rebooting would continue to show the 2nd partition as not mounted.

Soft-reboot seems to not be possible for me (it causes a full reboot). This was seen in the previous version of the ROM as well.

I'm now, through means I do not fully understand, in a position where bind mounts are being put in place, but opening Apps2SD Pro results in it saying that the 2nd partition is not correctly mounted.

Checking bind results shows various binds in place, so it *appears* that the partition is mounted, and launching apps that have files on these mounts works without redownloading any files.

I'm not sure how to get more detail out of the app, and I suspect that this is related to what some other people are seeing with LineageOS-based systems. RR is presently based on LOS.

I'm running with Magisk systemless root, so when I create the mount script I've used su.d, and said no when asked if I want to modify /system (as I really don't).

One thing of note - it appears that saying no here means you are unable to make changes to the mount script, even if the option for this is ticked.

Let me know what further info I can provide to help and I will happily do so!

Many thanks, and thanks for the great app!

---------- Post added at 10:07 PM ---------- Previous post was at 10:06 PM ----------

I believe there was a post on the previous page or two where Vicky said this would be fixed in the next version!
[Android Apps and Games] sjamie:
I have experienced the same behavior when dirty flashing RR 5.8.2 on my Galaxy S4.
[Android Apps and Games] EqUaTe:
This was a clean flash - I was seeing odd behaviour and decided I'd do a factory reset and flash again.. Only thing I didn't do was a total wipe of all filesystems, I just used TWRPs factory reset wipe option.
[Android Apps and Games] E_Ben:
Hi Equate and Vicky,

from the symptoms which equate describes, I must say that they are different from what I experience with LineageOS. My sdext2 is mounted without problems, but the links to apks and libs on the sdext2 get lost after rebooting with selinux set to strict. In my case, setting selinux to permissive is a workaround, so if you suspect that your issue is related, why don't you just try that? Use selinux mode changer app on https://xdaforums.com/showthread.php?t=2524485.

Since in my case the mode changer app doesn't work with supersu, I use a script found here

https://xdaforums.com/xposed/how-to-set-selinux-to-permissive-boot-t3034245/page2

for setting selinux permanently.
[Android Apps and Games] vickybonick:
Set your email in the app, send device info from the app and pm me your email
[Android Apps and Games] EqUaTe:
On the previous ROM release, it worked with SELinux set to Enforcing. I /can/ change this, however, most methods seem to require modifying /system, which I am trying hard to avoid.

Done.
[Android Apps and Games] vickybonick:
I'll check it out. You can follow below post to set selinux to permissive without modifying system partition, but i'd like you to wait for my analysis to finish or you can revert it if i want your​ help for testing

https://xdaforums.com/showpost.php?p=68249166&postcount=2269
[Android Apps and Games] iwanova:
It works! Thanks for your suggestions! :laugh:
[Android Apps and Games] EqUaTe:
Cool, I'll wait for now, the important things I need are working, so I can hold fire with any further work for now.

Thanks!
[Android Apps and Games] guastucci:
Vicky, what's​ the difference between the scripts mounts? If advanced method works for all situations why not use only it? Tks
[Android Apps and Games] vickybonick:
1) It modifies system partition

2) It's available for lollipop plus only

3) It may result in bootloop on some devices (Although none have reported bootloop so far)
[Android Apps and Games] vickybonick:
Can you provide the supersu download link/thread you are using?
[Android Apps and Games] vickybonick:
The Apps2SD service doesn't seem to run on your device after an update, you can try below steps

∙ Make sure "Disable auto link on app update" option is unchecked in Apps2SD settings

∙ If you are on miui ROM, use Privacy guard or similar ROM/App then grant auto start permission to Apps2SD
[Android Apps and Games] EqUaTe:
I'm using Magisk 11.1, so it's 'magisksu', otherwise known as topjohnwu's variant of phh SuperUser.
[Android Apps and Games] vickybonick:
Can you provide link to the binary and apk or flashable zip?
[Android Apps and Games] guastucci:
So, if I don't care to modifies system partition and not having bootloop it's the best choose?
[Android Apps and Games] EqUaTe:
http://tiny.cc/latestmagisk

That's taken from the Magisk thread, both the su binary and the apk seem to be in there.
[Android Apps and Games] vickybonick:
You can try each option and see which one works best for you
[Android Apps and Games] vickybonick:
does it support su.d?
[Android Apps and Games] vickybonick:
I see it has service.d support instead of su.d. Will be fixed in next version
[Android Apps and Games] vickybonick:
Does it auto link newly installed apps?
[Android Apps and Games] DrPglixq:
I am running Android Jelly Bean, i know it is pretty outdated but i really need to run the app in the specific device.

I tried normal method, and with init.d support since i got init.d support.

I fixed it when i use ext2 instead of ext4.

But i got a noticeable app performance drop.
[Android Apps and Games] bpushpak:
How did you made A2SD run on Lineage os? All my attempts with Android Nokia failed for Tesla ROM. What's the trick?
[Android Apps and Games] E_Ben:
Read my last few posts from the past few days, it is described there. I use super su2.79SR3 on LOS 14.1 20170308 build and I had to set selinux permissive to make it work. Use the su.d method for the mount script. Vicky is looking for a solution with selinux enforcing. Good luck and please report back.
[Android Apps and Games] sjamie:
That's awesome. Thank you! :victory:
[Android Apps and Games] EqUaTe:
Ok, cool.

Interesting though, as it was working perfectly fine with the su.d method on the previous ROM version (from 20170211 or thereabouts I seem to recall).

That is the same version of Magisk, the same version of Apps2SD, SELinux set to enforcing..
[Android Apps and Games] vickybonick:
Does it auto link newly installed apps? This is regarding the partially linked issue
[Android Apps and Games] PeeHoo:
Hi!

Is it normal that if needed soft reboot then nova launcher is forgetting all apps... It is not killing me but it is annoying to put everything on place after reboots...
[Android Apps and Games] bpushpak:
Thanks for the reply. Will try this weekend

---------- Post added at 10:56 PM ---------- Previous post was at 10:50 PM ----------

That issue is in Yu unique and Redmi 2 both running rooted stock lollipop

I have found a workaround for the issue

Open A2SD and keep it running while doing the update of linked Apps

When it's not kept in open In back, it's unable to invoke and get Root on demand.

You may check this in the Device info I had sent last week
[Android Apps and Games] vickybonick:
Give auto start permission to Apps2SD and reboot it should fix the issue
[Android Apps and Games] vickybonick:
If you're using magisk 11.1 root then wait for next version otherwise use su.d or Advanced method to create the mount script, it'll fix the soft reboot issue
[Android Apps and Games] vickybonick:
Install the attached apk, recreate mount script with su.d option and reboot and let me know if it fixes the issue

Install the attached apk, recreate mount script with su.d option, link a new app (fully link) and reboot. Let me know if the app is working after reboot
[Android Apps and Games] vickybonick:
Can you set your email in the app, Send device info from the app and pm me your email. For me it works fine
[Android Apps and Games] EqUaTe:
Hi Vicky,

Yup, looks good with that version!

Great work! This app is probably one of the best things I've spent money on for Android :)

Cheers!
[Android Apps and Games] E_Ben:
Hi Vicky,

thanks for providing the beta so quickly. By the way, the new app manager looks promising, although I did not yet play with it too much.

Unfortunately, linked apps force close after reboot with selinux enforcing (clean flash of LOS 14.1 20170315 build with superSU 2.79SR3, su.d method). However, there is a slight difference with respect to the 11.6 version: The app detail page pretends that everything including apk and lib would be linked, but obviously it is not or something else is missing, because the app force closes.

I tried as well these two alternative configurations:

1) clean flash of LOS 14.1 20170315 build with LOS su addon, selinux enforcing: This does not support su.d, so I tried with the advanced method, without success. Linked apps completely disappeared after reboot.

2) clean flash of LOS 14.1 20170315 build with Magisk su, selinux enforcing, su.d method: sdext2 partition not mounted, error message that root not granted and I should try "repair second partition", what I did not want to do, because I want to use / restore the apps on sdext2 later.

Should I send you a logcat or test something else?
[Android Apps and Games] E_Ben:
Ok, but it may take a while. I'll send you the info for the 3 alternative setups with more info in a pm.
[Android Apps and Games] smootdawg:
Vicky, thank you! That beta version of the pro app fixed the exact same issues I was having with any app linked to my 2nd partition basically disappearing upon reboot and requiring a reinstall of it. Before, I did recreate the mounting script with su.d and even the advanced mount option, but it always "removed" the app and required a reinstall (and I couldn't move the app to the SD card). I followed your instructions, and the apps I moved to the SD card this time worked great upon a reboot. Thanks again.
[Android Apps and Games] sjamie:
The only problem I have with this app is after the Play Store updates an app that was linked to my SD card, most of the app is moved back to internal storage. Is this expected behavior?
[Android Apps and Games] t61p:
Hello Vicky.

Could you tell me if the latest pro bata version (apps2sd-pro-v117-beta.apk) contains a fix of the partition and format issue on nexus player with USB stick? I'm asking because I've actually tried to format 2nd partition with the latest beta but unfortunately it failed with error.
[Android Apps and Games] vickybonick:
No it doesn't. It's next on my priority list so should be fixed in next beta
[Android Apps and Games] sjamie:
Yep, was already done...

Also, what is the difference between "moving" and "linking" an app to the SD card?

I've always been linking them.
[Android Apps and Games] vickybonick:
read the faq @ http://www.apps2sd.info/faq
[Android Apps and Games] sjamie:
It's been a long time since I read it, thanks! So as a rooted user with a partitioned SD card, there is no real advantage to using move rather than link, right?
[Android Apps and Games] vickybonick:
What are the advantages of "Link/Unlink or Link apps" over "Move To SD Card (Native Android APP2SD)" and vice versa?

Advantages of "Link/Unlink or Link apps" over "Move To SD Card (Native Android APP2SD)":

Using symbolic link you can move apk, odex, dex, lib, data and cache to 2nd partition of sd card. Native move to sd allows you to move only apk and lib files

When you enable USB mass storage to share files with your computer the fat partition of your sd card is unmounted so any app moved using native move to sd will stop working. But apps linked using Apps2SD will continue to work. All apps doesn't support Native move to SD. Apps2SD provides force move (requires root) for apps which doesn't support Native move to sd

Advantages of "Move To SD Card (Native Android APP2SD)" over "Link/Unlink or Link apps":

Native move to SD doesn't require root

Native move to SD doesn't require 2nd partition on your SD card
[Android Apps and Games] porroni:
Oook, just a sec. Thanks for the help
[Android Apps and Games] sjamie:
Yes, I had already read the FAQ. Thanks! LMAO :laugh:
[Android Apps and Games] porroni:
The thing is "sending the report" for 15 minutes <.< is it normal? Cause even retrying I get the same thing

EDIT: Ok, it took a lot but finally sent
[Android Apps and Games] E_Ben:
I confirm that it took several minutes for me as well. A warning that it may take a while and that the transfer could eat up a large amount of mobile data volume (if large data amount is sent) could help. I wonder what data are actually transferred that it takes so long?
[Android Apps and Games] vickybonick:
It scans app components like apk/dex/odex etc, mount details, disk usage, selinux context, file permissions and some other information for debugging. Since everything has to run in root shell it can be quite slow
[Android Apps and Games] vickybonick:
I see the media folder is moved to adoptable partition, in this case it's already on SD card so Apps2SD should detect it as on SD card instead of On phone/emulated storage. I'll fix it
[Android Apps and Games] porroni:
Holy that was quick! Thank you!
[Android Apps and Games] vickybonick:
Install the attached apk, recreate mount script with su.d option, link a new app (fully link) and reboot. Let me know if the app is working after reboot
[Android Apps and Games] sjamie:
Your lightening quick support is superb, my friend! :good:
[Android Apps and Games] vickybonick:
Please try the attached version (apps2sd-pro-v117-beta-3.apk) it has the fix. Let me know the results
[Android Apps and Games] vickybonick:
It has been fixed. Do you want to test it?
[Android Apps and Games] vickybonick:
Does anyone have a device with internal sd card mounted at /storage/sdcard0 instead of /storage/emulated/0 or /storage/emulated/legacy. I need the directory structure
[Android Apps and Games] Bryan Ong Manalili:
There's an app can do that on xposed cold XinternalSd using it the obb and data it will outo place on sdcard, using that and you're app i dont need to link the data and obb
[Android Apps and Games] Pat424rick69:
I have a problem with downloads not finding the SD card path with "No SD card" message keeps coming up when trying too download any thing. I did the Partition Tool(Adoptable) on the SD card & left the second partition on Default then it changed to exFat after error with a time out message. Thanks for any Help.
[Android Apps and Games] vickybonick:
Remove your SD card, reboot, insert your SD card back, reboot then try to create partition(s) again
[Android Apps and Games] justjr:
Is the second time that something happen, it freezes and reboot, and I end up in a bootloop. I'm using advanced mount, I have to boot without the sdcard to be able to boot, and if I insert the card at any time it freezes and reboot.

Any more information or log I can provide?

Enviado de meu Moto G usando Tapatalk
[Android Apps and Games] J_M_V_S:
[MENTION=6726362]vickybonick[/MENTION]

I've been using Apps2SD PRO for sometime with no problems (except some apps missings from time to time).

Yesterday, my phone died at 30% (almost 4 years old battery!). When the battery was back up and started the phone, all my linked apps dissapeared. Whatsmore, I can't get into Apps2SD PRO as it seems it can't obtain root access (at first, it was available in the SuperSU app, then deleted the entry and no changes). Everytime I try to get into Apps2SD there's no way to obtain root access. The other weird thing is that after some time the phone becomes really laggy and unresponsive and I can't open "new" apps (by that I mean that I can only open apps that are on the recents menu). I even can't connect via adb (no device found) not use Terminal app (no shell appears).

I think I've tried every option (removed SD, deleted entry from SuperSU, renamed mount script, uninstaled Apps2SD -can't reinstalll now, always shows error at installling-, can't get logcat). Do you have any ideas? Factory Reset would be the last resort.

HTC One m7 802w (Android 5.0.2)

SuperSU 2.79 (installed on RW /system)

- su during boot on

- mount separation off

Any advice would be greatly appreciated.
[Android Apps and Games] t61p:
Hi Vicky,

I confirmed on custom rom (Full Android Marshmallow for Nexus Player) that the functions below were all successful. Thanks, thanks, thanks!!!

- Format 2nd partition (/dev/block/sda3) to 'ext4'

- Recreate mount script (ext4)

- Remount 2nd partition (ext4)

- Auto mount of 2nd partition on boot (ext4)

- Link app to SD

- Format swap partition (/dev/block/sda4)

On the other hand, recreate mount script for 'f2fs' 2nd partition was failed though formatting to f2fs was successful and the kernel supports f2fs as described here. I've sent the error report from apps2sd.
[Android Apps and Games] vickybonick:
Excellent.

I don't thing f2fs is supported, i see below error in the report
[Android Apps and Games] vickybonick:
Factory reset/ROM reflash might be needed
[Android Apps and Games] vickybonick:
Can you try the beta 3 i attached in one of my previous posts
[Android Apps and Games] t61p:
All right. I'll use ext4 file system.

By the way, when I installed apps2sd pro to Nexus Player for the first time, I downloaded apps2sd-pro-v11?.apk from xda and licence check passed and the app is working.

Then, I recently noticed that apps2sd pro is not installable to Nexus Player directly from google play store. It says "Your device isn't compatible with this version.". (I don't know why but free version of apps2sd is installable.) Since apps2sd pro has been confirmed to work on Nexus Player, you may set apps2sd pro is compatible with Nexus Player.
[Android Apps and Games] vickybonick:
There is no restriction from my side
[Android Apps and Games] t61p:
Ah, OK. :p
[Android Apps and Games] J_M_V_S:
Ok. I managed to get it working again. After so many attempts to reinstall Apps2SD PRO from the Play Store I finally succedded. After that, all started to function again. Apps2SD PRO was able to acquire root, and restored the database, after a reboot I had all the apps again and the phone fully operational.

It would be worth checking out why Apps2SD PRO wasn't able to acquire root until I reinstalled. Anything I can do to help you with that, please ask.

Doing a full backup of the phone right now :)
[Android Apps and Games] vickybonick:
I'll take a look at it
[Android Apps and Games] Selexo:
Sure. How do I help.
[Android Apps and Games] btb55:
A question about booting to recovery.

My Huawei Honor 7 phone has dual recovery, the normal 'Recovery' and an extra 'eRecovery'.

I've got TWRP installed on eRecovery (keeping stock recovery on the usual one), and I can boot to it with the command ' adb reboot erecovery' from the pc., but its a bit of a faff doing it. I can use your 'Reboot' menu to get to the main recovery, but Is there a way I can boot to the 'erecovery' with a script or command from within Apps2SD?

It would be nice to be able to reboot to erecovery more easily from the phone.
[Android Apps and Games] vickybonick:
Ok, i'll add an option to reboot to erecovery
[Android Apps and Games] vickybonick:
I'll send you a beta just try to use the adoptable partition tool
[Android Apps and Games] btb55:
Amazing quick reply. Perfect, that would be great thank you.
[Android Apps and Games] vickybonick:
Install the attached apk and use the adoptable partition tool to create partition and let me know the result
[Android Apps and Games] Selexo:
Success, tho not without some strange reaction using that feature. SystemUI crashes each time I do a format of the partition and then thrown to the lock screen with the home screen starting up. But other then that the tool works. I'm not too worried about the home screen getting killed but found it a strange behavior anyways.

So far this is only formatting the 2nd partition. Once ext4, then f2fs, SystemUI restarted both times, perhaps because it's not a native feature. Thanks for getting it to work tho.

I will test it out later some more when I back home using more features.
[Android Apps and Games] E_Ben:
I just want to report back the results of some experiments I did with Vicky's help to anyone who tries to link apps to sdext2 using apps2sd on Lineage OS 14.1. The issue on this ROM is that the links don't properly work after rebooting as long as selinux is set to enforcing. Apps2sd actually changes the selinux context of the linked apk, lib and odex properly, but somehow these changes are getting lost with every reboot. It seems to be a feature of Lineage OS, not a bug of apps2sd. The issue occurs independently of which su is used, I tested with superSU 2.79SR3, Magisk su 11.1 and Lineage su addon. Possible workarounds:

1) Set Selinux permissive, but this is not what one would like to do permanently

2) Change the SElinux context of the links at each boot, by adding suitable commands to the mount script. Haven't tried this yet, but will report if I found a solution.

Furthermore, I'll try to understand why the SElinux context is changed back at each reboot, by posting question in Lineage OS thread.

Thank you again, Vicky, for your excellent and incredibly quick support.

EDIT 2017/03/24:

Vicky fixed these issues in V12 of app2sd, which is now available at Playstore. No Workaround needed.
[Android Apps and Games] sjamie:
Years ago I happily used the foldermount utility found within Apps2SD until one day the binding of the folder pairs became buggy after either an app or a ROM update. After doing extensive research, I discovered the app FolderMount (FM) in the Play Store which did not suffer from the same problems. After using FM for a few years, I recently switched to a ROM that uses Magisk SU. Now, FM no longer automatically rebinds the folder pairs after boot. I have to manually tap each pairing 2-4 times for it to "stick". After reading through the FM thread on XDA and trying to unsuccessfully contact the dev, I remembered that Apps2SD had a foldermount utility.

I'm happy to report App2SD's foldermount utility is now working properly on my Magisk infused ROM and it automatically rebinds my folder pairs after each boot. Thank you [MENTION=6726362]vickybonick[/MENTION] for creating this super powerful swiss army knife app! :D
[Android Apps and Games] shamsud:
Sorry for the noob question but is it possible to make an app think and use external sdcard as internal memory.

e.g. Mega cloud apk dont let me upload from my sdcard. Is there any way i can make mega cloud apk use my sdcard as my internal memory..

This mod can be attained by xinternalsd module in xposed but in nougat its not possible.

Sorry if my question is unrealistic.
[Android Apps and Games] E_Ben:
I am unsure if I understand correctly what your aim is. Sounds as if using the foldermount feature of apps2sd for binding the folder in your 'internal memory' that is set in Mega app's settings (See attached screenhot in German) to a folder in your external SD card is what you are looking for?
[Android Apps and Games] Selexo:
Just a small update

Just a small update to the beta you linked for me. While adoptable storage now works, the second partition doesn't seem like it can be anything but the default. If I do set it to ext4 or f2fs it fails with the typical message, ether the block is busy, or the home screen being killed.

When I goto inspect the partition

If I don't change anything tho it works just as if I had done it through the terminal. Anyways thanks for the initial fix, works for the most part.

I do have to ask, if does succeed can the 2nd partition show corrupt? doesn't even seem to mount while anything but fat32 (default)
[Android Apps and Games] vickybonick:
It's a display issue, i'll fix it.

If it's formatted anything other than default it'll show corrupted (Adoptable partition tool only)