[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
(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.Thanked by 28:
+ Show/Hide list of the thanked
adgume, AndroidvsOS, Dave Blake, Big_Mike76, clash#AC, d3xn2o, Dieter Bohn, djintroymi, doowkram, eKeith, eldub1, igobytony, igotsanevo4g, ImperialDoor, jean15paul, Jerzyiroc, jinxltd, JkdJedi, jtowndawg, LifesGoodPhoenix, enzofall, lu_zoe, melt2sk8, aaron8765, Pre-dawn raid, tropper, winclose89, yellowsun
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 -
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
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.
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.
- 12-14-2010, 12:12 PM #4
- 12-14-2010, 01:33 PM #5
- 12-14-2010, 05:02 PM #6
- 12-14-2010, 07:49 PM #8
- 12-14-2010, 08:38 PM #10
- 12-14-2010, 09:07 PM #11
- 12-14-2010, 09:39 PM #13
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
- 12-14-2010, 09:39 PM #14
- 12-14-2010, 11:33 PM #15
- 12-18-2010, 08:19 PM #17
- 12-19-2010, 12:29 AM #18
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
- 12-20-2010, 09:24 PM #20
- 12-21-2010, 07:19 AM #21
- 01-21-2011, 12:37 AM #22
- 02-05-2011, 10:15 AM #23
- 02-05-2011, 10:36 AM #24
- 02-11-2011, 01:24 PM #25