Whatsapp with Multirom - Nexus 5 Q&A, Help & Troubleshooting

I'm currently using multirom to test android L and use Kitkat, I want to use the same Whatsapp account.
Is it possible if I have the same emei and android id on both roms and I use Helium to sync Chatlogs?

I don't use multirom so I'm not familiar with the data structure but in the 2nd ROM, can you not symlink from the original /data/data/WhatsAppDir to the new one?
Sent from my Nexus 5 using Tapatalk

Do you mean ln -s /data/data/Whatsappfolder /2Rom/data/data/whatsappfolder?

That's a symlink, yes.
Sent from my Nexus 5 using Tapatalk

When trying with download folder I got a error that this function is not implemented (I have root and busybox)

You're maybe doing it the wrong way round. Also I'm not sure if it will work because I don't know the folder structure.
Sent from my Nexus 5 using Tapatalk

dav20011 said:
When trying with download folder I got a error that this function is not implemented (I have root and busybox)
Click to expand...
Click to collapse
I have never linked a data folder on android, but if "ln -s ..." doesn't work, maybe you should try "busybox ln -s ..." ?

keiwop said:
I have never linked a data folder on android, but if "ln -s ..." doesn't work, maybe you should try "busybox ln -s ..." ?
Click to expand...
Click to collapse
Just realised he tried to link the download folder. He cannot link that as it's on /sdcard. You can only link ext4 partitions, not FAT, exFAT, NTFS etc /system and /data are the only linkable directories

rootSU said:
Just realised he tried to link the download folder. He cannot link that as it's on /sdcard. You can only link ext4 partitions, not FAT, exFAT, NTFS etc /system and /data are the only linkable directories
Click to expand...
Click to collapse
Isn't the Nexus 5 /sdcard formatted as ext4 since it's just a FUSE virtual file system of part of the /data partition?

raptir said:
Isn't the Nexus 5 /sdcard formatted as ext4 since it's just a FUSE virtual file system of part of the /data partition?
Click to expand...
Click to collapse
No. /data is ext4 (or f2fs for some of us). /sdcard itself is not ext4. FUSE doesn't support symlinking
You can test it yourself
Code:
su
mkdir /data/data/test
ln -s /data/data/test /sdcard/test
function not implemented
ln -s /data/data/test /data/media/0/test
successful
You can see in /data/media/0/test that symlinking is working. Add a file and it appears in /data/data/test. However, /sdcard/test as it is a symlink, not directory, is not visible or accessible

Is the root dir also use able for symlink? I got a read only error but I changed everything rwx
Edit: Use terminal emulator chmod and not es file explorer
Last question: does anybody know where multirom saves the roms?

i know im late...
But: multirom stores the roms at /data/media/0/multirom/roms
Were you successful using whatsapp on 2 roms?

Related

modified: Installing & Run application on sdcard

WARNING: Proceed at your own risk, this may damage your phone and/or make it unstable. This is for advanced users only and should only be attempted by those who understand the risks of the following changes
Original post: http://www.androidin.net/thread-1099-1-1.html
AS usual, this is for those WITH ROOT ONLY
Preparation:
1. Installed JF RC30 V1.2 (only if you are using JF RC30 1.2 , this is not compatible with RC8)
2. Make a NANDROID backup (you may get everything back to normal if the phone screw up)
3. A MICRO-SD card with 2 partitions divided : (1) a fat-32 partition, (2) a ext2, you need a linux/mac to format the sdcard with ext2 partition
* the fat 32 will be mounted as sdcard and the ext2 will be mounted as /sd for application data, make your own decision for the size*
4. insert the sdcard with 2 partition on the phone
5. set the phone to aeroplane mode for safe
Procedure:
1. adb pull /system/etc/mountd.conf /*somewhere you may want to back it up*
2. rm -f /system/etc/mountd.conf
3. using the modified mountd.conf, adb push /*the path of modified mount.conf */mount.conf /system/etc/mountd.conf
4. adb pull /system/init.rc /*somewhere you may want to back it up*
5. rm -f /system/init.rc
6. using the modified init.rc, adb push /*the path of modified init.rc*/init.rc /system/init.rc
7. reboot
8. busybox cp -a /data/app /sd/
9. rm -r /data/app
10. ln -s /sd/app /data/app
11. reboot
Now, the phone will install and run everyone on /sd, still mounting /sdcard as usual. It is possible that to mount or unmount /sdcard by usb without everything screwed up. Beware that your sdcard will be used as part of system, removing the sdcard may freeze the phone. If the phone get freeze because of removing the sdcard, plug the sdcard again and soft reset.
It is also possible that copy the application data to another card. If you want to change the sdcard, switch the phone off, mounting the sdcard to computer directory, copy the /sd partition to another sdcard with ext2 partition
Back to normal:
1. rm -f /system/etc/mountd.conf
2. adb push /*the backup of mountd.conf* /system/etc/mountd.conf
3. rm -f /system/init.rc
4. adb push /*the backup of init.rc* /system/init.rc
5. busybox cp -a /sd/ /data/app
6. rm -r /sd/
Change of mountd.conf:
changing /dev/block/mmcblk0 to /dev/block/mmcblk0p1
change of init.rc:
adding
insmod /system/modules/2.6.25-01843-gfea26b0/kernel/fs/ext2/ext2.ko
mknod /dev/mmcblk0p2 b 179 2 1000
mount ext2 /dev/mmcblk0p2 /sd noatime nodiratime
Any chance of this being simplified into the actual commands necessary for this!?
I'm a semi-noob at *nix stuff... I can format my SD card into 2 partitions, but I'm lost at step 4... What do we need to edit??
Changed step 4...just adb pull the mount.conf for editing..open the file in text editor..find "mmcblk0" and change it "mmcblk0p1" ..save the .conf...del the original one..push the new one to the original directory..
Yay. Now hopefully we can get this in an update.zip to flash
Yeah, I'm putting off doing this until someone makes an update.zip which I definitely know how to apply and get rid of if I screw anything up
REPLACES the internal memory...?
So the internal memory isnt used?
kinda the same trick as the browser cache and market cache, just a bit more complex as its an entire filesystem your moving, which wouldnt let the sys see the internal, mem, please correct me if im reading it wrong, Im not a total noob at linux but no guru dev either...
bhang
The internal memory is still used, just not for /data/app
19.rm -r /data/app
20.ln -s /sd/app /data/app
Click to expand...
Click to collapse
It should probably be /sdcard/app. In any case, this is a fairly complex mod that is not suited for Linux newbies. I would advise against folks considering this mod unless they understand and can test each step before attempting.
I agree and added a warning to the first post
Ummm yea, so what happens when you mount your sdcard for storage? I expect the phone goes crazy?
This tutorial, if you could call it that,(no offense) is really badly written and this process seems too risky for what you gain considering that if we are patient google will come out with this themselves.
Stericson
Stericson said:
Ummm yea, so what happens when you mount your sdcard for storage? I expect the phone goes crazy?
This tutorial, if you could call it that,(no offense) is really badly written and this process seems too risky for what you gain considering that if we are patient google will come out with this themselves.
Stericson
Click to expand...
Click to collapse
The procedure calls for two partitions on the microsd, one FAT32, other EXT. Theoretically it should work with mounting for mass storage. However, I agree that it's a rather sloppy hack.
There is talk about a similar strategy being officially implemented by the Android team. Instead of two partitions, it would be loopback mounted to a file in the FAT32. That would also provide some encryption security. See here. It's just talk though. Won't be a reality for at least a few months.
Well talk is certainly better than nothing...thanks for the info....
Stericson
I post a method withtout compiling the ramdisk.img but that do not force mounting the sd ext2 drive under rootfs but still workable...probably when i back to work I can compile 1 to flash
Am I the only one that thinks there are a few things that are getting 'lost in translation' here?
I'm not getting /sd mounted properly upon reboot...there's no way I'm going to continue attempting this till I see a better (no offense) tutorial or do a little more research on the command lines.
I would really shy away from this if you're an average user or don't know what mountd and init.rc files are used for....this could flat out wreck your phone.
TheDudeOfLife said:
Am I the only one that thinks there are a few things that are getting 'lost in translation' here?
I'm not getting /sd mounted properly upon reboot...there's no way I'm going to continue attempting this till I see a better (no offense) tutorial or do a little more research on the command lines.
I would really shy away from this if you're an average user or don't know what mountd and init.rc files are used for....this could flat out wreck your phone.
Click to expand...
Click to collapse
/sd is /sdcard (mount point for the micro sd card's partition)
I'm getting stuck right here:
8. busybox cp -a /data/app /sd/
9. rm -r /data/app
10. ln -s /sd/app /data/app
11. reboot
It's saying read only system blah blah, even though I have indeed mounted it is rw
pershoot said:
/sd is /sdcard (mount point for the micro sd card's partition)
Click to expand...
Click to collapse
No....no it is not.
/sd is a mount of the ext2 partition used for the 'copy' of /data/app (one of the things i disagreed with is picking /sd as a mount point for the second partition.)
/sdcard is the fat32 mount point...used as usual for mounting files.
IzzeLing said:
I'm getting stuck right here:
8. busybox cp -a /data/app /sd/
9. rm -r /data/app
10. ln -s /sd/app /data/app
11. reboot
It's saying read only system blah blah, even though I have indeed mounted it is rw
Click to expand...
Click to collapse
Type mount in adb shell and see if /sd is even mounted. I wasn't seeing it in my list. I don't think his mount command in the init.rc is correct, but I'm too busy with holiday stuff.
Don't rm -r /data/app if you have not 100% verified the copy works.
This line looks mangled (need flags in the args):
Edit: nevermind, looks like it should work in the init.rc
TheDudeOfLife said:
No....no it is not.
/sd is a mount of the ext2 partition used for the 'copy' of /data/app (one of the things i disagreed with is picking /sd as a mount point for the second partition.)
/sdcard is the fat32 mount point...used as usual for mounting files.
Click to expand...
Click to collapse
ahh yea. i just re-glanced over the instructions.
cool.
TheDudeOfLife said:
Type mount in adb shell and see if /sd is even mounted. I wasn't seeing it in my list. I don't think his mount command in the init.rc is correct, but I'm too busy with holiday stuff.
Don't rm -r /data/app if you have not 100% verified the copy works.
Click to expand...
Click to collapse
Yeah, don't see it. Hm.

[SCRIPT] Enabling Darktremor a2sd on Samsung s5830 Galaxy ACE

Hello,
In this guide I will show you how to enable Darktremor's a2sd (i.e. extending your internal memory using SD card, so you can install more applications easily).
This method has been tested on a rooted Galaxy ACE running Android 2.2.1. It might work on other devices, but I don't guarantee.
This guide assumes that your phone is rooted, and you have a basic knowledge in adb shell.
Please note that this script sleeps for 8 seconds at boot time to make sure that the SD card is loaded before mounting (thanks devetle and KoGi77GR).
REMEMBER: The steps below will not extend your phone's internal memory, you still have to install a2sd (link provided below) to complete the job.
1- Backup all data, both on your phone and your SD card.
Click to expand...
Click to collapse
2- Partition your SD card as following: 1st partition FAT32, 2nd partition ext2. I'm not sure about the optimal partition size of ext2, but you can start with 1-2 GB. Make sure that you use ext2 only, as ext3 and ext4 are not supported by the kernel (by default. See Bonus section below). Here's a good guide to help you out.
Click to expand...
Click to collapse
3- Insert your SD card and make sure that your phone recognizes it correctly.
Click to expand...
Click to collapse
4- Connect your phone in Mass Storage mode, then extract the attached script file to your SD card root directory.
Click to expand...
Click to collapse
5- Disconnect mass storage and login to ADB shell as root:
Code:
adb shell
su
Click to expand...
Click to collapse
6- Type in the following commands (try copy-paste each line then hit enter):
Code:
cp /sdcard/a2sd_enabler.sh /data/local/tmp/
chmod 755 /data/local/tmp/a2sd_enabler.sh
/data/local/tmp/a2sd_enabler.sh
If you got any error messages (starting with "ERROR") please post them here. Otherwise, continue to step 7.
Click to expand...
Click to collapse
7- To double check everything, reboot your phone and login again as root through adb, then run the following command, and find a line similar to the highlighted line in the output below:
Code:
su
df
Output
Code:
/dev: 142220K total, 12K used, 142208K available (block size 4096)
/mnt/asec: 142220K total, 0K used, 142220K available (block size 4096)
/cache: 25656K total, 12K used, 25644K available (block size 4096)
/data: 185240K total, 36768K used, 148472K available (block size 4096)
/system: 213376K total, 211520K used, 1856K available (block size 4096)
[B][COLOR="Red"]/system/sd: 1032088K total, 38512K used, 993576K available (block size 4096)[/COLOR][/B]
/mnt/sdcard: 6783016K total, 190356K used, 6592660K available (block size 4096)
/mnt/secure/asec: 6783016K total, 190356K used, 6592660K available (block size 4096)
Click to expand...
Click to collapse
8- Now you're good to go. Follow the directions as described in Darktremor's thread here:
http://forum.xda-developers.com/showthread.php?t=715116
Click to expand...
Click to collapse
Bonus for the experts
Now you can mount ext3 and ext4 partitions too using kernel mods. You can find them here: http://forum.xda-developers.com/showpost.php?p=12845360&postcount=17
I managed to setup a2sd on ext3 successfully, and planning to test ext4.
Thanks peeter123
Click to expand...
Click to collapse
Hi,
the link to script is broken. please upload it again! thanx!
harrythescorpion said:
Hi,
the link to script is broken. please upload it again! thanx!
Click to expand...
Click to collapse
You seem to have trouble downloading files from the forum. Here you go:
http://www.4shared.com/file/zn2vNQrH/a2sd_enablersh.html
Hi majedev,
thank you. I rooted the phone and followed the way in this thread.
I can mount ext2 (2nd partition of sdcard), but my S5830 seems not running install-recovery.sh at start up. I don't know why... Please helppppppppp
Here's what "cat /system/etc/install-recovery.sh" shows:
#!/system/bin/sh
/system/bin/mount -t ext2 /dev/block/mmcblk0p2 /system/sd
/system/bin/sh /system/etc/init.d/dtapp
/system/bin/sh /system/etc/init.d/99complete
I'm wondering is that any issue that can prevent the install-recovery.sh from running at start up...
devetle said:
Hi majedev,
thank you. I rooted the phone and followed the way in this thread.
I can mount ext2 (2nd partition of sdcard), but my S5830 seems not running install-recovery.sh at start up. I don't know why... Please helppppppppp
Here's what "cat /system/etc/install-recovery.sh" shows:
#!/system/bin/sh
/system/bin/mount -t ext2 /dev/block/mmcblk0p2 /system/sd
/system/bin/sh /system/etc/init.d/dtapp
/system/bin/sh /system/etc/init.d/99complete
I'm wondering is that any issue that can prevent the install-recovery.sh from running at start up...
Click to expand...
Click to collapse
It might be permissions issue? Try "chmod 755 /system/etc/install-recovery.sh"
If that didn't help, please run this command as root to copy "init.rc" to your sd card, then post the file here:
Code:
cp /init.rc /sdcard/
majedev said:
It might be permissions issue? Try "chmod 755 /system/etc/install-recovery.sh"
If that didn't help, please run this command as root to copy "init.rc" to your sd card, then post the file here:
Code:
cp /init.rc /sdcard/
Click to expand...
Click to collapse
thanks~
I checked the permission, it is 755 rwxr-xr-x.
the init.rc is attached herewith.
devetle said:
thanks~
I checked the permission, it is 755 rwxr-xr-x.
the init.rc is attached herewith.
Click to expand...
Click to collapse
Hmm, your init.rc seems fine, it executes install-recovery.sh at boot:
Code:
service flash_recovery /system/etc/install-recovery.sh
oneshot
Could you please type "mount" after mounting your ext2 partition and post the output?
By the way I noticed some differences on your init.rc wlan configuration, what's your firmware?
mount says: /dev/block/mmcblk0p2 /system/sd ext2 rw,relatime,errors=continue 0 0
I saw another thread. It adds "sleep 10" before mounting ext2 so that the sdcard is "ready". And someone said that is not necessary.
I'm really confused.
BTW, my firmware is:
Android version
2.2.1
Baseband version
S5830ZCKC1
Kernel version
2.6.32.9-perf
[email protected] #1
Wed Mar 16 19:45:24 KST 2011
Build number
FROYO.ZCKC1
devetle said:
mount says: /dev/block/mmcblk0p2 /system/sd ext2 rw,relatime,errors=continue 0 0
I saw another thread. It adds "sleep 10" before mounting ext2 so that the sdcard is "ready". And someone said that is not necessary.
I'm really confused.
BTW, my firmware is:
Android version
2.2.1
Baseband version
S5830ZCKC1
Kernel version
2.6.32.9-perf
[email protected] #1
Wed Mar 16 19:45:24 KST 2011
Build number
FROYO.ZCKC1
Click to expand...
Click to collapse
Okay, let's check if install-recovery is actually run at boot. Execute the attached script which will add some checks on boot time, and reboot your phone. Then check if the following files exist and post their contents:
/data/local/tmp/test1
/data/local/tmp/test2
Sent from my HTC HD2 using XDA App. Yvyg hggvhbhggbgggggvb vgghbhvggvbvv556r5rrdvvby6t
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
devetle said:
From the test script, the install-recovery.sh is running!
However, in the install-recovery.sh, the mount says: mount: No such file or directory.
It really looks like I need to add a sleep 10 here...I'll try.
Click to expand...
Click to collapse
Oh, it seems that I have the same thing "mount: No such file or directory" but it works just fine.
I'll consider adding sleep to my script. Thank you for your feedback
Thank you for your help!
Hi majedev,
i have tried running your script and it just runs fine. but still i am not able to see system/sd after rebooting the phone. i have installed darktremors a2sd(by booting into recovey and running update.zip) and the installation went just fine. but still my phone internal memory is showing the same. so what should i try now? i have tried installing recovery.sh that u posted. still doesnt works. i have tried rooting and unrooting the phone and then again tried all the steps but no go.
so please guide me what should i do next? may be flash the firmware? factory reset?
harrythescorpion said:
Hi majedev,
i have tried running your script and it just runs fine. but still i am not able to see system/sd after rebooting the phone. i have installed darktremors a2sd(by booting into recovey and running update.zip) and the installation went just fine. but still my phone internal memory is showing the same. so what should i try now? i have tried installing recovery.sh that u posted. still doesnt works. i have tried rooting and unrooting the phone and then again tried all the steps but no go.
so please guide me what should i do next? may be flash the firmware? factory reset?
Click to expand...
Click to collapse
If you were following the discussion then you most probably have the same problem as devetle did. I've updated the script so it sleeps for 5 seconds after mounting. You may want to redo the guide once again and download the updated script file.
I hope that helps.
I've made the kernel modules for ext3 and ext4. Kernel: 2.6.32.9-perf.
install-recovery.sh:
Code:
#!/system/bin/sh
insmod /system/lib/modules/jbd.ko
insmod /system/lib/modules/jbd2.ko
insmod /system/lib/modules/ext3.ko
insmod /system/lib/modules/ext4.ko
mount -t ext2 /dev/block/mmcblk0p2 /system/sd
/system/bin/sh /system/etc/init.d/dtapp
/system/bin/sh /system/etc/init.d/99complete
Haven't tested it yet, but the modules insmod just fine. And a2sd says ext3 and ext4 are supported.
Maybe someone with knowledge and guts can test it by converting the partition to ext4, so install-recovery.sh becomes:
Code:
#!/system/bin/sh
insmod /system/lib/modules/jbd.ko
insmod /system/lib/modules/jbd2.ko
insmod /system/lib/modules/ext3.ko
insmod /system/lib/modules/ext4.ko
mount -t ext4 /dev/block/mmcblk0p2 /system/sd
/system/bin/sh /system/etc/init.d/dtapp
/system/bin/sh /system/etc/init.d/99complete
Pls don't test it if you have the dalvik cache on your sd. You can end up with an bootloop if it doesn't work.
Hi majedev,
now that worked! now if i run the df command i can see the system/sd that shows me a capacity of approx 964.1123mega bytes, which is the ext2 partition that i created. now the issue is that i cannot see my phone's internal memory increased.
its still the same.
when i run the diskcheck command in a2sd (a2sd discheck) , it says me that:: displaying disc space statistics on sd card :
-h: no such file or directory
/dev/block/mmcblk0p2: 144220k total, 12k used.
and in another of your posts, u have said that if the phone ,memory doesn't increases, try command: a2sd install, which i have also tried and gives me the following output: mv: cant rename ' data/app-private/*' no such file or directory and then it says, time, date, test, expr echo: applet not found etc..
i tried to move the delvik cache to sd card by using the command : a2sd cachesd, and it was successful, the free space increased by like 10mb's. then i ran a2sd check and it also verified the same that the cache is running from sd card. i also trying moving it back to phone, it also worked fine as well.
so where is the glitch? the card is mounted. i am able to see system/sd, i am able to move cache to sd, but still internal memory is showing as 91 mb free??
and moreover my apps and market etc have disappeared? (i have backed then up using titanium bacup, i think ill be able to recover them from there) so what should i do next?
PS: BTW i am using latest beta 4 version 2.7.5.3 of a2sd
harrythescorpion said:
Hi majedev,
now that worked! now if i run the df command i can see the system/sd that shows me a capacity of approx 964.1123mega bytes, which is the ext2 partition that i created. now the issue is that i cannot see my phone's internal memory increased.
its still the same.
when i run the diskcheck command in a2sd (a2sd discheck) , it says me that:: displaying disc space statistics on sd card :
-h: no such file or directory
/dev/block/mmcblk0p2: 144220k total, 12k used.
and in another of your posts, u have said that if the phone ,memory doesn't increases, try command: a2sd install, which i have also tried and gives me the following output: mv: cant rename ' data/app-private/*' no such file or directory and then it says, time, date, test, expr echo: applet not found etc..
i tried to move the delvik cache to sd card by using the command : a2sd cachesd, and it was successful, the free space increased by like 10mb's. then i ran a2sd check and it also verified the same that the cache is running from sd card. i also trying moving it back to phone, it also worked fine as well.
so where is the glitch? the card is mounted. i am able to see system/sd, i am able to move cache to sd, but still internal memory is showing as 91 mb free??
and moreover my apps and market etc have disappeared? (i have backed then up using titanium bacup, i think ill be able to recover them from there) so what should i do next?
PS: BTW i am using latest beta 4 version 2.7.5.3 of a2sd
Click to expand...
Click to collapse
Do you have BusyBox installed?
peeter123 said:
I've made the kernel modules for ext3 and ext4. Kernel: 2.6.32.9-perf.
install-recovery.sh:
Code:
#!/system/bin/sh
insmod /system/lib/modules/jbd.ko
insmod /system/lib/modules/jbd2.ko
insmod /system/lib/modules/ext3.ko
insmod /system/lib/modules/ext4.ko
mount -t ext2 /dev/block/mmcblk0p2 /system/sd
/system/bin/sh /system/etc/init.d/dtapp
/system/bin/sh /system/etc/init.d/99complete
Haven't tested it yet, but the modules insmod just fine. And a2sd says ext3 and ext4 are supported.
Maybe someone with knowledge and guts can test it by converting the partition to ext4, so install-recovery.sh becomes:
Code:
#!/system/bin/sh
insmod /system/lib/modules/jbd.ko
insmod /system/lib/modules/jbd2.ko
insmod /system/lib/modules/ext3.ko
insmod /system/lib/modules/ext4.ko
mount -t ext4 /dev/block/mmcblk0p2 /system/sd
/system/bin/sh /system/etc/init.d/dtapp
/system/bin/sh /system/etc/init.d/99complete
Pls don't test it if you have the dalvik cache on your sd. You can end up with an bootloop.
Click to expand...
Click to collapse
Dude these are hot stuff, I'll give it a shot after finishing my homeworks :'(
But don't you think ext3/4 journaling is too much I/O for sd cards?

ADB Command for install to EXT partition?

So yea, I'm creating a big EXT4 partition on my SD with 1GB swap, I know how to install "ADB INSTALL -s *.apk", but how can I direct that to the EXT4 partition?
you must make folder's symlink first
and it will be automatic
dateno1 said:
you must make folder's symlink first
and it will be automatic
Click to expand...
Click to collapse
any chance you could instruct me a bit on doing so with the symlinks?
using shell @ pm setinsatllpath 2 only places the contents in the FAT32 partition. which is counterproductive. mind you, im running the Evo 3D, which is still locked hboot...... so its temp root only that i can use, with stock kernel... with the .ko not be included for ext2/3/4 on shipped rom?

Idea for creating extra storage space

I have a good 2 GB of space that I am unlikely to use on the /data partition. So I created an 'sdcard' directory in there. What I'm trying to do is trick the system into believing that it's a second SD card. Can android support more than one? It's all good getting the directory to work as a secondary storage place, but the problem is, media scanner will not show pictures/music that are in that directory.
So my question is, is it possible to edit the ramdisk (init.rc) or vold.fstab etc or any other files, so the system is tricked into believing it's an actual storage card? I have tried making symlinks and doing directory bindings from /data/sdcard to /storage/sdcard1, but haven't had any luck.
Edit:
something like this maybe in init.rc??
symlink /storage/sdcard /sdcard
symlink /storage/sdcard1 /data/sdcard
export EXTERNAL_STORAGE /storage/sdcard
export SECONDARY_STORAGE /storage/sdcard1
I'm sure something is possible.
The nicest thing would be to have vold bind-mount a directory or loop-mount a filesystem image, but I'm not sure vold can do that at all and if it can I don't know what the syntax for that would be.
This would probably be a bit different between sense and aosp as it looks like vold is different.
You can easily bind-mount it yourself.
Either way, if you want to mount it on (say) /sdcard2 or anywhere on the root file system, you have to edit the ramdisk in the boot image.
But you can also mount it on top of /sdcard
mkdir /data/extra_sd
mkdir /sdcard/extra_sd
busybox mount --bind /data/extra_sd /sdcard/extra_sd
( ^^^-- I found that /system/bin/mount doesn't do --bind or -o loop and that busybox mount does.)
I tried this and it works. I have not yet experimented with putting it in an init.d script or so to mount it on boot and see if mediascanner scans it.
However, using this method you may corrupt stuff when you USB-mount your sdcard onto your PC. I'm not sure.
-Jobo
I've actually been trying numerous ways of mount bind all day. From init.d to repacking kernels with adjusted init.rc. Nothing worked.
The only way that works is using ScriptManager to run a busybox mount -o bind command at startup. It binds a subfolder in /sdcard/music to /data/media, where I've offloaded 1.5 GB of my music. I've rebooted many times and it seems to mount on time before messing up the media storage, and now I have 1.5 G extra SD space
Well, you could try "partitioning" the phone with LVM.
Which would actually be really interesting. I've got an extra gig of space in each of /system and /data that I'm not using. Being able to span that with /sdcard would be handy.
Actually, with that in place, you could combine /data and /sdcard into a single large partition and then just have both directories on that.
ardax said:
Well, you could try "partitioning" the phone with LVM.
Which would actually be really interesting. I've got an extra gig of space in each of /system and /data that I'm not using. Being able to span that with /sdcard would be handy.
Actually, with that in place, you could combine /data and /sdcard into a single large partition and then just have both directories on that.
Click to expand...
Click to collapse
That would be the ideal solution, which I have been hoping since day 1 becomes available from our phone, but does it not require S-OFF?
djsubtronic said:
That would be the ideal solution, which I have been hoping since day 1 becomes available from our phone, but does it not require S-OFF?
Click to expand...
Click to collapse
I don't think it should, since it's not changing the partition layout of the internal memory itself, just globbing it together and slapping virtual volumes on top with LVM. The biggest things are making sure that the kernel has LVM support and binaries built in and that recovery can get to those LVM binaries.
Perhaps I'm wrong though.
djsubtronic said:
I've actually been trying numerous ways of mount bind all day. From init.d to repacking kernels with adjusted init.rc. Nothing worked.
The only way that works is using ScriptManager to run a busybox mount -o bind command at startup. It binds a subfolder in /sdcard/music to /data/media, where I've offloaded 1.5 GB of my music. I've rebooted many times and it seems to mount on time before messing up the media storage, and now I have 1.5 G extra SD space
Click to expand...
Click to collapse
I really like the idea using data to get some extra space.
I tried "busybox mount --bind" via console and it works. Now i will have a look at ScriptManager.
But what happens if you are installing/updating a new ROM. Do you lose all your things located in /data?
regards
If you format /data then yes, obviously. You are only creating a "shortcut" to /data/folder.
Also, if you run out of space in /data/app/ you can move apps to /system/app instead.
I did that on my blade with a way too big /system/ partition and way too small /data/ partition
djsubtronic said:
I've actually been trying numerous ways of mount bind all day. From init.d to repacking kernels with adjusted init.rc. Nothing worked.
The only way that works is using ScriptManager to run a busybox mount -o bind command at startup. It binds a subfolder in /sdcard/music to /data/media, where I've offloaded 1.5 GB of my music. I've rebooted many times and it seems to mount on time before messing up the media storage, and now I have 1.5 G extra SD space
Click to expand...
Click to collapse
Could I get a hold of that script by chance?
Daiskei said:
Could I get a hold of that script by chance?
Click to expand...
Click to collapse
+1. Yes, please share.
One S | Xparent Blue Tapatalk 2 | Viper 1.2.1 | Bricked Beastmode
So updating a ROM without formating data partition should be no problem.
But for installing a new ROM i have to backup the folder in the data partition.
I tried to use ScriptManager, but this app seems to be bit overloaded.
After this i installed GScriptsLite.
In there i made a new script with something like this:
busybox mount --bind /data/myfolder /sdcard/myfolder
The script is not started automatically after a reboot, but after running the script via GScriptsLite the folder is mounted.
Yeah I suppose it could be difficult if changing ROMs, but I use CM only so I never worry about changing the data partition. But if I do, I just copy the /data/media folder onto my PC using adb pull, then do the wiping/flashing, and finally push the media folder back before booting the ROM.
As for the script, it's essentially just this one line:
Code:
busybox mount -o bind /data/media /storage/sdcard0/Music/Music2
I've kept the script file itself on the /data partition as well. In script manager I've set it to run the script as SU and on boot, and that's it. I've mounted it into a sub folder within Music since I use PlayerPro and it only adds music found within /sdcard/Music.
Yes, ScriptManager is a lot more complicated than GScripts, but it always mounts it automatically on boot so saves the hassle of having to remember to manually run the script if you ever reboot. Plus you only have to sort it out once then never open the app again if you don't want to

[research]Another way to extend /data

In almost mobile ,the /data is too small.Can we use extend tf card instead data to get more space?
I try do something:
use a 8GB tf card,format to ext4.
My device is a tv box,is a android OS device.
It mount tf to /mnt/sda/sda1.
I copy /data all file to it: cp /data/* /mnt/sda/sda1 -rf
Set a flag to check the tf is mount when android start.
touch /mnt/sda/sda1/tf
write a script:/system/etc/install-recovery.sh,This file is run when system start.
#!/system/bin/sh
while [ ! -f /mnt/sda/sda1/tf ]
do
sleep 1
done
mount -o bind /mnt/sda/sda1 /data
Android started,it show /data is 8GB.
But when I install app,reboot device ,i can't see the app,but /data/app have the corresponding apk file,/data/data have the corresponding data file,
and /data/dalvik-cache have corresponding dex file.
What problem happend?
android will search installed app when it starting.
Maybe is search before install-recovery.sh running?
which is the search app? is service installd?

Categories

Resources