Looking for the source - Android Software/Hacking General [Developers Only]

A couple of weeks ago I bought myself my first android device (a cheap LG GT540), and since then I've been playing a lot with it.
Noticed that android hackers community is quite big and there are lots of tools which can do kind of anything, but sadly I'm kind of disappointed because I'm having some issues in understanding HOW things work: in order to root my device, install custom ROMs, resize partitions and so on, I had to use a few tools that I have no idea of what they're doing.
To me it looks like that in this forums it's much easier to find a GUI that does everything you need, rather than understanding what needs to be done and how to do it. IMHO this is bad for a community of hackers.
In particular I'd like to understand how the following tools work (both for personal knowledge, and because some of these only work on windows, and I'd like to port it on Linux), and if available, I'd love to put my hands on their source code:
SwiftBootloaderBuilder: it's a tool used to resize flash partitions. I'm prone to think that it might just be a frontend for fastboot, but hum, the fastboot binary I own seems to be missing the capability of handling partitions...
KDZ: it's a tool to upgrade the firmware which I had to use in order to install on my device a custom ROM with fastboot enabled. How the heck does it work? This tool forced me to find and use a windows system to hack my GT540...

Android Developers is a great place to get started understanding how Android works. There you will find much of what you need to know to get a BASIC understanding of Android. If you follow the guides and advice you can create a basic apk that does little except teach you. CyanogenMod wiki is also a great place to learn. One thing about Android is that is is very much like Linux built for specific hardware. Many, and I do mean many, of the same principles apply to both systems. Digital signatures, ownership privileges, file permissions, compiling from source, git, gerrit, google code etc, are all things that a developer runs into everyday working with open source software of any kind. Go to every place I mentioned, sign up, and start asking more questions. Learn C++ and JAVA. Join freenode irc and find some friends who will answer questions while you learn. XDA is the least resource for the development community. XDA is the expression of ALL the other resources. I am new to this also, and have done what I suggest, except the programming languages, which I am working on. Use root explorer to look at your device file system. Ask the developers of the tools you mentioned to help you understand them. A LOT goes on behind the scenes, but it takes a little direction and determination. Cheers!

Related

The Path to Developer

Dumbest question yet:
I have no coding or developement background, but have recently become fascinated by the android os and what you, the developers, are able to do with it. I am toying with the idea of obtaining root and running jf's mod, but feel as if I am disrepecting all of the work that all have contributed by simply following a list of instructions, and not truly understanding what each step and its outcome means.
What steps can I take to fully understand your (the community) work and to someday contribute something of my own.
Classes, recomended reading, recomended os to switch to (currently mac 10.4), coding languages in what order?
Please help turn an advanced casual user into a baby, even fetus, even embryo, of a developer.
there's an android 'boot camp' in Georgia next month if you have 3500 to throw down. i too have jumped on the wannabeadeveloper wagon. i'm sure there will be books coming out in the near future on beginning android development. i kind of just jumped right into it all, downloaded the sdk, got root, and tried to become more familiar on how it works. get the engineers bootloader if you are going to be working on your phone. and I dont know if its the best os to switch to but i just killed xp and installed ubuntu 8.10 on my comp so i can become more familiar with codes and commands. i'm sure real devs could probably help you out more, but check out some guides, read some tutorials.
fattywarbucks said:
but feel as if I am disrepecting all of the work that all have contributed by simply following a list of instructions, and not truly understanding what each step and its outcome means.
Click to expand...
Click to collapse
Just having read the directions is probably respect enough. If you want to actually understand the computer science behind the hacks, you should check out some books on Linux fundamentals and shell scripting from your local library.
If you want to develop applications for Android, then you could either get some books on teaching yourself Java or sign up for an Intro to Java course at your local community college.
p.s.: it was a very good question and not at all dumb.

i want to become an ANDROID DEV!! help me please

hello everyone. my goal is to become an android rom/ app developer. right now im currently attending college for my bachelors in Computer Science. right now im still working on my AA so its going to be a while before i even get into the field. ive researched online about linux and learned the basic codes in terminal to move files, delete them etc. but of course i dont think these codes apply to android.
im not trying to learn all this by myself but i atleast want a basic idea of the type of things im going to be learning.
so far ive downloaded android sdk and eclipse on my ubuntu linux netbook.
do you guys know of any websites that can help me get started or at least point me in the right direction in getting started on my first android rom or app.
thanks
Start with building your first hello in eclipse.
The best place to start is right on the Android site. Watch all the videos and get ready to read lots.
They have tutorials and step by step instructions for your first hello app.
BTW they tell you to break it so you have to fix it.
My biggest obstacle is just doing it.
http://android.voxisland.com has a good set of down and dirty introduction videos to app development for Android. Also, developer.android.com. A lot of that knowledge is pretty essential when doing any other kind of Android devving.
pick up some basic java and you'll have a nice head start.
If your looking for examples you can find them here
[can't post links]
developer.android.com/guide/samples/index.html
I wouldn't pay for videos from some jackasses website - plenty of free java tutorials out there to get you started.
www.anddev.org is a good site
You will need to learn the basic codes in terminal to move files, delete them, etc.
These codes apply to Android.
thanks guys for the replys. im going to start looking for tutorials for java using eclipse.
the android.dev.com pages and anddev.org show me how to make apk files. what im trying to find out is how to make roms and mess with kernels and such. how would the java and apk's tie into that?
I've got the same doubt as ripmeck. I didn't know where to ask for help, so I came here.
And I looked into all the replies, thanks for the help guys.
Unlike ripmeck, its already been two years since I've finished my bachelors.
I'm pretty okay with C programming that includes pointers, structures, etc., (but only the basics of all concepts, cause i know how deep and confusing the root goes).
And I'm slightly familiar with Eclipse, as I have done simple (very simple) java programs in it. Programs that makes use of exception handlers, multithreading etc.,
But I'm not so strong in Java (cause it has got lot more features than C and I couldn't remember it all and make use of it, I've got used to the linear style of coding without making use of any classes ).
My question is:
Should I have to get myself very strong in java before started coding for android app or can I eventually learn the java language in parallel with android development?
There was a thread posted by Cyanogen on XDA called 'some advice' with lots of good info on what you need to get started. Sorry I don't have a link since I'm mobile right now. My suggestion is to find that thread and start there.
Here are some steps vaguely describing what you need. Each is a never ending process.
1. Understand Linux/Unix
2. Understand Android
3. Make something.
My advice is to learn everything you can. Read around XDA and tackle learning each bit individually.
Learn ADB, make some themes or mods using metamorph, learn how to sign files and build update.zip files. Most importantly, have fun.
-------------------------------------
Sent via the XDA Tapatalk App

How should I start? Android dev.

First, I know there are some other topics out there asking the same exact thing, but I think my situation is kinda different.
So, want to learn how to develop for Android. Building custom ROMs, Android apps, tweaks, etc. But my actual knowledge is only user lever. I only know what a android user should know (flash ROMs, root, etc). Zero dev knowledge. Nothing.
I want to know with what should I start to learn to do Android dev. Nothing like: 1 hour and you're the best dev out there. I know it takes time. But I want to focus on Android.
So, what do you have to say?
In very general terms it would be to pick one of your favorite roms for your phone, pull it apart and then put it back together until you understand what is going on.
In more "specific" (though this is frankly scratching the surface) terms, you would first spend hours finding out how to back up your phone including the AAA key, the meid and so forth as well as other software compatible with your phone to restore it. As frankly since you're likely using your phone to test, you'll have more than one occasion it will be soft bricked.
Thereafter you would learn more in regards to development tools, in specific over at developer.android.com. Read the dev guide and so on.
Third, decide how you want to implement a unix/linux test environment, unless you're already on linux.
And forth you'd look at your favorite rom developer's build from their development site (the name of the domain escapes me) pull it apart and try to analyze the details.
Last but not least you'd FOLLOW new developments with android and the phone as well as learn to adjust to any new firmware that comes out from the manufacturer.
I'm in the process of learning how to develop myself but I've already discovered a lot more with the phone's underlying structure. That said, a lot of the answers are found in bits and pieces on this forum. But when you start to learn and ask specific questions like "what partition is the system mounted on for a Samsung Galaxy Ace" you'll begin to understand the file structure and then underlying software involved.
This was very helpful. I'm glad to see there are helpful people here that aren't going to talk down to a "new user" and I was also wondering how I could view files on windows 7. For example the structure of apk files or any of the others that say no program found to open this file
For example I want to begin by changing the boot screen from the solar flare looking Android boot screen to scrolling tiles or something of the sort then back can some explain that and I'm sure I can gain quite an understanding on the process that way
Sent from my SGH-I777 using xda premium
If you want to do programming you should start with the Android SDK: http://developer.android.com/sdk/index.html
An apk file is actually a zip file.
If you want to get an idea of all the stuff that is in there, just rename it to .zip and open with your favorite utility.
The contents of this archive file are also in binary form and compressed.
To get down to the lowest level you need to use something like apktool: http://code.google.com/p/android-apktool/
Much obliged I'll do that. Any Intel on boot.img
Sent from my SGH-I777 using xda premium

[Q] Noob trying to become a dev.

This thread may be pointless but I don't care. I can't find a straight general answer.
I am kind of new to Android modding but have ok skills with coding and decent skills with Linux (I know how to survive in a shell).
What are good code examples or what are the best methods(exploits) used to privilege escalate a shell?
Do I need to find a hole in the Linux kernel or try to hijack an active process running as root?
What is needed to crack the bootloader? I know I'm asking a lot and most of my terms used may be wrong but I find it hard to take that next step. Would I find answers by reading an Android developers book?
Please, where do I start???
There are many options in the development criteria, the two main consist of OS Development (Roms) and Application Development.
Judging by what you're stating, I think you're trying to work towards OS Development? Correct me if I'm wrong.
I know I'm being a bit cheap by not typing out everything needed, as I will have to put some time into that... But the official CyanogenMod wiki shows you how to set up a building environment on Mac, Windows and Linux.
From there they explain in detail on what shell commands you must use to run exploits and such. They also explain what specific components and files do and how you can modify and update them from what I have previously seen. The site also shows you how to build a ROM for your device itself, using the CyanogenMod source of course, the method applies to all source to be honest.
Here's a link to the website - http://wiki.cyanogenmod.org/w/Main_Page
If this wasn't what you were asking for let me know so I can explain furthermore.
Krish.
Sent from my Nexus 5 using Tapatalk

Android Development Direction

Hey, I'm beginning to (or, planning to) get started with Android Development (Not really Android App Dev, but Android itself. Things like, porting to devices, modifying and customising ROM's.), and I need some direction. I'll present what my skills are or, what I already know, and what I think I'll need to do to get started.
When it comes to code, my main expertise resides in web-development. HTML/CSS/Javascript/jQuery/PHP/MySQL/etc however, I've gotten pretty comfortable with Python and using that for computer programming, and a few years ago, I picked up C++ for a short while and learned some basic stuff there.
I am able to read code.. As in, if someone presents to me a problem with a snippet of code they have, I can read, understand, and usually provide a solution to their problem. However, I have noticed when looking through GitHub projects, I don't have a great time understanding the file structure or, where to start. Web programming usually starts with an index.html/php/etc or even C/C++ start with a main.c/main.cpp. Without documentation, which is usually not provided, I find it incredibly difficult to read through, understand, and thus, I can't really fork it.
I've also done some networking in Linux, modifying routing tables and iptables too.
My planning for getting started with Android Development is as follows:
Learn Java to a comfortable level,
Learn how Google's Repo/Gerrit tool(s) work,
(For porting) Find documentation on a device's components, learn how drivers are coded, and documentation on Android's layout/structure, figuring out how to modify it to work for a specific device,
(For modifying) Should be easy once I understand how the structure of Android's source works.
Other than the learning Java part, I need a lot of direction here. What have I left out, where are the best places for me to find things I need, etc.
If anyone can help me out here, I'll be in your debt. Thank you!

Categories

Resources