Shared publicly  - 
 
ROM Manager issues on 4.2

The new multi-user stuff in AOSP has thrown a wrench into ROM Manager.

The sdcard is now segmented and an emulated mount is available per user on the device.

So, /sdcard for user 0 would actually be /sdcard/0
And /sdcard for user 1 is /sdcard/1

This is causing a mismapping when rebooting into recovery from ROM Manager to install a zip. It will try to open, for example, /sdcard/update.zip, when in reality, it should be looking in /sdcard/0/update.zip.

This broke all the things.

I am hoping to do this fix entirely in ROM Manager, but I suspect a CWM rebuild may also be necessary for 4.2 devices. Ideally, I'd like to avoid that.

TL;DR:

ROM Manager is broken on 4.2, and I have a fix in progress.
80
21
Brandon Davis's profile photoKai Pays's profile photoJoe Dluzen's profile photoJeffrey Moore's profile photo
82 comments
 
Stopped using Rom Manager a while ago anyway
 
+Mathew Hanley Thanks for stopping by to post your useful comment. I can tell you are quite good at winning friends and influencing people.
 
First time looking at my SD in recovery made me panic until I realised this, haha. Thought it had been wiped
 
So the user directories still exist on phones I guess, they're just disabled.  I'm sure thats an easy "fix"
 
Bwahahah. Thank you for your comment +Koushik Dutta in response to +Mathew Hanley. Made my day.

Also, thanks for working on a fix. I'm excited to see what 4.2 brings, but only if my must have apps all play nice with it.
 
So this is gonna make my sdcard partition look like more of a cluster than it normally does then right?
 
I cant really use rom manager on my device and cwm doesnt cooperate with Rom manager for backups and such. I just kind of gave up on it.
 
People can hate all they want to, +Koushik Dutta is the man. In a matter of hours the bug has been detected and a fix is incoming, how much more could we ask for? Thanks dude.
 
+Jeffrey Moore Yeah, it's a bit of a mess... even if you're using just recovery now, you're gonna see some new stuff on the root of your sdcard.
 
Oof, sounds messy...   Good luck on that, I know a lot of us use CWM and ROM Manager.
 
At least CWR had no issues manually flashing ;)
 
+Benji Hertel Yep, that's how I did Superuser after RM failed :(

When I saw the empty SD card I almost raged cause I thought the GOOG had deleted all my stuff post upgrade.
 
I think the real catch is how many other apps that store crap on our sdcard are gonna flip out when the GN's are upgraded to 4.2?
 
I get no roms in rom manager for download, Maybe no one is adding repositories. I do have the paid version if that matters. WHen I try to do a backup when it boots to recovery it gives an error about the script. I am using cwm touch, flashed by RM.
let me try it and I'll get you the message.
 
+Jeffrey Moore They'll be fine. Android just says 'push to mah sd dawg' and the OS does the magics.
 
Ok, I just noticed an updated CWm, but it gives an error about downloading: please make sure you have a stable internet connection and that your sd card is inserted and has free space.
 
ok, i tried again and it let me choose, When I pick Motorola Razr it says there isnt an official CWM for my phone.
 
I do have CWM touch, is there going to be a released version?
 
I noticed this as well. I got into a bad state with my 4.2 build and needed to roll back, but CWM was unable to find my backup dir. I had to log in from adb and move /sdcard/0/* to /sdcard/. Then it worked just fine. 
 
+John F Yeah... that workaround won't work properly between ROM Manager and CWM stuff will be saved in different directories
 
I figured that if I had intended to stay with 4.2, that it wouldn't be a great idea, but since I was rolling back to 4.1, there was no reason to respect the new directory structure. Plus, I wasn't using ROM Manager, just CWM.
 
:-(  <-- not really much else to say 
 
all this tlk bout technology is giving me a head ach will u ppl shut up bout it alreay plz
 
Doesn't calling "Environment.getExternalStorageDirectory()" get the current user's sd path? I'm assuming it will, or a hell a lot of apps are going to be broken.
 
+Koushik Dutta what I understood is that you select something to flash in ROM Manager, it gets the path and then reboots to recovery and looks for the file at that path... is that not the case? Sorry if I'm getting something wrong
 
+Ben Baggley Basically the problem is that the userspace sdcard and the actual sdcard are not the same paths anymore.
 
Goog has to break something with a new update, it's tradition!
 
Well, in general trusting "/sdcard" to be meaningful is already skating on thin ice.  It's just a symlink anyway, remember....
 
+Koushik Dutta Ah, so does external storage still just give you the path of /sdcard regardless of user, but the system knows to go to the right segment? It doesn't give you /sdcard/0 etc. Or am I getting it even more wrong? Haha. If I'm right then yeah I see your problem here.
 
+Christopher Tate I know, but at least getExternalStorageDirectory would give you the real SD Card root. That doesn't work anymore either :)

I understand why the change was made. I just have to work around it.
 
It does!  It gives you your external-storage root!

Seriously; there are a lot of assumptions baked into what you're doing here, the first of which is that there is a single physical or logical volume for all shared/external storage for all users.... :)
 
If you're building command line tools, check out the EMULATED_STORAGE_SOURCE environment variable, which will point at the FUSE mount point accessible by the shell user.  I wrote up a bunch of docs on how emulated storage works under the hood in multi-user, but it hasn't been pushed yet.
 
+Jeff Sharkey Yup, I noticed /mnt/shell/emulated while poking around. Restricted to the shell user only though, but that's not a problem for my app :P
 
Is CM10 going to be available for Samsung Galaxy S2 via Rom Manager? 
 
+Koushik Dutta your comment got nearly twice as many likes than your post...lol

I wish developers luck with 4.2 endeavors. I kind of wonder how multi-users will effect us. 
 
Thanks for the update. It doesn't affect me on the nexus s 4g but plan on getting the nexus 4. I'm sure you will have the bugs fixed keep up the good work.
 
Thanks +Koushik Dutta , didn't even realise the internal sdcard was broken up like this until I saw your post.

Seems 4.2 is going to be a lot of work. Just updated SuperSU with some basic fixes (only root for main user until I get around to implementing proper multi-user support).

Going to be fun with updates to Samsung devices and fixing Mobile ODIN. "Luckily" Samsung doesn't update that quickly usually ...

What I find much more worrying is +Jeff Sharkey 's post there, which shows the secondary external storages on physical media (i.e. sd cards, maybe also USB sticks and such) will be pushed to read-only. While this was already more or less the case for a while, both CM and most stock Samsung firmwares luckily got rid of that ...
 
Keep doing what you have always done, helping me with my ROM flashing addiction!! Will be patiently waiting for this HUGE update!! Good luck man!!
 
Wouldn't a simple written command in the filing system be a easy fix?... worked for me when fixing certain stuff on android devices 
 
yeah, because why use sdcard/user/1 and make life easy Google??
 
So is there any way to restore a backup, I have cwm touch and just flashed mmuzzy's 4.2 for Verizon gnex. It is nice but needs work. I made a backup before flashing and would like to go back for now...
 
So is there any way to restore a backup, I have cwm touch and just flashed mmuzzy's 4.2 for Verizon gnex. It is nice but needs work. I made a backup before flashing and would like to go back for now...
 
+Daniel Lynn Your backup is probbaly sitting in /sdcard/0/clockworkmod/backup

move it to

/sdcard/clockworkmod/backup
 
I found it, moved it to correct folder and got it to show on cwm. Issue I'm having now is when I go to restore I get error restoring /system
 
Yea I fixed a few things on mine... gonna have to make a folder for back ups
 
+Daniel Lynn You'll also need to move the blobs folder in clockworkmod to the correct clockworkmod directory. SOrry for such a hassle. I am working on a proper fix.
 
Ahhh, ur amazing. I was completely stumped lol. And don't apologize, issues appear with new releases, the fact ur responding this fast is great. I've used cwm as long as I can remember, always recommend, and don't ever plan to switch. And actually I think I'm gonna stick it out with mmuzzy's 4.2 build now that the google location issues is fixed.... Also I would like to post this fix in mmuzzy's rom forum for Verizon gnex because there seems to be a lot of people not being able to restore with cwm at the moment.
 
Hi Koushik I've been using your premium app for two years now and I've always been satisfied with it. Currently I'm on GNex GSM. After 4.2 update I noticed kinda strange behavior that has to do with rom manager (the application itself, I know how to deal with cwm and backups' new location ;) ). There's simply no way to manage your backups. I mean I cannot rename or delete them. Not even fix permissions. (Backing up/restoring works fine though) This problem is present only on android 4.2+. It looks like rm doesn't have permission to perform these operations. On 4.1+ everything works as it should (even with 4.2 userdata partition).
 
Hi +Koushik Dutta Just wondering if the latest CWM 6.0.2.3 I received from the market today has the multiuser fixes in now? I'm on a galaxy nexus currently running TWRP, but I want to switch back to your CWM as I prefer it. any news appreciated, and thanks for all your hard work.
 
CWM works now.. Its been working for a while.. Smh
 
Hi, trying to flash from recovery(6.0.2.5) I get "E:Can't mount /sdcard/" on Nexus S(crespo). Sometimes it works, I don't know depending on what. There's someother way to flash updates. Thanks.
 
thanks, rom manager closes unexpectedly when I hit reboot and install.
 
And your rooted all the way? What OS version are you on?
 
I don't the meaning of 'all the way'. I have root access running OS. OS version is nightly from 3 days ago. 
 
Download the latest and flash using Odin... If there is one
Add a comment...