51全志R58平台Android4.4下Camera的HAL层修改

51全志R58平台Android4.4下Camera的HAL层修改

2018/11/7 15:20

版本:V1.0

开发板:SC5806

1、系统编译:

(略)

2、全志R58平台Android4.4下Camera的HAL层在这个目录:

/home/wwt/r58_android_v4.4/android/device/softwinner/octopus-common/hardware/camera

可以使用mm编译:

BuildImg 0

Dragon execute image.cfg SUCCESS !

----------image is at----------

/home/wwt/r58_android_v4.4/lichee/tools/pack/sun8iw6p1_android_sc5806_uart0.img

pack finish

[email protected]:/home/wwt/r58_android_v4.4/android$

[email protected]:/home/wwt/r58_android_v4.4/android$ cd device/softwinner/octopus-common/hardware/

[email protected]:/home/wwt/r58_android_v4.4/android/device/softwinner/octopus-common/hardware$ ll

总用量 20

-rwxrwxr-x 1 rootroot rootroot  682 11月  6 15:09 Android.mk

drwxrwxr-x 2 rootroot rootroot 4096 11月  6 15:09 audio

drwxrwxr-x 4 rootroot rootroot 4096 11月  7 10:10 camera

drwxrwxr-x 2 rootroot rootroot 4096 11月  6 15:09 include

drwxrwxr-x 3 rootroot rootroot 4096 11月  6 15:09 libhardware

[email protected]:/home/wwt/r58_android_v4.4/android/device/softwinner/octopus-common/hardware$ cd camera/

[email protected]:/home/wwt/r58_android_v4.4/android/device/softwinner/octopus-common/hardware/camera$ ll

总用量 940

-rwxrwxr-x 1 rootroot rootroot   2969 11月  6 15:09 Android.mk

-rwxrwxr-x 1 rootroot rootroot   2616 11月  6 15:09 BufferListManager.cpp

-rwxrwxr-x 1 rootroot rootroot    810 11月  6 15:09 BufferListManager.h

-rwxrwxr-x 1 rootroot rootroot  48106 11月  6 15:09 CallbackNotifier.cpp

-rwxrwxr-x 1 rootroot rootroot  12823 11月  6 15:09 CallbackNotifier.h

-rwxrwxr-x 1 rootroot rootroot   1110 11月  6 15:09 CameraDebug.cpp

-rwxrwxr-x 1 rootroot rootroot   3058 11月  6 15:09 CameraDebug.h

-rwxrwxr-x 1 rootroot rootroot 120855 11月  6 15:09 CameraHardware2.cpp

-rwxrwxr-x 1 rootroot rootroot  24391 11月  6 15:09 CameraHardware2.h

-rwxrwxr-x 1 rootroot rootroot  75852 11月  6 15:09 CameraHardware.cpp

-rwxrwxr-x 1 rootroot rootroot  19409 11月  6 15:09 CameraHardware.h

-rwxrwxr-x 1 rootroot rootroot   2356 11月  6 15:09 CameraPlatform.h

-rwxrwxr-x 1 rootroot rootroot   9748 11月  6 15:09 CCameraConfig.cpp

-rwxrwxr-x 1 rootroot rootroot   6227 11月  6 15:09 CCameraConfig.h

-rwxrwxr-x 1 rootroot rootroot  11760 11月  6 15:09 HALCameraFactory.cpp

-rwxrwxr-x 1 rootroot rootroot   3623 11月  6 15:09 HALCameraFactory.h

drwxrwxr-x 2 rootroot rootroot   4096 11月  6 15:09 libfacedetection

-rwxrwxr-x 1 rootroot rootroot  13444 11月  6 15:09 libproc.so

-rwxrwxr-x 1 rootroot rootroot   1416 11月  6 15:09 OSAL_Mutex.c

-rwxrwxr-x 1 rootroot rootroot    415 11月  6 15:09 OSAL_Mutex.h

-rwxrwxr-x 1 rootroot rootroot   4297 11月  6 15:09 OSAL_Queue.c

-rwxrwxr-x 1 rootroot rootroot    912 11月  6 15:09 OSAL_Queue.h

-rwxrwxr-x 1 rootroot rootroot  14594 11月  6 15:09 PreviewWindow.cpp

-rwxrwxr-x 1 rootroot rootroot   5540 11月  6 15:09 PreviewWindow.h

-rwxrwxr-x 1 rootroot rootroot  10318 11月  6 15:09 scaler.c

drwxrwxr-x 2 rootroot rootroot   4096 11月  6 15:09 SceneFactory

-rwxrw-r-- 1 rootroot rootroot  71864 11月  7 10:10 V4L2CameraDevice2.cpp

-rwxrwxr-x 1 rootroot rootroot  17068 11月  6 15:09 V4L2CameraDevice2.h

-rwx------ 1 rootroot rootroot  71802 10月 26 14:38 V4L2CameraDevice2 - 副本 (2).cpp

-rwx------ 1 rootroot rootroot  71802 10月 26 14:38 V4L2CameraDevice2 - 副本 (3)修改完工.cpp

-rw-rw-r-- 1 rootroot rootroot  71455 10月 26 11:01 V4L2CameraDevice2 - 副本.cpp

-rw-rw-r-- 1 rootroot rootroot  17068  5月 12  2016 V4L2CameraDevice2 - 副本.h

-rwxrwxr-x 1 rootroot rootroot  44340 11月  6 15:09 V4L2CameraDevice.cpp

-rwxrwxr-x 1 rootroot rootroot  13544 11月  6 15:09 V4L2CameraDevice.h

-rw-rw-r-- 1 rootroot rootroot  13544  5月 12  2016 V4L2CameraDevice - 副本.h

[email protected]:/home/wwt/r58_android_v4.4/android/device/softwinner/octopus-common/hardware/camera$ mm

============================================

PLATFORM_VERSION_CODENAME=REL

PLATFORM_VERSION=4.4.4

TARGET_PRODUCT=octopus_sc5806

TARGET_BUILD_VARIANT=eng

TARGET_BUILD_TYPE=release

TARGET_BUILD_APPS=

TARGET_ARCH=arm

TARGET_ARCH_VARIANT=armv7-a-neon

TARGET_CPU_VARIANT=cortex-a7

HOST_ARCH=x86

HOST_OS=linux

HOST_OS_EXTRA=Linux-3.13.0-24-generic-x86_64-with-Ubuntu-14.04-trusty

HOST_BUILD_TYPE=release

BUILD_ID=KTU84Q

OUT_DIR=out

============================================

PRODUCT_COPY_FILES device/softwinner/octopus-common/hardware/audio/audio_policy.conf:system/etc/audio_policy.conf ignored.

PRODUCT_COPY_FILES device/softwinner/octopus-common/hardware/audio/phone_volume.conf:system/etc/phone_volume.conf ignored.

No private recovery resources for TARGET_DEVICE octopus-sc5806

make:进入目录‘/home/wwt/r58_android_v4.4/android‘

target thumb C++: camera.octopus <= device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:1108:5: warning: multi-line comment [-Wcomment]

In file included from device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:19:0:

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.h: In constructor ‘android::V4L2CameraDevice::V4L2CameraDevice(android::CameraHardware*, android::PreviewWindow*, android::CallbackNotifier*)‘:

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.h:521:13: warning: ‘android::V4L2CameraDevice::mVideoFormat‘ will be initialized after [-Wreorder]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.h:481:13: warning:   ‘int android::V4L2CameraDevice::mFrameRate‘ [-Wreorder]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:292:1: warning:   when initialized here [-Wreorder]

In file included from device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:19:0:

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.h:592:19: warning: ‘android::V4L2CameraDevice::mCurrentV4l2buf‘ will be initialized after [-Wreorder]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.h:559:13: warning:   ‘bool android::V4L2CameraDevice::mCanBeDisconnected‘ [-Wreorder]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:292:1: warning:   when initialized here [-Wreorder]

In file included from device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:19:0:

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.h:584:37: warning: ‘android::V4L2CameraDevice::mContinuousPictureAfter‘ will be initialized after [-Wreorder]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.h:572:34: warning:   ‘bool android::V4L2CameraDevice::mSmartPictureDone‘ [-Wreorder]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:292:1: warning:   when initialized here [-Wreorder]

In file included from device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:19:0:

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.h:609:19: warning: ‘android::V4L2CameraDevice::mSceneMode‘ will be initialized after [-Wreorder]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.h:607:13: warning:   ‘int android::V4L2CameraDevice::mFlashMode‘ [-Wreorder]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:292:1: warning:   when initialized here [-Wreorder]

In file included from device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:19:0:

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.h:607:13: warning: ‘android::V4L2CameraDevice::mFlashMode‘ will be initialized after [-Wreorder]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.h:518:13: warning:   ‘int android::V4L2CameraDevice::mZoomRatio‘ [-Wreorder]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:292:1: warning:   when initialized here [-Wreorder]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp: In member function ‘android::status_t android::V4L2CameraDevice::connectDevice(android::HALCameraInfo*)‘:

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:556:19: warning: NULL used in arithmetic [-Wpointer-arith]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:559:15: warning: converting to non-pointer type ‘int‘ from NULL [-Wconversion-null]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp: In member function ‘android::status_t android::V4L2CameraDevice::startDevice(int, int, uint32_t, bool)‘:

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:659:2: warning: NULL used in arithmetic [-Wpointer-arith]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:659:2: warning: converting to non-pointer type ‘int‘ from NULL [-Wconversion-null]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:663:2: warning: NULL used in arithmetic [-Wpointer-arith]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:663:2: warning: converting to non-pointer type ‘int‘ from NULL [-Wconversion-null]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:668:2: warning: NULL used in arithmetic [-Wpointer-arith]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:668:2: warning: converting to non-pointer type ‘int‘ from NULL [-Wconversion-null]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:671:2: warning: NULL used in arithmetic [-Wpointer-arith]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:671:2: warning: converting to non-pointer type ‘int‘ from NULL [-Wconversion-null]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp: In member function ‘int android::V4L2CameraDevice::getCurrentFaceFrame(void*, int*, int*)‘:

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:1739:3: warning: pointer of type ‘void *‘ used in arithmetic [-Wpointer-arith]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:1741:40: warning: pointer of type ‘void *‘ used in arithmetic [-Wpointer-arith]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp: In member function ‘int android::V4L2CameraDevice::openCameraDev(android::HALCameraInfo*)‘:

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:1853:19: warning: NULL used in arithmetic [-Wpointer-arith]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:1856:15: warning: converting to non-pointer type ‘int‘ from NULL [-Wconversion-null]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp: In member function ‘void android::V4L2CameraDevice::closeCameraDev()‘:

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:1866:19: warning: NULL used in arithmetic [-Wpointer-arith]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:1869:15: warning: converting to non-pointer type ‘int‘ from NULL [-Wconversion-null]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp: In member function ‘int android::V4L2CameraDevice::v4l2QueryBuf()‘:

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:2030:63: warning: pointer of type ‘void *‘ used in arithmetic [-Wpointer-arith]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp: In member function ‘int android::V4L2CameraDevice::tryFmt(int)‘:

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:2167:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp: In member function ‘int android::V4L2CameraDevice::getAutoFocusStatus()‘:

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:2506:19: warning: NULL used in arithmetic [-Wpointer-arith]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp: In member function ‘int android::V4L2CameraDevice::getSnrValue()‘:

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:2528:19: warning: NULL used in arithmetic [-Wpointer-arith]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp: In member function ‘int android::V4L2CameraDevice::getGainValue()‘:

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:2554:19: warning: NULL used in arithmetic [-Wpointer-arith]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp: In member function ‘int android::V4L2CameraDevice::getExpValue()‘:

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:2579:19: warning: NULL used in arithmetic [-Wpointer-arith]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp: In member function ‘int android::V4L2CameraDevice::setHDRMode(void*)‘:

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:2604:19: warning: NULL used in arithmetic [-Wpointer-arith]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp: In member function ‘int android::V4L2CameraDevice::getAeStat(isp_stat_buf*)‘:

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:2622:19: warning: NULL used in arithmetic [-Wpointer-arith]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp: In member function ‘int android::V4L2CameraDevice::getGammaStat(isp_stat_buf*)‘:

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:2639:19: warning: NULL used in arithmetic [-Wpointer-arith]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:2645:2: warning: format ‘%x‘ expects argument of type ‘unsigned int‘, but argument 4 has type ‘void*‘ [-Wformat]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp: In member function ‘int android::V4L2CameraDevice::getHistStat(isp_stat_buf*)‘:

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:2657:19: warning: NULL used in arithmetic [-Wpointer-arith]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp: In member function ‘int android::V4L2CameraDevice::getSensorType()‘:

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:2896:19: warning: NULL used in arithmetic [-Wpointer-arith]

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp: In member function ‘int android::V4L2CameraDevice::getExifInfo(isp_exif_attribute*)‘:

device/softwinner/octopus-common/hardware/camera/V4L2CameraDevice2.cpp:2915:19: warning: NULL used in arithmetic [-Wpointer-arith]

target SharedLib: camera.octopus (out/target/product/octopus-sc5806/obj/SHARED_LIBRARIES/camera.octopus_intermediates/LINKED/camera.octopus.so)

target Symbolic: camera.octopus (out/target/product/octopus-sc5806/symbols/system/lib/hw/camera.octopus.so)

target Strip: camera.octopus (out/target/product/octopus-sc5806/obj/lib/camera.octopus.so)

Install: out/target/product/octopus-sc5806/system/lib/hw/camera.octopus.so

make:离开目录“/home/wwt/r58_android_v4.4/android”

[email protected]:/home/wwt/r58_android_v4.4/android/device/softwinner/octopus-common/hardware/camera$

在R58的开发板sc5806上面查找camera.octopus.so的位置:

[   10.761187] lowmemorykiller: oom_adj 1 => oom_score_adj 58

[   10.767400] lowmemorykiller: oom_adj 2 => oom_score_adj 117

[   10.773701] lowmemorykiller: oom_adj 3 => oom_score_adj 176

[   10.780092] lowmemorykiller: oom_adj 9 => oom_score_adj 529

[   10.786361] lowmemorykiller: oom_adj 15 => oom_score_adj 1000

[   11.288052] acc_open

[   11.290593] acc_release

[   11.743295] init: no such service ‘fuse_sdcard‘

[   13.488068] init: sys_prop: permission denied uid:1003  name:service.bootanim.exit

[   13.783140] [dsm] Scene:0 "init" (pid:1)

[   15.982241] [dsm] Scene:1 "init" (pid:1)

[   15.986744] [ddrfreq] DDR: 672000KHz->456000KHz start

[   15.992460] [ddrfreq] current cpu is cpu7

[   15.997031] [ddrfreq] mdfs in cfs mode

[   16.001709] [ddrfreq] elapsed: 280us

[   16.005861] [ddrfreq] DDR: 672000KHz->456000KHz ok!

[   26.647983] [ddrfreq] DDR: 456000KHz->672000KHz start

[   26.660197] [ddrfreq] current cpu is cpu0

[   26.664794] [ddrfreq] mdfs in cfs mode

[   26.674157] [ddrfreq] elapsed: 223us

[   26.678192] [ddrfreq] DDR: 456000KHz->672000KHz ok!

[   27.365067] [dsm] Scene:0 "init" (pid:1)

[email protected]:/ $

[email protected]:/ $ lsmod

sunxi_schw 13015 0 - Live 0x00000000 (O)

cdc_ether 3163 0 - Live 0x00000000

rtl8150 9023 0 - Live 0x00000000

mcs7830 5644 0 - Live 0x00000000

qf9700 5904 0 - Live 0x00000000

asix 13590 0 - Live 0x00000000

usbnet 14128 4 cdc_ether,mcs7830,qf9700,asix, Live 0x00000000

bcm_btlpm 7658 0 - Live 0x00000000

bcmdhd 618780 0 - Live 0x00000000

uvcvideo 61280 0 - Live 0x00000000

videobuf2_vmalloc 2308 1 uvcvideo, Live 0x00000000

videobuf2_memops 1802 1 videobuf2_vmalloc, Live 0x00000000

videobuf2_core 18902 1 uvcvideo, Live 0x00000000

pvrsrvkm 279443 26 - Live 0x00000000 (O)

hdmi 38647 0 - Live 0x00000000

disp 1053993 6 hdmi, Live 0x00000000

sunxi_tr 9348 1 disp, Live 0x00000000

nand 299839 0 - Live 0x00000000 (O)

[email protected]:/ $ cd /dev

[email protected]:/dev $ ll v*

crw------- root     root       7,   0 1970-01-02 08:09 vcs

crw------- root     root       7,   1 1970-01-02 08:09 vcs1

crw------- root     root       7, 128 1970-01-02 08:09 vcsa

crw------- root     root       7, 129 1970-01-02 08:09 vcsa1

crwxrwx--- media    media     81,   0 1970-01-02 08:09 video0

[email protected]:/dev $

[email protected]:/dev $ cd /

[email protected]:/ $ find . -name camera.octopus.so

/system/bin/sh: find: not found

127|[email protected]:/ $ busybox

/system/bin/sh: busybox: not found

127|[email protected]:/ $ su

[email protected]:/ # busybox

BusyBox v1.18.3 (2012-12-03 15:06:10 CST) multi-call binary.

Copyright (C) 1998-2009 Erik Andersen, Rob Landley, Denys Vlasenko

and others. Licensed under GPLv2.

See source distribution for full notice.

Usage: busybox [function] [arguments]...

or: busybox --list[-full]

or: function [arguments]...

BusyBox is a multi-call binary that combines many common Unix

utilities into a single executable.  Most people will create a

link to busybox for each function they wish to use and BusyBox

will act like whatever it was invoked as.

Currently defined functions:

[, [[, addgroup, adduser, ar, arping, ash, awk, basename, bunzip2,

bzcat, cat, catv, chattr, chgrp, chmod, chown, chroot, chrt, chvt,

cksum, clear, cmp, cp, cpio, crond, crontab, cut, date, dc, dd,

deallocvt, delgroup, deluser, devmem, df, diff, dirname, dmesg, dnsd,

dnsdomainname, dos2unix, du, dumpkmap, echo, egrep, eject, env,

ether-wake, expr, false, fdflush, fdformat, fdisk, fgrep, find, fold,

free, freeramdisk, fsck, fuser, getopt, getty, grep, gunzip, gzip,

halt, hdparm, head, hexdump, hostid, hostname, hwclock, id, ifconfig,

ifdown, ifup, inetd, init, insmod, install, ionice, iostat, ip, ipaddr,

ipcrm, ipcs, iplink, iproute, iprule, iptunnel, kill, killall,

killall5, klogd, last, length, less, linux32, linux64, linuxrc, ln,

loadfont, loadkmap, logger, login, logname, losetup, ls, lsattr, lsmod,

lspci, lsusb, lzcat, lzma, makedevs, md5sum, mdev, mesg, microcom,

mkdir, mkdosfs, mke2fs, mkfifo, mkfs.ext2, mkfs.vfat, mknod, mkswap,

mktemp, modinfo, modprobe, more, mount, mountpoint, mpstat, mt, mv,

nameif, netstat, nice, nohup, nslookup, od, openvt, passwd, patch,

pidof, ping, pipe_progress, pivot_root, poweroff, printenv, printf, ps,

pwd, rdate, readahead, readlink, readmbr, readprofile, realpath,

reboot, renice, reset, resize, rm, rmdir, rmmod, route, run-parts,

runlevel, sed, seq, setarch, setconsole, setkeycodes, setlogcons,

setsid, sh, sha1sum, sha256sum, sha512sum, sleep, sort,

start-stop-daemon, strings, stty, su, sulogin, swapoff, swapon,

switch_root, sync, sysctl, syslogd, tail, tar, tee, telnet, test, tftp,

time, top, touch, tr, traceroute, true, tty, udhcpc, umount, uname,

uniq, unix2dos, unlzma, unxz, unzip, uptime, usleep, uudecode,

uuencode, vconfig, vi, vlock, watch, watchdog, wc, wget, which, who,

whoami, xargs, xz, xzcat, yes, zcat

[email protected]:/ # find . -name camera.octopus.so

sh: find: not found

127|[email protected]:/ # busybox find . -name camera.octopus.so

./system/lib/hw/camera.octopus.so

find: ./proc/158/task/212/fdinfo/45: No such file or directory

find: ./proc/158/task/212/fdinfo/64: No such file or directory

find: ./proc/158/task/495/fd/77: No such file or directory

find: ./proc/158/fd/57: No such file or directory

find: ./proc/1290/task/1290/fd/80: No such file or directory

find: ./proc/1290/task/1299/fdinfo/79: No such file or directory

find: ./proc/1290/task/1324/fd/80: No such file or directory

find: ./proc/1290/task/1324/fdinfo/71: No such file or directory

find: ./proc/1290/task/1370/fdinfo/71: No such file or directory

find: ./proc/1290/task/1435/fdinfo/71: No such file or directory

find: ./proc/1290/task/1435/fdinfo/77: No such file or directory

find: ./proc/2121: No such file or directory

find: ./proc/2122: No such file or directory

find: ./proc/2123: No such file or directory

1|[email protected]:/ #

通过adb将修改过的camera.octopus.so文件推送到开发板SC5806上。(注意修改权限)

Microsoft Windows [版本 6.1.7600]

版权所有 (c) 2009 Microsoft Corporation。保留所有权利。

C:\Users\Administrator>adb shell

[email protected]:/ # cd /dev

cd /dev

[email protected]:/dev # ll v*

ll v*

crw------- root     root       7,   0 1970-01-01 09:07 vcs

crw------- root     root       7,   1 1970-01-01 09:07 vcs1

crw------- root     root       7, 128 1970-01-01 09:07 vcsa

crw------- root     root       7, 129 1970-01-01 09:07 vcsa1

crwxrwx--- media    media     81,   0 1970-01-02 08:02 video0

[email protected]:/dev #

C:\Users\Administrator>cd W:\r58_android_v4.4\android\out\target\product\octopus-sc5806\system\lib\hw

C:\Users\Administrator>w:

W:\r58_android_v4.4\android\out\target\product\octopus-sc5806\system\lib\hw>dir

驱动器 W 中的卷是 rootroot

卷的序列号是 940F-E71D

W:\r58_android_v4.4\android\out\target\product\octopus-sc5806\system\lib\hw 的目录

2018/11/06  16:20    <DIR>          .

2018/11/06  16:23    <DIR>          ..

2018/11/06  16:17             9,540 audio.a2dp.default.so

2018/11/06  16:16             5,396 local_time.default.so

2018/11/06  16:17             9,484 keystore.exdroid.so

2018/11/06  16:16             9,820 gralloc.default.so

2018/11/06  16:17            30,204 audio.primary.octopus.so

2018/11/06  16:16             5,400 audio.primary.default.so

2018/11/06  16:16             5,396 power.default.so

2018/11/06  16:17             5,436 audio.usb.default.so

2018/11/06  16:16           130,932 sensors.exdroid.so

2018/11/06  16:17            26,460 hwcomposer.octopus.so

2018/11/06  16:16             5,388 lights.octopus.so

2018/11/07  10:11           136,760 camera.octopus.so

2018/11/06  16:17            75,272 audio_policy.default.so

2018/11/06  16:17             5,392 keystore.default.so

2018/11/06  16:20            17,800 audio.r_submix.default.so

2018/11/06  16:17         1,073,172 bluetooth.default.so

16 个文件      1,551,852 字节

2 个目录 96,538,443,776 可用字节

W:\r58_android_v4.4\android\out\target\product\octopus-sc5806\system\lib\hw>adb push camera.octopus.so /system/lib/hw/

failed to copy ‘camera.octopus.so‘ to ‘/system/lib/hw//camera.octopus.so‘: Read-only file system

W:\r58_android_v4.4\android\out\target\product\octopus-sc5806\system\lib\hw>adb remount

remount succeeded

W:\r58_android_v4.4\android\out\target\product\octopus-sc5806\system\lib\hw>adb push camera.octopus.so /system/lib/hw/

661 KB/s (136760 bytes in 0.202s)

修改权限:

1|[email protected]:/ #

1|[email protected]:/ # cd /system/lib/hw/

[email protected]:/system/lib/hw #

(通过adb推入camera.octopus.so之前的权限:)

[email protected]:/system/lib/hw # ll

-rw-r--r-- root     root         9540 2018-11-06 16:17 audio.a2dp.default.so

-rw-r--r-- root     root         5400 2018-11-06 16:16 audio.primary.default.so

-rw-r--r-- root     root        30204 2018-11-06 16:17 audio.primary.octopus.so

-rw-r--r-- root     root        17800 2018-11-06 16:20 audio.r_submix.default.so

-rw-r--r-- root     root         5436 2018-11-06 16:17 audio.usb.default.so

-rw-r--r-- root     root        75272 2018-11-06 16:17 audio_policy.default.so

-rw-r--r-- root     root      1073172 2018-11-06 16:17 bluetooth.default.so

-rw-r--r-- root     root       136760 2018-11-06 16:17 camera.octopus.so

-rw-r--r-- root     root         9820 2018-11-06 16:16 gralloc.default.so

-rw-r--r-- root     root        26460 2018-11-06 16:17 hwcomposer.octopus.so

-rw-r--r-- root     root         5392 2018-11-06 16:17 keystore.default.so

-rw-r--r-- root     root         9484 2018-11-06 16:17 keystore.exdroid.so

-rw-r--r-- root     root         5388 2018-11-06 16:16 lights.octopus.so

-rw-r--r-- root     root         5396 2018-11-06 16:16 local_time.default.so

-rw-r--r-- root     root         5396 2018-11-06 16:16 power.default.so

-rw-r--r-- root     root       130932 2018-11-06 16:16 sensors.exdroid.so

[email protected]:/system/lib/hw #

[email protected]:/system/lib/hw # [  354.337386] EXT4-fs (mmcblk0p7): re-mounted. Opts: (null)

[email protected]:/system/lib/hw #

(通过adb推入camera.octopus.so之后的权限:)

[email protected]:/system/lib/hw # ll

-rw-r--r-- root     root         9540 2018-11-06 16:17 audio.a2dp.default.so

-rw-r--r-- root     root         5400 2018-11-06 16:16 audio.primary.default.so

-rw-r--r-- root     root        30204 2018-11-06 16:17 audio.primary.octopus.so

-rw-r--r-- root     root        17800 2018-11-06 16:20 audio.r_submix.default.so

-rw-r--r-- root     root         5436 2018-11-06 16:17 audio.usb.default.so

-rw-r--r-- root     root        75272 2018-11-06 16:17 audio_policy.default.so

-rw-r--r-- root     root      1073172 2018-11-06 16:17 bluetooth.default.so

-rw-rw-rw- root     root       136760 2018-11-07 10:11 camera.octopus.so

-rw-r--r-- root     root         9820 2018-11-06 16:16 gralloc.default.so

-rw-r--r-- root     root        26460 2018-11-06 16:17 hwcomposer.octopus.so

-rw-r--r-- root     root         5392 2018-11-06 16:17 keystore.default.so

-rw-r--r-- root     root         9484 2018-11-06 16:17 keystore.exdroid.so

-rw-r--r-- root     root         5388 2018-11-06 16:16 lights.octopus.so

-rw-r--r-- root     root         5396 2018-11-06 16:16 local_time.default.so

-rw-r--r-- root     root         5396 2018-11-06 16:16 power.default.so

-rw-r--r-- root     root       130932 2018-11-06 16:16 sensors.exdroid.so

[email protected]:/system/lib/hw # chmod 644 camera.octopus.so

[email protected]:/system/lib/hw #

[email protected]:/system/lib/hw # sync

[email protected]:/system/lib/hw # ll

-rw-r--r-- root     root         9540 2018-11-06 16:17 audio.a2dp.default.so

-rw-r--r-- root     root         5400 2018-11-06 16:16 audio.primary.default.so

-rw-r--r-- root     root        30204 2018-11-06 16:17 audio.primary.octopus.so

-rw-r--r-- root     root        17800 2018-11-06 16:20 audio.r_submix.default.so

-rw-r--r-- root     root         5436 2018-11-06 16:17 audio.usb.default.so

-rw-r--r-- root     root        75272 2018-11-06 16:17 audio_policy.default.so

-rw-r--r-- root     root      1073172 2018-11-06 16:17 bluetooth.default.so

-rw-r--r-- root     root       136760 2018-11-07 10:11 camera.octopus.so

-rw-r--r-- root     root         9820 2018-11-06 16:16 gralloc.default.so

-rw-r--r-- root     root        26460 2018-11-06 16:17 hwcomposer.octopus.so

-rw-r--r-- root     root         5392 2018-11-06 16:17 keystore.default.so

-rw-r--r-- root     root         9484 2018-11-06 16:17 keystore.exdroid.so

-rw-r--r-- root     root         5388 2018-11-06 16:16 lights.octopus.so

-rw-r--r-- root     root         5396 2018-11-06 16:16 local_time.default.so

-rw-r--r-- root     root         5396 2018-11-06 16:16 power.default.so

-rw-r--r-- root     root[  366.771164] healthd: battery l=100 v=0 t=30.0 h=2 st=5 c=0 chg=au

130932 2018-11-06 16:16 sensors.exdroid.so

[email protected]:/system/lib/hw #

重启即生效。

可以看见LOGV的打印生效,文件名、行号以及函数名都可以打印出来,但是printf无效。

printf("**** %s-%d-%s \n", __FILE__, __LINE__, __func__);

LOGV("**** %s-%d-%s ", __FILE__, __LINE__, __func__);

原文地址:https://www.cnblogs.com/wb4916/p/9922872.html

时间: 2024-10-06 16:31:33

51全志R58平台Android4.4下Camera的HAL层修改的相关文章

009全志R16平台tinav3.0下编译不过的问题

2018/11/13 11:39 版本:V1.0 开发板:SC3817R SDK:tina v3.0 1.01原始编译全志r16平台tinav3.0系统: [email protected]:~$ cd /home/wwt [email protected]:/home/wwt$ [email protected]:~$ cd /home/wwt [email protected]:/home/wwt$ [email protected]:/home/wwt$ [email protected]

android4.0 USB Camera实例(四)CMOS

上一篇说了下usb camera uvc标准的 顺便把CMOS做到一起 操作上基本一至 上一篇HAL层里我已经提供了CMOS的相关接口 JNIEXPORT jint JNICALL Java_com_dao_usbcam_Fimcgzsd_yuvtorgb 如果使用和UVC一样的处理 图像显示不出来 所以用另外一种方法 同时这里使用的是斯道ICOOL210开发板测试的 如果使用CMOS还需要修改一些地方 HAL层修改如下 首先增加一个函数如下 int select_input(int input

Android Camera API2.0下全新的Camera FW/HAL架构简述

本文均属自己阅读源码的点滴总结,转账请注明出处谢谢. 欢迎和大家交流.qq:1037701636 email:gzzaigcn2[email protected] Software:系统源码Android5.1 前沿: 前面博文大多少总结的是Camera HAL1到HAL3的系统架构,但这些架构对于Camera APP开发来说依旧还是处于Camera API1.0的标准.而随着Camera3.HAL3.0等的不断更新,Google先是在Framework中更改了整个架构从而去匹配Camera A

android4.0 USB Camera实例(五补充)jpg压缩

前一篇最后 我们说了一个直接将yuv转成jpg的函数 但是转换没有成功 原函数是yuv420转jpg的 研究了下发现 yuv420隔行扫描的的序列是这样的 YYYY YYYY UVUV 而yuv422的隔行扫描的序列是这样的 YU YV YU YV YU YV 所以将函数作如下修改 static int put_jpeg_yuv420p_memory(unsigned char *dest_image, unsigned char *input_image, int width, int hei

android4.0 USB Camera实例(五)jpg压缩

最近大部分时间都在研究usb 摄像头顺便把jpg编码也写上 下面大部分函数都是我在网上找的 然后稍微的改一点就可以使用了 不过找这些函数费了不少时间 jpg编码网上有很多说明 大致流程都是一样的 我也没深入研究这里就不说了 接前面几篇Camera的文章 这里主要同把获取到的yuv数据通过jpg压缩 以及压缩成mjpeg视频流 首先说明下摄像头获取到的数据格式是yuv422(p16) 这个是在你初始化摄像头设置pixelformat我们当初设置的是V4L2_PIX_FMT_YUYV它的实际格式就是

20171128客户在全志R16平台的问题合集

客户在全志R16平台的问题合集20171128 2017/10/19 16:41 版本:V1.0 W工,您好! 问题1: 我是XXXXXX科技有限公司的陈工,在调试贵公司的R16开发板(系统为安卓4.4)的LVDS屏的时,你们的屏幕是1280x800,18位的屏,我们的是(分辨率为)1024x600.18位的屏,我修改了下面的信息,但是开机后整体画面有偏移,画面偏左而且没有占满整个屏(附件图中红框部分属于屏幕正常显示区域),下方的几个虚拟按键也没有显示出来.我修改行后沿时间跟场后沿时间并没有效果

全志A33平台编译linux(分色排版)sina33

全志A33平台编译linux 大文实验室/大文哥 壹捌陆捌零陆捌捌陆捌贰 21504965 AT qq.com 完成时间:2017/12/12 17:36 版本:V1.0 Xshell 5 (Build 0964) Copyright (c) 2002-2016 NetSarang Computer, Inc. All rights reserved. Type `help' to learn how to use Xshell prompt. [c:\~]$ Connecting to 192

android4.0 USB Camera实例(六)ffmpeg mpeg编码

前面本来说是做h264编码的 研究了两天发现ffmpeg里的h264编码似乎是要信赖第三方库x264 还是怎么简单怎么来吧所以就整了个mpeg编码 ffmpeg移植前面我有一篇ffmpeg解码里已经给了 具体链接在这http://blog.csdn.net/hclydao/article/details/18546757 怎么使用那里面也已经说了 这里主要是通过ffmpeg将yuv422格式转换成rgb 然后就是yuv422转成mpeg格式 接前面几篇 获取到yuv422数据后 为了能显示出来

ops-web运维平台-create.jsp-mootools下拉框-复选框

create.jsp页面的,body部分 <body onload="Page.init('${pageError}','${pageMessage}',${isSubmit},true)"> <div id="title">${pageTitle}</div> <s:form id="MYFORM" action="%{pageAction}" method="post&q