A2SD with FRESH 2.0d - Hero CDMA Android Development

This may be a super n00b question, but I previously ran a MoDaCo ROM, and was able to use the A2SD instructions from code.google.com to get my apps to store to the SD. Today I upgraded to Fresh 2.0d, (which is awesome btw) and no matter what I do, it seems that downloading apps keeps using my system memory. here is the output of busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 95.5M 0 95.5M 0% /dev
tmpfs 4.0M 4.0K 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock3 170.0M 135.4M 34.6M 80% /system
/dev/block/mtdblock5 159.5M 60.2M 99.3M 38% /data
/dev/block/mtdblock4 130.0M 1.1M 128.9M 1% /cache
/dev/block/mmcblk0p2 677.4M 71.4M 569.9M 11% /system/sd
/dev/block//vold/179:1
2.9G 2.1G 788.2M 73% /sdcard
Is there a step that I'm missing somewhere? My use% on the /data partition seems to keep going up.
Thanks in advance for the help!!

See next comment

&RoidRage said:
See next comment
Click to expand...
Click to collapse
I'm sorry, I don't understand.

SchmediumTux said:
This may be a super n00b question, but I previously ran a MoDaCo ROM, and was able to use the A2SD instructions from code.google.com to get my apps to store to the SD. Today I upgraded to Fresh 2.0d, (which is awesome btw) and no matter what I do, it seems that downloading apps keeps using my system memory. here is the output of busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 95.5M 0 95.5M 0% /dev
tmpfs 4.0M 4.0K 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock3 170.0M 135.4M 34.6M 80% /system
/dev/block/mtdblock5 159.5M 60.2M 99.3M 38% /data
/dev/block/mtdblock4 130.0M 1.1M 128.9M 1% /cache
/dev/block/mmcblk0p2 677.4M 71.4M 569.9M 11% /system/sd
/dev/block//vold/179:1
2.9G 2.1G 788.2M 73% /sdcard
Is there a step that I'm missing somewhere? My use% on the /data partition seems to keep going up.
Thanks in advance for the help!!
Click to expand...
Click to collapse
1. Remount the drive by typing this command: adb remount
2. Enter the phone shell: adb shell
3. Type ls -l /data to get a directory listing of /data
4. Look for an entry named app. If the following is to the right of the entry, a2sd is running: "-> /system/sd/app"
5. If not, type the following commands:
cp /data/app/* /system/sd/app
cp /data/app-private/* /system/sd/app-private
rm -r /data/app
rm -r /data/app-private
ln -s /data/app /system/sd/app
ln -s /data/app-private /system/sd/app
That should, hopefully, fix your issue.

Wow.. Thank you sooo much. I'm still in the early learning stages of Linux and android, so I needed that direction. I really appreciate you taking the time to help me out^^

tkirton said:
1. Remount the drive by typing this command: adb remount
2. Enter the phone shell: adb shell
3. Type ls -l /data to get a directory listing of /data
4. Look for an entry named app. If the following is to the right of the entry, a2sd is running: "-> /system/sd/app"
5. If not, type the following commands:
cp /data/app/* /system/sd/app
cp /data/app-private/* /system/sd/app-private
rm -r /data/app
rm -r /data/app-private
ln -s /data/app /system/sd/app
ln -s /data/app-private /system/sd/app
That should, hopefully, fix your issue.
Click to expand...
Click to collapse
I get the results you said but yet everytime i download an app my internal memory is going down. I also cd /system/sd/app and everything I dl'ed is in there, do i need to redo my sd?

ABNinja said:
I get the results you said but yet everytime i download an app my internal memory is going down. I also cd /system/sd/app and everything I dl'ed is in there, do i need to redo my sd?
Click to expand...
Click to collapse
it wont help as it seems to be a bug.

Fresh 2.0d A2SD Apps not being moved out of internal memory
I have HTC HERO, Fresh 2.0d rom, 16gb sd card and RA 1.6.2. I have partitioned sd, created ext2, converted ext2 to ext3 and installed rom and apps. All apps load and function but they are being put into internal mem and copied rather than moved to sd\apps. Memory check shows internal and sd memory decreases with installation of apps.
Here's a screen shot of my command prompt showing that Apps and Apps Private are being reassigned to sd card properly:
Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.
C:\Users\VP>cd\
C:\>cd tools
C:\tools>adb remount
* daemon not running. starting it now *
* daemon started successfully *
remount succeeded
C:\tools>adb shell
# ls -l /data
ls -l /data
drwxr-xr-x system system 2010-04-26 10:55 tombstones
drwx------ system system 2010-04-26 10:08 backup
prw-r--r-- system system 2010-04-23 16:32 gps_nmea_fifo
-rw-rw-rw- media system 12 2010-04-26 00:04 StreamingPacketLost.txt
-rw-rw-rw- media system 2 2010-04-26 12:11 pvcodec.txt
drwxrwxr-x system system 2010-04-26 11:54 system
drwxrwx--x system system 2010-04-23 16:28 anr
drwx------ root root 2010-04-26 10:09 agent
drwx------ root root 2010-04-23 16:27 agent_htc
lrwxrwxrwx root root 2010-04-23 16:27 app-private -> /system/sd
/app-private
lrwxrwxrwx root root 2010-04-23 16:27 app -> /system/sd/app
drwxrwxrwx bluetooth bluetooth 2010-04-26 10:09 btips
drwxrwxrwx root root 2010-04-23 16:27 DxDrm
drwxrwx--x system system 2010-04-26 10:54 dalvik-cache
lrwxrwxrwx root root 2010-04-23 16:27 drm -> /data/local
drwx------ root root 2010-04-26 10:07 property
drwxrwx--x system system 2010-04-26 10:54 data
drwxr-xr-x shell shell 2010-04-23 16:27 local
drwxrwxrwx wimax wimax 2010-04-23 16:27 wimax
drwxrwx--t system misc 2010-04-26 12:10 misc
drwxr-x--- root log 2010-04-23 16:27 dontpanic
drwxrwx--- root root 2010-04-23 16:27 lost+found
# exit
exit
C:\tools>
Please let me know what I can do to get A2sd working properly on Fresh 2.0d rom whether its a manual or auto version or any other fix. I use lots of apps and I am getting low memory warning from the system.
Thanks

Same problem here. Please help

Easy fix. just flash Tkirton's Darktremor A2SD zip in recovery. Works perfectly. http://forum.xda-developers.com/showthread.php?t=670087

What do you type in the terminal to make it show that infomation?

4SidedDie said:
What do you type in the terminal to make it show that infomation?
Click to expand...
Click to collapse
ls -l /data
That will give you a directory listing.

I installed apps2sd 2.5 and my internal memory went from 50 to 129.

Darktremor A2SD version 2.6.1
I get fielded with a lot of questions that ask "How can I verify if the Apps2SD (or a2sd) is working correctly." And many people, including myself, have written message after message regarding how you can check to see if your data is on the SD card.
I'm not complaining, mind you...I personally like the attention. But, I'm also trained from various programming jobs that require a lot of support (the one I'm currently at is a good example). When I see a lot of people asking the same questions, I think to myself "there's got to be an easier way to do this." That's when I start working on a program solution to the issue.
For those of you who are new to Apps2SD, here's what you do:
1. Follow the installation instructions on the first message in this thread: http://forum.xda-developers.com/showthread.php?t=670087
2. Once you are in the shell, type /system/bin/a2sd check. A report will print on your screen telling you if you have issues with your A2SD setup.
3. If you do run into issues, you can fix them easily by typing /system/bin/a2sd repair.
4. If nothing is setup, try running the installer again: /system/bin/a2sd install
Click to expand...
Click to collapse
Now, if you do decide to run the stock A2SD, or any other variant, here's how you check that version (this will also work for any version of Darktremor A2SD):
1. Setup your SD card. (Follow the steps If you have not setup your SD Card: http://forum.xda-developers.com/showthread.php?t=670087).
If you are using the A2SD that came with the kernel, you don't have to do step i. If you are using another version besides Darktremor, follow step i, but put the file you got from the A2SD provider on the SD card).
2. While still in recovery, flash the A2SD you obtained as you would a normal ROM. If you are using the included A2SD for your particular ROM, skip this step.
3. Reboot the phone and allow the phone to completely load.
4. Enter a phone shell by typing in a command window: adb shell
5. Type the following in adb shell:
cd /data/app
pwd
If you get /system/sd/app returned, then A2SD installed correctly. If you get /data/app, A2SD did not move the data.
Click to expand...
Click to collapse
You can manually move the data yourself by typing the following commands:
mkdir /system/sd/app
mkdir /system/sd/app-private
chmod 777 /system/sd/app
chmod 777 /system/sd/app-private
cp /data/app/* /system/sd/app
cp /data/app-private/* /system/sd/app-private
rm /data/app
rm /data/app-private
ln -s /system/sd/app /data/app
ln -s /system/sd/app-private /data/app-private

1. Flash the Darktremor A2SD 2.6.1: http://forum.xda-developers.com/showthread.php?t=670087
2. Reboot
3. Once the phone reboots, go into your phone (adb shell) and type:
/system/bin/a2sd cache
That will move the dalvik-cache. Once the move is complete, reboot the phone.
jtology said:
I have HTC HERO, Fresh 2.0d rom, 16gb sd card and RA 1.6.2. I have partitioned sd, created ext2, converted ext2 to ext3 and installed rom and apps. All apps load and function but they are being put into internal mem and copied rather than moved to sd\apps. Memory check shows internal and sd memory decreases with installation of apps.
Here's a screen shot of my command prompt showing that Apps and Apps Private are being reassigned to sd card properly:
Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.
C:\Users\VP>cd\
C:\>cd tools
C:\tools>adb remount
* daemon not running. starting it now *
* daemon started successfully *
remount succeeded
C:\tools>adb shell
# ls -l /data
ls -l /data
drwxr-xr-x system system 2010-04-26 10:55 tombstones
drwx------ system system 2010-04-26 10:08 backup
prw-r--r-- system system 2010-04-23 16:32 gps_nmea_fifo
-rw-rw-rw- media system 12 2010-04-26 00:04 StreamingPacketLost.txt
-rw-rw-rw- media system 2 2010-04-26 12:11 pvcodec.txt
drwxrwxr-x system system 2010-04-26 11:54 system
drwxrwx--x system system 2010-04-23 16:28 anr
drwx------ root root 2010-04-26 10:09 agent
drwx------ root root 2010-04-23 16:27 agent_htc
lrwxrwxrwx root root 2010-04-23 16:27 app-private -> /system/sd
/app-private
lrwxrwxrwx root root 2010-04-23 16:27 app -> /system/sd/app
drwxrwxrwx bluetooth bluetooth 2010-04-26 10:09 btips
drwxrwxrwx root root 2010-04-23 16:27 DxDrm
drwxrwx--x system system 2010-04-26 10:54 dalvik-cache
lrwxrwxrwx root root 2010-04-23 16:27 drm -> /data/local
drwx------ root root 2010-04-26 10:07 property
drwxrwx--x system system 2010-04-26 10:54 data
drwxr-xr-x shell shell 2010-04-23 16:27 local
drwxrwxrwx wimax wimax 2010-04-23 16:27 wimax
drwxrwx--t system misc 2010-04-26 12:10 misc
drwxr-x--- root log 2010-04-23 16:27 dontpanic
drwxrwx--- root root 2010-04-23 16:27 lost+found
# exit
exit
C:\tools>
Please let me know what I can do to get A2sd working properly on Fresh 2.0d rom whether its a manual or auto version or any other fix. I use lots of apps and I am getting low memory warning from the system.
Thanks
Click to expand...
Click to collapse

Hey i just got finished installing A2SD 2.6.1 and i have a class 2 16gb sd card and my internal mem is reading like 74/159, is that normal?
I DID install the correct version for class 2 cards
and i did your /system/bin/a2sd check
and it looked like everthing checks ok
In A2SD status report i got this
[*] /data/app link active
[*] /data/app-private link active
[*] /data/dalvik-cache NOT active
No Cache flag file present
[X] Swap partition NOT present
i read that the other guy had 100+ mb free after A2SD and i also remember back on 1.5 when i had tried it out i got similar numbers.
Anything else i can do to maybe check if i did everything alright?
or maybe already know why im getting still such a low internal mem?

you should check out the GUI version of apps2sd http://forum.xda-developers.com/showthread.php?t=670098
2.5 just crashed my phone, the GUI version not only fixed all my problems but it sped everything up signaficantly. Im not an expert with computers either so this was very easy to use

You picked up the one that doesn't activate the cache on boot. Just type
/system/bin/a2sd cache in adb shell.
frostrunner said:
Hey i just got finished installing A2SD 2.6.1 and i have a class 2 16gb sd card and my internal mem is reading like 74/159, is that normal?
I DID install the correct version for class 2 cards
and i did your /system/bin/a2sd check
and it looked like everthing checks ok
In A2SD status report i got this
[*] /data/app link active
[*] /data/app-private link active
[*] /data/dalvik-cache NOT active
No Cache flag file present
[X] Swap partition NOT present
i read that the other guy had 100+ mb free after A2SD and i also remember back on 1.5 when i had tried it out i got similar numbers.
Anything else i can do to maybe check if i did everything alright?
or maybe already know why im getting still such a low internal mem?
Click to expand...
Click to collapse

tkirton said:
You picked up the one that doesn't activate the cache on boot. Just type
/system/bin/a2sd cache in adb shell.
Click to expand...
Click to collapse
Actually i did, and my memory stayed the same at 70~

fallentimm said:
you should check out the GUI version of apps2sd http://forum.xda-developers.com/showthread.php?t=670098
2.5 just crashed my phone, the GUI version not only fixed all my problems but it sped everything up signaficantly. Im not an expert with computers either so this was very easy to use
Click to expand...
Click to collapse
Wow...and you didn't even give me a chance to fix it.
Treve uses a GUI to set things up. Other than that, the basic concept is the same (it's based on my earlier Darktremor A2SD, which itself is based on the original Cyanogen Apps2SD). It pretty much follows the same method to move files as I do. His is easier to setup if you are new at this. I try to make mine automatically set things up.
Nothing is wrong with what he's doing...it's definitely a different way of doing it and, as long as it works, more power to him.

Related

How to run applications off the sdcard (Updated 6/3/09)

DOES NOT WORK ON CUPCAKE 1.5. Try one of the other apps to sd card threads.
I decided to create a new thread for hacking a rooted g1 to allow applications to run from the sdcard. The original thread's instructions don't work without some modifications and the original poster doesn't seem to have the time to update it.
I'll try to keep the original post as up to date as possible as new information comes.
Prerequisites:
1. Rooted g1 with jesus freak version 1.30 or 1.31, 1.41 (rc30, rc33) Works with all rooted US, UK, international versions of the g1.
2. Have "adb" from the android sdk installed on your desktop machine.
Sdcard preparation:
Divide your sdcard into 2 partitions. The first partition should be FAT, the second partition should be EXT2. This can be most easily accomplished using a linux or mac machine. For windows, you can use "paragon partition manager 9" to do this. It will allow you to partition your sdcard and format the 2nd partition to ext2 fs. It is very important that the 2nd partition be formatted as EXT2 or the rest of the procedure will NOT work. The 2nd ext2 partition will be used to store your installed apps.
In the original thread, somebody mentioned a HP sdcard partition tool program, but I don't believe that will allow you to format the partition to EXT2 fs.
Procedure:
1. With the phone off, insert your newly partitioned sdcard into the g1.
2. Connect your g1 to your desktop via the usb cable and turn it on.
3. Backup your original mountd.conf and initrc.rc files from your g1 by running the following commands on your desktop from the cmd shell:
adb pull /system/etc/mountd.conf <dir on your desktop>
adb pull /system/init.rc <dir on your desktop>
4. Mount your g1's /system directory as writable via the desktop cmd shell:
adb remount
5. IMPORTANT! Create a /system/sd directory on your g1 via the desktop cmd shell:
adb shell mkdir /system/sd
adb shell ls /system and make sure that the directory has been created.
6. Download the attached modified mountd.conf and init.rc files to your PC.
7. Push the modified mountd.conf to your g1 via the desktop cmd shell:
adb push /<dir on your desktop of modified file>/mountd.conf /system/etc/mountd.conf
8. Push the modified init.rc to your g1 via the desktop cmd shell:
adb push /<dir on your desktop of modified file>/init.rc /system/init.rc
9. Reboot your g1
10. Connect to the g1 shell via the desktop cmd shell:
adb remount
adb shell
11. Check to see that the ext2 partition has been created and mounted:
busybox df -h
You should see a line that looks similar to this:
/dev/mmcblk0p2 1.2G 9.1M 1.1G 1% /system/sd
If you don't see this line, you didn't partition your sdcard correctly. STOP! Go back and do that.
12. From the G1 shell run the following cmds to copy your app and app-private directories from the internal g1 storage to the sdcard.
busybox cp -a /data/app /system/sd
rm -r /data/app
ln -s /system/sd/app /data/app
busybox cp -a /data/app-private /system/sd/app-private
rm -r /data/app-private
ln -s /system/sd/app-private /data/app-private
13. Reboot, enjoy all the extra storage!
Undo Procedure by heldc:
Dunno if this has been posted yet, but the undo process is simple. I just did it with no problems, and thought others might want it as well. (Note-if you're copy pasting this to do it, anything following # til the end of a line is just a comment, don't copy/paste it.)
adb remount #makes your file system writeable
adb push /<place you backed up mount.conf to>/filenameofbackeduporiginalmount.conf /system/etc/mountd.conf #restores the original mount.conf
adb push /<place you backed up init.rc to>/filenameofbackeduporiginalinit.rc /system/init.rc #restores the original init.rc
adb shell #opens the phone shell
rm -r /data/app #deleting the symbolic link to /system/sd
mkdir /data/app #recreating /data/app
rm -r /data/app-private #deleting the symbolic link to /system/sd
mkdir /data/app-private #recreating /data/app-private
reboot
Instructions without adb using terminal app by LucidREM
this is a form of the instructions from this thread .. but modified slightly to be used directly from the "Terminal" .. i did not use my USB on my phone to root or run apps .. everything i did was on the G1
$su
#mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
#mkdir /system/sd
6. Download the attached modified mountd.conf and init.rc files to your SD.
#busybox cp -a /sdcard/mountd.conf /system/etc/mountd.conf
#busybox cp -a /sdcard/init.rc /system/init.rc
9. Reboot your g1
$su
#mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
#busybox df -h
You should see a line that looks similar to this:
/dev/mmcblk0p2 1.2G 9.1M 1.1G 1% /system/sd
If you don't see this line, you didn't partition your sdcard correctly. STOP! Go back and do that.
12. From the G1 shell run the following cmds to copy your app and app-private directories from the internal g1 storage to the sdcard.
#busybox cp -a /data/app /system/sd
#rm -r /data/app
#ln -s /system/sd/app /data/app
#busybox cp -a /data/app-private /system/sd
#rm -r /data/app-private
#ln -s /system/sd/app-private /data/app-private
Reboot your g1
Update 1/19/2009:
Installing non-wipe custom themes shouldn't cause any issues. I just installed the BUUF theme and I didn't have to re-do the procedure.
Update 1/20/2009:
Added undo procedure by heldc
Update 1/27/2009:
Added procedure for moving data directory to the sdcard, without performance issues.
This is not stable so I've moved it to the bottom.
13. Copy /data/data directory from internal storage to sdcard. This is OPTIONAL as some people are still reporting issues.
mkdir /system/sd/data
cp -rp /data/data /system/sd
rm -r /data/data
ln -s /system/sd/data /data/data
Reversal procedure:
rm /data/data
cp -rp /system/sd/data /data
Update 2/7/2009:
Add instructions by lucidrem that doesn't require adb. Allows you to apply the hack from the g1 using terminal app
going to try this right now..i will tell you if it works on my G1
i followed all the steps and i was able to boot into my phone without any problems. I was also able to install apps from market BUT when i instaled them my STORAGE LEFT went down from 54 to 51MB.
**I can see all the apps i installed in /system/sd/apps
please help,
thanks
Running apps off the SD card show any signs off slowness or laggyness?
Hey I would like to know what software are u using to create the partition on the sd, I tried partition magic 8 and partition mananger but the softwares can't see the sd card.
I use Paragon Partition Manager 9
vtecpower said:
i followed all the steps and i was able to boot into my phone without any problems. I was also able to install apps from market BUT when i instaled them my STORAGE LEFT went down from 54 to 51MB.
**I can see all the apps i installed in /system/sd/apps
please help,
thanks
Click to expand...
Click to collapse
Only the apk files are moved to the sdcard. The apps database files are still on the internal storage and all the cache files are still on the internal storage. Its still a good idea to manually move them over to the sdcard.
So as you install more apps, the internal storage will still shrink, but not as much as before and will go down slowly.
You can try to also move the /data/data directory over to the sdcard, that will move all the database files from the internal storage to the sdcard, but I haven't tried that. If you have a class 6 sdcard, try it and see if that slows things down.
dwang said:
Only the apk files are moved to the sdcard. The apps database files are still on the internal storage and all the cache files are still on the internal storage. Its still a good idea to manually move them over to the sdcard.
So as you install more apps, the internal storage will still shrink, but not as much as before and will go down slowly.
You can try to also move the /data/data directory over to the sdcard, that will move all the database files from the internal storage to the sdcard, but I haven't tried that. If you have a class 6 sdcard, try it and see if that slows things down.
Click to expand...
Click to collapse
I have a class 5 4gb card and i want to try to move /data/data to sd
Can you please post guide how to move /data/data to sd..
thanks
Just did this and so far, so good!
vtecpower said:
I use Paragon Partition Manager 9
Click to expand...
Click to collapse
I'm downloading the program now thanks...
Now I have to figure out how to do the partition in Ubuntu Lol
hi,
i'm a total noob to this. I've managed to pull the mountd and init files to back them up. When I get to step 5: adb mkdir /system/sd when I press enter the cmd shell gives me the adb menu. How can I tell if the dir was created?
Thanks for any help you guys can give.
1) adb shell
2) mkdir /system/sd
thanks a lot.
For the person that asked how to partition your sd card in Ubuntu you can use partition editor under system-administration- partition editor
ashshlay said:
For the person that asked how to partition your sd card in Ubuntu you can use partition editor under system-administration- partition editor
Click to expand...
Click to collapse
Thanks for the info but I just find out tha paragon partition mananger can creat ext2 partitions too
everything went right with the software it create my fat32 partition and the ext/2. what I don't know is if the ext/2 is formated and my computer with linux does not see sd card at all so right now I don't now how to confirm this.
ps. I try to look for the option SYSTEM THEN ADMITNISTRATION and it does not have the partition editor installed.
vtecpower said:
I have a class 5 4gb card and i want to try to move /data/data to sd
Can you please post guide how to move /data/data to sd..
thanks
Click to expand...
Click to collapse
Try this and see if it works... I haven't tried it myself as I only have the stock sdcard and I know its going to be too slow.
adb shell
cp -a /data/data /system/sd
rm -r /data/data
ln -s /system/sd/data /data/data
reboot
If this doesn't work or its too slow, to reverse it do the following:
adb shell
busybox cp -a /system/sd/data /data/data
If this works well, I'll modify the original post...
dwang said:
Try this and see if it works... I haven't tried it myself as I only have the stock sdcard and I know its going to be too slow.
adb shell
cp -a /data/data /system/sd
rm -r /data/data
ln -s /system/sd/data /data/data
reboot
If this doesn't work or its too slow, to reverse it do the following:
adb shell
busybox cp -a /system/sd/data /data/data
If this works well, I'll modify the original post...
Click to expand...
Click to collapse
goingto try it now..i will tell you how it turnsout
It worked but its kinda slow because as it turned out my card is Rank 4 not 5...i installed couple of apps and phone didnt crash
My Internal memory remaining is 52mb.
tahnks
vtecpower said:
It worked but its kinda slow because as it turned out my card is Rank 4 not 5...i installed couple of apps and phone didnt crash
My Internal memory remaining is 52mb.
tahnks
Click to expand...
Click to collapse
ok.. strange that your internal storage is still at 52mb though.. something else must be eating it...
do this:
adb shell
busybox df -h
cd /data
ls -l
and post the results...
# busybox df -h
busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 48.4M 0 48.4M 0% /dev
tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock3 67.5M 64.0M 3.5M 95% /system
/dev/block/loop0 1.4M 1.4M 0 100% /system/modules
/dev/block/loop1 3.1M 3.1M 0 100% /system/xbin
/dev/mmcblk0p2 1.2G 9.1M 1.1G 1% /system/sd
/dev/block/mtdblock5 74.8M 22.9M 51.9M 31% /data
/dev/block/mtdblock4 67.5M 1.6M 65.9M 2% /cache
/dev/block/mmcblk0p1 2.4G 39.8M 2.4G 2% /sdcard
# cd /data
cd /data
# ls -l
ls -l
drwxrwxrwx 1 1000 1000 2048 Jan 9 00:39 anr
lrwxrwxrwx 1 0 0 14 Jan 9 03:43 app -> /system/sd/app
lrwxrwxrwx 1 0 0 22 Jan 9 03:43 app-private -> /system/s
d/app-private
drwxrwx--x 1 1000 1000 2048 Jan 9 00:39 dalvik-cache
lrwxrwxrwx 1 0 0 15 Jan 9 04:08 data -> /system/sd/data
drwxrwx--x 1 2000 2000 2048 Jan 9 00:39 local
drwxrwx--- 1 0 0 2048 Jan 9 00:39 lost+found
drwxrwx--t 1 1000 9998 2048 Jan 9 00:39 misc
drwx------ 1 0 0 2048 Jan 9 00:39 property
drwxrwxr-x 1 1000 1000 2048 Jan 9 00:39 system
#

please help me move my apps to sd card

i know theres a thread but i'm confuse about what to install and run to transfer my apps to my sd card.
my sd card is already partitioned to 6gb fat32 and 2gb ext2 and its rooted with jf1.41 as well.
please give me a specific instructions cuz im a noob when it comes to adb shell sdk cmd or whatever computer words.
thanks in advance!
Well i'm a noob as well can't seam to finish the last step myself but i'll try my best.
Just a wild gues u r running Windows right?
yeah im using windows xp but it has vista transformation pack if that will make a difference.
Ok.
Have u got "modified mountd & init.zip (685 Bytes, 475 views)" wich is an attachement at the bottom of http://forum.xda-developers.com/showthread.php?t=468959 ???
Download this small zip from http://modmygphone.com/wiki/index.php/Setting_up_ADB . Unzip the files to a desktop and copy it to system folder after that follow this link http://www.computerhope.com/issues/ch000549.htm.
let me know when u r done???
But remember i am also a big time noob but just trying to help as much as i can when no one else will so if i get some thing wrong don't get angry with me just let me know what i told u that was wrong and that way we can help each other out and correct one n other.
Zionator said:
But remember i am also a big time noob but just trying to help as much as i can when no one else will so if i get some thing wrong don't get angry with me just let me know what i told u that was wrong and that way we can help each other out and correct one n other.
Click to expand...
Click to collapse
if you copy the modified mount.conf and init.rc files to the SD card at the root then this would be the way in "Terminal":
$su
#busybox cp -a /sdcard/mount.conf /system/etc/mount.conf
#busybox cp -a /sdcard/init.rc /system/init.rc
#mkdir /system/sd
now that the modified files are there you MUST reboot .. this is all done after you have root and after you have done the double partitions on your SD card .. once you reboot you should go back to the "Terminal" to make sure everything's good
$su
#busybox df -h
if you don't see a line like this:
/dev/mmcblk0p2 1.5G 94.4M 1.3G 7% /system/sd
then something didn't mount properly .. so if you DO see this line now you can continue:
#busybox cp -a /data/app /system/sd
#rm -r /data/app
#ln -s /system/sd/app /data/app
#busybox cp -a /data/app-private /system/sd
#rm -r /data/app-private
#ln -s /system/sd/app-private /data/app-private
now the apps are all on the EXT2 partition of the MicroSD .. happy downloading
I don't know what i have done wrong but eveything i try i keep getting errors and u have been more then help full but i am proberly to stupid to do it my self and i know i can do it if only i could find a video toturial from youtube or so but can't find any so i am stuck here.
But thank you very much for all ur help i would never have gotten to the last step with out ur help.
So now my only option is a help video or remote pc help if that is possible.
Ps. xda should make u a Moderator or Admin cause u r very help full and u know what u r talking about.
Zionator said:
I don't know what i have done wrong but eveything i try i keep getting errors and u have been more then help full but i am proberly to stupid to do it my self and i know i can do it if only i could find a video toturial from youtube or so but can't find any so i am stuck here.
But thank you very much for all ur help i would never have gotten to the last step with out ur help.
So now my only option is a help video or remote pc help if that is possible.
Ps. xda should make u a Moderator or Admin cause u r very help full and u know what u r talking about.
Click to expand...
Click to collapse
it's a nice thought .. not really sure i'd want to hold that kind of responsibility tho .. i think it'd be like calling me "Mr. President" when i drive the local garbage truck .. these guys are doing great here .. i'm just glad to lend a hand and hope it helps out
Hey guys just thought i'd chime in.
Firstly just to clarify are you using adb from your windows system or are you trying to do this all on the terminal app because these commands are issued to terminal after replacing both mount.conf and init.rc as described above
$su
#busybox df -h
as above you should see a line "/dev/SOMETHING" "size data" "/system/sd"
if you don't see this line then there's most likely a problem with your card format, did you make sure you had fat32 first then ext2 in that order on the card, fat32 must be first. i find it helps to check if camera can use the sdcard, if it can't, reformat, unmount and check camera again.
Assuming you've gotten this right so far
#busybox cp -a /data/app /system/sd
#rm -r /data/app
#ln -s /system/sd/app /data/app
#busybox cp -a /data/app-private /system/sd
#rm -r /data/app-private
#ln -s /system/sd/app-private /data/app-private
and hopefully your apps should all work, but not appear as downloaded in the market (don't worry this'll change if you reinstall them from the market)
if you're using adb from windows to try the above the commands will be slightly different:
Procedure:
***********************************************************
- this can be skipped if you've already replaced the mountd.conf and init.rc
adb remount
adb shell mkdir /system/sd
adb shell ls /system
adb push LOCATION OF FILE/mountd.conf system/etc/mountd.conf
adb push LOCATION OF FILE/init.rc system/init.rc
(LOCATION OF FILE = the folder you have the modified files)
adb shell
reboot
***********************************************************
If you've skipped ahead
adb remount
adb shell
busybox df -h
as above you should see a line "/dev/SOMETHING" "size data" "/system/sd"
Again if this line doesn't exist you've missed something, go back
busybox cp -a /data/app/ /system/sd
rm -r /data/app/
ln -s /system/sd/app /data/app
busybox cp -a /data/app-private /system/sd/app-private
rm -r /data/app-private
ln -s /system/sd/app-private /data/app-private
reboot
and hopefully your apps will all work and again, not appear in market.
If this doesn't help please advise what error messages you are getting and exactly where everythings going wrong, maybe we can get you back on track.
just reformated the card from fat 16 to fat 32 as u said hope it works now lol.
And thanks for the help.
Keep u posted.
C:\Users\Illuminator\Desktop>adb shell
# busybox df -h
busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 48.4M 0 48.4M 0% /dev
tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock3 67.5M 67.5M 0 100% /system
/dev/block/loop0 1.4M 1.4M 0 100% /system/modules
/dev/block/loop1 3.1M 3.1M 0 100% /system/xbin
/dev/block/mtdblock5 74.8M 44.6M 30.1M 60% /data
/dev/block/mtdblock4 67.5M 1.3M 66.2M 2% /cache
/dev/block/mmcblk0p1 1.3G 4.0K 1.3G 0% /sdcard
#
--------------------------------------------------------------
# busybox cp -a /data/app/ /system/sd
busybox cp -a /data/app/ /system/sd
cp: write error: No space left on device
cp: write error: No space left on device
cp: write error: No space left on device
The list goes on and on. puha need a smoke.
But thanks for help.
why does it say "No space left on device"???
C:\Users\Illuminator\Desktop\G2>adb push C:\Users\Illuminator\Desktop\G2\/mountd
.conf /system/etc/mountd.conf
failed to copy 'C:\Users\Illuminator\Desktop\G2\/mountd.conf' to '/system/etc/mo
untd.conf': No space left on device
Ok might be fine but better safe than sorry your last line says:
/dev/block/mmcblk0p1 1.3G 4.0K 1.3G 0% /sdcard
That means that you're sdcard in fat32 format is only 1.3gbs in size is that correct? I assume this means you're using the sdcard that came free with the phone (2gb) if your card is larger say an 4 or an 8 something has gone wrong, but if this is correct lets move on.
cool so your sdcard is now partitioned fat32 -1.3gb followed by 0.7gb ext2
better safe than sorry redownload http://forum.xda-developers.com/attachment.php?attachmentid=139735&d=1230107855 the files and place them (the 2 files, not the folder) in the same folder as adb (do not mount your usb card)
>adb remount
>adb push mountd.conf system/etc/mountd.conf
>adb push init.rc system/init.rc
>adb shell
#mkdir /system/sd
#ls /system
(make sure a folder called sd exist)
#reboot
When your android reboots
>adb remount
>adb shell
#busybox df -h
Cross fingers, pray, beg, bargain and look for the line
"/dev/SOMETHING" "size data" "/system/sd"
in case this doesn't work i'm going to pm you my email, we can chat on google messenger and try and get this sorted
Quick question are you remembering to "adb remount" when you attach the phone - if you don't the phone wont be writable, which may explain the no space issue here:
C:\Users\Illuminator\Desktop\G2>adb push C:\Users\Illuminator\Desktop\G2\/mountd
.conf /system/etc/mountd.conf
failed to copy 'C:\Users\Illuminator\Desktop\G2\/mountd.conf' to '/system/etc/mo
untd.conf': No space left on device
*********but here you are trying to write to a location that doesn't exist, unless you see the magic line ending system/sd you cannot proceed
# busybox cp -a /data/app/ /system/sd
busybox cp -a /data/app/ /system/sd
cp: write error: No space left on device
cp: write error: No space left on device
Jesus this is killing me!!! yesterday i got all the way to step.12
And yes the sd came with the phone sdcard in fat32 -1.3gb followed by 0.7gb ext2 - yes that's correct.
And in case u where woundering then yes my phone is rooted wich was a pice of pie compered to this lol.
---------------------------------------------------------------------
C:\Users\Illuminator\Desktop>adb remount
remount succeeded
C:\Users\Illuminator\Desktop>adb push mountd.conf system/etc/mountd.conf
failed to copy 'mountd.conf' to 'system/etc/mountd.conf': No space left on devic
e
C:\Users\Illuminator\Desktop>adb push C:\Users\Illuminator\Desktop\/mountd.conf
system/etc/mountd.conf
failed to copy 'C:\Users\Illuminator\Desktop\/mountd.conf' to 'system/etc/mountd
.conf': No space left on device
C:\Users\Illuminator\Desktop>
You're not kidding i've done this 5 times (on 3 phones - updates) never had this much trouble!
do you have the same problems if you sit the files on your sdcard and do the following? if so as much as it sucks to lose your data i would strongly suggest doing a wipe before hand (reboot phone holding home and at prompt alt + w)
>adb shell
#busybox cp -a /sdcard/mount.conf /system/etc/mount.conf
#busybox cp -a /sdcard/init.rc /system/init.rc
#mkdir /system/sd
C:\Users\Illuminator\Desktop>adb shell mkdir /system/sd
mkdir failed for /system/sd, File exists
fantastic, well that's something! how about the other two did both copy successfully? and if so does the magic line appear after reboot?
faithnolonger said:
fantastic, well that's something! how about the other two did both copy successfully? and if so does the magic line appear after reboot?
Click to expand...
Click to collapse
Just restarting the phone but for some reason all the app are copyed to the fat32 part of the sdcard lol.
oh no for some odd reason the sdcard is not working no more???
--------------------------------------------------------------------
# busybox df -h
busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 48.4M 0 48.4M 0% /dev
tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock3 67.5M 67.5M 0 100% /system
/dev/block/loop0 1.4M 1.4M 0 100% /system/modules
/dev/block/loop1 3.1M 3.1M 0 100% /system/xbin
/dev/block/mtdblock5 74.8M 44.6M 30.1M 60% /data
/dev/block/mtdblock4 67.5M 1.3M 66.2M 2% /cache
#
------------------------------------------------------------------------
Just wiped the system on the phone and reinstalling the JFv1.31
wow that's not right your apps should not be there:S
ok maybe time to go to real time chat i've got my android next to me, i've pm'd you my email address, you can message me over IM
Ok thanks i am ready in chat mode hehe.
when i type any of the adb command stuff i keep getting error: device not found. i don't know what to do next.

Override system binaries on CM-mod

This is hack for the userinit.sh script that allows to override
system programs with different binaries or just add some new
executable programs to your rom as you can use your ext3 partition
as storage. One more advantage is that your customizations
will be persistent even after a update.
For this to work you have to add this lines to your /system/sd/userinit.sh script:
Code:
mount -o remount,rw /dev/rootfs /
mkdir /usr
chown root.root /usr
chmod 755 /usr
mkdir /system/sd/bin
chown root.shell /system/sd/bin
chmod 755 /system/sd/bin
ln -s /system/sd/bin /usr/bin
mount -o remount,ro /dev/rootfs /
After a reboot, you'll find a newly created bin
directory in /system/sd/ linked to /usr/bin.
/usr/bin is the first directory to be searched
in path in CM-mod ROMs so any program dropped
there will be found and executed before others with
same name in the system. So you can simply:
Code:
adb push new_program /usr/bin
adb shell
cd /usr/bin
chmod 755 new_program
chown root.shell new_program
This is experimental stuff and therefore USE IT AT YOUR OWN RISK.
Tested on CM-mod-3.6.7.2 and CM-mod-3.6.8 and works fine for me.
So if I were to use this method. I could 'truely' replace the home screen with one of the 3rd party ones. ie aHome or dxTop? As it is now, I've noticed that even setting aHome as default, Home still runs in the background. Using Advanced Task Manager to confirm this btw.
If this is the case, I'll be using this shortly. As I'm tired of just running 3rd party programs in addition to the programs they are suppose to replace.
Its like using windowblinds in windows, instead of just replacing the whole shell. lol
followinginsanity said:
So if I were to use this method. I could 'truely' replace the home screen with one of the 3rd party ones. ie aHome or dxTop? As it is now, I've noticed that even setting aHome as default, Home still runs in the background. Using Advanced Task Manager to confirm this btw.
If this is the case, I'll be using this shortly. As I'm tired of just running 3rd party programs in addition to the programs they are suppose to replace.
Its like using windowblinds in windows, instead of just replacing the whole shell. lol
Click to expand...
Click to collapse
This only lets your run cli programs. This is below the dalvik system so it won't help you change the launcher.apk for ahome or dxtop.
Ok I see what your saying now. Misunderstood the exact intent of the changes
Cool trick, thanks. I already had a /system/sd/bin, so I modified it a little to skip creating it and doing the chmod etc on it.
Slight mod to avoid the whole thing if /usr is already there.. .
Code:
if ! [ -d /usr ]
then
mount -o remount,rw /dev/rootfs /;
mkdir /usr;
chown root.root /usr;
chmod 755 /usr;
ln -s /system/sd/bin /usr/bin;
mount -o remount,ro /dev/rootfs /;
fi
This is useful to me as my userinit.sh is the new one from the compcache thread and can be run to get status info on compcache after boot. No need to remount the filesystem and all that when what we need is already there.
I don't think you can skip the creation of /usr as it is lost
after a reboot at least on cm-mod, you can skip the creation
of system/sd/bin if it already exists tough. OTOH running:
Code:
mkdir /usr
chown root.root /usr
chmod 755 /usr
mkdir /system/sd/bin
chown root.shell /system/sd/bin
chmod 755 /system/sd/bin
ln -s /system/sd/bin /usr/bin
will do no harm as mkdir and ln will fail if the targets already exist
and chown and chmod will just ensure that you can run your
programs.To be on the safe side i would suggest:
Code:
mount -o remount,rw /dev/rootfs /
mkdir /usr
chown root.root /usr
chmod 755 /usr
# we should check if /system/sd is mounted
if [ ! -d /system/sd/bin ] ; then
mkdir /system/sd/bin
chown root.root /system/sd/bin
chmod 755 /system/sd/bin
fi
ln -s /system/sd/bin /usr/bin
mount -o remount,ro /dev/rootfs /
This would be a great place to put a set of the GNU utilities like ls, ln, cp, mv, etc to go along with bash. Busybox is great and all, but there are some advanced options in the GNU versions that aren't available in Busybox. Has anyone compiled them for Android? I might try copying the Debian ones over and see if they work without the rest of the chroot. I'm thinking I'll need at least some of /lib from debian for them to work though.
ttabbal said:
This would be a great place to put a set of the GNU utilities like ls, ln, cp, mv, etc to go along with bash. Busybox is great and all, but there are some advanced options in the GNU versions that aren't available in Busybox. Has anyone compiled them for Android? I might try copying the Debian ones over and see if they work without the rest of the chroot. I'm thinking I'll need at least some of /lib from debian for them to work though.
Click to expand...
Click to collapse
Have you tried a fully configured busybox with desktop options enabled?
Attached just for reference my .config.
farmatito said:
Have you tried a fully configured busybox with desktop options enabled?
Attached just for reference my .config.
Click to expand...
Click to collapse
Nope. Is there a binary available? I don't have a cross compiler set up right now.
Try this, You can create all the symlinks with this command:
Code:
adb push busybox /usr/bin
adb shell
cd /usr/bin
./busybox --install .
For full functionality you should also add /etc/passwd, /etc/shadow, /etc/group, /etc/gshadow. I link them to /system/sd/etc/ to have them rw
Code:
mkdir /system/sd/etc
chmod 644 /system/sd/etc
/system/bin/chown root.root /system/sd/etc
/system/bin/chown root.root /system/sd/etc/passwd
/system/bin/chown root.root /system/sd/etc/group
/system/bin/chown root.root /system/sd/etc/shadow
/system/bin/chown root.root /system/sd/etc/gshadow
/system/bin/chown root.root /system/sd/etc/fstab
chmod 644 /system/sd/etc/passwd
chmod 644 /system/sd/etc/group
chmod 600 /system/sd/etc/shadow
chmod 600 /system/sd/etc/gshadow
ln -s /system/sd/etc/passwd /etc/passwd
ln -s /system/sd/etc/shadow /etc/shadow
ln -s /system/sd/etc/group /etc/group
ln -s /system/sd/etc/gshadow /etc/gshadow
Remove the su link to busybox for now as it interferes with
the superuser app (otoh you could set a root passwd and
use busybox's su BUT ONLY FROM A SHELL)
Code:
rm /usr/bin/su
You should also:
Code:
passwd root
addgroup -g 65534 nogroup
You can even use ash as your default shell by doing:
Code:
if [ -e /usr/bin/busybox ] ; then
mount --bind /usr/bin/sh /system/bin/sh
fi
# Fix scripts in /system/bin
for i in am ime input monkey pm svc
do
if [ `grep -c "#!/system/bin/sh" /system/bin/$i` -eq 0 ] ; then
echo "#!/system/bin/sh" > /system/bin/$i.tmp
cat /system/bin/$i >> /system/bin/$i.tmp
mv /system/bin/$i.tmp /system/bin/$i
chown root.shell /system/bin/$i
chmod 755 /system/bin/$i
fi
done
Thanks! That worked great.
farmatito said:
Try this, You can create all the symlinks with this command:Remove the su link to busybox for now as it interferes with
the superuser app (otoh you could set a root passwd and
use busybox's su BUT ONLY FROM A SHELL)
Click to expand...
Click to collapse
Hey farmatito - just stumbled onto this thread and am going to follow this but I am unclear on how to remove the su link to busybox? Any direction would be appreciated! Thanks.
Edit: I realize you mean to just rm it from /system/sd/bin - duh. thanks for this thread! I like having the full busybox bin.
cd /usr/bin
rm su
farmatito said:
cd /usr/bin
rm su
Click to expand...
Click to collapse
Yeah, I figured that out - thanks. I had edited my above post saying such.
another question for you - I was going through your busybox config file - and am wondering which directory you store it in so that it is used when installing busybox?
prscott1 said:
Yeah, I figured that out - thanks. I had edited my above post saying such.
another question for you - I was going through your busybox config file - and am wondering which directory you store it in so that it is used when installing busybox?
Click to expand...
Click to collapse
Download the source code from www.busybox.net
extract it
cd busybox
cp my_config .config
make oldconfig
make
You need a cross compiler to build it
you can download one at
http://www.codesourcery.com/sgpp/lite/arm/portal/release830
or
http://www.codesourcery.com/sgpp/lite/arm/portal/release827
Quick stupid question please... tried searching but haven't found much.
After doing the userinit.sh mod shown here and using the new busybox (thanks for that, btw!), I noticed that a lot of the commands (including 'ls' which is now using /usr/bin/ls) show ansi colors in a terminal that supports them (i.e. 'Terminal' or 'Better Terminal' app) which is awesome but 'adb shell' looks mostly horrible with escape sequences instead of colors, like this:
Code:
# cd /system/sd
cd /system/sd
# ls -l
ls -l
drwxrwx--x 2 system system 2048 Aug 19 16:04 ←[1;34mapp←[0m
drwxrwx--x 2 system system 1024 Aug 16 02:12 ←[1;34mapp-private←[0m
drwxr-xr-x 2 root root 4096 Aug 19 20:40 ←[1;34mbin←[0m
drwxrwx--x 2 system system 7168 Aug 19 16:04 ←[1;34mdalvik-cache←[0m
drw-r--r-- 2 root root 1024 Aug 19 20:39 ←[1;34metc←[0m
drwxr-xr-x 2 root root 12288 Jul 10 02:29 ←[1;34mlost+found←[0m
drwxrwxrwx 2 root root 1024 Jul 22 18:15 ←[1;34mmedia←[0m
-rwxr-xr-x 1 root root 331 Aug 19 20:28 ←[1;32muserinit.sh←[0m
Do you guys set your $TERM variable to something that makes the adb terminal more "sane" or is not possible because adb is limited and I should just ssh or telnet in, etc.?
I've tried setting $TERM to various standard things (ansi/vt100/xterm/etc.) but the dumb adb terminal remains.. well.. dumb.
rub1k said:
Quick stupid question please... tried searching but haven't found much.
After doing the userinit.sh mod shown here and using the new busybox (thanks for that, btw!), I noticed that a lot of the commands (including 'ls' which is now using /usr/bin/ls) show ansi colors in a terminal that supports them (i.e. 'Terminal' or 'Better Terminal' app) which is awesome but 'adb shell' looks mostly horrible with escape sequences instead of colors, like this:
Code:
# cd /system/sd
cd /system/sd
# ls -l
ls -l
drwxrwx--x 2 system system 2048 Aug 19 16:04 ←[1;34mapp←[0m
drwxrwx--x 2 system system 1024 Aug 16 02:12 ←[1;34mapp-private←[0m
drwxr-xr-x 2 root root 4096 Aug 19 20:40 ←[1;34mbin←[0m
drwxrwx--x 2 system system 7168 Aug 19 16:04 ←[1;34mdalvik-cache←[0m
drw-r--r-- 2 root root 1024 Aug 19 20:39 ←[1;34metc←[0m
drwxr-xr-x 2 root root 12288 Jul 10 02:29 ←[1;34mlost+found←[0m
drwxrwxrwx 2 root root 1024 Jul 22 18:15 ←[1;34mmedia←[0m
-rwxr-xr-x 1 root root 331 Aug 19 20:28 ←[1;32muserinit.sh←[0m
Do you guys set your $TERM variable to something that makes the adb terminal more "sane" or is not possible because adb is limited and I should just ssh or telnet in, etc.?
I've tried setting $TERM to various standard things (ansi/vt100/xterm/etc.) but the dumb adb terminal remains.. well.. dumb.
Click to expand...
Click to collapse
What terminal are you using?
I use konsole on linux and everything looks fine.
Cannot say if there is a suitable terminal for windows,
maybe the one that comes with the mingw compiler.
If nothing works you can just:
Code:
cd /usr/bin
rm ls
farmatito said:
Download the source code from www.busybox.net
extract it
cd busybox
cp my_config .config
make oldconfig
make
You need a cross compiler to build it
you can download one at
http://www.codesourcery.com/sgpp/lite/arm/portal/release830
or
http://www.codesourcery.com/sgpp/lite/arm/portal/release827
Click to expand...
Click to collapse
Many thanks!
Oh, sorry, I should have specified that.
This was using adb from my Vista x64 laptop (yeah, sorry, stuck with win32 for using adb so terminal choices rather limited).
So, basically, it was just running "adb[.exe] shell" from a Windows command prompt.
Tried bash under cygwin and even though it has full ansi coloring support, it looks like adb.exe isn't very terminal friendly because extended/escaped ansi still don't translate.
No big deal; I'll remove /usr/bin/ls for now or temporarily alias 'ls' to /system/xbin/bb/ls while I'm in an adb shell.
Wondering what else I could be using via the USB connection to get a shell prompt within my G1... easiest way is to turn on the wifi and telnet/ssh in, I guess?
EDIT: Duh, just started telnetd and forwarded the port using adb and problem solved (using putty to telnet in as described here and it works very nicely).
rub1k said:
Quick stupid question please... tried searching but haven't found much.
After doing the userinit.sh mod shown here and using the new busybox (thanks for that, btw!), I noticed that a lot of the commands (including 'ls' which is now using /usr/bin/ls) show ansi colors in a terminal that supports them (i.e. 'Terminal' or 'Better Terminal' app) which is awesome but 'adb shell' looks mostly horrible with escape sequences instead of colors, like this:
Code:
# cd /system/sd
cd /system/sd
# ls -l
ls -l
drwxrwx--x 2 system system 2048 Aug 19 16:04 ←[1;34mapp←[0m
drwxrwx--x 2 system system 1024 Aug 16 02:12 ←[1;34mapp-private←[0m
drwxr-xr-x 2 root root 4096 Aug 19 20:40 ←[1;34mbin←[0m
drwxrwx--x 2 system system 7168 Aug 19 16:04 ←[1;34mdalvik-cache←[0m
drw-r--r-- 2 root root 1024 Aug 19 20:39 ←[1;34metc←[0m
drwxr-xr-x 2 root root 12288 Jul 10 02:29 ←[1;34mlost+found←[0m
drwxrwxrwx 2 root root 1024 Jul 22 18:15 ←[1;34mmedia←[0m
-rwxr-xr-x 1 root root 331 Aug 19 20:28 ←[1;32muserinit.sh←[0m
Do you guys set your $TERM variable to something that makes the adb terminal more "sane" or is not possible because adb is limited and I should just ssh or telnet in, etc.?
I've tried setting $TERM to various standard things (ansi/vt100/xterm/etc.) but the dumb adb terminal remains.. well.. dumb.
Click to expand...
Click to collapse
If you are on a windows pc, try using cygwin - works great.

[Q] Building Harmony/GTablet CyanogenMod from source?

I'm getting pretty far along building CyanogenMod for the GTablet on Mandriva Linux x86_64, I pulled the latest source and did the following from a bash shell:
Code:
cd device/nvidia/harmony
./extract-files.sh
cd ../../..
cp ./vendor/cyanogen/products/cyanogen_harmony.mk ./buildspec.mk
. build/envsetup.sh
lunch cyanogen_harmony-eng
cd vendor/cyanogen
./get-rommanager
./get-google-files -v hdpi
cd ../..
make -j6 CYANOGEN_WITH_GOOGLE=true bacon
I'm wondering if I should have gotten the mdpi-tegra google apps instead? get-google-files requires the following change if so:
Code:
FILENAME=["gapps-hdpi-20101114-signed.zip","gapps-mdpi-20101020-signed.zip","gapps-mdpi-tiny-20101020-signed.zip","gapps-mdpi-tegra-20101020-signed.zip"]
VERSIONS=["hdpi","mdpi","mdpi-tiny","mdpi-tegra"]
then do:
Code:
./get-google-files -v mdpi-tegra
Has anyone gotten this working?
I'm almost 100% positive that you cannot use HDPI gapps. MDPI gapps are the ones that you need to use for CM6.1 for this device.
Good to know, I just got it built but now clockwork doesn't see the update-cm-6.1.0-Beta4-Harmony-signed.zip on the sdcard?!? I can mount and verify the .zip from linux, the file should be in the root directory, correct?
Weird, I tried copying over the clockwork update.zip and recovery/ dirs, now I can see LOST.DIR but nothing else from the recovery install from sdcard option...
Dumb question....but did you mount the sdcard? I've seen that happen if the card is not mounted to /sdcard
Possible /sdcard and /sdcard2 mount confusion?
Nope, from adb shell I can see /mnt/sdcard with the files (which match md5 checksums):
Code:
# ls -lF /mnt/sdcard
d---rwxr-x 3 system sdcard_r 4096 Jan 25 06:51 Android/
d---rwxr-x 2 system sdcard_r 4096 Jan 25 06:51 LOST.DIR/
d---rwxr-x 2 system sdcard_r 4096 Oct 29 2010 recovery/
----rwxr-x 1 system sdcard_r 83928334 Dec 5 2010 update-cm-6.1.0-Beta4-Harmony-signed.zip*
----rwxr-x 1 system sdcard_r 4003082 Nov 9 2010 update.zip*
Is there anything special that needs to be done with permissions? I did have to repartition the sd card, somehow it got really messed up when I tried formatting it from the tablet's setup app.
edit: I found out that the .zip needs to be on /mnt/emmc (which I guess shows up as sdcard from clockwork recovery).

[Q] Not possible to create a symlink in /mnt/sdcard?

Hi,
Is there a way to create a symling in /mnt/sdcard (I want to point to a folder of the microSD)?
Each time I try (several times since yesterday evening...), I receive the message "Function not implemented"...
Example (/data/sdext2 is an EXT2 partition on my microSD) :
Code:
ln -s /data/sdext2/test /mnt/sdcard/Android/data/test
The usage of mount -o bind doesn't work for what I want to do
Thanks in advance for your help!
Regards.
First question of all: Are you rooted? If not, root first.
If you are rooted and using shell inside the TF, be sure you do "su" before entering any command to grant root privileges (you should have the # prompt instead of $).
Aside from that, it should work... If is still giving you trouble please post the entire log for that session (just copy paste what you've entered in the console), so we can help you better.
Hi,
First of all, thanks for your answer!
My TF is rooted and I use Revolver 3.11.
There are 2 partitions on my micro sd :
1) 8 GB - FAT32 - Primary
2) 22 GB - EXT2 - Primary
The second partition is mounted on /data/sdext2 (mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2).
Here are the commands :
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Code:
su
mount -o remount,rw /
cp -pr /mnt/sdcard/Android/data/com.triactivemedia.radiocontrolrotorworld /data/sdext2/com.triactivemedia.radiocontrolrotorworld
rm -r /mnt/sdcard/Android/data/com.triactivemedia.radiocontrolrotorworld
ln -s /data/sdext2/com.triactivemedia.radiocontrolrotorworld /mnt/sdcard/Android/data/com.triactivemedia.radiocontrolrotorworld
busybox ln -s /data/sdext2/com.triactivemedia.radiocontrolrotorworld /mnt/sdcard/Android/data/com.triactivemedia.radiocontrolrotorworld
Thanks in advance for your help!
Regards
Fat32 doesn't support symbolic links. You would need to use a couple of ext* or linux FS's.
Hi.
Thanks for the answer.
The second partition (/data/sdext2) is an EXT2 partition. So it seems it's not the issue...
Regards.
Sent from my HTC Sensation Z710e using Tapatalk
/mnt/sdcard is a fuse shim around /data/media. Crest your symlink there.
ln -s /Removable/MicroSD/folder /data/media/folder
Should generally work for most people, depending how how custom your tf is or in your case the card
Sent from my Transformer Prime TF201 using Tapatalk
Hi Spidey01!
Thanks a lot for your precious help!
You are right, I was able to create the symlink using :
ln -s /data/sdext2/Android/data/com.triactivemedia.radiocontrolrotorworld/ /data/media/Android/data/com.triactivemedia.radiocontrolrotorworld
If I go to /data/media/Android/data, everything is fine (see ls and ls -l here after) :
/data/media/Android/data # ls
com.google.android.apps.maps
com.google.android.gallery3d
com.google.android.music
com.google.android.videos
com.triactivemedia.modelhelicopterworld
com.triactivemedia.radiocontrolrotorworld
com.zinio.mobile.android.reader
/data/media/Android/data # ls -l
drwxrwxr-x media_rw media_rw 2012-01-10 15:31 com.google.android.apps.maps
drwxrwxr-x media_rw media_rw 2012-01-10 15:06 com.google.android.gallery3d
drwxrwxr-x media_rw media_rw 2012-01-10 14:57 com.google.android.music
drwxrwxr-x media_rw media_rw 2012-01-10 14:56 com.google.android.videos
drwxrwxr-x media_rw media_rw 2012-01-11 11:45 com.triactivemedia.modelhelicopterworld
lrwxrwxrwx root shell 2012-01-13 23:01 com.triactivemedia.radiocontrolrotorworld -> /data/sdext2/Android/data/com.triactivemedia.radiocontrolrotorworld/
drwxrwxr-x media_rw media_rw 2012-01-11 11:15 com.zinio.mobile.android.reader
If I go to /mnt/sdcard/Android/data, I see the link when I make a ls but not when I make a ls -l :
/mnt/sdcard/Android/data # ls
com.google.android.apps.maps
com.google.android.gallery3d
com.google.android.music
com.google.android.videos
com.triactivemedia.modelhelicopterworld
com.triactivemedia.radiocontrolrotorworld
com.zinio.mobile.android.reader
/mnt/sdcard/Android/data # ls -l
drwxrwxr-x root sdcard_rw 2012-01-10 15:31 com.google.android.apps.maps
drwxrwxr-x root sdcard_rw 2012-01-10 15:06 com.google.android.gallery3d
drwxrwxr-x root sdcard_rw 2012-01-10 14:57 com.google.android.music
drwxrwxr-x root sdcard_rw 2012-01-10 14:56 com.google.android.videos
drwxrwxr-x root sdcard_rw 2012-01-11 11:45 com.triactivemedia.modelhelicopterworld
drwxrwxr-x root sdcard_rw 2012-01-11 11:15 com.zinio.mobile.android.reader
Do you have another idea? Or should we admit that we can't use symlink with Fuse?
Thanks!!!
I am after this as well, have you managed to get it working?
I managed to symlink to /data/media/0 and file manager sees it there, but if I go to /sdcard there's nothing either.
Isn't there a way to edit fstab to get /sdcard to mount as ext4, instead of fuse? Because all my systems are Linux, I wouldn't have trouble mounting my Tablet over my laptop (even more because I only do wireless connections via ssh)
Sent from PomPoko [TF101G] using TapaTalkHD
This is how I did it.
mount -o bind /Removable/MicroSD /mnt/sdcard/extsd
frefol123 said:
This is how I did it.
Code:
mount -o bind /Removable/MicroSD /mnt/sdcard/extsd
Click to expand...
Click to collapse
I got the idea, but for what I need bind won't work
I want to symlink, e.g., a download folder from extsd in place of /sdcard/Download.
Bind only mounts the actual devices, subfolders won't work AFAIK
Sent from PomPoko [TF101G] using TapaTalkHD
leomeloxp said:
I got the idea, but for what I need bind won't work
I want to symlink, e.g., a download folder from extsd in place of /sdcard/Download.
Bind only mounts the actual devices, subfolders won't work AFAIK
Sent from PomPoko [TF101G] using TapaTalkHD
Click to expand...
Click to collapse
I just tried mount -o bind /Removable/MicroSD/Download /mnt/sdcard/extsd and it worked just fine, unless that is not what you meant.
Edit: nevermind, I just realized that you wanted to redirected the /sdcard/download folder to the micro sd.
The adroid app "FolderMount" will accomplish this and does so quite well. If you need to do mounts (links) outside of the internal and external sdcard folders, you will need to donate (inside the app; $2) and then use the option to uncheck destination folder checks. This app works really well for any data that isnt needed right at startup.
insanelycool said:
The adroid app "FolderMount" will accomplish this and does so quite well.
Click to expand...
Click to collapse
Thanks, but that looks like it requires root. If I had root, I would have already fixed this myself.
[Q] Can't create symlinks on sdcard0...
Running latest Carbon ROM, rooted.
I'm trying to link my /storage/sdcard0/Pictures/Screenshots into /storage/sdcard0/DCIM so Google+ will pickup and upload screenshots automatically.
I've fired up the Terminal Emulator, su'd no problem so prompt is a #.
cd /storage/sdcard0/DCIM works fine c/l prompt showing new path, pwd shows the same.
ln -s /storage/sdcard0/Pictures/Screenshots Screenshots
Gives the message: link failed Operation not permitted.
Obviously not a FAT32 issue as sdcard0 is the internal one so I assume EXT32...
Tried ln -sf... still nothing.
Any ideas?
Salut all!
I have android 4.2.2 with all user stuff stored in /data/media/0 (internal SD)
and clockworkmod backup hidden within /data/media/clockworkmod (id est it's not visible unless i navigate outside my SD with a help of some root explorer). But that's not an issue.
The issue is that I use PC based backup with Samba fileshare on smartphone and FreeFileSync running on Windows PC.
And Windows PC cannot access anything outside phone SD, so clockworkmod backups are out of syncing.
I suppose that linking /data/media/clockworkmod to /data/media/0/clockworkmod would make rom backups accessible from PC. Yeah?
So the main question is
What directories are actual and real?
I have
1) /data/media/0/
2) /mnt/shell/emulated/0/
3) /storage/emulated/0/
4) /storage/emulated/legacy/
And I cannot understand which of these is THE original one to operate with.
I would not want to create links on links on links on links...
Thank you!
chasman said:
Running latest Carbon ROM, rooted.
I'm trying to link my /storage/sdcard0/Pictures/Screenshots into /storage/sdcard0/DCIM so Google+ will pickup and upload screenshots automatically.
I've fired up the Terminal Emulator, su'd no problem so prompt is a #.
cd /storage/sdcard0/DCIM works fine c/l prompt showing new path, pwd shows the same.
ln -s /storage/sdcard0/Pictures/Screenshots Screenshots
Gives the message: link failed Operation not permitted.
Obviously not a FAT32 issue as sdcard0 is the internal one so I assume EXT32...
Tried ln -sf... still nothing.
Any ideas?
Click to expand...
Click to collapse
This is almost exactly what I want to do and I'm having the same problem. I want to get a symlink from /storage/sdcard0/DCIM/Studio to /storage/sdcard0/Studio, because a picture editing app I use stores the images it creates in /storage/sdcard0/Studio, and I want them to be synced to "the cloud" with my DCIM folder. I've tried the same steps as chasman, and gotten the same result.
May I ask a few questions regarding symlinks?
I'm thinking of solving a problem (wrote about it here) I have of sending multiple files that have the same name but aren't allowed to be renamed (which can cause issues) , by using symlinks to them (that will have unique names).
1. Will this solution work?
2. If this should work, would it require root, even if the path is public for all?
3. If it should work, what should be the exact command?
4. Is there anything I should know about this method?
5. Is there an official API on Android for symlinks?
6. Can it work on any device?
So I was able to create a symlink to external sdcard on LG g3 running rooted stock kit Kat Rom. I successfully changed Groove's (formerly xboxmusic) offline storage to external sdcard.
The following command was successful in creating a link, but Groove was unable to download music to the directory presumably due to permissions on /many
su
cp -rp /data/media/0/Android/data/com.microsoft.xboxmusic /storage/external_sd
rm -r /data/media/0/Android/data/com.microsoft.xboxmusic
ln -s /mnt/media_rw/external_sd/com.microsoft.xboxmusic/ /data/media/0/Android/data
After these commands, Groove was producing errors stating that there was not enough disk space. As said before, I believe this was due to it's lack of permissions to /mnt
Replacing the last command with the following worked and offline music is now downloaded to external sd card
ln -s /storage/external_sd/com.microsoft.xboxmusic/ /data/media/0/Android/data
Given my experience, you cant create a link in a fuse fs, but you can create a symblink to a fuse fs.
Hope this helps.
Thanks it worked!!
frefol123 said:
This is how I did it.
mount -o bind /Removable/MicroSD /mnt/sdcard/extsd
Click to expand...
Click to collapse
thanks!! this command worked like a charm, i was able to link /sdcard to /storage/sdcard1 to change the default storage location!! Again thankyou very much!
a small issue
soorya_cryo said:
thanks!! this command worked like a charm, i was able to link /sdcard to /storage/sdcard1 to change the default storage location!! Again thankyou very much!
Click to expand...
Click to collapse
you cant access the internal sd card later on after running this command. Only option is to reboot and revert back to the default settings.

Categories

Resources