PPCGeeks

PPCGeeks (http://forum.ppcgeeks.com/index.php)
-   Moto Droid (http://forum.ppcgeeks.com/forumdisplay.php?f=123)
-   -   How-To: Root your Droid (http://forum.ppcgeeks.com/showthread.php?t=102966)

parkjam 12-23-2009 11:38 AM

How-To: Root your Droid
 
First a brief explanation of what root is and what it accomplishes. Root is the superuser account in a linux based OS, much like an administrator account on a Windows PC. It allows you to accomplish system tasks and modify system files that cannot be touched with a normal user account. Without root access you cannot accomplish that on a linux based OS. Rooting an android phone is allowing yourself access to that superuser account, allowing you to accomplish any other mods you may wish. One caveat though, root in linux is very powerful. Be careful anytime you type su into a terminal shell in android, as with that command you become God to that phone. Linux is not a "dumb downed" OS like Windows, it will not ask for confirmation. It assumes that because you are the root user, you know what the heck you are doing.

Next a breakdown of the various commands issued in the following tutorial so you can understand what it going on.

1) su - This command allows you to become the root user, allowing filesystem access.
2) cp - This is the linux copy command, it copies files from one place to another
3) mv - This is the linux move command, it moves files. It is also used in instances where you want to rename a file. With renames, you are just moving the file to a file with a new name.
4) mount - This command mounts a device (ie, the storage card), allowing the phone to see and access the file system on the device. It is most often used in this sense: mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system What that command accomplishes is simply remounting the system partition with read/write access. By default the system partition is mounted as read only, meaning you can't write anything to it. By remounting it as read/write, you are allowing changes to it. On the opposite end, once you are done modifying, you remount it again as read only by typing mount - o ro,remount -t yaffs2 /dev/block/mtdblock4 /system
5) cd - This command simply changes the working directory in your command shell to the directory you specify. It essentially moves you from folder to folder.
6) sync - Syncs changes on the device.
7) reboot - Fairly obvious what this one does!

Also, it is nice to be able to use ADB (Android Developer Bridge) to be able to access your phone via a terminal on your PC. You may need to change the repository from https:// to http:// to get the updates. Once it is fully installed on your PC and you connect your phone with USB Debugging enabled, it should install the driver for your phone. At that point you can go to a command prompt in the tools directory of the android SDK and type adb shell. By doing that you are running a shell on your phone from the PC (with a real keyboard!)
1) setup the Android SDK on your system: http://developer.android.com/sdk/installing.html
2) get familiar with using ADB: http://developer.android.com/guide/deve ... s/adb.html




http://c32.statcounter.com/3860820/0/54dee494/1/
http://pixel.quantserve.com/pixel/p-cdthWHNQAeX_k.gifEDIT: As it seems to have come up a few times across the forum and in this thread, I am going to try and explain what the recovery image/nandroid are in terms that make it easy to understand. For WinMo users, you can think of the recovery image (which is nandroid) as an unlocked SPL for your WinMo phone. Much like with the touch pro, diamond, mogul, vogue, etc., you had to flash the unlocked SPL to be able to flash unsigned ROMs, the same thing applies to the Droid. You must install a new recovery image that allows the installation of unsigned programs. The difference is that nandroid is far more than just an SPL analog. It is a truly useful utility that allows you to do many things, create backups, restore them, modify the file system, and install roms and updates. It is NOT necessary to install the hacked recovery image if you don't plan on messing with custom ROMs and the phone itself. But the truth is, if you don't plan one doing those things, you should ask yourself why you are rooting your phone and taking any risk whatsoever. That being said, if you plan on rooting your phone, installing the recovery image and creating a backup is just good common sense. It allows you to have a way to get your phone back shoud you do something that screws it up. The other nice thing about said backups, is they allow you to completely return to where you were when you backed the phone up. EVERYTHING is restored! No more reinstalling and reconfiguring all of your programs every time you want to try a new ROM. Simply create a backup before you install the new ROM, and install the new one. If you don't like how the new one works, simply restore the backup and your right back to where you were at!

HOW TO Create a backup: To create a nandroid backup, reboot your phone into recovery by holding 'x' while powering on the phone, or typing reboot recovery into a terminal with root access. Once you have booted into the recovery mode, select backup/restore, push the camera button, select simple nandroid backup, and push the camera button. After a minute or two, the process will complete and you can use the power button to go back and select reboot phone. The backup is stored in the nandroid folder on your SD card.

parkjam 12-23-2009 11:51 AM

Re: Howto: Root your droid
 
AS OF 1/10/2010, THE MOST CURRENT VERSION OF THE NANDROID RECOVERY IMAGE IS 0.99.2b. MAKE SURE THAT YOU FLASH THE LATEST VERSION AND KEEP IT UPDATED, ESPECIALLY IN THESE EARLY STAGES BEFORE A TRUE 1.0 RELEASE.


I take no credit for this tutorial, I just copied it from here. I made a few changes, but the bulk of the content was writtend by bootsdscoob at droidforums.net


I AM NOT RESPONSIBLE FOR ANYTHING. DAMAGE TO YOUR PHONE, WORLD WAR, STARVING KIDS IN AFRICA, OR BRICKED PHONES...DO NOT TRY THIS IF YOU DONT KNOW WHAT YOUR DOING!
that being said, this is all pretty simple

1) MANUALLY UPDATE TO 2.0.1(this can be used to unroot also)

1 - Download file. 2.0.1 android OS_update.zip
2 - Rename the file to "update.zip".DO NOT USE .zip if your using windows vista/7
3 - Plug your Droid into your computer via USB. On the Droid go to the Notifications bar and select "USB Connected" then press "Mount".
4 - Once the device is mounted, the SD card will show as a removable device on your computer
5 - Put the "update.zip" file you just renamed into the Root (top) directory of your SD Card.
6 - Unmount the device from your computer, and turn the Droid off.
7 - Hold down the "X" key on the physical keyboard and while doing so press the power button. Hold both of them down until you see a Triangle with an !.
8 - Hold the Vol+ button then press the camera button and you will see a menu.
9 - Using the D-pad on the physical keyboard, select the option to update with the update.zip file.
10 - This should take a little bit. Once it's done select the option to reboot the phone.
11 - The phone will take much longer than normal to boot, don't worry as it is normal.


2) ROOT (all in one file, doesnt require superuser permissions)

1 - Download file. root for droid.zip
2 - Rename the file to "update.zip" Make sure that you don't include the ".zip" extension if your computer is not displaying file extensions (Vista/Windows 7 doesn't show extensions by default)
3 - Plug your Droid into your computer via USB. On the Droid go to the Notifications bar and select "USB Connected" then press "Mount".
4 - Once the device is mounted, the SD card will show as a removable device on your computer
5 - Put the "update.zip" file you just renamed into the Root (top) directory of your SD Card.
6 - Unmount the device from your computer, and turn the Droid off.
7 - Hold down the "X" key on the physical keyboard and while doing so press the power button. Hold both of them down until you see a Triangle with an !.
8 - Hold the Vol+ button then press the camera button and you will see a menu.
9 - Using the D-pad on the physical keyboard, select the option to update with the update.zip file.
10 - This should take a little bit. Once it's done select the option to reboot the phone.
11 - The phone will boot. now you have root

3)blocking OTA updates

open terminal emulator (available in the android market)
enter exactly like this NOTE: Linux file and directory names are CASE SENSITIVE, mind your capitals and punctuation!!!

su (after typing this you will most likely get a popup asking you to allow root privelages to the program, allow them)
mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
cd /system/etc/security
mv otacerts.zip otacerts.zip.bak (mv is the linux command for renaming a file, by just using mv, the file remains for you to restore later if you so choose)
mount -o ro,remount -t yaffs2 /dev/block/mtdblock4 /system

sync
reboot


If you visit the link in the top, the tutorial continues on replacing your recovery image, which installs nandroid and allows you to make backups and flash custom ROMs. I would skip that and follow this tutorial which continues from here: http://alldroid.org/viewtopic.php?f=210&t=792

This gentleman has written a nice program that installs busybox (a linux command shell that includes a lot of commands that are needed for various things!), flash_image (the program used to flash images, imagine that!), and the patched recovery image for nandroid.

Updated for 14.0 recovery and added better instructions.
This version will remain here on alldroid and get small updates constantly(I will do my best to keep up with new recovery.img's especially) but I have put a full version on the marketplace that has more features like numerous theme change buttons multiple boot animation and font change buttons so you can change quick but still have that one you really like lol.... I will be updating the full version constantly as well but it will be more features added instead of just keeping up with the recovery, if there is something you would like to see added to it please don't hesitate to ask.http://alldroid.org/images/smilies/icon_e_smile.gif



I have made an app for rooted droids to assist in installing busybox,flash_image and such.To use the app though you must have root first found here and have the the folder named Tools on the root of your sdcard (the folder and all files needed are included in the .zip file attached.) You must have the box in settings checked to allow install of apps from unknown sources (settings/applications)

Instructions for use:
Download attached Droid root helper.zip and unzip it, now copy the folder named Tools to the root of your sdcard.
Next install the DroidRootHelper.apk to your phone.
Now run DroidRootHelper...The first time you run it it will ask for su access then it will probably freeze(seems to be a problem with most apps requiring su access) give it a second or two and if a force close dialogue pops up click force close.Now re-enter the app and as long as you checked to always allow root access it wont have any more problems.


Now for the fun stuff first, mount the system
Next install busybox, then you can move on to install flash_image.
Now that you have flash_image working you can flash SirPsycoS's 0.14.0 recovery.img but dont forget to click Rename recovery-from-boot.p before rebooting to avoid the default recovery being re-flashed upon reboot.(as lot of people have already found out if you wanna flash a different recovery and I haven't updated this just put the recovery you want in the Tools folder on your sd card but rename it to the same name as the one in there. Example:The current recovery in the folder is recovery-0.14.0.img if you have recovery-1.13.5.img rename it to recovery-0.14.0.img and stick it in the Tools folder then use the flash recovery button.This method will work for alot of the new options like flash skull theme if theres a themed Launcher.apk and framework-res.apk made for the droid you want it installed put them in the skulltheme folder located inside the tools folder. )


Once done with that I would suggest to click reboot recovery and make a Nandroid backup by using the volume up/down buttons to highlight selection camera button chooses highlighted selection and the power button backs out of submenu's.

A breakdown of the buttons and what they do:
Mount = mounts the system read/write with the command: mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
Unmount = unmounts the system with the command: mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system
Sync = syncs system with the command: sync
Rename recovery-from-boot.p = renames the recovery from boot patch to recovery-from-boot.old so your recovery is not overwritten by the default one on reboot.
Install and chmod busybox = Installs busybox to /system/bin and chmods it by running the busybox.sh in the Tools folder.
Install and chmod flash_image = Installs flash_image to /system/bin and chmods it by running the flashimage.sh in the tools folder
Flash 14.0 recovery = Installs the recovery-0.14.0.img with the command: flash_image recovery /sdcard/Tools/recovery-0.12.0.img
Install Skull Theme = Installs the Launcher.apk and framework-res.apk from the skulltheme folder inside the Tools folder by running theme.sh
Install Default Theme = Installs the Launcher.apk and framework-res.apk from the defaulttheme folder inside the Tools folder by running theme1.sh
Flash bootanimation.zip = Installs the bootanimation.zip from the bootanimation folder inside the Tools folder to /data/local
Reboot = reboots the phone with the command: reboot
Reboot Recovery = reboots the phone into recovery with the command: reboot recovery
Most of these options require the phone to be mounted so the files can be written to the system folders.Example:Install skull theme if you click this and the phone is not mounted the only command from the .sh its using that will work is reboot as the commands to copy the themed .apks reqire the system to be mounted.

Update version 5 adds user friendly tips.
If you have any questions and I am not responding quick enough here please feel free to email me at crotalusfreak@gmail.com
As with all apps and themes of this nature I accept no responsibility for any bricked or damaged devices you use this at your own risk!http://alldroid.org/images/spacer.gifhttp://alldroid.org/images/spacer.gifhttp://alldroid.org/images/spacer.gifhttp://alldroid.org/images/spacer.gifAttachment:
http://alldroid.org/styles/hestia_bl...pic_attach.gif Droid root helper.zip [19.48 MiB]
Downloaded 1572 times

http://alldroid.org/images/spacer.gifhttp://alldroid.org/images/spacer.gifhttp://alldroid.org/images/spacer.gifhttp://alldroid.org/images/spacer.gif



http://alldroid.org/images/spacer.gif http://alldroid.org/images/spacer.gif http://alldroid.org/images/spacer.gif http://alldroid.org/images/spacer.gif Attachments:
http://alldroid.org/download/file.php?id=835&t=1
3.png [ 87.37 KiB | Viewed 1437 times ]

http://alldroid.org/download/file.php?id=834&t=1
2.png [ 71.92 KiB | Viewed 1437 times ]

http://alldroid.org/download/file.php?id=833&t=1


Hopefully this provides the information necessary to get the task done. If you have any questions, post em up and we can try to get them answered!

EDIT: After that is all done, go to the market and download the free app AdFree, which will modify your hosts file (the file that tells linux what internet sites are ok to connect to) and block most ad servers across the net, making it so you don't have to look at ads in your free ad based apps!

EDIT: As it seems that crotalusfreak has not updated his program in a while, I am going to explain how to updgrade your recovery image manually. This little tutorial assumes you have followed all the steps above and now have the 0.14 recovery image installed. Download the latest version of recovery image at http://sholes.info. As of 1/10/10, that version is 0.99.2b. Place that file (recovery-0.99.2b.img) in the root of your SD card. Now, in your favorite terminal program (adb shell on the PC or Terminal Emulator on your phone for example), type the following commands

su
This command allows you root privileges
flash_image recovery /sdcard/recovery-0.99.2b.img This command flashes the file to the recovery partition
reboot recovery This command reboots the phone into recovery mode, much easier than holding 'x' while powering on

At this point the phone will have rebooted into recovery mode, and you can verify proper installation by looking at the version number at the top of the screen.

z0mbiexx 12-23-2009 12:29 PM

Re: Howto: Root your droid
 
Alright i do believe i am now rooted and i flashed the new recovery and made a nadroid backup all without bricked my new phone PHEEW.

how does one take off the unused icons now im rooted?

parkjam 12-23-2009 12:36 PM

Re: Howto: Root your droid
 
YAY!!!!! Congrats zombie! It seems a bit daunting at first, but it really isn't that hard, and your chances of bricking your phone are really low, much like flashing new spl's on WinMo. As far as getting rid of the apps your not using. Try this in a terminal:

su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
cd /system/app
mv Email.apk Email.bak
mv VVMStub.apk VVMStub.bak
mv com.amazon.mp3.apk com.amazon.mp3.bak
mv CorpCal.apk CorpCal.bak
mount -o ro,remount -t yaffs2 /dev/block/mtdblock4 /system
sync
reboot

z0mbiexx 12-23-2009 12:49 PM

Re: Howto: Root your droid
 
that worked perfectly thanks alot. :)

what program did you use to take screenshot on any screen? also how'd you make your notification bar how you did the darker gray?

and guess now i gotta debate if i wanna root my little brothers droid or not. :laughing6:

fabersa 12-23-2009 01:07 PM

Re: Howto: Root your droid
 
Zombie... Parkjam took the info (along with the screenshots) from alldroid.org by crotalusfreak http://alldroid.org/viewtopic.php?f=210&t=792

So the screenshots are from crotalusfreak's phone. Head on over to alldroid.org and do some searching about how to modify Frame-res.apk

blazingwolf 12-23-2009 01:11 PM

Re: Howto: Root your droid
 
Quote:

Originally Posted by z0mbiexx (Post 1433389)
that worked perfectly thanks alot. :)

what program did you use to take screenshot on any screen? also how'd you make your notification bar how you did the darker gray?

and guess now i gotta debate if i wanna root my little brothers droid or not. :laughing6:

Drocap2 for the Screen shots. Available in the market.

The gray bar in the screen shots is part of the skin that he is using. You should be able to install with Droid Root Helper.

fabersa 12-23-2009 01:15 PM

Re: Howto: Root your droid
 
Thanks for putting this all in one place, parkjam! I just picked up my droid yesterday and want to get a little more used to it before I root, but I will definitely be following this thread.

z0mbiexx 12-23-2009 01:16 PM

Re: Howto: Root your droid
 
Quote:

Originally Posted by blazingwolf (Post 1433457)
Drocap2 for the Screen shots. Available in the market.

The gray bar in the screen shots is part of the skin that he is using. You should be able to install with Droid Root Helper.

thanks i kept trying to find "Drocap" which kept coming up with nothing. :coffee:

parkjam 12-23-2009 01:49 PM

Re: Howto: Root your droid
 
Quote:

Originally Posted by fabersa (Post 1433434)
Zombie... Parkjam took the info (along with the screenshots) from alldroid.org by crotalusfreak http://alldroid.org/viewtopic.php?f=210&t=792

So the screenshots are from crotalusfreak's phone. Head on over to alldroid.org and do some searching about how to modify Frame-res.apk

Right. The screenshots are from his post on alldroid, that's why I linked it. There is also a lot of info on modifying the framework-res.apk in this post as well.

http://alldroid.org/viewtopic.php?f=210&t=581&sid=d7bb3ea9579889e733ba 613c804f18ee

It starts talking about modifying the framework-res.apk on around page 4, but the whole thread is worth looking over!


All times are GMT -4. The time now is 07:18 AM.

Powered by vBulletin® ©2000 - 2024, Jelsoft Enterprises Ltd.
©2012 - PPCGeeks.com


Content Relevant URLs by vBSEO 3.6.0