New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
SrMoure
Old
#111  
Member
Thanks Meter 0
Posts: 41
Join Date: Feb 2008
Location: Sydney
Quote:
Originally Posted by subham964 View Post
Hey can u suggest me a way to directly install apps to sdcard without first installing it to internal memory and den moving it to the ext2 partition.
Android 2.2
 
kousik
Old
#112  
kousik's Avatar
Senior Member
Thanks Meter 34
Posts: 192
Join Date: Nov 2010
Location: Bangalore
Sorry for cross-posting. As my learning attempt, I quickly tried to do by hand what the app is doing. Unfortunately it didn't work for me. Here are the steps I followed, I wonder if anyone can identify where things went wrong.

1. Fresh installed Angry Birds
2. Mounted the ext2 partition of the SD card to /data/sdext2
3. Copied /data/app/com.rovio.angrybirds.apk to /data/sdext2
4. removed original, and created a symbolic link com.rovio.angrybirds.apk -> /data/sdext2/com.rovio.angrybirds.apk
5. This removed Angry birds from my app list, but I thought that's Ok as long as there's adb
6. In adb shell, tried to execute "am start -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -n com.rovio.angrybirds/com.rovio.ka3d.App -f 0x10200000"
7. No joy :( it fails with Error: Activity class {com.rovio.angrybirds/com.rovio.ka3d.App} does not exist. If the file was physically present instead of symbolic link, this launches Angry birds


Trying to guess where did I go wrong. I am kind of sure that reboot is not required, because without rebooting I can copy the apk back and forth and launch the application. Anyway I don't have boot script modified that could mount the ext2 on boot (though I did by hand later). Wondering if that matters ...
 
bakpinar
Old
#113  
Recognized Developer - OP
Thanks Meter 714
Posts: 333
Join Date: Dec 2010
Location: Istanbul
Quote:
Originally Posted by kousik View Post
Sorry for cross-posting. As my learning attempt, I quickly tried to do by hand what the app is doing. Unfortunately it didn't work for me. Here are the steps I followed, I wonder if anyone can identify where things went wrong.

1. Fresh installed Angry Birds
2. Mounted the ext2 partition of the SD card to /data/sdext2
3. Copied /data/app/com.rovio.angrybirds.apk to /data/sdext2
4. removed original, and created a symbolic link com.rovio.angrybirds.apk -> /data/sdext2/com.rovio.angrybirds.apk
5. This removed Angry birds from my app list, but I thought that's Ok as long as there's adb
6. In adb shell, tried to execute "am start -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -n com.rovio.angrybirds/com.rovio.ka3d.App -f 0x10200000"
7. No joy :( it fails with Error: Activity class {com.rovio.angrybirds/com.rovio.ka3d.App} does not exist. If the file was physically present instead of symbolic link, this launches Angry birds


Trying to guess where did I go wrong. I am kind of sure that reboot is not required, because without rebooting I can copy the apk back and forth and launch the application. Anyway I don't have boot script modified that could mount the ext2 on boot (though I did by hand later). Wondering if that matters ...
Reboot required on 1.6 and 2.1, as stated in the first post.

Quote:
How it works:
Link2SD mounts ext2 partition of your SD card as /data/sdext2 and makes OS mounts it at boot time. (with /system/etc/install-recovery.sh file)

When you select an application and press "Create Link" button it moves apk file to SD ext2 partition and creates a symbolic link in original directory (/data/app).

Note: After this step, application icon disappears from the phone on Android 1.6 and 2.1, but after reboot you can see and run without problems. On 2.2+ this is not the case.
 
kousik
Old
#114  
kousik's Avatar
Senior Member
Thanks Meter 34
Posts: 192
Join Date: Nov 2010
Location: Bangalore
Quote:
Originally Posted by bakpinar View Post
Reboot required on 1.6 and 2.1, as stated in the first post.
Thanks, will try the same. To get the benefit of reboot we have to mount the ext2 of SD card during the boot, which I'll take care of. I have seen another error like:

W/asset ( 8283): Asset path /data/app/com.twitter.android.apk is neither a directory nor file (type=0).
W/dalvikvm( 8283): threadid=3: thread exiting with uncaught exception (group=0x4001d1c8)

Does that have anything to do with the error? It is a symbolic link (as created), and which is finally causing "java.lang.ClassNotFoundException"?
 
MegaBubbletea
Old
#115  
MegaBubbletea's Avatar
Senior Member
Thanks Meter 40
Posts: 576
Join Date: Oct 2010
Location: Brisbane

 
DONATE TO ME
Ok. I am back and I have totally updated my phone.

Time to test out this latest version. It better work...
HTC One X
Android Revolution HD 21.0
-----------------------------------
My Bubbletea Time | Nexus 7
 
kousik
Old
#116  
kousik's Avatar
Senior Member
Thanks Meter 34
Posts: 192
Join Date: Nov 2010
Location: Bangalore
Quote:
Originally Posted by kousik View Post
W/asset ( 8283): Asset path /data/app/com.twitter.android.apk is neither a directory nor file (type=0).
W/dalvikvm( 8283): threadid=3: thread exiting with uncaught exception (group=0x4001d1c8)

Does that have anything to do with the error? It is a symbolic link (as created), and which is finally causing "java.lang.ClassNotFoundException"?
Another idea may be to append /data/sdext2 in the CLASSPATH itself. In that case it doesn't have to follow symbolic link through /data/app but the system will search for the apk in /data/sdext2 directly. Anyone know how do we change CLASSPATH? Somewhere in build.prop or local.prop ... ? Thanks!
 
timpoldo
Old
#117  
timpoldo's Avatar
Member
Thanks Meter 2
Posts: 75
Join Date: Nov 2010
Hi bakpinar, thanks a lot for link2sd. Great app.

I've to notice a problem on my GT540. After install link2SD, i can't no more move apps from /system/app to /data/app. I use "Supermanger" to move apps, and it says everytime "Not enough free space".... but i think it's not true: i've 28MB free space, and the most big app to move is 5MB.

I need to move some apps from /system/app to /data/app, and then link it to SD. This because link2SD can't link "system application". So... i've thougt to move them in /data/app before link

(I dont know why some 3rd part apps i've installed, have been put in /system/apps and not in /data/app. However... i can't move them in /data/apps )

Ideas?
Thanks
 
bakpinar
Old
#118  
Recognized Developer - OP
Thanks Meter 714
Posts: 333
Join Date: Dec 2010
Location: Istanbul
UPDATE:

Good news about market issue...

Android Market doesn't see applications that have been link to SD card. Because a background process marks them as "UNINSTALLED" in the market's database when the link created.

To repair their state I have added "Market Fix" feature.

This will synchronize Android Market database with installed applications and missing market apps will be repaired.

Before starting, make sure market is not running and you're not downloading anything from the market.

NOTE: If some apps are still missing from "My Downloads" afterwards, just install any app from the market and they will show up.

Also added support in detecting and mounting ext2 partition for some roms. If you had previously received ext2 partition or mount error try this version.

You can download version 1.2.0 from the first post.
The Following 2 Users Say Thank You to bakpinar For This Useful Post: [ Click to Expand ]
 
Gx3
Old
#119  
Gx3's Avatar
Senior Member
Thanks Meter 35
Posts: 161
Join Date: Jul 2010
Location: Naples
if I update my phone's firmware can the app relink to ext2 apks?
 
CaptainZap
Old
#120  
CaptainZap's Avatar
Senior Member
Thanks Meter 33
Posts: 263
Join Date: Dec 2010
Great Job, works like a charm on the Sony X8.

@Gx3: I don't think it works that way...

Tags
link2sd, link2sd issues