About AOSP Downloading & Building Few Queries - android

I have Lubuntu 12.10 on my machine. All necessary software's are installed for compiling AOSP.
I have android mobile with ver. 2.3 I did not found any ROM ver. 4.0 for it so decided to compile it my self. I am following this guide.
The last commands i ran are:
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.4_r2.1
$ repo sync
Now's it's more than 1 day still it's only synchronizing. Download speed is around 50 kbps.
So my Question No.1 :is for compiling to AOSP android-4.0.4_r2.1 is there any other's way that i can skip unnecessary files and download only 4.0 necessary files?
Question No.2 : I found one more link that is for only building kernels here. So if i follow this guide will it be same as repo sync that i ran cause i have specified -b android-4.0.4_r2.1
What will be faster way to download only for AOSP 4.0 and any specific guide to build it?

You should have read the warning on AOSP download page, if your download speed is about 50kb/s, it might take a very long time (~ a few days?) to download about 10GB of different files required to build AOSP.
Also, if you don't have a Google Nexus device, most probably the image you build won't work with your device. It takes a lot of tinkering to add the support for the very specific hardware you have in your phone.
Of course, nobody can forbid you downloading sources and building the image, but I would strongly advise against it, because in your case basically it's pointless waste of time.

Finally found ICS for Karbonn A7. This guy made a tutorial for it. This is update 2.
Tutorial Here.

Related

Building cyanogenmod for grouper does not create the CM-*.zip

I followed the instructions in the cyanogenmod wiki page to build a custom ROM for grouper (Nexus 7 wifi only model). However, the CM-DATE-UNOFFICIAL.zip file is not created. I get this error message --
No private recovery resources for TARGET_DEVICE grouper.
I followed the answer in this link to add below line
TARGET_KERNEL_CONFIG := cyanogenmod_grouper_defconfig
to ~/android/system/device/asus/grouper/BoardConfig.mk and did "make modules" and "make grouper_defconfig", "make grouper" to no avail.
From further research, I found that I might be missing the kernel. I followed the android documentation on building the kernel. However, this also did not solve the issue (I might have not placed the kernel at the right location). Can someone tell me what I am missing?
I was able to generate the zip file. The main issue was that Ubuntu by default uses OpenJDK while Cyanogenmod needs Oracle JDK. Downloading and using Oracle JDK and following rest of the steps mention in this xda-developers forum thread generated the zip file. Also make sure that you have plenty of swap space (atleast as much as your ram or twice of that if possible)
Another thing that is not mentioned in the wiki for building Cyanogenmod is that the kernel has to be built first. I followed this link to build the Android kernel.

Use of CTS in android source code

I have run android CTS test case for ics on custom board. AOSP had their own cts/ folder under android/ folder. I'm having two questions.
What is the use/role of cts/ in building and flashing android on board?
Why we download CTS from site to run cts test cases, instead of using source code's cts?
For your first question, CTS doesn't play any big roles in flashing android onto a device. It gets included with the build when you repo sync so it stays synced with your version of android.
As for why you download it off the site, there's 2 good reasons. One, most people who run or execute CTS are not interested in downloading, and building, an extremely large project just to make sure their device is compliant with that version of the android sdk.
Two, the CTS package you get off the site is what is going to be run by everyone, and not the CTS that gets built from your machine. If you create an AOSP fork, the the person who uses your ROM will still want to make sure that it is CTS compliant. They need to use the package from the site because they need to know it hasn't been tampered with. You could easily change CTS so your device passes your version of CTS, but that doesn't help anyone else.

Android Source download

Hey guys I am new to porting android os. I am trying to download android source and wanted to know which git repository should I download for kitkat. And alos I want to download the source in GIT windows as I do not want to use linux terminal and repo for downloading the source.
Also, will downnloading https://android.googlesource.com/kernel/msm/+/android-msm-hammerhead-3.4-kk-r1 give me the source or will https://android.googlesource.com/platform/build/+/master give me the source?
Note: I have a very limited download limit at high speeds so I only want to download the relevant source files. No prebuilt Images or and device Images. I just want to download the source for stock kitkat android and use it in ubuntu for further building.
I think that you don't understand the organization of the Android source. It is a forest of git repositories, maintained, as CommonsWare says, with a tool called "repo". Theoretically, you could clone each of the, approximately, 450 git repos, separately. I suspect it would be pretty hard to do.
When you download the source, you will get all of the versions, tagged appropriately. You need only checkout at the right tag.
You could try github, to download zip files of the branch you require. It also seems to have android kernel files, but you need to search for what you need.
The android kernel msm (for qualcomm) source code
https://github.com/android/kernel_msm
The android source code
https://github.com/android/platform_frameworks_base
The website says it is a mirror of the google server. Which means it should work.

Android on Desktop tutorials/resources

I'm aware of the android-x86 project and as far as the end result (bootable live/install iso), I am looking to do the same thing. The difference is, I'm looking to do this with the ice cream sandwich branch from android master repo. Ice cream sandwich adds full support for x86 hardware and even sports a build target specifically for running the OS in virtualbox. So my question is, is anyone aware of any documentation for building and deploying to that target?
Just in case it's not clear, I'm not just using the android-x86 project because they haven't yet put up a build for anything later than android 3.
Okay so I was going to just delete my question because a few minutes after posting it, I found a tutorial! So, I figured I'd share this info here rather than just deleting, since that's a bit of a waste. Here is a link, plus an excerpt from the tutorial in case the link is ever lost:
http://ricston.com/blog/?p=1705
The second approach gives you direct access to the latest Android
code. However, it’s barely documented due to the fact that previously
you couldn’t build ‘out of the box’ an Android VDI (Virtual Disk
Image) with the AOSP. To build the Android VDI and install it in your
VM, follow these steps:
Get the Android source code from the AOSP site and follow the online
instructions to setup the environment.
When you are ready to build the project, execute the following command to set the environment variables for Make: “lunch vbox_x86-eng”.
Run “make installer_vdi” to
build the project. Make will build the project and produce a VDI named
“installer.vdi” located in “out/target/product/vbox_x86″. This VDI
contains Android plus its installer.
Create a Linux VM and add the
“installer.vdi” as an extra HD to the VM.
Start the VM and press “F12”
during bootup.
Select the HD which represents the “installer.vdi”.
Choose the first option, that is, “Android Install to /dev/sda from
/dev/sdb”.
When installation is complete, enter the command “reboot”.
After that, you should be able to launch Android from your VM.
I want to expand on this approach and end up producing a live CD rather than a VDI so I'm going to post this answer as a community wiki so it can be expanded by myself and others in the future.
Edit Nov 26/11
The above method of building right from the source alone is lacking features like proper keyboard and mouse support. Here is a link to an article (in Japanese but you can use google translate) of an individual who has compile the ICS sources with added in keyboard, mouse and network support. http://d.hatena.ne.jp/td2sk/20111125/1322192772
The precompiled VDI disk can be downloaded from here:
http://kie.nu/26G

How can I compile Dalvik to run it locally on Linux?

What are the minimal steps necessary (including retrieving the source code) to compile and run just the Dalvik virtual machine on Linux?
Actually , I got Dalvik working on my elementary OS installation.
First download the Android AOSP source tree using https://source.android.com/source/downloading.html. Wait for it to download (2 hours for me cloning only the current commits and Marshmallow branch)
After running build/envsetup.sh while in the source tree run lunch full_x86-eng. Then type make -jN (replace N with number of cores).
WAIT. This took me about 1 hour on an AMD-4500M laptop. Newer ccomputers may be as low as half and hour and older ones might take half a day.
Change directory to !!AOSP-PATH!!/out/host/linux-x86/bin/ and run export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:!!AOSP-PATH!!/out/host/linux-x86/obj/lib/ or
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:!!AOSP-PATH!!/out/host/linux-x86/lib
or export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:!!AOSP-PATH!!/out/host/linux-x86/lib64
TRY ALL OF THESE
and then
./dalvikvm --32. If you try to run without the --32 option it will crash (don't know why)
Working Marshmallow Dalvik. To get the GUI apps working you will need to do some more porting and coding which is another project which I am working on.
Took me half a day to figure this out.
References
http://milk.com/kodebase/dalvik-docs-mirror/docs/hello-world.html
Use sabayon Linux. This is a distro that can natively run Android programs and all Linux ones too.
Actually, that's rather android running on Dalvik and the underlying system is already linux.
I guess running a bare Dalvik VM on a desktop linux box is just a matter of getting the sources and compile it.
The GUI stuff is something else.
You are not the only one with this idea, and that is great in internet society terms.
This is probably what you are looking for: http://www.android-x86.org/.
Those guys ported android over to x86.
It still works as an OS, so I'm not sure if you can run Linux and Android(Linux) together without using VirtualBox.
Dalvik runs on Android. The authors of Dalvik are only worrying about it running on Android, as far as we are aware.
Various groups have indicated they are working on getting Dalvik outside of Android. You are probably best off finding and talking to them.
In other words, there are no official instructions of the type you seek.
Sorry!
Getting apps designed for Android to run on Linux is going to be tricky. However, it is possible to run a Dalvik VM on Linux. In fact, this GitHub project has a pre-compiled binary of Dalvik VM for Linux, ready to use! Check the associated blog post for information about how the binary was compiled and how to use it.
Learn to program Java \ C \ C++ and other frameworks
Modify the Android source (I think app_process or something) so it shows a windows on the Linux desktop (learn X11 / Wayland APIs)
Below is a simpile base for you to start with
www.android-x86.org/getsourcecode
Getting Android-x86 source code
First, follow this page to configure your build environment. Then
mkdir android-x86
cd android-x86
repo init -u git.android-x86.org/manifest -b $branch
repo sync
Where $branch is any branch name described in the previous section. This will point the projects created or modified by android-x86 to our git server. All the other projects still point to AOSP.
We also have a git mirror server on SourceForge.net. To use it, you only need to change the repo init command to
repo init -u git.code.sf.net/p/android-x86/manifest -b $branch

Categories

Resources