Pull App2SD Application Data? - Hero, G2 Touch Q&A, Help & Troubleshooting

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").

Related

Important and read re: Recoveries

our device is a data/media device which is why usb mount don't work
here's a link that explains it all
http://teamw.in/DataMedia
and part of the convo with dees_troy is below
<Dees_Troy> Nope, it will *never* work on a data/media device
<Dees_Troy> read and learn: http://teamw.in/DataMedia
<WinBot> [Link] http://tinyw.in/lstO :: What is a data media device? | TeamWin
<Dees_Troy> definitely worth understanding
<Dees_Troy> at some point we're going to try to kang in MTP for recovery
<Lloir> so for now then it's sideload or from inside the rom
<Dees_Troy> or adb push
<Lloir> aye
<Dees_Troy> or gtfo
<*****> so cant mount usb storage with newer devices...hmm one x did guess this is where confusion at least on my part came to be
<Lloir> lmao Dees_Troy
<Dees_Troy> one x wasn't a data media device
YOU MUST either transfer the rom\boot\porn\audio\mods while the phone is on or use adb push or even sideload when in recovery, THIS IS THE ONLY way
What is a media device?
Thanks, I have copied the text from the link for easy reading.
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.
Click to expand...
Click to collapse
any guide how to put a file on phone if it does not boot? (ie adb push or while in recovery please)
Not so bad, i can live with that
(P.s.: Lloir i've ended the script, now it's working! )
thanks dude

[Q] Setting default file permissions on ext2 /sdcard

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!

[Q] How To Recover Data From Android Media Partition when data is invisible

Things had been going good for a couple months, and my internal media had been intact on my Nexus 5 for almost a year. So, after backing up kitkat using twrp, and installing the lollipop developer preview, everything was going fine. But after rebooting twice I found out that my data/media and /sdcard/ were empty, and es file explorer said that my data (nexus 5 doesnt have an sdcard, so es file explorer just looks at the sdcard folder) partition was almost full. So then I installed kitkat again after not being able to copy anything to my sdcard folder, and it created all new folders and everything, but es file explorer still says the data is their. Then, I used disk digger and it recovered all the photos and mp3 files from the data partition that dissapeared. But, what's really important to me is things like my backup, and the titanium backup files so I can have all my data from my apps.
IS THERE ANYWAY TO RECOVER ANY KIND OF FILE, I'VE DONE IT WITH MY COMPUTER WITH PROGRAMS LIKE RECUVA, BUT ANDROID PROGRAMS ONLY RECOVER PICTURES AND MUSIC FILES!? ANYWAY TO RECOVER TITANIUM BACKUP FILES FROM A PARTITION WHERE THE DATA IS STILL THERE TAKING UP SPACE, BUT JUST INVISIBLE?!
How To Recover Data From Android Media Partition when data is invisible
There are ways to recover data from Android media Partition without using any special tools. Contact us for further details.
jeyaram06 said:
There are ways to recover data from Android media Partition without using any special tools. Contact us for further details.
Click to expand...
Click to collapse
Sorry to bother you, but did you get my message?
@jeyaram06 how do I recover my data without special tools?

Problem with sdcard backup

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)

[PROBLEM] (((Link2SD & Titanium Backup - Cannot Install APP's)))

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:

Categories

Resources