yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] andrioda:
SD card corrupted, how to restore the missing apps

Hi All,

I am facing a very unique problem , need some expert advice.

Issue Summary

I was using link2sd with my 4GB phone and without any problem, however last week my SD card gave up and for some reason it got corrupted. I tried different tools on Ubuntu to recover the ext4 partition but in vain. So in the end I decided to put a new SD card with new partition ( ext4 + fat32). Thankfully I had the Titanium app backups + external SD card personal data backup ( that’s what I thought - ) I tried following things to reinstall the missing apps.

1. When I tried to reinstall the missing apps from PlayStore (which were linked earlier) I am getting insufficient memory error even when I have enough memory available on phone internal SD card.

2. I thought I would be able to use the Titanium backup to restore the apps but this method is not working as well and It is simply showing the message that it is installing ( but progress bar doesn’t show any progress). I tried earlier this restore method for more than one app but later tried to restore only one ( to eliminate any chance that multiple app restoration be real cause behind the failure)

) , still I am getting the same issue as mentioned

3. I even tried to restore the app from nandriod CWM backup using Titanium backup but again hitting the same issue (titanium progress bar doesn’t show any progress )

My Findings

I did some digging and found that there are lot of soft link present in data/data and /data/app folder (which were created by link2sd actually so that it can do its magic ). I believe this may be the issue behind the Playstore insufficient memory error and titanium backup restoration failure. So I did following

1. Renaming of one of the link for one app. Voila ! it worked - I was able to install the app from PlayStore

2. Renaming another link for another app. this time I want to use Titanium backup but to my surprise titanium doesn’t find the backup now ?

Help needed

So long story short - I don’t want to rename/delete the old links manually ( unless and until it is the last option) since I want to avoid doing any manipulation under /data/data and /data/app folders and I want to use my Titanium backup.

can you please guide what would be best and neat solution to get past this issue and restore the missing apps.
[Android Apps and Games] xdarthanonx:
I had a similar problem a few months ago, with broken symlinks left in /data/app-lib, so I wrote a small shell script:

[COLOR="Green"]#!/system/bin/sh

# FIND_SYMLIBS
# File: find_symlibs.sh
# Description: Find broken symlinks left by Link2SD
# http://goo.gl/TbHtli
# http://goo.gl/ee3fT7
# Author: xdarthanonx
# Created: 19/04/2015[/COLOR]

[B][COLOR="Blue"]find[/COLOR][/B] /data/app-lib -follow -xdev -maxdepth 1 -type l -delete

Use a scripting app (e.g., SH Script Runner) to execute.

Also, my recovery (Carliv Touch Recovery v2.7) makes a backup of the Link2SD partition: sd-ext.ext4.tar. Yours might too, depending on recovery.fstab.
[Android Apps and Games] Zzinst:
Would it be possible for user to choose (or write-up) the name of the SD card as it appears in the model he use - in future versions of the app?

My device is running Android 4.4 with internal and external cards, using a specific name: sdcard0 and sdcard1. The external card reconised by the OS as the first one. But, Links2SD still cannot make a script, probably - because of the card's name: not "sdcard" , but "sdcard0".
[Android Apps and Games] Logos Ascetic:
Can I backup APk's?

Have you used this feature?

[MENTION=3258861]bakpinar[/MENTION]

Is there a way to backup apk's with your app? I see there's an option to "share apk" in the menu. What does this do exactly? Ive got some older app versions that aren't available anymore online,and Id like to back them up in case I ever need them again.
[Android Apps and Games] Eversmile23:
Obb linking failing.

My Lenovo A 7000 is rooted. I am using Link2SD plus version. I was very happy when this app started supporting 64-bit devices. But, now I observe that linking of 'obb' file/folder is not possible. I get errors e.g,

[ Failure

Can't stat '/data/media/obb/com.quantumdesigngroup.Airplane' : No such file or directory ]

Currently, my default apps storage is 'SD Card' and my mobile has a emulated sd card feature. Please help.
[Android Apps and Games] Eversmile23:
64-bit android devices are already supported.

The updated LInk2SD Plus version, which I am using on (my 64-bit device) Lenovo A7000 supports 64-bit android devices.
[Android Apps and Games] Benji90:
I get error stale NFS file system not much for this on Google anyone know anything about it?
[Android Apps and Games] andrioda:
Thanks for replying.. Much appreciated

However as I said, i don't want to delete any links using script or manually (as i have linked some default apps which came pre installed.. Now these broken links is the only way by which i know what is lost now)

Does titanium backup or link2sd has some elegant( ANY OPTION - i am not aware) solution ?

I also dont have sdext partion backup ... What it means that if u take the nandroid backup after u install link2sd and link lot of applications (more than ur internal sd card would allow, reason u have link2sd ),then ur nandroid backup is of no use.. It may even brick ur device.

This broken sd card problem is something which can happen anytime and to anyone

I see only one solution now... Reset the device.. And install all the apps and move them again using link2sd

Pls let me know if something else is possible without taking this long route

Also one shud take the nandriod backup before linking apps, other wise nandroid backup wont work.. Is this understanding wrong or correct, pls advise
[Android Apps and Games] :
Can sdext2 be encrypted?

I'm trying to secure my phone and so far I have full android encryption implemented which to my understanding, only encrypts the /data partition. As sdext2 is an where app data is stored via symlinks, how can I encrypt this as well?

Thanks.
[Android Apps and Games] ASitch:
Great! I have been waiting for such an app for 2 years! :)
[Android Apps and Games] luke!:
I'm facing the same issue, now I'm trying to greenify both the Link2SD app and the 2 games linked... Hypothesis about the cause of this light battery drain?
[Android Apps and Games] xdarthanonx:
Try de-linking the apps (but keep Link2SD installed) and see if the behaviour changes. These tools can help troubleshoot:

Wakelock Detector

Watchdog Task Manager

OS Monitor
[Android Apps and Games] luke!:
The phone apparently goes into deepsleep but the battery drains faster without any doubts. No Link2SD-related-process seems to be in execution :/

Inviato dal mio XT1068 utilizzando Tapatalk
[Android Apps and Games] xdarthanonx:
Nothing obvious there. Have a look at the wakeup triggers (click on the CPU icon and select the clock icon).
[Android Apps and Games] luke!:
just checked, everything is fine :/
[Android Apps and Games] xdarthanonx:
Okay, try OS Monitor and sort the processes by CPU Time.
[Android Apps and Games] :
Android Encryption and Link2sd don't seem to like each other :(

I'm on a Galaxy S5.

First I restored a Nandroid backup. Then, since I can't encrypt while rooted, I removed root via stock recovery and then encrypted the phone.

After encryption I restored root and granted Link2sd root access.

Now when I recreate mount scripts in Link2sd and reboot, the phone locks up on the bright white tmobile splash screen after entering the encryption password. It seems to stay on this screen indefinitely (I left it on overnight and it was still on when I awoke this morning - hence this post).

Any suggestions?
[Android Apps and Games] :
Update! I have subsequently reflashed stock deodexed rom w/root (Android L) and I believe it helped. I hit the volume up and down keys for safe mode and I think that may also gave it a kick (although I did not see that I was actually in safe mode when it booted to the OS).

Seems like Link2sd's mount scripts work better when added/recreated ON an encrypted device and not before the device gets encrypted. Does this make sense?
[Android Apps and Games] bbwarfield:
Apps don't work when Data is moved to microSD with Link2SD

Hi, Bul. I have paid for the Plus key.

I've been a Link2SD Plus user for about a year or two. But since about a month ago, when I have an app and its files on the external SD, things don't work.

For example,I moved Pocket, using Link2SD. to my microSD card's second partition (ext2) a year ago. Everything was working fine. But recently (about two or three weeks ago), Pocket no longer downloads pages. But when I move the Pocket's data from the external microSD back to the internal storage, downloading of pocketed articles work again.

Could you tell me how to fix this? This problem is not just with Pocket. i have problems also with Amazon Kindle, Wikipedia Offline, and other apps. Please help. If I don't get this problem fixed, then I wasted my money buying Link2SD plus. After all, the sole purpose of Link2SD is to move stuff to the external microSD.
[Android Apps and Games] Eversmile23:
Clarification required on dalvik caches.

What these dalvik caches really mean? What are the functions of these caches? One thing I observed puzzles me :--

(1) Using Link2SD when I cleared app caches and dalvik caches, disk space improved by say 50 MB.

(2) When I booted into CWM recovery and wiped dalvik caches I found regaining around 700 MB to 800 MB of disk space just after rebooting. Though this space diminish quickly after using my android for some time by downloading apps or playing a game or like that.

What is different in the 2nd instance? Also, I would like to know why there is an option to clean up the 2nd partition . I have never come across a situation that would show release of some memory/disk space by clicking this option of cleaning the 2nd partition.

My mobile is a 64-bit android device running on lollipop, rooted, uses 2nd partition of 3.4 GB out of a 32 GB micro SD Card.
[Android Apps and Games] xdarthanonx:
https://www.google.com/search?q=dalvik+cache

Link2SD deletes old/unused .dex files from the cache; CWM wipes the entire cache, but it gets rebuilt at boot.

---------- Post added at 22:35 ---------- Previous post was at 22:33 ----------

Please be more precise: How large is the partition, and how much space is free? What has been linked - Apk/Dex/Lib/Data? Screenshots might help.

Calm down. Other users are more likely to help you if you don't complain about $1/year - you have been using it successfully for two years, after all!
[Android Apps and Games] bbwarfield:
I've attached a screenshot of storage info.I have lots of free space.

I've attached a screenshot too of Pocket storage info. The ”Data (Ext.)” (94%,467mb) is on internal. Because when I had it ”linked to SD ”, pocket couldn't download newer articles.
[Android Apps and Games] tubabuyukustun:
yesterday i reinstall all my system everything works ok SD card working normal root is ok only i have problem with facebook.apk i download latest version normal also app working without any problem but on link2sd everytime when i want copy this app to SD card it showing me this pkg:/data/app/com.facebook.katana-1.apk Failure install_failed_invalid_install_location i dont know what the problem so any solution how can i copy this to SD card, messenger apk working OK it is copied to sd normal.
[Android Apps and Games] xdarthanonx:
Your microSD card looks to be 64GB. Is it old? New? Have you been using this same card for the last two years?
[Android Apps and Games] bbwarfield:
The microSD card is just 5 months old. It's a SanDisk. Bought from Amazon. I highly doubt the problem is with the hardware (card or tablet).

Here is the text file that is sent to Bulant: bbwarfield Link2SD log
[Android Apps and Games] egingell:
I bought a 64gb SanDisk card from Amazon... it lasted exactly one day before it quit working.

Sent from: SGS2 - JB 4.1.2 GB27 / SGS4 - JB 4.2.2 MF9
[Android Apps and Games] xdarthanonx:
I always test storage devices bought online with H2testw/Check Flash.
[Android Apps and Games] TBGleNolife:
Android Lollipop 5.0 Apps Crashing after SD Link and Reboot / Unable to Move Apps

Hello,

I'm trying since few days to Move Apps to SD or to Links Them, and I had many problems

I tried a lot of options, a lot of apps, I searched for hours (and almost days), but I can't find a solution...

Maybe it's because of Android 5.0 ? Maybe it's because of the Elephone P7000 ROM ?

- When I try to "Move Apps to SD" with Link2SD, I get the message " INSTALL_FAILED_CONTAINTED_ERROR "

- When I try to "Link an App to SD", everything seems to work fine, but in fact, after a reboot, the App I have linked crashes at launch

After some tests I doubt it is caused by "Lib" things, but i'm not sure

Please, can you help me with those things ?

Thanks in advance !
[Android Apps and Games] tubabuyukustun:
so i make now with aparted this sd card 477MB, sdext2 1,31GB after succesfully making i still cant copy this stupid facebook.apk to SD card it showing always invalid install location :( also when i click move to sd card same also when i choose link to SD card
[Android Apps and Games] 2kool2Bcruel:
How I fixed the Mount Script Error

For several days I have been struggling to get past this error. I followed several tutorials and strange tweaks and everything to get link2sd to see that damn partition. I was almost ready to give up when I decided when creating ext4 partition of about 3 gigs (out of 64), I put the "second" ext4 partition first then formatted the remaining space as NTFC.

Popped it in the Shield Tablet, rebooted, started link2sd and it mounted the script exactly like it should. I'm elated. So, anyone else with similar issue try putting the second partition at the start of your SD card.

NOTE: ES File Manager sees the larger NTFC partition which is exactly what you want.

Good luck.
[Android Apps and Games] TBGleNolife:
Thanks a lot, I'll try this and tell you if it works

You're giving me some hope, I almost decided to give up too x)
[Android Apps and Games] 2kool2Bcruel:
I hope it does. What a pain in the assignment figuring that out. I was looking into everything. I thought it was because I was using a rooted stock rom which I have to stay with stock kernel on Nvidia Shield Tablet to keep the functions of the shield
[Android Apps and Games] zpmarcos:
Hi,

Every time the phone boots have a message "mount warning" and i must quick reboot the phone in order to see my linked apps, which could be the cause?

Thanks
[Android Apps and Games] luke!:
I've analysed the kernel wakelocks: mmc1_detect wakelock occured 1335 times in the last 6 hours, so it's a link2sd related problem. I didn't have this wakelock before.
[Android Apps and Games] egingell:
Except Link2SD doesn't *do* anything in the background except listen for package installs and uninstalls. It doesn't continuously check for SD cards nor create wakelocks.

According to a quick Google search, you either have corrupted files that are causing the media scanner to stall or you have "nearby devices" enabled.

Sent from: SGS2 - JB 4.1.2 GB27 / SGS4 - JB 4.2.2 MF9
[Android Apps and Games] luke!:
Nearby devices disabled. I had formatted the SD before I installed link2sd, now it's completely emtpy except for link2sd files. Chances that those files are corrupted? :/
[Android Apps and Games] TBGleNolife:
I tried but I can't get it

Could you please describe step by step what I need to do ? :/

Thanks in advance !
[Android Apps and Games] egingell:
The corrupt files would somewhere Android actually looks (/sdcard or /mnt/extSdCard).

Regardless, it can't be Link2SD. It literally only does something when an app is installed or uninstalled (at which time it either deletes that app's files from the second partition, relinks the updated ones, or ignores it if it wasn't linked).

Sent from: SGS2 - JB 4.1.2 GB27 / SGS4 - JB 4.2.2 MF9
[Android Apps and Games] Devtaji:
Has anyone used this method:

Move apk and lib to sdcard using app2sd

Link dex file using link2sd

Like in the image.

Is it safe? Would it cause problems?

Should I use link2sd on all the files?
[Android Apps and Games] egingell:
"Is it safe?" That's a question with no definitive answer.

"Will it cause problems?" If it does, it will be isolated to that app.

"Should I use link2sd on all the files?" I never had a problem with doing it as depicted, but every app and device are different. (I.e. The Simpsons Tapped Out doesn't work on my phone (SGS2) when the libs are linked.)

Sent from: SGS2 - JB 4.1.2 GB27 / SGS4 - JB 4.2.2 MF9
[Android Apps and Games] furyza:
Apps NOT RESPONDING

I've link2sd plus. Sometimes apps that already linked not responding. A dialog box ''unfortunately, has stopped working'' appear. So, I must restart my phone. For example, sometimes facebook apps stop working, even in the worst case it become "chain reaction" to other apps that linked in SD card

anybody can solve this :(

I'm on S4 GT-I9500 lollipop 5.0.1 and link2sd v4.0.12

[MENTION=3258861]bakpinar[/MENTION]
[Android Apps and Games] egingell:
Solved by unlinking. This app does something the system was not designed for. Unpredictable results may vary. Also SD card thrashing is common with apps of this nature.

Sent from: SGS2 - JB 4.1.2 GB27 / SGS4 - JB 4.2.2 MF9
[Android Apps and Games] furyza:
hmmmm....... what do you mean about "something the system was not designed for" ?

or maybe it just a bug from link2sd itself? :rolleyes:

and when i try unlink from SD card to internal storage phone, this error message appear

"Facebook

Failure

can't stat '/data/sdext2/data/com.facebook.katana/cache/image/v2.ols100.1/32' : I/O error can't stat /data/sdext2/data/com.facebook.katana/cache/image/v2.ols100.1/79 I/O error"

[MENTION=4587767]egingell[/MENTION]
[MENTION=3258861]bakpinar[/MENTION]
[Android Apps and Games] egingell:
That means something's wrong with your SD card.

Sent from: SGS2 - JB 4.1.2 GB27 / SGS4 - JB 4.2.2 MF9
[Android Apps and Games] furyza:
there's something wrong with my SD card?

I never thought of that

beacause when I unlink another apps from SD card to phone storage, it work correctly

[MENTION=4587767]egingell[/MENTION]
[MENTION=3258861]bakpinar[/MENTION]
[Android Apps and Games] egingell:
I had a bad SD card on which I could write files, but I couldn't delete them or modify them, but I could move/rename them. Weird things happen when when SD cards start to go. I could also be wrong. Maybe the apk file itself is corrupt.

Sent from: SGS2 - JB 4.1.2 GB27 / SGS4 - JB 4.2.2 MF9
[Android Apps and Games] kyle69747:
okay, i partitioned my sd about a year ago, broke my phone and got a new one. i don't currently have a pc and I'm trying to clear out the storage in the 2nd partition cause the so won't let me link anymore. is there an app that will let me veiw and manage the 2nd partition
[Android Apps and Games] egingell:
As long as it's mounted, any root explorer (Root Explorer, ES File Explorer) will do. If you let Link2SD mount, it's mounted to /data/sdext2.

Sent from: SGS2 - JB 4.1.2 GB27 / SGS4 - JB 4.2.2 MF9
[Android Apps and Games] JK1974:
Problems with Link2SD on WIKO Lenny

Hi,

for some days, I get an error on a WIKO Lenny like "not enough free memory" when trying to update applications. Without taking a closer look at the used space on the 4GByte SD card, I exchanged it against a 16 GByte card. For copying the data from one SD card to another, I used CloneZilla with file system check/fixing enable. After that, I resized the two partitions (first FAT32, then ext4) on the new card. So everything seems to be fine, with 1,2 GByte for the ext4 partition, there is in fact enough free place for moving applications (and in fact there is with still ~650 MByte free space).

However, as you might have guessed, the new card did not solve the problem. Looking at the memory overview, there is in fact enough space in all partitions (/data/sdext2 53%, /data ~50%), only /system has 10% with only 80 MByte free.

Furthermore, if I remember correctly, Link2SD did not kick-in right from the beginning, but I did not take the time to investigate it more closely. Normally (and like I know it from all other devices where I had Link2SD installed before), Link2SD becomes active directly after an installation. But, although enabled, automatic linking does not seem to work. I just did so manually for the non-linked applications, and the used space on /data/sdext2 seems to proof that data is being moved, but I still get the error message.

How can I debug this problem?

Thanks in advance for any hints!
[Android Apps and Games] Chalton:
How to

Hi, I have installed link2sd and also used it for some time in my Nokia X2 Dual Sim for some days but it got uninstalled by mistake, now link2sd installs in my phone but I am not able to operate it. I get a dialog box when I launch the app, says "Please uninstall and reinstall Link2SD"

Is there a way I can get this fixed?

Thanks.
[Android Apps and Games] xdarthanonx:
Have you actually tried to uninstall-reboot-reinstall?
[Android Apps and Games] Techminator:
Autolink does not work

The auto link feature does not work despite selecting Auto link. Also, the install location under the Native App2SD settings is 'internal' although I've also tried automatic and external.

It used to work at once but not anymore. The volume type is fat16/32. Please help
[Android Apps and Games] brad65807:
Same thing is happening to me. I even have 1.6g free in /system and still get the error. I have to delete the app that wants to update and download the latest version from playstore.
[Android Apps and Games] xdarthanonx:
Grab DiskInfo and post screenshots of the System/Data/External SD partitions.

Is it a system app? User app? Linked? Does it happen when you "update all" apps, or just update the individual app in question?

(In situations like this, I find just rebooting the phone usually resolves the problem.)
[Android Apps and Games] brad65807:
I have rebooted several times. It happens if I update all or just one.
[Android Apps and Games] xdarthanonx:
Are the apps that fail to update linked? How big are they?
[Android Apps and Games] brad65807:
They are linked. Approx 12mb big. Some bigger update fine, some smaller don't. Very sporadic
[Android Apps and Games] xdarthanonx:
Could be due to broken symlinks. Open a terminal and enter:

su

find /data/app-lib -follow -xdev -maxdepth 1 -type l
[Android Apps and Games] graed:
Unable to relink after wipe and reflashing. (Nvidia shield tablet - lolllipop)

Device: Nvidia Shield Tablet Wifi. (oem unlocked)

OS: Android 5.0.1 (update 2.2.2) and 5.1.1 (Update 3.1), tried both.

Link2SD versions: 4.0.12, 4.0.11

Root: Chainfire's SuperSU pro.

Second partition: Ext4

Factory wiped to receive update 3.1 and rerooted. After recreating mount scripts, I tried to Relink all application files. The program responds "Found no files to link".

Storage info shows second partition was succesfully mounted. Upon inspecting the folder structure, all items remain there, correct permissions and ownership. Apps were previously linked in every aspect possible (apk, dex, lib, personal data and obb), except for external data. I reflashed manually both update 2.2.2 and 3.1 with no luck.

I am able to link new apps on the same secondary partition, coexisting with the previous data I'm unable to relink.

Tried contacting the developer with no luck.

Is there a manual script I can try to relink via a terminal emulator?

Regards.