Cyanogenmod Virtual SDCard different from stock - One (M7) Q&A, Help & Troubleshooting

Hello all,
After switching to cyanogenmod, I noticed that items are stored in a different directory. This resulted in a complete data loss on first boot. I was able to move over some folders from /system/media to get my data back, but it seems that these directories are somehow linked. (Deleting files/folders from one deletes the others)
What is the best way to correct this and get rid of these oddities?
I am fairly adept with ADB commands, so I just need to know why this issue exists, and if I need to somehow remove some symlinks.

Related

Getting rid of PKG's

I understand that the solution to this question may already exist in the forums, however, I did check high and low for it, and was unable to locate one.
Here goes:
I like (as I'm sure others do) to install apps2sd, something I'm able to do thanks to the actively-rooted and cyanogen-modded N1 that I use.
Unfortunately, the actual *install* files *themselves* from all Market-downloaded apps seem to remain in the phone's internal memory, clogging up preciously limited space. How do I get rid of these install files? I tried using a file manager to go into the mnt/asec directory to get rid of *.pkg's, but these seem to be uninstall-protected (I'm not even sure if I'm making a mistake from the get-go in trying to purge the *.pkg's), so I'm kind of back to the drawing board on this one.
Any help on this would be pretty invaluable folks.
Thanks,
Eli
If you've installed a lot, your dalvik cache will grow pretty big. That's found in /data/dalvik-cache.
Thanks Rusty - but my /data dir is completely empty (unless there are invisible folders; if there are, who you know how I can make them visible?).
Best,
Eli
You need SU access to view /data, make sure what you're using to browse it supports that.
Ahh, thanks Rusty - will do that
Your DATA folder is inaccessible, unless you use Root Explorer or other file explorer with root privileges (ES Explorer, for example - but it doesn't work with all ROMs).
There are no PKGs. There are APKs. And you're wrong in your assumption that they aren't used. This is no PC, this is Android, forget what you used to know, you need to learn again. APKs are the actual applications being ran, without them you can't execute anything, and using old Apps2SD, AKA Apps2EXT, you can move your /data/data to SD (EXT partition) and /data/dalvik-cache to /cache. CM doesn't support Apps2EXT, but it can be easily installed and used, following the guide in DarkTremor's thread. Read Wiki in my sig, it'll point you in the right direction. You can start by reading FAQ, question 9.
seekingandroid said:
I understand that the solution to this question may already exist in the forums, however, I did check high and low for it, and was unable to locate one.
Here goes:
I like (as I'm sure others do) to install apps2sd, something I'm able to do thanks to the actively-rooted and cyanogen-modded N1 that I use.
Unfortunately, the actual *install* files *themselves* from all Market-downloaded apps seem to remain in the phone's internal memory, clogging up preciously limited space. How do I get rid of these install files? I tried using a file manager to go into the mnt/asec directory to get rid of *.pkg's, but these seem to be uninstall-protected (I'm not even sure if I'm making a mistake from the get-go in trying to purge the *.pkg's), so I'm kind of back to the drawing board on this one.
Any help on this would be pretty invaluable folks.
Thanks,
Eli
Click to expand...
Click to collapse
1) The .apk isn't the install file it _is_ the application. The are no "install only" parts to an android app
2) Anything on /mnt/asec is already on your sdcard using froyo-style a2sd
3) .so files in /data/data/xxx/lib and /data/dalvik-cache are the primary causes of full /data partitions

[Q] Restoring contacts from a Nandroid backup

Hello,
I recently decided to update my ROM, radio, etc. I had previously had an Eclair rom. I updated the radio, and all other assorted stuff and flashed to a EZgingerbread rom.
In my zeal, I neglected to export a copy of my contacts. I did, however, remember to make a Nandroid backup of my old eclair rom.
So, I attempted to follow some tutorials in copying the file
/data/data/com.android.providers.contacts/databases/contacts2.db
using the adb command
cat /sdcard/contacts2.db > /data/data/com.android.providers.contacts/databases/contacts2.db
from my old backup to the corresponding folder on my phone. However, the phone does not show my contacts, as it seems to reformat the contacts2.db when I reboot the phone, as evidenced when I take a look at the db file on the phone.
Help is appreciated, thanks!
Small edit: I tried restoring the backup, but it gets stuck at the G1 boot screen, reboots, and shows the g1 screen again. So I can't extract my contacts that way. Probably because I loaded a new radio/hboot?
One Question! You have GMail Account Tied to G1, right? All your contacts should be saved in that GMail Account.
You might try performing this same copy while in recovery mode,
so that the overwrite of the file with the 'live' database doesn't happen on reboot.
GiantCrab said:
Hello,
I recently decided to update my ROM, radio, etc. I had previously had an Eclair rom. I updated the radio, and all other assorted stuff and flashed to a EZgingerbread rom.
In my zeal, I neglected to export a copy of my contacts. I did, however, remember to make a Nandroid backup of my old eclair rom.
So, I attempted to follow some tutorials in copying the file
/data/data/com.android.providers.contacts/databases/contacts2.db
using the adb command
cat /sdcard/contacts2.db > /data/data/com.android.providers.contacts/databases/contacts2.db
from my old backup to the corresponding folder on my phone. However, the phone does not show my contacts, as it seems to reformat the contacts2.db when I reboot the phone, as evidenced when I take a look at the db file on the phone.
Help is appreciated, thanks!
Small edit: I tried restoring the backup, but it gets stuck at the G1 boot screen, reboots, and shows the g1 screen again. So I can't extract my contacts that way. Probably because I loaded a new radio/hboot?
Click to expand...
Click to collapse
IANADBA, but you're probably running into an incompatibility in the data structures between the .db files. I'll bet the db versions between Eclair (I don't even remember what Android version that is) and GB are quite different. You might be able to get away with dumping the data from one and loading it into the other using an appropriate sqlite app.
Of course, there may be an very easy way I'm not aware of, in which case I am prepared for maximum flamage.
Jeff

[FIXED] [Q] XT860 - Broke my /system/app folder...

EDIT: Fixed! Procedure I used was to download Danifunker's system dump, move it to /sdcard/ via adb push, then run the following:
Code:
adb shell
su dd if=/sdcard/mmcblk1p21.img of=/dev/block/mmcblk1p21
This completely refreshed my /system folder. Original post below:
--------------------------------------------------------------
Hello XDA forumgoers, longtime reader first time poster here. I'm currently posting because I made a few mistakes. Several mistakes, actually.
1. In my quest to de-bloat my XT860, I accidentally removed one file too many, which caused my phone to mysteriously not have a cell signal. (com.motorola.service.main kept crashing.) So I hit the forum and grabbed a system dump from this thread (thanks Willis111):
http://forum.xda-developers.com/showthread.php?p=17501981
I had bought the phone with some version of Cyanogenmod Recovery installed by the previous owner, so I was able to use that and ADB to stick the .apks and .odex files in the /system/app folder, chmod 644 them, and even factory reset for good measure.
2. As I soon found out, I had somehow made things worse. The phone, when boot into, shows the "press android to begin" page, but com.motorola.service.main and some other apps keep FCing on me, and I can't progress past that screen. In my haste, I didn't backup any of my system folders at all, though, I still backed up my apps with Titanium.
Tl;dr:
presumably none of the /system/app apks boot, most notably com.motorola.service.main. How do I fix this? Can I?
Try to flash
http://forum.xda-developers.com/showthread.php?t=1288823
You also need to chown 0:0 both the apk and the odex
Have you tried using my original system dump? It was taken with dd, so things like symlinks and the other sort should be functional. The only caveat is that a number of apps were frozen at the time, so you may need to unfreeze them with titaniumbackup.
http://www.multiupload.com/SORQERFAYT
DoubleYouPee: Is this that chinese rom I've heard of? I heard that if I flash this, I can't root my phone. So I think I'll save this one as a last resort.
eww245: chown'd, no result.
daniflunker: how do I open this?
jonsicoli said:
DoubleYouPee: Is this that chinese rom I've heard of? I heard that if I flash this, I can't root my phone. So I think I'll save this one as a last resort.
eww245: chown'd, no result.
daniflunker: how do I open this?
Click to expand...
Click to collapse
What about rootkeeper?
DoubleYouPee said:
What about rootkeeper?
Click to expand...
Click to collapse
I can't get past the "click android" screen, so I probably can't install or run it. Any way to do it via adb or Cyanogenmod Recovery?
I really appreciate the help.
jonsicoli, if you want to restore your *entire* /system folder (not just apps) you would run a similar command-set as this.
1. Copy the file to the internal memory
adb push c:\path.to.folder\mmcblk1p21.img /sdcard
the file will be located in the root of the sdcard (or you could drag and drop the file in USB storage mode)
2. Do a full restore on system memory *I have not checked to ensure this is working... but a command similar to this should work
adb shell
su dd if=/sdcard/mmcblk1p21.img of=/dev/block/mmcblk1p21
- wait -
(it would have to write about 500mb and replace all of the contents of /system )
reboot
_______________________________________________________
Okay, if you just want to look at the files, you could use a linux machine to mount the filesystem (it is a standard ext3 FS) or you could do what I have done on my windows system:
Install EXT2FsD from http://sourceforge.net/projects/ext2fsd/files/latest/download?source=files
Then install OSFMount from http://www.osforensics.com/tools.html
Point the OSFMount program to the img file that you downloaded and assign it a drive then voilla!
I am pretty sure this is a bit of overkill, but this should completely restore your system close to factory (minus the APKs that were upgraded/disabled, plus the fact root was done)
Thanks Danifunker! I reset my entire /system folder, and restoring my user app backup. I'm just relieved to have my phone back. Now to mark this thread as solved.
Awesome!!!!!! Glad to hear my system dump works! Thanks for testing
My command lines were written correctly also I guess?
Sent from my XT860 using XDA App
searched for like 8 hours until i found this thread. Just what i needed, i had system image for 2.3.6 from your other post but no command.

Can't move TWRP folder off phone

I recently unlocked my bootloader using sunshine and installed TWRP. After rebooting into recovery, I immediately made a backup of my phone. When I plug my phone in, I can see the TWRP folder, but it shows as empty. None of my file explorers can see anything, either. TWRP, however, is able to see it when I go into the file manager. I can't get ADB to see the device when hooked up to my computer while in TWRP. MTP also doesn't work. Chmod 755 and 777 doesn't do anything. I was able to initially copy the TWRP folder into the downloads folder in the TWRP file manager, but now it just hangs there if I try to move it again.
How do I get access to my backup?
evanft said:
I recently unlocked my bootloader using sunshine and installed TWRP. After rebooting into recovery, I immediately made a backup of my phone. When I plug my phone in, I can see the TWRP folder, but it shows as empty. None of my file explorers can see anything, either. TWRP, however, is able to see it when I go into the file manager. I can't get ADB to see the device when hooked up to my computer while in TWRP. MTP also doesn't work.
How do I get access to my backup?
Click to expand...
Click to collapse
http://forum.xda-developers.com/droid-turbo/help/twrp-backup-file-location-t3259060
6Binford said:
http://forum.xda-developers.com/droid-turbo/help/twrp-backup-file-location-t3259060
Click to expand...
Click to collapse
Unfortunately, there aren't any solutions in that thread.
evanft said:
Unfortunately, there aren't any solutions in that thread.
Click to expand...
Click to collapse
There are two solutions in the first 4 posts:
ruledrbrt1 suggests http://forum.xda-developers.com/showpost.php?p=64048593&postcount=2
And GeoFX has the great : http://forum.xda-developers.com/showpost.php?p=64049328&postcount=5
Both work on my phone so they should work on yours too.
Have you given file explorer root privileges?
josephpalozzi said:
There are two solutions in the first 4 posts:
ruledrbrt1 suggests http://forum.xda-developers.com/showpost.php?p=64048593&postcount=2
And GeoFX has the great : http://forum.xda-developers.com/showpost.php?p=64049328&postcount=5
Both work on my phone so they should work on yours too.
Have you given file explorer root privileges?
Click to expand...
Click to collapse
I didn't even see GeoFX's post for some reason. That looks like it worked. Thanks!
TWRP and NAND Backups
I had the same question, and found the previous thread too. So what's the difference between these 2 locations?
/data/media/0/TWRP
and
/sdcard/TWRP
From my point of view, they are duplicates - same data in both folders, just duplicated into separate partitions. If this is true, then my 7.5 GB NAND backup, is really taking up 15GB of memory. Can that be true? I'm doubting it, but you never know.
I started to dive into this, because I was also wondering if NAND backups made copies of my media or not (photos, music, etc). After digging into it a bit, it looks like it does NOT make a backup of anything in the root folder "/data/media" in order to prevent it from non-stop backing up in a loop (you can't back up the location your backing up to, at the same time). This is also noted on github: https://github.com/TeamWin/Team-Win-Recovery-Project/issues/276 Logically, this would make sense since I currently have 25 GB of data in my /sdcard/ location. That's one helluva compression if you were able to get this down to 7.5GB! So I'm guessing this isn't included, which is also why I'm guessing that these are really the same. /sdcard/ must be a shortcut to the /data/media/0/ location, that's my best understanding.
So my original question still stands. What's the reason for these 2 locations, and is there a difference?
This also brings up the next question, what's the best way to make an all-encompassing backup? NAND + Titanium Backup + copy all the contents of your /sdcard/ over to your computer (or OTG drive)?
Florestan2 said:
I had the same question, and found the previous thread too. So what's the difference between these 2 locations?
/data/media/0/TWRP
and
/sdcard/TWRP
From my point of view, they are duplicates - same data in both folders, just duplicated into separate partitions. If this is true, then my 7.5 GB NAND backup, is really taking up 15GB of memory. Can that be true? I'm doubting it, but you never know.
I started to dive into this, because I was also wondering if NAND backups made copies of my media or not (photos, music, etc). After digging into it a bit, it looks like it does NOT make a backup of anything in the root folder "/data/media" in order to prevent it from non-stop backing up in a loop (you can't back up the location your backing up to, at the same time). This is also noted on github: https://github.com/TeamWin/Team-Win-Recovery-Project/issues/276 Logically, this would make sense since I currently have 25 GB of data in my /sdcard/ location. That's one helluva compression if you were able to get this down to 7.5GB! So I'm guessing this isn't included, which is also why I'm guessing that these are really the same. /sdcard/ must be a shortcut to the /data/media/0/ location, that's my best understanding.
So my original question still stands. What's the reason for these 2 locations, and is there a difference?
This also brings up the next question, what's the best way to make an all-encompassing backup? NAND + Titanium Backup + copy all the contents of your /sdcard/ over to your computer (or OTG drive)?
Click to expand...
Click to collapse
The way I understand it, and I might be wrong, is that before Android 4.0 (or maybe 5.0), the partition containing user data was called /sdcard and apps were stored in a separate partition. The partition where apps went was significantly smaller, which could result in people running out of space for apps while still having a ton of free user data. To remedy this, the newer version of android places apps and user data in the same partition (called media). The /sdcard that you see is a symlink (shortcut) to this new partition, and is included so that older apps that were designed to expect the /sdcard partition to be there will still work.

Extreme Debloating

Hello guys!
I've rooted my Z without unlocking the bootloader, so I cannot install a custom recovery. This left me with just the choice to debloat the hell out of the stock rom LP 5.1.1.
So far I've managed to lower the number of system apps form 274 to 70!
I've been looking into the system and found two folders:
- odex.app folder
- odex.priv-app folder
Please note that both folders have the odex. extension, so I'm not talking about the folders without it.
Whenever I try to delete files or folders inside these I get the error that it's a read-only file. I've mounted the system partition to rw in terminal and adb, but I still get the same error.
Are those folders read-only all the time or I'm doing something wrong?
On another level, is there a way of completely disabling some hardware components that I never use like Bluetooth, radio, NFC, DLNA, GPS, camera?
The closest thing I got was a code to disable the GPS from booting in build.prop, but I was looking for something more permanent.
I was hoping there may be a command similar to "pm hide" or "pm disable" for hardware features.
xzdualrecovery - twrp on locked bootldr

Categories

Resources