Flashing 4.2 ROMs moves sdcard to /0 - Android Q&A, Help & Troubleshooting

When i flash a 4.2 rom, my entire sdcard is nested in a /0 folder in my new sdcard location. From what i understand this has to do with the new users feature. Its pretty confusing and if i don't take the time to move my entire sdcard back from /0 (takes some time) i end up with nested folders like /sdcard/0/0/0 and everything is hard to find. Is there any way to avoid this other than manually moving my whole sdcard every time a flash a new ROM? I know im not the only flashaholic here lol
Sent from my Nexus 7

jefferson9 said:
When i flash a 4.2 rom, my entire sdcard is nested in a /0 folder in my new sdcard location. From what i understand this has to do with the new users feature. Its pretty confusing and if i don't take the time to move my entire sdcard back from /0 (takes some time) i end up with nested folders like /sdcard/0/0/0 and everything is hard to find. Is there any way to avoid this other than manually moving my whole sdcard every time a flash a new ROM? I know im not the only flashaholic here lol
Sent from my Nexus 7
Click to expand...
Click to collapse
You need to update your recovery... the newer version of TWRP & CWM don't create nested user folders!

craigacgomez said:
You need to update your recovery... the newer version of TWRP & CWM don't create nested user folders!
Click to expand...
Click to collapse
Well, i use the CWM touch 6.0.2.7-i9300 (latest version on cwm site) and the issue stay. All roms bases on the latest cyanogenmod (4.2) have this issue too, or because in that is common have a modified recovery, or because a issue with recovery + new kernels (seems to be related with multi user, i never try this feature and probaly never use, my phone is just for me).
Being a work really hard test new roms, especially with software that seek its parameters to specific folders without option to search / select the folders.
a good update would implement a feature to let the user choose a folder where the files are, like nandroid backups, seems to be possible in TWRP, but not in CWM.
This is one, but still have to move the all other files to see them properly in all apps (yes, i know, titanium lets to choose where the backup files are) but with only 16GB (most common models) the storage is quickly filled with duplicated files/folders and cause confusion to the user where to look or put your files.
realy hard ...

Related

[Q] APK Creation

Well as many of you know we're over most of the hurdles we needed to jump with the CM7 build for Nook tablet.
Updates for the internal version are simple via CWM, the SD version is not so simple of course.
I'm assuming that it should be possible to built an APK that gains superuser permissions then copies the new files to the system. Can anybody confirm this is possible please?
We need to know that we can tell our SD user that they can update their version just as easy as the internal user
Thanks in advance for your help again everyone!
Well presumably this is how ROM Manager and Metamorph both do their thing, just in a slightly more round about way (as they don't come with the files they need to copy). I'm almost 100% sure this is possible, but I've never tried it personally.
EDIT: Looks like this is how you'd do it: http://developer.android.com/reference/java/io/File.html. Specifically the renameTo() method.
CelticWebSolutions said:
Well as many of you know we're over most of the hurdles we needed to jump with the CM7 build for Nook tablet.
Updates for the internal version are simple via CWM, the SD version is not so simple of course.
I'm assuming that it should be possible to built an APK that gains superuser permissions then copies the new files to the system. Can anybody confirm this is possible please?
We need to know that we can tell our SD user that they can update their version just as easy as the internal user
Thanks in advance for your help again everyone!
Click to expand...
Click to collapse
Well there are about a dozen ways to do this. First of one of the hardest things is comming up with the commands/script. I can defiantly do this. If you want an apk, there are a few guys whom could port my script to an apk. I'm going to make a script here that will format, and create partitions and extract directly from the nook, no need to go through the fancy formatting and such, just go into terminal and run the script. Ill post a prototype for you to have the testers test!
Do you think something like BacksideUpdater inside custom ROM for LG Optimus V?
made by JerryScript
JerryScript i very nice guy, I bet if you ask him, he will let you play with his code
if is it what you looking for
Yes, this is possible. I wrote an app that flashes the recovery partition for my older Froyo phone in the very rudimentary Basic4Android. Copying files under root privileges was part of this process. Fairly easy if you find the right coding examples in whatever your development platform of choice.
xdajunkman said:
Yes, this is possible. I wrote an app that flashes the recovery partition for my older Froyo phone in the very rudimentary Basic4Android. Copying files under root privileges was part of this process. Fairly easy if you find the right coding examples in whatever your development platform of choice.
Click to expand...
Click to collapse
So one of the problems is its not really copying. Its more of an extraction from one place to another. We are required to use dd, and fdisk(for formatting).
GREAT! I was worried updates would be to complicated for people
Sent from my Nook Tablet using xda premium
... and I was worried that I might have to wipe my NT clean again to get the updates. After a week with this wonderful upgrade, I've got a LOT of customization I don't want to lose...
Whoops, wrong button with the thanks. Anyway, it occurs to me you could just have people run a script from a terminal emulator. That would probably be the simplest way to do it. Make an Update folder on the SD card, add it to the PATH by default, and users could just copy over the update files and run the script. Just a thought.
Sycobob said:
Whoops, wrong button with the thanks. Anyway, it occurs to me you could just have people run a script from a terminal emulator. That would probably be the simplest way to do it. Make an Update folder on the SD card, add it to the PATH by default, and users could just copy over the update files and run the script. Just a thought.
Click to expand...
Click to collapse
Has to be simple, something like copy an update.zip onto the SD card then run the apk which will automatically run the update in the zip But my knowledge of such things is limited so I need help there
Same process. With the above method, the user would only have to copy over the file, open a terminal, and type 'update'. With the apk idea you just have to add a little more time for someone to actually write the app (not that it would take too long).
Sycobob said:
Same process. With the above method, the user would only have to copy over the file, open a terminal, and type 'update'. With the apk idea you just have to add a little more time for someone to actually write the app (not that it would take too long).
Click to expand...
Click to collapse
Hmm.... that sounds good.
Anybody know how to actually implement it ?
Dammit, idk why I keep hitting the thanks button thinking it's reply >.>
Anyway, it's just a matter of setting the PATH variable to include /sdcard/Update/ or something similar. To make an actual update, make a folder called Update, fill it with all the files that need to be copied over (probably in a directory structure), and write a script that actually copies everything over. You'll need to make sure sh is in /system/bin (I think it is by default).
You could zip the the files as well, using gunzip (busybox?) to extract them before copying them, then deleting them when you're done, just to keep it cleaner for the user.
The only downside to all this is that I don't know how you would flash a kernel.
Sycobob said:
Dammit, idk why I keep hitting the thanks button thinking it's reply >.>
Click to expand...
Click to collapse
That makes two of us!
Sycobob said:
Anyway, it's just a matter of setting the PATH variable to include /sdcard/Update/ or something similar. To make an actual update, make a folder called Update, fill it with all the files that need to be copied over (probably in a directory structure), and write a script that actually copies everything over. You'll need to make sure sh is in /system/bin (I think it is by default).
You could zip the the files as well, using gunzip (busybox?) to extract them before copying them, then deleting them when you're done, just to keep it cleaner for the user.The only downside to all this is that I don't know how you would flash a kernel.
Click to expand...
Click to collapse
I'm guessing you'd just flash it as usual, surely that one is the easiest? Copying stuff to boot partition would hopefully be just as simple, I was mainly worried about updating system files. I could do with building one for the current update to test the theory!

[Q] Flashing a 4.2.2 rom

This might be a dumb question, but I am a noob and need someone to please help me out. I just unlocked my bootloader and rooted my phone, so my question is if I perform a back up and then Flash a 4.2.2 rom in TWRP recovery can I restore back to the stock rooted 4.1.2? I searched on the forum to see if this question had been asked before, but I couldn't find anything. If someone could please answer my question asap I would greatly appreciate it.
Also if this question was posted in the wrong section feel free to move it or let me know any I will delete it and post it in the right place.
Thanks again
Yes
Sent from my HTC One using Tapatalk 4
Thanks for the response I read somewhere, that when you update to a 4.2.2 rom the 4.1.2 rom back gets deleted.
jro003 said:
Thanks for the response I read somewhere, that when you update to a 4.2.2 rom the 4.1.2 rom back gets deleted.
Click to expand...
Click to collapse
No. Going to 4.2.2 moves the sdcard contents to /data/media/0 (if I remember correctly). I've seen some recommend backing up your sdcard to your computer, formatting the sdcard on the device, then restoring the contents after you flash to 4.2.2.
At any rate, everything will still be there: just somewhere else.
Thanks for the reply Simba, do know how to back up your sdcard to your computer and then format the sdcard on the device
jro003 said:
Thanks for the reply Simba, do know how to back up your sdcard to your computer and then format the sdcard on the device
Click to expand...
Click to collapse
I'm going to get really basic, so don't be offended if it seems like I'm assuming you don't know how to do something. I always outline everything exactly for future people who find this thread. I've found countless old threads that have been a huge help because someone took the time to type everything out .
*Connect your device and access your sdcard files by opening My Computer - you should see your device*
Literally just copy all of the contents to your computer. Create a folder on your desktop (or wherever), select everything on your sdcard (ctrl + A), copy (ctrl + C), and paste it in the folder.
Then just delete everything on the sdcard after you've confirmed a successful copy. Same thing - ctrl + A, delete.
After you flash 4.2.2, connect the device again and copy/paste (or drag/drop) the contents of the folder (not the folder itself, but everything inside of it) you created to your device. You'll have all your files without dealing with them being in a different location.
There was some discussion of a way to execute a shell command that would fix the issue. I'm an experienced user; the contents of the sdcard ended up being wiped lol. Save yourself the headache.
By the way, I'm assuming you're on PC by giving those ctrl commands lol. If you're not (on Mac, I suppose), do whatever the equivalent is.
Not offended at all, I really appreciate you simpling it down for me. I have a few small quick questions for you, if I am using a Mac (I have both but Mac is my daily computer) do I just connect my phone and use something like Android file transfer or Htc sync manager to copy all the folders inside the sdcard to my computer? After flashing the 4.2.2 where on the phone do I copy the files I backed up on my computer on to? And if I erase everything off the SD card after copying it to the computer won't that effect the operating system? Especially if I chose to flash back to the 4.1.2 stock rom? Sorry to ask you so many questions but I am really new to this, and I appreciate all the help you can give me the last thing I want to do is brick my phone.
jro003 said:
Not offended at all, I really appreciate you simpling it down for me. I have a few small quick questions for you, if I am using a Mac (I have both but Mac is my daily computer) do I just connect my phone and use something like Android file transfer or Htc sync manager to copy all the folders inside the sdcard to my computer? After flashing the 4.2.2 where on the phone do I copy the files I backed up on my computer on to? And if I erase everything off the SD card after copying it to the computer won't that effect the operating system? Especially if I chose to flash back to the 4.1.2 stock rom? Sorry to ask you so many questions but I am really new to this, and I appreciate all the help you can give me the last thing I want to do is brick my phone.
Click to expand...
Click to collapse
I'm sure that would work, though I have no experience with either. And typically, the directory you see on the computer is the default sdcard location. So there isn't a specific place you need to put it.
And it won't affect the operating system. At boot, Android automatically creates certain folders and files anyway. There are data files that apps use, but if they aren't there, they'll just recreate them. At the worst, a skin (or the like) won't be available if the file isn't on the sdcard. I've seen this with a calendar widget I use. Everything becomes fully functional once the files are back.
I don't really like using that verbiage - "functional," because it is perfectly safe to delete the sdcard's contents. Like I said, Android creates folders/files at boot, so they're not really necessary. Anything that affects the operating system is tucked away in a directory that requires root access :good:.
Big thanks for all the help Simba, you helped out a lot.
jro003 said:
Not offended at all, I really appreciate you simpling it down for me. I have a few small quick questions for you, if I am using a Mac (I have both but Mac is my daily computer) do I just connect my phone and use something like Android file transfer or Htc sync manager to copy all the folders inside the sdcard to my computer? After flashing the 4.2.2 where on the phone do I copy the files I backed up on my computer on to? And if I erase everything off the SD card after copying it to the computer won't that effect the operating system? Especially if I chose to flash back to the 4.1.2 stock rom? Sorry to ask you so many questions but I am really new to this, and I appreciate all the help you can give me the last thing I want to do is brick my phone.
Click to expand...
Click to collapse
You wouldn't want to use HTC Sync as this only transfers files like music, pictures and such. You would actually want to open up your sdcard and copy all as was told. I use Linux now so I don't have to worry about Sync, but I personally think it is a useless piece of software. It is easier to just drag and click, and you don't need a program to do that.
Congrats on entering the world of rooting and customization BTW! :good: It's addictive, be warned! :cyclops:
Okay thanks for the reply, that's actually what it did (drag and dropped to my computer) :highfive:

S3 Directory structure.... [root]

Hi guys,
Long time lurker first time poster. I've always been handy enough to follow the clues on xda forum to be able to work things out and google, but this time around I'm stuck and would appreciate a few leads... maybe I'm google-ing the wrong terms.
Anyways, I'm looking to get more info on directory structures on the phone and microsd card.
Let me explain: After rooting my phone and putting a new ROM on it, I noticed that the ROM does does not read my sd card. I looked it up and apparently the rom had a new structure on jb (or was it ics, I can't remember,) and there was a fix that I needed to run in recovery which fixed it, when I changed to a different ROM (was running sentinelRom and now slimrom) it didn't read again and I ran the file in recovery again.
This time I noticed that the kinda added extra directories and I'm not sure which one the rom is using.
As an example, I noticed that when I went into es explorer, there would be similar directories within each other (ie. device/0/0 .....)
and since I've gotten notice that I'm running low on space, I noticed under storage that the directory /0 is taking the most space.
Problem is I don't want to just delete it... the last time I tried to clear a directory I deleted some files that were being used. (luckily they were only sound files, ) so somehow, certain directories are being used by the rom, I'm just not sure which one....
Anyways, I would be much obliged if someone could point me in the right direction on where I can get info or be able to clean up my directories before I upgrade to the kitkat version of my ROM.
Thanks in advance folks!
grungypoo said:
Hi guys,
Long time lurker first time poster. I've always been handy enough to follow the clues on xda forum to be able to work things out and google, but this time around I'm stuck and would appreciate a few leads... maybe I'm google-ing the wrong terms.
Anyways, I'm looking to get more info on directory structures on the phone and microsd card.
Let me explain: After rooting my phone and putting a new ROM on it, I noticed that the ROM does does not read my sd card. I looked it up and apparently the rom had a new structure on jb (or was it ics, I can't remember,) and there was a fix that I needed to run in recovery which fixed it, when I changed to a different ROM (was running sentinelRom and now slimrom) it didn't read again and I ran the file in recovery again.
This time I noticed that the kinda added extra directories and I'm not sure which one the rom is using.
As an example, I noticed that when I went into es explorer, there would be similar directories within each other (ie. device/0/0 .....)
and since I've gotten notice that I'm running low on space, I noticed under storage that the directory /0 is taking the most space.
Problem is I don't want to just delete it... the last time I tried to clear a directory I deleted some files that were being used. (luckily they were only sound files, ) so somehow, certain directories are being used by the rom, I'm just not sure which one....
Anyways, I would be much obliged if someone could point me in the right direction on where I can get info or be able to clean up my directories before I upgrade to the kitkat version of my ROM.
Thanks in advance folks!
Click to expand...
Click to collapse
Have a look in the stickies thread. Described over there why there is a new structure and how to move files...
Sent from my GT-I9300 using xda app-developers app
Thanks for that! Much appreciated!

[Q][test] change your rom without flashing anything [DUALBOOT ONLY]

Hi,
when i download some roms, release after release, i saw that, sometimes, only some files are changed.
if i make a little zip with only the differencies comparing two zip, and if i change updater-script
(deleting "delete system" process , deleting flashing kernel lines, generaly, at end of script and managing other things)
can someone confirm that if my updater-script never delete /system/ , i have no risk to "kill" my device ?
i have an idea about the reply but its good to have a thread about this question, no ?
i have test this following when i run a 2nd rom with dorimanx kernel.
- I search about differencies on two spirit releases rom. (using 7zip , good interface to compare and you have the total size of each folder in zip)
- On a structured folder, i keep only the new files from new release.
(apk, binary,priv-app,framework..., comparing them using size files essentialy because using the date as comparison filter never help in this way)
- i run my 2nd rom
1 - Remember us, with dorimanx kernel, when we are dualbooting roms, no matter the position rom you are run at a moment (1rst or 2nd), you will be able to see /system/ and /data/ partitions from the other rom which generaly sleep
2 - On PC, i generaly use WINSCP soft to acces easily on all structured folders of my device. (just let you know)
So,
- i launch WINSCP on PC, then i can log-in as root on my device, 2nd rom runing.
- in the interface gui of WINSCP, on left side, i see my extracted differencies structured with all files and in right side, i can see all folders from my device.
- with the interface gui from WINSCP, i can copy all that i need in /system_pri_rom/ and /data_pri_rom/ , which are the auto-mounted partitons from 1rst rom
- if DEV have moving some apks from /system/app/ to /system/priv-app/ , i move the files too. If DEV have delete some files, i delete too.
- when i reboot my 1rst rom, it booted without any trouble.
result :
the +
i dont flash anything
i dont change kernel
the -
looking for differencies between 2 zip take time
the +/-
i dont format/delete entire system and maybe with time, this can be corrupted.
If someone can help me this way by making a little script which can make the differencies with an output zip , it will be much appreciated
thanks.

Can we still do old school android custom rom style zips?

Im trying to make port a rom for my MI9 and I am having a hard time understanding the new android system of this system.new.dat thing. afte ra series of steps I got it extracted back to way system folder and made my edits but I cant get it back into a format that new androids can take (something along i cant generate a transfer list) the last time i made custom roms was back for android 2 & 4. I also tried making a img file (which worked) but its over 4gb so i cant get it in my phones storage and even if i do it complains about source is bigger then target. in all ways im stuck.

Categories

Resources