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

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.

Related

How to build for Qualcom Snapdragon 800 msm8974 chip on Samsung Note 3

Hi I have been working on compiling an android image for my Samsung Note 3. Basically I downloaded the source from Samsung, which directed me to download a version of Android Open Source Project code. I then followed the procedures in the readme files provided. But there are some discrepancies between the procedures and tools to be used from Samsung vs. Qualcomm's documents. My question is about finding the right procedure, and get a working image. I have followed the Samsung's procedures, and they have not resulted in a working image as of now. I tried to flash the boot.img file I created, and collected the recovery logs which are posted here I could be doing something wrong though; I am not saying the procedures are wrong. So here are the issues I am struggling with:
1- Samsung's readme file says to download arm-eabi-4.7, while Qualcomm says to used 4.8 with their compiler add on llvm. As of now, I plan to try llvm with 4.7 and 4.8 and see what happens. I have already tried 4.7 w/o llvm and it has not helped.
2 Samsung procedures state to update the CROSS_COMPILE statement with the path to above arm-eaby-4.7 executable, export ARCH=arm, then create a config file with the following statement:
make VARIANT_DEFCONFIG=msm8974_sec_hlte_spr_defconfig msm8974_sec_defconfig SELINUX_DEFCONFIG=selinux_
defconfig
and then run make. While Qualcomm's llvm readme file states to issue the following command:
ndk-build NDK_TOOLCHAIN_VERSION=snapdragonclang3.6 APP_ABI="armeabi-v7a"
-C <some_project>
I know I have to have a path to ndk-build script and I know where it is. What I do not know is
1- If Samsung's procedures run ndk-build also. I looked through the Makefile in the project's root directory and do not see any reference to it. Would the arm-eabi-4.7 run ndk-build perhaps?
2- What is the best way to get to a working image for me? I do not see the NDK_TOOLCHAIN_VERSION and APP_ABI variables in the Samsung's .config file. Can I set these as environment variables?
3- Samsung's procedures state to set an environment variable of ARCH=arm, while Qualcomm's configuration passed to the ndk-build is armeabi-v7a
4- Qualcomm's procedure calls for a project name. Is this something generic or would I find it somewhere in Samsung's files? I did a search in the .config and Makefile and did not see any reference to it.
5- Are there any tags I should add to this post to get the attention of right folks who know and deal with questions like mine stated above?
#jww - Thanks. I'll try the procedure, and I am going through the material you shared. I hope I can have my other questions above addressed also.
Update - Hey I noticed I did not get any reply about actual issue. Another question I wanted to ask is if it helps to build an image, which provides more information about what is wrong with my image? Do I do that via the config command?

About AOSP Downloading & Building Few Queries

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.

Adding driver to android devices kernel

I would like to use a PCAN with my device.
I have the program for it, and an otg cable, but i need to install the driver first.
And i found a linux driver on the manufacturers site.
I downloaded the kernel source, arm toolchain, and read a few sites about building and compiling but i havent find anything about adding driver.
So my question is, how can i add or install this driver on android?
The device is galaxy tab 10.1 P7510.
Thanks for your help.
Right, what you need to do is this:
Unzip the tarball source
Go into the respective directory of the source - cd peak-linux-driver-7.7/ as quoted by the above PDF
cd peak-linux-driver-x.y
make clean
make su -c “make install”
When the build completes, issue this command
/sbin/modprobe pcan
However, having stated this, I do not see any reference to building with Android, so it looks like a fair bit of messing around with the source to get this to actually work on Android.
From what I can ascertain, this is more orientated towards the desktop PC only...
As is mentioned in a later comment clarifying this answer; the kernel would need to be recompiled from source as an arm v7 or v8 target.
The part not mentioned was that it would also have to be statically linked to avoid requiring glibc in Android or bionic lib c in your computer.

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

Generate core dump in android

I'm developping a android's aplication using some shared
libraries written by me and compiled with ndk-r5b. The application works,
y and the calls to the libraries works too, but I detected some errors,
segmentations faults, and I need to debug it, but, I don't know how debug
native code from android and I don't know if I can generate core dumps,
as in linux, for debug my libraries.
Any idea?
The ndk comes with ndk-gdb, which supposedly allows you to debug native applications. Also, if you download the whole andriod open source project, they also have some version of gdb used for debugging. Look in the docs/ folder of the ndk to learn about using it. This tutorial might also prove helpful: http://vilimpoc.org/blog/2010/09/23/hello-gdbserver-a-debuggable-jni-example-for-android/
However, as shown in a recent question I asked: Running ndk-gdb with package not found error on motorola phone I still can't get it to work.
Edit: You said in the comments you were using a Samsung Device: Samsung decide to wreck havoc on some of the crucial internals required for native debugging, but it's easily fixable if you have root access to the device. If you use the --verbose flag, you'll probably find that the error is different than that, a package unknown error. That's because it's looking in /data/system/packages.list, but samsung renamed that file to /dbdata/system/packages.list. So if you make a symlink to that file in /data/system/packages.list, (requires root access) it should work. Or at least so claims the ndk mailing list: http://osdir.com/ml/android-ndk/2011-03/msg00036.html

Categories

Resources