yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] n756gkj:
apps on CM10 update to sdcard, can't relink, ERROR: INSTALL_FAILED_INVALID_APK

I'm running Cyanogenmod10 on an Epic4G.

I've an external 32 sdcard, partitioned as:

*GB FAT
1.8GB ext4

link2sd is installed and working.

But, some-not-all apps -- at either install or update -- are not getting linked, or are getting unlinked and moved to sdcard, and can't be moved FROM the SDCard.

For example, I just updated MaildroidPro. It had originally been linked correctly.

Now, @link2sd's "On SD applications" display shows MailDroid installed "on SD Card".

at that screen, @click info for the app reports:

MailDroid
version 2.76
on SD Card
Files (-> indicates linked files)
Apk: /mnt/asec/com.maildroid.pro-1/pkg.apk
Dex: /data/dalvik-cache/mnt@asec@com.maildroid.pro-1@pkg.apk@classes.dex
Lib: /mnt/asec/com.maildroid.pro-1/lib/libndkfoo.so
Data: /data/data/com.maildroid.pro
Date: 2012-11-29 13:05:48
[Move to phone] [Actions]
Size Total 10.57MB
App: 9.36 Mb (Apd: 3.30MB Dex: 6.05MB Lib: 7.18KB)
Data: 1.21MB Cache: 0.00B
Symbolic Link
[Create link] [Remove Link]

If I try to move the .apk from the SD card elsewhere, by click on *EITHER* [Create link] *OR* [Move to phone], I get an error:

Failure
pkg: /mnt/asec/com.maildroid.pro-1/pkg.apk Failure
[INSTALL_FAILED_INVALID_APK]

The Maildroid app works just fine. From the SD Card.

At the link2sd FAQ (http://www.link2sd.info/faq) there's:

Which suggests that I _should_ be able to move this.

How do I fix this install-to-sdcard, and get the link2sd links (re)created?

UPDATE:

Piecing together comments elsewhere in the thread, I can workaround the "can't move or link using link2sd" issue, by

(1) backup the misplaced/immovable app/apk using TB

(2) use TB to UNinstall the app

(3) immediately restore the app+data using TB

ends up with the app/apk link2sd-linked correctly, as initially intended

So, not a FIX to the problem, but a messy workaround to end up where you want to.

UPDATE 2:

One 'app' I can't seem to get to behave is "Titanium Backup Pro 1.2.2", which is the PaidUser KEY for the actual TB*Root app ...

If I do steps 1-3 (from above), there's no error, but it ends up right back where it started, as an "On SD application", and NOT linked :-/

I suspect it's a unique issue to TB, and some sort of chicken-and-egg problem, but darned if I've been able to get it sorted.
[Android Apps and Games] dayanandgp:
Link2SD working on ICS 4.0.4 !!!

Finally after lot of searching around i was able to make link2sd with ICS 4.0.4 on Galaxy Tab 2 P3113 :o

I had purchased the 8 GB version and i was desperate to make moving app 2 SD card work !!

Thanks a lot for this great app :)

PS: I formatted and reserved 8GB on microSD card as ext4 and it mounts without any problem on my device
[Android Apps and Games] Juanmiwow:
A 'must-have' app for low internal memory devices!
[Android Apps and Games] OttoDeFe:
I'm seeing this as well on my TF201 - many games and apps are installing on the internal storage (shows as "On SD" using Androwook) and if I try to link the error pops. Examples are Granny Smith, Splashtop THD, AirControl, Demolition Inc. THD. Some Humble Bundle games cause a lock up and reboot when linking, but I'm not sure that's anything to do with this.
[Android Apps and Games] kumbar55:
I AM UNABLE TO SET THE PARTITIONED SPACE AS "primary".

Its always logical only in Minitool partition wizard home:crying::crying::crying:.

PLEASE HELP ME.

:mad::mad::mad:
[Android Apps and Games] tobbbie:
First you need to free space on the card so that it shows as "unallocated". Move/resize the existing partition first to see "unallocted" space on the card.

Then right click there and select "create" (you get a waring that windows cannot read that partition - click YES). Now you must select "creates as" to be "primary" - Drive letter "none" and Filesystem to what your device supports - FAT32 will always work.
[Android Apps and Games] Cookie Ninja:
In case you have 4Ext recovery touch, you can partition your SD card using the resize/create new partition. I suppose CWMR /cwmr-touch also has similar options. Best way, and remember, do backup your card on the PC, in case you lose your data after resizing. Just my 2 cents....

Dead cookies leave no trails...
[Android Apps and Games] tobbbie:
CM10 from FXP on Ray: interesting dalvik-cache distribution

I recently made a short excursion to the FXP149 on CM10 and I noticed an interesting architecture regarding the placement of the dalvik-cache for the system apps. Instead of sharing the dalvik-cache on \data\dalvik-cache for all apps (so from users-space \data and system space \system), the System apps dalvik-cache is located in \cache\dalvik-cache.

This makes a useful exploit for the 100MB \cache partition on the Xperia Ray and it saves roughly 50MB on the \data partition.

It seems however that the integration of updates to the \system apps is not working properly with link2sd this way. I have noticed to get repeated reminders and downloads from Google Play for these items. Not sure if this is due to their original location of .dex in \cache or (potentially) the updated .dex being moved to \data where link2sd usually keeps/puts the updated .dex files for system apps.

I swapped back to my modded ICS (where 100MB of \cache is basically useless) for stability reasons - but maybe others with CM10 or JB can report about that split of dalvik-cache location.

This would leave another idea for link2sd (if enough such unexploited \cache partitions exist for several devices): link/move system .dex to \cache :)
[Android Apps and Games] cnjax:
Galaxy s2 on jb leak. Set 2nd partition fat32 primary. Got following error /dev/block/vold/179.10 on /data/sdext2 failed. Please help
[Android Apps and Games] cnjax:
Galaxy s2 on jb leak. Set 2nd partition fat32 primary. Got following error /dev/block/vold/179.10 on /data/sdext2 failed. Link2sd sees partition however it appears that the system is not mounting the 2nd partition
[Android Apps and Games] bryenewbie:
query regarding "create link"

Hi Sir,

This app works fine on my experia go ICS with 20GB storage, 10GB ext2

However, whenever i do the "create link to sd card" on my apps, the apps moved on ext2 but still consumed some MB on my phone's memory,,I've tried just move to sd card without creating links it was successful but the apps just move into my sdcard (internal memory) and not entirely on my external sd card (ext2). so i did the "create links to sd card" but somehow it consumes phone memory but the majority of the memory was successfully moved to my external sd card.

ex.

a. Phone memory 300+mb(used) > sd card(internal memory) 700+mb(used) > external sd card(ext2) 100+mb(used) << ===after "move to sd card(internal memory)

b. Phone memory 800+mb(used) > sd card(internal memory) 100+mb(used) > external sd card(ext2) 1+gb(used) <<===after "create links to sd card"

=meaning this method "create link to sd card" still piles up some MB on the phone's memory so it will still used up space.

Q. are there ways to correct this issue? is it possible to move the entire apps to external sd card(ext2) without/less consuming the phone's memory?

MANY THANKS!
[Android Apps and Games] Nightshadow931:
App data will stay on your internal memory, it's how link2sd works.

Try to restart your phone, and then check your free int memory, it will increased. :)
[Android Apps and Games] cnjax:
Anyone have a resolution for this? I have tried all partition types with the same results. phone is Galaxy S2 on JB rom. Looks like the OS does not mount the second partition. In app I looked under storage info, app shows the 2nd partition and shows not mounted. So how do we get the second partition to mount?
[Android Apps and Games] Toki_Wartooth:
cnjax, perhaps try reformatting the card. I've had errors like that before and I've had to go through all the file systems until it finally accepted one. I've had Link2SD lose connection with the memory card twice so it says it's corrupted and I can't use any apps (though the files are there) until I wipe my phone. Might not do anything, but I'd try reformatting the card with each file system and see if one of them works out.
[Android Apps and Games] d12unk13astard:
@cnj

I too had the same problems you were running into. It seems no matter what ROM/kernel or ext2-4/ fat32 partition I used, link2sd would always throw the same errors you speak of.

It has to be the way our s2 phones are partitioned inside for the app not to notice our 2nd partition on external sdcard. Link2sd reads only from /sdcard... our phones internal sdcard cannot be partitioned(only our external SD can) which is mounted as /sdcard/ext_sdcard.

@bakpinar

Think it would be possible to look into this or have a search function to find our phones 2nd partition. It seems its only largely effecting s2 users.
[Android Apps and Games] anancr:
question about linked dex files

hi, I'm using the app with a cm10 rom, I tried linking the dex files, but after reboting the device all the dex files, get de-linked, even when I have cheked the option to link dex-files at boot. is there any way to see why happens, and to avoid it?

thanks for any info.
[Android Apps and Games] ronakm18:
any new update?
[Android Apps and Games] cnjax:
I thank you for the response but I have re formatted the card before creating the partition. I believe the problem is that the system is not mounting the partition at boot. Whrn I go to phone storage it only shows the first fat partition on the external_sd. Link2sd sees the partition and shows it as not mounted therefore link2sd cant write the script and we get the error msg.

Omega 16.2

philz kernal 3.72
[Android Apps and Games] Deadly:
____________________________________

ಇದು ನನ್ನ ಆಪ್ ಸಿಗ್ನೀಚುರ್

Nothing is True.. Everything is Permitted©
[Android Apps and Games] cnjax:
I know that the internal storage cannot be partitioned. I was speaking in ref to the external_sd. Actually under jb i think the mounting point for the external_sd is /mnt/storage/extsdcard

Omega 16.2

philz kernal 3.72
[Android Apps and Games] kumbar55:
Upon every restart, all the linked apps are gone from menu.

But is has its files in partioned part as well in phone also.

Worst part of it.

I rate it as 1*.

-sent from Fx Warrior's XDA App
[Android Apps and Games] Harbir:
this happens when you dont seclect relink apps at boot in settings try that it will be fixed:cool:
[Android Apps and Games] bryenewbie:
>>>>>>>Yes i see that free space from internal memory increased but the phone memory's space decreases after creating link to sd card.. So it doesn't really move the apps into the external sd card just some data files,,do any one noticed this or is it just on my phone? someone help me please, i'd like to move the entire apps into the external sd card,,thanks!
[Android Apps and Games] blue.wave:
The Best App. :)
[Android Apps and Games] kumbar55:
Its in ur phone.

It links all files of app.
[Android Apps and Games] anancr:
is there a risk involved in making the app link the /data/data ?
[Android Apps and Games] tobbbie:
Well, this question repeats over time and reply is that linkage is done only for files that are READ access to save your external card. All other files located in \data\data\<app> are potential "WRITE" candidates and so (while linking would work technically) the lifespan of your SD card would suffer.

The author has so far not added this potential linkage (on whichever granularity) of remaining items in that directory to his application, which for me is sad as I also would like to see that. Still the saving from what link2SD does are enormous and it is a life-saver for me.

On the other hand you could ask what makes internal flash memory better to allows apps to write there? Would it not be cheaper to replace a failing sd card than having to replace the device? There are other lifetime killers for SD cards, e.g. those playing with swap files on the cards and these cards get so cheap over time, that you probably would not care.
[Android Apps and Games] rmittal:
Enable Data2SD via Titanium Backup

For those who also want to move app data to SD Card

Enter these commands in "android terminal":

su

ln -s /data/sdext2 /data/sd

mkdir /data/sdext2/app

Titanium Backup will immediately show the extra 'drive' on it's overview page and will offer the 'move app data to sd card' when looking at the 'special features' screen for an app. When you choose it, TB will ask to create '/data/sd/data2' and move the app data to SD Card.

These instructions have been copied from somewhere within this forum and I have successfully tested it with my HTC Wildfire.

Regards
[Android Apps and Games] Arioch1:
App2SD

I wonder if Link2SD 2.2.3 have options to use OS-provided App2SD only.

It's bukl-tin App2SD proves unreliable and leads to situations when Link2SD considers application "On SD" and all other tools consider it "in the phone"

Consequently i cannot link that application into sdext2 except for re-installing...

Sony Live Walkman (aka LWW, WT19i, coconut), CyanogenMod 10.0 build FXP-150

----

Strange effect: after updating android SDExt2 (4GB, ext2 fs) was no more mounted.

This repeats if i clean the cache and the dalvik-cache from CWMod.

However Link2SD fails to mount that partition if i choose ext2 mode - it writes something like "directory does not exist"

But if i chosoe mount in ext4 mode it works and mounting in ext2 mode also works after that

----

I wish Link2SD also had unmount option...

I had some broken folders on ext2 that seems to have some invalid parameter ,do no access was possible.

Attempts to ls, delete, rename or change grants ended with "stat failed" or similar error.

I want to run e2fsck over it.

It wold be nice if Link2SD offered me help over it.

----

It would also be nice if Link2SD could intercept that "optimizing application 1 of 101" activity and pro-actively moved dex'es to SD.

As of now, re-mounting of ext2 makes the phone unusable, for 0 free space remains and many application just can not run.

Actually i got out of this only by using TotalCommander (file manager) plus terminal (to re-mount /system r/w) and Link2SD with numerous reboots...

Link2SD alone just failed to move anythign to SD after MTD partition was overloaded

I think it would be nice to have "re-link lib to SD" and "re-link cache to SD" commands to be runnable before Android shell started, from CWMod or such
[Android Apps and Games] pururava:
Yepp..i also tried it..thnx rmittal to u for pointin it out..

N thnx to whoever posted it originially..

Workin successfully..

However, i tried to use "batch mode" n tried to move data of all apps including system apps too..

Dat was bizzare..phone became unstable..all my msgs,cntcts,settin,home screens..in short all system apps data was lost..

Thank god i had backup..

So i learned not to move data of system app..nly move data of user installed apps..
[Android Apps and Games] Ricfil:
Hello all. Long time Link2SD user here. Awesome app.

I´ve been looking into other scripts that move apps into external partitions lately solely because I never managed to get Link2SD to recognize Ext partitions on my Motorola Milestone... I managed to work with it pretty good using a Fat32 partition, but I came to the conclusion that whenever I needed to make a nandroid backup, the Fat32 partition simply isn´t recognized by Nandroid, thus it does not performe a backup in the partition (with plenty of apps inside...). I have to make a backup of the partition with 3rd party software, which is kind of a pain in the ass when it comes to restoring the phone settings as they were (so that I can experiment using other Roms and things like that). I´ve seen references to ext2.ko and ext3.ko files needed for some roms, but never found any useful info regariding that aspect. I´m using CM9 at the moment, but I´ve also tested withs stock 2.2 Froyo Rom, CM7 and CM10. The same problem happens, Link2SD can´t find the partition(mount it maybe?) :confused:

Has anyone got any idea or had a similar problem?

Thanks in advance:good:

EDIT: Using an EXT4 partition with Link2SD on CM9 I managed to put it to work, but still, whenever I install an app I have to go to Link2SD and reinstall that same app again before it works (if I do not do that it gives me an error and the app does not launch). Any idea what might be hapenning?

EDIT2: After some more tweaks, I believe Link2SD is incompatible with Kabaldan´s CM9. It just works with Ext4 only and after a reboot, all kinds of app erros begin appearing. Even Link2SD in itself stops working...
[Android Apps and Games] tobbbie:
Link2SD does not work well with CM10, especially with FXP. See my report further down. I think it goes back to the split of dalvik cache into \cache\dalvik-cache for system apps and the usual space at \data\dalvik-cache for user apps.
[Android Apps and Games] pankycool123:
very useful apps
[Android Apps and Games] sasa g:
It work. TNX:)

NeoV
[Android Apps and Games] yambu:
I thought about doing this, but I wasn't sure whether it plays safe in combination with Link2SD.

In particular, libraries are originally in the data folder and they get linked into /data/sdext2/data/. Wouldn't be safer to avoid linking libraries with Link2SD when used in combination with TB's "move the app data to SD Card"?
[Android Apps and Games] falcaobr:
Hello,

Link2SD is very good. But using Android 2.3.6 and I have a phone with 164MB of internal memory and I have a problem.

Link2SD works, as you can see, but from that point fails and displays the following message:

"install_failed_insufficient_storage"

Still has plenty of space (604MB free) in / data/sdext2 ????

And the message? Why not move?

Is there a way to fix this problem?
[Android Apps and Games] GermainZ:
Apps must be moved to internal storage BEFORE being copied to the sd partition. Link2SD usually does that without bothering the user.

So if you're trying to link a 50mb app, it won't work. Free up some space first.
[Android Apps and Games] Androloid:
Problem: Widgets wont load after every reboot. Message: Problem loading widget appears in places where widgets should be.

I can recreate widgets, though. Appwidgets.xml file recreates after reboot and it's size is changing every time after reboot, for the present widget configuration from 1,25 kb to 250 bytes. I have tried everything which I could find online: manual backup and restore of original xml file, titanium backup, even nandroid restore, nothing helps. Interesting thing is that problem persist even after nandroid backup to the point when all worked fine.

I am using launcher pro plus (as system app), sd-ext and swap partitions. All apps with widgets are on internal memory.

This occurs after installation of some specific apps, my fitness pal for example, or mx codec pack, and linking them to sd ext, but last time everything worked fine after installation and linking of this app. Sometimes widgets get loaded, once in about thirty reboots. The problem seems to have some degree of randomness.

I have red that this problem might originate due to a late mounting of sd-ext on system boot, although it shouldn't be an issue, because all widget apps are on the internal memory.

Second possibility is the so called boot race, known to be happening in some early betas of cyanogen mode (my rom is custom, but not cm), connected with app providers, and app hosts.

This is driving me crazy... Any help?
[Android Apps and Games] falcaobr:
ymbiode tracted

@ GermainZ,

Thanks a lots for your reply, I did some tests and it worked well.

I put "auto link" on, and install location to "auto" in Link2SD.

I installed a program smaller than the free space inside, pointing to the internal memory.

The Link2SD done automatically linking, rebooted and the space was ok, very little reduced. Perfect.

@ Androloid

I have Android 2.3.6 (Kernel 2.6.35.7) ALPS.GB.FDD2.MP.V4.5, and Spier Launcher, linked and tested 6 Widgets running all returned after about 3 reboots followed, no problems.
[Android Apps and Games] bobbi87:
Partioning

..thanx for this..did managed to moved some of my app..great share..
[Android Apps and Games] reccasyah:
android market nor google play vanished

hello guys, i really need your help. i used link2sd and in one of the processes, i accidentally 'upgrade to system app' or something like that to my google play. but then i realized it won't open after that. so i change it back to user app. still, nothing happen :(

and now not just google play, i don't even have android market on my device! i still have the 'get apps' or 'get game' apps, but it couldn't connect to server:crying: i ****ed up big time! please, really need somebody's help here.
[Android Apps and Games] Porobu:
delete data of google play and google services framework then reboot and open play store.

If it doesnt work reinstall ur rom or download google play apk, copy it to system/app set permissions rw-r--r-- and reboot
[Android Apps and Games] Magnumutz:
Unfortunately, this does not work on Galaxy Note N7100...

Does anyone know if i can do something to make it work?

I'm a games addict and 16GB of internal memory aren't enough for me, i've got a 32GB microSD half empty, ready to take the games, the other half has movies and music on it :D
[Android Apps and Games] cbb77:
While this works great for me, I do not use this tool alone. This app will only handle the app and associated libraries. A lot of the data for the games will still reside on the internal memory. However this can still be moved using DirectoryBind. Here is the link / thread for it

http://xdaforums.com/showthread.php?t=1410262

Using both apps, I have been able to relocate just about all of my games to my SD card. I say most as I have run into a few that don't seem to want to work directly off the SD card but for most part, most will run just fine. Hoping someone could combine these two apps into single application.
[Android Apps and Games] Magnumutz:
Thanks man, i'll try that as well!
[Android Apps and Games] Cavaler:
I've got a certain chinese Android device, with 2Gb available as Internal storage.

I remounted it to be visible as /data/sdext2, via vold.fstab:

>> dev_mount sdcard2 /data/sdext2 auto /devices/platform/goldfish_mmc.1 /devices/platform/mtk-sd.1/mmc_host

And yes, Link2SD does see it as second partition and allows linking apps there. So far so good.

However, if I link only .apk and .dex - everything works fine. But when I try to link library files - every application I tried crashes (iGO, Foxit PDF, FBReader, etc).

Could it be because of /data/sdext2 mounted with incorrect permissions?

# ls -la /data

>> d---rwxr-x system sdcard_rw 2012-12-26 10:33 sdext2

Seems OK to me, everyone has +x...
[Android Apps and Games] dialallama:
mkdir failed for /data/sdext2/data, file exists

Hi,

I'm running 4.1.1 on a samsung galaxy tab 7 gt-p3110

I've rooted with CF-auto-root

When I first link an application, it reports success, however, the application then fails to launch. If I restart, the application disappears.

When I try to link a second application i get the mesage 'mkdir failed for /data/sdext2/data, file exists'.

If I browse the directory, I can see that /data/sdext2/data does exist with the apk file from the first linked app in it.

If I delete the directory, then I can link an application again, but although it reports success, the application fails to launch again.

I've googled extensively and cant find any solutions.

Ta
[Android Apps and Games] unpredictablescorpio79:
Ok i tried to mkdir /sdcard/_ExternalSD

then

mount -t vfat -o rw /dev/block/mmcblk1p1 /mnt/sdcard/_ExternalSD

then i got error

operation not permitted

am i missing something really basic here?

---------edit-----

i found half of what im missing

open terminal

run

su

to gain superuser DOH no clue

then

mkdir /blah/blah

then

mount -t vfat -o rw /dev/block/mmcblk1p1 /mnt/sdcard/_ExternalSD

and pop it worked now i need it to remount on reboot i tried

mount -t vfat -o rw,remount /dev/block/mmcblk1p1 /mnt/sdcard/_ExternalSD

but got an error about not knowing the command

Plus i take it this isnt the command to mount on boot....

So now how can i remount on boot???
[Android Apps and Games] ciubexx:
Commands like you tried on terminal are lost on each boot.

You should add the command into an init script file.