Greetings.
I have formatted /mnt/sdcard as EXT2.
How do I setup default permissions (-rwxrwxrwx) for all market apps to use when they create files there?
_______________________________________________
Details:
My device is LG e405 (rooted stock Android 2.3-based firmware, no stable custom ROMs exist for the device)
I cannot use an external SD-card for now and the device has a very small /data partition (150 MB, half of which is used up by stock software)
I would like to have data (photos, etc) AND programs (APKs) on the same partition. I really hate running out of space on one partition when the other one is half-free.
I know that some programs can be "moved to SD", but not only not all of them can be moved - even if they can they still leave some files on /data, and those tend to quickly pile up.
So I formatted /sdcard as EXT2 and symlinked /data/app to /sdcard/dataapp. I now do have everything on one partition.
It works fine, except that normal android programs create files with permissions of "600" ("-rw-------"), which prevents other programs from reading them. So Gallery cannot access photos that Camera just took.
Is it possible to set default permissions for new files?
Thank you very much for your answers!
Related
Hi I am using Modaco Rom 3.1 with A2SD with Ext3.
I am wondering how do I go about extracting application data, such as chat logs from MSN Droid or notes from Ultramate, from the SD card? Where is application data saved on A2SD on android devices and how could I copy them to my computer? I don't want to back up the data, I just want to be able to view them on my computer.
Any help would be greatly appreciated, thanks.
application data is usually stored in /data/data, but could also go to the fat partition of the card (the part you see on your windows pc when you mount the usb storage) if it is larger data (for example trailmaps saves the downloaded ski area maps on the fat partition), because space in /data is limited.
you can pull it via adb pull and then examine the file, afaik these are usually sqlite databases, but that is only afaik and could vary from app to app.
Thanks kendong2 I managed to pull the data.
But out of curiosity, is this /data/data partition part of the phone's memory, or of the SD card's? I can't seem to browse it using a file manager.
And do applications store any data in the Ext3 partition of the SD card?
/data is part of the phone memory, it is readable only by root. get root explorer or any file manager that uses root and you can read it.
only apps themselves are stored on ext, no data. unless you specify it, which would require modifying the apps2sd script (kinda like "data2sd").
Hello XDA,
I've begun flashing ROMs and rooted my device a little under a month ago. From what I've noticed, the system partition on my Samsung Galaxy Ace is usually quite free (40mb+ on most ROMs). However, the /data partition isn't.
I'd like to know if there's a way so I can take some of the space used in the /system partition and add it to the /data partition. I do have Link2SD installed, but the problem is that some apps won't install because there simply isn't enough internal space available. I know that it's possible with other phones such as the LG Optimus, but is there a way to achieve this on our phone?
Thanks! I'm running StockLite v6
Note: The LG Optimus instructions are in the thread "[HOW-TO] Easily resize system + data partitions!" by effortless.
Haven't seen a method to use system partition as data .
But we don't need to do that.As AMARULLZ Scripts(original thread Amarullz Script) does a fine job
It will mount as sd-ext partition as /Data and vice-versa and copies system data to sd-ext(which now points to original internal mem.) so no performance degrade.
DO a nandroid Backup before.
If you have sd -ext partition just disable/uninstall links2sd ,s2e or any other such app and delete their script from init.d folder and reboot you will have no app in your app drawer from sd-ext if you did it successfully.
Now flash This Script.zip.(Mount System)
check you have 40ad2sdx in your init.d
Atleast reboot 2 times for smoother experience.
Now you will have Internal memory equal to sd-ext partition so never run out of memory .
Hi!
I wanted to reformat my internal sdcard to ext4 today to enable trimming (it should also help the /data partition, because it is on the same physical flash storage, right?).
To back up my data I thought about packing everything into a TAR archive to also save all permissions (for example of the ./Android/data/ folder). But now I have the following problem:
if I browse through /storage/sdcard0, I see all the permissions and the correct owners, but I dont have access to .android_secure. I am using a adb root shell, how can I not have access to this?!
if I browse through /mnt/media_rw/sdcard0, I have access to .android_secure, but all the file owners are set to "media_rw", which is not what I want to backup, I need the correct owner info to correctly restore the data later.
Could you please help me to answer these questions?:
As I understand, FAT doesnt support permissions, so how does android emulate the permissions in the ./Android/data folder?
How can I see the same folder (my internal sdcard) with different file owners? Is it mounted twice with special options?
How can I backup my whole sdcard (with owner/group info & permissions & file access dates) to restore everything 1:1 after reformating to ext4?
How do I reformat my sdcard to ext4? (which block device comes after "mkfs.ext4"?)
Thank you very much!!
GridLockFour said:
Hi!
I wanted to reformat my internal sdcard to ext4 today to enable trimming (it should also help the /data partition, because it is on the same physical flash storage, right?).
To back up my data I thought about packing everything into a TAR archive to also save all permissions (for example of the ./Android/data/ folder). But now I have the following problem:
if I browse through /storage/sdcard0, I see all the permissions and the correct owners, but I dont have access to .android_secure. I am using a adb root shell, how can I not have access to this?!
if I browse through /mnt/media_rw/sdcard0, I have access to .android_secure, but all the file owners are set to "media_rw", which is not what I want to backup, I need the correct owner info to correctly restore the data later.
Could you please help me to answer these questions?:
As I understand, FAT doesnt support permissions, so how does android emulate the permissions in the ./Android/data folder?
How can I see the same folder (my internal sdcard) with different file owners? Is it mounted twice with special options?
How can I backup my whole sdcard (with owner/group info & permissions & file access dates) to restore everything 1:1 after reformating to ext4?
How do I reformat my sdcard to ext4? (which block device comes after "mkfs.ext4"?)
Thank you very much!!
Click to expand...
Click to collapse
I'm not sure the answer to some of that, but you don't need ext4 for trimming(EDIT: although I don't know whether android enables trim on FAT) and /data is already ext4 by default. The /data partition is separate to /sdcard0
Most if not all gains from trimming would be made from trimming /system, /data, /cache, and /preload(if you use touchwiz based rom or stock)
Hello!
Few months ago, I rooted my Sony Xperia ZR (C5502) official ROM build 10.7.A.0.222, android version 5.1.1. Yesterday I decided to uninstall all the bloat that came with my device (like Google Play Movies & TV, Google Play Books, Hangouts, etc). I used Titanium Backup to uninstall these system apps. After that, I got lot of free space in my /system partition (around 500 MiB). I wanted to make use of this space by moving some apps installed in phone's internal memory to this /system partition. I used Link2SD's Convert to System App so that these apps move from /data partition to /system partition (I made sure the apps I moved were really installed in phone, and not external SD card's asec).
Now what should have happened is, /system partition should fill up, and memory in /data partition should free up. However, what happened is, /system partition filled, but no memory was freed up /data partition!! I suspected if Convert To System App just made a symbolic link in /system partition, but this wasn't the case. The /data/app/<package> folders for all apps I moved, were gone. I also executed ls -l on /system/priv-app/<package>, but it didn't show up as symbolic link.
I want to know why is the space in /data partition not freeing up? Thanks!
PS: I've also used Link2SD's Integrate update into system function, for those system apps that have been updated. That did free up memory in my /data partition.
Solved
I found the problem. Couldn't find a way to delete this thread so I'll just reply what I found.
Converting user app to system app only moves their apk and lib to /system. app's data and dex still reside in /data partition only, hence the space didn't free as much as I expected. However, I cleared dalvik-cache and then when they were rebuilt/recompiled on next phone restart, I could see a lot more free space in /data partition. This shouldn't happen though since Link2SD delete the old when when I converted and new one was made on phone restart. Maybe it couldn't delete some.
Hi,
I own a HTC One A9s (e36_ml_uhl) and I am running stock firmware, rooted and bootloader unlocked.
I downloaded Titanium Backup (Pro) from Play Store to backup some of my Apps, so far, everything was fine!
I tried Link2SD Apk to "move-link" some of my Apps to an Ext-SD Card (used "Link" method) but it didn't seem to work properly, because when I opened a Linked App to the Ext-SD card this App crashes and close inmediately so I "un-linked" the Apps!
I tried to "restore" my Apps using TiBu but for some reason It was taking tool long (now I know how to avoid this; too late now I guess!) so I "forced" to stop TiBu and "delete" the Backup Folder (bad move my fault!) to install them "fresh" from Play Store or Third Party Source (downloading to the Internal Storage).
SURPRISE!!! FOR SOME REASON I CANNOT INSTALL THE APPS LINKED NEITHER FROM PLAY STORE OR THIRD PARTY SOURCE!!!
I tried to delete all of the remaining Data from those APKs in my Phone (I not sure If I still missing something else to do) but the Play Store still sending the Pop Up Message: "CAN'T INSTALL (Name of the App) - TRY AGAIN, AND IF IT STILL DOESN'T WORK - SEE COMMON WAYS TO FIX THE PROBLEM - SEND FEED BACK - GOT IT", and Apps out of Play Store can not be installed either!
Everything else is working fine just I can't reinstall those specific Apps!!!:crying:
Hope you can help me to figure out how to reinstall the Apps back.
Thank You!
Do a Factory Reset
BTW:
You should have two partitions on your external SD-card and both should be primary:
The first FAT partition is your standard external SD-card storage. The second partition is used by Link2SD for application files and can be ext2, ext3, ext4 or f2fs.
You need to use a non-FAT file system (ext2, ext3, ext4 or f2fs) on your second partition in order to link app's private data files this because the FAT file system (FAT16, FAT32 or exFAT) does not support UNIX file ownership or permissions and will cause a security breakdown of app's private files.
Link2SD does not create the second partition, you need to create it yourself.
[SOLVED] (((Cannot Install APPs))
jwoegerbauer said:
Do a Factory Reset
BTW:
You should have two partitions on your external SD-card and both should be primary:
The first FAT partition is your standard external SD-card storage. The second partition is used by Link2SD for application files and can be ext2, ext3, ext4 or f2fs.
You need to use a non-FAT file system (ext2, ext3, ext4 or f2fs) on your second partition in order to link app's private data files this because the FAT file system (FAT16, FAT32 or exFAT) does not support UNIX file ownership or permissions and will cause a security breakdown of app's private files.
Link2SD does not create the second partition, you need to create it yourself.
Click to expand...
Click to collapse
***Great!! Thanks a lot @jwoegerbauer***
>BTW: I solved the "ïnstall issue" following the instructions of this thread: https://forum.xda-developers.com/showthread.php?t=1219029&nocache=1 :good: