I have been following the Threads since I got my G1 for about 3 weeks now. Two days after receiving it I got the OTA update from T-Mobile before I knew it I was on RC30. After DREAMIMG.nbh and very careful reading I was able to downgrade to RC29, Root - Telnetd, and install RC30 Mod JFv1.2 then JFv1.3. Finally I installed Bootloader and got the skateboarding androids.
After a couple days of reading, I took the plunge. Let me be the first to say that as a Windows XP user, alot of this information is very confusing as I am used to a Dos type system, and all of these commands made it seem a bit more confusing than it really is.
Now that I have root and bootloader I would like to start to change the boot screen and try my hand at some Linux based stuff?
Being that I use Windows XP, it is my understanding that I can run Linux using Slax? I am very computer literate, but haven't tried my hand at programming since the days of Dos and Paschal. Are their any online tutorials that somone would recommend as a starter or is the Android Software so different that it may be better to start from scratch?
Willing to learn any pointers would be appreciated.
I may be misunderstanding you but if your looking to make any modifications to the operating system itself (which is definitely needed), I would suggest having a look at the Android source code at http://android.git.kernel.org. The back-end of the platform (kernel, etc) is all written in C. The userland stuff is written in Google's implementation of Java called Dalvik. Now that you have the dev bootloader, all you really have to do is clone the official android repository, make your changes, build and flash to the device using fastboot.
Thanx Datruesurfer
After all the reading it seemed alot of work was being done in Linux but I don't know anything about that so, I could be completely off base.
At your suggestion I looked at android.git.kernal and it seems they do a good job at explaining some things, but it still makes many references to Linux and Unix.
Would programming of Git be done in linux. I see that Git is gotten using .tar files which is Linux compressed files? So is it best to try to do programming using slax or ubuntu?
Also, are things like the boot screen modified using Linux based .png or can that be done in Windows?
Let me say sorry in advanced, as I am doing this for the first time, please say stop if I am being too n00bish.
Also...I noticed ....
that the commands given in the Git User's Manual look very familiar like the commands that were given while I was reverting my RC30 back to RC29 using the Pterminal/Telnet. Can this programming with Git be done off of the G1 Phone itself?
You're in over your head dude. If you haven't programmed in these object oriented based programming methods and you know nothing of linux, then recompiling the android source like the above poster suggested is too much.
I don't mean to dissapoint or negatively comment, but really save yourself the trouble.
If you really want to though, figure out the basics of C and java programming and start reading the source.
Brutal-Force said:
After all the reading it seemed alot of work was being done in Linux but I don't know anything about that so, I could be completely off base.
At your suggestion I looked at android.git.kernal and it seems they do a good job at explaining some things, but it still makes many references to Linux and Unix.
Would programming of Git be done in linux. I see that Git is gotten using .tar files which is Linux compressed files? So is it best to try to do programming using slax or ubuntu?
Also, are things like the boot screen modified using Linux based .png or can that be done in Windows?
Let me say sorry in advanced, as I am doing this for the first time, please say stop if I am being too n00bish.
Click to expand...
Click to collapse
A Few things...
1. Android and Git are two completely different products. Git is the revision control system used by Android. Whenever one of the developers at Google makes a change to the source code they will upload it to the repository. Then people can go revision by revision to see where modifications have been made and suggest their own if they wish.
2. The part where a Linux box would be handy is actually downloading all of the files in the repository and compiling your own build. As dirr said, you probably should hold off on this until you have a better understanding of the platform itself.
3 As far as the boot image goes, the bootloader will only accept files that have been formatted specifically for it. Once you have the image formatted, you can flash it in the SPL via fastboot (the screen with the skating androids) I believe this can all be done via windows now.
4. I think I better understand where your coming from as far as modification. You should look at http://code.google.com/android to learn about how to code in Dalvik, as that will help you out much more then learning C. Once you have a good understanding of that, you can try to build from source
Hope that helps...
Thanx for the advice.
After reading about the above suggestions, it does seem that to do something simple would only be simple for someone who has all the background programming information of different platforms. This is probably why most tutorials/procedures are written so vaguely here. I appreciate the input and I will hold off and just read up on things other "more experienced" people write about here. I have a basic understanding of what is happening, but the "language" is so complex. Maybe in baby steps I will learn, since it appears that on this forum "Android" is fairly new. And while I am watching what is happening here, I will get java for dummies or bone up on Dalvik and start reading and practicing. Thanx for the help guys, and thans JF, Koush and all the other senior members for the RC30 Mod. At least I have the skateboarding Androis
As an experiment I am trying to rebuild some standard android applications and replace them in system/app on the G1. I have been through all the steps to get the source code and build for the dream platform and have built the various .apk files of interest (e.g. AlarmClock.apk, Browser.apk etc)
To put the files on the device I delete the old .apk and .odex files and copy my newly built .apk file on to the device. However when I try to run the application it crashes with the following message.
The application Alarm Clock (process com.android.alarmclock) has stopped unexpectedly. Please try again.
I know that replacing the applications like this is possible, because the AutoRotating Browser build works fine when copies over in this manner.
I'm using JF1.31 (RC8)
My initial reaction was that I was not signing the applications properly but having read some posts I think the default built .apk should have the right key already in it.
Another theory I have is that perhaps the applications from the head of the source tree are not compatible with the RC8 (or RC30) Android OS releases. Can anyone tell me how to get the source tree which corresponds to this baseline, I've done some reading around but cannot figure it out. I presume I need to do a repo init -u git://android.git.kernel.org/platofrm/manifest.git -b BASELINE but I can't figure out what BASELINE should be.
Many thanks in advance for any help you can give me!!!
There are some branches in android sources:
master
cupcake
release-1.0
Apps from the first two will not run on default G1, you need to reinstall a whole system. I think by default, following google docs you'll get master. So you need to download a release-1.0 sources.
I may be wrong, but that is what I'm see from my experience.
Thanks for that, I'll get the 1.0 branch downloaded and have a go with that.
Cheers for your help!
I was also trying to recompile some of the built-in apps, specifically the browser, but I can't even get it to build. I get a bunch of import errors, stating that it can't find some of the android libraries, such as android.net.http.AndroidHttpClient, android.os.AsyncTask, etc. I've got the android.jar from the SDK in my build path, and it finds some of them, such as android.webkit.URLUtil.
Can anyone shed some light on what I need to do to get it to see the missing libraries? Thanks.
UndeadCretin said:
Thanks for that, I'll get the 1.0 branch downloaded and have a go with that.
Cheers for your help!
Click to expand...
Click to collapse
There are around a dozen build breaks in release-1.0... all of them are due to missing header #includes in various .c and .h files. So, when it doesn't work, don't give up. Fix the breaks and everything will build properly.
Are you resigning the .apk files? Cuz you have to do that for them to work correctly.
Koush said:
There are around a dozen build breaks in release-1.0... all of them are due to missing header #includes in various .c and .h files. So, when it doesn't work, don't give up. Fix the breaks and everything will build properly.
Click to expand...
Click to collapse
Yep I fixed these problems but I have now hit upon the following problem:
(unknown): error 17: Field android.hardware.SensorManager.LIGHT_NO_MOON has changed value from 0.0010f to 0.001f
******************************
You have tried to change the API from what has been previously released in
an SDK. Please fix the errors listed above.
******************************
I've been in and modified SensorManager back to 0.0010f and that let me build get further but I hit the same error again later in the build.
Given that release-1.0 should be a stable branch is it normal to get all these build issues?
Managed to fix the java issue by modifying public_api.xml. Then hit several more C++ problems which I fixed and finally I can build the lot!
Just tried building the AlarmClock application and running on the G1 and it works fine. Thanks everyone for your help!
>Managed to fix the java issue by modifying public_api.xml. Then hit several more C++ problems which I fixed and finally I can build the lot!
Can you write, what did you fix?
^ Agreed, let us know which files need modifying and what needs doing, i've been trying to get my release-1.0 build root working too!
Alternatively, UndeadCretin, could you build the firmware (release-1.0) with a modified framework-res i can send you?
Ok, I managed to compile it without any editing of xml.
Just added stdlib, string, vector headers to dozen of cpp/h.
worry said:
>Managed to fix the java issue by modifying public_api.xml. Then hit several more C++ problems which I fixed and finally I can build the lot!
Can you write, what did you fix?
Click to expand...
Click to collapse
To fix the java issue, I modified frameworks/base/core/java/android/hardware/SensorManager to change the LIGHT_NO_MOON value to 0.0010f (from 0.001f) and in out/target/common/obj/PACKAGING I modified the <field name="LIGHT_NO_MOON" to have value-"0.0010f">
After this there were several other c++ files which were missing relevant includes. I'm afraid I didn't keep a note of these so cannot provide much detail but mostly they were missing one of the following
#include "stdlib.h"
#include "string.h"
#include "stdio.h"
I think one file needed the following include
#include <string>
and there were a couple of other files that needed other includes. The best way to find these is to google for the function name that isn't building and you should be able to find the appropriate include (that's how I did it).
Hope that helps a bit!
were you able to repo sync after adding the local_manifest.xml?
ximonx said:
were you able to repo sync after adding the local_manifest.xml?
Click to expand...
Click to collapse
I did try that previously but it didn't work. I don't think the relevant files for the dream build are available in the release-1.0 branch. This wasn't a problem for me since I'm only interested in building the applications which work fine with the generic build.
I would like to do the same for the mms application. Could you give me the steps or a link how to do it? I mean do I need the whole sources from android platform to do it? How can I just compile one application?
Phlogiston said:
I would like to do the same for the mms application. Could you give me the steps or a link how to do it? I mean do I need the whole sources from android platform to do it? How can I just compile one application?
Click to expand...
Click to collapse
I downloaded the whole Android source (the release-1.0 branch) and compiled the lot. It may be possible to just build the individual application but I do not know how. It is not vital to build for the dream platform if you only care about the applications since they will work fine with the generic build.
So the basic steps to start are:
Get yourself a Linux or Mac OS platform (I use Ubuntu running in VMWare on my XP box).
Follow the instructions here: http://source.android.com/download but when you come to repo init add the flag -b release-1.0
Fix various build problems
When recompiling individual apps to replace system apps is there a way of just building a single application or does the entire thing need making?
ximonx said:
When recompiling individual apps to replace system apps is there a way of just building a single application or does the entire thing need making?
Click to expand...
Click to collapse
My experience is that you have to do the whole thing if you are building from source. There is one way I know of to get around this, which is to use baksmali and smali.
Just to be clear, making the entire thing = build from source root?
ximonx said:
Just to be clear, making the entire thing = build from source root?
Click to expand...
Click to collapse
If you are asking me--yes, that's what I mean. Make sure to build for dream-open as the target (it's generic by default).
I am very new to Android development. My need is to
1. Modify an Android service in the Android OS source code
2. Then to build the Android OS with that modification
3. Then install it on a device for example Google Nexus S
At this time I am just trying to build the Android OS as it is following the guidelines given on the page source[dot]android[dot]com[/]source[/]download[dot]html
I am using Ubuntu 64 bit and I have achieved all the rest of steps successfully but the last step that is make command is not working.
I would like to know if anyone has followed this guideline as it is and come up with success.
Otherwise I will like to know if anyone can tell me whether the instructions on this page are exclusively enough to build the Android OS source code. If yes then why I am getting errors.
Regards,
Asif
Can anyone reply to this message or even point to me where should I put this question to get any answer? Thanks.
what kind of answer are you expecting if you didn't even tell anything about the error message?
My advice: Make sure you're on Precise. Then POST THE BUILD LOG, SCREENSHOT, ERRORS, WHATEVER THE BUILD PROCESS IS TELLING YOU WHEN IT STOPS.
Otherwise, go google it and leave these good people alone.
Hello everybody,
I've just started with CyannogenMod and I still have no idea what is happening with it.
The whole story began when I was trying to port one of my scripts to my device.
With the power of buildozer, python-for-android and kivy I was able to build an apk file which runs perfectly on device...or maybe not so perfectly.
The problem was that my script requires python to be compiled with SSL support.
It turned out that the builtin python on my device does not support it.
So I decided to build my own version of CyannogenMod with this feature.
I've downloaded the source and started to read the wiki.
A lot of things are pretty well explained and are very helpful.
But I coudn't find any information about the topic that I was looking for: change default python in CyannogenMod.
Then I started browsing the source and found python in prebuilts directory.
My question now is:
How can I change, replace or configure the python interpreter, which is going to be build within Cyannogen, to support SSL.
I googled around but found nothing.
It will be very helpful if someone can refer to some more detailed article or even better - to explain in details.
Thank you in advance!
Best regards to everyone and see you around!
So I've decided to give building Android a go, considering we've recently obtained the source code for the device in question (R1 HD) and no one else has done this yet for this device. I've been following this guide, since all the other guides I've found assume there is already a GitHub repo for your device. There's literally NOTHING out there regarding this device, aside from the kernel source we've obtained in the form of a .zip archive.
I've done everything up to and including pulling the 7.0.0 r1 source with the reop sync command, and I am now stuck on the Preparing to Build section. The first thing it talks about at this point is implementing proprietary binaries into my source. I have no idea where to find proprietary binaries for my R1 HD, let alone if they even exist out there to be implemented. Literally all I have regarding this device is the kernel source in a zip file. I can't find anything else out there nor do I really know what to look for.
Can anyone tell me what to do here? I've never compiled Android or even a kernel before, and I'd really like to get something out there for this device that others can base their work off of.