Infinite reboot loop after apps to sd - G1 Android Development

I decided to try my hand at putting apps on the SD card for the first time. I have Kaykuro's latest apps2sd 1.5 version. I partitioned by 8GB SD card with a 300MB EXT2 system and the rest FAT32. I followed the instructions on his wiki and i am now in an infinite loop when it is booting. I did make a full nandroid backup before doing this. Can anyone help me find out what i did wrong and how to get it back up and running? Below are all of the commands I gave it.
C:\Documents and Settings\Garrett>adb devices
List of devices attached
HT848GZ29009 device
C:\Documents and Settings\Garrett>adb remount
remount succeeded
C:\Documents and Settings\Garrett>adb shell
# df
df
/dev: 49352K total, 0K used, 49352K available (block size 4096)
/sqlite_stmt_journals: 4096K total, 0K used, 4096K available (block size 4096)
/system: 69120K total, 65840K used, 3280K available (block size 4096)
/data: 76544K total, 55520K used, 21024K available (block size 4096)
/cache: 69120K total, 3924K used, 65196K available (block size 4096)
/system/sd: 294413K total, 13384K used, 281029K available (block size 1024)
/sdcard: 7463596K total, 187680K used, 7275916K available (block size 4096)
# cp -a /data/app /system/sd
cp -a /data/app /system/sd
cp: cannot remove '/system/sd/app': Is a directory
# rm -r /data/app
rm -r /data/app
# rm -r /data/app-private
rm -r /data/app-private
# ln -s /system/sd/app /data/app
ln -s /system/sd/app /data/app
# ln -s /system/sd/app-private /data/app-private
ln -s /system/sd/app-private /data/app-private
# reboot
reboot

Did you have the app "Contact Owner" installed? I had the same problem and from what I read it may have been caused by that app. If that's the case there's nothing short of a wipe that fixes it, I'm sorry.

Nope, i dont have that app installed. I just did a wipe of the phone (ALT+W) ill see if that helps at all.

the wipe got me back into the phone.... now im trying to see if things are going to the SD card or not. I have about 50MB free right now with no apps installed.

so after doing a wipe i can now get into the main OS. However, if i run the script again exactly how i posted above this time it works without giving me the directory error. When i reboot though i get stuck on the "Android" screen again. With the debug enabled i see "Scanning app dir /data/app-private" immediately after it gives me several errors "failure starting up core service" "Java.lang.nullpointerexception".
I dont understand why it is trying to look at /data.app-private doesnt the script i ran delete it? a few lines higher up it shows "skipping dir: /data/app/sd"
Can anyone help tell me what I am doing wrong with this?

Looks like apps to SD is never going to work for me....
I did manage to make sure both the app and app-private folders on the EXT2 and internal memory were completely empty. I ran through the procedure again and it appears to be placing the apps on the SD card now with new app installs but it also places them on the internal memory. I dont know if that is normal or not but i know my internal memory is decreasing each time i install an app and its not due to cached files in the browser, package installer or market. If anyone has any ideas please let me know, i would love to get this to work.

.
I'm trying to stay positive here and work through this but its getting very frustrating.
I formatted my entire SD card as FAT32, then formatted a 400MB EXT2 partion at the end of the card.
I wiped my phone, then installed the latest JF 1.5 ADP release. I installed the app called "AppsToSD" figuring this would be "idiot proof" so there is no way i could screw it up....
So the SD card was formatted, phone was wiped, JF applied, had to setup the google account so data was synced, then i went straight to the market and downloaded the "appsToSD" app, checked the box to copy existing apps (even though the only one is appstosd), then clicked "Move apps to SD", Quit, then rebooted the phone. Once it booted back up i figured I was done. Checked my internal memory available which was about 50MB. I started downloading all my apps again and now im back to having about 15MB free on my phone.
Is there anyone that can help me get my apps to install to my SD card? I have tried two different SD cards as well. Either I am doing something completely wrong no matter which tutorial I follow, my phone is jacked up, or all the Lemmings i killed years ago on the PC have come back from the dead and are screwing with me.
I can hook my phone up to my PC and can easily share the desktop so someone can look at the phone and run commands against it first hand if anyone out there is willing to lend me a hand with this. I am desperate!
XDA thread history:
7th May 2009 04:40 PM
nockam Looks like apps to SD is never going to work for me....
I did manage to make sure both the app and app-private folders on the EXT2 and internal memory were completely empty. I ran through the procedure again and it appears to be placing the apps on the SD card now with new app installs but it also places them on the internal memory. I dont know if that is normal or not but i know my internal memory is decreasing each time i install an app and its not due to cached files in the browser, package installer or market. If anyone has any ideas please let me know, i would love to get this to work.
7th May 2009 09:21 AM
nockam so after doing a wipe i can now get into the main OS. However, if i run the script again exactly how i posted above this time it works without giving me the directory error. When i reboot though i get stuck on the "Android" screen again. With the debug enabled i see "Scanning app dir /data/app-private" immediately after it gives me several errors "failure starting up core service" "Java.lang.nullpointerexception".
I dont understand why it is trying to look at /data.app-private doesnt the script i ran delete it? a few lines higher up it shows "skipping dir: /data/app/sd"
Can anyone help tell me what I am doing wrong with this?
7th May 2009 08:45 AM
nockam the wipe got me back into the phone.... now im trying to see if things are going to the SD card or not. I have about 50MB free right now with no apps installed.
7th May 2009 08:40 AM
nockam Nope, i dont have that app installed. I just did a wipe of the phone (ALT+W) ill see if that helps at all.
7th May 2009 08:36 AM
bsander Did you have the app "Contact Owner" installed? I had the same problem and from what I read it may have been caused by that app. If that's the case there's nothing short of a wipe that fixes it, I'm sorry.
7th May 2009 08:04 AM
nockam Infinite reboot loop after apps to sd
--------------------------------------------------------------------------------
I decided to try my hand at putting apps on the SD card for the first time. I have Kaykuro's latest apps2sd 1.5 version. I partitioned by 8GB SD card with a 300MB EXT2 system and the rest FAT32. I followed the instructions on his wiki and i am now in an infinite loop when it is booting. I did make a full nandroid backup before doing this. Can anyone help me find out what i did wrong and how to get it back up and running? Below are all of the commands I gave it.
C:\Documents and Settings\Garrett>adb devices
List of devices attached
HT848GZ29009 device
C:\Documents and Settings\Garrett>adb remount
remount succeeded
C:\Documents and Settings\Garrett>adb shell
# df
df
/dev: 49352K total, 0K used, 49352K available (block size 4096)
/sqlite_stmt_journals: 4096K total, 0K used, 4096K available (block size 4096)
/system: 69120K total, 65840K used, 3280K available (block size 4096)
/data: 76544K total, 55520K used, 21024K available (block size 4096)
/cache: 69120K total, 3924K used, 65196K available (block size 4096)
/system/sd: 294413K total, 13384K used, 281029K available (block size 1024)
/sdcard: 7463596K total, 187680K used, 7275916K available (block size 4096)
# cp -a /data/app /system/sd
cp -a /data/app /system/sd
cp: cannot remove '/system/sd/app': Is a directory
# rm -r /data/app
rm -r /data/app
# rm -r /data/app-private
rm -r /data/app-private
# ln -s /system/sd/app /data/app
ln -s /system/sd/app /data/app
# ln -s /system/sd/app-private /data/app-private
ln -s /system/sd/app-private /data/app-private
# reboot
reboot

.
I'm trying to stay positive here and work through this but its getting very frustrating.
I formatted my entire SD card as FAT32, then formatted a 400MB EXT2 partion at the end of the card.
I wiped my phone, then installed the latest JF 1.5 ADP release. I installed the app called "AppsToSD" figuring this would be "idiot proof" so there is no way i could screw it up....
So the SD card was formatted, phone was wiped, JF applied, had to setup the google account so data was synced, then i went straight to the market and downloaded the "appsToSD" app, checked the box to copy existing apps (even though the only one is appstosd), then clicked "Move apps to SD", Quit, then rebooted the phone. Once it booted back up i figured I was done. Checked my internal memory available which was about 50MB. I started downloading all my apps again and now im back to having about 15MB free on my phone.
Is there anyone that can help me get my apps to install to my SD card? I have tried two different SD cards as well. Either I am doing something completely wrong no matter which tutorial I follow, my phone is jacked up, or all the Lemmings i killed years ago on the PC have come back from the dead and are screwing with me.
I can hook my phone up to my PC and can easily share the desktop so someone can look at the phone and run commands against it first hand if anyone out there is willing to lend me a hand with this. I am desperate!

1) make sure your microSD card is class 6. Class 4 will not work and will cause your phone to crash like crazy and probably go into a boot loop.
2) make your partitions & format
3) install the cupcake version found here:
http://forum.xda-developers.com/showthread.php?t=480582
4) open the terminal app
5) type 'su' and hit enter (without the quotes)
6) type 'lucid app' and hit enter (without the quotes)

Thanks for the info I will give that a try in about an hour and report back. I do however have a brand new Class4 8GB Sandisk card (from what i have read it looks like others have the same card with apps2sd without problems).
That shouldn't prevent me from doing this right? Just add a lag? I am just going to do the apps, no cache or anything else.

I tried with a class 4 and couldn't get it to work. Though it may be because I moved more than just apps.

Related

Issues with apps to sdcard?? POST HERE ONLY!!!

I was able to install and run apps from the sd card (ext2), but somehow I still uninstall some apps that i don't use frequently. Is there anyway I can remove the apps from the sd card that i uninstalled? I know the fact that they don't occupy that much spaces, but still I'm thirsty for the knowledge on that issue
uuummm you can go to your terminal and
1- su
2- cd /system/sd/app or app-private
3- ls
4- rm "filename you wanna remove" without double quotes
5- Thats it !!!
samysam05 said:
uuummm you can go to your terminal and
1- su
2- cd /system/sd/app or app-private
3- ls
4- rm "filename you wanna remove" without double quotes
5- Thats it !!!
Click to expand...
Click to collapse
and because of the "ln -s" command you could also cd /data/data/app .. it all points to the same place now
issues partitioning SD card for moving apps
I am having ALOT of trouble trying to format my 4GB SD card to the fat32/ext2 partitions.
I have tried using partition manager 9, setting the fat32 (2.8GB) as a primary, and also setting the SECOND partition ext2 as a primary (1GB). I also tried using gparted and did the same EXACT partition, size and settings in all the different programs. I also tried a mixture of FAT16/FAT32 and ext2 for all the settings. I then tried using ext2fsx on my mac using the same exact settings as before. No matter what, it doesn't mount /system/sd, it always is mounted to /system/sdcard.
(the below are estimated because I was entering all commands in the terminal on my G1)
I'm suppose to see something similar to the following:
dev/mmcblk0p2 1.2G 9.1M 1.1G 1% /system/sd
I always get something to similar to:
dev/mmcblk0p2 1.2G 9.1M 1.1G 1% /system/sdcard
I always see the fat32 partition but never the ext2. I know that alot of people on this forum seem to be able to do this without issue. I unfortunately have been working it on all day.
Can someone PLEASE help me out? Thanks!!!
have you tried moving the apps to sd? see if you actually move all your apps and look at that line again to see if there is an adjustment in size
Which directory does your mountd.conf and init.rc files specify in it if you open them up? Does it say /system/sd or system/sdcard? I believe tempo had his saying system/sdcard and used different files than the ones in the post by dwang that does basically the same thing. I recall one of them using /system/sdcard in their post and the other doing just /system/sd. Use the same file from the same post and don't mix the 2 up because they are not the same.
I used dwang's instructions and files and got my 2GB card partitioned and working. I have had a problem getting my 8gb card working for some reason but that is another story. It seems my 8gb isn't readable or writeable after I partition the ext2 section although the fat32 is ok. I'm familiar with linux but don't know what I need to do to make that partition writeable when I can't get it to show up at all except in gparted and partition manager under windows. I tried busybox df -h without it showing so no luck there...
Hopefully what I metioned helps you and maybe somebody has an idea why mine didn't work either although I wasn't very specific.
I tried both files and mounting on both /system/sd and /sd neither of which worked . I also tried various programs to partition the sd card. I have no other ideas...
Hi,
This is how it should look.
I use an adb shell through the computer (windows xp).
The drive with 1.5g available is the sd card drive.
Non-market apps on SD card issue
Okay... Getting this to work has sucked horribly for me and after rooting through the other forums that would apply to my issue i've found no solution. I have RC33 JFv1.42 LucidREM mod, with /app, /app-private, and /data all copied to the EXT2 partition of my SD card. I am trying to install the AndroidVNC viewer using the AppsInstaller app, I have AndroidVNC saved onto the root of the FAT32 partition of my SD card. The Appsinstaller sees it but when I go to install the .apk itself it's giving me the following error:
"androidVNC could not be viewed. Free up some space on your phone and try again." Giving me a 'cancel,' and 'manage applications' button under.
The error doesn't make any sense because when I login to my terminal as root and # busybox df -h, the only parts of my system that are full are the usual suspects:
/system
/system/modules
/system/xbin
all of which are full, but they always have been for me, so I'm not sure if the Appsinstaller is trying to use one of those blocks to extract to temporarily or something like that. what am i missing here!?!?
bump
Partial App migration to SD card...possible?
Has anyone tried to move only *some* of the apps to the SD card?
I'm stuck with a class 4 mSD card, so as I understand it, moving the apps en masse to the SD card isn't a recommended option.
But I was wondering if perhaps I might move *some* apps to the SD card...maybe just ones that I don't use often, or aren't particularly complicated, or maybe just ones that seem to run perfectly fine from the card.
Some of the "high performance" apps, or ones with a lot of I/O dependency I'd leave on the phone internal storage.
As it stands right now, I'm at total app saturation. I've uninstalled infrequently used apps and have them backed up for ready restoration anytime/anyplace. I've moved every cache possible. Yet even at 13MB free, the phone still complains I don't have enough room to install the latest build of AndNav2.
Should I even attempt a partial migration? I have no paid apps (and apparently couldn't install any even if I wanted to) so I'd just be moving the *.apk file and maybe the *.odex files? Is that all I need to move and then symlink to?
Bump for day crew.....
I'm using this setup. I use my own bash script to move apps:
Code:
#!/bin/bash
# mvappndata.sh 1.1 by Autarkis
# GPL OpenSource
adb remount
adb shell cp -rp /data/app/$1.apk /system/sd/app/$1.apk
adb shell rm /data/app/$1.apk
adb shell ln -s /system/sd/app/$1.apk /data/app/$1.apk
adb shell cp -rp /data/data/$1 /system/sd/data/$1
adb shell rm -r /data/data/$1
adb shell ln -s /system/sd/data/$1 /data/data/$1
You call it with the application's name without the .apk suffix.
Code:
mvappndata.sh com.mobisystems.msdict.embedded.wireless.pons.ssd
Known Bugs:
* apps moved this way don't show as Installed or Updated in Market, but as Free
* sometimes, when you are running out of memory, it won't be possible to install new apps from market - the downloading process will hang right at the beginning. Making even more room does the trick
I leave all apps that are being started at boot time or once started should run as a service in the internal memory. I move all the big apps (like dictionaries) to the SD. It mostly works, but since many apps are buggy themselves it's difficult to tell where a certain Force Close is coming from.
Cheers from Switzerland,
Autarkis
Ah...precisely what I was looking to do. Thanks....that helps a lot.
I'm guessing I can modify the script to run directly on the phone....it appears you have constructed to move apps while connected to a PC via the USB cable. Is this correct?
f4phantomii said:
Ah...precisely what I was looking to do. Thanks....that helps a lot.
I'm guessing I can modify the script to run directly on the phone....it appears you have constructed to move apps while connected to a PC via the USB cable. Is this correct?
Click to expand...
Click to collapse
Yes on both counts. I also use ls -laS to display installed apps sorted by size.
looping on android, home button & silent not working on 1.42
Hi,
Had a weird experience the other day. Phone was fine (rooted RC33/JF1.41). Got some AK Notepad reminders but was busy with something so I ignored them (but heard the alert go off). A few minutes later, the phone spontaneously rebooted and from that point on just looped on the android screen.
I figured I was due for an upgrade, so I popped out the sdcard and upgraded to JF1.42. The phone did come back to life, but at that point the home button won't work (wasn't a hardware issue as it worked to get me to the home+power loader) and when I held down power to shut down, I got only the "power off phone" option but no "silent mode" option. Very strange. This was obviously no good, so I went back to 1.41.
Long story short, the phone still looped, so I took this as a sign that a wipe was unavoidable (I didn't have a recent nandroid backup), but since I had WAY too many apps I never used (~200) and my phone was getting unstable (things were constantly force-quitting), I figured I may as well do some spring cleaning and start fresh.
I learned my lesson and finally got the important apps reinstalled and the phone reconfigured the way I want it -- and then did a nandroid backup so I can avoid this in the future.
But what the heck happened that made the buttons not work? That one freaked me out a bit...
And of course I still wonder what caused me to loop in the first place, totally randomly and spontaneously. Are there specific things that can cause that and if it happens again, is there an easy way to fix it?
Thanks
Gah! This is driving me nuts! I absolutely can't make this work.
I can transfer the whole /data/app and /data/data directories to /system/sd, but as I have a class 4 SD card, I get tons of force closes on apps.
So then I try just moving single apps. For example, moving the OI Flashlight app to the sd card.
Code:
# busybox -a /data/app/org.openintents.flashlight.apk /system/sd/app
# rm -r /data/app/org.openintents.flashlight.apk
# ln -s /system/sd/app/org.openintents.flashlight.apk /data/app/org.openintents.flashlight.apk
I do the same thing with the appropriate data directory for the app. I check and the files are moved. The symlinks are present.
But when I try to run the app, it just tells me that the application is not installed on my phone!
Grr! Then if I delete the symlinks and cp the files back to their original locations, same result. I end up having to re-install from backup.
Very frustrating. Any advice?
I don't know what busybox -a does.
It probably shoud say "cp -rp" instead.
It's important that you preserve access rights.
It's also very important that /system/sd is an ext2 partition. vfat won't do.
My script also assumes that as a preparation, /system/sd/app and /system/sd/data have been created. Like that:
Code:
mkdir /system/sd/app
mkdir /system/sd/data
I assumed that was self-explanatory, but it probably wasn't.
unionfs works for this:
have cake and eat it micro-howto:
(Use a recent jf dist)
/system/bin/insmod /system/modules/2.6.25-01843-gfea26b0/kernel/fs/ext2/ext2.ko /system/modules/2.6.25-01843-gfea26b0/kernel/fs/unionfs/unionfs.ko
(partition sd card as described in the aps-on-sd howto)
(mount to /data/local/ext for this example)
mkdir /data/local/ext/app
busybox mount -v -t unionfs -o dirs=/data/local/ext/app=rw:/data/app=ro unionfs /data/app
This has been tested; downloaded apps go to sd card but the system sees apps in /data as well.
The only issue with this is you can't umount the unionfs mount. In theory, you can have writes go to the real /data/app with:
busybox mount -o remount,dirs=/data/local/ext/app=ro:/data/app=rw /data/app
But I have not tested this.
losing storage after moving cache and apps.
Hi all,
I have moved apps to Sd Card.. I have moved cache to sd card and when all is said and done I had 47mb of 74mb free.. YES... but wait..
Now in using my phone I keep losing free space I am now at 45 of 74mb free. How can I found out what is taking my free space up .?
Please help. Thanks in advance for your time.

New and improved Apps to SD(more stable, more powerful, etc) Tutorial

Well, some of you may have heard my ramblings around here that I've been working with some of the devs here(JF and MartinFick deserve major praise, probably more than me) on getting a better way to do the whole apps to sd thing.
After 3 days of talking/discussing/working on it, I've finally reached the fruits of that investigation and thought I'd share. This new method uses the filesystem unionfs to essentially meld the /data directory with the /system/sd directory, so that they appear to be one. This has the potential to allow users to move specific apps to or from the sd card, is far more stable than the normal symlink method(will still boot, etc even if there's no SD card) and should be easier to set up. Now, onto the tutorial of setting this up.
BIG DISCLAIMER NOTE: This is a major hack of the phone and it is fully possible that it will break your phone(I've seen no permanently bricked phones but that doesn't make it impossible). Use this method, and my app along with it at your own risk.
REQUIREMENTS:
1: This only works on JF(possibly only on 1.5, not sure about the others) and The Dude's v.1.0 or greater. The Dude's 1.0 or greater actually does the steps in this tutorial for you so you can just run appstosd2 and set it all up from there if you're using his ROM.
2: This still requires you to have 2 partitions set up, first FAT32 and second ext2. Although you can use the appstosd2 app attached to this post and available in the market for $0.99 which will partition the card for you.
3: If you want your apps to go to the sd card, you must have a directory "/system/sd/app" If you didn't have apps to sd before on the ext2 partition do the following in terminal emulator or run my appstosd2 app after finishing the tutorial:
Code:
su
mkdir /system/sd/app
If you want the private-apps, or dalvik-cache moved you can replace "app" in that code with ""app-private", or "dalvik-cache" respectively. Do not copy "data" to the sd card. My script will delete it on the next reboot.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
Alright, first there's some files you need.
1: init.rc in .zip attached to this thread
2: a2sd.sh in .zip attached to this thread
All the above listed files should be put on your sd card(my tutorial will assume they are in the root directory of the sdcard(the topmost folder)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
If you need to undo the normal apps to SD first do the following in the recovery terminal(it's not strictly necessary but I'd recommend it):
Code:
mount data
rm /data/app
mkdir /data/app
if you moved the dalvik cache, repeat steps 2-3 with "dalvik-cache" instead of app. Ditto with "data" for the data cache.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
Then go to terminal emulator and type the following:
Code:
su
cp /sdcard/init.rc /data/
cp /sdcard/a2sd.sh /data/
Then reboot and you're set. By default all future apps are installed to the sd card. In order to move an app to the internal memory do the following in terminal emulator:
Code:
su
cp /system/sd/app/[the app you want to move] /system/intmem/app/
rm /system/sd/app/[the app you want to move]
I will be incorporating this into my appstosd app soon(probably as a JF and TheDude-only version until the rest of the devs get on board).
I have included a copy of appstosd 2, which will copy all apps from internal memory to the sd card with an option to remove them from the internal memory. This will only work if you have followed this tutorial.
If you don't have partitions set up, appstosd2 will now do that for you with user-set partition sizes.
NOTE: If you're using The Dude's ROM and find yourself with an outdated version of this since he doesn't always update his ROMs at the same time I update this, do the following in terminal emulator to update(after putting a2sd.sh from the attached a2sd.zip on your sdcard):
Code:
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
rm /system/bin/a2sd.sh
cp /sdcard/a2sd.sh /system/bin/
reboot
For JF1.5, do the following to update:
Code:
su
rm /system/intmem/a2sd.sh
rm /system/intmem/init.rc
cp /sdcard/a2sd.sh /system/intmem/
cp /sdcard/init.rc /system/intmem/
reboot
NOTE FOR UPDATERS: If you had your data on the sdcard(/system/sd/data), it WILL GET DELETED with the new version. This is a necessity in order to get both wallpaper and protected apps working. I recommend moving it back to the phone.
EDIT: And here's another tutorial from ThatsBS(might be easier for the less tech savvy to follow?):
I am still learning a lot everyday from this forum. So for people new to this process let me noobify it, if I can, as I am one too.
Start by reading the first page!! Get all the stuff you need from page 1. (apps2sd2.zip and a2sd.zip )
I started from a fresh wipe and flash of jf1.51 adp.
A newly formatted fat32, non partitioned sd.
Put the init.rc and app2sd.sh on the sd (the files NOT the zip)
Then go to the terminal emulator and typed:
su
cp /sdcard/init.rc /data/
cp /sdcard/a2sd.sh /data/
Then reboot
Next I ran the apps2sd 2 app. It will ask you how much to you want to partition. I did 3000mb the first successful time and the dreaded low mem notice would not leave the status bar. I have read not to make it more then 1500mb. Have a good connection, dont force close it. It will reboot.
Next, after the reboot, I ran the apps2sd 2 app again and pressed "copy apps to sd" (let it do its thing)
Reboot.
Next I went back to the emulator and typed:
su
mkdir /system/sd/app-private
mkdir /system/sd/dalvik-cache
Reboot.
Go back to the apps2sd 2 app and hit move dalvik-cache.
Reboot for good measure and your done.
I did this in about 10 mins. Worked flawlessly.
I have a ?, if i have been using your app what dod i do diferent or what should i change?
Thanks
Good job, thanks!
[email protected] said:
will still boot, etc even if there's no sim card
Click to expand...
Click to collapse
You mean SD card?
[email protected] said:
Alright, first there's some files you need.
1: unionfs.ko from here:
Click to expand...
Click to collapse
JF1.5 build has already unionfs.ko in it, doesn't it? Is there any difference between this unionfs.ko and the one included?
1. I hear unionfs is not really stable at this point, is it true?
2. Why do you want to move the whole /data folder to sd, instead of just /data/app, /data/app-private?
3. You might want to add a command to remove previous app2sd changes (i.e. delete symlinks, create folders.)
4. How do you put selected apps to internal memory after this? Copying to /data will copy to sd card again.
The whole idea is really interesting! Thank you for your work!
ArmandHammer said:
I have a ?, if i have been using your app what dod i do diferent or what should i change?
Thanks
Click to expand...
Click to collapse
You don't have to do anything different. It will find all the apps you put on the sd card. If you want to set the phone back to normal(so the phone memory apps can still be there), you can do the following in the recovery terminal:
Code:
mount data
rm /data/app
rm /data/dalvik-cache (only if you moved the dalvik-cache)
mkdir /data/app
mkdir /data/dalvik-cache
@Dimath: yes, I did mean SD card, good catch
1:JF didn't mention it and from a little bit of using it, it seems stable to me. Plus, no matter how much I've screwed up, I haven't managed to boot loop my phone yet.
2: You could just mount those independently. I might end up doing that eventually but for now the way it is works for reasons I'll get to.
3: True, although it's not strictly necessary. If apps2sd already works, this won't break it. I'll put in a guide on undoing the symlink method
4: Actually, no. My script sets the internal memory as the main file system in the union, so apps automatically go there. Moving apps to the sd card just involves copying them to /system/sd.
Ok, just a little confusing.
I didn't use the apps2sd to move apps over to my SD card. What I did was set it with the busybox ls command. I guess that's the symlink.
My question is, if I didn't use apps2sd, can I still use your method? I also moved the dalvik cache also, everything works fine for me now, my apps go directly to the SD card when installing since my memory stays at around 65 MB no matter what I do.
Just need some laymen terms to help me understand that if I'm NOT using apps2sd, and I just linked them with the recovery method, what's my pitfalls / advantages?
Thanks.
larrygates said:
Ok, just a little confusing.
I didn't use the apps2sd to move apps over to my SD card. What I did was set it with the busybox ls command. I guess that's the symlink.
My question is, if I didn't use apps2sd, can I still use your method? I also moved the dalvik cache also, everything works fine for me now, my apps go directly to the SD card when installing since my memory stays at around 65 MB no matter what I do.
Just need some laymen terms to help me understand that if I'm NOT using apps2sd, and I just linked them with the recovery method, what's my pitfalls / advantages?
Thanks.
Click to expand...
Click to collapse
Yes, any other method of apps to sd currently uses the same symlink method, so following the directions as if you installed my app will work. A note though is that all future apps will install to the internal memory by default. I did that because it's MUCH easier to move apps from the memory to the sd card than vice versa. You can use the code I posted if you want it the other way around.
would this also work for /data/data and app-private?
or is this particular setup only for dalvik-cache and app?
oh and before I do this, just wondering, so in theory, since I have a 1.5GB ext2 partition, my free memory will be 1.573GB (1.5GB + 73Mb internal)? The internal memory will just run down and switch over to the sdcard when needed (but be seen as one filesystem)?
andonnguyen said:
would this also work for /data/data and app-private?
or is this particular setup only for dalvik-cache and app?
Click to expand...
Click to collapse
This works for the whole /data folder and everything under it. Everything is automatically installed to the phone memory right now so you can just move over anything you don't want on it(will be making an app to do this automatically)
EDIT: oh and anything you already moved over to the sd card will still show up.
Code:
su
mount -o remount,rw /dev/block/mtdblock3 /system
cp /sdcard/unionfs.ko /system/
cp /sdcard/init.rc /data/
cp /runme.sh /data/
cp /sdcard/a2sd.sh /data/
I see, when I run these lines of code (I can do this from adb also right using adb remount) this IS the new symlink method. It's just all at one time without me having to manually link anything.
Right?
larrygates said:
Code:
su
mount -o remount,rw /dev/block/mtdblock3 /system
cp /sdcard/unionfs.ko /system/
cp /sdcard/init.rc /data/
cp /runme.sh /data/
cp /sdcard/a2sd.sh /data/
I see, when I run these lines of code (I can do this from adb also right using adb remount) this IS the new symlink method. It's just all at one time without me having to manually link anything.
Right?
Click to expand...
Click to collapse
Wrong, no symlinks here. Pure unionfs goodness. Basically it convinces the operating system that /data and /system/sd are the same thing. So anything that's on /system/sd shows up under /data but everything that's normally under /data is still there. Think of it like what happens in windows when you merge folders with the same name, but in this case in actuality everything stays exactly where it was.
New news: If you haven't seen it, I updated this tutorial(and the scripts with it) quite a bit and would now consider it to be completely fully functional.
Also The Dude will be sending me an advance copy of his next ROM tomorrow to verify it works. In his build the apps to sd will be automatic, with no user setup(although if you want apps on the sd card you'll have to make an app directory under /system/sd(mkdir /system/sd/app), ditto for dalvik-cache and data).
Finally, I will attempt to add this into my apps to sd app tonight, thus rounding out everything I can do.
After all this, the only thing left is for Haykuro to build it into his ROM and me to make an app to move specific apps to/from the sd card automatically.
This will no doubt be the method of choice in no time. Great work. Sticky?
If anyone dl'd the latest version(that fixed the race condition, etc), please download the one I just put up. I made that one in windows and I believe the funky carraige return(that indicates a new line) that windows uses screwed it up
So I got some kind of error, and I don't know what is going on.
I put in all the lines in the terminal emulator app..
but after line cp /runme.sh /data/ it gives me an error
it says "cp: cannot stat '/runme.sh': No such file or directory
Any help? I rooted my phone just so I could run my apps off of my SD card.. and now I can't figure out how to get it to work. Somebody help me please.
GTASouthPark said:
So I got some kind of error, and I don't know what is going on.
I put in all the lines in the terminal emulator app..
but after line cp /runme.sh /data/ it gives me an error
it says "cp: cannot stat '/runme.sh': No such file or directory
Any help? I rooted my phone just so I could run my apps off of my SD card.. and now I can't figure out how to get it to work. Somebody help me please.
Click to expand...
Click to collapse
Which ROM is this? JF1.5 should have runme.sh there...
[email protected] said:
Which ROM is this? JF1.5 should have runme.sh there...
Click to expand...
Click to collapse
Ok, I am going to re-partition my memory card.. and then re flash to JF1.5 and try it again.
Just tried it, one issue I'm seeing is android seems to install [email protected]@[email protected] into /system/intmem/dalvik-cache at boot. Is there anyway to have that only in my dalvik-cache on the sdcard?
Its a fairly large file at 3megs so I want it to reside solely on the sdcard and even if I delete it from intmem, whenever I reboot it gets added again.
Now when I display the internal phone storage from the settings menu, it shows up at 835 megs.
I wonder if this is possible to use unionfs and make an ext2 fs object as a file on the FAT fs. That way no 2nd partition is necessary. Plus, if you remove the sdcard, everything will still work.
Maybe we could combine unionfs and this method that uses an ext2 image on the fat32 for apps to sd.
http://forum.xda-developers.com/showpost.php?p=3402947&postcount=687
mkefs can be downloaded here:
http://sites.google.com/site/juanjosec/android
dwang said:
I wonder if this is possible to use unionfs and make an ext2 fs object as a file on the FAT fs. That way no 2nd partition is necessary. Plus, if you remove the sdcard, everything will still work.
Maybe we could combine unionfs and this method that uses an ext2 image on the fat32 for apps to sd.
http://forum.xda-developers.com/showpost.php?p=3402947&postcount=687
mkefs can be downloaded here:
http://sites.google.com/site/juanjosec/android
Click to expand...
Click to collapse
I've been looking at that possibility with JF and MartinFick as well, seems like it could be a good plan but I wanted to get this bit done first. It's a good point about the dalvik-cache, but in order to fix it JF(in this case) would have to change /init.rc to make sure to do this bit before building the dalvik-cache.
Can't download apps from market
hmm so I didn't hit any errors when doing this, but afterwards I am unable to download any apps from the market. It just continually says "Starting Download..." Everything else seems to work well.
I had this same issue when I tried to manually setup apps to sd using the symbolic links. I narrowed the issue down and figured out this only occurred after I moved the dalvik-cache over to the sd card. I'm assuming I'm doing something wrong, but can't seem to figure it out. Any pointers in a general direction would be most helpful
I'm using JFv1.50 ADP1.5, not the modded version by LucidREM. For some reason the bootloader couldn't pickup his version on my phone and --edit-- I'm pretty sure I have the SD card partitioned correctly... everything else seemed to work ok. The ext2 partition shows up as the correct size
*EDIT* So apparently my issue was the SD card as well. Just did a format of the sd card and it fixed it. I also formatted data and cache (alt+w in recovery mode). Thanks MarcusMaximus!
[email protected] said:
New news: If you haven't seen it, I updated this tutorial(and the scripts with it) quite a bit and would now consider it to be completely fully functional.
Also The Dude will be sending me an advance copy of his next ROM tomorrow to verify it works. In his build the apps to sd will be automatic, with no user setup(although if you want apps on the sd card you'll have to make an app directory under /system/sd(mkdir /system/sd/app), ditto for dalvik-cache and data).
Finally, I will attempt to add this into my apps to sd app tonight, thus rounding out everything I can do.
After all this, the only thing left is for Haykuro to build it into his ROM and me to make an app to move specific apps to/from the sd card automatically.
Click to expand...
Click to collapse
If I have apps2SD and the dalvik-cache both moved on the dudes builds already, do I still have to create those directories or will my existing setup still work fine? I would like to know what kind of issues I may run into when the dude releases .95 with this (hopefully, not getting my hopes up just in case).

Apps2SD Active or Not ?

Hi ,
I had Apps2SD working on my JF 1.42 and recently I updated to JF ADP1.5 and I noticed internal memory is decreasing fast, So I want to know if after I updated to 1.5 the apps2sd was gone or not. How can I find out ?
start terminal emulator
Code:
su
ls -l /data
if you see something like this for app and a app-private:
Code:
app -> /system/sd/app
app-private -> /system/sd/app-private
the links are still set and you are fine.
mine is appearing the links as you describe. But mine memory is is also almost full. Stil 20mb left.
I do not have a lot of apps on my phone.
So how does it come that i only have 20mb left when the apps are on my sdcard?
seems the cache is filling your internal memory slowly but steady
you could move it also to sd if not already done.
its also just a 3-liner in terminal.
Code:
cp -a /data/dalvik-cache /system/sd
rm -r /data/dalvik-cache
ln -s /system/sd/dalvik-cache /data/dalvik-cache
Thanks for your help dude..... I checked and it showed ALOT of letters and numbers, but somewhere along it also mentioned
app -> /system/sd/app
app-private -> /system/sd/app-private
So I guess im good !! But im also experiencing the low memory which I guess is because of the cache and also 1.5 (Which for some reason eaten 30 mb almost). So I will move the cache to SD now (I hope nothing goes wrong) and hopefully that will free up some more space
Thanx again .... Appreciate your help !
Weees said:
Thanks for your help dude..... I checked and it showed ALOT of letters and numbers, but somewhere along it also mentioned
app -> /system/sd/app
app-private -> /system/sd/app-private
So I guess im good !! But im also experiencing the low memory which I guess is because of the cache and also 1.5 (Which for some reason eaten 30 mb almost). So I will move the cache to SD now (I hope nothing goes wrong) and hopefully that will free up some more space
Thanx again .... Appreciate your help !
Click to expand...
Click to collapse
And any news?Did you moved the cache succesfully to the SD and does it improved your internal memory of the phone?
If so, I will do it also
Yep....It worked just fine !! Flawless !! I got 47 Mb free now. I know it should be more, but as I said the rest of the space was occupied by ADP 1.5 . I know their is also a way around that, but Its too complicated 47 mb is good enough for me !
moving cache is not recommended by alot of people, it does cause some errors... also i dont have my apps to SD anymore but when I do the
su
ls -l /data
i still get
app -> /system/sd/app
app-private -> /system/sd/app-private
but that is because they are still on my SD card but not running from my SD card
.PaNiNi. said:
moving cache is not recommended by alot of people, it does cause some errors... also i dont have my apps to SD anymore but when I do the
su
ls -l /data
i still get
app -> /system/sd/app
app-private -> /system/sd/app-private
but that is because they are still on my SD card but not running from my SD card
Click to expand...
Click to collapse
looks like it's still running off the SD for your apps .. if the folder starts with lrwxr-xr-x or whatever then it's a link to something .. drwxr-xr-x would be a folder
OK, so for me dalvik-cache, app and app-private are all showing as lrwxr-xr-x
is that right ?
Hmm. I'm getting the low memory notification (4mb). Both App and App-private are listed as lrwx.
ETA: Just moved dalvik. I'm back to 43mb free. Didn't realize it was going to take up that much. Still seems low, but it's workable at least.
Don't forget the obvious - clear your Browser cache:
Open up a Browser window
Menu Button
More -> Settings -> Clear Cache
After a few days of heavy surfing, this will clear up 6-7 MB for me.

partition sd card

I reverted back to cinni bell froyo from 6.3 R3
I would like to get link2sd card to work. I got it semi working but it would use 10% of what I allocated and then say it was full so I couldnt install anything from there on.
I partitioned it using gparted... 15g and 1g for the ext2.
open recovery checking with sdcard utiilites. errors and says it fixes it.
check with the froyo sd card util and do not see the added space... says around 100meg
download and install link2sd.. crashes and pull battery... odd time I get it to install and when i select to move a program to sd it has a container error.
I can use the link feature tho.
Sometimes I get the memory is full and other times I get get a crash when I attempt to install either from apk or from market... (i have gotten different results between attempts to get the sd card partition properly from googling all sorts of threads)
I don't know what I'm doing wrong. Any help would be greatly appreciated!
Would the sd card util say the added space if the partition worked properly?
I don't think the cincinnati bell froyo supports Link2SD without changing the boot scripts (because it does automatic app2ext). How did you try to add Link2SD support?
I guess thats why I am having so much trouble. The Cinni keeps changing it on me?
I either installed the link2sd from sd card or from the market.
You're going to have to edit the /system/oc file. First copy the original to /system/oc.bak then edit /system/oc. At the end of /system/oc you will see:
Code:
# enable sd-ext
if [ -e /dev/block/mmcblk0p2 ] ; then
insmod /system/lib/modules/ext2.ko
insmod /system/lib/modules/jbd.ko
insmod /system/lib/modules/ext3.ko
[B] mount /dev/block/mmcblk0p2 /sd-ext
if [ $? -eq 0 ] ; then
mkdir /sd-ext/app ; chmod 777 /sd-ext/app
[[ -d /data/app ]] && cp -a /data/app/* /sd-ext/app/
[[ -d /data/app ]] && rm -R /data/app
ln -s /sd-ext/app /data/app
fi
[/B] fi
Delete the bolded lines.
Honestly, I strongly recommend RusMod 1.19 over the CBW if you really want to run a Dexter13 ROM. http://forum.xda-developers.com/showthread.php?t=1118575
I nandroided an image without link2sd.
I edited the OC file as suggested.
Restarted device. Installed Link2sd.
Rebooted again.
Tried to move a program and it is still getting the container error.
Went back to open recovery and checked with the sd utilities and it said
ext2 was ok.
So I guess I will try that russianmod and see how that goes.
I'll have to wait till it downloads. Its really slow...
Does that one still give full camera function?
xtwister6 said:
I nandroided an image without link2sd.
I edited the OC file as suggested.
Restarted device. Installed Link2sd.
Rebooted again.
Tried to move a program and it is still getting the container error.
Went back to open recovery and checked with the sd utilities and it said
ext2 was ok.
So I guess I will try that russianmod and see how that goes.
I'll have to wait till it downloads. Its really slow...
Does that one still give full camera function?
Click to expand...
Click to collapse
i'd try khalpower's v4 rom. it was my favourite before cm6 arrived. it has full camera functionality. get the one thats themed with steelepicblue. everyone's favourite. hehe
eejin2 said:
i'd try khalpower's v4 rom. it was my favourite before cm6 arrived. it has full camera functionality. get the one thats themed with steelepicblue. everyone's favourite. hehe
Click to expand...
Click to collapse
+1 on that. Too bad it isn't being worked on anymore, but it still works plenty good enough and stable too. I miss the radio but I have managed w/o it and moved on to Tune-in, Jango and Iheart.
I am always harking on this but ext partitions don't have to be sooo big. A good size is 350-400mb and even sometimes that is too big. 1GB imho is way too much wasted space that could be used for music, movies, pix,...
Figure that an average app is on the heavy side (like Flash or something like that) not usually more that 15-20mb. Like I said, on the heavy side. I have 60+/- apps and only about 125mb taken up in my partition. My /cache partition will fill up faster than my ext partition.
Look at it like this
8 bits = 1 Byte
1024 Bytes = 1 Kilo Byte
1024 Kilo Bytes = 1 Mega Byte
1024 Mega Bytes = 1 Giga Byte
1024 Giga Bytes = 1 Tera Byte
You would have to have a crapload of moster MBs (like Flash/ Moboplayer/ Angry Birds) to take up that whole 1gb partition. And even then your dalvik-cache will be too full to take that many apps and you'll have to start deleting some to make space.
xtwister6 said:
download and install link2sd.. crashes and pull battery... odd time I get it to install and when i select to move a program to sd it has a container error.
I can use the link feature tho.
Click to expand...
Click to collapse
I think I may have misunderstood what you wrote. So, Link2SD is working, it's the native froyo App2SD that doesn't work? You may have to delete the /sdcard/.android_secure directory.
So I thought I would start from scratch.
Put Bright 2.1 rom
Put steel blue v4 as suggested.
Install the link2sd 1.9.1
When I try to put an app on the SD it gives me an error
Failure
pkg: /data/app/ (filename.apk)
Then it says its on the sd. So I check the sd-ext directory and nope..
So I thought I could just create the directories data/app/
but still get the above failure
I tried changing the ext2.ko file to the 840kb but that doesn't do anything.
This os version doesnt have the OC file as stated above.
I think I'm close and don't know what else to try.
I appreciate the help.
-- I also redid the sdcard with gpart
formatted the whole card to fat32
-resized and created the ext2 partition
formatted to 500 meg using ext2
Woodrube said:
Figure that an average app is on the heavy side (like Flash or something like that) not usually more that 15-20mb. Like I said, on the heavy side. I have 60+/- apps and only about 125mb taken up in my partition. My /cache partition will fill up faster than my ext partition.
.
Click to expand...
Click to collapse
does link2sd not create use the ext2 if you link it? That's why I am trying to get this to work so that it doesn't touch too much of the internal memory?
Mioze7Ae
I am attaching the sd-card diagnotics like it says in your sig.
It does say fix me but I've run the util and it seems to go back to needing
repair each time after starting up?
Thanks for posting the sdcard-info.txt. You need to create an empty /sd-ext/link2sd directory and reboot.
I tried that and I am still getting the same error. Do I have to add sub directories into the link2sd directory such as data/app ?
No, you shouldn't have to touch /data at all and you don't need to do create any directories other than /sd-ext/link2sd. Can you rerun the diagnostics?
attached is the diagnostics.
Again thanks for your help!
Ate you putting your app folder on /sdext/link2sd and not /data/lunk2sd? Remember if you are using link2sd you name your folder link2sd. If you are using app2ext you name it app. It also kind of looks from the txt file that your ext partition is an ext4. Might be reading that wrong bit I definitely see ext4 in there and kahls v4 doesn't support that.
Edit: quick question. How are you trying to "put" your apps on ext? Hopefully you aren't going to settings>apps>manage>move to SD.
Oh, sorry I didn't also catch this the first time... only our most recent ROMs support ext4 (CM6, XDAspecial, Bravo). ext3 should work and ext2 will definitely work. You can use nandroid to backup your sd-ext partition (I think it's called SD data in the nandroid menus), Then just nandroid restore it and your /sd-ext will be reformatted as ext2.
It should be ext2. Thats how I formatted the partition.
I had both folders /data/app and link2sd on the card. I deleted the /data/app folder and rebooted.... still getting the error.
it seems to keep pointing to data/app folder in the error message
Oh, you're right. I was misreading my own diagnostic log. *facepalm* Hmm. Nothing looks wrong...
Here Mz, this is for you. Found it on another thread.
Do you have this folder, sd-ext/link2sd? What error do you get when you launch the link2sd apk? IIRC /data/app is only symbolic links.
Might want to reformat and start over by just putting folder in SD-ext/link2sd and wiping out all the previous issues. Am usually against reformatting, but in this case might be best option.

[Completed] Swipe Monster Tab XL916 messup up with internal Storage paritions

Hi,
I wanted to just Overclocked the CPU of my Swipe Monster tab XL916,and as a consequence my device got hanged .I rebooted it and it was still working but it had no User apps in it.It was a strange when I checked out in Setting>Storage that now i had two internal storage partition(Strange)....One partition was just 16 mb and other was The Other was the actual paritition which was 5GB in size.
Maybe it could have changed some system files which led to changes in overall system. I am seriously not able to understand what has went wrong with my device.
#EDIT :Finally got ADB working..Please tell me if you need any information ,i can now run ADB shell commands.i have researched a lot and added parted binaries to the sbin folder,so now I can use parted tool also.I have found out that when i push any app to system via adb the Internal Storage which was earlier as Apps (16 MB) now becomes Apps (19.95 MB) . That means is my System Memory or some part of it is being assumed as Internal Memory.Earlier i was not able to install apks as user apps (as it said not enough memory). But now i am able to do that.
One thing more i have noticied which is quite strange :
a)When sd card is mounted before the boot : The mount command has 2 entries for /dev/block/vold/93:72(for /mnt/sdcard and for /mnt/secure/asec) and one entry for external sdcard by /dev/block/vold/179:1. I have 4 tmpfs (for /dev,/mnt/asec,/mnt/obb,/mnt/sdcard.android_secure)
b)after removing sdcard : vold entry 179:1 is oviously removed but also entry for vold 93:72 for mnt/secure/asec is removed.No change observed in tempfs.
c)reinserting sd card vold entry 179:1 comes back to play while entry for vold 93:72 for mnt/secure/asec is still not appearing.No change observed in tempfs
COMMAND : ls -al /dev/block : has entries for loop 0-7 (strange),platform,vold,nand a-j(nandd is system),ram 0-1,mmcblk0 and mmcblk0p1 for external sdcard
COMMAND: df shows =>/dev ,/mnt/asec,/mnt/obb,/system,/mnt/sdcard,/mnt/extsd
Hi!
Glad you got it sorted! In the future, you can post here for questions or help...
http://forum.xda-developers.com/android/help
Thanks!

Categories

Resources