[Newbie Guide] adb/fastboot/bootloader/android 101

Search This thread

lork89

Member
Nov 27, 2011
8
0
Hi guys, noob-who's-trying-to-figure-out-something here. =)
I wish to ask some questions: any answer will be thanked!

Can somebody tell me what does S-OFF/S-ON means? I searched it everywhere but I can't find a place where it is explained.

And...how can I check if a radio is signed or not? I read that flashing an unsigned radio is a quick way to brick the phone, so I wish to know how can I check that.

I am trying to understand better how does everything work before messing something up... XD

Thank you!
 

Dude Random21

Senior Member
Dec 27, 2010
286
42
For S-ON/S-OFF you can check it from fastboot. The "S" stands for security and it's a security check, more precisely a signature verification. On most phones when you unlock the bootloader you get S-OFF, on the nexus one, since there is an "official way" to unlock the bootloader (seeing as it's a developers phone) when you unlock it you keep S-ON. With an unlocked bootloader you can flash unsinged images for ROMs and anything going into the system partition but not for stuff going into the hboot or radio partitions. This is where S-OFF comes in, you can flash stuff to there but the thing is the only real reason you would want to flash stuff to those partitions is to relock the bootlaoder but with S-OFF for some reason it lets you do a "fastboot-oem lock" which will relock the bootloader all together. So all in all it's not all that useful.

If you flash the radio through fastboot and not recovery there is no worry it will check for a signature and if there is none it will abort. But I would still check md5 to make sure they match (check out manD5).

Hope all this helps but as I always recomend with this stuff I'd wait for someone to either confirm or deny what I just said because sometimes people make mistakes. I usually know my way around this stuff but there's a few things I don't know.
 
  • Like
Reactions: lork89

gordec

Senior Member
Aug 21, 2007
1,077
263
San Francisco, CA
Guys, I'm going to try out ADB commands for the first time and with the goal of possibly developing ROMs one day.

Right now I'm trying to figure out if my LG Nitro HD has an unlockable bootloader or not.

If I do "fastboot oem unlock" in ADB, will that give me an answer or is this command device specific?

Please point me to the right direction. A very detailed search in google hasn't made clear to me how I should go about figure out if a device's bootloader is unlockable. Thx

Update: I tried to both into bootloader and recovery commands. When I run bootloader it will flash LG splash screen a few times and loads the system. When I run recover, it shows the typical android and the box screen and automatically goes into system. I'm lost in terms of what more I can do. Sorry this is super noob questions.
 
Last edited:

StereO_

Senior Member
Dec 27, 2011
206
22
im using xperia mini pro.. but my phone in boot loop mode.. how can i fix this using adb/fastboot things.. how can i change the phone to enable usb debugging if the phone in boot loop mode.. im new in android platform.. hope anyone can help me to fix this..

thx for coorporation.. sory for my bad english.. :\
 

gachupas

Member
May 3, 2011
5
0
I can't make hard reset in my rooted and bloked for many wrong attemps motorola i1. Usb is not in debuging mode but i can' change it. so adb devices comand dosn't show my motorola. I've been lookink for an anwer for a few days.
 

maxxxeee

New member
Dec 26, 2011
3
0
Hi,

your guide is a good start but is there a more extensive guide for general hacking and rooting and explaining the different terms and acronyms that are used in programing (very basic) rooting, updating, error messages, error codes, etc like an encyclopedia for the android for those of us that just want to make our phones better and more useful,

if you or anybody else can provide a link of such a guide it would be welcomed


Thanks

Richard
 

virgo75

Member
Jul 26, 2010
27
0
please i need help

sorry if I'm sending you private message, but I screwed it up with my htc magic 32A tim,I do not know why I did wrong but I downloaded the file installed hboot 1.33.0013d??-and now I do not know what to do to fix it,I think I have read a post on how to unpack hboot modd and do more but can not find the page.
the phone starts in recovery mode and fastboot mode.
I see sappire pvt 32A ship S-ON G hboot_1.33.0013d (sapp10000)
cpld-12
radio 6.35.16.19
 

math4we

New member
Feb 8, 2012
4
0
hello, i've got a problem. i just unlocked bootloader and when i start, my show doesn't show my sd card, i mean that there is shown that some space is taken, but i didn't see it anywhere in menu. what happend?
 
Last edited:

taodan

Senior Member
Nov 27, 2011
978
232
LineageOS
hello, i've got a problem. i just unlocked bootloader and when i start, my show doesn't show my sd card, i mean that there is shown that some space is taken, but i didn't see it anywhere in menu. what happend?
How did you unlocked the bootloader? Does your PC show removeable disk when you connected your phone? Try mount and unmount
 

math4we

New member
Feb 8, 2012
4
0
normally, by fastboot. everything was fine. I see that i've got all apps but i have to reinstall them again. and the other problem is that when i plug phone into PC nothing happen. Like i can't now send files for example because nothing show.
Edit: when i open the card with adapter, not phone PC show me everything what is on the card, but when I plug phone to PC nothing shows.
 
Last edited:

taodan

Senior Member
Nov 27, 2011
978
232
LineageOS
normally, by fastboot. everything was fine. I see that i've got all apps but i have to reinstall them again. and the other problem is that when i plug phone into PC nothing happen. Like i can't now send files for example because nothing show.
Edit: when i open the card with adapter, not phone PC show me everything what is on the card, but when I plug phone to PC nothing shows.
Check to see if USB debugging is selected or update USB driver and android sdk
 
  • Like
Reactions: math4we

math4we

New member
Feb 8, 2012
4
0
hmm, I was just updating few hours ago cause i was unlocking bootloader. usb debug is selected
 

omglol23

Member
Feb 8, 2012
7
0
I just got my nexus one, I have been raving about this for a long time. I wanted to know how can i upgrade to gingerbread. I understand that the latest os ics upgrade is not made available for the nexus one. I have read a few posts on manually upgrading it which scare me. Is there no way for me to automatically update my OS? I just wanna I am running 2-2-1 now which is even more outdated than the fact that I just bought an N1
 

khosro large

New member
Feb 13, 2012
2
0
Problems

Im trying to root and run ADB but when the cmd screen opens its shows a bunch of texts then quickly closes.:confused::(
I'm running a windows 7 trying to root a HTC vivid and i already got the recovery from a sd card.
 

taodan

Senior Member
Nov 27, 2011
978
232
LineageOS
Im trying to root and run ADB but when the cmd screen opens its shows a bunch of texts then quickly closes.:confused::(
I'm running a windows 7 trying to root a HTC vivid and i already got the recovery from a sd card.
You're in wrong place. This is nexus one phone. Try to search your model for procedures to root your phone. Good luck

---------- Post added at 10:15 PM ---------- Previous post was at 10:11 PM ----------

I just got my nexus one, I have been raving about this for a long time. I wanted to know how can i upgrade to gingerbread. I understand that the latest os ics upgrade is not made available for the nexus one. I have read a few posts on manually upgrading it which scare me. Is there no way for me to automatically update my OS? I just wanna I am running 2-2-1 now which is even more outdated than the fact that I just bought an N1
I guess you want stock GB, go to Settings -> about phone -> system update, the steps just listed are for update OTA
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 35
    The purpose of this document is to clarify a few basics about HTC Android Phones and basic commands to interface with the phones. Think of this as a beginner's guides to the Android device from a non-traditional user's point of view. I'll keep it simple and plain as much as I can for the new users. I'll also try to keep all the technical aspects true as much as I can while keeping it simple.

    Before you go on, please read this and understand the basic concepts and how and why following commands are being used. Do not follow anyone's instructions/tutorials/guides without prior basic understanding of what each command do. I do want to believe it's humans visiting this forum and not lemmings. If you do not understand, feel free to ask here. I will or someone else also knowledgeable will answer your questions. DO NOT QUOTE THIS AS A WHOLE. My pet peeves and a complete waste of screen space.

    Sometime, depending on your OS, command names may change (e.g: mouse / mouse.exe / mouse-linux / mouse-mac). For general purpose, we'll use mouse instead of an OS specific commands in this instructions.

    So to repeat myself, if you understood the concepts of the commands, and you are on a linux system and someone's guide says touch index.php, you will automatically type touch-linux or whatever the name of your executable is on your system.

    We shall assume you know how to install needed drivers and where to get android sdk and put the sdk binaries (executables) in the system path. If we need to expend this let me know and I'll expend this here.

    Further, if I get any parts wrong, PM me and I'll get those parts corrected.

    Android Partition, SPL etc.

    Partitions:
    Followings are a list of partitions on your android phone.

    misc - misc partition -
    recovery - Recovery Partition - This is where the original HTC recovery or Amon Ra's recovery or any other Recovery would go. Basically if you reboot into recovery it'll boot from here.
    boot - This is your boot partition
    system - This is where all your system information (ROM resides)
    cache - cache (When you factory reset the phone, this area is wiped)
    userdata - user data (like your login, your user settings etc) When you factory reset the phone, this area is wiped)

    So, if you replace the recovery image, you are pretty much set for updates provided here at XDA. Note: By replacing your recovery image, you may not be able to have OTA updates.

    ROM images will normally replace boot and system images at the same time and often time, userdata and cache too; reseting the phone completely.


    SPL/Bootloader/Radio/Bricking Phones:
    SPL / Bootloader is like BIOS on a computer. At least I think of it that way. SPL can be updated! SPL comes as either Security-On of Security-Off (S-ON/S-OFF).

    Note: It is my understanding that radio will boot first, followed by other systems. So it is IMPORTANT that your radio image/version will work with your SPL image/version. This is the one and only reason for phones being bricked. You can not brick your phone by flashing a ROM or Boot image or recovery image. Once you flash the wrong radio for the SPL, the only known method of recovery is to send the phone back into HTC for repair.

    How do I know the phone is bricked? A bricked phone can not boot into bootloader, recovery, or into normal operation modes. You can not connect to a bricked phone via adb or fastboot. You can only see one screen on the phone and it will be the first splash screen.


    Commands:

    adb - Android Debug Bridge - One of the two things you'll need to know if you ever want to do anything non-conventional on your android based phone.
    List of commands that can be used by adb can be prompted by typing adb at the system shell (command prompt or terminal)

    Notable adb commands:

    adb devices - If you don't know anything, this is the ONE thing you have to know.
    adb devices will give you a list of devices connected to the computer. This is also a good way to make sure that your phone is actually connected to the computer.

    adb reboot (bootloader|recovery)
    adb reboot - this will reboot your phone normally.
    adb reboot bootloader - this will reboot your phone back into the bootloader (white screen with the android on wheels)
    adb reboot recovery - this will reboot your phone back into recovery console (either default or amon_ra's recovery).
    adb shell - this will shell into the phone and you can now explore the phone. Remember phone's native backend os is linux so know your linux commands.
    adb remount - remounts the system partition on the phone so you can you read/write to it.
    adb push xxx yyy - will push xxx file from computer into yyy location/file on phone (needs rooted access)
    adb pull xxx yyy - will pull xxx file from phone into yyy location/file on computer (needs rooted access)


    Fastboot is protocol used to update the flash filesystem in Android devices from a host over USB. It allows flashing of unsigned partition images.

    Notable fastboot commands:

    fastboot devices - If you don't know anything, this is the ONE thing you have to know.
    fastboot devices will give you a list of devices connected to the computer. This is also a good way to make sure that your phone is actually connected to the computer.

    fastboot reboot - this will reboot your phone normally
    fastboot oem unlock - this will unlock your bootloader - NOTE THIS WILL VOID YOUR NEXUS ONE WARRANTY
    fastboot erase XXX - Will erase the partition XXX (such as userdata, cache) - mainly used for resetting phone and clearing userdata / factory settings.
    fastboot flash XXX YYY - This will flash XXX partitionn with YYY image.
    e.g: fastboot flash system system_update.img will flash/update your system partition with an image called system_update

    If anyone needs me to dig deep into using anything else, please PM me. I'll add it on here. Hopefully this will help all newbies about the basic commands and what they do.

    FAQs (UPDATED Feb 09, 2010)
    Q: One question about the Android SDK. Do I need it to flash my N1 or just to program new apps? Where can I get it?
    A: Android SDK is not entirely needed to flash the N1. However, there are tools in there that you need. Adb / Fastboot etc. Although they can be downloaded by themselves, the windows version of the SDK also have the Drivers that are needed for android devices for USB connection. So, it is recommended to get it. You can get it from developer.android.com

    Q:I have never experienced anything like this when I did a hard-spl on my winmo phone. Radio versions are included with SPL's, right?
    A: Official packages from HTC did come with nbh packaging, meaning it is a all in one upgrader that will update Radio, ROM, System etc, it is very much common for active development area here at XDA to get the radio or SPL or ROM separately and independently of one another. And as such, you will most likely flash them seperately (who wants to wait 6-8 months). Also, since this phone is released by google, HTC will most likely not update any major Radios. However, it is very likely that we will be hacking in Radio updates or any other "updates" from HTC from their new device - HTC Bravo.

    Q: Is there a guide for snow leopard? I'm kind of stuck.
    A: I personally ran android SDK and aforementioned executable on both MAC OS 10.5 and 10.6. Like I posted, the commands and the executable names may be slightly different. I may call adb and you may find it as adb-mac. I am not going to write 3 separate documents for 3 separate OSes. You have to know that adb=adb-mac (on your mac), adb-linux (for linux) etc. And yes the above guide will work universally.

    Q: Can i replace the splash image..?? (unlocking related)
    A: As of the above date (next to the FAQ) no you can not. Issue is probably a few folds. One of them is that splash1.img is not going in due to security lock. Remember, you unlocked the phone. HTC will not like it. :) Anyhow, I like the current quad color X. If you are thinking of getting rid of the lock logo, good luck. Even if you can get rid of it, you will still have to overcome the pink text that says ***UNLOCKED*** on your bootloader.

    Q: Can you run Windows Mobile on Android Phones?
    A: With enough resources given, sure. Will it ever happen? No. Why? Windows mobile compiler and builder cost $. As a matter of fact, as of version 5, it was going to cost me $75 per device. That's one of the reasons why handset makers went to Android open platform. Android is free and universal so as long as you use certain chipsets and certain items, you are good to go. Can it ever be ported? Sure. With right amount of time and money anything can be done. But at this point, it's cheaper for you to go buy a windows mobile smartphone.

    Q: How do I know the phone is bricked?
    A: You can not brick a phone unless you are flashing Radio/SPL packages. Make sure if you are doing that, you follow directions VERY CAREFULLY. A bricked phone can not boot into bootloader, recovery, or into normal operation modes. You can not connect to a bricked phone via adb or fastboot. You can only see one screen on the phone and it will be the first splash screen.

    Q: I have installed the Android SDK however, i cannot seem to get the laptop to detect the nexus. What have i left out?
    A: Most common item that people forget to enable is USB Debugging. Settings => Applications => Development => USB debugging [checked]

    Q: I have rooted n1. when I go to recovery to do backup, I get the triangle with the little green android guy, but phone is stuck there. I have to remove battery to reboot phone. What have I done wrong?
    A: You still have the stock (shipping) recovery. If you want a different recovery (Amon RA's), download it, the from fastboot, run fastboot flash recovery downloaded_recovery.img

    Q: Which step of the rooting / recovery procedure does it give root?
    A: Root and Recovery are two totally different things. Recovery is a partition that contain recovery information. Stock recovery is what allows OTA updates etc. Normally it will search for update.zip in the root folder of the SD card. Amon_RA's Recovery or any other recovery images are there to enhance the traditional stock recovery. Amon Ra's Recovery for example, contains thing such as ability to update from different zip files, and backup/restore of your data/system.
    Rooting is not done by recovery but is a kernel level access (simply put) that will give root or "SU". It is done by patching the boot partition of the your android device.

    Q: What are the differences, advantages, disadvantages of the different ROM's?
    A: They are all different. Some have some features, some are plain stock, some are made for bleeding edge kernel etc. You'll have to try them out and figure out yourself. I may make a chart of what they are (see the bottom at my signature - wiki) but with too many android devices, I will need some major help. One person alone will not have total knowledge of all the ROM releases. There are just way too many devices and ROMs.

    Q: Which ROM will allow OTA updates?
    A: Stock ROM WITH Stock Recovery.

    Q: If the phone is SIM/carrier unlocked and you root do you have to SIM unlock again?
    A: SIM/Carrier unlock has nothing to do with rooting your phone. You can still have root and still be carrier locked. Nexus One comes carrier unlocked from factory.

    Q: How much space is there for apps? is using the sd card really necessary? (on Nexus One)
    A: Search google? The phone has 512MB or space. That SHOULD be more than enough for you. If not, you have some serious issues. I do not believe you will not App2SD for Nexus One. Google did say during the release conference that they will update Android/N1 so that apps can be run/installed to SD but that requires some system and security changes (mainly to prevent pirated software - Yes if I write something, I deserve to get paid for it).

    Q: When you do "flash zip from sdcard" or "fastboot flash image" does this merge and overwrite the files in to the partition?
    A: When you update a software (via recovery), software my be merged. However, if you fastboot flash, just like the word flash says, it will flash and overwrite the partition.

    Q: Which partition does "flash zip from sdcard" affect?
    A: Depends on what you are flashing. It could be any or all of the partitions such as SPL, Boot, System, Recovery, Radio. You should study first before randomly flashing things.
    1
    Don't forget fastboot boot for testing images. My most used command :)
    1
    If the command is not recognized, it's because the adb file is not in the same folder that you have navigated to in you command prompt. With the latest sdk, some of the folder and file locations have changed, so the older guides may be out of date...

    Look in the sdk folders and find the adb file.
    Make sure the command prompt is the same as the file location...

    Sent from my Nexus One using XDA App
    1
    Your phone needs to be at the fastboot screen for fastboot to work...

    Hold volume down, and while still holding, power the phone up. You will get a white screen with text, and three android on skateboards. The sixth or seventh line of text will say HBOOT. Use the on screen menu to select FASTBOOT.

    The fastboot screen will look almost identical, but the sixth or seventh line will now say FASTBOOT (or FASTBOOT-USB, if connected to the computer).

    Sent from my Nexus One using XDA App
    1
    I'm talking about on your PC...

    The cmd prompt should tell you which directory you are in (something like C:\sdk\tools). The fastboot file needs top be in the same folder (use Windows explorer to check)

    Your adb command is in the "platform-tools" folder, but I think fastboot is in the "tools" folder (it's easier to move them into the same folder).

    Sent from my Nexus One using XDA App