Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I'd like to be clear, and as my question indicates, I'm very ignorant of mobile devices in general so my apologies if this is common knowledge.

Say I want to install a custom ROM onto a device, then it would appear I need root access. I'm able to find out from every web page on how I can root a device, but I'm unable to find how why I need to root a device. I understand that rooting a device simply gives me root access on the device, but why is this needed? If I connect the phone to a PC then doesn't that give me access to the entire file system of the device? If so, then why can't I just overwrite the relevant parts of the FS with whatever ROM I want?

Also, why would rooting and using a custom ROM cause a device to be bricked? Couldn't I just overwrite the ROM that was causing the issue with the original one (that I'd thought on to back up! ;)).

share|improve this question
5  
If I connect the phone to a PC then doesn't that give me access to the entire file system of the device? - By default, no, it doesn't. It gives you access to a very specific portion of the filesystem (the "external" storage). –  eldarerathis Jan 18 '13 at 16:08
1  
Here and Here –  t0mm13b Jan 18 '13 at 16:14
    
@t0mm13b None of those questions answer the WHY part. Guess I'll go ahead and put something here. –  Izzy Jan 18 '13 at 16:17
add comment

2 Answers

up vote 11 down vote accepted

Short answer:

For security and warranty reasons.

Detailed answer:

This is mostly a precaution taken by most (not all!) device manufacturers to save them from too many service requests from "playing kiddies" (and the sort of people who want to try everything, even if they are not understanding anything). So those manufacturers took special actions to avoid "custom ROMs" (or, more precisely, any ROMs not provided by themselves) to be flashed.

As t0mm13b already pointed out in his comments above, by default you do not get physical access to your devices file system simply by connecting it via USB. Depending on device, Android version, and some more criteria, you get only to see parts. This might be the entire SD card (physical, in UMS mode), or even only "logical" access to parts of it via MTP. Some more privileged access can be gained via ADB when enabling USB Debug -- but with a stock ROM, in none of these cases you gain full access.

Now how are updates accomplished then? One very common practice is the use of a special ZIP file (update.zip). This is placed on the SD card, which is inserted into the device, and the device is booted into a special mode (recovery), where the update.zip can be applied from. BUT: the device checks the integrity of that update.zip -- it must be signed with the manufacturers key. For obvious reasons, that key is not freely available -- so no custom ROM can be installed this way on such a stock system.

All these things can be circumvented only with super-user access to the device -- which means: you must root it.

So that's for the WHY part -- while not handling the HOW part of rooting. Exactly as you asked for :)


Update for even more details

As Liam pointed out in his comment that using fastboot would be a method to flash Custom ROMs without the pre-condition of having the device rooted, I did a little more research to find out about this. I will continue looking into this, but still already wanted to add my first results here.

Up to a certain point, Liam is right with this: It seems not only valid to Samsung devices (as I assumed first), but some other devices (not all) also support this method, without root being involved (aside from the fact that most Custom ROMs will ship rooted, of course -- so you will have root available after installing them). However, there are devices which seem to require root even for fastboot flash (see e.g. TheUnlockr concerning the Iconia A100, quote: You must have rooted your device before doing this procedure. -- and yes, they use fastboot flash recovery recovery.img afterwards).

However, even if fastboot works for your unrooted device, there is one crucial point to consider:

To Flash a ROM for your Android device with fastboot you must have an unlocked bootloader or an engineering bootloader

(Flashing Guide - Android - XDA-Developers)

Which means: If your bootloader is locked, you need to unlock it first, which will wipe (factory-reset) your device. So all data will be gone for good this way -- while with root you could have done a complete backup (Nandroid, Titanium Backup) before this step. However, starting with Android 4.0, this is no longer a real problem -- as you can do a full backup via ADB (see: Full Backup of non-rooted devices)


Summary:

There are devices requiring to be rooted before you can flash a Custom ROM. If your device falls into this category, the reasons for Why is root access required to flash a Custom ROM are those mentioned above.

However: There are also devices which can be flashed using fastboot without being rooted before. If your device falls into that category, the question Why is root access required to flash a Custom ROM becomes invalid (the answer not, as ex falso quodlibet sequitur ("from false can follow anything") you can draw any conclusion from a wrong premise :)

That is: IF rooting is required, the above is WHY.

share|improve this answer
1  
You don't actually need root to install a custom ROM on most devices ;) –  Liam W Jan 18 '13 at 16:30
    
@LiamW As my question states - I'm very ignorant with mobile OSes, and Izzy has 13.3k reputation which indicates he knows a thing of two more about this than myself; as such, I assume his answer is fully correct as I don't know anything to the contrary; also his answer was also the highest voted (again indicating it's technically correct). Nevertheless if you believe his answer to be incorrect, feel free to update your answer and if the votes swing I'll change the accepted answer. –  R4D4 Jan 18 '13 at 16:43
1  
@LiamW You mean "on most Samsung devices". I never saw a device you could flash a custom ROM without rooting, sorry, and I saw some devices. Well, I kept away from plastic bombers... XD So technically, your last comment is incorrect :D –  Izzy Jan 18 '13 at 16:44
1  
Its a chicken and egg... you need root to be able to flash a custom ROM and in order to flash a custom ROM, you generally need an unlocked boot-loader with a rooted recovery environment... and a rooted recovery environment such as CWM/TWRP....catch-22! –  t0mm13b Jan 18 '13 at 16:53
1  
@R4D4 An accepted answer should be the one that helps you the most. If you're not in a position to fully evaluate the answer then it's perfectly OK to not accept one. Accepting the highest answer just because it's the highest, or the one from someone with high rep, is definitely frowned upon. At the end of the day though it is your decision, no one should tell you differently. –  Matthew Read Jan 18 '13 at 17:36
show 6 more comments

You generally don't need to root the phone to install the custom ROM, you have to root the phone to install a mechanism to install the custom ROM (such as a custom recovery image).

Some phones have unlockable bootloaders - you can flash boot and system.img files via the bootloader without the need to root.

You can also flash a custom recovery image using fastboot without being rooted.

You would need to install a custom recovery as the stock recovery checks that the update zip is signed - and most custom ROM zips are not signed.

You might need to root to install a custom recovery image if your device doesn't support fastboot, but generally you don't need to - it just comes with the image you install.

Samsung devices have download mode - no need to be rooted to use that, you just need ODIN.

If I connect the phone to a PC then doesn't that give me access to the entire file system of the device? If so, then why can't I just overwrite the relevant parts of the FS with whatever ROM I want?

No, it doesn't. It gives you read only access, so you can't overwrite files in the /system directory. Root can be used to make /system read-writeable.

share|improve this answer
1  
"You generally don't need to root the phone to install the custom ROM, you have to root the phone to install a mechanism to install the custom ROM (such as a custom recovery image)." surely boils down to you do need root to go from having stock off-the-shelf OS to a custom ROM? –  GAThrawn Jan 18 '13 at 17:00
1  
@GAThrawn Nope. You can flash a custom recovery using fastboot. You don't need to root to access fastboot (and sometimes you need to use fastboot to access root) –  Liam W Jan 18 '13 at 17:01
1  
Many non-Samsung devices do not have unlockable bootloaders (especially older ones), though, so you can't flash a custom recovery without first exploiting the bootloader somehow or installing the recovery some other way (ROM Manager/Goo Manager). Often this does involve rooting, although that might not always be the case. I think that's what @GAThrawn and others are trying to get at. More manufacturers have started to move to offering a bootloader unlocking tool, but many still have not. Motorola devices, for example, are notoriously hard to get custom ROMs on compared to others. –  eldarerathis Jan 18 '13 at 17:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.