[MOD] Android MTP <-> Mass Storage - Galaxy S III Themes and Apps

Today i found how to change from Android MTP <-> Mass Storage and i want to share it with you....
rom android ICS supports MTP.
Let's modify the way the Mass Storage Gingerbread.
overlay / frameworks / base / core / res / xml / storage_list.xml is
<StorageList Xmlns:android="http://schemas.android.com/apk/res/android">
<! - Removable is not set in nosdcard product ->
<Storage android: mountPoint = "/ mnt / sdcard"
android: storageDescription = "@ string / storage_usb"
android: primary = "true"
android: emulated = "true"
android: mtpReserve = "100" />
</ StorageList>
Replace as follows.
<StorageList Xmlns:android="http://schemas.android.com/apk/res/android">
<! - Removable is not set in nosdcard product ->
<Storage android: mountPoint = "/ mnt / sdcard"
android: storageDescription = "@ string / storage_internal"
android: primary = "true"
android: emulated = "false"
android: allowMassStorage = "true" />
</ StorageList>
init. [PRODUCT_NAME]. rc
Delete the relevant portions of fuse.
on post-fs-data
# We will remap this as / mnt / sdcard with the sdcard fuse tool
mkdir / data / media 0775 media_rw media_rw
chown media_rw media_rw / data / media
on fs
mount ext4 ...
mount ext4 ...
mount ext4 ...
setprop ro.crypto.fuse_sdcard true
# / Sdcard
export EXTERNAL_STORAGE / mnt / sdcard
mkdir / mnt / sdcard 0000 system system
symlink / mnt / sdcard / sdcard
# Create virtual SD card at / mnt / sdcard, based on the / data / media directory
# Daemon will drop to user / group system / media_rw after initializing
# Underlying files in / data / media will be created with user and group media_rw (1023)
service sdcard / system / bin / sdcard / data / media 1023 1023
class late_start
init. [PRODUCT_NAME]. usb.rc
on property: sys.usb.config = mtp
write / sys/class/android_usb/android0/enable 0
.
.
setprop sys.usb.state $ sys.usb.config
on property: sys.usb.config = mtp, adb
.
.
start adbd
Replace the mass_storage mtp.
And vold.fstab create
# # Vold 2.0 Generic fstab
# # - San Mehat ([email protected])
# #
# # # # # # # # # # # # # # # # # # # # # # #
# # Regular device mount
# #
# # Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
# # Label - Label for the volume
# # Mount_point - Where the volume will be mounted
# # Part - Partition # (1 based), or 'auto' for first usable partition.
# # <sysfs_path> - List of sysfs paths to source devices, must start with '/' character
# # Flags - (optional) Comma separated list of flags, must not contain '/' character
# # # # # # # # # # # # # # # # # # # # # #
dev_mount sdcard / mnt / sdcard auto [vfat mount to node] nonremovable, encryptable
And in BoardCongig.mk or device.mk vold.fstab adds a sentence to copy.
PRODUCT_COPY_FILES + = \
device/hardkernel/odroida4/vold.fstab: system / etc / vold.fstab \
.
changes to the mass_storage persist.sys.usb.config = mtp.
# Set default USB interface
PRODUCT_DEFAULT_PROPERTY_OVERRIDES + = \
persist.sys.usb.config = mass_storage
With this modification, the ICS can also view the screen of Gingerbread.
http://2.bp.blogspot.com/-_9MoNaQ_E...hILKRpQBfP8/s320/device-2012-02-09-161336.png
Source
http://translate.googleusercontent....e.html&usg=ALkJrhgLPt0s-kDOWu4TtP7Tbdw4Vvxu5g

.
wow looks really great. Can you share files you describe ?

Excuse me sir this step is for adb?
Thx^^
Sent from my GT-I9300 using xda premium

Hello,
Does it work to the intern memory of Galaxy S3 ?!

Please make a cwm zip.
Sent from my GT-I9300 using XDA

okpc said:
Please make a cwm zip.
Click to expand...
Click to collapse
+1 please!

winwiz said:
+1 please!
Click to expand...
Click to collapse
+1 too...

Woooowww!! Make a flashable zip.. you would be a hero!
sent from Omega S3-siyah-OC-UV

+1 too please.
As soon as possible mate. I flashed the latest samsung rom and cause of that it deleted my backups (what a dumb i am ) on my internal sd-card. And now im not able to recover them, thats why i need ur fix so badly.

hi really looking forward to flashable zip for CWM...are you working n it or just have to wait for ROM cookers? THX if this will wor youre superhero waiting for this badly since bought SGS3

You should better ask for the cwm zip to the orginal dev of this mod. See bottom of first post...

I asked the original developer for all of us. Now lets hope for a quick response.

my apologist to every one
i am sorry for all i am a developer i just want to share this information and i kept the source if any of sgs3 kernel developers can help that set
there is two parts of modification first one on storage_list.xml in the framework-res.apk i do it but the second one in two files under root need to be change by kernel builder i cant do it the files name is init.smdk4x12.rc and init.smdk4x12.usb.rc
my apologist to every one
thanks for understanding

hani1980 said:
i am sorry for all i am a developer i just want to share this information and i kept the source if any of sgs3 kernel developers can help that set
there is two parts of modification first one on storage_list.xml in the framework-res.apk i do it but the second one in two files under root need to be change by kernel builder i cant do it the files name is init.smdk4x12.rc and init.smdk4x12.usb.rc
my apologist to every one
thanks for understanding
Click to expand...
Click to collapse
It's ok mate, nobody is a pro here
Somebody might help

From the link attached, I don't think this mod is to enable UMS on internal SD on the S3. And I personally believe that it can't be done just as it was the case in the Galaxy Nexus. This is because the shared storage structure introduced in the Galaxy Nexus and Samsung followed that in S3. What happened is that the /data and /sdcard mount points are in the same partition. However, UMS requires that the partition to be mounted as UMS cannot be mounted by any other app. Therefore, you cannot just unmount /data so that you will get UMS on /sdcard; Android won't be able to function. This is a design choice made by Google and I don't think we will ever get UMS on sdcard. (If there was a way, Galaxy Nexus would be able to do it already)
Anyway, if you Google Translate the very last sentence.
이렇게 수정하면 ICS에서도 Gingerbread의 화면을 보실 수 있습니다.
Click to expand...
Click to collapse
You will get
With this modification, the ICS can also view the screen of Gingerbread.
Click to expand...
Click to collapse
I think this is just a mod that will show the Gingerbread UMS screen on ICS. That's it.

As fas as I know, the is no way to put a device in UMC (Mass Storage Device) if the internal sdcard is a subtree of the data partition, which is the case for Galaxy S3 and Galaxy Nexus. What are you trying to do exactly?

Ok u tell, its maybe not possible to mount the internal sd as a mass storage device. So please tell me, how can i restore my deleted backup of my previous firmware that i made with CWM. Is there a way with any software to restore these files?

Max One said:
Ok u tell, its maybe not possible to mount the internal sd as a mass storage device. So please tell me, how can i restore my deleted backup of my previous firmware that i made with CWM. Is there a way with any software to restore these files?
Click to expand...
Click to collapse
I don't understand what you try to do. Do you want to downgrade the android version? If not, just factory resetting from menu will leave you factory settings.
If you need to install another rom, flash it from CWM from where you did the backup.
If you want to restore the backup, what do you want to restore, the firmware (rom) that is not needed because with factory reset is enough; the data or the sdcard?
I mean, after a factory reset, what are you missing exactly?

scandiun said:
I don't understand what you try to do. Do you want to downgrade the android version? If not, just factory resetting from menu will leave you factory settings.
If you need to install another rom, flash it from CWM from where you did the backup.
If you want to restore the backup, what do you want to restore, the firmware (rom) that is not needed because with factory reset is enough; the data or the sdcard?
I mean, after a factory reset, what are you missing exactly?
Click to expand...
Click to collapse
Let me try to explain You. I made a backup of my whole system and saved them on the internal sd card because i have no external sd card yet. 2 days later i decided to flash the latest firmware. Perhaps i made a factory reset before or after flashing the latest firmware, tbh i dunno cant remember well. Now i want to switch back/restore to my original firmware which i backed up. The problem is, i cant restore them because the factory reset erased my backup files.
If i were able to mount my internal sd Card as a mass storage, it will be no problem to restore the deleted backup files.
But now I wanna know, is there a way to restore my deleted backup files on my internal sd-card from (recognized in windows as) a aportable storage/device?

Max One said:
Let me try to explain You. I made a backup of my whole system and saved them on the internal sd card because i have no external sd card yet. 2 days later i decided to flash the latest firmware. Perhaps i made a factory reset before or after flashing the latest firmware, tbh i dunno cant remember well. Now i want to switch back/restore to my original firmware which i backed up. The problem is, i cant restore them because the factory reset erased my backup files.
If i were able to mount my internal sd Card as a mass storage, it will be no problem to restore the deleted backup files.
But now I wanna know, is there a way to restore my deleted backup files on my internal sd-card from (recognized in windows as) a aportable storage/device?
Click to expand...
Click to collapse
1) Is not possible to put the internal sdcard of the SGS3 on mass storage device, because the sdcard directory is a subdirectory of the data partition. Not possible at all.
2) Some say that flashing or factory restoring deletes also sdcard, other say that not, so the only way is to check by yourself.
3) Did you check with file managers like Total Commander that the folder sdcard/clockworkmod/backup doesn't exist? Or you never knew where it was stored in the first place?
4) If the backup is not there, and since you can't use mass storage, the only way to try to recover data is use android size tools, like Hexamob Recovery or Undelete, but you need rooted device.
Provided that you can recover files, choose of course to recover them to an external sdcard. After that, make md5 checksum of all files and see if matches nandroid.md5
Links:
http://www.galaxynexusforum.com/forum/galaxy-nexus-help/866-wiping-clears-sdcard-directory.html
http://www.droidforums.net/forum/galaxy-nexus-development/187972-wiping-phone-no-sdcard.html
http://www.droidforums.net/forum/ga...ctory-reset-not-erasing-internal-storage.html

Related

relocate_apps.sh - When size matters [final] [2010-08-17]

I've made a script that relocates all your apps into an EXT2 filesystem in /sdcard/andboot/apps.img.
Advantages
- Get a LOT of space for apps even if everything else is running in NAND
- Never need to reinstall apps when upgrading (as long as the release has this script)
- Dual boot, for example, Eclair in NAND, Froyo on SD-card, but share the same apps.
- Wipe data (all settings) but keep all the apps stays (but not their settings)
Disadvantages
- Propably a bit slower than keeping everything in NAND
- If you intend to keep apps when when upgradring/switching releases then odex:ing your Market apps is not a good idea when using this.
Attached is an update that should work on any Android build (for our devices). The script in the update is only used once to create /sdcard/andboot/apps.img. Once it exist, the init script in the new initrd.gz (included in the attached NBH for NAND users) will automaticly mount /sdcard/andboot/apps.img to /data/app on boot no matter what Android build you are using.
Instructions
1a. Flash the attached kernel (but configure it first if needed with Loserskaters NBH editor) (NAND Users)
1b. Replace andboot\initrd.gz (HaRET users)
2. Apply attached update (adds relocate_apps.sh to /system/bin)
3. Do this in a terminal:
$su
#relocate_apps.sh 256 (for 256Mb storage, the choice is yours)
<wait until it finishes>
That's it. Upon the next boot your old apps in /data/app will be deleted to free up space.
To uninstall, delete the apps.img file on the SD-card, then wipe your data.
I've done some testing and it seems to work fine. I'm currently dual booting VaniljEclair (NAND) and Fresh Froyo (SD-card instal) and they share the same apps. Works fine for me but I cannot guarantee that it is without bugs.
Known limitations
- Won't work with apps that installs to /data/app-private (like some banking apps) so you have to reinstall them if you switch build or wipe your data.
- You can't remove the SD-card without powering off the phone since your apps are now stored on it.
kallt_kaffe said:
I've made a script that relocates all your apps into EXT2 filesystem in /sdcard/andboot/apps.img.
Advantages
- Get a LOT of space for apps even if everything else is running in NAND
- Never need to reinstall apps when upgrading (as long as the release has this script)
- Dual boot, for example, Eclair in NAND, Froyo on SD-card, but share the same apps.
- Wipe data (all settings) but keep all the apps stays (but not their settings)
Disadvantages
- Propably a bit slower than keeping everything in NAND
- If you intend to keep apps when when upgradring/switching releases then odex:ing your Market apps is not a good idea when using this.
Attached is an update for VaniljEclair RLS10b but it could tweaked into any release if you know what you are doing ("/system/bin/relocate_apps.sh boot" needs to be executed early, could be done either in a userinit.sh if the build has one or set up as a run-once service in sysinit.rc)
Instructions
$su
#relocate_apps.sh 256 (for 256Mb storage, the choice is yours)
<wait until it finishes>
That's it. The final version will delete your old apps on the next reboot to free up space in /data but this experimental version does not do that.
THIS IS AN EXPERIMENTAL SCRIPT. USE IT AT YOUR OWN RISK.
Click to expand...
Click to collapse
Interesting....so to get it work on fresh froyo I need to add this line /system/bin/relocate_apps.sh boot into userinit.sh?
Also when could we expect the version that deletes apps from system after moving them to sd?
-Arturo- said:
Interesting....so to get it work on fresh froyo I need to add this line /system/bin/relocate_apps.sh boot into userinit.sh?
Click to expand...
Click to collapse
Not anymore, the new version has that part in the initrd.gz so it will work in ANY build without modifications once you've relocated your apps.
Also when could we expect the version that deletes apps from system after moving them to sd?
Click to expand...
Click to collapse
Right now.
If this works as well as it seems to do I will push my changes to the bootenv and tinboot repo's so that all new kernels will have support for this. I will also include the relocate_apps.sh script in next VaniljEclair release and push it to Fresh Froyo.
While I have never needed more space on /data I still find this very useful as I now only need to reinstall one single app (my banking app) when I reinstall my phone (which I do quite often).
btw, I'm using a 512Mb image for /data/apps right now I don't think I will ever come close to fill it up.
kaffe, can we put apps (only apps, data still on NAND) on a second ext2 partition instead ext2 filesystem? I think it will be faster.
kallt_kaffe said:
Not anymore, the new version has that part in the initrd.gz so it will work in ANY build without modifications once you've relocated your apps.
Click to expand...
Click to collapse
Just a quick question, i know i could just try it and find out for myself but with the new kernel, does it mount /data/app normally if the apps.img does not exist??
EDIT::
Just realised that it must do this for it to work the first time but i'm guessing at the minute there is no way to revert back to apps on the /data partition without wiping and starting a fresh.
Hi..thanks for the app.
I follow direction unitl the app.img was mounted and saw the msg saying /data will be deleted after reboot, but after reboot the internal memory is still the same. Any idea?
ps. I am running your 2.1 built (on polaris) so I didn't follow your step1, so maybe that is why it didn't work?
Cookiekaikai said:
Hi..thanks for the app.
I follow direction unitl the app.img was mounted and saw the msg saying /data will be deleted after reboot, but after reboot the internal memory is still the same. Any idea?
ps. I am running your 2.1 built (on polaris) so I didn't follow your step1, so maybe that is why it didn't work?
Click to expand...
Click to collapse
Are you saying you didn't flash the kernel provided?? If so the apps.img on the sdcard will not be mounted. You need to modify the kernel NBH with the NBH editor to work with Polaris, flash it and try again. Sorry if i misunderstood and you have already done this.
Can the kernel file you attached be used for vogue at 320x240 res?
edit: actually, if it's not too much trouble...could you explain how to get this working on a vogue froyo nand 320x240? Thanks!
kallt_kaffe said:
Not anymore, the new version has that part in the initrd.gz so it will work in ANY build without modifications once you've relocated your apps.
Right now.
If this works as well as it seems to do I will push my changes to the bootenv and tinboot repo's so that all new kernels will have support for this. I will also include the relocate_apps.sh script in next VaniljEclair release and push it to Fresh Froyo.
While I have never needed more space on /data I still find this very useful as I now only need to reinstall one single app (my banking app) when I reinstall my phone (which I do quite often).
btw, I'm using a 512Mb image for /data/apps right now I don't think I will ever come close to fill it up.
Click to expand...
Click to collapse
Ok seems to be working fine for me with 512 image. Will report back in a few days.
scooter1556 said:
Are you saying you didn't flash the kernel provided?? If so the apps.img on the sdcard will not be mounted. You need to modify the kernel NBH with the NBH editor to work with Polaris, flash it and try again. Sorry if i misunderstood and you have already done this.
Click to expand...
Click to collapse
I didn't flash the kernel because the file name says FROYO but I am running eclair. However I am pretty sure the file was created and mounted as well.
I do know how to use NBH editor but just want to be sure that the kernel is safe even if I am running eclair.
Thanks for the reply
UPDATE: never mind I forgot you can select eclair as type. I will report back once I am done with the rest of the steps. THX!
Cookiekaikai said:
I didn't flash the kernel because the file name says FROYO but I am running eclair. However I am pretty sure the file was created and mounted as well.
I do know how to use NBH editor but just want to be sure that the kernel is safe even if I am running eclair.
Thanks for the reply
Click to expand...
Click to collapse
Yes it's safe.i think Kalt has made all the required changes to make kernel work on both froyo and eclair.
Kalt I'm wondering about something.I've already created the image for apps but I'm not sure what's going to happen when I instal new applications.will they automatically be moved to the image or do I have to run the script after ever installation off apk file?
tuannam said:
kaffe, can we put apps (only apps, data still on NAND) on a second ext2 partition instead ext2 filesystem? I think it will be faster.
Click to expand...
Click to collapse
It would propably be a little bit faster but it will be a lot more complicated to make and perhaps even more complicated to use. We allready have a de facto standard with this partitioning:
part 1 - FAT32
part 2 - system
part 3 - data
part 4 - swap
Now, not many uses swap on SD-card so we could propably say partition 4 should be used for this, right? But then we also would need to now that partition 4 really is ext2 and is having apps on it before we mount it. And it is also quite complicated for most people to partition their SD-cards in the first place.
So basicly, what I'm saying is that it propably could make small difference in performance but I'm not convinced it would be worth it. The way it works now is pretty safe as it won't do anything unless /sdcard/andboot/apps.img exist and setting it up is a simple one-liner in the terminal.
On the other hand an advanced user could set up their own apps on ext2-partition manually and add some lines to userinit.sh that mounts it.
So I don't know, at least I don't have any plans to add it at the moment. Perhaps someone could add it later if the advantages turns out to be big enough to make it worth it.
EDIT: Another aspect is that /data/app is only written to when installing, all other accesses should be only reads. All writing to /data is still in NAND so I really think the performance penalty is minimal. I haven't been able to tell the difference myself.
scooter1556 said:
Just a quick question, i know i could just try it and find out for myself but with the new kernel, does it mount /data/app normally if the apps.img does not exist??
EDIT::
Just realised that it must do this for it to work the first time but i'm guessing at the minute there is no way to revert back to apps on the /data partition without wiping and starting a fresh.
Click to expand...
Click to collapse
Your logic is correct.
Cookiekaikai said:
UPDATE: never mind I forgot you can select eclair as type. I will report back once I am done with the rest of the steps. THX!
Click to expand...
Click to collapse
If you are using the latest VaniljEclair then use a Froyo kernel. With the latest version of the libcamera.so the Froyo kernel can and should be used to get the extra 11Mb of memory.
-Arturo- said:
Yes it's safe.i think Kalt has made all the required changes to make kernel work on both froyo and eclair.
Kalt I'm wondering about something.I've already created the image for apps but I'm not sure what's going to happen when I instal new applications.will they automatically be moved to the image or do I have to run the script after ever installation off apk file?
Click to expand...
Click to collapse
As long as you have the new kernel and have run the script once then everything you install will end up i apps.img.
I must be doing something wrong. I flashed the new kernel, performed the update then ran the script(saw the /data/app copied screen and was told after reboot it would take effect, but internal memory is still going down after reboot).
UPDATE: after doing some PD I found the app.img disappeared from andboot. Not sure what is going on but i am recreating another one now.
Played around with this, and I think it's working on my vogue... ~60mb free on phone. Performance isn't too bad. Thanks!
kallt_kaffe said:
As long as you have the new kernel and have run the script once then everything you install will end up i apps.img.
Click to expand...
Click to collapse
Kalt I have a feeling that the script messes up compcache(it could also be the new cell location patch) My sd card is not recognized after restart of the system with compcache enabled. I remember that we had already suffered with this problem and you fixed it by adding 120 s delay to the script. I've notice that with apk image the system takes a bit more time to boot and load widgets in comparison to apks on nand. Could that be the problem? I would like to increase the delay in compcache script to maybe 180 seconds or so to see if it fixes the issue.
What should i change in this script to change the delay time?
Does this 2>&1 stands for 120 seconds?
Code:
#!/system/bin/sh
#
# Compcache manager
#
#
# Change these variables to tweak the compcache
#
opts= # Use default (25% of the avaliable RAM (~23-24Mb))
#opts='disksize_kb=16384' # 16Mb compcache
#opts='disksize_kb=32768' # 32Mb compcache
#opts='backing_swap=/dev/block/mmcblk0p4' # compcache (default size 15% of available RAM) + backing swap (on SD card)
#opts='backing_swap=/dev/block/mmcblk0p4 memlimit_kb=32768' # 32Mb compcache + backing swap (on SD card)
# Swappiness
swappy=30
case "$1" in
start)
sleep 120
insmod /system/lib/modules/lzo_compress.ko >/dev/null 2>&1
insmod /system/lib/modules/lzo_decompress.ko >/dev/null 2>&1
insmod /system/lib/modules/xvmalloc.ko >/dev/null 2>&1
insmod /system/lib/modules/ramzswap.ko $opts >/dev/null 2>&1
swapon /dev/block/ramzswap0
sysctl -w vm.swappiness=$swappy
;;
stop)
swapoff /dev/block/ramzswap0
;;
enable)
setprop persist.service.compcache 1
echo "Compcache will be enabled in 120 seconds."
;;
disable)
setprop persist.service.compcache 0
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0
Thanks
-Arturo- said:
Kalt I have a feeling that the script messes up compcache(it could also be the new cell location patch) My sd card is not recognized after restart of the system with compcache enabled. I remember that we had already suffered with this problem and you fixed it by adding 120 s delay to the script. I've notice that with apk image the system takes a bit more time to boot and load widgets in comparison to apks on nand. Could that be the problem? I would like to increase the delay in compcache script to maybe 180 seconds or so to see if it fixes the issue.
What should i change in this script to change the delay time?
Does this 2>&1 stands for 120 seconds?
Code:
#!/system/bin/sh
#
# Compcache manager
#
#
# Change these variables to tweak the compcache
#
opts= # Use default (25% of the avaliable RAM (~23-24Mb))
#opts='disksize_kb=16384' # 16Mb compcache
#opts='disksize_kb=32768' # 32Mb compcache
#opts='backing_swap=/dev/block/mmcblk0p4' # compcache (default size 15% of available RAM) + backing swap (on SD card)
#opts='backing_swap=/dev/block/mmcblk0p4 memlimit_kb=32768' # 32Mb compcache + backing swap (on SD card)
# Swappiness
swappy=30
case "$1" in
start)
sleep 120
insmod /system/lib/modules/lzo_compress.ko >/dev/null 2>&1
insmod /system/lib/modules/lzo_decompress.ko >/dev/null 2>&1
insmod /system/lib/modules/xvmalloc.ko >/dev/null 2>&1
insmod /system/lib/modules/ramzswap.ko $opts >/dev/null 2>&1
swapon /dev/block/ramzswap0
sysctl -w vm.swappiness=$swappy
;;
stop)
swapoff /dev/block/ramzswap0
;;
enable)
setprop persist.service.compcache 1
echo "Compcache will be enabled in 120 seconds."
;;
disable)
setprop persist.service.compcache 0
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0
Thanks
Click to expand...
Click to collapse
How about the line "sleep 120".
I've experienced some strange things with this so far. I installed a new app this morning. Some hours later I got a freeze and pin-reset my phone. The new app was gone... The .apk is no longer in apps.img, not even in lost+found. The system however believes it is still installed and I cannot reinstall it.
I have now added the "sync" flag when mounting the sdcard in /init and I'll give it another try. With a little luck it might prevent it from happening again.
I attached the new NBH and initrd.gz here if anyone else experienced the same problem and want to give it another try.

/storage/sdcard0 vs /data/media

I took the plunge today and flashed my first JB ROM today. (I was previously running BAMF Paradigm v1.3).
This morning, I flashed CWM 6.0.0.5 (not the touch version), and then flashed BAMF You Jelly Huh v2.1
Everything went very smoothly, it boots up quickly, JB is awesome, etc, etc...
So, with Root Explorer, I see that there is now this folder:
/storage/sdcard0
From reading a lot in the past week or so (both here and at rootzwiki), I know that this is the new actual location of our internal SD card. And the /sdcard folder really just points to this new location.
However, I also still have the old /data/media folder. From what I can tell in Root Explorer, the /data/media folder is identical to the new /storage/sdcard0 folder. However, I'm assuming that the data hasn't really been duplicated, and all three folders all contain a single copy of the same files.
Is that correct?
If so, what exactly is the differences between /storage/sdcard0 and /data/media? Should I just leave them both? Should I delete the older /data/media folder? Or would that delete everything on my internal SD card?
Thanks in advance for any clarification you can provide.
Sent from my Galaxy Nexus using Tapatalk 2
/sdcard is indeed a symbolic link to /storage/sdcard0, which is the new sdcard data location and mounted on /dev/fuse. It's likely there for backward compatibility. If I had to guess, /data/media looks like a bind mount of /storage/sdcard0, though I have no idea why they would use a bind mount instead of a symbolic link if it were only for backward compatibility. It's not listed as being a mount point when issuing the mount or df commands, though. I guess I'll dig around for an fstab entry.
Edit: It looks like there's an explanation in the init.tuna.rc file. /data/media is created. Later in the file, a "virtual SD card" is created via a service:
Code:
service sdcard /system/bin/sdcard /data/media 1023 1023
class late_start
Per the code comments:
Code:
# create virtual SD card at /storage/sdcard0, based on the /data/media directory
# daemon will drop to user/group system/media_rw after initializing
# underlying files in /data/media will be created with user and group media_rw (1023)
So the actual physical storage place is still /data/media. /storage/sdcard0 is a "virtual" SD card. /sdcard and /mnt/sdcard are symbolic links of /storage/sdcard0.
At this point, my big question is... why?
Cilraaz - thanks for your detailed reply. We still don't know why the new /storage/sdcard0 folder was created, but at least we're a little closer.
Anyone else have anything to add?
Sent from my Galaxy Nexus using Tapatalk 2
Does anyone else have any other thoughts?
Sent from my Galaxy Nexus using Tapatalk 2
I wonder if this has something to do with the problem some people are having where the available space in internal storage isn't adding up properly. For example, I have 13.33GB total space, 4GB of used space, and 3.21GB of available space.
Cilraaz said:
So the actual physical storage place is still /data/media. /storage/sdcard0 is a "virtual" SD card. /sdcard and /mnt/sdcard are symbolic links of /storage/sdcard0.
At this point, my big question is... why?
Click to expand...
Click to collapse
I'd guess that the virtual sdcard exists because /data/media is part of an ext# partition, so they use fuse filesystem and virtual sdcard to make it look like fat to apps, many of which don't understand ext# filesystems.
External_sd
strumcat said:
I'd guess that the virtual sdcard exists because /data/media is part of an ext# partition, so they use fuse filesystem and virtual sdcard to make it look like fat to apps, many of which don't understand ext# filesystems.
Click to expand...
Click to collapse
In my vold.fstab, now I have the following to my External SD:
dev mount sdcard1 /storage/sdcard1 auto /devices/plataform/s3c-sdhci.2/mmc_host/mmc1
How can I remap the external SD card back to /sdcard/external_sd ?
Is it in the vold.fstab file?
fabriciouerj said:
In my vold.fstab, now I have the following to my External SD:
dev mount sdcard1 /storage/sdcard1 auto /devices/plataform/s3c-sdhci.2/mmc_host/mmc1
How can I remap the external SD card back to /sdcard/external_sd ?
Is it in the vold.fstab file?
Click to expand...
Click to collapse
1. Why would you want to?
2. Safest bet would probably be a symbolic link from /storage/sdcard1 to /sdcard/external_sd. If you're doing it as a hard mount and it tries to mount /sdcard/external_sd before everything happens with /data/media, /storage/sdcard0, /mnt/sdcard, and /sdcard, you'll end up with some nastiness.
write to /mnt/sdcard or fail on /storage/sdcard0 ?
This is making me nugging futz !
just trying to save a picture in an app - same code works fine in os < Jellybean (JB)
m_sFilePath = Environment.getExternalStorageDirectory().getAbsolutePath() ;
= /mnt/sdcard in os < JellyBean (JB)
but /storage/sdcard0 in JB
as others here have noted.
However - and this is where it gets me - append a file name with a leading slash and the slash is there in os < JB, but gets trimmed out (somehow?) in JB ! e.g.
/mnt/sdcard/MyFile.bmp
VS
/storage/sdcard0MyFile.bmp
Tests use EXACTLY the same code ! Tests run on 2.3.3, and several versions of 4.x
So is /storage/sdcard0 actually a C, null terminated string and the null has been turned into a char 0 ? The '0' is counted in length() call, but fails on write --- or should I not use the sym link and go straight to /mnt/sdcard ? Can the app write to that path without special permissions, etc ?
thanks!
HowardPau said:
This is making me nugging futz !
just trying to save a picture in an app - same code works fine in os < Jellybean (JB)
m_sFilePath = Environment.getExternalStorageDirectory().getAbsolutePath() ;
= /mnt/sdcard in os < JellyBean (JB)
but /storage/sdcard0 in JB
as others here have noted.
However - and this is where it gets me - append a file name with a leading slash and the slash is there in os < JB, but gets trimmed out (somehow?) in JB ! e.g.
/mnt/sdcard/MyFile.bmp
VS
/storage/sdcard0MyFile.bmp
Tests use EXACTLY the same code ! Tests run on 2.3.3, and several versions of 4.x
So is /storage/sdcard0 actually a C, null terminated string and the null has been turned into a char 0 ? The '0' is counted in length() call, but fails on write --- or should I not use the sym link and go straight to /mnt/sdcard ? Can the app write to that path without special permissions, etc ?
thanks!
Click to expand...
Click to collapse
*sigh* *frakkin necrobumping*
the issue you're describing...relates to an app, not really to the mount list/android fstab :|
https://groups.google.com/forum/?fromgroups#!forum/android-developers would be a better place, IMO.
bk201doesntexist said:
*sigh* *frakkin necrobumping*
the issue you're describing...relates to an app, not really to the mount list/android fstab :|
_/android-developers_ would be a better place, IMO.
Click to expand...
Click to collapse
Not necrobumping, more like "living dead bumping" - I searched extensively first on Stack Overflow, and the google forum you mention above, then came here to XDA, based on a suggestion two days ago in S.O. *THIS* thread, despite it being old, is the closest match and my question / comment clearly relates: it is a File Access problem, is it not ?
So how about a useful suggestion - do you know the difference between ~/sdcard and ~/sdcard0 ?
Why does writing to storage/sdcard work, but to storage/sdcard0 fail, if they are sym-links to the same place. Clearly, the are not - or at least not at the time my app attempts to write to it, which should be long after mounting has happened.
and for you SDcard DeadHeads - the obvious search is "sdcard0 path", which as I mentioned does not yield the info needed:
https://groups.google.com/forum/?fromgroups#!searchin/android-developers/sdcard0$20path
bk201doesntexist said:
*sigh* *frakkin necrobumping*
the issue you're describing...relates to an app, not really to the mount list/android fstab :|
https://groups.google.com/forum/?fromgroups#!forum/android-developers would be a better place, IMO.
Click to expand...
Click to collapse
Enough complaining about 'necrobumping'. Bringing these threads back is much better than overflowing with new threads. I feel that this is a good reason to bump an old thread.
Sent from my Galaxy Nexus using xda premium
Vfan23 said:
... Bringing these threads back is much better than overflowing with new threads. I feel that this is a good reason to bump an old thread.
Click to expand...
Click to collapse
Thank you Vfan23 - this is exactly what I was thinking - seemed more appropriate to tie into old info (that, I claim, is not really old, just odd).
Here's more of what I've determined, but have not solved yet:
* JellyBean requires
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
( or READ_EXTERNAL_STORAGE if that's all you need ).
* Trim off the " 0 " in /storage/sdcard0 and append your file name to the result and some folks claim it works:
/storage/sdcard/MyFile.foo
Still have not tested if writing directly to /mnt/sdcard (in JB) fails or not ... will let you know.
thanks
- H
I wonder why xda mods don't close necro'd threads...tell me.
gnustomp said:
I wonder why xda mods don't close necro'd threads...tell me.
Click to expand...
Click to collapse
Because sometimes questions aren't answered.
Sent from my Galaxy Nexus using xda premium
Samsung non-standard use of Environment.getExternalStorageDirectory()
Vfan23 said:
Because sometimes questions aren't answered.
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
This relates not only to this thread, but all others referring to Samsung devices using sdcards - of which there are many threads.
Samsung has implemented a non-standard API (I claim they broke the interface )
Samsung says you have to append more to the path - AND that you "must test for Samsung specific devices" before doing this:
String external = Environment.getExternalStorageDirectory();
external = external + "/external_sd/";
(Sorry, I'm still a <10 post NOOB, so here's the raw link)
developer.samsung.com/forum/board/thread/view.do?boardName=GeneralB&messageId=162934&messageNumber=1381&startId=zzzzz~&searchType=TITLE&searchText=sdcard
But if you get "sdcardX" where X is 0 - 9, then it fails (at least for me on several sam. devices using JB). I ask them in that link about how to fix this ... too soon for a reply.
- H
If you delete files from /data/media they dont disappear from /storage/sdcard0 nor from the MTP file explorer.
So I guess /storage/sdcard0 is used for different virtual services like MTP.
After rebooting my smartphone, the data was not there anymore (refresh MTP explorer to be sure).
And after going on adb shell, the data had disappeared from /storage/sdcard0
So the real data is probably on /data/media and no /storage/sdcard0

[Guide]Functional ext4 for external microSD with just a few bumps left

Y.G. said:
I formated my sd card to Ext4 and when insert it in to my phone, it says that's it's blank and has unsupported files. Any reasons for that?
Sent from my SPH-L710 using xda premium
Click to expand...
Click to collapse
The SPH-L710 Samsung Stock LJ7 TW 4.1.1 Android doesn't understand/support the change to ext4 external SD card (microSD) without a few things being done.
I'm working this out right now. So far I have manually been able to mount the newly created ext4 partition on the microSD card through adb, and after some chown/chmod I was able to go back to "Settings and Storage" and the "Mount SD Card" picked it up, and I was up and running ext4. But this didn't persist after a restart. So I'm looking into: /etc/vold.fstab MODS to keep it after restart right Now !!
If Some one else already has this perfected please chime in. I'm wanting to do most of the devices in the house this way when I get time because better performance, having a file system with a journal, and getting rid of thins like 4 Gig per file limitations is pretty Sweet in my humble opinion *Grin*
0) Assuming you already have your microSD card formatted ext4. I also happened to label mine extSdCard for the volume label within gparted
1) Can mount with:
mount -w -t ext4 /dev/block/mmcblk1p1 /storage/extSdCard/
2) To get the correct owner and permissions run:
chown root:sdcard_rw /storage/extSdCard
chmod 775 /storage/extSdCard
3) Should make the extSdCard owner/permissons match the regular internal sdcard you can verify this like so:
cd /storage/ && ls -l
drwxrwxr-x root sdcard_rw 2013-01-12 18:16 extSdCard
drwxrwxr-x root sdcard_rw 2013-01-12 17:05 sdcard0
4) After that you can go to the "Settings and Storage" to run "Mount SD" and you will have ext4 extSdCard Show up and it bring up the File System Status !! --> Until you reboot and it goes to crap because I don't have the vold.fstab edit/MOD complete _yet_ ... So, for now a boot script has been put in place to bring our external SD card back online during restart, so the system will acknowledges it, making the world a better place.
Example of how things look file system wise: mount | grep extSdCard
/dev/block/mmcblk1p1 /storage/extSdCard ext4 rw,relatime,user_xattr,barrier=1,data=ordered 0 0
5) Have not been able to resolve the vold.fstab to make this ext4 extSdCard matter fully Legit (in my opinion), but I did manage to make it remount the card on boot, so its online when the system comes up instead of having to manually mount it. Did this by -->
Added the following lines to the very bottom of: /etc/init.qcom.post_fs.sh
## sponix MOD to match with ktoonz kernel for better power management
stop mpdecision
## sponix MOD to mount extSdCard prior to GUI work around to make ext4 function
## read and write extSdCard mount
chown root:sdcard_rw /storage/extSdCard
chmod 775 /storage/extSdCard
mount -w -t ext4 /dev/block/mmcblk1p1 /storage/extSdCard
chown root:sdcard_rw /storage/extSdCard
chmod 775 /storage/extSdCard
## if you want read only extSdCard mount
## mount -r -t ext4 /dev/block/mmcblk1p1 /storage/extSdCard
Still attempting to automate the process so the Stock+root LJ7 can pick up the extSdCard _normally_ without having to do the mount command manually, but so far its kicking my butt. Also this is more a "General, or Question and Answer type Topic" the Kernel(s) obviously support ext4 the system fs uses/requires it *Grin*.. So we might get Our Friendly Neighborhood Moderator to Migrate it to the proper place to help others. Just hoping to get the last few bumps smoothed out, or find someone that already documented the process that I've overlooked *Grin*..
Current Known Issues: If you unmount the card through the "Settings | Storage | Umount SD" or by hand with umount, you will either need to reboot for it to reattach through the /etc/init.qcom.post_fs.sh boot script script addition, or will have to mount it manually if you want to keep the system up and running. Guess you could also probably just run the /etc/init.qcom.post_fs.sh as root from a terminal emulator (or adb).
Still searching for vold.fstab bits of wisdom but that will have to continue next weekend -->
Sexy and You Know it,
Keep on Flashing,
sponix2ipfw (sponix
:fingers-crossed:
Ha! Sorry. Deleted: Didn't understand that you had it running on boot (can't read properly )
Great idea
Am I really the only one who also thinks this idea is the nuts?
Am I the only one who longs to transform the mess that passes for a filing system on the internal sd using symbolic links into a beautifully organized, encrypted and cloud synced system on my external sd?
Is it just me and a few others that want to be able to achieve the above so that we can move from one ROM to another or recover from a lost phone with the minimum of fuss?
Are we freaks? :cyclops:
Say it isn't so XDA!! :crying:
I'm gonna try this on my international S3 running Null_ Rom 25 JB 4.1.2
PS do you have any idea how the entire ExtSD or just a folder can be enrypted using Cryptonite and automatically mounted at boot time?
emp111 said:
PS do you have any idea how the entire ExtSD or just a folder can be enrypted using Cryptonite and automatically mounted at boot time?
Click to expand...
Click to collapse
Is this along the lines of what you're looking for?
http://forum.xda-developers.com/showthread.php?t=1141467
Also your idea is pretty insane, but also genius
If you get that to work please do come back and share
Insane ideas are the best lol
CNexus said:
Is this along the lines of what you're looking for?
http://forum.xda-developers.com/showthread.php?t=1141467
Also your idea is pretty insane, but also genius
If you get that to work please do come back and share
Click to expand...
Click to collapse
Thank you for your prompt reply, yes it is asking a lot I know but I think that it can be done.
Now if you really thought that idea was insane......check this out:
Imagine that we asked every Android app developer to submit the various paths used for their config (and config backup) files to a central database and had the ability to add or own custom paths (which could be added to the central database once approved).
We could build an script/app that would retrieve a list of currently installed apps on your phone then automatically build a symbolically linked file system (and/or backup file system) in the location of your choice that you could either encrypt and/or sync using your current tools or even incorporate this functionality into the app itself along with the ability to choose what was encrypted/backed up and how i.e. either synced to the Cloud or (S)FTP or SMB as either a dd copy or even a cwm flashable zip.
Could I dare hope for a Tasker module or the ability to add custom scripts?
I wish I could do this myself but my coding skills are non existent
Anyway the LUKS manager app won't automatically mount a file system, but I really like it anyways, thank you for pointing me to it!
And on the Ext4 front, the mount command (yes the 1st one ) failed, maybe the op could offer a suggestion. :angel:
BTW is there a place for people to suggest ideas for apps here?
Wait really it wont? I couldve sworn I remembering that it did
But dude....
You need to learn yourself some java and start whipping stuff up
Idk about the whole central database thing, but the rest could definitely be done with root access
I think the main problem with that is the proprietary aspects...i mean even here on XDA where binaries released are supposed to be GPL compliant, many of them arent and its sad because it deteriorates the overall quality of work thats released afterward
This whole thing is just hard work!
CNexus said:
Wait really it wont? I couldve sworn I remembering that it did
Click to expand...
Click to collapse
Doesn't seem to unfortunately
But dude....
You need to learn yourself some java and start whipping stuff up :D :D[/QUOTE said:
You make it sound soooo easy lol, and at another point in my life maybe it would have been but right now I'm operating at a reduced level due to some unforeseen circumstances that have left me lacking focus, motivation etc
You know all the things you need to be creative, learn etc lol
Anyway back to the matter at hand, I have got my ext4 SD card to the stage where I have to manually mount it from within the Settings/Storage as I'm using the international S3 and don't have the init.qcom.post_fs.sh, I think the qcom refers to Qualcomm chipset in US S3's.
As for modifying vold.fstab so we can avoid the above workaround it would seem that maybe thats a dead end as according to a German guy on android-hilfe. de, Vold may have been modified by Samsung to only deadl with exFAT on External SD's.
Looks like I'm not gonna be in Android nirvana for a while :crying:
Unless anyone else on XDA fancies getting in on this !!!!
Click to expand...
Click to collapse
Got it working ..... kinda
Got an app called ezymount (by ezynow) that automounts my ext4 64GB microSD at boot time.
I have to wait a few seconds for the boot process to complete but it's automatic, am pretty happy!!
Now gotta get symlinks, encryption and cloud synchronization sorted :/

[Q] Backup apps and data?

I'm wanting to backup all my apps and data on my Note 8.0 3G. (I would like to back everything up to an external drive).
My device is rooted, and most apps are saved to SD, as is described here:
http://forum.xda-developers.com/showthread.php?t=2276193&page=2
I also have Multi Window Manager Pro if that makes any difference.
And I have Titanium Backup Pro installed... But I have no idea how to use it.
Oh, and I have a USB OTG to USB adapter, so I can plug in an external drive no problem.
Please help! :fingers-crossed:
Just load up Titanium Backup ( The free version is also installed right? ) and touch the arrow in the upper right hand corner. It will then give you a list different backup scenarios to choose from. I use Backup new user apps & newer versions.
You can also change to backup to external sdcard in Preferences using the menu button.
kable said:
Just load up Titanium Backup ( The free version is also installed right? ) and touch the arrow in the upper right hand corner. It will then give you a list different backup scenarios to choose from. I use Backup new user apps & newer versions.
You can also change to backup to external sdcard in Preferences using the menu button.
Click to expand...
Click to collapse
Ok, so I managed to change the backup folder to a location I liked.
I selected the same option as you... and it takes me to a screen with the title 'Backup new user apps & newer versions'
Then 3 buttons: Select all, Deselect all, Invert selection.
then 'Pause active apps' and 'exclude active apps'.
then nothing else, no list of apps.
I tap the green tick, and I immediately get a notification that backup has finished. ....?
Edit: In other words, nothing happens - I check the folder and it's empty.
did you buy a license or is it the free version?
Go to their website and read up on how to use the software properly..
http://matrixrewriter.com/android/
https://play.google.com/store/apps/...wsMSwyLDEsImNvbS5yb290dW5pbnN0YWxsZXIucHJvIl0.
There is this app to make a backup of your applications....
wase4711 said:
did you buy a license or is it the free version?
Go to their website and read up on how to use the software properly..
http://matrixrewriter.com/android/
Click to expand...
Click to collapse
I installed the free version, then bought the licence. So yes, I have the Titanium Backup PRO/Donate version.
I went to the site and read the FAQ, Troubleshooting, and User Guide.
I also clicked the 'Problems' Button. Makes no difference... So I also upgraded Superuser to Superuser Elite for good measure.
Today, I am getting warning messages that weren't coming up yesterday... for instance:
When I choose the backup location on my external drive, the Overview page tells me my Backup directory is X not available.
when I click the page+arrow symbol on the top right, i get this message: 'The current backup location ("/storage/UsbDriveA/Stuff you DON'T WANT/N5100 Backup") cannot be accessed.'
Also, if I change the backup location to what it was originaly I get exactly the same problem: - Backup directory is X not available.
("/storage/sdcard0/TitaniumBackup") cannot be accessed.'
Looking at the Overview page, at the bottom, it says:
System ROM: 2.64 GB (958 MB free)
Internal+Media 10.6 GB (7.63 GB free)
Ext. SD card: 10.6 GB (7.63 GB free)
(I actually have a 64 GB MicroSD installed)
Do you know what I think is going on? TitaniumBackup is getting confused because of the script I have enabled to install apps to SD as is described here: http://forum.xda-developers.com/showthread.php?t=2276193
Which I did mention and link to in my first post. Are none of you using this method?
looks as if your internal card is mounted as external, and your removable card is not mounted. Are you running civato's kernel? if so, the vold entry in your mount script needs to be changed.
roustabout said:
looks as if your internal card is mounted as external, and your removable card is not mounted. Are you running civato's kernel? if so, the vold entry in your mount script needs to be changed.
Click to expand...
Click to collapse
I'm using the stock kernal. I haven't flashed a custom rom... All I've done to my device is this:
1 Install framaroot
http://forum.xda-developers.com/atta...0&d=1368232060
2. Open frama root and select SupesSu. Select the Aragorn method.
3. Reboot your device
4. Install busy box and open the app. Grant Su permissions and do the smart install
https://play.google.com/store/apps/d....busybox&hl=en
5. Now you are rooted and ready to follow the steps of this thread.
6. Use ur device to format the SD card
7. Download script and save to SD card
http://downloadandroidrom.com/file/G...e2/app2sdNote2
8. Install script manager from play store
9. Open script manager, click on browse as root then ok
10.Choose the downoaded file and choose Script/Executable
11. Now tap on Su, Boot and Save
12. Reboot your phone
Click to expand...
Click to collapse
And this is the script:
the script:
-----------------------script starts next line
#!/system/bin/sh
# extsd2internalsd is a modification that allows to switch internal sd to external sd
# and viceversa. With this you can use default internal sd only for app storage
# and the external sd to store all apps resource and all others stuff. The resut is a very
# big increase of installable apps on gnote2 and note8
# All credits to Mattiadj of xda forum for the idea and script and to mike1986 for
# the cmw zip. xda thread url at
# http://forum.xda-developers.com/show...php?t=2036796:
sleep 10
mount -o remount,rw /
mount -t vfat -o umask=0000 /dev/block/vold/179:17 /storage/sdcard0
sleep 30
mount -o bind /data/media /storage/extSdCard
chmod 777 /mnt/extSdCard
sleep 10
chown 1023:1023 /storage/extSdCard
chown 1000:1000 /storage/sdcard0
------------- end script on blank line above
Click to expand...
Click to collapse
Your script looks like it's doing what mine does.
When you use the settings control panel to look at storage, does your storage show that internal storage is larger than your SD card - in your case, it'd be ~60 gig internal and ~9 for sdcard?
If they show the same value (the value Titanium reports) there's a problem with your script. otherwise you should be ok as long as the folder exists.
I just checked my device and titanium shows what yours does - both memory pools are the same size. mine works fine and uses this path:
/storage/sdcard0/titanium
roustabout said:
Your script looks like it's doing what mine does.
When you use the settings control panel to look at storage, does your storage show that internal storage is larger than your SD card - in your case, it'd be ~60 gig internal and ~9 for sdcard?
If they show the same value (the value Titanium reports) there's a problem with your script. otherwise you should be ok as long as the folder exists.
I just checked my device and titanium shows what yours does - both memory pools are the same size. mine works fine and uses this path:
/storage/sdcard0/titanium
Click to expand...
Click to collapse
Yes, my internal storage is much larger (59.47Gb) - showing it is using the SD card, with the 'SD' (external) showing just under 10Gb.
I've restarted my device a couple of times, so I'm not getting those error messages. I can set my backup folder to the same as yours '/storage/sdcard0/TitaniumBackup', and I can also set it to the folder I want to use on my external drive - '/storage/UsbDriveA/Stuff you DON'T WANT/N5100 Backup'.
The problem now is that when I try to do a backup, selecting either 'Backup new user apps & newer versions' or 'Backup new user+system apps & newer versions' I'm presented with a screen where I'm supposed to select or deselect apps, but NO apps are listed! Not a single one.
What happens for you?
Titanium launches, confirms it has root rights and sqlite support, nags me if I happen to have USB debugging off, then lands at Overview.
I click on the Backup/Restore tab and it shows me a list of apps available to back up. If I click the checklist button, I get to "Batch Actions - ALL" and it tells me how many apps it's ready to back up, in my case 142 user apps.
The only thing that behaves as you're describing is if I've accidentally set a filter which doesn't match anything.
In the "Backup/Resore" tab there's a "Click to edit filters" button; if you go in there and there's a value set, try clearing it and then clicking the green checkmark to save your change. If you don't click the checkmark, your change isn't saved.
That may take you back to the backup/restore fully populated with user and system apps if you'd accidentally set a filter.
roustabout said:
The only thing that behaves as you're describing is if I've accidentally set a filter which doesn't match anything.
In the "Backup/Resore" tab there's a "Click to edit filters" button; if you go in there and there's a value set, try clearing it and then clicking the green checkmark to save your change. If you don't click the checkmark, your change isn't saved.
That may take you back to the backup/restore fully populated with user and system apps if you'd accidentally set a filter.
Click to expand...
Click to collapse
YES!!! For the strangest reason, I had it filtering out everything except 'flashbarservice.apk' which doesn't even exist on my device. :silly:
Thanks for identifying where the problem was. I must have accidentally saved that as a filter back when I was setting up my device and completely forgot about it. *slaps forehead*.
What a run around for such a simple obvious mistake.
Everything is now backing up nicely to my external drive. :good: :fingers-crossed:

New Storage Layout for HOX Endeavoru

New Storage Layout for HOX Endeavoru
This New Layout will change the way your phones internal memory partitions are used.
The primary goal is to get more space for your apps and data. The secondary goal is to be more compatible with new OS/software. This is obtained by using a layout similar to Nexus devices.
Two years ago pabx showed us "How to switch to a big /data partition", but at that time very few of us actually needed it. It was experimental and good Linux skills was required.
Almost one year ago Thömy proposed to use a new better storage layout for our device. We tried it and found it good (at least I did), but we were still happy with KitKat on Dalvik, so we didn't bother to publish it.
Well, now we have Lollipop and ART. And memory suddently seem very limited.
Move2SD is a must for many of us. And guess what...: Thömy refined the layout to be used for Android 5 and ... I have the pleasure to present this New Layout. So, here we go.
Before starting the process of converting your HOX to the New Layout, please make sure you have plenty of time for this.
Don't start if you are planning to use the phone in near future. Unforseen things can happen, so you may need some advice to get back on the right track.
It is very hard to brick the HOX as HTC did a good job on securing it, but we all know, s... happens.
Remember, xda is all about changes and no change is without risk.
A word of warning: Although some error situations will be prevented, it was not possible to cover all situations.
You CAN restore a backup from the wrong layout. And you may be able to loose data if you don't keep track of which layout you are using.
It is YOUR responsability to keep track of your files. Good luck and have fun flashing.
Enough talking, let's start.
Requirements: HTC One X International. 50%+ battery. You know how to flash a recovery. You know how to flash ROM and boot.img.
To upgrade, follow these simple steps or use the detailed guides below:
Make sure your adb/fastboot is up to date and working.
Make sure you can transfer files with MTP (test before you start the transformation).
Backup everything in your phone that you want to keep. This will WIPE ALL!
Boot to fastboot and Install a recovery made for the New Layout. twrp2811.BiG.img will do for a start.
Disconnect the phone from PC (current recovery will fail the format process if you skip this step).
Format Data. This will reformat your SD Card to be used for both app-data and user storage (new SD Card).
Clean out all other partitions.
Restart recovery and wait for two new drives to pop up on your PC.
Copy a ROM with the New Layout to the Internal SD Card or the new 2GB Extra Data.
Flash the ROM (and gapps) and reboot.
Go here and press the Thanks button (or even better, the button above it).
Going back to the old layout is easy:
Boot to fastboot and Install an old Recovery.
Change the file system of the SD Card back to FAT.
Copy a ROM or a backup with old layout to SD Card. Mount USB Storage if you want to copy a backup - MTP may fail on very large files.
Wipe/format everything except SD Card.
Flash ROM or restore backup.
Reboot to bootloader and Flash boot.img from ROM or the backup.
Boot to your old system.
Whats missing ? Let me know if you find something!
Want pictures ? Look in the guides
Want more ? Upload it....
... and so he did... thanks @dady000 for SlimBean!
Adding New Layout to Legendary @pabx AOSP 4.2.2 >>>>>>DOWNLOAD<<<<<
All my files are now copied/moved to >>>>> Android File Host
FAQ
How do I create a backup of my Old Layout?
Guide on BACKUP
How do I switch to the New Layout?
Guide on Switching to the New Layout
How do I get back to the Old Layout?
Guide on Going Back to Normal Layout
How difficult is it to switch to the New Layout?
Nemesis1278 said:
Awesome I will try the new layout.
... @teemo love the instruction for New big partition it is easy to follow and I don't thnk I can make a mistake unless I forget to backup my files to my computer. Thanks for the formatting over to new partition instructions.
Click to expand...
Click to collapse
What if I update the ROM or if I change to a different ROM. Do I need to backup my pictures and music etc. first ?
The SD Card is now a part of the /data partition. It is actually just a directory named - /data/media
This "media" is the SD Card.
When you flash a ROM, you can wipe Dalvik, System, Cache and Data. This will not touch the SD Card.
When you select wipe Data in twrp, it does NOT format /data. It selectively delete everything on /data except /data/media
To wipe the SD Card, you need to select Internal SD Card.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Click to expand...
Click to collapse
Show me the difference...
Partitions on the Old Layout:
Code:
#p12: 1280MB /system
#p13: 320MB /cache
#p14: 25GB sdcard
#p15: 2196MB /data
Partitions on the New Layout:
Code:
#p12: 1280MB /system
#p13: 320MB /cache
#p14: 25GB* /data
#p14: 25GB* /data/media = sdcard
#p15: 2196MB /xtradata
* #p14 is 25GB that is shared between DATA and SDCARD
Why can't we use Mass storage?
The data we want to store on the bigger partition need to be protected. The FAT system used by current sdcard does not offer any kind of protection. Linux/Android use ext4 to secure your data. This mean you can use your phone for banking, pictures, videos and other private data without worrying too much.
HTC have locked the partitions, so we cannot resize /data and sdcard.
Can I restore from Old Layout to New Layout
Thanks to @eyosen for reminding me of this. It can make life a little easier for us:
You can restore DATA from the Old Layout to the New Layout. Do not restore the system.
Make sure the data you restore is compatible with the ROM (system) you install. Most apps may restore and work perfect, but be prepared, that there might be issues. If an app is messed up, first try to clear the apps data via Settings-Apps-"BadApp".
I can't see the drives on PC ... I have problems with Windows drivers:
THIS guide has proven to be useful, thanks @bhushan11689
I still have problems with Windows drivers when using twrp2834-BiG:
Try the new twrp2851-BiG, it is more friendly
I cannot download to sdcard,
Pictures and Screenshot does not work,
How can I access my sdcard?
For all solutions below: Once you enter the command, you must WAIT.
It can take a while, as the command will change ownership of all your files on the sdcard.
On a fresh install it may only take a second. But if you restored a lot of files, be prepared to WAIT
If you use MultiRom don't do this (I am not sure, but I think it will change ownership for your secondary ROMs)
Originally Posted by Thunder07 I'd recommand
Code:
adb root
adb shell chown -R media_rw:media_rw /data/media/0/
If that didn't work, try this:
- boot into the recovery
- tap Advanced -> Terminal Command -> Select
- write carefully:
Code:
chown -R media_rw:media_rw /data/media/0/
tap Go and WAIT for the command to finish
- tap Home and reboot system
Or if you have Root Explorer or similar installed in android, you can:
- From Root Explorer navigate to /data/media
- long press the "0" folder and select Change owner
- Set Owner and Group to "1023 - media_rw" and tick "Also set on all sub-folders and files"
- hit OK and WAIT.
...to be updated...
Please welcome HTC Sense to the New Layout.
Converting Sense5 4.2.2 to the New Layout
Note: If you have no experience with the tools below used in this Sense-kitchen, please get familiar with the tools before starting. I will not explain usage of these.
Here is the recipe for cooking:
Code:
1. [URL="https://www.google.com/search?biw=1738&bih=1168&tbm=isch&sa=1&q=%22rom%22+%22sense%22+%224.2.2%22+%22One+X%22&oq=%22rom%22+%22sense%22+%224.2.2%22+%22One+X%22&gs_l=img.3...5327.20386.0.21299.21.21.0.0.0.0.162.2230.8j13.21.0.msedr...0...1c.1.62.img..16.5.558.jJPai_hXmeM"]ROM[/URL]
2. [URL="http://ibotpeaches.github.io/Apktool/"]apktool[/URL]
3. for linux: [URL="https://www.google.com/search?num=100&q=mkbootimage+split_boot+repack_ramdisk&oq=mkbootimage+split_boot+repack_ramdisk&gs_l=serp.3..30i10.1279477.1286274.0.1286536.7.7.0.0.0.0.393.1044.1j4j0j1.6.0.msedr...0...1c.1.62.serp..2.5.944.-8VGBiQkl8c"]mkbootimage + split_boot + repack_ramdisk[/URL]
alternatively for windows: [URL="https://www.google.com/search?site=&source=hp&q=bootimg_tools_windows&oq=bootimg_tools_windows&gs_l=hp.3..0i13i30.8539.8539.0.8711.2.2.0.0.0.0.166.311.0j2.2.0.msedr...0...1c.1.62.hp..1.1.143.0.SW4IYGUKG_A&gws_rd=cr&ei=hav9VJm6FqjQ7AbyjYCICQ"]bootimg_tools_windows[/URL]
4. Apply The "patch"
Short instructions:
1. Edit the storage_list in the ROMs framework. Just change parameters for the sdcard.
2. Remove sdcard from vold.fstab, we fuse it in the ramdisk.
3. Update the ROMs updater-script. Pay special attention to any mmcblk0p15 entries. Change it to mmcblk0p14. Some scripts want to wipe Data (if asked), comment it away (or it will wipe data and sdcard).
4. The RAM Disk. One important point here: Use the old command for the sdcard service.
Additionally: Be aware of scripts adding "UMS features/helpers/whatever". I have currently a windows popup asking me to format "F:". This came from converting the lONElyX kernel.
The "patch":
Code:
ROM
1.
/system/frameworks/framework-res.apk
apktool d framework-res.apk
frameworks-res/res/xml/storage-list.xml
- <storage android:mountPoint="/storage/sdcard0" whatever .... />
+ <storage android:mountPoint="/storage/sdcard0" android:storageDescription="@string/storage_internal" android:primary="true" android:emulated="true" android:mtpReserve="100" />
apktool b framework-res
new framework will be in frameworks-res/dist
open new framework-res.apk and
add original META-INF and
replace AndroidManifest.xml with the original
2.
system/etc/vold.fstab
- dev_mount sdcard /storage/sdcard0 emmc /devices/platform/sdhci-tegra.3/mmc_host/mmc0
+ #dev_mount sdcard /storage/sdcard0 emmc /devices/platform/sdhci-tegra.3/mmc_host/mmc0
3.
META-INF/com/google/android/updater-script
- mount("ext4", "EMMC", "/dev/block/mmcblk0p15", "/data");
+ mount("ext4", "EMMC", "/dev/block/mmcblk0p14", "/data");
4.
boot.img
split_boot boot.img
boot/ramdisk/init.endeavoru.common.rc
- # for backwards compatibility
- export EXTERNAL_STORAGE /storage/sdcard0
- mkdir /storage 0050 system sdcard_r
- mkdir /storage/sdcard0 0000 system system
- symlink /storage/sdcard0 /sdcard
- symlink /storage/sdcard0 /mnt/sdcard
+ on init
+ # See storage config details at http://source.android.com/tech/storage/
+ mkdir /mnt/shell/emulated 0700 shell shell
+ mkdir /storage/emulated 0555 root root
+
+ export EXTERNAL_STORAGE /storage/emulated/legacy
+ export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
+ export EMULATED_STORAGE_TARGET /storage/emulated
+
+ # Support legacy paths
+ symlink /storage/emulated/legacy /sdcard
+ symlink /storage/emulated/legacy /mnt/sdcard
+ symlink /storage/emulated/legacy /storage/sdcard0
+ symlink /mnt/shell/emulated/0 /storage/emulated/legacy
+ # Our old /data partition
+ mkdir /xtradata
on fs
+ setprop ro.crypto.umount_sd false
+ setprop ro.crypto.fuse_sdcard true
+
on post-fs-data
+ mkdir /data/media 0770 media_rw media_rw
- /dev/block/platform/sdhci-tegra.3/by-name/UDA \
+ /dev/block/platform/sdhci-tegra.3/by-name/ISD \
+ # virtual sdcard daemon running as media_rw (1023)
+ service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023
+ class late_start
#eof
boot/ramdisk/init.rc
mkdir /cache 0770 system cache
mkdir /config 0500 root root
+ # See storage config details at http://source.android.com/tech/storage/
+ mkdir /mnt/shell 0700 shell shell
+ mkdir /mnt/media_rw 0700 media_rw media_rw
+ mkdir /storage 0751 root sdcard_r
# Directory for putting things only root should see.
boot/ramdisk/fstab.endeavoru
- /dev/block/platform/sdhci-tegra.3/by-name/APP /system ext4 ro wait
- /dev/block/platform/sdhci-tegra.3/by-name/UDA /data ext4 noatime,nosuid,nodev,noauto_da_alloc wait,encryptable=/dev/block/platform/sdhci-tegra.3/by-name/DUM
- /dev/block/platform/sdhci-tegra.3/by-name/CAC /cache ext4 noatime,nosuid,nodev,noauto_da_alloc wait
- /dev/block/platform/sdhci-tegra.3/by-name/RCA /rca ext4 noatime,ro wait
- /dev/block/platform/sdhci-tegra.3/by-name/RFS /rfs ext4 noatime,rw wait
- /dev/block/platform/sdhci-tegra.3/by-name/DLG /devlog ext4 nosuid,nodev defaults
+ # New Layout #
+ /dev/block/platform/sdhci-tegra.3/by-name/APP /system ext4 ro,barrier=0 wait
+ /dev/block/platform/sdhci-tegra.3/by-name/CAC /cache ext4 noatime,nosuid,nodev,noauto_da_alloc,barrier=0 wait,check
+ /dev/block/platform/sdhci-tegra.3/by-name/RCA /rca ext4 noatime,rw,barrier=0 wait
+ /dev/block/platform/sdhci-tegra.3/by-name/RFS /rfs ext4 noatime,rw,barrier=0 wait
+ /dev/block/platform/sdhci-tegra.3/by-name/DLG /devlog ext4 nosuid,nodev,barrier=0 defaults
+ /dev/block/platform/sdhci-tegra.3/by-name/UDA /xtradata ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait
+ /dev/block/platform/sdhci-tegra.3/by-name/ISD /data ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait,encryptable=/dev/block/platform/sdhci-tegra.3/by-name/DUM
cd boot
repack_ramdisk ramdisk
mkbootimg --kernel boot.img-kernel --ramdisk new-ramdisk.cpio.gz -o boot-newlayout.img
boot-newlayout -> rom.zip/boot.img
NOTE: The "patch" below is not automatic. It must be "applied" by hand
Reserved 3
Hi Teemo, thanks for the effort. The time of great change for HOX is coming eventually. OMNIROM seems new for me. Is it the same as SLIMLP ROM but with new layout or it's a totally new LP ROM ? One more question, will the other ROM makers follow this new layout as well ? Thanks.
Omnirom is Omnirom
This is the first preview of lollipop onOmni. Very young, but with potential.
I hope other ROMs will follow, Thömy did all the work on the design, I just made the recovery and the guide. So I assume CM will join.
Time will tell if there is a need for it. It's all up to the users.
Finally we got it.
Thanks buddy
Do we need new layout for Omni?
thought
lalit387 said:
Do we need new layout for Omni?
Click to expand...
Click to collapse
Yes, absolutely
Omni is PREview. No wifi yet. No update schedule at the moment, but seem stable and have some nice options.
Just thought we should have some options to start with. SlimLP should join soon.
teemo said:
Yes, absolutely
Omni is PREview. No wifi yet. No update schedule at the moment, but seem stable and have some nice options.
Just thought we should have some options to start with. SlimLP should join soon.
Click to expand...
Click to collapse
Would appreciate an old layout Omni compilation, if possible
lalit387 said:
Would appreciate an old layout Omni compilation, if possible
Click to expand...
Click to collapse
Should be possible. Maybe @audahadi can point me to the latest good KitKat Omni build. It may take a while though, as I do have a lot of other stuff to look at. But if everything is setup and ready to pick from github, I can give it a try.
Of course audahadi is more than welcome to do it, if time and energy permit it :angel:
teemo said:
Yes, absolutely
Omni is PREview. No wifi yet. No update schedule at the moment, but seem stable and have some nice options.
Just thought we should have some options to start with. SlimLP should join soon.
Click to expand...
Click to collapse
Thanks Teemo for more information. But I guess wifi is critical for the ROM. Hope that can be resolved soon.
Any ideas how long it will take to format?
I started it then realised there isn't a complete enough or stable enough ROM that supports the layout. I'm planning on going straight back to the original layout and reinstalling Resurrection Remix LP.
Can I just jump back to fastboot and restore the layout, or do I need to wait for this format the finish?
Or can I use any old ROM with this layout and it just won't use the extra space?
mattspew said:
Any ideas how long it will take to format?
I started it then realised there isn't a complete enough or stable enough ROM that supports the layout. I'm planning on going straight back to the original layout and reinstalling Resurrection Remix LP.
Can I just jump back to fastboot and restore the layout, or do I need to wait for this format the finish?
Or can I use any old ROM with this layout and it just won't use the extra space?
Click to expand...
Click to collapse
You cannot use the old ROM.
SlimKat 9.0 is very complete and works great on this layout. It is in the first post.
Formating only take a few seconds. Follow the guide exactly. If you forget to disconnect the USB cable, it will never finish.
Edit: yes, you can go to fastboot and install the old recovery, no problem.
teemo said:
You cannot use the old ROM.
SlimKat 9.0 is very complete and works great on this layout. It is in the first post.
Formating only take a few seconds. Follow the guide exactly. If you forget to disconnect the USB cable, it will never finish.
Edit: yes, you can go to fastboot and install the old recovery, no problem.
Click to expand...
Click to collapse
Thanks, but I'm looking for a LP ROM that's a close to stock as possible, so I've restored the layout and reinstalled Resurrection Remix LP v5.3.3.
Yep, I'd forgotten to disconnect the USB cable.. Oooops.
I hope Resurrection Remix LP gets on board with the new layout, space is a HUGE issue with LP on HOX.
@teemo
The SlimLP is the same as the 01.09 version? I mean, with wifi working right?
Grüß,
H.
PS: Thanks for the layout
There may be a changelog for SlimLpBig? May be I will try on sunday
Thanks,
Sent from my One X using XDA Free mobile app
dodjob said:
@teemo
The SlimLP is the same as the 01.09 version? I mean, with wifi working right?
Grüß,
H.
PS: Thanks for the layout
Click to expand...
Click to collapse
It is the same as 0111
Everything works like the other kitkat ROMs.
anto12 said:
There may be a changelog for SlimLpBig? May be I will try on sunday
Thanks,
Sent from my One X using XDA Free mobile app
Click to expand...
Click to collapse
No change log yet. But button configuration is working now
teemo said:
No change log yet. But button configuration is working now
Click to expand...
Click to collapse
I agree, buttons work now.
And one more important thing at least for me, sending MMS works. Sending MMS failed with every LP ROM except SlimLP BIG!!!
Thanks @teemo!!!
Eh eh. EVERYTHING works for me ))) happy WE!
Sent from my One X using XDA Free mobile app

Categories

Resources