Welcome to the Android Central Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Page 1 of 2 12 LastLast
Results 1 to 25 of 34
Like Tree5Likes
  1. Thread Author  Thread Author    #1  
    truslide's Avatar

    Posts
    562 Posts
    ROM
    Stock

    Default [Official] Beginners Introduction to the SDK(ADK)

    Alright Beginners and new-comers. In an attempt to take something overwhelming, and underwhelm it... I'm going to take what I know and have learned about the SDK over the past few months and try to compile it into a very basic and easy to understand thread. This is going to be the simplest explanation, with the detail it will need.

    Credits go out to
    #1 JerzyIroc
    Vaelek
    igotsanevo4g
    iamlilysdad
    d3x
    xhausx
    regawd_linaed
    liquid_jesus
    (Thanks for all your help and taking the time to answer my questions and educate me.)

    So lets get started. o_O

    Ready... Breathe... it's not that intimidating. Remember, I don't know A-N-Y-T-H-I-N-G! lol

    So, What is an SDK/ADK?
    The DK stands for Development Kit. S-Standard / A-Android.

    What is the primary reason for/benefit of having an SDK installed on my computer?
    If at any point you would like to start developing applications, this is your starting point. In addition to Eclipse, which I'll discuss later, the Android SDK provides you with the "framworks" of Android 1.6, 2.1, 2.2, 2.3, and so on as they're released.

    What is the "framework"?
    The framework is the construction of android. Think about a build, if you were to strip away all the windows and lighting and all that stuff, you'd have the infrastructure, all the frames... essentially the "framework". It's the same with Android. In the world of the developers, this is what they see and work with.

    Why is the SDK/ADK important to me if I want to learn about the ADB?
    The reason the SDK is important to you as a typical user is because in order to access your ADB, you'll need to download, install, and open your SDK.

    What does ADB stand for?
    Android Debug Bridge. I will explain the ADB in more detail later in the second post.

    What is Eclipse
    Eclipse is the Virtual (Development) Envrionment where applications are actually built. This is where their framework is constructed and then you, as a developer, can begin to add on and build up the framework. Eclipse uses the ADK/SDK to keep current with ALL of the current Android OS's. So in Eclipse, you'll now find the Gingerbread setup and you can now start developing apps for gingerbread. This is all it is. If you know Java code, then you already know about Eclipse. The Eclipse environment also offers a nice feature known as the AVD Manager.

    What is the AVD Manager?
    The AVD is the Android Virtual Device. This is an emulator. You can simulate your apps on a basic android platform. The AVD will run in Eclipse and allow you to test your app.

    Can I actually interact with the SDK and ADB?
    You can interact with the SDK. I encourage you to download and explore the SDK. Don't be afraid to look in files and see where everything is. You can preview things in most OS's like MAC and Windows. I'll encourage you to look yourself, but if you do explore it on your own, look for the folder that includes the images on your phone. The images I'm talking about are things like the notification bar, the unlock screen button, and things like that. This is where you can theme your phone. You have to be careful what you do though. You can't just go editing images, renaming them, and do as you please. Do research first.
    Last edited by truslide; 12-14-2010 at 07:48 PM.
    Thanked by 26:
    + Show/Hide list of the thanked
    JkdJedi, adgume, damon011 and 1 others like this.
  2. Thread Author  Thread Author    #2  
    truslide's Avatar

    Posts
    562 Posts
    ROM
    Stock

    Default

    I'm ready to interact with the ADB. What do I need to know?
    The Android Debug Bridge is very similar to your command prompt (DOS prompt) or your terminal in mac. When you're in the ADB, you're accessing the phone itself as long as your phone is connected. Your phone does not need to be connected as a disk drive, but your phone does need to have "Debugging Mode" enabled. The way you interact with the ADB is by navigating through the files on your computer or phone and issuing commands.

    What do you mean by "navigating through the phone"?
    If you locate an executable in the SDK titled "adb", usually located in the "tools or platform-tools folder, and you double click it, you'll see your terminal or command prompt open and execute a whole list of commands. Don't worry, these are just basic commands you can issue in the ADB. Go ahead and read some of the lines, it's actual information you should know. An example of navigating through the phone would be as follows.

    Let's say you want to find a picture on your computer in the ADB. If you double clicked on that adb executable, you'll need to open another window with a prompt ready to receive commands, you'll have to do this with terminal. Usually you'll start out at your default or home folder. For me on my MAC, i'll get the prompt -

    new-host:~ TruSlide$

    Here i'll be able to enter commands. To make things simple, lets say that picture is on your desktop. If you simple type ls (Lower case L and S), you'll receive a list of where you can navigate to. ls is the list command. Try it out. Now you can navigate to your desktop once you see it listed.

    I typed desktop and it rejected my command and didn't navigate there. What happened>
    Don't worry, the next thing you need to know is the "cd" command. cd stands for change directory. This tells the terminal to change the directory to ~. Try it out, type cd location. (Location is the name of your desktop or whatever folder you see when you type ls.)

    [color="red"]The cd command is very important because in order to perform many of these functions, you're going to need to navigate to the folder that adb executable we talked about earlier is located. Mine is on my desktop, in my SDK folder, in my tools folder. So to give you an idea of how I would navigate there, I would type

    cd desktop/SDK/tools

    Now i'll be in the tools folder and I can start issuing some of the below commands.

    Ok cool, tell me about some more commands and the ADB.
    pwd - will show you your current location on your computer
    cd .. - this will take you back a folder, kind of like backing up or moving back
    adb shell - this will access a shell within the phone and let you enter commands directly
    adb shell reboot recovery - this will do what it says. It commands the phone to reboot into recovery
    adb remount rw - mounts for read/write (r.w.)
    adb remount ro - mounts for read only (r.o.)
    adb push <localfile> <location> - will push a file from localfile(on computer) to location
    adb pull <location> <localfile>- will copy a file from location(on your phone) to localfile
    adb root - restarts the adbd daemon with root permissions (doing this wont give you ROOT) nice try
    adb usb - restarts the adbd daemon listening on USB
    adb devices - will list your device information
    adb start-server - starts the connection to the phone
    adb kill-server - kills the connection to the phone
    su - SuperUser. typing this may prompt a password. Then you'll see s-h3.2$ or #. $means no root, # means root.
    exit - leaves the su
    logout - logs out of the server
    adb logcat - will start logging EVERY event that occurs on your phone. Try it, then wake you phone up, open an app, and watch the adb. To exit you'll need to do ctrl+c. or you'll need to close the window.
    adb shell cat /proc/meminfo - will display how much RAM is on your device. Useful for debugging or verifying your phone info

    Here's an example of working in the adb

    Lets say you have the exploit rageagainstthecage-arm5.bin and it is on your sdcard. The location is /sdcard/exploit/rageagainstthecage-arm5.bin, now you want to work with this file. Here is your interactive example...

    adb shell cat /sdcard/exploit/rageagainstthecage-arm5.bin > /data/local/tmp/rageagainstthecage-arm5.bin (This line means that you are moving the rage exploit from the /sdcard/exploit/ to /data/local/tmp)
    Once this is done, you'll now have rage in /data/local/tmp

    Next you would type : adb shell chmod 0755 /data/local/tmp/rage... (this tells the device that youre going to make a change)
    chmod is change mode

    adb shell ./data/local/tmp/rage.... (This runs the rage exploit)

    So what you can take away with this information is inside an ADB SHELL, you are issuing a command WITHIN the device.

    I want to root my phone How do I do it in the ADB.
    You'll have to understand the root process first and foremost. The most recent, easy, Root process works be running an exploit on your phone followed by a downgrade to an easier version of android that can be rooted when you run a program like unrevoked or simple root. I don't know how they write their exploits so I cant tell you about that information. What I can tell you is that the step by step process is very specific. Please refer to the link below about "Common misconceptions" to learn more about root. The main thing you'll be running is a .bin file. This is the exploit. What you'll end up doing is either MOVING or PUSHING this to another part of your SD card. I'm not speaking for ALL root methods, just in this instance. Then you will identify that file as executable by typing chmod - which is Change Mode. Finally, you'll execute the change.

    Remember take note of the Spaces between words and upper and lower casing. Everything must be exact when doing this.

    Lets talk about BASH. You'll see it, so I'll explain it
    Bash is an environment that can store larger amounts of data unlike DOS. Without overwhelming the reader, see the link below about the BASH information. This is just a brief explanation of BASH.
    Last edited by truslide; 12-14-2010 at 08:27 PM.
  3. Thread Author  Thread Author    #3  
    truslide's Avatar

    Posts
    562 Posts
    ROM
    Stock

    Default

    The Last thing i'm going to include in this thread are some important, very VERY useful and IMPORTANT links. Did I mention that these are VERY useful links? These links are easy reads and I learned off them and have used them as resources. I have them bookmarked. I suggest you bookmark the ones you like.

    Terminology READ THIS ONE FIRST- A Dummies Guide To Android Terminoligy & Lingo - Droid Forum - Verizon Droid & the Motorola Droid Forum

    Everything OFFICIALLY Android - Android SDK | Android Developers

    Simpleroot - Simpleroot provided by JerzyIroc

    Everything about the BASH you need to know - An introduction to the Bash Shell

    Useful info for people thinking of Rooting - Common misconceptions and other useful information (Updated 10/12/2010) - xda-developers

    MAC USERS!!!!!! An alternative to struggling with MAC ROOT - Running Windows on Your Mac With VirtualBox | Mac.AppStorm

    I will be adding to this and updating this with more detailed information and more explanations as they are either requested, needed, or discovered. Remember, we are ALL learning, continuously.
    Last edited by truslide; 12-14-2010 at 08:30 PM.
    Thanked by 16:
    + Show/Hide list of the thanked
    yehbaby likes this.
  4. #4  
    Pre-dawn raid's Avatar

    Posts
    327 Posts
    Global Posts
    320 Global Posts
    ROM
    stock 4.2.1; CM7.2(nook)

    Default

    Awesome! I haven't had time to read it yet but thanks for putting all this info in one place. Great resource for Android Noobs like me.
  5. #5  
    SmokeCrawler's Avatar

    Posts
    1,290 Posts
    ROM
    Stock for now

    Default

    Nice!
  6. #6  
    igotsanevo4g's Avatar
    Retired Moderator

    Posts
    3,558 Posts
    Global Posts
    3,549 Global Posts
    ROM
    Ice Cream Sandwich

    Default

    Good write up man! This is sure to help alot of folks.
    Some say the glass is half empty. Some say its half full. I say, "Are you going to drink that?"
  7. Thread Author  Thread Author    #7  
    truslide's Avatar

    Posts
    562 Posts
    ROM
    Stock

    Default

    ^Thanks man, hopefully it will mitigate a lot of the questions we get, or questions people are afraid to ask. It's still a lot, but at least I've compiled it, it's a work in progress too.
  8. #8  
    2CupsWithString's Avatar
    passionately curious

    Posts
    2,809 Posts
    Global Posts
    2,825 Global Posts

    Default

    You know what's funny is I D/L'd the SDK today after the update and adb isn't in tools anymore!
  9. Thread Author  Thread Author    #9  
    truslide's Avatar

    Posts
    562 Posts
    ROM
    Stock

    Default

    yea i know a few people who said that. check the platform-tools folder? it's in there somewhere... lol
  10. #10  
    Dave Blake's Avatar

    Posts
    1,393 Posts
    Global Posts
    7,164 Global Posts
    ROM
    cyanogen_speedy-toastcfh

    Default

    Thanks for the hard fork truslide this will come in handy when trying to answer questions in the forums not to mention it helping me learn.

    Thanks,
    Dave
  11. #11  

    Default

    hey! here's that sticky... nice job, man! and thanks.
  12. Thread Author  Thread Author    #12  
    truslide's Avatar

    Posts
    562 Posts
    ROM
    Stock

    Default

    ^did you get root?
  13. #13  

    Default

    Nope. I ended up spending most of my day trying to finish a book a friend lent me before he moves out of country. But when I do, you can do another write up for stubborn people who insist on doing it the hard way on their Mac.

    Sent from my PC36100 using Tapatalk
  14. #14  
    2CupsWithString's Avatar
    passionately curious

    Posts
    2,809 Posts
    Global Posts
    2,825 Global Posts

    Default

    Quote Originally Posted by truslide View Post
    yea i know a few people who said that. check the platform-tools folder? it's in there somewhere... lol
    It's in platform tools only after you run the exe and start downloading software versions.

    I wonder if there were adb changes in gingerbread or why they re-did this.
  15. #15  
    Kevin O'Quinn's Avatar
    AC Team Emeritus

    Posts
    8,899 Posts
    Global Posts
    9,102 Global Posts
    ROM
    Stock

    Default

    This is a great write-up. I think it goes beyond beginner level, now, though.
    Kevin F.I.M.T.K. O'Quinn Esq.
  16. Thread Author  Thread Author    #16  
    truslide's Avatar

    Posts
    562 Posts
    ROM
    Stock

    Default

    I tried to keep it simple in the first post... Then go a bit more knowledged. I'll review it again and make it easier to read and a bit more simple. That's the start, I have to get in the SDK and mess around some more to explain some more things.
  17. #17  

    Default

    Wow nice write up. Thanks.
  18. #18  

    Default

    I was playing around with the sdk and adb.

    every time I used cmd 'adb devices' it comes out a empty space.
    if I used adb shell, it returns with 'error: device not found'

    I not shore what I did wrong, should I reinstall the sdk again?

    thanks
    Last edited by Calma10; 12-19-2010 at 12:34 AM.
  19. Thread Author  Thread Author    #19  
    truslide's Avatar

    Posts
    562 Posts
    ROM
    Stock

    Default

    Quote Originally Posted by Calma10 View Post
    I was playing around with the sdk and adb.

    every time I used cmd 'adb devices' it comes out a empty space.
    if I used adb shell, it returns with 'error: device not found'

    I not shore what I did wrong, should I reinstall the sdk again?

    thanks
    no it's the command you're entering. try

    ./adb devices

    and make sure you're in your tools folder so there is a connection to the phone. you could also try adb start-server or ./adb start-server

    if that doesn't work try

    adb root, once the daemon is started you should be good to go working within a shell
  20. #20  
    enzofall's Avatar

    Posts
    521 Posts
    Global Posts
    522 Global Posts
    ROM
    Cyanogenmod 7

    Default

    Wow this is a very helpful and extensive guide. I haven't been able to dive into all of it yet but i can already tell this is going to help me tons. Thanks everyone for the good work.
    I tweet too - @enzofall
  21. #21  
    d3xn2o's Avatar

    Posts
    2,252 Posts
    ROM
    4.1.1

    Default

    Good job bro...
    Arrogant Linux Elitist
  22. #22  

    Default

    Hi, I was able to installed the sdk on ubuntu, but I'm not sure how to used adb. could anyone recommend goods instructions on adb using ubuntu? Thanks
  23. #23  

    Default

    Thanks from a newb to the Android experiance
  24. #24  

    Default

    Great read TruSlide. It's a lot of info a newb like myself needs
  25. #25  

    Default

    Nice.

    I might of missed it, but I did not see anything about case sensitivity. Filenames and such are case sensitive and so are some commands in some environments. So it is best to enter commands exactly as written.
Page 1 of 2 12 LastLast

Posting Permissions