[Q] sbf_flash on mac - Atrix 4G Q&A, Help & Troubleshooting

below is a short preface and introduction before the main point of this thread. you can skip the preface if you want.
PREFACE/INTRODUCTION
i am relatively new here. i owned a nexus one a year ago and sold it for an iPhone 4. left the iOS world and jumped over to the "fastest phone in the world" (GS2 doesn't count yet). had my device for 3 days and i love it. jailbreaking iOS was very easy for me and i am *somewhat* comfortable rooting and unlocking bootloaders on android. Nexus One was very easy from what I can remember. fastboot oem unlock i believe it was? CWM, flashing *.zips, etc. So I would like to think I am not a complete n00b, but when it comes to motorolas, i have no experience. i currently own a macbook pro as my main computer, however, i do have limited access to a notebook running vista. now to get to my point of this thread.
***************************************
MAIN POINT OF THREAD: sbf_flash tool
SBF_FLASH (Mac and Linux) executable for flashing *.sbf files to motorola android phones in lieu of RSDlite. **ATRIX is said to be supported
link: http: //blog.opticaldelusion.org/2011_04_01_archive.html (wouldn't let me post real link, sorry)
*note: originally the developer wrote separate scripts for linux and mac as mac uses mach-o executables while linux uses ELF, however, the updated version works on both linux and mac platforms.
i searched the forums and only found 4 posts related to the tool sbf_flash and none of them were related to the motorola atrix. therefore i felt compelled to write this post and see if anyone has used this tool. if you read my preface it stated that I have a mac and only limited access to a windows computer therefore . my main question is. has anyone used this tool to flash *.sbf files to their atrix? if so, were there any issues whatsoever?
**if no one has used this tool before, I will hold my breathe and take the plunge. I will gladly be the guinea pig for all you mac/linux users out there (mainly mac users as if I am not mistaken, linux users have someway of flashing *.sbf files?)
thank you for reading this post. if I do not receive any input in terms of user's experiences with this tool by July 12th 9:00PM (EST), I will attempt to use it and see what happens. very anxious to get the bootloader on my device unlocked and flash CWM and flash 2.3.4. but i will wait.
**EDIT: i am aware of the fact that I can use bootcamp, VMware, Parallels or essentially any Virtual Box to run Windows on my mac and use RSDlite, however, I feel that if a simple executable such as sbf_flash worked, if would save a ****load of time/frustration/hassles.

I have used it
I use sbf_flash daily for script making purposes and it works flawlessly with the Atrix. Make sure to make the script executable by typing the follwing command in the directory where u have it.
sudo chmod +x sbf_flash.sh
For example if u have the script in the downloads folder type this into the the terminal:
sudo sudo chmod +x /Users/username/Downloads/sbf_flash.sh
Then to flash an SBF type ./Users/username/Downloads/sbf_flash.sh name-of-sbf.sbf
Hope this helps. I have made a script for myself that automates this and would be happy to share it with you. However this is rather basic and I don't think you need a script. If you have any questions let me know.

ionstorm3 said:
I use sbf_flash daily for script making purposes and it works flawlessly with the Atrix. Make sure to make the script executable by typing the follwing command in the directory where u have it.
sudo chmod +x sbf_flash.sh
For example if u have the script in the downloads folder type this into the the terminal:
sudo sudo chmod +x /Users/username/Downloads/sbf_flash.sh
Then to flash an SBF type ./Users/username/Downloads/sbf_flash.sh name-of-sbf.sbf
Hope this helps. I have made a script for myself that automates this and would be happy to share it with you. However this is rather basic and I don't think you need a script. If you have any questions let me know.
Click to expand...
Click to collapse
I run windows 7 on ny mac so... yea
Sent from my MB860 using XDA Premium App

thanks for all the input (from both of you). im assuming if i cd into the directory where the sbf_flash file resides I don't need to include the path every time? i have some knowledge of C and limited C++ or object oriented programming knowledge as well. i would love to use your script that automates the entire procedure if you don't mind giving it to me. once again thanks for the advice.
correct me if i am wrong, but chmod -x essentially gives the file permission to execute? trying to remember all the different unix commands. sudo, cd, and ls are only ones i use on a consistent basis

I have realized that it is not necessary to chmod +x the script file. All you have to do is include a ./ in front of it. For example ./sbf_flash filename.sbf. Btw saw your guide on how to sbf flash under *nix, so not sure if this information is still useful to you.
oh and yes cd, sudo and ls are the commands to use on a constant basis.

hey guys, kinda new to linux and the atrix. running 10.04 im not sure if i have the sbf_flash.sh. i have a file that shows as a shell script, i hope thats right. anyway. i have followed the direction above and cant seem to get it to run. this is what i have.
sudo chmod +x /home/serooted/Desktop/sbf_flash.sh
I in return get.No such file or directory. any ideas that would get me rolling? really want to get rid of the "unlocked" from my moto splash screen

type the following in at the terminal. ls /home/serooted/Desktop/ and see if the sbf_flash file appears in the output.

ionstorm3 said:
type the following in at the terminal. ls /home/serooted/Desktop/ and see if the sbf_flash file appears in the output.
Click to expand...
Click to collapse
Yes the sbf_flash does show up in the output. so my question would be, how now do i get it to flash the file?

is there any way that someone can post a step-by-step guide to unlocking the bootloader for the mb860 running 4.5.91 on a mac as i don't have access to a pc and am un able to find a clear method to doing so. sorry I'm new to this :/

Related

[UTIL] New Root Method as of 8/13! -> UPDATED 12/30 for NOOBS! <-

Hello everyone!
You may or may not know me, however I have secretly been working behind the scenes with ChiefzReloaded to learn how Android works. Together we have been trying to develop new ways to root the Slide, primarily because we both landed in a sticky situation that left us both without root and without a way to revert to root.
After many long hours of trying to restore my phone, I have now ported the exploid exploit to the MyTouch Slide! This means that you can gain root on any version of the Slide, INCLUDING the latest OTA! However, this isn't necessarily "easy" as in the One-Click Root program, but there are reasons for this. While Android is running we cannot write to /system and even if we force Linux to let us, the NAND protection will prevent Linux from completing the write!
To get started, please see the bottom of this post for the link and download it. You will want to download it to your computer and not your phone's SD card. Also, you will need the tools from the Android SDK. I would suggest extracting the file from my zip at the bottom of this page into the Android SDK's tools directory.
Extract the zip
Make sure your phone is in USB debugging mode AND you are in "Charge Only" mode.
Connect your phone to your computer.
Make sure you're in the same directory as where exploid is extracted before continuing to the next step.
Issue the following command: adb push exploid /sqlite_stmt_journals. Note: It MUST be in that directory - NO exceptions.
Run: adb shell
Run: cd /sqlite_stmt_journals
Run: chmod 0755 exploid
Run: ./exploid
Toggle your phone's Wifi (on or off, however you wish to do that).
Now (again) run: ./exploid (if prompted for a password enter: secretlol)
The next line should now begin with a pound (#) - if not, then something isn't setup right. Make sure to follow the directions verbatim. If you suspect you did follow them correctly, please reply to this post letting me know.
You should now be root! At this point you can do many things, but if you're looking to flash a custom ROM, continue to these instructions:
[NEW 10/18/2010:]
Steps 1-12 are intended to get you the ability to flash mtd0.img (which previously required using the SimpleRoot method) by gaining root inside of Android. By following the instructions in the rest of this section, it will allow you to flash a ROM or S-OFF your device:
The files you need are at: http://forum.xda-developers.com/showthread.php?t=703076- download both files linked in there (ESPRIMG.zip and SlideEng-package.zip)
Extract the contents of SlideEng-package.zip to a place of your choosing on your computer.
Place the entire (unextracted) ESPRIMG.zip on your SDcard.
Now push the files 'flash_image' and 'mtd0.img' that you just extracted from SlideEng-package.zip to /data/local using 'adb push'. (Noob? Instead of using 'adb push', install Droid Explorer and, using that utility, copy the 'flash_image' and 'mtd0.img' files to /data/local on your Slide)
Now I'm going to assume your phone is at root prompt (#) using steps 1-12. So now do (without typing the '#' symbols in front of both lines - they're just there to remind you that you need to be at a '#' prompt):
Code:
# cd /data/local
# chmod 04755 flash_image
# ./flash_image misc mtd0.img
Before you reboot make sure that the ESPRIMG.zip is on your SDcard!
Now turn off the phone.
Then press Volume-Down + Power.
The phone will power on and after about 5 minutes of verifying ESPRIMG.zip it will ask you if you want to flash it.
Press Volume-Up for 'YES' and wait until it finishes (ABSOLUTELY DO NOT POWER DOWN WHILE IT'S STILL FLASHING!!!).
Now when you go into recovery it should allow you to 'Apply update.zip from sdcard' (booting into Clockwork). If you don't have the Clockwork update.zip, here it is: http://www.4shared.com/file/OTRU7T3y/update_2.html (rename to update.zip after downloading since it's currently update_2.zip, then place it on your sdcard).
[/NEW 10/18/2010]
[NEW 12/30/2010]
Optional: Now that you're rooted you might want to disable all flash memory protections so you can permanently flash Clockworkmod (recovery - no more using an update.zip!) as well as other random things. Check here for details: http://forum.xda-developers.com/showthread.php?t=798168
[/NEW 12/30/2010]
CREDIT GOES TO:
[*] ChiefzReloaded! (For helping me learn the intricacies of Android and patiently answering all of my questions)
[*] 743C (For developing the original exploit)
Source code: (Yes, it's hackish. I was just trying to figure out why the system kept rebooting and haven't cleaned up the code since) download
DOWNLOAD:
http://www.4shared.com/file/CZsxSq-f/exploid.html
DONATE:
(Anything helps!)
(Some people may wonder why this is special compared to the One Click Root application. What's important is that One Click Root doesn't work on Slides running production/retail software, likely the same problem I had to fix to get exploid to work in my version.)
Thats whats up!!
If you be trollin then YOU BES TRAWLLIN
But if not then good job nb!
Sent from my T-Mobile myTouch 3G Slide using XDA App
Can you provide the source? No offense, but I tend not to run homebrew C programs that I didn't compile myself.
Thanks for all the work!
falken98 said:
Can you provide the source? No offense, but I tend not to run homebrew C programs that I didn't compile myself.
Thanks for all the work!
Click to expand...
Click to collapse
Sure, I was getting around to that - and I understand your concern. I'll post it in a second.
falken98 said:
Can you provide the source? No offense, but I tend not to run homebrew C programs that I didn't compile myself.
Thanks for all the work!
Click to expand...
Click to collapse
You think nb is distributing a virus disguised as a root method?
Waaaaaat
Sent from my T-Mobile myTouch 3G Slide using XDA App
r0man said:
You think nb is distributing a virus disguised as a root method?
Waaaaaat
Click to expand...
Click to collapse
It is a bit funny, but I do understand his concern. I've posted the source code into the original post. Compiling it should result in the same hash as the binary I posted.
Good to see this I suggested this in another thread glad to see it in use thanks a bunch
nbetcher said:
It is a bit funny, but I do understand his concern. I've posted the source code into the original post. Compiling it should result in the same hash as the binary I posted.
Click to expand...
Click to collapse
Ill take a look at it when I get home.
ilostchild said:
Good to see this I suggested this in another thread glad to see it in use thanks a bunch
Click to expand...
Click to collapse
I actually had to do a lot of work on it. It doesn't quite work the same as the original exploid simply because the original exploid crashes the entire system and reboots. This causes the rootshell to never be committed to NAND and thus you get no where. I had to keep playing with things until I found a different method that works. It took several hours of me being upset with it, but watched the latest Burn Notice, came back to it, and BAM I had a stroke of genius.
where is rootshell? i can't exicute rootshell nor can i "cp" any files from sdcard however i do have a # instead of a $
Armyjon88 said:
where is rootshell? i can't exicute rootshell nor can i "cp" any files from sdcard however i do have a # instead of a $
Click to expand...
Click to collapse
Ignore that portion of the instructions provided by the program. As I stated, this is not intended for non-developers at this point. The # is your indication that you're running as root.
I am headed to work, but I don't usually have much going on there - I will be setting up a much cleaner system/environment for non-developers to work with and perma-root their phones with over the next few hours. Stay tuned!
Sweet
Sent from my T-Mobile myTouch 3G Slide using XDA App
having # and running as root as stated before u can actually follow with eng and then custom recovery and ur choice's rom..pls correct me if im wrong..thanx
statuzz said:
having # and running as root as stated before u can actually follow with eng and then custom recovery and ur choice's rom..pls correct me if im wrong..thanx
Click to expand...
Click to collapse
i'm also wondering the same thing, because i got the exploid working, and i have the # in the shell, but when i go to follow the instructions to flash the eng-release, i can't cd to any different dirs, nor can i push any files to the phone. i have the ESPRIMG.zip copied to my sdcard, so could i just reboot into recovery and flash the nbh from there? any help is appreciated.
nbetcher said:
Ignore that portion of the instructions provided by the program. As I stated, this is not intended for non-developers at this point. The # is your indication that you're running as root.
I am headed to work, but I don't usually have much going on there - I will be setting up a much cleaner system/environment for non-developers to work with and perma-root their phones with over the next few hours. Stay tuned!
Click to expand...
Click to collapse
Let me know if you want to work together on some kind of one-click root app for the Slide. If the commands work through the terminal on the phone itself rather than via adb, I could probably make this into an app already, but since you're working on a more non-developer-friendly version, I'll just wait until that's out
televate said:
i'm also wondering the same thing, because i got the exploid working, and i have the # in the shell, but when i go to follow the instructions to flash the eng-release, i can't cd to any different dirs, nor can i push any files to the phone. i have the ESPRIMG.zip copied to my sdcard, so could i just reboot into recovery and flash the nbh from there? any help is appreciated.
Click to expand...
Click to collapse
I'm delaying the release of my non-developer program for another couple hours.
As far as what you said above, all you need to do after gaining the # prompt is (in a separate window):
adb push flash_image /data/local
adb push mtd0.img /data/local
(switch back to your # adb shell, then type
cd /data/local
chmod 04755 flash_image
./flash_image misc mtd0.img
Then reboot and apply the ESPRIMG.zip. All of these files are found on the same post that I referenced in my OP. These instructions are all in that same page.
televate said:
i'm also wondering the same thing, because i got the exploid working, and i have the # in the shell, but when i go to follow the instructions to flash the eng-release, i can't cd to any different dirs, nor can i push any files to the phone. i have the ESPRIMG.zip copied to my sdcard, so could i just reboot into recovery and flash the nbh from there? any help is appreciated.
Click to expand...
Click to collapse
Im also stuck since im not sure if you can update to eng from the ota..But first i want to personally thank the OP & CR for providing this.
This would be great for a One Click method
this would be nice to work into a one click root!
And This did work for me!
Does this root method gets /system moumted when android running?In short do we finaly get metamorph and root explorer working?

Cant run Debian

Hi there, i was trying to run Debian on my pro, but i cant install it! i try two methods, the Linux installer Beta 1.7 (say kernel dosnt have ext and loop support) and the SU terminal emulator way (cant chmod to 4755 any file, even using the su command - from here: http://www.talkandroid.com/android-forums/android-development/1091-install-debian-android.html )...
My pro is ROOTED with latest z4root, i even do a factory repair with pc companion...
Any advice???
Regards!
I tried this as well... no loop is no loop ( required for chroot type runs )
works on a Samsung i5700 I have at work tho...
thnx for the reply, so i can add loop and the ext thing? or we need a custom kernel? , what rom have the samsung?, in other hand i dont know why i cant chmod the files, even using root explorer! regards...
needs a new kernel yes.
i5700 is running samdroid cooked ( forget which version, but added multitouch )
damn :/
now why i cant chmod the files using su terminal emulator or root explorer? maybe is because my sdcard is formated in fat32, regards!
fat32 knows nothing about *nix style permissions, in a way though... all files on a fat32 are set 0777, but not really... heh
For what it's worth, I've just had Debian running in a chroot on my X10 Mini Pro, using the instructions at talkandroid.com, as mentioned by the original poster. Sorry, but as a new poster, I'm not allowed to link directly to those directions. This is with stock ROM, upgraded to Android 2.1, rooted with SuperOneClick.
A few modifications are necessary to make it work. I'm going to try to describe what I've done, but I am working backwards, so it's entirely possible that I'll leave something out and you could suffer disastrous consequences. So please be sure you back up all crucial data before proceeding, and be prepared to accept the possibility that your phone could be destroyed in the process.
First of all, the instructions tell you to run scripts from your SD card, which isn't going to work unless the card has a partition with a Linux-compatible file system. I suggest following the directions as far as step 4. Then replace the "bootdeb" file in the "debian" directory with the modified version attached to this post. Rename it "bootdeb". Then you will have to run the following commands manually, preferably using adb shell, but it can be done in a terminal on the phone. Either way, using the ash shell helps by providing command completion and history.
As root (su):
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /system
mkdir /data/local/mnt
cd /sdcard/debian
cp bootdeb /data/local/bin #note: you may need to mkdir /data/local/bin first
cd /data/local/bin/
chmod 4777 bootdeb
You should now be able to run the bootdeb script to start up Debian.
The installation file says, "Be sure to run /scripts/onetime.sh as root from the shell after your FIRST 'boot'." This will prompt you to set a root password.
At this point, the Debian installation is command line only and root only. The image file needs to be resized before much can be added.
The other files in the Debian directory may be useful, but they all need to be modified before they can be used.
This is only a beginning. I don't know that I'm likely to get very far with it, so anyone else who's inclined to jump in and make this work better is welcome to do so!
edit: correcting grammatical error
Just in case anyone else shares my obsession -- I mean interest in getting Debian to run on an X10 Mini Pro, I thought I should report my progress. Or lack thereof.
Actually, as I said in the previous post, command line Debian works, and that's a lot of power to have available. But it would be nice to get X working, despite the lack of video drivers.
There's a lot of information out there about setting up X with a VNC server on an Android phone, then running a VNC client to access the graphic environment. The source of most accounts seems to be a thread at the androidfanatic forums, with the title "Gnome, KDE, IceWM or LXDE Desktop on your Android!"
(Sorry, I'm still too new at this to be allowed to post links, so this is the only way I can indicate where to find the information.)
I've tried lots of variations on those directions, trying to adapt them to the X10 Mini Pro. And I've had a little success. I can get to the Icewm or LXDE desktop and run the terminal program, but I can't start any programs that use X. Invariably, I get this error:
Error: Can't open display: :1.0
I've run out of ideas, so I'm taking a break from the project. If anyone else is interested enough to try, good luck to you!
For what it's worth, the most recent and comprehensive account of running Debian with X on Android phones appears to be at lanrat.com, in the "android" directory, filename "debian".
@RobbH
Very interesting! I'm waiting a new 8gb card so that I try it! Should you come up with any new progress please report here

What is Gfree?

I've got a few questions about Gfree.
1. What is it?
2. Is it a part of Android SDK or do I get it as stand alone tool?
3. Do I use it on the phone or on the PC in the command mode?
thanks.
this may give you a clue:
http://forum.xda-developers.com/wik..._Root_.2F_.22Permaroot.22.29_using_gfree_v0.7
if not try looking here: stfw
NO. I've been at that link already.
It does not explain what Gfree is.
It only says to use commands like this:# ./gfree -f -b hboot-eng.img -y recovery.img
No explanation.
And Google does not give any good links either.
bumping up.
G-free is an application to gain permanent root access to your phone. The commands are what determines what you want the application to do such as sim unlock, s=off and such.
Also it is a standalone tool but adb is used to push the file to the phone. Commands are done through terminal emulator on the phone.
lowandbehold - thank you very much.
So this is something like z4root or SuperOneClick -a stand alone rooting app...
It just needs commands through terminal emulator.
The same concerns Rage?

HowTo: Root your Motorola Droid X2 - UPDATED [14DEC2011]

Moon Shadow's Droid X2 Tutorials - HowTo: Root your Motorola Droid X2
Please keep in mind that this tutorial is specifically for the Motorola Droid X2 running any version of Gingerbread 2.3.4 and below. This procedure MIGHT work for other phones, however, I would not recommend taking the risk of bricking, or even soft bricking, your phone.
Standard disclaimer: I, nor XDA Forums, are responsible for what you do to your phone. Just because these tutorials work for me, does not mean that they will work for you.
I make no claims to be the original owner of this process. I am just consolidating the process into an easy to follow (hopefully) guide that will help everyone from noobs to experienced users.
This tutorial has been adapted from the post: [16/Nov][ROOTING/UNROOTING] DooMLoRD's Easy Rooting Toolkit [v3.0](zergRush Exploit by DooMLoRD.
Unrooting is covered at the end of this post.
This method uses Windows! (I know, I'm a Linux guy, but...) If you have a Mac or a Linux box, use Pete's One Click Root for Linux and OSX - Droid 3. I have not tried it as my Linux system crashed several months ago and I do not have the funds to purchase new hardware or fix it. I can try to assist as I am a mixed environment System Administrator, however, I make absolutely no claims of being a guru. I have heard (not substantiated) that people are having success using Virtual Box. I highly recommend Virtual Box as it seems to be the only free virtualizing environment that supports accessing hardware directly, as long as Linux sees the hardware, Virtual Box and use it (for the most part).
I am making some assumptions in this tutorial:
1. You understand and are comfortable with installing software on a Windows computer.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
2. You understand and are comfortable with downloading programs.
3. You understand and are comfortable with extracting compressed files (*.zip, *.rar *.7z, etc.) (I recommend 7zip to extract all compress files.)
4. You are willing to read this entire tutorial and ask questions if something is unclear to you, BEFORE you start this process. (Better to be safe than sorry.)
Now, on to the good stuff…
Hints:
Text in green are applications to launch or buttons to push within an application.
Text in red are warnings.
Orange is reserved for text that must be typed or copied. – Specific commands are also listed in code boxes.
This process is for Gingerbread (2.3.x) ONLY! For the Froyo gingerbreak, see booked's thread: [REF] Roms, Root, SBF, RSD, Bootstrap, Mods.
I have performed this method for rooting my Droid X2 from both Windows XP (SP3) and Windows 7 Professional x64. After a system boot file (SBF) restore of 2.3.4. Tutorial on SBF is here: Moon Shadow's Droid X2 Tutorials - How to perform an SBF of your Motorola Droid X2.
1. First download the correct Motorola driver for your Windows system:
a. Windows universal 32-bit Motorola drivers version 5.2.0
b. Windows universal 64-bit Motorola drivers version 5.2.0
2. Next download DooMLoRD's ROOT-zergRush: DooMLoRD_v4_ROOT-zergRush-busybox-su.zip (Older version: DooMLoRD_v3_ROOT-zergRush-busybox-su.zip).
3. Install the correct driver and reboot.
4. Once the computer comes back up, extract DooMLoRD_v4_ROOT-zergRush-busybox-su.zip.
5. Make sure USB Debugging is enabled on your device. This can be accessed by hitting the Menu key and navigating to: Settings -> Applications -> Development and making sure there is a check mark in the box next to USB Debugging.
6. Plug the USB cable into your phone and computer.
7. Make sure your phone is in “Charge Only” mode:
a. Drag the Pull Down Menu down
b. Tap “USB Connection”
c. Select “Charge Only” mode
d. Click OK
8. From the new folder you created, launch runme.bat.
9. A command prompt window will open, make sure the phone is plugged into computer via the USB cable and press any key.
10. zergRUSH will reboot your phone once it is done. Watch for errors. If there are none, you will be rooted. If there are errors, try re-running zergRUSH again.
11. Once your phone is rooted, open the market and upgrade Superuser and Busybox. Busybox can be upgraded via the app from Stephen (Stericson) or JRummy16. Please, if you use these tools, purchase the Pro versions. This helps support our developers! Thanks!
People have asked about un-rooting their DX2. Here is what I posted in another topic:
I do not know about unrooting using Pete's tool. I haven't tried it. (But ashclepdia says it works just fine.)
There are two options that I know of to unroot your Droid X2. They are:
1. If you already have root privileges (and root/su works), using a root enabled explorer (I use File Expert) mount the /system folder in read/write (rw) mode and delete the following 3 files:
a. /system/xbin/busybox
b. /system/xbin/su
c. /system/app/Superuser.apk
OR
In the adb shell, type the following:
Code:
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
rm /system/xbin/busybox
rm /system/xbin/su
rm /system/app/Superuser.apk
reboot
(The reboot command will reboot your phone. If you are not done working with your phone or in the adb shell, just type exit, or keep working with ADB.)
2. The easiest, don't screw up your phone, put it back to "as stock as the day you got it", way is to do a data wipe and SBF. Performing a SBF restore is not difficult at all. See my tutorial: Moon Shadow's Droid X2 Tutorials - How to perform an SBF of your Motorola Droid X2.
Click to expand...
Click to collapse
Old rooting method (depricated but left in for information):
This tutorial has been adapted from the post: [Gingerbread Root] Pete's Motorola Root Tools by infazzdar who reposted from the original post from Pete Souza at http://www.psouza4.com/Bionic/.
This method uses Windows! (I know, I'm a Linux guy, but...) If you have a Mac or a Linux box, Pete posted this:One Click Root for Linux and OSX - Droid 3. I have not tried it as my Linux system crashed several months ago and I do not have the funds to purchase new hardware. I can try to assist as I am a mixed environment System Administrator, however, I make absolutely no claims of being a guru. I have heard (not substantiated) that people are having success using Virtual Box. I highly recommend Virtual Box as it seems to be the only free virtualizing environment that supports accessing hardware directly, as long as Linux sees the hardware, Virtual Box and use it (for the most part).
I am making some assumptions in this tutorial:
1. You understand and are comfortable with installing software on a Windows computer.
2. You understand and are comfortable with downloading programs.
3. You understand and are comfortable with extracting compressed files (*.zip, *.rar *.7z, etc.) (I recommend 7zip to extract all compress files.)
4. You are willing to read this entire tutorial and ask questions if something is unclear to you, BEFORE you start this process. (Better to be safe than sorry.)
Now, on to the good stuff…
Hints:
Text in green are applications to launch or buttons to push within an application.
Text in red are warnings.
Orange is reserved for text that must be typed or copied. – Specific commands are also listed in code boxes.
This process is for Gingerbread 2.3.3 and 2.3.4 ONLY! For the Froyo gingerbreak, see booked's thread: [REF] Roms, Root, SBF, RSD, Bootstrap, Mods.
I have performed this method for rooting my Droid X2 from both Windows XP (SP3) and Windows 7 Professional x64. Both on the initial 2.3.3 Gingerbread load when I received my phone, on the 2.3.4 Gingerbread over the air (OTA) update, and after a system boot file (SBF) restore. Tutorial on SBF is here: Moon Shadow's Droid X2 Tutorials - How to perform an SBF of your Motorola Droid X2.
1. First download the correct Motorola driver for your Windows system:
a. Windows universal 32-bit Motorola drivers version 5.2.0
b. Windows universal 64-bit Motorola drivers version 5.2.0
2. Next download Pete’s Motorola Root Tools: PetesMotorolaRootTools_v1.07.zip
The program still say's "This is version 1.06 of this tool, by Peter Souza IV. Exploit by Dan Rosenberg." What was updated was the version of su and busybox.
3. Install the correct driver and reboot.
4. Once the computer comes back up, extract PetesMotorolaRootTools_v1.07.zip.
5. Make sure USB Debugging is enabled on your device. This can be accessed by hitting the Menu key and navigating to: Settings -> Applications -> Development and making sure there is a check mark in the box next to USB Debugging.
6. Plug the USB cable into your phone and computer.
7. Make sure your phone is in “Charge Only” mode:
a. Drag the Pull Down Menu down
b. Tap “USB Connection”
c. Select “Charge Only” mode
d. Click OK
8. From the new folder you created, launch Pete's Motorola Root Tools.exe.
9. Click the Root My Phone button.
10. Pete’s Motorola Root Tools will reboot your phone a total of three times. At the end of the last reboot, Pete’s Motorola Root Tools SHOULD tell you that your phone has been rooted successfully. If it does not, follow the steps in the next section. (I had to do this after one SBF.)
11. Once Pete's Motorola Root Tools tells you your phone is rooted successfully, open the market and upgrade Superuser and Busybox. Busybox can be upgraded via the app from Stephen (Stericson) or JRummy16. Please, if you use these tools, purchase the Pro versions. This helps support our developers! Thanks!
Manual root:
If the preceding steps did not root your phone, follow these manual steps (it's kind of ugly, but it works). This process will install the Android Debug Bridge (ADB) and the Android Standard Development Kit (SDK). For a specific and customized HowTo on ADB Visit the [HOW-TO] ADB for Dummies(How-To Learner's Guide) post on XDA by VanillaTbone and download either the ADB for Dummies Guide or ADB for Dummies AIO(All In One) App by AndroidSamurai. (I think both VanillaTbone and AndroidSamurai are two different people, but I’m not sure. If anyone can clarify that would be great. Thanks!) Please keep in mind that these manual steps are specifically for the Motorola Droid X2. They might work on other phones, however, I take no responsibility for you bricking or soft bricking your phone by trying this.
1. Download and install the latest Java Development Kit (JDK) from Oracle. (As of this writing, 22OCT2011, Java SE Development Kit 7u1 is the most current version. PM me if there is a newer version so I can update this.)
2. Download and install and configure the latest Android SDK from Google. Once installing the Android SDK, launch SDK Manager and download and install the "SDK Platform-tools". (As of this writing, installer_r14-windows.exe is the most current version. PM me if there is a newer version so I can update this.)
3. For Windows XP and Windos 7 32-bit (i686), add the following to your path statement: C:\Program Files\Android\android-sdk\platform-tools. For Windows 7 64-bit (x86_64), add the following to your path statement: C:\Program Files (x86)\Android\android-sdk\platform-tools. The path statement is located by right clicking My Computer in Windows XP or Computer in Windows 7 and selecting Properties -> Advanced -> Environment Variables and locate PATH under System Variables. Double click the line and add a semicolon to the end, if there is not one there and copy and paste the above line to the end.
4. Reboot your computer.
5. Download DROID 3 easy root script v7.zip.
6. If the following folder does not exsist, create it: C:\TEMP
7. Then create a folder in C:\TEMP called MANUAL_ROOT
8. Extract the Droid 3 easy root script v7.zip into the C:\TEMP\MANUAL_ROOT folder.
9. Once you have rebooted your computer, open a command prompt. Yeah, you know, one of those DOS things… ADB is an Android tool, and Android is a fork of Linux. Get used to it. A bunch of typing is in your future, plus it’s good for you.
10. Type the following command:
Code:
adb shell
11. You should receive an ADB prompt ending with either a # or a $.
12. If the line ends with a $, then run Pete’s Motorola Root Tools.exe.
13. Click the Run Temp. ADB Root Procedure button.
14. The program reboots your phone three times, I think… Hey, I’m an old guy and my memory is failing me. Okay, maybe not that old, but that is my excuse!
15. Once the process is complete, enter the following command:
Code:
adb shell
16. You should now have and adb shell ending with a #. If not, reboot your computer and Droid X2 and start again at step 13.
17. Type the following command: (This remounts the /system directory on the Droid X2 as read/write, because the partition is mounted read only.)
Code:
mount -o remount,rw /dev/block/system /system
18. Type exit until you are back to the DOS C:\> prompt, then type the following: (The first changes directory to the C:\TEMP\MANUAL_ROOT directory, the push commands push the required files for su, busybox and the Superuser.apk app to the Droid X2, the shell commands set the read/write/execute (rwx) permissions on su and busybox and changes the owner and group on the /data folder to system, the reboot command reboots your phone.)
Code:
CD \temp\manual_root
adb push busybox /system/xbin/busybox
adb push su /system/xbin/su
adb push Superuser.apk /system/app/Superuser.apk
adb shell chmod 4755 /system/xbin/su
adb shell chmod 755 /system/xbin/busybox
adb shell chown system.system /data
adb shell reboot
19. It may take quite a while (5-10 minutes) for your phone to come back up to the home launcher. Sit, relax, or better yet, walk away from your computer.
20. Once the phone has booted, open the market and upgrade Superuser and Busybox. Busybox can be upgraded via the app from Stephen (Stericson) or JRummy16. Please, if you use these tools, purchase the Pro versions. This helps support our developers! Thanks!
21. This concludes the tutorial for rooting your Motorola Droid X2.
Again, if you have any questions, or comments, either post them here, or PM me! Thanks all!
Ciao!
Very nice!
Sent from my DROID X2 using xda premium
Great write up, hope this helps the new guys!
THANK YOU!! FINALLY someone got this together.
Now maybe I can stop defending noobs hahahaba.
This is great. Very nice job. I even enjoyed just reading it even though I am already rooted and all that jazz. This is very accurate and very well written. Thanks for ur time. Great job.
question...how easy is it to unroot? like if i need to get my x2 warrantied for any reason. will i have to go through the whole SBF process?
Thanks
neiche said:
question...how easy is it to unroot? like if i need to get my x2 warrantied for any reason. will i have to go through the whole SBF process?
Thanks
Click to expand...
Click to collapse
As long as u made a nandroid right after rooting BEFORE doing any mods all u need to do is restore nandroid and use the one click root method again. But use it for unroot.
Personally tho I would just sbf and data wipe as that should get rid of ANY trace of root. And sbf isn't hard. It would take maybe 15 minutes longer than uprooting but u have the security of knowing it is back completely stock afterwards.
Have u done an sbf ever? U will be surprised at how simple it can be once u do it a couple times
neiche said:
question...how easy is it to unroot? like if i need to get my x2 warrantied for any reason. will i have to go through the whole SBF process?
Thanks
Click to expand...
Click to collapse
Sbf would be ur best bet. Just to make sure u remove everything (
Sent from my DROID X2 using xda premium
Sbf is the "save all" so far for x2. And it's really only like 5 simple steps once u have rsdlite and moto drivers installed
ashclepdia said:
Sbf is the "save all" so far for x2. And it's really only like 5 simple steps once u have rsdlite and moto drivers installed
Click to expand...
Click to collapse
I do not know about unrooting using Pete's tool. I haven't tried it. There are two options that I know of to unroot your Droid X2. They are:
1. Using a root enabled explorer, I use File Expert, mount the /system folder in read/write (rw) mode by typing this:
Code:
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
and delete the following 3 files:
a. /system/xbin/busybox
b. /system/xbin/su
c. /system/app/Superuser.apk
2. The easiest, don't screw up your phone, put it back to "as stock as the day you got it", way is to do a data wipe and SBF. Performing a SBF restore is not difficult at all. See my tutorial: Moon Shadow's Droid X2 Tutorials - How to perform an SBF of your Motorola Droid X2.
Also, to everyone, I really appreciate the kind words. My intent it to help as much as possible, without being the complete techno-weenie that I am.
Moon Shadow - NM said:
I do not know about unrooting using Pete's tool. I haven't tried it. There are two options available to unroot. They are:
1. Using a root enabled explorer, I use File Expert, mount the /system folder in read/write (rw) mode and delete the floowing 3 files:
a. /system/xbin/busybox
b. /system/xbin/su
c. /system/app/Superuser.apk
2. The easiest, don't screw up your phone, put it back to "as stock as the day you got it", is to do a data wipe and SBF. Performing and SBF restore is not difficult at all and I will be publishing an SBF tutorial here, probably tomorrow.
Click to expand...
Click to collapse
Yup. That works also.
But I am also positive that the one click method has an option for unroot as I have seen AND uses the option
Edit:: by the way I want to say thanks again for writing this tutorial and in advance for the sbf tutorial.
this one is very complete and up to date and I look forward to reading ur sbf post.
This should be stickied, would save a lot of member headaches trying to find it to point newbs!
AtLemacks said:
This should be stickied, would save a lot of member headaches trying to find it to point newbs!
Click to expand...
Click to collapse
Thanks! Let the mod know... Infact, who is the mod for this forum?
Just an FYI for Windows 7 on the manual rooting method. The default directory the Android SDK installs to is Program Files (86x). In your direction it just says Program Files which would be correct for XP I believe. I had trouble running the Command Prompts because it wouldn't recognize any of the commands until I figured out it was because i put the wrong directory for the PATH for the commands.
Meticode said:
Just an FYI for Windows 7 on the manual rooting method. The default directory the Android SDK installs to is Program Files (86x). In your direction it just says Program Files which would be correct for XP I believe. I had trouble running the Command Prompts because it wouldn't recognize any of the commands until I figured out it was because i put the wrong directory for the PATH for the commands.
Click to expand...
Click to collapse
Ahhhh! Thanks! I did forget that! Thanks for the catch! Tutorial has been updated!
Sent from my rooted, deodexed, personalized, stock rom, Motorola Droid X2. What's with the locked bootloader Moto????
Moon Shadow - NM said:
Thanks! Let the mod know... Infact, who is the mod for this forum?
Click to expand...
Click to collapse
arrrghhh said:
Click to expand...
Click to collapse
Thanks arrrghhh!
Moonshadow also has a tutorial for bootstrap and sbf that would make GREAT stickies if u wouldn't mind
ashclepdia said:
Thanks arrrghhh!
Moonshadow also has a tutorial for bootstrap and sbf that would make GREAT stickies if u wouldn't mind
Click to expand...
Click to collapse
Heh, ok. Went a little crazy with the sticky threads. Moon Shadow, might want to clean up the thread titles - just a thought. You pretty much own the sticky section now .
arrrghhh said:
Heh, ok. Went a little crazy with the sticky threads. Moon Shadow, might want to clean up the thread titles - just a thought. You pretty much own the sticky section now .
Click to expand...
Click to collapse
Ummmm, really? I own it? Hmmmmm...
Anyhow, I'll remove the self credit in the thread titles and make them specific.
Moon Shadow - NM said:
Ummmm, really? I own it? Hmmmmm....
Click to expand...
Click to collapse
Eh I was just teasing. You do have a lot of threads up thar tho .
Can somebody please help me? Running stock 2.3.4 and Windows 7 32-bit
The one click tool does not work for me. I followed the steps exactly but I get this:
"ERROR: adb could not be granted root access via local.prop method"
I tried doing it again and the same thing happened.
Then I followed the SBF tutorial, thinking that would help. I SBF'd and did a factory reset and tried the program again and it still did not work.
Then I tried doing the manual method and followed steps 1 through 4 (step 5 is missing?? or just numbered incorrectly?) and 6 through 11. When I type adb shell in the command prompt, I get " 'adb' is not recognized as an internal or external command, operable program or batch file." preventing me from moving forward with the rest of the steps. I have rebooted both my phone and my computer many times and reinstalled the drivers and everything.
If someone could please explain what I am doing wrong and help me root my phone, I would very much appreciate it. I've been trying for the past three hours now and am getting frustrated.
Thank you.

[GUIDE][Linux] Flashing Xiaomi .tgz

Hello everyone,
I recently had to flash a stock firmware file from Xiaomi (.tgz) and being primarily a Linux user I was quite disappointed by the fact that the company only provides a flashing tool for Windows.
Either way, I booted into Windows and flashed it. I had a look at the logs later and apparently their flash tool is just a front-end to fastboot, and looking at their firmware archives I noticed there were some .sh files in there, and guess what, they're scripts which do the exact same things their Windows scripts do! So I decided to try to use them to flash the firmware on Linux and, sure enough, after ~10 minutes the device was successfully flashed.
Here's what I did, as always I don't take responsibility for bricked devices, try this at your own risk:
1. unpack the archive
Code:
tar -xf <archive_name>.tgz
2. cd to the archive directory
3. grant run permissions
Code:
chmod +x flash_all.sh
(in my case I was interested in flash_all.sh, I think you can follow the exact same procedure with whichever script you want, though I haven't tested it)
4. get your device id
Code:
fastboot devices
you'll get something like this
Code:
List of devices attached
d82c2d3 fastboot
you're interested in the first column, so in my case d82c2d3
5. run the script
Code:
./flash_all -s <device_id>
at this point the flashing process should start and if everything went good your phone should reboot in a few minutes.
You might need to prepend the commands in point 4 and 5 with sudo.
Also, I don't know if every firmware archive has these .sh files, but it would seem logical. By the way, let me know if this is common knowledge and my googling just sucks as I couldn't find anything related to it...
Just tried it on my Mi 10 Pro and it doesnt work says device is locked just like it does if I try and flash using fastboot.
guglicap said:
Hello everyone,
I recently had to flash a stock firmware file from Xiaomi (.tgz) and being primarily a Linux user I was quite disappointed by the fact that the company only provides a flashing tool for Windows.
Click to expand...
Click to collapse
Thank you, it worked...

Categories

Resources