File structure help (0 folder) - Sprint HTC One (M7)

Looking for a definitive answer here, as I have searched and read and I still have yet to find an answer so please don't tell me to go search or read such and such thread. Thanks.
So I have gone from 4.1 to 4.3 and back and forth several times and my question is how to handle the file structure change. I understand that a new emulated file structure is located at data/media/0 but should I copy my old data there? Is there anyway to prevent the multiple user file structure? I tried pushing a layout_version file and changing permissions but when I flashed a 4.3 Rom it still created a 0 folder.
Sent from my HTCONE using Tapatalk

Konfuzion said:
Looking for a definitive answer here, as I have searched and read and I still have yet to find an answer so please don't tell me to go search or read such and such thread. Thanks.
So I have gone from 4.1 to 4.3 and back and forth several times and my question is how to handle the file structure change. I understand that a new emulated file structure is located at data/media/0 but should I copy my old data there? Is there anyway to prevent the multiple user file structure? I tried pushing a layout_version file and changing permissions but when I flashed a 4.3 Rom it still created a 0 folder.
Sent from my HTCONE using Tapatalk
Click to expand...
Click to collapse
The actual location when viewed with a root file manager has been here on 4.1.2:
/data/media
Once you flash a 4.3 ROM, the actual location gets changed (and all the files moved) to here:
/data/media/0
The problems arise if the version of your custom recovery is not compatible with a 4.3 ROM. If it is not and you keep flashing 4.3 ROMs you might soon end up in trouble. If, while using the 'older' custom recovery, you continue flashing, your sdcard ends up somewhere around here:
/data/media/0/0/0/0/0/0 (etc.)
with all your files copied to every '0' directory and your symlinks end up the same way, and your device quickly runs out of space
Using a file manager that will show hidden files and folders, copy/move the files in the last '0' directory to:
/data/media/0
Now you can delete all the "extra 0" except for /data/media/0
Reboot
Profit?
Sent from my HTCONE using Tapatalk

elvisypi said:
The actual location when viewed with a root file manager has been here on 4.1.2:
/data/media
Once you flash a 4.3 ROM, the actual location gets changed (and all the files moved) to here:
/data/media/0
The problems arise if the version of your custom recovery is not compatible with a 4.3 ROM. If it is not and you keep flashing 4.3 ROMs you might soon end up in trouble. If, while using the 'older' custom recovery, you continue flashing, your sdcard ends up somewhere around here:
/data/media/0/0/0/0/0/0 (etc.)
with all your files copied to every '0' directory and your symlinks end up the same way, and your device quickly runs out of space
Using a file manager that will show hidden files and folders, copy/move the files in the last '0' directory to:
/data/media/0
Now you can delete all the "extra 0" except for /data/media/0
Reboot
Profit?
Sent from my HTCONE using Tapatalk
Click to expand...
Click to collapse
Thank you, I understand all that. What I don't get is should I copy all over my old data (backups and so on) into the /data/media/0 folder?
Sent from my HTCONE using Tapatalk

Konfuzion said:
Thank you, I understand all that. What I don't get is should I copy all over my old data (backups and so on) into the /data/media/0 folder?
Sent from my HTCONE using Tapatalk
Click to expand...
Click to collapse
Yes that's what I said
Sent from my HTCONE using Tapatalk

Konfuzion said:
Thank you, I understand all that. What I don't get is should I copy all over my old data (backups and so on) into the /data/media/0 folder?
Sent from my HTCONE using Tapatalk
Click to expand...
Click to collapse
I personally only do it on an as-needed basis, but it really depends on your usage. Before switching b/t 4.1 and 4.3+ ROMs, I make sure to copy/paste my SMS backup and/or MyBackup (rerware) backups to the appropriate file structure I am moving to. The apps themselves will only look in their current file structure when you try to restore. Of course in order to copy/paste the backups, you have to allow root access in ES File Explorer or whatever you use. TWRP backups can stay in the /0 structure just fine, as it will always look there in recovery.
Music and pics can be a challenge since they take up a lot of space, and replicating them in two different file structures will eat up a lot of storage. I don't store a lot of media on my phone, though, so I'm not sure the best way to address that. It's easy enough to find pics through file explorer, but I'm sure music playing apps only look in one folder or structure by default.
For most other apps, they will store their settings in each structure without taking up too much space, so it's fine to leave them as-is. Whenever you restore a Nandroid it's going to overwrite them again anyway.
Not sure if I have helped, but just sharing my experience.

Related

Why does File Manager HD destroy my files?

I keep having problems with File Manager HD, and it has pissed me off pretty bad this time. I was working with my SD card, and had copied the entire contents to my internal memory. I played around with it on my PC, then popped it back into my Xoom. Used it normally for a day. Downloaded files to it, copy and paste a few files, etc. At the end of the day I decided to copy my files back over. Did a multi select on my files, chose move, then paste in the external folder. The paste took about a half second. So I noticed my 6GB of files were replaced with the file names with 0.0k for the file sizes. I looked in the original location and they're gone. I shut down and booted to see no change. This isn't the first time it has done this, but definitely the first time moving a file over about 20k. Am I alone with these problems? I have never had that happen with Root Explorer or Androzip. Seems like some junky software to me.
You HAVE to copy and paste. You can't move files from one source to another. Otherwise the corruption happens.
I use Root Explorer and never have issues. Best money ever spent. That file manager is nice but I still prefer RE. Thanks for the heads up.
Sent from my PC36100 using XDA App
You're not the only one =.=
Stealyourface said:
You HAVE to copy and paste. You can't move files from one source to another. Otherwise the corruption happens.
Click to expand...
Click to collapse
^^^
You cannot cut/paste in linux/android.
starcms said:
^^^
You cannot cut/paste in linux/android.
Click to expand...
Click to collapse
Then why have the option at all?
tofelofogus said:
Then why have the option at all?
Click to expand...
Click to collapse
I would assume the devs have tries to be clever and copied the files then delete the original. I'm pretty sure the mv command would fail without data loss like that. Sounds like a poorly implemented file manager without the necessary failsafes for this sort of thing.
Sent from my HTC Desire using Tapatalk

[DEV] EFS Autobackup script for ROM Developers & Users

I have created a autobackup script for the EFS partition that contains information for your IMEI number.
I am addressing all ROM Developers to include this script in their ROM's!
What does this script do? It creates efs_autobackup folder on your SDCard and then tars the whole EFS partition into efs-backup.tar.gz file. Once this file is created, you can safely copy it to your PC. The script also looks for that file on reboot and if the file exists, it won't create another one.
What are the benefits of the tar file?
It keeps the permissions information for your EFS partition, so that when you want to restore your EFS partition, you only need to extract that file with the RootExplorer to your EFS partition and overwrite the old files. It sets the permissions automatically for you, so you don't need to mess or handle that yourself.
Please Developers, include this in your ROM so that users that forget to backup their EFS partition, don't have to regret that.
INSTRUCTIONS:​
For Users:
If you are on ROM that don't have this script integrated - you can flash the attached zip file in your Recovery to integrate the script.
For Developers:
Either take the file from the attached zip or create 01efstar file (very important to name it with 01 prefix, since it runs as first when the Phone starts, otherwise it won't work) in the /system/etc/init.d folder with this content:
Code:
#!/system/bin/sh
# EFS Autobackup script for Samsung Nexus S
# By Brainmaster
mount /dev/block/platform/s3c-sdhci.0/by-name/media /sdcard
if [ ! -f /sdcard/efs_autobackup/efs-backup.tar.gz ];
then
mkdir /mnt/sdcard/efs_autobackup
busybox tar zcvf /sdcard/efs_autobackup/efs-backup.tar.gz /efs
fi
umount /sdcard
Reserved 1.
What a good idea.
Should I implement this on the radio zip file too?
window7 said:
Should I implement this on the radio zip file too?
Click to expand...
Click to collapse
No, this is ROM based. If the ROM don't support the scripts, then it won't work.
BUT, I am working on a version that can do this directly in the recovery (undependable from ROM) - then you can integrate it in every Radio flash file.
Well done,good job !
Sent from my Nexus S using XDA App
brainmaster said:
No, this is ROM based. If the ROM don't support the scripts, then it won't work.
BUT, I am working on a version that can do this directly in the recovery (undependable from ROM) - then you can integrate it in every Radio flash file.
Click to expand...
Click to collapse
you only have to modify the updater-swcript? easy as a pie!
Sent from my Nexus S using XDA Premium App
i hope ur miui rom has this or else should i flash it?
Borky_16 said:
you only have to modify the updater-swcript? easy as a pie!
Sent from my Nexus S using XDA Premium App
Click to expand...
Click to collapse
Not so easy to mount the efs partition through the updater-script.
ancilary said:
i hope ur miui rom has this or else should i flash it?
Click to expand...
Click to collapse
From the next release on. If you want you can flash the script now.
yeah i dunno, first i made my own script and put into etc/init.d (running netarchy 1.3.9 which obv supports init.d scripts) - no dice. so i removed that file and flashed the zip and still getting no backup on sd.
ideas?
brainmaster said:
Not so easy to mount the efs partition through the updater-script.
Click to expand...
Click to collapse
oh that is right! :O forgot about it
Script successfully injected into my current installation of CM nightly, and successfully executed on reboot.
Uploaded the resulting file to Dropbox -- where I know I'll never lose it!
Two thumbs up!
I will include this script in my next rom update. I believe every dev should do the same.
Sent from my Google Nexus S using XDA Premium App
Good idea to put this into every ROM. Some people probably are not aware of the danger and if anything happens at least they can find the backup files on their sdcard. Maybe one should also add a small text file as an explanation what this backup is good for, so they do not accidentally delete it. Maybe you could also change the backup file on the sdcard to read-only.
Btw, you can also make a simple backup image with 'dd if=/dev/block/mtdblock6 of=efs.img'.
And for the record: I wondered why the /efs partition is mounted read-write and thought it might be a good idea change this to read-only. Problem was, without write access to /efs the SIM card would not unlock anymore. So not a good idea.
Just got my phone back from Regenersis with the IMEI restored! Shows that it can be done!
Ezekeel said:
Good idea to put this into every ROM. Some people probably are not aware of the danger and if anything happens at least they can find the backup files on their sdcard. Maybe one should also add a small text file as an explanation what this backup is good for, so they do not accidentally delete it. Maybe you could also change the backup file on the sdcard to read-only.
Btw, you can also make a simple backup image with 'dd if=/dev/block/mtdblock6 of=efs.img'.
And for the record: I wondered why the /efs partition is mounted read-write and thought it might be a good idea change this to read-only. Problem was, without write access to /efs the SIM card would not unlock anymore. So not a good idea.
Click to expand...
Click to collapse
Actually it should be as follows seeing as we get a read-only error;
dd if=/dev/block/mtdblock6 of=/mnt/sdcard/efs.img
Sent from my Nexus S using XDA Premium App
atrixboy said:
Actually it should be as follows seeing as we get a read-only error;
dd if=/Dec/block/mtdblock6 of=/months/sdcard/efs.img
Sent from my Nexus S using XDA Premium App
Click to expand...
Click to collapse
Please, IF you want to use the option to make efs.img (I don't know why would you like to do that, because tar is easier to extract and keeps the permissions), THEN you need right command.
You misspelled allot.
Code:
dd if=/dev/block/mtdblock6 of=/sdcard/efs.img
Yea I realised that after I hit post. I agree rfs is much nicer and cleaner to deal with.
dd if=/dev/block/mtdblock6 of=/mnt/sdcard/efs.img
Or efs.rfs. however you prefer. Rfs being the more logical
Sent from my Nexus S using XDA Premium App
brainmaster said:
Please, IF you want to use the option to make efs.img (I don't know why would you like to do that ...)
Click to expand...
Click to collapse
Because mtd6 contains more than the visible files mounted on /efs, such as the wimax keys.
My question is how to restore the partition without having to worry about this:
Dees_Troy said:
Using dd on mtd devices is a bad idea when it comes time to restore. It's a quick path to a brick. It tends to inadvertently mark blocks as bad.
Click to expand...
Click to collapse
Maximilian Mary said:
Because mtd6 contains more than the visible files mounted on /efs, such as the wimax keys.
My question is how to restore the partition without having to worry about this:
Click to expand...
Click to collapse
Darn. I did not know that.
Turns out one should use nanddump and nandwrite from mtd-utils (http://git.infradead.org/mtd-utils.git). Maybe someone can compile a version for Android. That would be quite useful.

[HowTo] [for cooks] preload partition / how and why you should use it!

Hi folks,
an other very short tutorial for the people (cooks), who do not know how to use the preload (hidden) partition and symlink system apps to it.
Some basics on preload-partition and why you should use it:
We have the so called 'hidden/preload partition' (mmcblk0p12) on our device. Besides the system partition with around 840 mb space, this hidden partition has additional 500 mb...this 500 mb were thought from sammy in the beginning mainly for their own crap like gamehub apps or learning hub and so on. But as system partition is on the edge right now with jelly bean they also use it for placing system apps inside --> the reason is that 840 mb in system is far to less for all files!
Usually most cooks just transfered system apps to data partition (located on your usb storage) to get out of this mess. This method with using hidden partition just gives great opportunity to keep your system partition smaller and you can transfer apps to it which you can not move to data! Your device will probably also perform faster with less space used inside system-partition. Our kernel dev Phil also made it possible now to backup/restore preload-partition within nandroid on his newer CWM-recoveries --> so now you can do a full backup/restore including this preload-partition....before it was not possible!
How to symlink system-apps to preload-partition:
just take the app 'Notepad++' (google for it) on your PC/Laptop, open it, create a new file and put the following inside ('nameofapp.apk' is just an example for any app you wanna symlink):
Link: /preload/symlink/system/app/nameofapp.apk
Click to expand...
Click to collapse
save and close as 'nameofapp.apk' --> this is the one to put inside /system/app to symlink to the original one you put inside /preload/symlink/system/app.
Now do this steps with every system app you wanna symlink...
This is the manual way to this, though I know scripts can be used to do these steps automatically... But this way you at least get a basic understanding how it works!
I won't tell you how to push apps to preload-partition inside CWM-flashable ROM in general, cause this is basic knowledge when you wanna cook a ROM - but you could download any ROM already using this method and look inside 'META-INF\com\google\android\updater-script' and you will know how to do this.
Thanks for the guide mate. I'm sure this will help a lot of us out
In dsixda's Kitchen the symlinks are automatically generated with a few lines of code in updater-script.
I'll will try to extract them when continuing to work with my Rom/Tutorial, so non-kitchen-builders can user it in their updater-scripts.
Have to say: it's very nice that you share your knowledge and experience with us, eybee. Thanks for that.
Thanks for the knowledge.
You're the man..
Sent from my GT-N7000 using Tapatalk 2
Hey eybee. Nice guide.
One question. I'm using dsixda kitchen to build a rom but the zipaligning falls over when it reaches the nameofapk.apk text file. Anyway round this?
Sent from my GT-N7000 using xda premium
maskerwsk said:
Hey eybee. Nice guide.
One question. I'm using dsixda kitchen to build a rom but the zipaligning falls over when it reaches the nameofapk.apk text file. Anyway round this?
Sent from my GT-N7000 using xda premium
Click to expand...
Click to collapse
What do you mean by "nameofapk.apk"?
Maps.apk? (Then I know what you mean).
eybee won't give explanations for that because he doesn't use the kitchen.
ThaiDai said:
What do you mean by "nameofapk.apk"?
Maps.apk? (Then I know what you mean).
eybee won't give explanations for that because he doesn't use the kitchen.
Click to expand...
Click to collapse
yeah for example i moved MusicPlayer.apk to preload and created notepad++ file for MusicPlayer.apk which i put in system/app.
but when zipaligning apks in kitchen, when it reached the system/app/MusicPlayer.apk it fails
maskerwsk said:
yeah for example i moved MusicPlayer.apk to preload and created notepad++ file for MusicPlayer.apk which i put in system/app.
but when zipaligning apks in kitchen, when it reached the system/app/MusicPlayer.apk it fails
Click to expand...
Click to collapse
of course i fails...you can not zipalign a symlink
just zipalign before, when all apps are still in /system/app and move to /preload afterwards
eybee1970 said:
of course i fails...you can not zipalign a symlink
just zipalign before, when all apps are still in /system/app and move to /preload afterwards
Click to expand...
Click to collapse
The problem is explained in the kitchen itself. You get a warning to move all apps first before de-odexing.
But I didn't get any mistake like this when zipaligning - I think the related script checks if there are symlinks. I move the apps before the de-odexing step in the Advanced options but not when zipaligning. So maybe he has some other problems.
ThaiDai said:
The problem is explained in the kitchen itself. You get a warning to move all apps first before de-odexing.
But I didn't get any mistake like this when zipaligning - I think the related script checks if there are symlinks. I move the apps before the de-odexing step in the Advanced options but not when zipaligning. So maybe he has some other problems.
Click to expand...
Click to collapse
As explained: he is trying to zopalign the symlink in /system/app which of course fails (it is just a link named .apk!)...the original app he already moved to preload
eybee1970 said:
of course i fails...you can not zipalign a symlink
just zipalign before, when all apps are still in /system/app and move to /preload afterwards
Click to expand...
Click to collapse
Awesome. Thats what I was after
Sent from my GT-N7000 using xda premium
This is excellent! We can now take control of an extra 500mb that Samsung thought we would never have access to
Sent from my GT-N7000 using xda app-developers app
shoey63 said:
This is excellent! We can now take control of an extra 500mb that Samsung thought we would never have access to
Sent from my GT-N7000 using xda app-developers app
Click to expand...
Click to collapse
this partition is well known since Galaxy S2 (paulobrien was talking about it back in Aug 2011)....but was not really needed til now
eybee1970 said:
As explained: he is trying to zopalign the symlink in /system/app which of course fails (it is just a link named .apk!)...the original app he already moved to preload
Click to expand...
Click to collapse
Using a simple more powerfull line in update script
Code:
symlink("/preload/symlink/system/app", "/system/app");
this symlinks the whole folder to system/app so all that is in preload is also visible and active in a linked system/app folder.
This removes the whole functionality of the /system/app folder though but you have a very fast and clean system saves a lot of typing/ copypasting though
Robbie Hood said:
Using a simple more powerfull line in update script
Code:
symlink("/preload/symlink/system/app", "/system/app");
this symlinks the whole folder to system/app so all that is in preload is also visible and active in a linked system/app folder.
This removes the whole functionality of the /system/app folder though but you have a very fast and clean system
Click to expand...
Click to collapse
yes, I saw in your script already
eybee1970 said:
yes, I saw in your script already
Click to expand...
Click to collapse
Always finding ways to improve :highfive:
So there is NO /system/app folder in my rom
@RobbieHood. How would you do in user space? Using linux commands in terminal for example?
Sent from my GT-N7000 using xda app-developers app
Robbie Hood said:
Always finding ways to improve :highfive:
So there is NO /system/app folder in my rom
Click to expand...
Click to collapse
for all: but there will be one after installation, but just containing symlinks...
eybee1970 said:
for all: but there will be one after installation, but just containing symlinks...
Click to expand...
Click to collapse
well not exactly
The folder is linked so when you open it via /system/app or any browser you are virtually in /preload/symlink/system/app with the real apks
its somewhat the same principle as the sdcard on galaxy s3 which is linked to /data/media and does not have its own partition
Robbie Hood said:
well not exactly
The folder is linked so when you open it via /system/app or any browser you are virtually in /preload/symlink/system/app with the real apks
its somewhat the same principle as the sdcard on galaxy s3 which is linked to /data/media and does not have its own partition
Click to expand...
Click to collapse
Ok...this is the correct way to say it
Just did not want anybody coming in here then and say "hey, when i open with Root Explorer i still can see /system/app and all apps inside..."

[Q] TWRP Nandroid Backup/Lollipop Issue...

I have a T-Mobile HTC M7 converted to GPE, recently flashed to Lollipop from KK 4.4.4. I use Tasker and OpenRecoveryScript to automate Nandroid backups through TWRP, then use FolderSync to upload said backup to my server over WiFi. My method worked perfectly until I flashed to Lollipop.
Since flashing to Lollipop, whether through Tasker or manually, I get an error in FolderSync saying the Nandroid files can't be read or copied. If I use TWRP's file manager, I can view the Nandroid folders/files, but those same files are not viewable using ES File Explorer in Lollipop. When I navigate to TWRP\BACKUPS\{Serial Number} folder in ES File Explorer, the {Serial Number} folder (where the TWRP backups are) is listed as a 0k(zero) file that can't be read or copied. When I try to create a new folder (in the BACKUPS folder) using ES File Explorer I get an error saying the operation failed.
Just this morning I restored a Nandroid backup using TWRP, and now in ES File Explorer my entire SDcard folder is blank (not true, as all my apps still function), but in TWRP file manager the SDcard folder is fine. At first I thought the problem was with ES File Explorer, but I tried a few different file explorers with the same result (FX File Explorer tells me 'Access was Denied' when trying to view the sdcard folder. ) All file managers I've tried have root access.
I thought Lollipop fixed the sdcard problems from KK, but this is a whole new one for me. Is there an issue with Lollipop not being able to read files that are written through recovery/TWRP? Any help would be greatly appreciated.
lords8n said:
I have a T-Mobile HTC M7 converted to GPE, recently flashed to Lollipop from KK 4.4.4. I use Tasker and OpenRecoveryScript to automate Nandroid backups through TWRP, then use FolderSync to upload said backup to my server over WiFi. My method worked perfectly until I flashed to Lollipop.
Since flashing to Lollipop, whether through Tasker or manually, I get an error in FolderSync saying the Nandroid files can't be read or copied. If I use TWRP's file manager, I can view the Nandroid folders/files, but those same files are not viewable using ES File Explorer in Lollipop. When I navigate to TWRP\BACKUPS\{Serial Number} folder in ES File Explorer, the {Serial Number} folder (where the TWRP backups are) is listed as a 0k(zero) file that can't be read or copied. When I try to create a new folder (in the BACKUPS folder) using ES File Explorer I get an error saying the operation failed.
Just this morning I restored a Nandroid backup using TWRP, and now in ES File Explorer my entire SDcard folder is blank (not true, as all my apps still function), but in TWRP file manager the SDcard folder is fine. At first I thought the problem was with ES File Explorer, but I tried a few different file explorers with the same result (FX File Explorer tells me 'Access was Denied' when trying to view the sdcard folder. ) All file managers I've tried have root access.
I thought Lollipop fixed the sdcard problems from KK, but this is a whole new one for me. Is there an issue with Lollipop not being able to read files that are written through recovery/TWRP? Any help would be greatly appreciated.
Click to expand...
Click to collapse
I'm still looking forward to automating my backups and syncing them to my server, but I had a similar problem on my OnePlus One today - the TWRP folder was marked as being a zero byte FILE instead of being a folder. Using Solid Explorer for file management on my devices, and the OPO is running a Lollipop ROM as well. Never saw this on KK ROM or on my Samsung Tablet (KK as well)
So - I'd say it's a good observation that this is likely to be ROM related, not device.
BTW: Would you mind telling me how you automated nandroid and syncing?
lords8n said:
I have a T-Mobile HTC M7 converted to GPE, recently flashed to Lollipop from KK 4.4.4. I use Tasker and OpenRecoveryScript to automate Nandroid backups through TWRP, then use FolderSync to upload said backup to my server over WiFi. My method worked perfectly until I flashed to Lollipop.
Since flashing to Lollipop, whether through Tasker or manually, I get an error in FolderSync saying the Nandroid files can't be read or copied. If I use TWRP's file manager, I can view the Nandroid folders/files, but those same files are not viewable using ES File Explorer in Lollipop. When I navigate to TWRP\BACKUPS\{Serial Number} folder in ES File Explorer, the {Serial Number} folder (where the TWRP backups are) is listed as a 0k(zero) file that can't be read or copied. When I try to create a new folder (in the BACKUPS folder) using ES File Explorer I get an error saying the operation failed.
Just this morning I restored a Nandroid backup using TWRP, and now in ES File Explorer my entire SDcard folder is blank (not true, as all my apps still function), but in TWRP file manager the SDcard folder is fine. At first I thought the problem was with ES File Explorer, but I tried a few different file explorers with the same result (FX File Explorer tells me 'Access was Denied' when trying to view the sdcard folder. ) All file managers I've tried have root access.
I thought Lollipop fixed the sdcard problems from KK, but this is a whole new one for me. Is there an issue with Lollipop not being able to read files that are written through recovery/TWRP? Any help would be greatly appreciated.
Click to expand...
Click to collapse
husky69 said:
I'm still looking forward to automating my backups and syncing them to my server, but I had a similar problem on my OnePlus One today - the TWRP folder was marked as being a zero byte FILE instead of being a folder. Using Solid Explorer for file management on my devices, and the OPO is running a Lollipop ROM as well. Never saw this on KK ROM or on my Samsung Tablet (KK as well)
So - I'd say it's a good observation that this is likely to be ROM related, not device.
BTW: Would you mind telling me how you automated nandroid and syncing?
Click to expand...
Click to collapse
FAQ
Google Play Edition 5.0.1
SdCard
Q.)
The sdcard not being visible via PC is annoying.
Is there any fix for this yet?
A.)
Yes, here is a work-around
Install Terminal Emulator then type:
Code:
su
restorecon -FR /data/media/0
and sdfix in the play store should do it
husky69 said:
I'm still looking forward to automating my backups and syncing them to my server, but I had a similar problem on my OnePlus One today - the TWRP folder was marked as being a zero byte FILE instead of being a folder. Using Solid Explorer for file management on my devices, and the OPO is running a Lollipop ROM as well. Never saw this on KK ROM or on my Samsung Tablet (KK as well)
So - I'd say it's a good observation that this is likely to be ROM related, not device.
BTW: Would you mind telling me how you automated nandroid and syncing?
Click to expand...
Click to collapse
The issue definitely seems to be related to Lollipop. I didn't have the problem running KK, either. From all the research I've done it seems to be related to Lollipop looking for the sdcard in data/media/0 while KK and TWRP point to storage/emulated/0. The terminal command restorecon -FR /data/media/0 fixed it for me.
As for the automated Nandroid and sync, I use a combination of Tasker, OpenRecoveryScript, and FolderSync on the Android side and a few .bat scripts on the server side.
Tasker deletes the previous backup, copies the OpenRecoveryScript to the proper folder, sets a variable to show backup has started, then reboots into recovery where TWRP then performs the Nandroid and reboots. On reboot Tasker checks that the Nandroid folder exists, triggers a notification saying same, then triggers FolderSync to sync to my server. I only keep one backup on my phone and 2 on my server. I set Foldersync to sync deletions which deletes the previous backup on my server, but I also have my server set to copy the Nandroid to a separate directory, so I always have 2 backups if necessary. I use a script on my server that checks for the newest Nandroid, then copies it to separate directory before deleting the oldest one. When I wake up in the morning I can see Tasker notification that Nandroid file exists and FolderSync notification of successful sync. I also have Tasker set to trigger a notification if Nandroid fails, and Foldersync will also notify if an error occurred during sync. I use a Tasker profile to trigger all of this at 3am but I also have a shortcut that allows me to perform it manually whenever I want, with 1 click.
Note that this method requires the paid version of FolderSync for Tasker integration and is a little involved, but I've tried other methods (Onandroid, etc...), and this one is the most reliable. I know I can count on Tasker and TWRP to do their jobs, no third party necessary. The only redundancy variable I haven't taken into consideration is if the Nandroid backup is corrupt, but TWRP seems pretty reliable in that dept and that hasn't happened yet...
If you're interested, I'll send you the corresponding Tasker profiles and tasks.
lords8n said:
If you're interested, I'll send you the corresponding Tasker profiles and tasks.
Click to expand...
Click to collapse
I am interested
husky69 said:
I am interested
Click to expand...
Click to collapse
Sorry for the delay, been busy with holiday stuff. Here are the Tasker/Nandroid files. Extract the .prf files to /Tasker/profiles and the .tsk files to /Tasker/tasks, then import each into Tasker. You will need to edit (in Tasker) Nandroid_Backup.tsk.xml to reflect your TWRP Nandroid backup folder, and openrecoveryscript (in txt editor) to add/remove backup options if necessary.

SDcard storage mystery

I have been busy trying to clean up my One M7 and making a nandroid back up in preparation to try to go back to stock (with S-on..). That in itself took a lot of trial and error but I managed. I think the problem was simply missing storage space. So I deleted all my music (11.5 Gb) and a few files more. Finally I had a full 6 Gb backup which I transfered to my PC to save space on the internal storage. Initially TWRP did showd two backups but I think they were incomplete because I wasn't able to locate the files.
Now, If I connect to my Windows 10 PC, storage shows a normal 25.4 Gb total but it also shows 10.16 used.
But when I open the storage folder on my PC and select its entire content it only adds up to 1.99 GB. I ticked the box "show items" in Windows 10.
My question is: how can I make this mysterious 8 Gb visible? Am I missing an important thing?
I have Rootexplorer and ESexplorer installed and have used them to investigate. I checked the "show hidden folders" button. I also did a search in the "general" forum and read most of the relevant posts, I'm aware that the OS takes up a lot of space and I'm aware marketing bull**** about GBs.
Please bear in mind that I am an interested NOOB so I need to have it spelled out......
Any help is highly appreciated.
You probably turned on recycle bin in ES file explorer. Try to clean the recycle bin, and turn it off.
Good luck,
Mike
since ur returning to stock with s-on
i always wipe everything in twrp including internal storage using the advanced wipe option
jjss4433 said:
You probably turned on recycle bin in ES file explorer. Try to clean the recycle bin, and turn it off.
Good luck,
Mike
Click to expand...
Click to collapse
Mike, that was spot on! so simple, just like Windows.....
jjss4433 said:
You probably turned on recycle bin in ES file explorer. Try to clean the recycle bin, and turn it off.
Good luck,
Mike
Click to expand...
Click to collapse
Mike, I didn't succeed...
in Settings > Storage, is there any way to make the item "Other" visible. it holds a whopping 17.83 GB.
APPS: 3.11 GB
Music: 46.47 MB
Photos: 289 MB
Downloads: 361 MB
Basically, when I connect to the PC and open the HTC One folder all stuff is visible except the "other" folder
Perhaps I take the long road and install Crushalot's Guru_Reset_M7_2.24.111.3.zip and go through the motions of updating through HTC until I am completely up to date and then in the end install TWRP?
My phone is a
(bootloader) modelid: PN0710000
(bootloader) cidnum: T-MOB101
thanks in advance for the help
Okay, I found it.
ES File explorer is not my favourite.. too much distraction
I used Root Explorer and turned on "legacy long click menu", it enables to see more detail and also "properties" of any given folder.
If you click on a folder and it takes a loooong time to show the Size of the folder, it is a BIG folder..... be patient.
Going through all the folders one-by-one I found a lot of GBs in root/data/media/0/. » 11.38 GB
I found a Backup folder in root/data/media/0/Downloads which will not be visible on your PC !. (3.81 GB)
I also deleted the full backup in the TWRP folder. That one is also on my PC so I keep it there instead of on the phone. Saved another 5.83 GB..
After that I somehow suddenly have a very acceptable 19.9 GB of free space.
YESSSSSSSSSSS!
gentle_giant said:
Okay, I found it.
ES File explorer is not my favourite.. too much distraction
I used Root Explorer and turned on "legacy long click menu", it enables to see more detail and also "properties" of any given folder.
If you click on a folder and it takes a loooong time to show the Size of the folder, it is a BIG folder..... be patient.
Going through all the folders one-by-one I found a lot of GBs in root/data/media/0/. » 11.38 GB
I found a Backup folder in root/data/media/0/Downloads which will not be visible on your PC !. (3.81 GB)
I also deleted the full backup in the TWRP folder. That one is also on my PC so I keep it there instead of on the phone. Saved another 5.83 GB..
After that I somehow suddenly have a very acceptable 19.9 GB of free space.
YESSSSSSSSSSS!
Click to expand...
Click to collapse
/data/media is the real location of your internal "sdcard" (/sdcard) since android 3.0. Instead of having 2 separate partitions for data and sdcard, its now on the same partition, /sdcard is a simlink to /data/media. With android 4.2 came the multi-user feature, the main user is called "0" so /data/media/0 = main user internal storage = /sdcard. What you see in /data/media/0 should be visible from your computer, if its not then there is something wrong with your phone. Just explaining it so you don't make the same mistake as others did: "Hey I have an unwanted copy of all my /sdcard files in /data/media/0, lets delete everything in /data/media/0 to save some space" ...
Now if you can't see the files stored in /data/media/0 when connected to your computer or when going to /sdcard from your phone, you might want to try this
alray said:
/data/media is the real location of your internal "sdcard" (/sdcard) since android 3.0. Instead of having 2 separate partitions for data and sdcard, its now on the same partition, /sdcard is a simlink to /data/media. With android 4.2 came the multi-user feature, the main user is called "0" so /data/media/0 = main user internal storage = /sdcard. What you see in /data/media/0 should be visible from your computer, if its not then there is something wrong with your phone. Just explaining it so you don't make the same mistake as others did: "Hey I have an unwanted copy of all my /sdcard files in /data/media/0, lets delete everything in /data/media/0 to save some space" ...
Now if you can't see the files stored in /data/media/0 when connected to your computer or when going to /sdcard from your phone, you might want to try this
Click to expand...
Click to collapse
Hi Alray,
Thanks for that explanation, it's very helpful.
reading your reply I realized I was not entirely clear: the "Download" folder is visible on my Windows 10 PC but the folder "backup" inside "download" wasn't visible on the PC.
By the way, for some reason I have a "Download" folder as well as a folder called "downloads" (with this exact spelling)
The later contains stuff that I cannot remember putting there... perhaps a synchronization effect? Although I never asked for it as far as I can remember.
I tried your suggestion ( the link) but it didn't work out.
Since I hardly know what I'm doing I leave it at that..
but in case you're curious, this was the cmd result:
c:\android>adb shell
[email protected]:/ $ su
su
restorecon -1|[email protected]:/ $ FR /data/media/0
restorecon -FR /data/media/0
SELinux: Loaded file_contexts from /file_contexts
SELinux: Could not stat /data/media/0: Permission denied.
[email protected]:/ $

Categories

Resources