I've got a usb camera working on android (via Android On-The-Go), and I'm looking to change the exposure of the camera. I've been able to get this to work by using v4l2-ctl on a linux machine, and I'm hoping to do the same on my Android device.
The install file mentions the following:
Android Cross Compiling and Installing:
----------------
v4l-utils will only build using the complete AOSP source tree, because of the
stlport dependency.
List of v4l-utils that supply an Android.mk makefile:
* utils/v4l2-compliance
* utils/v4l2-ctl
* utils/v4l2-dbg
To cross compile an utility you must first configure the shell with Android's
envsetup.sh to add the mm alias, before running lunch to select your target
device.
cd /path/to/aosp
source build/envsetup.sh
lunch
cd /path/to/v4l-utils
cd <utility>
mm
So I downloaded the android source, ran the first two commands and lunch
successfully. I then cd'd
into v4l-utils/v4l2-ctl
and ran mm
. I got the following error:
make: *** No rule to make target `out/target/product/generic/obj/lib/crtbegin_dynamic.o', needed by `out/target/product/generic/obj/EXECUTABLES/v4l2-ctl_intermediates/LINKED/v4l2-ctl'. Stop.
What can I try to fix this?
Note: Normal compilation works: I can make all of v4l2 with ./bootstrap.sh
, ./configure
, and then make
.
I've figured out how to do it! I found that the instructions worked great, except for these two points:
repo-sync
with -c
, for the current branch onlylunch
, I just chose the first option: aosp_arm-eng
mm
step, you'll get an error saying Couldn't locate the top of the tree. Try setting TOP.
So run export TOP=/location/of/android/source