I was wondering how to link .dex files from Dalvik-cache to other locations. Let me explain.
Many ROMs and Kernels move the dalvick-cache to the /cache mount. From what I can tell, this is done by linking the directory from /data to /cache. I was having a problem running out of space in /cache, so I moved it back to /data and moved all my apps to an external mount with apps2sd.
I only have a class to SD card, and would really like to move as much back to main memory as possible, so I would like to select some .dex files to link to the /cache mount. I tried moving the file and creating a symbolic link, but this did not work - the app just crashed when run.
I have tried the link2sd app, but that only allows you to move the files to the card too. These also look like standard symbolic links, so I am not sure why what I am trying is not working.
Any ideas?
Related
I want to install darktremor A2SDExt on my wildfire and am trying to follow the instructions below
http://www.facebook.com/note.php?note_id=158809660835039
I have downloaded the zip from the site but cannot find the partition sd card menu under clockwork recovery 2.5.01 as stated in the instructions. My menu layout is totally different. I have a partitions menu with options
mount /system
mount /data
unmount / cache
unmount /sdcard
mount /sd-ext
format boot
format system
format data
format cache
format sdcard
format sd-ext
mount USB storage
Could someone please walk me through the process of how I partition my sd card for use with darktremor.
Use ROM Manager.
Thanks for the info I used Rom manager and used the default options to partition my sd card which created two partitions I think called EXT and swap. I copied all my stuff back from my computer to SD card. Then I flashed darktremor.zip
I opened up terminal and typed the following
a2sd cachesd (move dalvik to sd card)
and got a whole load of messages saying permission denied. I have definitely got root so wtf? Any ideas where I'm going wrong. I am reading stuff about EXT 3 and EXT 4. I definitely didn't get the option to create anything like that. I don't think my partitions are right
Try typing su before that. It will require superuser access.
Thanks you're the man. It worked.
Wow I have 128 apps installed on my phone including 35 games and still have 102Mb free internal memory .
I (along with other people) find it weird that Asus chose to mount the sdcard to /Removable/MicroSD instead of the traditional /mnt/sdcard.
I would like Titanium Backup to store the files on my sdcard instead of the internal memory, but the problem is that TI only checks the /mnt/sdcard directory. So in my infinite geek knowledge I had the idea to symlink /Removable/MicroSD/TitaniumBackup to /mnt/sdcard/TitaniumBackup. The problem is that FAT32 doesn't support symlinks, so I formatted the sdcard to NTFS and popped it back in but it wouldn't mount it, which I realized was because it doesn't have the NTFS modules. So I popped it back out and formatted it as ext2, but it still wouldn't mount automatically and I couldn't mount it manually because I didn't know what the device name was.
Anyone have any solutions?
You can try ask the developer of TitaniumBackup to include support for asus TF.
Obviously I already did that but I'm looking for a fix on my end.
As with most other tablets, the internal SD is mounted to mnt/sdcard so external SD has to be mounted elsewhere.
As far as TB goes, you can choose where to store backups. Have currently got it setup to backup to Removable/MicroSD/TitaniumBackup
EDIT: If you go into TB preferences menu, scroll down to Backup folder location, then press the Back icon (the system one) to get back to the root folder. Then you can choose the Removable/MicroSD/ folder. Click on "create a new folder", call it what you want, then open that folder. Click the "Use current folder" button and there you go...Backup folder on external SD!
Took me a while to realise that the back icon took you back up the folder tree, rather than closing the folder location window!
It would be nice if we could get a custom mount script or something that would mount the sdcard to something like /mnt/sdcard/music. I'd love to have my music synced to card and everything else stored internally...
fisha21 said:
EDIT: If you go into TB preferences menu, scroll down to Backup folder location, then press the Back icon (the system one) to get back to the root folder. Then you can choose the Removable/MicroSD/ folder. Click on "create a new folder", call it what you want, then open that folder. Click the "Use current folder" button and there you go...Backup folder on external SD!
Took me a while to realise that the back icon took you back up the folder tree, rather than closing the folder location window!
Click to expand...
Click to collapse
Thanks! Thats what I needed to know, I was thinking its kind of stupid that they only have a "detect" button.
brando56894 said:
I (along with other people) find it weird that Asus chose to mount the sdcard to /Removable/MicroSD instead of the traditional /mnt/sdcard.
I would like Titanium Backup to store the files on my sdcard instead of the internal memory, but the problem is that TI only checks the /mnt/sdcard directory. So in my infinite geek knowledge I had the idea to symlink /Removable/MicroSD/TitaniumBackup to /mnt/sdcard/TitaniumBackup. The problem is that FAT32 doesn't support symlinks, so I formatted the sdcard to NTFS and popped it back in but it wouldn't mount it, which I realized was because it doesn't have the NTFS modules. So I popped it back out and formatted it as ext2, but it still wouldn't mount automatically and I couldn't mount it manually because I didn't know what the device name was.
Anyone have any solutions?
Click to expand...
Click to collapse
What? You're doing it backwards!
If TI is writing to /mnt/sdcard/TitaniumBackup, but you want it to write to /Removable/MicroSD/TitaniumBackup instead, then /mnt/sdcard/TitaniumBackup should be the symlink, pointing to a directory on the SD card!
The target's filesystem doesn't matter (fat32), only the source's (i.e. ext4 on the internal storage).
Good catch, either way it doesn't matter now because I don't need symlinks since I know how to do it in TB now.
As far as I get it , data2sd makes the some see a folder named data on your ext partition on your sdcard as a /data partition, and the phone sees it thus way and all installed apps go there.
apps2sd make symlinks of your apps to a "data" folder in your ext partition on your sd card. The ROM does not see this free space, and apps are moved to sdcard and symlinks are created upon reboot.
So both ensure the same, ore space for your apps, but what are the pros and cons of each one...
Please, correct me if I am wrong about my assumptions about how these apps work.
After a few days of googling, i stumbled upon a thread in Droid DNA forum. Which led me to this answer right from the source on why it's not possible to mount our SD Card or actually, just a folder in /data, in TWRP.
Just wanted to share and hope this will clear things up and hoping that people won't wipe their /data partition since it will delete the SD Card folder as well.
I find this very enlightening so read on.
What is a data media device?
I'm writing this page because there seems to be a lot of confusion about how many of the newer Android devices work. Starting in Honeycomb 3.0 with the Xoom, Google changed the way that they handled storage. Instead of having a "data" partition with your apps and a separate "sdcard" partition for storage, Google started giving you a single, very large data partition. Inside /data is a folder at /data/media that contains all of the contents of what you think of as your internal sdcard.
Since /data/media is part of /data, we pretty much never actually format the data partition. Formatting data, of course, also removes the media folder that contains the internal sdcard. When you choose a factory reset, instead of formatting, we use rm -rf commands to remove all the folders except for the media folder so that we can remove all of your apps and settings while leaving your "sdcard" intact. In TWRP we also have a wipe internal storage option that rm -rf's the media folder and a "Format Data" option that formats to recreate the entire file system in case something goes completely wrong or to remove device encryption.
When you're booted to Android, Android fuses the media folder to /sdcard and emulates a FAT files system that doesn't have permissions for legacy apps. We don't currently have fuse in recovery, so we just add an extra mount command to mount /data/media to /sdcard so in recovery you still have to worry about permissions on /sdcard.
Because the "internal sdcard" is not a true FAT file system, you can't mount it via USB storage. Well, that's not technically true, but the vast majority of people use Windows computers and Windows doesn't recognize ext4. If we were to allow you to mount the data partition via USB storage, Windows would claim that the device wasn't formatted and offer to format it for you, which, as you can imagine, would be a disaster. The whole ext4 setup is another reason that Android switched to using MTP for transferring files. Most of these devices don't have the necessary kernel configuration to even support USB storage mode, so it's not very easy to enable USB storage if we even wanted to try. Unfortunately at this time, MTP isn't available in recovery, so if you have no other option, you will have to use adb to push and pull files to/from your device.
As a special note, if you choose to do a factory reset from your ROM, even if the ROM says that it will wipe everything including the internal storage, well, that's not what TWRP will do. A stock AOSP recovery would format data including the "sdcard" but TWRP will use its regular factory reset setup that leaves the internal storage intact.
There are a couple of nice gains with using this setup vs the old data + FAT storage partition. With /data/media you, as the user get more control over how you use your storage. If you have a ton of apps, then that's no problem since you have a huge data partition to work with. If you don't have a lot of apps, you get more room to use for storing things like movies. Further, ext4 doesn't suffer from the 4GB file size limit that FAT has, so you can have a large, high-def movie on your device if you like. I'm sure another motivating factor was to get Android away from using FAT which is a Microsoft creation. Performance on ext4 in Android is also probably better than FAT. As a downside, data media devices tend to store a lot more app data in the "data" section and so backups on these devices tend to be larger.
Android 4.2 has changed things with /data/media devices a little bit due to the multi-user support that came in 4.2. Each user is assigned a subfolder in /data/media. The main user gets /data/media/0 and subsequent users get /data/media/10 and /data/media/11 and so on. If you switch users in Android 4.2, the system will remount the /sdcard folder to point to the proper user's folder. TWRP has been updated to use the /data/media/0 folder starting in 2.3.2.0.
Another "feature" of 4.2 is that when you "update" to 4.2 it may attempt to upgrade your /data/media to multi-user. If you're running an older version of TWRP than 2.3.2.0 or newer, a factory reset may trigger multiple upgrades, causing your "sdcard" to get moved to /data/media/0 then /data/media/0/0 and then /data/media/0/0/0 and so on depending on how many times you "upgraded". This may cause backups to not be visible in TWRP. Also, there currently isn't a good way to go back to a 4.1 ROM after using a 4.2 ROM without having to manually move your files around.
Click to expand...
Click to collapse
http://teamw.in/DataMedia
I asked them if it's possible to just mount the ext4 partition if Windows users install some apps that can read them. Will see if they're going to answer.
Hope this helps. Cheers.
I am looking for a script that basically covers the Link2SD functionalities. But using mounts instead of links. I actually made one for GB that worked up to KK, but now Lollipop is behaving in some weird ways regarding binding mounts. I also tried Mounts2SD (the apk) and I get the same results.
To make things a bit more clear, I'd like to be able to at least mount /sd-ext/dalvik-cache over /data/dalvik-cache, where /sd-ext is the mount point for the second partition (in ext4 format) of the external SD card. Does anyone use/know about a working script for 5.1.1?
I'm using FolderMount from the PlayStore. Didn't try the dalvik cache but for normal sdcard -> ext-sdcard its working perfectly.
Well, yes, FolderMount helps with games or any other app with large obb data. I use it indeed. But I need to move stuff from /data to the external 2nd partition because 5GB with Lollipop 5.1.1 are not really much. Especially considering that after 3.70GB one starts to get the annoying notification about low internal memory.
Yes my comment is stupid, you need a script which is doing this before any app startup because dalvik is the optimization for these.
Just an idea not sure if init.d is executed in the right time. But if your rom has init.d enabled (not emulation, real init.d) then you can put a script in /etc/init.d which does the mount job.
That's what I need. As I wrote I made that script already on GB and recovered it for KK. Just a couple of modifications and it was up and running again.
The problem is that with Lollipop Android keeps an hold of the original /data and all its subdirectories. So whatever I mount doesn't matter to it, it still keeps using the /data folders as if nothing happened. So I wondered if anyone had found a solution for it and made a new script 5.1.1 ready.
Ok, it's probably impossible to do (unless of having access to the kernel RAM disk). I've found out that the issue could be related to the separated mount namespaces. There is an option in SUperSU and I disabled it. After mounting the directory and starting ART it crashes badly, rebooting the phone (kernel included I believe).