前の10件 5  6  7  8  9  10  11  12  13  14  15

記事一覧

HTC Desireの/proc/config.gzを見る

DSC_0714.JPG
やはり実機がないと不便なのでHTC Desireを入手しました。
ちょっと古いモデルですが十分使える端末です。ついでにb-mobileSIMも購入しましたが、こちらはまだ使わずに未開封のまま放置しています。


とりあえず稼働中のカーネル設定を見てみることにしました。以下がDesire(android 2.2 Kernel 2.6.32.15-g6a358a9 htc-kernel@and18-2#1)の/proc/config.gzです。

チップセットは「QSD8x50」。QualcommのSnapdragonアーキテクチャのCPU。
#
# System Type
#
CONFIG_ARCH_QSD8X50=y
CPUの動作周波数は998.4MHzから245MHzの範囲で可変。
#
# MSM Board Type
#
CONFIG_MSM_CPU_FREQ_ONDEMAND_MAX=998400
CONFIG_MSM_CPU_FREQ_ONDEMAND_MIN=245000
加速度センサーは静電容量型で3軸加速度センサー「BMA150」。
#
# UBI - Unsorted block images
#
CONFIG_SENSORS_BMA150_SPI=y
NICはSMC91X互換ドライバー。チップはBroadcomの「BCM4329」。無線LAN(IEEE 802.11a/g/n)、Bluetooth、FM送受信機能を搭載している。チップ自体にはFM送信機能もあるということ、、、 ソフトアクセスポイント機能も有効化されている。
#
# SCSI device support
#
CONFIG_SMC91X=y
CONFIG_BCM4329=m
CONFIG_BCM4329_SOFTAP=y
CONFIG_BCM4329_FW_PATH="/system/etc/firmware/fw_bcm4329.bin"
CONFIG_BCM4329_NVRAM_PATH="/proc/calibration"
タッチスクリーンはSynapticsのもの。 環境光センサー/短距離近接センサーはCapella Microsystemsの「CM3602」。 光学ジョイスティックを備える。
#
# Input Device Drivers
#
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI=y
CONFIG_LIGHTSENSOR_MICROP=y
CONFIG_INPUT_CAPELLA_CM3602=y
CONFIG_INPUT_DUMMY_KEYPAD=y
CONFIG_INPUT_OPTICALJOYSTICK=y
CONFIG_OPTICALJOYSTICK_CRUCIAL=y
CONFIG_OPTICALJOYSTICK_CRUCIAL_uP=y
3軸電子コンパスセンサーは「AKM8973」。測定範囲は±2000T。解像度は8ビット(分解能12ビット相当)。温度測定機能も備える。 ノイズキャンセラーは「A1026」。 ステレオヘッドホンアンプはTexas Instrumentsの「TPA6130A」。デジタルボリューム機能を備える。 オーディオアンプはTexas Instrumentsの「TPA2018D1」。モノラルで、3.6V動作時の出力は880mW(8Ω)。
#
# Miscellaneous I2C Chip support
#
CONFIG_SENSORS_AKM8973=y
CONFIG_VP_A1026=y
CONFIG_AMP_TPA6130A=y
CONFIG_AMP_TPA2018D1=y
I2Cと1-WireのブリッジチップはMaximの「DS2482」。
#
# 1-wire Bus Masters
#
CONFIG_W1_MASTER_DS2482=y
バッテリー保護チップはMaximの「DS2784」。1セルのリチウムイオン電池もしくはリチウムポリマー電池に対応。通信速度は16kbpsまたは143kbps。
#
# 1-wire Slaves
#
CONFIG_W1_SLAVE_DS2784=y
CONFIG_POWER_SUPPLY=y
CONFIG_BATTERY_DS2784=y
CONFIG_SSB_POSSIBLE=y
パワーマネージメント機能はTexas Instrumentsの「TPS65023」。3チャンネルの降圧回路を搭載。
#
# Multifunction device drivers
#
CONFIG_REGULATOR_TPS65023=y
カメラモジュールはSamusungの「S5K3E2FX」。1/3.2インチのCMOSセンサーでQSXGA(2608×1960ドット=500万画素)。RAW出力は10ビット(テスト用途に12ビット出力可能)。 720pカメラ有効。
#
# Qualcomm MSM Camera And Video
#
CONFIG_MSM_CAMERA=y
CONFIG_MSM_CAMERA_LEGACY=y
CONFIG_720P_CAMERA=y

#
# Camera Sensor Selection
#
CONFIG_S5K3E2FX=y
CONFIG_RADIO_ADAPTERS=y
グラフィックスチップはQualcommの「MSM7X00A」。映像はMPEG-4、H.263-0/3、H.264、WMV-9のハードウエアデコーダーを搭載。WVGA(800×480ドット)、30fpsで再生できる(WMV-9は640×240/320×480ドットまで対応)。音声はAMR-N8、AAC、WMA9などに対応。 リアルタイムクロック機能も搭載。
#
# MMC/SD/SDIO Host Controller Drivers
#
CONFIG_MMC_MSM7X00A=y

#
# on-CPU RTC drivers
#
CONFIG_RTC_DRV_MSM7X00A=y








以下がオリジナルの/proc/config.gz

# /data/local/bin/zcat /proc/config.gz
/data/local/bin/zcat /proc/config.gz
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.32.15
# Fri Aug  6 22:33:54 2010
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
CONFIG_GENERIC_GPIO=y
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
CONFIG_HARDIRQS_SW_RESEND=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_RWSEM_GENERIC_SPINLOCK=y
CONFIG_ARCH_HAS_CPUFREQ=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
CONFIG_VECTORS_BASE=0xffff0000
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
CONFIG_CONSTRUCTORS=y

#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
# CONFIG_SWAP is not set
# CONFIG_SYSVIPC is not set
# CONFIG_POSIX_MQUEUE is not set
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set
# CONFIG_AUDIT is not set

#
# RCU Subsystem
#
CONFIG_TREE_RCU=y
# CONFIG_TREE_PREEMPT_RCU is not set
# CONFIG_RCU_TRACE is not set
CONFIG_RCU_FANOUT=32
# CONFIG_RCU_FANOUT_EXACT is not set
# CONFIG_TREE_RCU_TRACE is not set
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=17
CONFIG_GROUP_SCHED=y
CONFIG_FAIR_GROUP_SCHED=y
CONFIG_RT_GROUP_SCHED=y
# CONFIG_USER_SCHED is not set
CONFIG_CGROUP_SCHED=y
CONFIG_CGROUPS=y
CONFIG_CGROUP_DEBUG=y
# CONFIG_CGROUP_NS is not set
CONFIG_CGROUP_FREEZER=y
# CONFIG_CGROUP_DEVICE is not set
# CONFIG_CPUSETS is not set
CONFIG_CGROUP_CPUACCT=y
CONFIG_RESOURCE_COUNTERS=y
# CONFIG_CGROUP_MEM_RES_CTLR is not set
# CONFIG_SYSFS_DEPRECATED_V2 is not set
# CONFIG_RELAY is not set
# CONFIG_NAMESPACES is not set
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_RD_GZIP=y
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZMA is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
CONFIG_ANON_INODES=y
CONFIG_PANIC_TIMEOUT=5
CONFIG_EMBEDDED=y
CONFIG_UID16=y
# CONFIG_SYSCTL_SYSCALL is not set
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
# CONFIG_ELF_CORE is not set
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_ASHMEM=y
CONFIG_AIO=y

#
# Kernel Performance Events And Counters
#
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_COMPAT_BRK=y
CONFIG_SLAB=y
# CONFIG_SLUB is not set
# CONFIG_SLOB is not set
# CONFIG_PROFILING is not set
CONFIG_HAVE_OPROFILE=y
# CONFIG_KPROBES is not set
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y

#
# GCOV-based kernel profiling
#
# CONFIG_GCOV_KERNEL is not set
# CONFIG_SLOW_WORK is not set
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
CONFIG_BASE_SMALL=0
CONFIG_MODULES=y
# CONFIG_MODULE_FORCE_LOAD is not set
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_BLOCK=y
CONFIG_LBDAF=y
# CONFIG_BLK_DEV_BSG is not set
# CONFIG_BLK_DEV_INTEGRITY is not set

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
# CONFIG_IOSCHED_CFQ is not set
# CONFIG_DEFAULT_AS is not set
CONFIG_DEFAULT_DEADLINE=y
# CONFIG_DEFAULT_CFQ is not set
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="deadline"
CONFIG_FREEZER=y

#
# System Type
#
CONFIG_MMU=y
# CONFIG_ARCH_AAEC2000 is not set
# CONFIG_ARCH_INTEGRATOR is not set
# CONFIG_ARCH_REALVIEW is not set
# CONFIG_ARCH_VERSATILE is not set
# CONFIG_ARCH_AT91 is not set
# CONFIG_ARCH_CLPS711X is not set
# CONFIG_ARCH_GEMINI is not set
# CONFIG_ARCH_EBSA110 is not set
# CONFIG_ARCH_EP93XX is not set
# CONFIG_ARCH_FOOTBRIDGE is not set
# CONFIG_ARCH_MXC is not set
# CONFIG_ARCH_STMP3XXX is not set
# CONFIG_ARCH_NETX is not set
# CONFIG_ARCH_H720X is not set
# CONFIG_ARCH_NOMADIK is not set
# CONFIG_ARCH_IOP13XX is not set
# CONFIG_ARCH_IOP32X is not set
# CONFIG_ARCH_IOP33X is not set
# CONFIG_ARCH_IXP23XX is not set
# CONFIG_ARCH_IXP2000 is not set
# CONFIG_ARCH_IXP4XX is not set
# CONFIG_ARCH_L7200 is not set
# CONFIG_ARCH_KIRKWOOD is not set
# CONFIG_ARCH_LOKI is not set
# CONFIG_ARCH_MV78XX0 is not set
# CONFIG_ARCH_ORION5X is not set
# CONFIG_ARCH_MMP is not set
# CONFIG_ARCH_KS8695 is not set
# CONFIG_ARCH_NS9XXX is not set
# CONFIG_ARCH_W90X900 is not set
# CONFIG_ARCH_PNX4008 is not set
# CONFIG_ARCH_PXA is not set
CONFIG_ARCH_MSM=y
# CONFIG_ARCH_RPC is not set
# CONFIG_ARCH_SA1100 is not set
# CONFIG_ARCH_S3C2410 is not set
# CONFIG_ARCH_S3C64XX is not set
# CONFIG_ARCH_S5PC1XX is not set
# CONFIG_ARCH_SHARK is not set
# CONFIG_ARCH_LH7A40X is not set
# CONFIG_ARCH_U300 is not set
# CONFIG_ARCH_DAVINCI is not set
# CONFIG_ARCH_OMAP is not set
# CONFIG_ARCH_BCMRING is not set
# CONFIG_ARCH_MSM7X00A is not set
# CONFIG_ARCH_MSM7225 is not set
# CONFIG_ARCH_MSM7227 is not set
# CONFIG_ARCH_MSM7X30 is not set
CONFIG_ARCH_QSD8X50=y
CONFIG_ARCH_MSM_SCORPION=y
CONFIG_MSM_MDP31=y
CONFIG_PERFLOCK=y
CONFIG_PERFLOCK_BOOT_LOCK=y
# CONFIG_PERFLOCK_SCREEN_POLICY is not set
CONFIG_MSM_AMSS_VERSION=3200
# CONFIG_MSM_AMSS_VERSION_6210 is not set
# CONFIG_MSM_AMSS_VERSION_6220 is not set
# CONFIG_MSM_AMSS_VERSION_6225 is not set
# CONFIG_MSM_AMSS_VERSION_6350 is not set
# CONFIG_MSM_AMSS_VERSION_6355 is not set
# CONFIG_MSM_AMSS_VERSION_1355 is not set
# CONFIG_MSM_AMSS_VERSION_4725 is not set
# CONFIG_MSM_AMSS_VERSION_4735 is not set
# CONFIG_MSM_AMSS_VERSION_4410 is not set
CONFIG_MSM_AMSS_VERSION_3200=y
# CONFIG_MSM_AMSS_VERSION_1170 is not set
# CONFIG_MSM_AMSS_VERSION_1200 is not set
CONFIG_MSM_DEBUG_UART_NONE=y
# CONFIG_MSM_DEBUG_UART1 is not set
# CONFIG_MSM_DEBUG_UART2 is not set
# CONFIG_MSM_DEBUG_UART3 is not set

#
# MSM Board Type
#
# CONFIG_MACH_SWORDFISH is not set
# CONFIG_MACH_ORCA is not set
# CONFIG_MACH_MAHIMAHI is not set
CONFIG_MACH_BRAVO=y
# CONFIG_MACH_PASSIONC is not set
# CONFIG_MACH_BRAVOC is not set
# CONFIG_MACH_INCREDIBLE is not set
# CONFIG_MACH_INCREDIBLEC is not set
# CONFIG_MACH_SUPERSONIC is not set
CONFIG_HTC_BATTCHG=y
# CONFIG_HTC_BATTCHG_SMEM is not set
# CONFIG_HTC_PWRSINK is not set
CONFIG_HTC_SLEEP_MODE_GPIO_DUMP=y
# CONFIG_HTC_POWER_COLLAPSE_MAGIC is not set
# CONFIG_SMEM_RPC_SERVER_STATE is not set
CONFIG_BUILD_OMA_DM=y
CONFIG_CACHE_FLUSH_RANGE_LIMIT=0x40000
CONFIG_MSM7X00A_USE_GP_TIMER=y
# CONFIG_MSM7X00A_USE_DG_TIMER is not set
CONFIG_MSM7X00A_SLEEP_MODE_POWER_COLLAPSE_SUSPEND=y
# CONFIG_MSM7X00A_SLEEP_MODE_POWER_COLLAPSE is not set
# CONFIG_MSM7X00A_SLEEP_MODE_APPS_SLEEP is not set
# CONFIG_MSM7X00A_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT is not set
# CONFIG_MSM7X00A_SLEEP_WAIT_FOR_INTERRUPT is not set
CONFIG_MSM7X00A_SLEEP_MODE=0
# CONFIG_MSM7X00A_IDLE_SLEEP_MODE_POWER_COLLAPSE_SUSPEND is not set
CONFIG_MSM7X00A_IDLE_SLEEP_MODE_POWER_COLLAPSE=y
# CONFIG_MSM7X00A_IDLE_SLEEP_MODE_APPS_SLEEP is not set
# CONFIG_MSM7X00A_IDLE_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT is not set
# CONFIG_MSM7X00A_IDLE_SLEEP_WAIT_FOR_INTERRUPT is not set
CONFIG_MSM7X00A_IDLE_SLEEP_MODE=1
CONFIG_MSM7X00A_IDLE_SLEEP_MIN_TIME=20000000
CONFIG_MSM7X00A_IDLE_SPIN_TIME=80000
CONFIG_MSM7X00A_SLEEP_NO_LIMIT=y
# CONFIG_MSM7X00A_SLEEP_LIMITED_SLEEP is not set
# CONFIG_MSM7X00A_SLEEP_NEGATE_SLEEP is not set
CONFIG_MSM7X00A_SLEEP_LIMIT=0
# CONFIG_MSM7X00A_IDLE_SLEEP_NO_LIMIT is not set
# CONFIG_MSM7X00A_IDLE_SLEEP_LIMITED_SLEEP is not set
CONFIG_MSM7X00A_IDLE_SLEEP_NEGATE_SLEEP=y
CONFIG_MSM7X00A_IDLE_SLEEP_LIMIT=2
CONFIG_MSM_IDLE_STATS=y
CONFIG_MSM_IDLE_STATS_FIRST_BUCKET=62500
CONFIG_MSM_IDLE_STATS_BUCKET_SHIFT=2
CONFIG_MSM_IDLE_STATS_BUCKET_COUNT=10
CONFIG_MSM_FIQ_SUPPORT=y
CONFIG_MSM_SERIAL_DEBUGGER=y
# CONFIG_MSM_SERIAL_DEBUGGER_NO_SLEEP is not set
# CONFIG_MSM_SERIAL_DEBUGGER_WAKEUP_IRQ_ALWAYS_ON is not set
# CONFIG_MSM_SERIAL_DEBUGGER_CONSOLE is not set
CONFIG_MSM_SMD=y
CONFIG_MSM_N_WAY_SMD=y
CONFIG_MSM_ONCRPCROUTER=y
CONFIG_MSM_RPCSERVERS=y
# CONFIG_MSM_RMT_STORAGE_SERVER is not set
CONFIG_MSM_DALRPC=y
# CONFIG_MSM_DALRPC_TEST is not set
# CONFIG_MSM_CPU_FREQ_SCREEN is not set
CONFIG_MSM_CPU_FREQ_ONDEMAND_MAX=998400
CONFIG_MSM_CPU_FREQ_ONDEMAND_MIN=245000
# CONFIG_MSM_HW3D is not set
# CONFIG_HTC_ACOUSTIC is not set
CONFIG_HTC_ACOUSTIC_QSD=y
# CONFIG_MSM_QDSP6 is not set
# CONFIG_MSM_CLOCK_CTRL_DEBUG is not set
CONFIG_WIFI_CONTROL_FUNC=y
# CONFIG_WIFI_MEM_PREALLOC is not set
CONFIG_WIFI_NVS_PROC_CREATE=y
# CONFIG_MMC_SUPPORT_EXTERNEL_DRIVER is not set
CONFIG_MMC_BUSCLK_PWRSAVE=y
# CONFIG_VIRTUAL_KPANIC_PARTITION is not set
CONFIG_QSD_AUDIO=y
CONFIG_QSD_HTC_FM=y
CONFIG_ARCH_MSM_FLASHLIGHT=y
CONFIG_MICROP_COMMON=y
CONFIG_HTC_HEADSET_MGR=y
# CONFIG_HTC_HEADSET_H2W is not set
CONFIG_HTC_HEADSET_GPIO=y
CONFIG_HTC_HEADSET_MICROP=y
# CONFIG_HTC_HEADSET_PMIC is not set
CONFIG_HTC_ONMODE_CHARGING=y
# CONFIG_BUILD_CIQ is not set
CONFIG_SMD_OFFSET_TCXO_STAT=0xFC2A0
# CONFIG_AXI_SCREEN_POLICY is not set
# CONFIG_MSM_NPA is not set

#
# Processor Type
#
CONFIG_CPU_32=y
CONFIG_CPU_32v6K=y
CONFIG_CPU_V7=y
CONFIG_CPU_32v7=y
CONFIG_CPU_ABRT_EV7=y
CONFIG_CPU_PABRT_V7=y
CONFIG_CPU_CACHE_V7=y
CONFIG_CPU_CACHE_VIPT=y
CONFIG_CPU_COPY_V6=y
CONFIG_CPU_TLB_V7=y
CONFIG_VERIFY_PERMISSION_FAULT=y
CONFIG_CPU_HAS_ASID=y
CONFIG_CPU_CP15=y
CONFIG_CPU_CP15_MMU=y

#
# Processor Features
#
CONFIG_ARM_THUMB=y
CONFIG_ARM_THUMBEE=y
# CONFIG_CPU_ICACHE_DISABLE is not set
# CONFIG_CPU_DCACHE_DISABLE is not set
# CONFIG_CPU_BPREDICT_DISABLE is not set
CONFIG_HAS_TLS_REG=y
CONFIG_ARM_L1_CACHE_SHIFT=5
# CONFIG_ARM_ERRATA_430973 is not set
# CONFIG_ARM_ERRATA_458693 is not set
# CONFIG_ARM_ERRATA_460075 is not set

#
# Bus support
#
# CONFIG_PCI_SYSCALL is not set
# CONFIG_ARCH_SUPPORTS_MSI is not set
# CONFIG_PCCARD is not set

#
# Kernel Features
#
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
CONFIG_VMSPLIT_3G=y
# CONFIG_VMSPLIT_2G is not set
# CONFIG_VMSPLIT_1G is not set
CONFIG_PAGE_OFFSET=0xC0000000
# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
CONFIG_PREEMPT=y
CONFIG_HZ=100
# CONFIG_THUMB2_KERNEL is not set
CONFIG_AEABI=y
# CONFIG_OABI_COMPAT is not set
# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
CONFIG_HIGHMEM=y
# CONFIG_HIGHPTE is not set
CONFIG_VMALLOC_RESERVE=0x30000000
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y
# CONFIG_DISCONTIGMEM_MANUAL is not set
# CONFIG_SPARSEMEM_MANUAL is not set
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_SPLIT_PTLOCK_CPUS=4
# CONFIG_PHYS_ADDR_T_64BIT is not set
CONFIG_ZONE_DMA_FLAG=0
CONFIG_BOUNCE=y
CONFIG_VIRT_TO_BUS=y
CONFIG_HAVE_MLOCK=y
CONFIG_HAVE_MLOCKED_PAGE_BIT=y
# CONFIG_KSM is not set
CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
CONFIG_ALIGNMENT_TRAP=y
# CONFIG_UACCESS_WITH_MEMCPY is not set

#
# Boot options
#
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
CONFIG_CMDLINE="mem=64M console=ttyMSM,115200n8"
# CONFIG_XIP_KERNEL is not set
# CONFIG_KEXEC is not set

#
# CPU Power Management
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y
# CONFIG_CPU_FREQ_DEBUG is not set
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_STAT_DETAILS=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
# CONFIG_CPU_IDLE is not set

#
# Floating point emulation
#

#
# At least one emulation must be selected
#
CONFIG_VFP=y
CONFIG_VFPv3=y
CONFIG_NEON=y

#
# Userspace binary formats
#
CONFIG_BINFMT_ELF=y
CONFIG_HAVE_AOUT=y
# CONFIG_BINFMT_AOUT is not set
# CONFIG_BINFMT_MISC is not set

#
# Power management options
#
CONFIG_PM=y
# CONFIG_PM_DEBUG is not set
CONFIG_PM_TRACE=y
CONFIG_PM_SLEEP=y
CONFIG_SUSPEND=y
CONFIG_SUSPEND_FREEZER=y
CONFIG_HAS_WAKELOCK=y
CONFIG_HAS_EARLYSUSPEND=y
CONFIG_WAKELOCK=y
CONFIG_WAKELOCK_STAT=y
CONFIG_USER_WAKELOCK=y
CONFIG_EARLYSUSPEND=y
# CONFIG_NO_USER_SPACE_SCREEN_ACCESS_CONTROL is not set
# CONFIG_CONSOLE_EARLYSUSPEND is not set
CONFIG_FB_EARLYSUSPEND=y
# CONFIG_APM_EMULATION is not set
# CONFIG_PM_RUNTIME is not set
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_NET=y

#
# Networking options
#
CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not set
CONFIG_UNIX=y
CONFIG_XFRM=y
# CONFIG_XFRM_USER is not set
# CONFIG_XFRM_SUB_POLICY is not set
# CONFIG_XFRM_MIGRATE is not set
# CONFIG_XFRM_STATISTICS is not set
CONFIG_XFRM_IPCOMP=y
CONFIG_NET_KEY=y
# CONFIG_NET_KEY_MIGRATE is not set
CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_ASK_IP_FIB_HASH=y
# CONFIG_IP_FIB_TRIE is not set
CONFIG_IP_FIB_HASH=y
CONFIG_IP_MULTIPLE_TABLES=y
# CONFIG_IP_ROUTE_MULTIPATH is not set
CONFIG_IP_ROUTE_VERBOSE=y
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_ARPD is not set
# CONFIG_SYN_COOKIES is not set
# CONFIG_INET_AH is not set
CONFIG_INET_ESP=y
# CONFIG_INET_IPCOMP is not set
# CONFIG_INET_XFRM_TUNNEL is not set
CONFIG_INET_TUNNEL=y
CONFIG_INET_XFRM_MODE_TRANSPORT=y
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_BEET is not set
# CONFIG_INET_LRO is not set
CONFIG_INET_DIAG=y
CONFIG_INET_TCP_DIAG=y
# CONFIG_TCP_CONG_ADVANCED is not set
CONFIG_TCP_CONG_CUBIC=y
CONFIG_DEFAULT_TCP_CONG="cubic"
# CONFIG_TCP_MD5SIG is not set
CONFIG_IPV6=y
CONFIG_IPV6_PRIVACY=y
CONFIG_IPV6_ROUTER_PREF=y
CONFIG_IPV6_ROUTE_INFO=y
CONFIG_IPV6_OPTIMISTIC_DAD=y
CONFIG_INET6_AH=y
CONFIG_INET6_ESP=y
CONFIG_INET6_IPCOMP=y
CONFIG_IPV6_MIP6=y
CONFIG_INET6_XFRM_TUNNEL=y
CONFIG_INET6_TUNNEL=y
CONFIG_INET6_XFRM_MODE_TRANSPORT=y
CONFIG_INET6_XFRM_MODE_TUNNEL=y
CONFIG_INET6_XFRM_MODE_BEET=y
CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=y
CONFIG_IPV6_SIT=y
CONFIG_IPV6_NDISC_NODETYPE=y
CONFIG_IPV6_TUNNEL=y
CONFIG_IPV6_MULTIPLE_TABLES=y
CONFIG_IPV6_SUBTREES=y
CONFIG_IPV6_MROUTE=y
CONFIG_IPV6_PIMSM_V2=y
CONFIG_ANDROID_PARANOID_NETWORK=y
# CONFIG_NETWORK_SECMARK is not set
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
CONFIG_NETFILTER_ADVANCED=y

#
# Core Netfilter Configuration
#
CONFIG_NETFILTER_NETLINK=y
CONFIG_NETFILTER_NETLINK_QUEUE=y
CONFIG_NETFILTER_NETLINK_LOG=y
CONFIG_NF_CONNTRACK=y
CONFIG_NF_CT_ACCT=y
CONFIG_NF_CONNTRACK_MARK=y
CONFIG_NF_CONNTRACK_EVENTS=y
CONFIG_NF_CT_PROTO_DCCP=y
CONFIG_NF_CT_PROTO_GRE=y
CONFIG_NF_CT_PROTO_SCTP=y
CONFIG_NF_CT_PROTO_UDPLITE=y
CONFIG_NF_CONNTRACK_AMANDA=y
CONFIG_NF_CONNTRACK_FTP=y
CONFIG_NF_CONNTRACK_H323=y
CONFIG_NF_CONNTRACK_IRC=y
CONFIG_NF_CONNTRACK_NETBIOS_NS=y
CONFIG_NF_CONNTRACK_PPTP=y
CONFIG_NF_CONNTRACK_SANE=y
CONFIG_NF_CONNTRACK_SIP=y
CONFIG_NF_CONNTRACK_TFTP=y
CONFIG_NF_CT_NETLINK=y
CONFIG_NETFILTER_XTABLES=y
CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y
CONFIG_NETFILTER_XT_TARGET_CONNMARK=y
# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
CONFIG_NETFILTER_XT_TARGET_HL=y
CONFIG_NETFILTER_XT_TARGET_LED=y
CONFIG_NETFILTER_XT_TARGET_MARK=y
# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y
# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set
# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set
# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set
# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set
CONFIG_NETFILTER_XT_MATCH_COMMENT=y
CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y
CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=y
CONFIG_NETFILTER_XT_MATCH_CONNMARK=y
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y
# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
# CONFIG_NETFILTER_XT_MATCH_ESP is not set
CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=y
CONFIG_NETFILTER_XT_MATCH_HELPER=y
CONFIG_NETFILTER_XT_MATCH_HL=y
CONFIG_NETFILTER_XT_MATCH_IPRANGE=y
CONFIG_NETFILTER_XT_MATCH_LENGTH=y
CONFIG_NETFILTER_XT_MATCH_LIMIT=y
CONFIG_NETFILTER_XT_MATCH_MAC=y
CONFIG_NETFILTER_XT_MATCH_MARK=y
# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
CONFIG_NETFILTER_XT_MATCH_OWNER=y
CONFIG_NETFILTER_XT_MATCH_POLICY=y
CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y
CONFIG_NETFILTER_XT_MATCH_QUOTA=y
# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set
# CONFIG_NETFILTER_XT_MATCH_REALM is not set
# CONFIG_NETFILTER_XT_MATCH_RECENT is not set
# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
CONFIG_NETFILTER_XT_MATCH_STATE=y
CONFIG_NETFILTER_XT_MATCH_STATISTIC=y
CONFIG_NETFILTER_XT_MATCH_STRING=y
# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
CONFIG_NETFILTER_XT_MATCH_TIME=y
CONFIG_NETFILTER_XT_MATCH_U32=y
# CONFIG_NETFILTER_XT_MATCH_OSF is not set
# CONFIG_IP_VS is not set

#
# IP: Netfilter Configuration
#
CONFIG_NF_DEFRAG_IPV4=y
CONFIG_NF_CONNTRACK_IPV4=y
CONFIG_NF_CONNTRACK_PROC_COMPAT=y
# CONFIG_IP_NF_QUEUE is not set
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_MATCH_ADDRTYPE=y
CONFIG_IP_NF_MATCH_AH=y
CONFIG_IP_NF_MATCH_ECN=y
CONFIG_IP_NF_MATCH_TTL=y
CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_TARGET_REJECT=y
CONFIG_IP_NF_TARGET_LOG=y
# CONFIG_IP_NF_TARGET_ULOG is not set
CONFIG_NF_NAT=y
CONFIG_NF_NAT_NEEDED=y
CONFIG_IP_NF_TARGET_MASQUERADE=y
CONFIG_IP_NF_TARGET_NETMAP=y
CONFIG_IP_NF_TARGET_REDIRECT=y
# CONFIG_NF_NAT_SNMP_BASIC is not set
CONFIG_NF_NAT_PROTO_DCCP=y
CONFIG_NF_NAT_PROTO_GRE=y
CONFIG_NF_NAT_PROTO_UDPLITE=y
CONFIG_NF_NAT_PROTO_SCTP=y
CONFIG_NF_NAT_FTP=y
CONFIG_NF_NAT_IRC=y
CONFIG_NF_NAT_TFTP=y
CONFIG_NF_NAT_AMANDA=y
CONFIG_NF_NAT_PPTP=y
CONFIG_NF_NAT_H323=y
CONFIG_NF_NAT_SIP=y
# CONFIG_IP_NF_MANGLE is not set
# CONFIG_IP_NF_TARGET_TTL is not set
# CONFIG_IP_NF_RAW is not set
CONFIG_IP_NF_ARPTABLES=y
CONFIG_IP_NF_ARPFILTER=y
CONFIG_IP_NF_ARP_MANGLE=y

#
# IPv6: Netfilter Configuration
#
CONFIG_NF_CONNTRACK_IPV6=y
CONFIG_IP6_NF_QUEUE=y
CONFIG_IP6_NF_IPTABLES=y
CONFIG_IP6_NF_MATCH_AH=y
CONFIG_IP6_NF_MATCH_EUI64=y
CONFIG_IP6_NF_MATCH_FRAG=y
CONFIG_IP6_NF_MATCH_OPTS=y
CONFIG_IP6_NF_MATCH_HL=y
CONFIG_IP6_NF_MATCH_IPV6HEADER=y
CONFIG_IP6_NF_MATCH_MH=y
CONFIG_IP6_NF_MATCH_RT=y
CONFIG_IP6_NF_TARGET_HL=y
CONFIG_IP6_NF_TARGET_LOG=y
CONFIG_IP6_NF_FILTER=y
CONFIG_IP6_NF_TARGET_REJECT=y
CONFIG_IP6_NF_MANGLE=y
CONFIG_IP6_NF_RAW=y
# CONFIG_IP_DCCP is not set
# CONFIG_IP_SCTP is not set
# CONFIG_RDS is not set
# CONFIG_TIPC is not set
# CONFIG_ATM is not set
# CONFIG_BRIDGE is not set
# CONFIG_NET_DSA is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_PHONET is not set
# CONFIG_IEEE802154 is not set
CONFIG_NET_SCHED=y

#
# Queueing/Scheduling
#
# CONFIG_NET_SCH_CBQ is not set
CONFIG_NET_SCH_HTB=y
# CONFIG_NET_SCH_HFSC is not set
# CONFIG_NET_SCH_PRIO is not set
# CONFIG_NET_SCH_MULTIQ is not set
# CONFIG_NET_SCH_RED is not set
# CONFIG_NET_SCH_SFQ is not set
# CONFIG_NET_SCH_TEQL is not set
# CONFIG_NET_SCH_TBF is not set
# CONFIG_NET_SCH_GRED is not set
# CONFIG_NET_SCH_DSMARK is not set
# CONFIG_NET_SCH_NETEM is not set
# CONFIG_NET_SCH_DRR is not set
CONFIG_NET_SCH_INGRESS=y

#
# Classification
#
CONFIG_NET_CLS=y
# CONFIG_NET_CLS_BASIC is not set
# CONFIG_NET_CLS_TCINDEX is not set
# CONFIG_NET_CLS_ROUTE4 is not set
# CONFIG_NET_CLS_FW is not set
CONFIG_NET_CLS_U32=y
# CONFIG_CLS_U32_PERF is not set
# CONFIG_CLS_U32_MARK is not set
# CONFIG_NET_CLS_RSVP is not set
# CONFIG_NET_CLS_RSVP6 is not set
# CONFIG_NET_CLS_FLOW is not set
# CONFIG_NET_CLS_CGROUP is not set
CONFIG_NET_EMATCH=y
CONFIG_NET_EMATCH_STACK=32
# CONFIG_NET_EMATCH_CMP is not set
# CONFIG_NET_EMATCH_NBYTE is not set
CONFIG_NET_EMATCH_U32=y
# CONFIG_NET_EMATCH_META is not set
# CONFIG_NET_EMATCH_TEXT is not set
CONFIG_NET_CLS_ACT=y
CONFIG_NET_ACT_POLICE=y
CONFIG_NET_ACT_GACT=y
# CONFIG_GACT_PROB is not set
CONFIG_NET_ACT_MIRRED=y
# CONFIG_NET_ACT_IPT is not set
# CONFIG_NET_ACT_NAT is not set
# CONFIG_NET_ACT_PEDIT is not set
# CONFIG_NET_ACT_SIMP is not set
# CONFIG_NET_ACT_SKBEDIT is not set
# CONFIG_NET_CLS_IND is not set
CONFIG_NET_SCH_FIFO=y
# CONFIG_DCB is not set

#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_HAMRADIO is not set
# CONFIG_CAN is not set
# CONFIG_IRDA is not set
CONFIG_BT=y
CONFIG_BT_L2CAP=y
CONFIG_BT_SCO=y
CONFIG_BT_RFCOMM=y
CONFIG_BT_RFCOMM_TTY=y
CONFIG_BT_BNEP=y
# CONFIG_BT_BNEP_MC_FILTER is not set
# CONFIG_BT_BNEP_PROTO_FILTER is not set
CONFIG_BT_HIDP=y

#
# Bluetooth device drivers
#
# CONFIG_BT_HCIBTSDIO is not set
CONFIG_BT_HCIUART=y
CONFIG_BT_HCIUART_H4=y
# CONFIG_BT_HCIUART_BCSP is not set
CONFIG_BT_HCIUART_LL=y
# CONFIG_BT_HCIVHCI is not set
# CONFIG_BT_MRVL is not set
# CONFIG_AF_RXRPC is not set
CONFIG_FIB_RULES=y
CONFIG_WIRELESS=y
# CONFIG_CFG80211 is not set
CONFIG_CFG80211_DEFAULT_PS_VALUE=0
CONFIG_WIRELESS_OLD_REGULATORY=y
CONFIG_WIRELESS_EXT=y
CONFIG_WIRELESS_EXT_SYSFS=y
# CONFIG_LIB80211 is not set

#
# CFG80211 needs to be enabled for MAC80211
#
# CONFIG_WIMAX is not set
CONFIG_RFKILL=y
# CONFIG_RFKILL_PM is not set
CONFIG_RFKILL_LEDS=y
# CONFIG_RFKILL_INPUT is not set
# CONFIG_NET_9P is not set

#
# Device Drivers
#

#
# Generic Driver Options
#
CONFIG_UEVENT_HELPER_PATH=""
# CONFIG_DEVTMPFS is not set
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
# CONFIG_FIRMWARE_IN_KERNEL is not set
CONFIG_EXTRA_FIRMWARE=""
# CONFIG_DEBUG_DRIVER is not set
# CONFIG_DEBUG_DEVRES is not set
# CONFIG_SYS_HYPERVISOR is not set
# CONFIG_CONNECTOR is not set
CONFIG_MTD=y
# CONFIG_MTD_DEBUG is not set
# CONFIG_MTD_TESTS is not set
# CONFIG_MTD_CONCAT is not set
CONFIG_MTD_PARTITIONS=y
# CONFIG_MTD_REDBOOT_PARTS is not set
CONFIG_MTD_CMDLINE_PARTS=y
# CONFIG_MTD_AFS_PARTS is not set
# CONFIG_MTD_AR7_PARTS is not set

#
# User Modules And Translation Layers
#
CONFIG_MTD_CHAR=y
CONFIG_MTD_BLKDEVS=y
CONFIG_MTD_BLOCK=y
# CONFIG_FTL is not set
# CONFIG_NFTL is not set
# CONFIG_INFTL is not set
# CONFIG_RFD_FTL is not set
# CONFIG_SSFDC is not set
# CONFIG_MTD_OOPS is not set

#
# RAM/ROM/Flash chip drivers
#
# CONFIG_MTD_CFI is not set
# CONFIG_MTD_JEDECPROBE is not set
CONFIG_MTD_MAP_BANK_WIDTH_1=y
CONFIG_MTD_MAP_BANK_WIDTH_2=y
CONFIG_MTD_MAP_BANK_WIDTH_4=y
# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
CONFIG_MTD_CFI_I1=y
CONFIG_MTD_CFI_I2=y
# CONFIG_MTD_CFI_I4 is not set
# CONFIG_MTD_CFI_I8 is not set
# CONFIG_MTD_RAM is not set
# CONFIG_MTD_ROM is not set
# CONFIG_MTD_ABSENT is not set

#
# Mapping drivers for chip access
#
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
# CONFIG_MTD_PLATRAM is not set

#
# Self-contained MTD device drivers
#
CONFIG_MTD_MSM_NAND=y
# CONFIG_MTD_DATAFLASH is not set
# CONFIG_MTD_M25P80 is not set
# CONFIG_MTD_SST25L is not set
# CONFIG_MTD_SLRAM is not set
# CONFIG_MTD_PHRAM is not set
# CONFIG_MTD_MTDRAM is not set
# CONFIG_MTD_BLOCK2MTD is not set

#
# Disk-On-Chip Device Drivers
#
# CONFIG_MTD_DOC2000 is not set
# CONFIG_MTD_DOC2001 is not set
# CONFIG_MTD_DOC2001PLUS is not set
CONFIG_MTD_NAND_IDS=y
# CONFIG_MTD_NAND is not set
# CONFIG_MTD_ONENAND is not set

#
# LPDDR flash memory drivers
#
# CONFIG_MTD_LPDDR is not set

#
# UBI - Unsorted block images
#
# CONFIG_MTD_UBI is not set
# CONFIG_PARPORT is not set
CONFIG_BLK_DEV=y
# CONFIG_BLK_DEV_COW_COMMON is not set
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_RAM is not set
# CONFIG_CDROM_PKTCDVD is not set
# CONFIG_ATA_OVER_ETH is not set
# CONFIG_MG_DISK is not set
CONFIG_MISC_DEVICES=y
CONFIG_ANDROID_PMEM=y
# CONFIG_ICS932S401 is not set
# CONFIG_ENCLOSURE_SERVICES is not set
CONFIG_KERNEL_DEBUGGER_CORE=y
# CONFIG_ISL29003 is not set
CONFIG_UID_STAT=y
# CONFIG_WL127X_RFKILL is not set
# CONFIG_APANIC is not set
CONFIG_SENSORS_BMA150_SPI=y
# CONFIG_C2PORT is not set

#
# EEPROM support
#
# CONFIG_EEPROM_AT24 is not set
# CONFIG_EEPROM_AT25 is not set
# CONFIG_EEPROM_LEGACY is not set
# CONFIG_EEPROM_MAX6875 is not set
# CONFIG_EEPROM_93CX6 is not set
CONFIG_HAVE_IDE=y
# CONFIG_IDE is not set

#
# SCSI device support
#
# CONFIG_RAID_ATTRS is not set
# CONFIG_SCSI is not set
# CONFIG_SCSI_DMA is not set
# CONFIG_SCSI_NETLINK is not set
# CONFIG_ATA is not set
CONFIG_MD=y
# CONFIG_BLK_DEV_MD is not set
CONFIG_BLK_DEV_DM=y
CONFIG_DM_DEBUG=y
CONFIG_DM_CRYPT=y
# CONFIG_DM_SNAPSHOT is not set
# CONFIG_DM_MIRROR is not set
# CONFIG_DM_ZERO is not set
# CONFIG_DM_MULTIPATH is not set
# CONFIG_DM_DELAY is not set
CONFIG_DM_UEVENT=y
CONFIG_NETDEVICES=y
# CONFIG_IFB is not set
CONFIG_DUMMY=y
# CONFIG_BONDING is not set
# CONFIG_MACVLAN is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set
# CONFIG_VETH is not set
# CONFIG_PHYLIB is not set
CONFIG_NET_ETHERNET=y
CONFIG_MII=y
# CONFIG_AX88796 is not set
CONFIG_SMC91X=y
# CONFIG_DM9000 is not set
# CONFIG_ENC28J60 is not set
# CONFIG_ETHOC is not set
# CONFIG_SMC911X is not set
# CONFIG_SMSC911X is not set
# CONFIG_DNET is not set
# CONFIG_IBM_NEW_EMAC_ZMII is not set
# CONFIG_IBM_NEW_EMAC_RGMII is not set
# CONFIG_IBM_NEW_EMAC_TAH is not set
# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
# CONFIG_B44 is not set
# CONFIG_KS8842 is not set
# CONFIG_KS8851 is not set
# CONFIG_KS8851_MLL is not set
CONFIG_NETDEV_1000=y
CONFIG_NETDEV_10000=y
CONFIG_WLAN=y
# CONFIG_WLAN_PRE80211 is not set
# CONFIG_WLAN_80211 is not set
CONFIG_BCM4329=m
CONFIG_BCM4329_SOFTAP=y
CONFIG_BCM4329_FW_PATH="/system/etc/firmware/fw_bcm4329.bin"
CONFIG_BCM4329_NVRAM_PATH="/proc/calibration"

#
# Enable WiMAX (Networking options) to see the WiMAX drivers
#
# CONFIG_WAN is not set
CONFIG_PPP=y
# CONFIG_PPP_MULTILINK is not set
# CONFIG_PPP_FILTER is not set
CONFIG_PPP_ASYNC=y
# CONFIG_PPP_SYNC_TTY is not set
CONFIG_PPP_DEFLATE=y
CONFIG_PPP_BSDCOMP=y
CONFIG_PPP_MPPE=y
# CONFIG_PPPOE is not set
# CONFIG_PPPOL2TP is not set
CONFIG_PPPOLAC=y
CONFIG_PPPOPNS=y
# CONFIG_SLIP is not set
CONFIG_SLHC=y
# CONFIG_NETCONSOLE is not set
CONFIG_MSM_RMNET=y
# CONFIG_MSM_RMNET_DEBUG is not set
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
# CONFIG_KINETO_GAN is not set
# CONFIG_ISDN is not set
# CONFIG_PHONE is not set

#
# Input device support
#
CONFIG_INPUT=y
# CONFIG_INPUT_FF_MEMLESS is not set
# CONFIG_INPUT_POLLDEV is not set

#
# Userland interfaces
#
# CONFIG_INPUT_MOUSEDEV is not set
# CONFIG_INPUT_JOYDEV is not set
CONFIG_INPUT_EVDEV=y
# CONFIG_INPUT_EVBUG is not set
CONFIG_INPUT_KEYRESET=y

#
# Input Device Drivers
#
# CONFIG_INPUT_KEYBOARD is not set
# CONFIG_INPUT_MOUSE is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TABLET is not set
CONFIG_INPUT_TOUCHSCREEN=y
# CONFIG_TOUCHSCREEN_ATMEL is not set
# CONFIG_TOUCHSCREEN_ADS7846 is not set
# CONFIG_TOUCHSCREEN_AD7877 is not set
# CONFIG_TOUCHSCREEN_AD7879_I2C is not set
# CONFIG_TOUCHSCREEN_AD7879_SPI is not set
# CONFIG_TOUCHSCREEN_AD7879 is not set
# CONFIG_TOUCHSCREEN_CYPRESS_TMG is not set
# CONFIG_TOUCHSCREEN_EETI is not set
# CONFIG_TOUCHSCREEN_FUJITSU is not set
# CONFIG_TOUCHSCREEN_GUNZE is not set
# CONFIG_TOUCHSCREEN_ELAN_I2C_8232 is not set
# CONFIG_TOUCHSCREEN_ELO is not set
# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
# CONFIG_TOUCHSCREEN_MCS5000 is not set
# CONFIG_TOUCHSCREEN_MTOUCH is not set
# CONFIG_TOUCHSCREEN_INEXIO is not set
# CONFIG_TOUCHSCREEN_MK712 is not set
# CONFIG_TOUCHSCREEN_PENMOUNT is not set
# CONFIG_TOUCHSCREEN_MSM is not set
CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI=y
# CONFIG_TOUCHSCREEN_COMPATIBLE_REPORT is not set
CONFIG_TOUCHSCREEN_CONCATENATE_REPORT=y
CONFIG_TOUCHSCREEN_DUPLICATED_FILTER=y
# CONFIG_TOUCHSCREEN_SYNAPTICS_T1021 is not set
# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
# CONFIG_TOUCHSCREEN_TSC2007 is not set
CONFIG_INPUT_MISC=y
# CONFIG_INPUT_ATI_REMOTE is not set
# CONFIG_INPUT_ATI_REMOTE2 is not set
CONFIG_INPUT_KEYCHORD=y
# CONFIG_INPUT_KEYSPAN_REMOTE is not set
# CONFIG_INPUT_POWERMATE is not set
# CONFIG_INPUT_YEALINK is not set
# CONFIG_INPUT_CM109 is not set
CONFIG_INPUT_UINPUT=y
CONFIG_INPUT_GPIO=y
# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set
CONFIG_LIGHTSENSOR_MICROP=y
CONFIG_INPUT_CAPELLA_CM3602=y
# CONFIG_LIGHTSENSOR_SMD is not set
CONFIG_INPUT_DUMMY_KEYPAD=y
CONFIG_INPUT_OPTICALJOYSTICK=y
CONFIG_OPTICALJOYSTICK_CRUCIAL=y
CONFIG_OPTICALJOYSTICK_CRUCIAL_uP=y
# CONFIG_OPTICALJOYSTICK_CRUCIAL_SPI is not set

#
# Hardware I/O ports
#
# CONFIG_SERIO is not set
# CONFIG_GAMEPORT is not set

#
# Character devices
#
# CONFIG_VT is not set
# CONFIG_DEVMEM is not set
# CONFIG_DEVKMEM is not set
# CONFIG_SERIAL_NONSTANDARD is not set

#
# Serial drivers
#
# CONFIG_SERIAL_8250 is not set

#
# Non-8250 serial port support
#
# CONFIG_SERIAL_MAX3100 is not set
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_MSM=y
# CONFIG_SERIAL_MSM_CONSOLE is not set
# CONFIG_SERIAL_MSM_CLOCK_CONTROL is not set
CONFIG_SERIAL_MSM_HS=y
# CONFIG_SERIAL_MSM_HS_PURE_ANDROID is not set
# CONFIG_SERIAL_BCM_BT_LPM is not set
CONFIG_UNIX98_PTYS=y
# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
# CONFIG_LEGACY_PTYS is not set
# CONFIG_IPMI_HANDLER is not set
# CONFIG_HW_RANDOM is not set
# CONFIG_R3964 is not set
# CONFIG_RAW_DRIVER is not set
# CONFIG_TCG_TPM is not set
# CONFIG_DCC_TTY is not set
CONFIG_I2C=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_COMPAT=y
# CONFIG_I2C_CHARDEV is not set
CONFIG_I2C_HELPER_AUTO=y

#
# I2C Hardware Bus support
#

#
# I2C system bus drivers (mostly embedded / system-on-chip)
#
# CONFIG_I2C_GPIO is not set
CONFIG_I2C_MSM=y
# CONFIG_I2C_OCORES is not set
# CONFIG_I2C_SIMTEC is not set

#
# External I2C/SMBus adapter drivers
#
# CONFIG_I2C_PARPORT_LIGHT is not set
# CONFIG_I2C_TAOS_EVM is not set

#
# Other I2C/SMBus bus drivers
#
# CONFIG_I2C_PCA_PLATFORM is not set
# CONFIG_I2C_STUB is not set

#
# Miscellaneous I2C Chip support
#
# CONFIG_DS1682 is not set
# CONFIG_SENSORS_TSL2550 is not set
# CONFIG_SENSORS_AKM8976 is not set
CONFIG_SENSORS_AKM8973=y
# CONFIG_SENSORS_AKM8975 is not set
# CONFIG_TPS65200 is not set
# CONFIG_SENSORS_BMA150 is not set
# CONFIG_SENSORS_PCA963X is not set
# CONFIG_SENSORS_MT9T013 is not set
CONFIG_VP_A1026=y
CONFIG_AMP_TPA6130A=y
CONFIG_AMP_TPA2018D1=y
# CONFIG_AMP_TPA2051D3 is not set
# CONFIG_INPUT_ISL29028 is not set
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
# CONFIG_I2C_DEBUG_CHIP is not set
CONFIG_SPI=y
# CONFIG_SPI_DEBUG is not set
CONFIG_SPI_MASTER=y

#
# SPI Master Controller Drivers
#
# CONFIG_SPI_BITBANG is not set
# CONFIG_SPI_GPIO is not set
CONFIG_SPI_QSD=y
# CONFIG_SPI_QSD_NEW is not set

#
# SPI Protocol Masters
#
# CONFIG_SPI_SPIDEV is not set
# CONFIG_SPI_TLE62X0 is not set

#
# PPS support
#
# CONFIG_PPS is not set
CONFIG_ARCH_REQUIRE_GPIOLIB=y
CONFIG_GPIOLIB=y
# CONFIG_DEBUG_GPIO is not set
# CONFIG_GPIO_SYSFS is not set

#
# Memory mapped GPIO expanders:
#

#
# I2C GPIO expanders:
#
# CONFIG_GPIO_MAX732X is not set
# CONFIG_GPIO_PCA953X is not set
# CONFIG_GPIO_PCF857X is not set

#
# PCI GPIO expanders:
#

#
# SPI GPIO expanders:
#
# CONFIG_GPIO_MAX7301 is not set
# CONFIG_GPIO_MCP23S08 is not set
# CONFIG_GPIO_MC33880 is not set

#
# AC97 GPIO expanders:
#
CONFIG_W1=y

#
# 1-wire Bus Masters
#
CONFIG_W1_MASTER_DS2482=y
# CONFIG_W1_MASTER_GPIO is not set

#
# 1-wire Slaves
#
# CONFIG_W1_SLAVE_THERM is not set
# CONFIG_W1_SLAVE_SMEM is not set
# CONFIG_W1_SLAVE_DS2431 is not set
# CONFIG_W1_SLAVE_DS2433 is not set
# CONFIG_W1_SLAVE_DS2760 is not set
CONFIG_W1_SLAVE_DS2784=y
# CONFIG_W1_SLAVE_BQ27000 is not set
CONFIG_POWER_SUPPLY=y
# CONFIG_POWER_SUPPLY_DEBUG is not set
# CONFIG_PDA_POWER is not set
# CONFIG_BATTERY_DS2760 is not set
# CONFIG_BATTERY_DS2782 is not set
CONFIG_BATTERY_DS2784=y
# CONFIG_BATTERY_DS2746 is not set
# CONFIG_BATTERY_BQ27x00 is not set
# CONFIG_BATTERY_MAX17040 is not set
# CONFIG_HWMON is not set
# CONFIG_THERMAL is not set
# CONFIG_WATCHDOG is not set
CONFIG_SSB_POSSIBLE=y

#
# Sonics Silicon Backplane
#
# CONFIG_SSB is not set

#
# Multifunction device drivers
#
# CONFIG_MFD_CORE is not set
# CONFIG_MFD_SM501 is not set
# CONFIG_MFD_ASIC3 is not set
# CONFIG_HTC_EGPIO is not set
# CONFIG_HTC_PASIC3 is not set
# CONFIG_TPS65010 is not set
# CONFIG_TWL4030_CORE is not set
# CONFIG_MFD_TMIO is not set
# CONFIG_MFD_TC6393XB is not set
# CONFIG_PMIC_DA903X is not set
# CONFIG_MFD_WM8400 is not set
# CONFIG_MFD_WM831X is not set
# CONFIG_MFD_WM8350_I2C is not set
# CONFIG_MFD_PCF50633 is not set
# CONFIG_MFD_MC13783 is not set
# CONFIG_AB3100_CORE is not set
# CONFIG_EZX_PCAP is not set
CONFIG_REGULATOR=y
CONFIG_REGULATOR_DEBUG=y
# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
# CONFIG_REGULATOR_BQ24022 is not set
# CONFIG_REGULATOR_MAX1586 is not set
# CONFIG_REGULATOR_LP3971 is not set
CONFIG_REGULATOR_TPS65023=y
# CONFIG_REGULATOR_TPS6507X is not set
CONFIG_MEDIA_SUPPORT=y

#
# Multimedia core support
#
CONFIG_VIDEO_DEV=m
CONFIG_VIDEO_V4L2_COMMON=m
CONFIG_VIDEO_ALLOW_V4L1=y
CONFIG_VIDEO_V4L1_COMPAT=y
# CONFIG_DVB_CORE is not set
CONFIG_VIDEO_MEDIA=m

#
# Multimedia drivers
#
# CONFIG_MEDIA_ATTACH is not set
CONFIG_MEDIA_TUNER=m
# CONFIG_MEDIA_TUNER_CUSTOMISE is not set
CONFIG_MEDIA_TUNER_SIMPLE=m
CONFIG_MEDIA_TUNER_TDA8290=m
CONFIG_MEDIA_TUNER_TDA9887=m
CONFIG_MEDIA_TUNER_TEA5761=m
CONFIG_MEDIA_TUNER_TEA5767=m
CONFIG_MEDIA_TUNER_MT20XX=m
CONFIG_MEDIA_TUNER_XC2028=m
CONFIG_MEDIA_TUNER_XC5000=m
CONFIG_MEDIA_TUNER_MC44S803=m
CONFIG_VIDEO_V4L2=m
CONFIG_VIDEO_V4L1=m
CONFIG_VIDEO_CAPTURE_DRIVERS=y
# CONFIG_VIDEO_ADV_DEBUG is not set
# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
# CONFIG_VIDEO_VIVI is not set
# CONFIG_VIDEO_CPIA is not set
# CONFIG_VIDEO_SAA5246A is not set
# CONFIG_VIDEO_SAA5249 is not set
# CONFIG_SOC_CAMERA is not set

#
# Qualcomm MSM Camera And Video
#
CONFIG_MSM_CAMERA=y
CONFIG_MSM_CAMERA_LEGACY=y
# CONFIG_MSM_CAMERA_7X30 is not set
CONFIG_720P_CAMERA=y
# CONFIG_MSM_CAMERA_DEBUG is not set

#
# Camera Sensor Selection
#
# CONFIG_MT9T013 is not set
# CONFIG_MT9D112 is not set
# CONFIG_MT9P012 is not set
CONFIG_S5K3E2FX=y
# CONFIG_S5K4E1GX is not set
# CONFIG_OV8810 is not set
# CONFIG_OV9665 is not set
# CONFIG_S5K3H1GX is not set
# CONFIG_MT9V113 is not set
CONFIG_RADIO_ADAPTERS=y
# CONFIG_I2C_SI4713 is not set
# CONFIG_RADIO_SI4713 is not set
# CONFIG_RADIO_SI470X is not set
# CONFIG_RADIO_TEA5764 is not set
# CONFIG_DAB is not set

#
# Graphics support
#
# CONFIG_VGASTATE is not set
CONFIG_VIDEO_OUTPUT_CONTROL=y
CONFIG_FB=y
# CONFIG_FIRMWARE_EDID is not set
# CONFIG_FB_DDC is not set
# CONFIG_FB_BOOT_VESA_SUPPORT is not set
CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_COPYAREA=y
CONFIG_FB_CFB_IMAGEBLIT=y
# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
# CONFIG_FB_SYS_FILLRECT is not set
# CONFIG_FB_SYS_COPYAREA is not set
# CONFIG_FB_SYS_IMAGEBLIT is not set
# CONFIG_FB_FOREIGN_ENDIAN is not set
# CONFIG_FB_SYS_FOPS is not set
# CONFIG_FB_SVGALIB is not set
# CONFIG_FB_MACMODES is not set
# CONFIG_FB_BACKLIGHT is not set
# CONFIG_FB_MODE_HELPERS is not set
# CONFIG_FB_TILEBLITTING is not set

#
# Frame buffer hardware drivers
#
# CONFIG_FB_S1D13XXX is not set
# CONFIG_FB_VIRTUAL is not set
# CONFIG_FB_METRONOME is not set
# CONFIG_FB_MB862XX is not set
# CONFIG_FB_BROADSHEET is not set
CONFIG_FB_MSM=y
CONFIG_FB_MSM_LCDC=y
# CONFIG_FB_MSM_TVOUT is not set
CONFIG_GPU_MSM_KGSL=y
CONFIG_MSM_KGSL_MMU=y
# CONFIG_MSM_KGSL_PER_FD_PAGETABLE is not set
# CONFIG_MSM_HDMI is not set
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set

#
# Display device support
#
# CONFIG_DISPLAY_SUPPORT is not set
# CONFIG_LOGO is not set
# CONFIG_SOUND is not set
CONFIG_HID_SUPPORT=y
CONFIG_HID=y
# CONFIG_HIDRAW is not set
# CONFIG_HID_PID is not set

#
# Special HID drivers
#
# CONFIG_HID_APPLE is not set
# CONFIG_HID_WACOM is not set
CONFIG_USB_SUPPORT=y
CONFIG_USB_ARCH_HAS_HCD=y
# CONFIG_USB_ARCH_HAS_OHCI is not set
# CONFIG_USB_ARCH_HAS_EHCI is not set
# CONFIG_USB is not set
# CONFIG_USB_OTG_WHITELIST is not set
# CONFIG_USB_OTG_BLACKLIST_HUB is not set
# CONFIG_USB_MUSB_HDRC is not set
# CONFIG_USB_GADGET_MUSB_HDRC is not set

#
# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
#
CONFIG_USB_GADGET=y
# CONFIG_USB_GADGET_DEBUG is not set
# CONFIG_USB_GADGET_DEBUG_FILES is not set
# CONFIG_USB_GADGET_DEBUG_FS is not set
CONFIG_USB_GADGET_VBUS_DRAW=500
CONFIG_USB_GADGET_SELECTED=y
# CONFIG_USB_GADGET_AT91 is not set
# CONFIG_USB_GADGET_ATMEL_USBA is not set
# CONFIG_USB_GADGET_FSL_USB2 is not set
# CONFIG_USB_GADGET_LH7A40X is not set
# CONFIG_USB_GADGET_OMAP is not set
# CONFIG_USB_GADGET_PXA25X is not set
# CONFIG_USB_GADGET_R8A66597 is not set
# CONFIG_USB_GADGET_PXA27X is not set
# CONFIG_USB_GADGET_S3C_HSOTG is not set
# CONFIG_USB_GADGET_IMX is not set
# CONFIG_USB_GADGET_S3C2410 is not set
# CONFIG_USB_GADGET_M66592 is not set
# CONFIG_USB_GADGET_AMD5536UDC is not set
# CONFIG_USB_GADGET_FSL_QE is not set
# CONFIG_USB_GADGET_CI13XXX is not set
# CONFIG_USB_GADGET_NET2280 is not set
# CONFIG_USB_GADGET_GOKU is not set
# CONFIG_USB_GADGET_LANGWELL is not set
CONFIG_USB_GADGET_MSM_72K=y
CONFIG_USB_MSM_72K=y
# CONFIG_USB_GADGET_DUMMY_HCD is not set
CONFIG_USB_GADGET_DUALSPEED=y
# CONFIG_USB_ZERO is not set
# CONFIG_USB_AUDIO is not set
# CONFIG_USB_ETH is not set
# CONFIG_USB_GADGETFS is not set
# CONFIG_USB_FILE_STORAGE is not set
# CONFIG_USB_G_SERIAL is not set
# CONFIG_USB_MIDI_GADGET is not set
# CONFIG_USB_G_PRINTER is not set
CONFIG_USB_ANDROID=y
# CONFIG_USB_ANDROID_ACM is not set
CONFIG_USB_ANDROID_ADB=y
CONFIG_USB_ANDROID_DIAG=y
CONFIG_USB_ANDROID_MASS_STORAGE=y
CONFIG_USB_ANDROID_RNDIS=y
CONFIG_USB_ANDROID_SERIAL=y
CONFIG_USB_ANDROID_PROJECTOR=y
# CONFIG_USB_ANDROID_MTP is not set
# CONFIG_USB_CDC_COMPOSITE is not set
CONFIG_USB_ACCESSORY_DETECT=y
# CONFIG_USB_ACCESSORY_DETECT_BY_ADC is not set

#
# OTG and related infrastructure
#
# CONFIG_USB_GPIO_VBUS is not set
# CONFIG_NOP_USB_XCEIV is not set

#
# USB Function Support
#
# CONFIG_USB_FUNCTION is not set
CONFIG_MMC=y
# CONFIG_MMC_DEBUG is not set
CONFIG_MMC_UNSAFE_RESUME=y
CONFIG_MMC_EMBEDDED_SDIO=y
CONFIG_MMC_PARANOID_SD_INIT=y

#
# MMC/SD/SDIO Card Drivers
#
CONFIG_MMC_BLOCK=y
# CONFIG_MMC_BLOCK_BOUNCE is not set
CONFIG_MMC_BLOCK_PARANOID_RESUME=y
CONFIG_MMC_BLOCK_DEFERRED_RESUME=y
# CONFIG_SDIO_UART is not set
# CONFIG_MMC_TEST is not set

#
# MMC/SD/SDIO Host Controller Drivers
#
# CONFIG_MMC_SDHCI is not set
# CONFIG_MMC_AT91 is not set
# CONFIG_MMC_ATMELMCI is not set
CONFIG_MMC_MSM7X00A=y
# CONFIG_MEMSTICK is not set
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y

#
# LED drivers
#
# CONFIG_LEDS_PCA9532 is not set
CONFIG_LEDS_GPIO=y
CONFIG_LEDS_GPIO_PLATFORM=y
# CONFIG_LEDS_LP3944 is not set
CONFIG_LEDS_CPLD=y
# CONFIG_LEDS_PCA955X is not set
# CONFIG_LEDS_DAC124S085 is not set
# CONFIG_LEDS_BD2802 is not set

#
# LED Triggers
#
CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_TIMER=y
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
# CONFIG_LEDS_TRIGGER_GPIO is not set
# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
CONFIG_LEDS_TRIGGER_SLEEP=y

#
# iptables trigger is under Netfilter config (LED target)
#
CONFIG_SWITCH=y
CONFIG_SWITCH_GPIO=y
# CONFIG_ACCESSIBILITY is not set
CONFIG_RTC_LIB=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_HCTOSYS=y
CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
# CONFIG_RTC_DEBUG is not set

#
# RTC interfaces
#
# CONFIG_RTC_INTF_SYSFS is not set
# CONFIG_RTC_INTF_PROC is not set
# CONFIG_RTC_INTF_DEV is not set
CONFIG_RTC_INTF_ALARM=y
CONFIG_RTC_INTF_ALARM_DEV=y
# CONFIG_RTC_DRV_TEST is not set

#
# I2C RTC drivers
#
# CONFIG_RTC_DRV_DS1307 is not set
# CONFIG_RTC_DRV_DS1374 is not set
# CONFIG_RTC_DRV_DS1672 is not set
# CONFIG_RTC_DRV_MAX6900 is not set
# CONFIG_RTC_DRV_RS5C372 is not set
# CONFIG_RTC_DRV_ISL1208 is not set
# CONFIG_RTC_DRV_X1205 is not set
# CONFIG_RTC_DRV_PCF8563 is not set
# CONFIG_RTC_DRV_PCF8583 is not set
# CONFIG_RTC_DRV_M41T80 is not set
# CONFIG_RTC_DRV_S35390A is not set
# CONFIG_RTC_DRV_FM3130 is not set
# CONFIG_RTC_DRV_RX8581 is not set
# CONFIG_RTC_DRV_RX8025 is not set

#
# SPI RTC drivers
#
# CONFIG_RTC_DRV_M41T94 is not set
# CONFIG_RTC_DRV_DS1305 is not set
# CONFIG_RTC_DRV_DS1390 is not set
# CONFIG_RTC_DRV_MAX6902 is not set
# CONFIG_RTC_DRV_R9701 is not set
# CONFIG_RTC_DRV_RS5C348 is not set
# CONFIG_RTC_DRV_DS3234 is not set
# CONFIG_RTC_DRV_PCF2123 is not set

#
# Platform RTC drivers
#
# CONFIG_RTC_DRV_CMOS is not set
# CONFIG_RTC_DRV_DS1286 is not set
# CONFIG_RTC_DRV_DS1511 is not set
# CONFIG_RTC_DRV_DS1553 is not set
# CONFIG_RTC_DRV_DS1742 is not set
# CONFIG_RTC_DRV_STK17TA8 is not set
# CONFIG_RTC_DRV_M48T86 is not set
# CONFIG_RTC_DRV_M48T35 is not set
# CONFIG_RTC_DRV_M48T59 is not set
# CONFIG_RTC_DRV_BQ4802 is not set
# CONFIG_RTC_DRV_V3020 is not set

#
# on-CPU RTC drivers
#
CONFIG_RTC_DRV_MSM7X00A=y
# CONFIG_DMADEVICES is not set
# CONFIG_AUXDISPLAY is not set
# CONFIG_UIO is not set

#
# TI VLYNQ
#
CONFIG_STAGING=y
# CONFIG_STAGING_EXCLUDE_BUILD is not set
# CONFIG_ECHO is not set

#
# Android
#
CONFIG_ANDROID=y
CONFIG_ANDROID_BINDER_IPC=y
CONFIG_ANDROID_LOGGER=y
CONFIG_ANDROID_RAM_CONSOLE=y
CONFIG_ANDROID_RAM_CONSOLE_ENABLE_VERBOSE=y
CONFIG_ANDROID_RAM_CONSOLE_ERROR_CORRECTION=y
CONFIG_ANDROID_RAM_CONSOLE_ERROR_CORRECTION_DATA_SIZE=128
CONFIG_ANDROID_RAM_CONSOLE_ERROR_CORRECTION_ECC_SIZE=16
CONFIG_ANDROID_RAM_CONSOLE_ERROR_CORRECTION_SYMBOL_SIZE=8
CONFIG_ANDROID_RAM_CONSOLE_ERROR_CORRECTION_POLYNOMIAL=0x11d
# CONFIG_ANDROID_RAM_CONSOLE_EARLY_INIT is not set
CONFIG_ANDROID_TIMED_OUTPUT=y
CONFIG_ANDROID_TIMED_GPIO=y
CONFIG_ANDROID_LOW_MEMORY_KILLER=y

#
# Qualcomm MSM Camera And Video
#
# CONFIG_MSM_CAMERA_FLASH is not set

#
# Camera Sensor Selection
#
# CONFIG_DST is not set
# CONFIG_POHMELFS is not set
# CONFIG_PLAN9AUTH is not set

#
# RAR Register Driver
#
# CONFIG_RAR_REGISTER is not set
# CONFIG_IIO is not set
# CONFIG_BTPORT is not set

#
# File systems
#
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT2_FS_SECURITY=y
# CONFIG_EXT2_FS_XIP is not set
CONFIG_EXT3_FS=y
# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
# CONFIG_EXT4_FS is not set
CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
CONFIG_FS_MBCACHE=y
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
CONFIG_FS_POSIX_ACL=y
# CONFIG_XFS_FS is not set
# CONFIG_GFS2_FS is not set
# CONFIG_OCFS2_FS is not set
# CONFIG_BTRFS_FS is not set
# CONFIG_NILFS2_FS is not set
CONFIG_FILE_LOCKING=y
CONFIG_FSNOTIFY=y
# CONFIG_DNOTIFY is not set
CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y
# CONFIG_QUOTA is not set
# CONFIG_AUTOFS_FS is not set
# CONFIG_AUTOFS4_FS is not set
# CONFIG_FUSE_FS is not set

#
# Caches
#
# CONFIG_FSCACHE is not set

#
# CD-ROM/DVD Filesystems
#
# CONFIG_ISO9660_FS is not set
# CONFIG_UDF_FS is not set

#
# DOS/FAT/NT Filesystems
#
CONFIG_FAT_FS=y
# CONFIG_MSDOS_FS is not set
CONFIG_VFAT_FS=y
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
# CONFIG_NTFS_FS is not set

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_SYSCTL=y
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
# CONFIG_TMPFS_POSIX_ACL is not set
# CONFIG_HUGETLB_PAGE is not set
# CONFIG_CONFIGFS_FS is not set
CONFIG_MISC_FILESYSTEMS=y
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
CONFIG_YAFFS_FS=y
CONFIG_YAFFS_YAFFS1=y
# CONFIG_YAFFS_9BYTE_TAGS is not set
# CONFIG_YAFFS_DOES_ECC is not set
CONFIG_YAFFS_YAFFS2=y
CONFIG_YAFFS_AUTO_YAFFS2=y
# CONFIG_YAFFS_DISABLE_LAZY_LOAD is not set
# CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set
# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set
CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y
# CONFIG_YAFFS_EMPTY_LOST_AND_FOUND is not set
# CONFIG_JFFS2_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_SQUASHFS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_OMFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_ROMFS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
CONFIG_NETWORK_FILESYSTEMS=y
# CONFIG_NFS_FS is not set
# CONFIG_NFSD is not set
# CONFIG_SMB_FS is not set
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set

#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
# CONFIG_NLS_CODEPAGE_850 is not set
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set
# CONFIG_NLS_ASCII is not set
CONFIG_NLS_ISO8859_1=y
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_UTF8 is not set
# CONFIG_DLM is not set

#
# Kernel hacking
#
CONFIG_PRINTK_TIME=y
CONFIG_ENABLE_WARN_DEPRECATED=y
CONFIG_ENABLE_MUST_CHECK=y
CONFIG_FRAME_WARN=1024
CONFIG_MAGIC_SYSRQ=y
# CONFIG_STRIP_ASM_SYMS is not set
# CONFIG_UNUSED_SYMBOLS is not set
CONFIG_DEBUG_FS=y
# CONFIG_HEADERS_CHECK is not set
CONFIG_DEBUG_KERNEL=y
# CONFIG_DEBUG_SHIRQ is not set
CONFIG_DETECT_SOFTLOCKUP=y
# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
CONFIG_DETECT_HUNG_TASK=y
# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
CONFIG_SCHED_DEBUG=y
CONFIG_SCHEDSTATS=y
CONFIG_TIMER_STATS=y
# CONFIG_DEBUG_OBJECTS is not set
# CONFIG_DEBUG_SLAB is not set
# CONFIG_DEBUG_KMEMLEAK is not set
CONFIG_DEBUG_PREEMPT=y
# CONFIG_DEBUG_RT_MUTEXES is not set
# CONFIG_RT_MUTEX_TESTER is not set
# CONFIG_DEBUG_SPINLOCK is not set
CONFIG_DEBUG_MUTEXES=y
# CONFIG_DEBUG_LOCK_ALLOC is not set
# CONFIG_PROVE_LOCKING is not set
# CONFIG_LOCK_STAT is not set
CONFIG_DEBUG_SPINLOCK_SLEEP=y
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
# CONFIG_DEBUG_KOBJECT is not set
# CONFIG_DEBUG_HIGHMEM is not set
# CONFIG_DEBUG_BUGVERBOSE is not set
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_VM=y
# CONFIG_DEBUG_WRITECOUNT is not set
# CONFIG_DEBUG_MEMORY_INIT is not set
# CONFIG_DEBUG_LIST is not set
CONFIG_DEBUG_SG=y
# CONFIG_DEBUG_NOTIFIERS is not set
# CONFIG_DEBUG_CREDENTIALS is not set
# CONFIG_BOOT_PRINTK_DELAY is not set
# CONFIG_RCU_TORTURE_TEST is not set
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
# CONFIG_BACKTRACE_SELF_TEST is not set
# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
# CONFIG_FAULT_INJECTION is not set
# CONFIG_LATENCYTOP is not set
# CONFIG_PAGE_POISONING is not set
CONFIG_HAVE_FUNCTION_TRACER=y
CONFIG_TRACING_SUPPORT=y
CONFIG_FTRACE=y
# CONFIG_FUNCTION_TRACER is not set
# CONFIG_IRQSOFF_TRACER is not set
# CONFIG_PREEMPT_TRACER is not set
# CONFIG_SCHED_TRACER is not set
# CONFIG_ENABLE_DEFAULT_TRACERS is not set
# CONFIG_BOOT_TRACER is not set
CONFIG_BRANCH_PROFILE_NONE=y
# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
# CONFIG_PROFILE_ALL_BRANCHES is not set
# CONFIG_STACK_TRACER is not set
# CONFIG_KMEMTRACE is not set
# CONFIG_WORKQUEUE_TRACER is not set
# CONFIG_BLK_DEV_IO_TRACE is not set
# CONFIG_DYNAMIC_DEBUG is not set
# CONFIG_SAMPLES is not set
CONFIG_HAVE_ARCH_KGDB=y
# CONFIG_KGDB is not set
CONFIG_ARM_UNWIND=y
# CONFIG_DEBUG_USER is not set
# CONFIG_DEBUG_ERRORS is not set
# CONFIG_DEBUG_STACK_USAGE is not set
# CONFIG_DEBUG_LL is not set

#
# Security options
#
# CONFIG_KEYS is not set
# CONFIG_SECURITY is not set
# CONFIG_SECURITYFS is not set
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
CONFIG_CRYPTO=y

#
# Crypto core or helper
#
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_ALGAPI2=y
CONFIG_CRYPTO_AEAD=y
CONFIG_CRYPTO_AEAD2=y
CONFIG_CRYPTO_BLKCIPHER=y
CONFIG_CRYPTO_BLKCIPHER2=y
CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_HASH2=y
CONFIG_CRYPTO_RNG2=y
CONFIG_CRYPTO_PCOMP=y
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_MANAGER2=y
# CONFIG_CRYPTO_GF128MUL is not set
# CONFIG_CRYPTO_NULL is not set
CONFIG_CRYPTO_WORKQUEUE=y
# CONFIG_CRYPTO_CRYPTD is not set
CONFIG_CRYPTO_AUTHENC=y
# CONFIG_CRYPTO_TEST is not set

#
# Authenticated Encryption with Associated Data
#
# CONFIG_CRYPTO_CCM is not set
# CONFIG_CRYPTO_GCM is not set
# CONFIG_CRYPTO_SEQIV is not set

#
# Block modes
#
CONFIG_CRYPTO_CBC=y
# CONFIG_CRYPTO_CTR is not set
# CONFIG_CRYPTO_CTS is not set
CONFIG_CRYPTO_ECB=y
# CONFIG_CRYPTO_LRW is not set
# CONFIG_CRYPTO_PCBC is not set
# CONFIG_CRYPTO_XTS is not set

#
# Hash modes
#
CONFIG_CRYPTO_HMAC=y
# CONFIG_CRYPTO_XCBC is not set
# CONFIG_CRYPTO_VMAC is not set

#
# Digest
#
CONFIG_CRYPTO_CRC32C=y
# CONFIG_CRYPTO_GHASH is not set
# CONFIG_CRYPTO_MD4 is not set
CONFIG_CRYPTO_MD5=y
# CONFIG_CRYPTO_MICHAEL_MIC is not set
# CONFIG_CRYPTO_RMD128 is not set
# CONFIG_CRYPTO_RMD160 is not set
# CONFIG_CRYPTO_RMD256 is not set
# CONFIG_CRYPTO_RMD320 is not set
CONFIG_CRYPTO_SHA1=y
# CONFIG_CRYPTO_SHA256 is not set
# CONFIG_CRYPTO_SHA512 is not set
# CONFIG_CRYPTO_TGR192 is not set
# CONFIG_CRYPTO_WP512 is not set

#
# Ciphers
#
CONFIG_CRYPTO_AES=y
# CONFIG_CRYPTO_ANUBIS is not set
CONFIG_CRYPTO_ARC4=y
# CONFIG_CRYPTO_BLOWFISH is not set
# CONFIG_CRYPTO_CAMELLIA is not set
# CONFIG_CRYPTO_CAST5 is not set
# CONFIG_CRYPTO_CAST6 is not set
CONFIG_CRYPTO_DES=y
# CONFIG_CRYPTO_FCRYPT is not set
# CONFIG_CRYPTO_KHAZAD is not set
# CONFIG_CRYPTO_SALSA20 is not set
# CONFIG_CRYPTO_SEED is not set
# CONFIG_CRYPTO_SERPENT is not set
# CONFIG_CRYPTO_TEA is not set
CONFIG_CRYPTO_TWOFISH=y
CONFIG_CRYPTO_TWOFISH_COMMON=y

#
# Compression
#
CONFIG_CRYPTO_DEFLATE=y
# CONFIG_CRYPTO_ZLIB is not set
# CONFIG_CRYPTO_LZO is not set

#
# Random Number Generation
#
# CONFIG_CRYPTO_ANSI_CPRNG is not set
CONFIG_CRYPTO_HW=y
# CONFIG_BINARY_PRINTF is not set

#
# Library routines
#
CONFIG_BITREVERSE=y
CONFIG_GENERIC_FIND_LAST_BIT=y
CONFIG_CRC_CCITT=y
CONFIG_CRC16=y
# CONFIG_CRC_T10DIF is not set
# CONFIG_CRC_ITU_T is not set
CONFIG_CRC32=y
# CONFIG_CRC7 is not set
CONFIG_LIBCRC32C=y
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y
CONFIG_DECOMPRESS_GZIP=y
CONFIG_GENERIC_ALLOCATOR=y
CONFIG_REED_SOLOMON=y
CONFIG_REED_SOLOMON_ENC8=y
CONFIG_REED_SOLOMON_DEC8=y
CONFIG_TEXTSEARCH=y
CONFIG_TEXTSEARCH_KMP=y
CONFIG_TEXTSEARCH_BM=y
CONFIG_TEXTSEARCH_FSM=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
CONFIG_NLATTR=y

2011年01月16日

Androidのウィジットを作る

test115_01.png
今回は簡単なAndroidウィジットを作成する。EasyProjectGenerator for Android Ver1.04以降を実行する。そして言語「Java」、プロジェクト種類「SimpleWidget」としてプロジェクトを自動生成する。

test115_02.png
これでウィジット用のプロジェクトができた。主なファイルは、javaソースコード「MainWidgetProvider.java」、ウィジットのレイアウトxml「widget.xml」、ウィジットの挙動xml「widget_info.xml」と「AndroidManifest.xml」内でのウィジット登録になる。

test115_03.png
そのままウィジットをAndroidエミュレーターに送り、実際に配置してみる。Eclipseでパッケージをエミュレーターにインストールする。

test115_04.png
そしてエミュレーターの「MENU」ボタンを押す。

test115_05.png
「Add」ボタンを押して、、、

test115_06.png
「Widgets」を選択する。

test115_07.png
そして一覧からインストールした「Test115」ウィジットを選ぶ。

test115_08.png
これでホーム画面に作成したウィジットを配置できた。

test115_09.png
不要になったらウィジットを長押ししてからゴミ箱へドラッグすればいい。






test115_11.png
実際のウィジットのソースコードを見る。まずはjavaで書かれたメイン処理。

ウィジットはAppWidgetProvider派生で作る。そしてonEnabled()、onUpdate()、onDeleted()、onReceive()に処理を実装する。 今回はonUpdateのみ処理して、更新されたときにImageViewへアイコンが表示されるようにした。
package com.Test115;

import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProvider;
import android.content.Context;
import android.content.Intent;
import android.widget.RemoteViews;


public class MainWidgetProvider extends AppWidgetProvider
{
	@Override
	public void onEnabled(Context context)
	{
		super.onEnabled(context);
	}


	@Override
	public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds)
	{
		//super.onUpdate(context,appWidgetManager,appWidgetIds);

		for(int nWidgetId : appWidgetIds)
		{
			RemoteViews remoteView = new RemoteViews(context.getPackageName(),R.layout.widget);

			remoteView.setImageViewResource(R.id.MainImageView,R.drawable.icon);
			appWidgetManager.updateAppWidget(nWidgetId,remoteView);
		}
	}


	@Override
	public void onDeleted(Context context, int[] appWidgetIds)
	{
		super.onDeleted(context,appWidgetIds);
	}


	@Override
	public void onReceive(Context context, Intent intent)
	{
		super.onReceive(context,intent);
	}
}

test115_12.png レイアウトは普通のアプリと同じようにXMLで指定できる。ただし利用できるView種は制限されていて、何でも使えるというわけではない。今回はImageViewとTextViewを配置した。
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
	xmlns:android="http://schemas.android.com/apk/res/android"
	android:id="@+id/MainFrameLayout"
	android:layout_width="fill_parent"
	android:layout_height="fill_parent">
	
	<LinearLayout
		android:id="@+id/MainLinearLayout"
		android:layout_width="fill_parent"
		android:layout_height="fill_parent">
		<ImageView
			android:id="@+id/MainImageView"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"/>
		<TextView
			android:id="@+id/main_text"
			android:layout_width="fill_parent"
			android:layout_height="wrap_content"
			android:text="@string/app_name" />
	</LinearLayout>

</FrameLayout>

test115_13.png
ここではウィジットのサイズや更新間隔を指定する。

利用できるウィジットサイズは72/146/220/294/368dip...になる。 更新間隔は今回はゼロ=更新しないとした。この値の最小値は「1800000」(=30x60x1000msec=30分)となる。つまり時計の秒針や分針などはこの更新指定を使って描画できない。
<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider 
	xmlns:android="http://schemas.android.com/apk/res/android"
	android:initialLayout="@layout/widget"
	android:minWidth="146dip"
	android:minHeight="72dip"
	android:updatePeriodMillis="0">
	<!-- width/height set to ((nCells x 74) - 2)dip  -->
		<!-- 72dip, 146dip, 220dip, 294dip, 368dip... -->
</appwidget-provider>

test115_14.png 「AndroidManifest.xml」には、これまではアクティビティを登録していたが、今回はアクティビティはない。代わりにウィジットを登録する。
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
	package="com.Test115"
	android:versionCode="1"
	android:versionName="1.0">

	<application android:icon="@drawable/icon" android:label="@string/app_name">

		<receiver android:name="MainWidgetProvider">
			<meta-data
				android:name="android.appwidget.provider"
				android:resource="@xml/widget_info" />
			<intent-filter>
				<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
			</intent-filter>
		</receiver>

	</application>

</manifest>


プロジェクトファイルをダウンロード

2011年01月15日

Androidでカメラのシャッター音を消したアプリの作り方のメモ

Androidでカメラのシャッター音を消したアプリの作り方のメモです。

カメラアプリを作る際に、
	private ShutterCallback _fnShutterCallback = new ShutterCallback();

	private final class ShutterCallback implements android.hardware.Camera.ShutterCallback
	{
		public void onShutter()
		{
				Log.i("camera", "onShutter");
				if (_cMediaShutterSound != null)
				{
//					_cMediaShutterSound.start();
				}
		}
	};
というように、シャッター音がならないコールバック関数を用意して撮影時に、
	camera.takePicture(_fnShutterCallback,_fnRawPictureCallback,new JpegPictureCallback());
というようにシャッターコールバックを呼べばシャッター音が無音のカメラアプリが作れるはず、、、なのに、実際にはシャッター音が鳴る。しかもコメント部分をはずせばシャッター音が二重に鳴るというおまけ付き。

Android OSのソースコードをざっと調べてみると、
source/frameworks/base/camera/libcameraservice/CameraService.cpp
の中に実装されているシャッターハンドラーが

     // snapshot taken
     void CameraService::Client::handleShutter(
         image_rect_type *size // The width and height of yuv picture for
                               // registerBuffer. If this is NULL, use the picture
                               // size from parameters.
     )
     {
         // Play shutter sound.
         if (mMediaPlayerClick.get() != NULL) {
             // do not play shutter sound if stream volume is 0
             // (typically because ringer mode is silent).
             int index;
             AudioSystem::getStreamVolumeIndex(AudioSystem::ENFORCED_AUDIBLE, &index);
             if (index != 0) {
                 mMediaPlayerClick->seekTo(0);
                 mMediaPlayerClick->start();
             }
         }
     

         //以下省略
というようになっていて、強制的に音がようになっている。シャッター音を消すオプションは存在せず、mMediaPlayerClickが失敗した場合のみ無音になる。


以上の理由から「シャッター音が鳴らないAndroidアプリは作れない」、、、はずだが実際には数多くの無音カメラアプリがリリースされているためできるはず。


というわけで、カメラのシャッター音を消す方法は、、、

■CameraService.cppで参照されているシャッター音のリソースファイルを無音にする

■シャッター音が鳴ってしまうcamera.takePicture()を使わずに撮影する

■ソースコードのシャッター音を鳴らす部分をコメントアウトしたlibcameraserviceをビルドして使う

■/dev/video1や/dev/msm_cameraなどのカメラデバイスを直接制御して撮影する

という4方法をすぐに思いつく。


「CameraService.cppで参照されているシャッター音のリソースファイルを無音にする」は、シャッター音の元ファイル"/system/media/audio/ui/camera_click.ogg"を無音のものに置き換えるというもの。
検索すれば情報もたくさんあるので簡単にシャッター音を無音にできる。ただしroot権限が必要になるため汎用的ではない。


「シャッター音が鳴ってしまうcamera.takePicture()を使わずに撮影する」は、例えばプレビュー用に生成された画像イメージを取得してそのまま撮影データとして利用するというもの。
簡単に実装できて、汎用的なシャッター音を消したカメラアプリを作成できる。この方法ではcamera.takePicture()を使った撮影とは異なり、ラグがなくプレビューを見たまま撮影できるためサクサク撮影可能というメリットがある。ただしプレビュー画像はcamera.takePicture()での画像よりも解像度が低いため、高解像度で撮影したい場合はこの方法は利用できない。


「ソースコードのシャッター音を鳴らす部分をコメントアウトしたlibcameraserviceをビルドして使う」は、Androidのソースコードをほぼそのまま利用するもの。
実際に試していないので、本当に無音化できるかどうかは不明。しかし、おそらくリリースされているカメラアプリはこの方法を利用して無音化しているはず。


「/dev/video1や/dev/msm_cameraなどのカメラデバイスを直接制御して撮影する」は、Androidという枠から抜け出てLinuxとしてカメラを扱うというもの。
試していないので、本当に直接制御できるのかは不明。また、デバイスに直接アクセスするため機種依存性が強くなるというデメリットもある。NDKが標準でlinux/videodev2.hを備えているなど、ハードルが高いようで低いように思える。
、、、ものの単純に「int fd = open("/dev/msm_camera",O_RDWR,0);」としてもデバイスが開けず難航しそうな雰囲気。/dev/msm_cameraがAndroid側で利用中なため開放作業やパーミッション変更などの前処理が必要になるのかな?デバイスが開けたら後は簡単にできそう。この方法はAndroid OSが用意しているカメラAPIとは異なり自由度が高い。そのため今後なんとかして動かせるようにしたい。現状ではAndroidもLinuxも知識がゼロに等しいので歯が立ちません。


2010年12月31日

EasyProjectGenerator for Androd Ver1.03

epg103_01.png
Android SDK/NDK用の雛形プロジェクトを簡単に自動生成できる「EasyProjectGenerator for Android」の新バージョンをアップしました。新たにC++やSTL、ログ出力機能やJavaの雛形プロジェクト生成に対応します。それに伴い前バージョンとは使い方が変わりました。

起動バッチファイルは「start_wizard.bat」に統合しています。



ダウンロードページ

epg103_02.png
「start_wizard.bat」を実行すると、最初に生成するプロジェクトの名前の入力が求められます。アルファベットと数字のみのプロジェクト名を指定してください。

epg103_03.png
次に開発言語選択(C++、C、Java)、雛形となるプロジェクト選択(HelloJNI、NativeView、Simple)などウイザードに沿って指定します。これらはそのまま[Enter]キーでデフォルトの値を使うこともできます。

epg103_04.png
バッチファイルが終わると、「EasyProjectGenerator for Android」のインストールフォルダ内にプロジェクト名のフォルダができます。これが自動生成されたプロジェクトのフォルダです。好きな場所に移動します。

epg103_05.png
そしてEclipseを起動して、「File」メニューにある「New」から「Android Project」を選択。

epg103_06.png
「Create project from existing source」にチェックを入れて、先ほど作成したプロジェクトのフォルダを指定して取り込みます。

epg103_07.png
これでEclipseからプロジェクトが使えるようになりました。

epg103_08.png
ネイティブコードのビルドは、プロジェクトフォルダ内にあるバッチファイル「_build_jni.bat」のダブルクリックで行えます。

epg103_09.png
これで作成された雛形プロジェクトを実行できました。





「EasyProjectGenerator for Android」のダウンロードページ

2010年12月30日

Android NDKが標準で備えるSTLを利用する

test114_01.png
Android NDKには標準でStandard Template Library「STL」が用意されている(ただし2010年末現在β実装)。今回はそれを使ってSTLプログラミングをしみる。
まずネイティブのソースコードをC++にするため拡張子をcppに変更する。

test114_02.png そしてSTLを利用したネイティブコードを実装する。
#include <string.h>
#include <jni.h>

#include <vector>
#include <string>
#include <iterator>
#include <algorithm>


extern "C" jstring
Java_com_Test114_Test114Act_stringFromJNI(JNIEnv* env,jobject thiz)
{
	std::vector<std::string>  vstrTest;

	//ランダムに追加
	vstrTest.push_back("A");
	vstrTest.push_back("D");
	vstrTest.push_back("C");
	vstrTest.push_back("B");

	//ソート
	std::sort(vstrTest.begin(),vstrTest.end());

	//結果の結合
	std::string		strOut;
	{
		std::vector<std::string>::iterator	ivnPos;

		for(ivnPos = vstrTest.begin(); ivnPos != vstrTest.end(); ivnPos++ )
			strOut += *ivnPos;
	}

	//出力
	return env->NewStringUTF(strOut.c_str());
}

test114_03.png 次にAndroid.mkを編集する。STL向けの設定項目はなく、単にソースファイルをcppに変えるだけだ。
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE    := Test114jni
LOCAL_SRC_FILES := Test114jni.cpp
LOCAL_LDLIBS    := -llog

include $(BUILD_SHARED_LIBRARY)

test114_04.png
このままではAndroid NDKはSTLを認識しない。STLを使えるようにするためにはApplication.mkファイルを用意する。jniフォルダを選択して右クリックして現れるメニューの「New」にある「File」を選択する。

test114_05.png
そしてApplication.mkファイルを作成する。

test114_06.png 「APP_STL := stlport_static」の1行を追加する。これがAndroid NDKでSTLを使うための設定だ。今回はstaticライブラリとした。
APP_STL := stlport_static

test114_07.png
これでビルド/実行すると、STLによってソートされた結果が表示された。






test114_08.png メイン環境では上のApplication.mkで正常にビルドが終わったのだが、Virtual PC上の開発環境では下のようなエラーが出て失敗しました。どこかAndroid NDKのパス設定がうまくいっていないようで、ビルド済みのlibstlport_static.aが見つかっていないようです。
C:\Users\assist\Desktop\EasyProjectGenerator\Test114>bash -i -c "ndk-build"
Compile++ thumb  : Test114jni <= Test114jni.cpp
StaticLibrary  : libstdc++.a
Prebuilt       : libstlport_static.a <= <NDK>/sources/cxx-stl/stlport/libs/armea
bi/
SharedLibrary  : libTest114jni.so
C:/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld.exe:
C:/Users/assist/Desktop/EasyProjectGenerator/Test114/obj/local/armeabi/libstlport_static.a: No such file: Permission denied
collect2: ld returned 1 exit status
make: *** [/cygdrive/c/Users/assist/Desktop/EasyProjectGenerator/Test114/obj/local/armeabi/libTest114jni.so] Error 1

C:\Users\assist\Desktop\EasyProjectGenerator\Test114>pause
続行するには何かキーを押してください . . .

test114_09.png そんなときは、Application.mkに「STLPORT_FORCE_REBUILD := true」を追加すると、Android NDKに含まれるSTLのソースファイル一式が強制ビルドされてプロジェクトフォルダ内にlibstlport_static.aが生成、利用されるようになります。
APP_STL := stlport_static
STLPORT_FORCE_REBUILD := true

プロジェクトファイルをダウンロード

Android NDKでC++を利用する

Test113_01.png
これまでAndroidのネイティブコードをC言語で扱った。しかしC言語だとクラスは使えないし、メモリ確保も面倒なのでこれからはC++を利用する。まずソースコードの拡張子をcppに変更する。

Test113_02.png AndroidでJavaとネイティブの橋渡しをするJNIの記述がC言語とC++とでは異なる。コメントアウトしたのがC言語での書き方。C++の方がスマートだ。
#include <string.h>
#include <jni.h>
#include <android/log.h>


class CTest113
{
public:
	CTest113()
	{
		__android_log_write(ANDROID_LOG_DEBUG,"Test113","CTest113::CTest113()");
	}

	~CTest113()
	{
		__android_log_write(ANDROID_LOG_DEBUG,"Test113","CTest113::~CTest113()");
	}

	void	TestFunc()
	{
		__android_log_write(ANDROID_LOG_DEBUG,"Test113","CTest113::TestFunc()");
	}
};

extern "C" jstring
Java_com_Test113_Test113Act_stringFromJNI(JNIEnv* env,jobject thiz)
{
	CTest113*	pcTest;

	pcTest = new CTest113;
	pcTest->TestFunc();
	delete	pcTest;

	return env->NewStringUTF("Test113text");
//	return (*env)->NewStringUTF(env, "Test113text");
}

Test113_03.png Android.mkでC言語からC++に変更するのはソースファイル指定の拡張子を変えるだけだ。今回はログ出力を利用するので-llogも追加した。
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE    := Test113jni
LOCAL_SRC_FILES := Test113jni.cpp
LOCAL_LDLIBS    := -llog

include $(BUILD_SHARED_LIBRARY)

Test113_04.png
これで実行するとC++のクラスが生成、破棄されてそれがログに出力されたことが、DDMSのLogCatで確認できた。

プロジェクトファイルをダウンロード

2010年12月29日

Android SDK/NDKのログ出力機能を使う

test112_01.png
Android SDK/NDKには開発者向けにログ出力機能が備わっている。今回はそれを試しに使ってみる。

test112_02.png
javaではandroid.util.LogをインポートすればLog.v()、Log.d()、Log.i()、Log.w()、Log.e()関数でログ出力できる。

Android SDK/NDKではリリースビルド/デバッグビルドという概念がない?ため、一般公開した後もログ出力機能が有効なままになってしまう。リリースビルド時などログ出力が不要なときに簡単に機能を削除できるように、LOCAL_LOGやLOCAL_LOGDを定義、それを使って手動制御した方がいい。
package com.Test112;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
import android.util.Log;

public class Test112Act extends Activity
{
	//ログを出力するならtrue、出力しないならfalse
	//リリースビルドではfalseにする
	final boolean LOCAL_LOGD = true;
	
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		TextView	tv = new TextView(this);
		tv.setText( stringFromJNI() );
		setContentView(tv);
		
		//5種類のログを出力
		if(LOCAL_LOGD)
		{
			Log.v("Tag","Test Message : Log.v() for VERBOSE");
			Log.d("Tag","Test Message : Log.d() for DEBUG");
			Log.i("Tag","Test Message : Log.i() for INFO");
			Log.w("Tag","Test Message : Log.w() for WARN");
			Log.e("Tag","Test Message : Log.e() for ERROR");
		}
	}

	public native String  stringFromJNI();

	static
	{
		System.loadLibrary("Test112jni");
	}
}

test112_03.png ネイティブコードでログ出力機能を利用する場合は、Android.mkで「LOCAL_LDLIBS」に「-llog」のリンク指定を追加する。
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE    := Test112jni
LOCAL_SRC_FILES := Test112jni.c
LOCAL_LDLIBS    := -llog

include $(BUILD_SHARED_LIBRARY)

test112_04.png
実際の出力は__android_log_write()や__android_log_print()で行う。__android_log_write()は固定メッセージをログ出力、__android_log_print()はprintfのように書式化して出力できる。

ログの種別はANDROID_LOG_VERBOSE、ANDROID_LOG_DEBUG、ANDROID_LOG_INFO、ANDROID_LOG_WARN、ANDROID_LOG_ERROR、ANDROID_LOG_FATALなどの定数が利用できる。
//ログを出力する。ログ出力しないなら次の1行をコメントアウトすること
#define	LOCAL_LOG

#include <string.h>
#include <jni.h>

#ifdef	LOCAL_LOG
#include <android/log.h>
#endif

jstring
Java_com_Test112_Test112Act_stringFromJNI(JNIEnv* env,jobject thiz)
{
#ifdef	LOCAL_LOG
	//ログを出力
	__android_log_write(ANDROID_LOG_DEBUG,"Tag","Test Message : __android_log_write() with ANDROID_LOG_DEBUG");
	__android_log_print(ANDROID_LOG_DEBUG,"Tag","Test Message : __android_log_print(%s) with ANDROID_LOG_DEBUG","test string");

//	int	nTest = 123;
//	__android_log_assert("nTest == 123","Tag","Test Message : __android_log_assert(nTest == 123) with nTest=%d",nTest);
//	__android_log_assert("nTest != 123","Tag","Test Message : __android_log_assert(nTest != 123) with nTest=%d",nTest);
#endif

	return (*env)->NewStringUTF(env, "Test112text");
}

test112_05.png
ログ出力を実装して実行した。実行時の見た目は実装前と変わらない。

test112_06.png
出力されたログを見るには、Eclipseの「DDMS」画面の「LogCat」を利用する。

test112_07.png
ここにログ出力日時とログ出力関数を呼び出したときの引数が表示される。

test112_08.png
ログには種別があり、上部のボタンで表示レベルを切り換えれる。

VERBOSEでは全て表示、DEBUGではVERBOSE以外を表示、INFOではVERBOSEとDEBUG以外を表示、、、とV>D>I>W>Eの順番で表示されるログ種別が多い。

test112_09.png
フィルター機能も備え、タグなどを指定して絞り込み表示できる。

test112_10.png
絞り込みタブを削除するには「Delete Filter」ボタンを使う




プロジェクトファイルをダウンロード

Androidで画面のタッチ操作を検出する

test111_01.png
今回は画面のタッチ操作の検出方法を見てみる。
EasyProjectGenerator for AndroidでNativeViewプロジェクトを生成して、Eclipseに読み込む。そしてjavaのソースコードを編集する。

test111_02.png
Viewに対して、setOnTouchListner()によりOnTouchListerner()のOnTouch()を指定する。Javaのソースを本格的?にいじるのはこれが初めて。処理の流れはJavascript、文法方法はC++という雰囲気です。

タッチ開始、ドラッグ中、タッチ終了などのイベントはevent.getAction()、タッチ座標は戻り値がfloatというのが意味不明がevent.getX()とevent.getY()で取得できるようです。
package com.Test111;

import android.app.Activity;
import android.os.Bundle;
import android.content.Context;
import android.view.View;
import android.view.View.OnTouchListener;
import android.view.MotionEvent;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Rect;


public class Test111Act extends Activity
{
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);

		setContentView(new NativeView(this));
	}

	static
	{
		System.loadLibrary("Test111jni");
	}
}


class NativeView extends View
{
	private Bitmap _mBitmap;

	private static native void RenderBitmap(Bitmap bitmap);


	private	boolean	_bTouchDown;
	private	float	_fTouchX;
	private	float	_fTouchY;
	private	float	_fScrollX;
	private	float	_fScrollY;


	public NativeView(Context context)
	{
		super(context);

		_bTouchDown	= false;
		_fTouchX	= 0.0f;
		_fTouchY	= 0.0f;
		_fScrollX	= 0.0f;
		_fScrollY	= 0.0f;

		final int W = 200;
		final int H = 200;

		_mBitmap = Bitmap.createBitmap(W, H, Bitmap.Config.RGB_565);
		
		this.setOnTouchListener(new OnTouchListener()
		{
			@Override
			public boolean onTouch(View v, MotionEvent event)
			{
				float	fTouchX			= event.getX();
				float	fTouchY			= event.getY();
//				float	fTouchSize		= event.getSize();
//				float	fTouchPressure	= event.getPressure();

				switch (event.getAction() & MotionEvent.ACTION_MASK)
				{
				case MotionEvent.ACTION_DOWN:
					_bTouchDown = true;
					_fTouchX = fTouchX;
					_fTouchY = fTouchY;
					break;

				case MotionEvent.ACTION_UP:
				case MotionEvent.ACTION_POINTER_UP:
					_bTouchDown = false;
					//break;			//break処理せずにinvalidate()まで実行する

				case MotionEvent.ACTION_MOVE:
					_fScrollX -= _fTouchX - event.getX();
					_fScrollY -= _fTouchY - event.getY();
					_fTouchX = fTouchX;
					_fTouchY = fTouchY;
					v.invalidate();
					break;
				}

				return true;
			}
		});
	}


	@Override protected void onDraw(Canvas canvas)
	{
		RenderBitmap(_mBitmap);

		int		nWidth	= _mBitmap.getWidth();
		int		nHeight	= _mBitmap.getHeight();

		Rect rcSrc = new Rect(0,0,nWidth, nHeight);
		Rect rcDst = new Rect((int)_fScrollX,(int)_fScrollY,(int)_fScrollX + nWidth,(int)_fScrollY + nHeight);
		canvas.drawBitmap(_mBitmap,rcSrc,rcDst,null);
	}
}

test111_03.png
これで忘れずにネイティブコードをndk-buildでビルドしてから実行すると、、、画面のドラッグでグラデーション描画領域を好きなように移動できるようになりました。




プロジェクトファイルをダウンロード

libpngをAndroid NDKの標準ライブラリに登録する

test110_01.png
以前扱った「Android NDK用にlibpngをビルドして利用する」では、libpngをそのソースコードからビルドして利用した。毎回libpngをビルドするのは面倒なので、そのときにビルドしてできたバイナリファイルを、Android NDKの標準ライブラリとして登録してしまう。

まずはlibpngのソースコードに含まれていたpng.hとpngconf.hを"C:\android-ndk\platforms\android-xxx\arch-arm\usr\include\"へコピーする。

test110_02.png
次に「Android NDK用にlibpngをビルドして利用する」のプロジェクトをビルドして得られたlibpng.aを"C:\android-ndk\platforms\android-xxx\arch-arm\usr\lib\"へコピーする。これでAndroid NDK標準ライブラリへの登録作業は終りだ。

libpngでは内部でzlibを利用しているが、zlibはAndroid NDKの標準ライブラリとして組み込み済みなためコピーする必要はない。



test110_03.png 次に実際に使ってみる。標準ライブラリとして登録したlibpngを利用するときは、Android.mkのLOCAL_LDLIBSに「-lz -lpng」を指定する。
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE    := Test110jni
LOCAL_SRC_FILES := Test110jni.c
LOCAL_LDLIBS    := -lz -lpng -llog -ljnigraphics

include $(BUILD_SHARED_LIBRARY)

test110_04.png 描画コードは「Android NDK用にlibpngをビルドして利用する」と同じものを利用した。
#include <jni.h>
#include <android/bitmap.h>
#include <stdlib.h>
#include <png.h>

/* this function is from Android NDK bitmap-plasma , and modify for green color bug */
static uint16_t  make565(int red, int green, int blue)
{
	return (uint16_t)( ((red   << 8) & 0xf800) |
					   ((green << 3) & 0x07e0) |
					   ((blue  >> 3) & 0x001f) );
}


static int DrawBitmap(AndroidBitmapInfo* pBitmapInfo, void* pPixels, const char* pszImageFile)
{
	FILE	*fp;

	//画像ファイルの読み込み
	fp = fopen(pszImageFile,"r");
	if(fp == NULL)
		return	0;

	int		bSucceeded = 0;

	png_bytepp	ppRowImage = NULL;
	png_structp	pPng = NULL;
	png_infop	pInfo = NULL;

	while(1)
	{
		pPng = png_create_read_struct(PNG_LIBPNG_VER_STRING,NULL,NULL,NULL);
		if(pPng == NULL)
			break;

		pInfo = png_create_info_struct(pPng);
		if(pInfo == NULL)
			break;

		//ファイルポインタの設定
		png_init_io(pPng,fp);

		png_uint_32	nWidth;
		png_uint_32	nHeight;
		int		nBitDepth;
		int		nColorType;
		int		nIntMethod;
		int		nCompMethod;
		int		nFilterMethod;
		png_uint_32	nImageBytes;
		png_uint_32	nRowBytes;

		//画像情報取得
		png_read_info(pPng,pInfo);
		png_get_IHDR(pPng,pInfo,&nWidth,&nHeight,&nBitDepth,&nColorType,&nIntMethod,&nCompMethod,&nFilterMethod);
		nRowBytes	= png_get_rowbytes(pPng,pInfo);
		nImageBytes	= nHeight * nRowBytes;

		//画像データ用バッファーの確保
		ppRowImage = (png_bytepp)malloc(sizeof(png_bytep) * nHeight + nImageBytes);
		if(ppRowImage == NULL)
			break;

		int		yy;

		//画像データ用バッファーの初期化
		{
			png_bytep	pRowImage;

			pRowImage = (png_bytep)&(ppRowImage[nHeight]);
			for(yy = 0; yy < nHeight; yy++)
			{
				ppRowImage[yy] = pRowImage;
				pRowImage += nRowBytes;
			}
		}


		//画像ファイル読み込み
		png_read_image(pPng,ppRowImage);


		//描画
		for(yy = 0; yy < pBitmapInfo->height && yy < nHeight; yy++)
		{
			int		xx;
			uint16_t*	pLine;
			char*		pImagePixel;

			pLine = (uint16_t*)pPixels;					//ビットマップの行データ
			pImagePixel = (char*)(ppRowImage[yy]);		//画像ファイルの行データ

			for(xx = 0; xx < pBitmapInfo->width && xx < nWidth; xx++)
			{
				//■■注意■■1ピクセル3バイト前提で処理している。しかも画像ファイルが1ピクセル3バイトかどうかはチェックしていない!
				pLine[xx] = make565(pImagePixel[0],pImagePixel[1],pImagePixel[2]);
				pImagePixel += 3;
			}

			pPixels = (char*)pPixels + pBitmapInfo->stride;
		}

		bSucceeded = 1;
		break;				//必須忘れないこと!
	}


	if(ppRowImage)
	{
		free(ppRowImage);
		ppRowImage = NULL;
	}

	if(pPng)
	{
		if(pInfo)
			png_destroy_read_struct(&pPng,&pInfo,NULL);
		else
			png_destroy_read_struct(&pPng,NULL,NULL);

		pPng = NULL;
		pInfo = NULL;
	}

	fclose(fp);

	return	bSucceeded;
}


JNIEXPORT void JNICALL Java_com_Test110_NativeView_RenderBitmap(JNIEnv * env, jobject  obj, jobject bitmap)
{
	AndroidBitmapInfo  info;
	void*			  pixels;
	int				ret;

	if ((ret = AndroidBitmap_getInfo(env, bitmap, &info)) < 0)
		return;

	if (info.format != ANDROID_BITMAP_FORMAT_RGB_565)
		return;

	if ((ret = AndroidBitmap_lockPixels(env, bitmap, &pixels)) < 0)
		return;

	DrawBitmap(&info,pixels,"/sdcard/test.png");

	AndroidBitmap_unlockPixels(env, bitmap);
}

test110_05.png
これで仮想SDカードに保存したPNG画像を表示できた。

本当はAndroid NDKの標準ライブラリとしての登録は避けて、LOCAL_PREBUILT_LIBSを利用したmakefileで済ませたかったのですが、方法が分かりませんでした。今回の方法はかなり苦肉の策です。




プロジェクトファイルをダウンロード

2010年12月28日

Android NDKが標準で備えるzlibを利用する

test109_01.png
自分でビルドしたライブラリファイルをプロジェクトで利用するための方法を探している過程で、Android NDKのフォルダ内にzlibのヘッダーファイルを見つけました。場所は「C:\android-ndk\platforms\android-9\arch-arm\usr\include\」です。以前、「Android NDK用にzlibをビルドして利用する」や「Android NDK用にlibpngをビルドして利用する」で自分でzlibのソースコードをビルド/利用しましたが、無駄な行為だったようです。
今回はこの標準zlibを使った圧縮/解凍処理をします。

test109_02.png まずEasyProjectGenerator for AndroidのHelloJni.batでプロジェクトを作成します。そして含まれるAndroid.mkに次の1行を追加します。このlibzというのが標準のzlibでした。
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE    := Test109jni
LOCAL_SRC_FILES := Test109jni.c
LOCAL_LDLIBS    := -lz

include $(BUILD_SHARED_LIBRARY)

test109_03.png そしてメイン処理を実装します。基本的に「Android NDK用にzlibをビルドして利用する」のときとまったく同じです。
#include <string.h>
#include <jni.h>
#include <stdio.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <zlib.h>


int CompressTest(int bCompress,const char* pszDstFile,const char* pszSrcFile)
{
	int		ret;
	int		nFd;
	char*	pszMapped;
	long	nFileSize;

	//処理対象ファイルを開く
	nFd = open(pszSrcFile,O_RDONLY);
	if(nFd < 0)
		return	0;

	//処理対象ファイルのサイズ取得
	{
		struct stat	sFileStat;

		ret = fstat(nFd,&sFileStat);
		if(ret < 0)
		{
			close(nFd);
			return	0;
		}
		nFileSize = sFileStat.st_size;
	}

	//処理対象ファイルをメモリマップドファイルにする
	pszMapped = (char*)mmap(NULL,nFileSize,PROT_READ,MAP_SHARED,nFd,0);
	if(pszMapped == MAP_FAILED)
	{
		close(nFd);
		return	0;
	}

	//メイン処理
	{
		Bytef*	pcbCompData;
		long	nCompLen;

		if(bCompress)
		{
			//圧縮処理

			nCompLen = nFileSize * 1.1 + 13;
			pcbCompData = (Bytef*)malloc(nCompLen);

			compress(pcbCompData,&nCompLen,pszMapped,nFileSize);
		}
		else
		{
			//解凍処理

			//元サイズ取得&バッファ確保
			nCompLen = *(long*)pszMapped;
			pcbCompData = (Bytef*)malloc(nCompLen);

			char*	pTmp;

			//サイズが保存されていた分だけポインタを進めて解凍処理
			pTmp = pszMapped;
			pTmp += sizeof(nFileSize);

			uncompress(pcbCompData,&nCompLen,pTmp,nFileSize - sizeof(nFileSize));
		}

		{
			FILE	*fp;
			fp = fopen(pszDstFile,"w");
			if(fp)
			{
				if(bCompress)
				{
					//圧縮時は圧縮前のサイズを保存
					fwrite(&nFileSize,sizeof(nFileSize),1,fp);
				}

				fwrite(pcbCompData,1,nCompLen,fp);
				fclose(fp);
			}
		}

		free(pcbCompData);
	}

	//メモリマップドファイル開放
	munmap(pszMapped,nFileSize);

	close(nFd);

	return	1;
}


jstring
Java_com_Test109_Test109Act_stringFromJNI(JNIEnv* env,jobject thiz)
{
	//テスト用ファイル作成
	FILE	*fp;
	fp = fopen("/sdcard/test.txt","w");
	if(fp)
	{
		fputs("--------------------------------------------------",fp);
		fputs("----------this is compress data-------------------",fp);
		fputs("--------------------------------------------------",fp);
		fputs("Test line.Test line.Test line.Test line.Test line.",fp);
		fputs("Test line.Test line.Test line.Test line.Test line.",fp);
		fputs("Test line.Test line.Test line.Test line.Test line.",fp);
		fputs("--------------------------------------------------",fp);
		fclose(fp);
	}

	//圧縮
	CompressTest(1,"/sdcard/test.cmp","/sdcard/test.txt");

	//解凍
	CompressTest(0,"/sdcard/decomp.txt","/sdcard/test.cmp");

	return (*env)->NewStringUTF(env, "Test109text");
}

test109_04.png
これで実行すると仮想SDカード上でデータの圧縮/解凍が確認できました。




プロジェクトファイルをダウンロード

前の10件 5  6  7  8  9  10  11  12  13  14  15