device/asus/flo: initial commit

Change-Id: I5946aea9cce97624c4a2a56ce8da858851f509e8
Signed-off-by: Iliyan Malchev <malchev@google.com>
This commit is contained in:
Iliyan Malchev 2013-02-27 18:45:49 -08:00
parent aae218ad95
commit 4ffa22bb4a
138 changed files with 22953 additions and 0 deletions

40
Android.mk Normal file
View File

@ -0,0 +1,40 @@
#
# Copyright 2012 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This contains the module build definitions for the hardware-specific
# components for this device.
#
# As much as possible, those components should be built unconditionally,
# with device-specific names to avoid collisions, to avoid device-specific
# bitrot and build breakages. Building a component unconditionally does
# *not* include it on all devices, so it is safe even with hardware-specific
# components.
ifneq ($(filter flo,$(TARGET_DEVICE)),)
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := wpa_supplicant.conf
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := $(LOCAL_MODULE)
LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/wifi
include $(BUILD_PREBUILT)
endif
include $(call all-makefiles-under,$(LOCAL_PATH))

19
AndroidBoard.mk Normal file
View File

@ -0,0 +1,19 @@
#
# Copyright (C) 2011 The Android Open-Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
ifeq ($(TARGET_PREBUILT_KERNEL),)
TARGET_PREBUILT_KERNEL := device/asus/flo-kernel/kernel
endif

18
AndroidProducts.mk Normal file
View File

@ -0,0 +1,18 @@
#
# Copyright 2012 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/full_flo.mk

109
BoardConfig.mk Executable file
View File

@ -0,0 +1,109 @@
#
# Copyright (C) 2011 The Android Open-Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
TARGET_GLOBAL_CFLAGS += -mfpu=neon -mfloat-abi=softfp
TARGET_GLOBAL_CPPFLAGS += -mfpu=neon -mfloat-abi=softfp
TARGET_CPU_ABI := armeabi-v7a
TARGET_CPU_ABI2 := armeabi
TARGET_CPU_SMP := true
TARGET_ARCH := arm
TARGET_ARCH_VARIANT := armv7-a-neon
TARGET_CPU_VARIANT := krait
ARCH_ARM_HAVE_TLS_REGISTER := true
TARGET_NO_BOOTLOADER := false
BOARD_KERNEL_BASE := 0x80200000
BOARD_KERNEL_PAGESIZE := 2048
# BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.hardware=msm8960 maxcpus=2
BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.hardware=flo user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3
BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x02000000
BOARD_USES_ALSA_AUDIO:= true
BOARD_USES_LEGACY_ALSA_AUDIO:= false
BOARD_USES_FLUENCE_INCALL := true
BOARD_USES_SEPERATED_AUDIO_INPUT := true
BOARD_HAVE_BLUETOOTH := true
BOARD_HAVE_BLUETOOTH_QCOM := true
BLUETOOTH_HCI_USE_MCT := true
TARGET_NO_RADIOIMAGE := true
TARGET_BOARD_PLATFORM := msm8960
TARGET_BOOTLOADER_BOARD_NAME := FLO
TARGET_BOOTLOADER_NAME := flo
TARGET_BOARD_INFO_FILE := device/asus/flo/board-info.txt
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/asus/flo/bluetooth
# FIXME: HOSTAPD-derived wifi driver
BOARD_HAS_QCOM_WLAN := true
BOARD_WLAN_DEVICE := qcwcn
WPA_SUPPLICANT_VERSION := VER_0_8_X
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
BOARD_HOSTAPD_DRIVER := NL80211
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
WIFI_DRIVER_FW_PATH_STA := "sta"
WIFI_DRIVER_FW_PATH_AP := "ap"
BOARD_EGL_CFG := device/asus/flo/egl.cfg
#BOARD_USES_HGL := true
#BOARD_USES_OVERLAY := true
USE_OPENGL_RENDERER := true
TARGET_USES_ION := true
TARGET_USES_OVERLAY := true
TARGET_USES_SF_BYPASS := true
TARGET_USES_C2D_COMPOSITON := true
TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"
TARGET_RECOVERY_UI_LIB := librecovery_ui_flo
TARGET_RECOVERY_FSTAB = device/asus/flo/fstab.flo
TARGET_USERIMAGES_USE_EXT4 := true
BOARD_BOOTIMAGE_PARTITION_SIZE := 23068672 # 22M
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 23068672 # 22M
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 268435456 # 256M
BOARD_USERDATAIMAGE_PARTITION_SIZE := 12348030976 # 11.5G
BOARD_FLASH_BLOCK_SIZE := 131072 # (BOARD_KERNEL_PAGESIZE * 64)
BOARD_USES_SECURE_SERVICES := true
USE_CAMERA_STUB := true
BOARD_USES_CAMERA_FAST_AUTOFOCUS := false
BOARD_LIB_DUMPSTATE := libdumpstate.flo
BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := $(TARGET_BOARD_PLATFORM)
TARGET_NO_RPC := true
BOARD_USES_ADRENO200 := true
HAVE_ADRENO200_SOURCE := true
HAVE_ADRENO200_SC_SOURCE := true
HAVE_ADRENO200_FIRMWARE := true
TARGET_USES_AOSP := true
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_CACHEIMAGE_PARTITION_SIZE := 33554432
BOARD_PERSISTIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_PERSISTIMAGE_PARTITION_SIZE := 5242880
TARGET_RELEASETOOLS_EXTENSIONS := device/asus/flo
-include vendor/asus/flo/BoardConfigVendor.mk

45
CleanSpec.mk Normal file
View File

@ -0,0 +1,45 @@
# Copyright (C) 2007 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# If you don't need to do a full clean build but would like to touch
# a file or delete some intermediate files, add a clean step to the end
# of the list. These steps will only be run once, if they haven't been
# run before.
#
# E.g.:
# $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
# $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
#
# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
# files that are missing or have been moved.
#
# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
# Use $(OUT_DIR) to refer to the "out" directory.
#
# If you need to re-do something that's already mentioned, just copy
# the command and add it to the bottom of the list. E.g., if a change
# that you made last week required touching a file and a change you
# made today requires touching the same file, just copy the old
# touch step and add it to the end of the list.
#
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
# For example:
#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates)
#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates)
#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)

BIN
WCNSS_cfg.dat Executable file

Binary file not shown.

221
WCNSS_qcom_cfg.ini Normal file
View File

@ -0,0 +1,221 @@
# This file allows user to override the factory
# defaults for the WLAN Driver
# Enable IMPS or not
gEnableImps=1
# Enable/Disable Idle Scan
gEnableIdleScan=0
# Increase sleep duration (seconds) during IMPS
# 0 implies no periodic wake up from IMPS. Periodic wakeup is
# unnecessary if Idle Scan is disabled.
gImpsModSleepTime=0
# Enable BMPS or not
gEnableBmps=1
# Enable Close Loop or not
gEnableCloseLoop=1
# Enable suspend or not
# 1: Enable standby, 2: Enable Deep sleep, 3: Enable Mcast/Bcast Filter
gEnableSuspend=3
# Phy Mode (auto, b, g, n, etc)
gDot11Mode=0
# Handoff Enable(1) Disable(0)
gEnableHandoff=0
# CSR Roaming Enable(1) Disable(0)
gRoamingTime=0
# Assigned MAC Addresses - This will be used until NV items are in place
# Each byte of MAC address is represented in Hex format as XX
Intf0MacAddress=000AF58989FF
Intf1MacAddress=000AF58989FE
Intf2MacAddress=000AF58989FD
Intf3MacAddress=000AF58989FC
# UAPSD service interval for VO,VI, BE, BK traffic
InfraUapsdVoSrvIntv=0
InfraUapsdViSrvIntv=0
InfraUapsdBeSrvIntv=0
InfraUapsdBkSrvIntv=0
# Enable Firmware RSSI monitoring for roaming
gEnableFWRssiMonitoring=1
# Make 1x1 the default antenna configuration
gNumRxAnt=1
# Beacon filtering frequency (unit in beacon intervals)
gNthBeaconFilter=50
# Enable WAPI or not
# WAPIIsEnabled=0
# Flags to filter Mcast and Bcast RX packets.
# Value 0: No filtering, 1: Filter all Multicast.
# 2: Filter all Broadcast. 3: Filter all Mcast and Bcast
McastBcastFilter=3
#Flag to enable HostARPOffload feature or not
hostArpOffload=0
#SoftAP Related Parameters
# AP MAc addr (obsolete)
gAPMacAddr=000AF58989EF
# Enable Random BSSID
gEnableApRandomBssid=1
# 802.11n Protection flag
gEnableApProt=1
# Enable OBSS protection
gEnableApOBSSProt=0
# Enable/Disable UAPSD for SoftAP
gEnableApUapsd=1
# Fixed Rate
gFixedRate=0
# Maximum Tx power
# gTxPowerCap=30
# Fragmentation Threshold
# gFragmentationThreshold=2346
# RTS threshold
RTSThreshold=2347
# Intra-BSS forward
gDisableIntraBssFwd=0
# WMM Enable/Disable
WmmIsEnabled=0
# 802.11d support
g11dSupportEnabled=1
# CCX Support and fast transition
CcxEnabled=0
FastTransitionEnabled=1
ImplicitQosIsEnabled=1
gNeighborScanTimerPeriod=200
gNeighborLookupThreshold=76
gNeighborReassocThreshold=81
gNeighborScanChannelMinTime=20
gNeighborScanChannelMaxTime=30
gMaxNeighborReqTries=3
# Legacy (non-CCX, non-802.11r) Fast Roaming Support
# To enable, set FastRoamEnabled=1, gEnableFWRssiMonitoring=1, FastTransitionEnabled=1
# To disable, set FastRoamEnabled=0, gEnableFWRssiMonitoring=0, FastTransitionEnabled=0
FastRoamEnabled=1
#Check if the AP to which we are roaming is better than current AP in terms of RSSI.
#Checking is disabled if set to Zero.Otherwise it will use this value as to how better
#the RSSI of the new/roamable AP should be for roaming
RoamRssiDiff=3
#Configure the RSSI gap that will be used to partition/categorize width of
#each individual category (aka bucket).
gRssiCatGap=5
# SAP Country code
# Default Country Code is 2 bytes, 3rd byte is optional indoor or out door.
# Example
# US Indoor, USI
# Korea Outdoor, KRO
# Japan without optional byte, JP
# France without optional byte, FR
#gAPCntryCode=USI
#Short Guard Interval Enable/disable
gShortGI20Mhz=1
gShortGI40Mhz=1
#Auto Shutdown Value in seconds. A value of 0 means Auto shutoff is disabled
gAPAutoShutOff=0
# SAP auto channel selection configuration
# 0 = disable auto channel selection
# 1 = enable auto channel selection, channel provided by supplicant will be ignored
gApAutoChannelSelection=0
# Listen Energy Detect Mode Configuration
# Valid values 0-128
# 128 means disable Energy Detect feature
# 0-9 are threshold code and 7 is recommended value from system if feature is to be enabled.
# 10-128 are reserved.
# The EDET threshold mapping is as follows in 3dB step:
# 0 = -60 dBm
# 1 = -63 dBm
# 2 = -66 dBm
# ...
# 7 = -81 dBm
# 8 = -84 dBm
# 9 = -87 dBm
# Note: Any of these settings are valid. Setting 0 would yield the highest power saving (in a noisy environment) at the cost of more range. The range impact is approximately #calculated as:
#
# Range Loss (dB) = EDET threshold level (dBm) + 97 dBm.
#
gEnablePhyAgcListenMode=128
#Preferred band (both or 2.4 only or 5 only)
BandCapability=0
#Forced Device Listen Interval in multiples of DTIM Period aligned to DTIM
gEnableModulatedDTIM=3
#Beacon Early Termination (1 = enable the BET feature, 0 = disable)
enableBeaconEarlyTermination=1
beaconEarlyTerminationWakeInterval=11
#Bluetooth Alternate Mac Phy (1 = enable the BT AMP feature, 0 = disable)
gEnableBtAmp=0
#Preferred channel to start BT AMP AP mode (0 means, any channel)
BtAmpPreferredChannel=0
#SOFTAP Channel Range selection
gAPChannelSelectStartChannel=1
gAPChannelSelectEndChannel=11
#SOFTAP Channel Range selection Operating band
# 0:2.4GHZ 1: LOW-5GHZ 2:MID-5GHZ 3:HIGH-5GHZ 4: 4.9HZ BAND
gAPChannelSelectOperatingBand=0
#Enable Keep alive with non-zero period value
gStaKeepAlivePeriod = 25
#If set will start with active scan after driver load, otherwise will start with
#passive scan to find out the domain
gEnableBypass11d=1
#If set to 0, will not scan DFS channels
gEnableDFSChnlScan=0
# Enable logp/SSR
gEnableLogp=1
# Disable HT40
gChannelBondingMode5GHz=0
# Enable Automatic Tx Power control
gEnableAutomaticTxPowerControl=1
# Derive P2P MAC address from primary MAC address
isP2pDeviceAddrAdministrated=1
# Disable channel 165 for Indonesia
gIgnore_Chan165=1
END
# Note: Configuration parser would not read anything past the END marker

BIN
WCNSS_qcom_wlan_nv.bin Executable file

Binary file not shown.

View File

@ -0,0 +1,15 @@
# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
type SPECIAL_FUNCTION

View File

@ -0,0 +1 @@
key 256 HEADSETHOOK WAKE

100
audio_policy.conf Normal file
View File

@ -0,0 +1,100 @@
# Global configuration section: lists input and output devices always present on the device
# as well as the output device selected by default.
# Devices are designated by a string that corresponds to the enum in audio.h
global_configuration {
attached_output_devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER
default_output_device AUDIO_DEVICE_OUT_SPEAKER
attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BACK_MIC
}
# audio hardware module section: contains descriptors for all audio hw modules present on the
# device. Each hw module node is named after the corresponding hw module library base name.
# For instance, "primary" corresponds to audio.primary.<device>.so.
# The "primary" module is mandatory and must include at least one output with
# AUDIO_OUTPUT_FLAG_PRIMARY flag.
# Each module descriptor contains one or more output profile descriptors and zero or more
# input profile descriptors. Each profile lists all the parameters supported by a given output
# or input stream category.
# The "channel_masks", "formats", "devices" and "flags" are specified using strings corresponding
# to enums in audio.h and audio_policy.h. They are concatenated by use of "|" without space or "\n".
audio_hw_modules {
primary {
outputs {
primary {
sampling_rates 44100|48000
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL
flags AUDIO_OUTPUT_FLAG_PRIMARY
}
deep_buffer {
sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL
flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER
}
hdmi {
sampling_rates 44100|48000
channel_masks dynamic
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_AUX_DIGITAL
flags AUDIO_OUTPUT_FLAG_DIRECT
}
}
inputs {
primary {
sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000
channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_VOICE_CALL|AUDIO_DEVICE_IN_BACK_MIC
}
}
}
a2dp {
outputs {
a2dp {
sampling_rates 44100
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_ALL_A2DP
}
}
}
usb {
outputs {
usb_accessory {
sampling_rates 44100
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_USB_ACCESSORY
}
usb_device {
sampling_rates 44100
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_USB_DEVICE
}
}
}
r_submix {
outputs {
submix {
sampling_rates 44100|48000
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_REMOTE_SUBMIX
}
}
inputs {
submix {
sampling_rates 44100|48000
channel_masks AUDIO_CHANNEL_IN_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_IN_REMOTE_SUBMIX
}
}
}
}

32
bdAddrLoader/Android.mk Normal file
View File

@ -0,0 +1,32 @@
#
# Copyright 2012 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
ifneq ($(filter msm8960 ,$(TARGET_DEVICE)),)
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := addrloader.c
LOCAL_C_INCLUDES := \
$(LOCAL_PATH) \
$(TARGET_OUT_HEADERS)/common/inc
LOCAL_SHARED_LIBRARIES := libcutils
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_OWNER := qcom
LOCAL_MODULE := bdAddrLoader
include $(BUILD_EXECUTABLE)
endif

190
bdAddrLoader/NOTICE Normal file
View File

@ -0,0 +1,190 @@
Copyright (c) 2005-2012, The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS

293
bdAddrLoader/addrloader.c Normal file
View File

@ -0,0 +1,293 @@
/*
* Copyright 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <getopt.h>
#define LOG_TAG "bdAddrLoader"
#include <cutils/log.h>
#include <cutils/properties.h>
#define FILE_PATH_MAX 100
#define BD_ADDR_LEN 6
#define BD_ADDR_STR_LEN 18
#define ARG_TYPE_PATH_FILE 0x11
#define ARG_TYPE_PATH_PROP 0x12
#define ARG_TYPE_DATA_HEX 0x21
#define ARG_TYPE_DATA_ASCII 0x22
typedef struct _ArgEl
{
const char *szSrc; // Source Path
int nPathType; // Type of Source Path
int nDataType; // Type of Data
}ArgEl;
typedef ArgEl InArg;
#define DEFAULT_BDADDR_PROP "persist.service.bdroid.bdaddr"
typedef struct _OutArg
{
ArgEl dest;
char cSeperator; // a character to be used for sperating like ':' of "XX:XX:XX:XX:XX:XX"
char bPrintOut; // Print out bd addr in standard out or not
}OutArg;
typedef struct _LoadedData
{
union {
unsigned char bin[BD_ADDR_LEN];
char sz[BD_ADDR_STR_LEN];
}data;
int nDataType;
}LoadedBDAddr;
typedef enum _res
{
SUCCESS = 0,
FAIL
}Res;
int hexa_to_ascii(const unsigned char* hexa, char* ascii, int nHexLen)
{
int i, j;
char hex_table[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F'};
for (i = 0, j = 0; i <nHexLen; i++, j += 2) {
ascii[j] = hex_table[hexa[i] >> 4];
ascii[j + 1] = hex_table[hexa[i] & 0x0F];
}
ascii[nHexLen*2] = '\0';
ALOGI("hex_to_ascii() - converted Data (%s)", ascii);
return SUCCESS;
}
int readBDAddrData(const char* szFilePath, unsigned char* addrData, int nDataLen)
{
int nFd, nRdCnt;
nFd = open(szFilePath, O_RDONLY);
if(nFd < 0){
ALOGW("There is no Address File in FTM area : %s\n", szFilePath);
return FAIL;
}
nRdCnt = read(nFd, addrData, nDataLen);
if(nRdCnt != nDataLen){
ALOGE("Fail to read Address data from FTM area\n");
close(nFd);
return FAIL;
}
close(nFd);
return SUCCESS;
}
void formattingBdAddr(char *szBDAddr, const char cSep)
{
int i=1, j=0;
int pos=0;
for(i=1; i<BD_ADDR_LEN; i++){
pos = strlen(szBDAddr);
for(j=0; j<(BD_ADDR_LEN*2)-i*2; j++){
szBDAddr[pos-j] = szBDAddr[pos-j-1];
}
szBDAddr[pos-j]=cSep;
}
}
int readBDAddr(InArg inArg, LoadedBDAddr *loadedBDAddr)
{
Res res = FAIL;
unsigned char addrData[BD_ADDR_LEN] = {0,};
int nDataLen = 0;
ALOGI("Read From %s by Path type(0x%2x), Data type (0x%2x)", inArg.szSrc, inArg.nPathType, inArg.nDataType);
if(inArg.nPathType == ARG_TYPE_PATH_FILE){
switch(inArg.nDataType){
case ARG_TYPE_DATA_HEX:
if(!readBDAddrData(inArg.szSrc, loadedBDAddr->data.bin, BD_ADDR_LEN)){
loadedBDAddr->nDataType = ARG_TYPE_DATA_HEX;
return SUCCESS;
}
break;
case ARG_TYPE_DATA_ASCII:
if(!readBDAddrData(inArg.szSrc, (unsigned char *)loadedBDAddr->data.sz, BD_ADDR_STR_LEN)){
loadedBDAddr->nDataType = ARG_TYPE_DATA_ASCII;
return SUCCESS;
}
break;
default:
return FAIL;
}
}else if(inArg.nPathType == ARG_TYPE_PATH_PROP){
switch(inArg.nDataType){
case ARG_TYPE_DATA_HEX:
if(property_get(inArg.szSrc, (char *)loadedBDAddr->data.bin, "")>=0){
loadedBDAddr->nDataType = ARG_TYPE_DATA_HEX;
return SUCCESS;
}
break;
case ARG_TYPE_DATA_ASCII:
if(property_get(inArg.szSrc, loadedBDAddr->data.sz, "")>=0){
loadedBDAddr->nDataType = ARG_TYPE_DATA_ASCII;
return SUCCESS;
}
break;
default:
return FAIL;
}
}else{
ALOGE("Error invalid argument : (%d)", inArg.nPathType);
}
ALOGE("Fail to read BDAddr from %s", inArg.szSrc);
return FAIL;
}
int writeBDAddr(OutArg outArg, LoadedBDAddr *loadedBDAddr)
{
char szTmp[BD_ADDR_STR_LEN] = {0,};
ALOGI("Output Data type(0x%2x), bPrintout(%d), bPath(%s)",
outArg.dest.nDataType, outArg.bPrintOut, outArg.dest.szSrc);
ALOGI("Loaded Data type(0x%2x)", loadedBDAddr->nDataType);
if(outArg.dest.nDataType == ARG_TYPE_DATA_ASCII
&& loadedBDAddr->nDataType == ARG_TYPE_DATA_HEX
){
if(!hexa_to_ascii(loadedBDAddr->data.bin, szTmp, BD_ADDR_LEN)){
memcpy(loadedBDAddr->data.sz, szTmp, BD_ADDR_STR_LEN);
loadedBDAddr->nDataType = ARG_TYPE_DATA_ASCII;
}
else{
ALOGE("Fail to convert data");
return FAIL;
}
}
if(loadedBDAddr->nDataType == ARG_TYPE_DATA_ASCII){
// check out which addr data is already formated
if(strchr(loadedBDAddr->data.sz, '.') == NULL
&& strchr(loadedBDAddr->data.sz, ':') == NULL
){
formattingBdAddr(loadedBDAddr->data.sz, outArg.cSeperator);
}
}
// print out szBDAddr
if(outArg.bPrintOut
&& loadedBDAddr->nDataType == ARG_TYPE_DATA_ASCII
&& strlen(loadedBDAddr->data.sz)==(BD_ADDR_STR_LEN-1)) {
printf("%s",loadedBDAddr->data.sz);
if (property_set(DEFAULT_BDADDR_PROP, loadedBDAddr->data.sz) < 0)
ALOGE("Failed to set address in prop %s", DEFAULT_BDADDR_PROP);
}
else{
ALOGE("Invalid Data is loaded : %s", loadedBDAddr->data.sz);
return FAIL;
}
// TODO :: writing File or Property
return SUCCESS;
}
int main(int argc, char *argv[])
{
int nFd, nRdCnt;
int c;
InArg inArg;
OutArg outArg;
LoadedBDAddr loadedBDAddr;
//initialize arg
memset(&inArg, 0, sizeof(InArg));
memset(&outArg, 0, sizeof(OutArg));
memset(&loadedBDAddr, 0, sizeof(LoadedBDAddr));
//load args;
while((c=getopt(argc, argv, ":f:p:hsx")) != -1){
switch(c){
case 'f': // input path
if(optarg != NULL){
ALOGI("option : f=%s", optarg);
inArg.szSrc = optarg;
}else{
ALOGW("Invalid Argument(%s) of input path", optarg);
}
inArg.nPathType = ARG_TYPE_PATH_FILE;
break;
case 'p': // output path
if(optarg != NULL){
ALOGI("option : p=%s", optarg);
inArg.szSrc = optarg;
}else{
ALOGW("Invalid Argument(%s) of out Path", optarg);
}
inArg.nPathType = ARG_TYPE_PATH_PROP;
break;
case 'h': // data type to be read is hex
ALOGI("option : h");
inArg.nDataType = ARG_TYPE_DATA_HEX;
break;
case 's': // data type to be read is ascii
ALOGI("option : s");
inArg.nDataType = ARG_TYPE_DATA_ASCII;
break;
case 'x':
ALOGI("option : x");
outArg.bPrintOut = 1; //true
break;
default:
ALOGW("Unknown option : %c", c);
break;
}
}
// setting up Arguments with default value
outArg.cSeperator = ':';
outArg.dest.nDataType = ARG_TYPE_DATA_ASCII;
// load bd addr and print out bd addr in formated ascii
if(readBDAddr(inArg, &loadedBDAddr)){
ALOGE("Fail to load data !!");
return FAIL;
}
if(writeBDAddr(outArg, &loadedBDAddr)){
ALOGE("Fail to write data !!");
return FAIL;
}
return 1;
}

View File

@ -0,0 +1,23 @@
/*
* Copyright (C) 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _BDROID_BUILDCFG_H
#define _BDROID_BUILDCFG_H
#define BTM_DEF_LOCAL_NAME "Nexus 4"
#define BTA_DISABLE_DELAY 1000 /* in milliseconds */
#endif

1
board-info.txt Normal file
View File

@ -0,0 +1 @@
require board=MSM8960|FLO

30
charger_touch/Android.mk Normal file
View File

@ -0,0 +1,30 @@
#
# Copyright 2012 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
ifneq ($(filter msm8960 ,$(TARGET_DEVICE)),)
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := charger_touch.c
LOCAL_SHARED_LIBRARIES := libcutils libhardware_legacy
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_PATH := $(TARGET_OUT)/bin
LOCAL_MODULE := charger_touch
LOCAL_MODULE_OWNER := qcom
include $(BUILD_EXECUTABLE)
endif

190
charger_touch/NOTICE Normal file
View File

@ -0,0 +1,190 @@
Copyright (c) 2005-2012, The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS

View File

@ -0,0 +1,121 @@
/*
* Copyright (C) 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#define LOG_TAG "CHARGER_TOUCH"
#include <hardware_legacy/uevent.h>
#include <utils/Log.h>
#include <fcntl.h>
#define POWER_SUPPLY_PATH "/sys/class/power_supply"
#define TOUCH_PATH "/sys/devices/virtual/input/qcom_touch/charger"
const char* WIRELESS = "change@/devices/platform/bq51051b_wlc/power_supply/wireless";
const char* USB = "change@/devices/platform/msm_ssbi.0/pm8921-core/pm8921-charger/power_supply/usb";
enum {
NO_CHARGER,
CHARGER_WIRELESS,
CHARGER_USB,
CHARGER_AC
};
static void read_path(const char* path, char* buf, size_t size)
{
int fd = open(path, O_RDONLY, 0);
int count;
if (fd < 0) {
ALOGE("Could not open %s", path);
return;
}
count = read(fd, buf, size);
close(fd);
}
static void write_path(int type)
{
int fd = open(TOUCH_PATH, O_RDWR, 0);
char buf[2];
if (fd < 0) {
ALOGE("Could not open %s", TOUCH_PATH);
return;
}
snprintf(buf, sizeof(buf), "%d", type);
write(fd, buf, 1);
close(fd);
}
static void handle_uevent(const char* udata)
{
const char *str = udata;
char path[PATH_MAX];
char wlc[2], usb[2], ac[2];
int type = NO_CHARGER;
memset(wlc, 0, 2);
memset(usb, 0, 2);
memset(ac, 0, 2);
if (!strncmp(str, WIRELESS, strlen(WIRELESS))) {
snprintf(path, sizeof(path), "%s/wireless/online", POWER_SUPPLY_PATH);
read_path(path, wlc, 1);
if (!strncmp(wlc, "1", 1))
type = CHARGER_WIRELESS;
ALOGE("Type: %d", type);
write_path(type);
} else if (!strncmp(str, USB, strlen(USB))) {
snprintf(path, sizeof(path), "%s/usb/online", POWER_SUPPLY_PATH);
read_path(path, usb, 1);
snprintf(path, sizeof(path), "%s/pm8921-dc/online", POWER_SUPPLY_PATH);
read_path(path, ac, 1);
if (!strncmp(usb, "1", 1)) {
type = CHARGER_USB;
} else if (!strncmp(ac, "1", 1)) {
type = CHARGER_AC;
}
ALOGE("Type: %d", type);
write_path(type);
}
}
static void event_loop(void)
{
int len = 0;
static char udata[4096];
memset(udata, 0, sizeof(udata));
uevent_init();
while (1) {
len = uevent_next_event(udata, sizeof(udata) - 2);
handle_uevent(udata);
}
}
int main()
{
event_loop();
return 0;
}

87
conn_init/Android.mk Normal file
View File

@ -0,0 +1,87 @@
#
# Copyright 2012 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
ifneq ($(filter msm8960 ,$(TARGET_DEVICE)),)
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libwfcu
LOCAL_SRC_FILES := wfc_util_fctrl.c \
wfc_util_common.c
LOCAL_CFLAGS := -Wall \
-Werror
LOCAL_CFLAGS += -DCONFIG_LGE_WLAN_WIFI_PATCH
ifeq ($(BOARD_HAS_QCOM_WLAN), true)
LOCAL_SRC_FILES += wfc_util_qcom.c
LOCAL_CFLAGS += -DCONFIG_LGE_WLAN_QCOM_PATCH
LOCAL_CFLAGS += -DWLAN_CHIP_VERSION_WCNSS
endif
LOCAL_SHARED_LIBRARIES := libcutils
LOCAL_PRELINK_MODULE := false
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_OWNER := qcom
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := conn_init.c
LOCAL_SHARED_LIBRARIES := libcutils
LOCAL_SHARED_LIBRARIES += libwfcu
LOCAL_CFLAGS += -Wall -Werror
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_PATH := $(TARGET_OUT)/bin
LOCAL_MODULE := conn_init
LOCAL_MODULE_OWNER := qcom
# Make sure the symlinks get created as well.
LOCAL_REQUIRED_MODULES := WCNSS_qcom_cfg.ini WCNSS_qcom_wlan_nv.bin
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_MODULE := WCNSS_qcom_cfg.ini
LOCAL_MODULE_CLASS := FAKE
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_OWNER := qcom
include $(BUILD_SYSTEM)/base_rules.mk
$(LOCAL_BUILT_MODULE): TARGET := /data/misc/wifi/$(LOCAL_MODULE)
$(LOCAL_BUILT_MODULE): SYMLINK := $(TARGET_OUT_VENDOR)/firmware/wlan/prima/$(LOCAL_MODULE)
$(LOCAL_BUILT_MODULE):
$(hide) echo "Symlink: $(SYMLINK) -> $(TARGET)"
$(hide) mkdir -p $(dir $@)
$(hide) mkdir -p $(dir $(SYMLINK))
$(hide) rm -rf $@
$(hide) rm -rf $(SYMLINK)
$(hide) ln -sf $(TARGET) $(SYMLINK)
$(hide) touch $@
include $(CLEAR_VARS)
LOCAL_MODULE := WCNSS_qcom_wlan_nv.bin
LOCAL_MODULE_CLASS := FAKE
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_OWNER := qcom
include $(BUILD_SYSTEM)/base_rules.mk
$(LOCAL_BUILT_MODULE): TARGET := /data/misc/wifi/$(LOCAL_MODULE)
$(LOCAL_BUILT_MODULE): SYMLINK := $(TARGET_OUT_VENDOR)/firmware/wlan/prima/$(LOCAL_MODULE)
$(LOCAL_BUILT_MODULE):
$(hide) echo "Symlink: $(SYMLINK) -> $(TARGET)"
$(hide) mkdir -p $(dir $@)
$(hide) mkdir -p $(dir $(SYMLINK))
$(hide) rm -rf $@
$(hide) rm -rf $(SYMLINK)
$(hide) ln -sf $(TARGET) $(SYMLINK)
$(hide) touch $@
endif

190
conn_init/NOTICE Normal file
View File

@ -0,0 +1,190 @@
Copyright (c) 2005-2012, The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS

56
conn_init/conn_init.c Normal file
View File

@ -0,0 +1,56 @@
/*
* Copyright 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <stdio.h>
#include <string.h>
#include <unistd.h>
extern int wfc_util_qcom_check_config(unsigned char *nv_mac_addr);
extern void wfc_util_atoh(char *pAsciiString, int szAsciiString, unsigned char *pHexaBuff, int szHexaBuff);
static int wifi_check_qcom_cfg_files()
{
char macAddress[13];
char hex[7];
memset(macAddress, 0, 13);
memset(hex, 0, 7);
// Read MAC String
FILE *fp = NULL;
int n = 0;
fp = fopen("/persist/wifi/.macaddr", "r");
if ( fp == NULL )
{
wfc_util_qcom_check_config((unsigned char *)macAddress);
return 0;
}
else
{
n = fread(macAddress, 12, 1, fp);
fclose(fp);
// Write MAC String
wfc_util_atoh( macAddress, 12, (unsigned char *)hex, 6);
wfc_util_qcom_check_config((unsigned char *)hex);
}
return 1;
}
int main(void)
{
wifi_check_qcom_cfg_files();
return 0;
}

135
conn_init/wfc_util_common.c Normal file
View File

@ -0,0 +1,135 @@
/*
* Copyright 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "wfc_util_log.h"
#define WFC_UTIL_RANDOM_MAC_HEADER "001122"
void wfc_util_htoa(unsigned char *pHexaBuff, int szHexaBuff, char *pAsciiStringBuff, int szAsciiStringBuff)
{
int i, j;
char hex_table[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F'};
if ((szHexaBuff*2) > szAsciiStringBuff) {
wfc_util_log_error("wfc_util_htoa : not enough buffer size(%d)", szAsciiStringBuff);
return;
}
memset(pAsciiStringBuff, 0, szAsciiStringBuff);
/* for (i = szHexaBuff-1, j = 0; i >= 0; i--, j += 2) { */
for (i = 0, j = 0; i < szHexaBuff; i++, j += 2) {
/*pAsciiStringBuff[j] = hex_table[(pHexaBuff[i] >> 4) & 0x0F];
*/
pAsciiStringBuff[j] = hex_table[pHexaBuff[i] >> 4];
pAsciiStringBuff[j + 1] = hex_table[pHexaBuff[i] & 0x0F];
}
return;
}
void wfc_util_atoh(char *pAsciiString, int szAsciiString, unsigned char *pHexaBuff, int szHexaBuff)
{
int i, pos;
char temp;
if ( 0!=(szAsciiString%2) || (szHexaBuff*2) < szAsciiString) {
wfc_util_log_error("wfc_util_atoh : not enough buffer size(%d)", szHexaBuff);
return;
}
memset(pHexaBuff, 0, szHexaBuff);
for (i=0 ; i<szAsciiString ; i++) {
/* pos = (szAsciiString - i - 1) / 2; */
pos = i / 2;
temp = pAsciiString[i];
if (temp >= '0' && temp <= '9') {
temp = temp - '0';
} else if ( temp >= 'a' && temp <= 'f' ) {
temp = temp - 'a' + 10;
} else if ( temp >= 'A' && temp <= 'F' ) {
temp = temp - 'A' + 10;
} else {
temp = 0;
}
if (0==i%2) {
pHexaBuff[pos] = temp<<4;
} else {
pHexaBuff[pos] |= temp;
}
}
return;
}
/*
* wfc_util_is_random_mac
*
* return : it will return 1 if [mac_add] is same with WFC_UTIL_RANDOM_MAC_HEADER
* or will return 0 if not.
*/
int wfc_util_is_random_mac(char *mac_add)
{
if(0 == strncmp(mac_add, WFC_UTIL_RANDOM_MAC_HEADER, 6)) {
return 1;
}
return 0;
}
/*
* wfc_util_random_mac
*
* Create random MAC address
*
* return : void
*/
void wfc_util_random_mac(unsigned char* mac_addr)
{
unsigned long int rand_mac;
if(NULL == mac_addr) {
wfc_util_log_error("wfc_util_random_mac : buffer is NULL");
return;
}
/* Create random MAC address: offset 3, 4 and 5 */
srandom(time(NULL));
rand_mac=random();
#ifndef WFC_UTIL_RANDOM_MAC_HEADER
mac_addr[0] = (unsigned char)0x00;
mac_addr[1] = (unsigned char)0x11;
mac_addr[2] = (unsigned char)0x22;
#else /* WFC_UTIL_RANDOM_MAC_HEADER */
wfc_util_atoh(WFC_UTIL_RANDOM_MAC_HEADER, 6, mac_addr, 3);
#endif /* WFC_UTIL_RANDOM_MAC_HEADER */
mac_addr[3] = (unsigned char)rand_mac;
mac_addr[4] = (unsigned char)(rand_mac >> 8);
mac_addr[5] = (unsigned char)(rand_mac >> 16);
return;
}

View File

@ -0,0 +1,51 @@
/*
* Copyright 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __WFC_UTIL_COMMON_H__
#define __WFC_UTIL_COMMON_H__
/*
* wfc_util_htoa
*
* return : void
*/
extern void wfc_util_htoa(unsigned char *pHexaBuff, int szHexaBuff, char *pAsciiStringBuff, int szAsciiStringBuff);
/*
* wfc_util_atoh
*
* return : void
*/
extern void wfc_util_atoh(char *pAsciiString, int szAsciiString, unsigned char *pHexaBuff, int szHexaBuff);
/*
* wfc_util_is_random_mac
*
* return : it will return 1 if [mac_add] is same with WFC_UTIL_RANDOM_MAC_HEADER
* or will return 0 if not.
*/
extern int wfc_util_is_random_mac(char *mac_add);
/*
* wfc_util_random_mac
*
* Create random MAC address
*
* return : void
*/
void wfc_util_random_mac(unsigned char* mac_addr);
#endif

664
conn_init/wfc_util_fctrl.c Normal file
View File

@ -0,0 +1,664 @@
/*
* Copyright 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "wfc_util_log.h"
/*
static void wfc_util_printf(char *pSPointer, int length)
{
char *pPrintBuff = NULL;
if( NULL == pSPointer || 0 >= length ) {
wfc_util_log_error("wfc_util_printf : unvalid parameters");
return;
}
wfc_util_log_error("wfc_util_printf : lenght is (%d)", length);
pPrintBuff = malloc(length+1);
if( NULL != pPrintBuff ) {
memset( pPrintBuff, 0, (length+1) );
memcpy(pPrintBuff, pSPointer, length);
wfc_util_log_error("wfc_util_printf : %s", pPrintBuff);
free(pPrintBuff);
} else {
wfc_util_log_error("wfc_util_printf : can not malloc(%d)", (length+1));
}
return;
}
*/
static void wfc_util_finsert_new_string(int fd, char **ppReadedBuff, char *pNewStringValue, char *pEndOfCfg)
{
off_t sz_file;
int sz_backupBuff = 0;
char *pReadBuff = NULL, *pBackupBuff = NULL;
char *pSPointer = NULL, *pETagPointer = NULL;
if( 0 == fd || NULL == pNewStringValue || 0 == strlen(pNewStringValue) ) {
wfc_util_log_error("wfc_util_finsert_new_string : unvalid parameters");
return;
}
if( NULL == ppReadedBuff) {
// TODO:
return;
} else {
pReadBuff = *ppReadedBuff;
}
/*
* find END TAG string
*/
pETagPointer = strstr(pReadBuff, pEndOfCfg);
pSPointer = pETagPointer - 1;
/*
* calcurate file size and size of the tail of file
*/
sz_file = lseek( fd, 0, SEEK_END );
sz_backupBuff = (int)sz_file - (pETagPointer - pReadBuff);
/*
* prefare the buffer to store the tail of file
*/
pBackupBuff = malloc(sz_backupBuff);
if( NULL != pBackupBuff ) {
/*
* copy the tail of file.
*/
memset( pBackupBuff, 0, sz_backupBuff );
memcpy( pBackupBuff, pETagPointer, sz_backupBuff );
/*
* write new string.
*/
lseek( fd, (int)(pSPointer-pReadBuff), SEEK_SET );
write( fd, pNewStringValue, strlen(pNewStringValue));
/*
* update pETagPointer.
*/
pETagPointer = pSPointer + strlen(pNewStringValue);
/*
* write the tail of file.
*/
lseek( fd, (int)(pETagPointer-pReadBuff), SEEK_SET );
write( fd, pBackupBuff, sz_backupBuff );
ftruncate(fd, sz_file + strlen(pNewStringValue) - 1); /* we use "-1" becasue of "pSPointer = pETagPointer - 1"*/
free(pBackupBuff);
/*
* make new *ppReadedBuff
*/
if( NULL != ppReadedBuff) {
// TODO:
}
} else {
wfc_util_log_error("wfc_util_finsert_new_string : can not malloc(%d)", sz_backupBuff);
}
return;
}
static void wfc_util_fupdate_string(int fd, char **ppReadedBuff,
char *pETagPointer, char *pSValuePointer, char *pNewValueString)
{
off_t sz_file;
int sz_newReadBuff = 0;
char *pReadBuff = NULL, *pNewReadBuff = NULL, *pCurReadBuff = NULL;
if( 0 == fd ) {
wfc_util_log_error("wfc_util_fupdate_string : unvalid parameters");
return;
}
if( NULL == ppReadedBuff) {
// TODO:
return;
} else {
pReadBuff = *ppReadedBuff;
}
/*
* calcurate file size and new file size
*/
sz_file = lseek( fd, 0, SEEK_END );
sz_newReadBuff = (int)sz_file - (int)(pETagPointer - pSValuePointer) + strlen(pNewValueString);
/*
* prefare the buffer to read file
*/
pNewReadBuff = malloc(sz_newReadBuff);
if( NULL != pNewReadBuff ) {
/*
* copy buffer
*/
memset( pNewReadBuff, 0, sz_file );
pCurReadBuff = pNewReadBuff;
memcpy( pNewReadBuff, pReadBuff, (int)(pSValuePointer-pReadBuff) );
pCurReadBuff += (int)(pSValuePointer-pReadBuff);
/*
* copy new value string
*/
memcpy( pCurReadBuff, pNewValueString, strlen(pNewValueString));
pCurReadBuff += strlen(pNewValueString);
/*
* copy the remained buffer
*/
memcpy( pCurReadBuff, pETagPointer, ((int)(sz_file) - (int)(pETagPointer - pReadBuff) + 1));
/*
* write file and update the file size
*/
lseek( fd, 0, SEEK_SET );
write( fd, pNewReadBuff, sz_newReadBuff);
ftruncate(fd, sz_newReadBuff);
free(pNewReadBuff);
} else {
wfc_util_log_error("wfc_util_fupdate_string : can not malloc(%d)", (int)sz_newReadBuff);
}
return;
}
/*
* wfc_util_fset_buffer
*
* return : void
*/
void wfc_util_fset_buffer(char *pFileName, int positionStart, unsigned char *pNewValue, int newValueLength)
{
int fd;
off_t sz_file;
char *pReadBuff = NULL;
fd = open( pFileName, O_RDWR );
if( fd >= 0 ) {
/*
* calcurate file size
*/
sz_file = lseek( fd, 0, SEEK_END );
/*
* prefare the buffer to read file
*/
pReadBuff = malloc(sz_file + 1); // null terminated
if( NULL != pReadBuff ) {
/*
* read file
*/
memset( pReadBuff, 0, sz_file + 1);
lseek( fd, 0, SEEK_SET );
read( fd, pReadBuff, sz_file );
if(sz_file >= (positionStart+newValueLength)) {
lseek( fd, positionStart, SEEK_SET );
write( fd, pNewValue, newValueLength );
} else {
/*
* insert with new length value buffer
*/
wfc_util_log_error("wfc_util_fset_buffer : file size(%d) is less than to write position(%d)", (int)sz_file, (positionStart+newValueLength));
// TODO:
}
free(pReadBuff);
} else {
wfc_util_log_error("wfc_util_fset_buffer : can not malloc(%d)", (int)sz_file);
}
if ( -1 == fsync( fd ) ) {
wfc_util_log_error("wfc_util_fset_buffer : fail to fsync()");
}
close( fd );
} else {
wfc_util_log_error("wfc_util_fset_buffer : can not open file");
}
return;
}
/*
* wfc_util_fget_buffer
*
* return : it will return the length of the stored buffer value if procedure is success
* or will return 0 if not.
*/
int wfc_util_fget_buffer(char *pFileName, int positionStart, int lengthToRead, unsigned char *pValueBuff, int buffLength)
{
int result = 0;
int fd;
off_t sz_file;
char *pReadBuff = NULL;
char *pSValuePointer = NULL, *pETagPointer = NULL;
fd = open( pFileName, O_RDONLY );
if( fd >= 0 ) {
/*
* calcurate file size
*/
sz_file = lseek( fd, 0, SEEK_END );
if(sz_file >= (positionStart+lengthToRead)) {
/*
* prefare the buffer to read file
*/
pReadBuff = malloc(sz_file + 1); // null terminated
if( NULL != pReadBuff ) {
/*
* read file
*/
memset( pReadBuff, 0, sz_file + 1 );
lseek( fd, 0, SEEK_SET );
read( fd, pReadBuff, sz_file );
/*
* calculate the start buffer pointer
*/
pSValuePointer = pReadBuff + positionStart;
/*
* calculate the end buffer pointer
*/
pETagPointer = pSValuePointer + lengthToRead;
/*
* read the string value
*/
if( buffLength >= (int)(pETagPointer-pSValuePointer) ) {
memset( pValueBuff, 0, buffLength );
memcpy( pValueBuff, pSValuePointer, (int)(pETagPointer-pSValuePointer) );
result = (int)(pETagPointer-pSValuePointer);
} else {
wfc_util_log_error("wfc_util_fget_buffer : not enough string value buffer(%d)", (int)(pETagPointer-pSValuePointer));
}
free(pReadBuff);
} else {
wfc_util_log_error("wfc_util_fget_buffer : can not malloc(%d)", (int)sz_file);
}
} else {
wfc_util_log_error("wfc_util_fget_buffer : file size(%d) is less than to read position(%d)", (int)sz_file, (positionStart+lengthToRead));
}
close( fd );
} else {
wfc_util_log_error("wfc_util_fget_buffer : can not open file");
}
return result;
}
/*
* wfc_util_fset_string
*
* The following format string will be added or updated to the file pFileName.
* [pSTagString][pNewValueString][pETagString]
*
* pFileName : file name and path
* pEndOfCfg : tag string to notify the end of configuration file
* pSTagString : tag string to notify purpose of the value
* pETagString : tag string to notify the end of the value
* pNewValueString : string to set for pSTagString
*
* return : void
*/
void wfc_util_fset_string(char *pFileName, char *pEndOfCfg, char *pSTagString, char *pETagString, char *pNewValueString)
{
int fd;
off_t sz_file;
int sz_NewValueBuff = 0;
char *pReadBuff = NULL, *pNewValueBuff = NULL;
char *pSPointer = NULL, *pETagPointer = NULL, *pSValuePointer = NULL;
fd = open( pFileName, O_RDWR );
if( fd >= 0 ) {
/*
* calcurate file size
*/
sz_file = lseek( fd, 0, SEEK_END );
/*
* prefare the buffer to read file
*/
if (sz_file > 0)
pReadBuff = malloc(sz_file + 1); // null terminated
if( NULL != pReadBuff ) {
/*
* read file
*/
memset( pReadBuff, 0x00, sz_file + 1);
if(lseek(fd, 0, SEEK_SET) != 0) {
wfc_util_log_error("lseek failure");
}
read( fd, pReadBuff, sz_file );
/* WBT fix, make sure it is terminated with \0 */
pReadBuff[sz_file] = '\0';
/*
* find TAG string
*/
pSPointer = strstr(pReadBuff, pSTagString);
if(NULL != pSPointer) {
/*
* find END OF LINE string
*/
pETagPointer = strstr(pSPointer, pETagString);
if(NULL != pETagPointer) {
/*
* write the new string value
*/
pSValuePointer = pSPointer+strlen(pSTagString);
if(strlen(pNewValueString) == (unsigned int)(pETagPointer-pSValuePointer)) {
lseek( fd, (int)(pSValuePointer-pReadBuff), SEEK_SET );
write( fd, pNewValueString, strlen(pNewValueString));
} else {
/*
* insert with new length value string
*/
wfc_util_fupdate_string(fd, &pReadBuff, pETagPointer, pSValuePointer, pNewValueString);
}
} else {
wfc_util_log_error("wfc_util_fset_string : can not find End TAG");
}
} else {
/*
* "\n""[Start TAG][String Value][End TAG]""\n"
*/
sz_NewValueBuff = strlen(pSTagString) +
strlen(pNewValueString) +
strlen(pETagString) +
2 + 1;
pNewValueBuff = malloc( sz_NewValueBuff);
if( NULL != pNewValueBuff ) {
/*
* prefare the new string to insert
*/
memset( pNewValueBuff, 0, sz_NewValueBuff );
sprintf( pNewValueBuff, "%c%s%s%s%c", '\n', pSTagString, pNewValueString, pETagString,'\n' );
/*
* insert new string to the file
*/
wfc_util_finsert_new_string(fd, &pReadBuff, pNewValueBuff, pEndOfCfg);
free( pNewValueBuff );
} else {
wfc_util_log_error("wfc_util_fset_string : can not malloc(%d)", (int)sz_file);
}
}
free(pReadBuff);
} else {
wfc_util_log_error("wfc_util_fset_string : can not malloc(%d)", (int)sz_file);
}
if ( -1 == fsync( fd ) ) {
wfc_util_log_error("wfc_util_fset_string : fail to fsync()");
}
close( fd );
} else {
wfc_util_log_error("wfc_util_fset_string : can not open file");
}
return;
}
/*
* wfc_util_fget_string
*
* Read value from the following format string in the file pFileName.
* [pSTagString][string value to read][pETagString]
*
* pFileName : file name and path
* pEndOfCfg : tag string to notify the end of configuration file
* pSTagString : tag string to notify purpose of the value
* pETagString : tag string to notify the end of the value
* pValueStringBuff : string buffer to get string value
* stringBuffLength : the length of pValueStringBuff
*
* return : it will return the length of the stored string value if procedure is success
* or will return 0 if not.
*/
int wfc_util_fget_string(char *pFileName, char *pEndOfCfg, char *pSTagString, char *pETagString, char *pValueStringBuff, int stringBuffLength)
{
int result = 0;
int fd;
off_t sz_file;
char *pReadBuff = NULL;
char *pSPointer = NULL, *pETagPointer = NULL, *pSValuePointer = NULL;
/* unused parameter*/
pEndOfCfg = pEndOfCfg;
fd = open( pFileName, O_RDONLY );
if( fd >= 0 ) {
/*
* calcurate file size
*/
sz_file = lseek( fd, 0, SEEK_END );
/*
* prefare the buffer to read file
*/
if (sz_file > 0) // skip when value is 0
pReadBuff = malloc(sz_file + 1);
if( NULL != pReadBuff ) {
/*
* read file
*/
memset( pReadBuff, 0, sz_file + 1);
if(lseek(fd, 0, SEEK_SET) != 0) {
wfc_util_log_error("lseek failure");
}
read( fd, pReadBuff, sz_file );
/* WBT fix, make sure it is terminated with \0 */
pReadBuff[sz_file] = '\0';
/*
* find TAG string
*/
pSPointer = strstr( pReadBuff, pSTagString );
if( NULL != pSPointer ) {
/*
* find END OF LINE string
*/
pETagPointer = strstr(pSPointer, pETagString);
if( NULL != pETagPointer ) {
/*
* read the string value
*/
pSValuePointer = pSPointer+strlen(pSTagString);
if( stringBuffLength >= (int)(pETagPointer-pSValuePointer) ) {
memset( pValueStringBuff, 0, stringBuffLength );
memcpy( pValueStringBuff, pSValuePointer, (int)(pETagPointer-pSValuePointer) );
result = (int)(pETagPointer-pSValuePointer);
} else {
wfc_util_log_error("wfc_util_fget_string : not enough string value buffer(%d)", (int)(pETagPointer-pSValuePointer));
}
} else {
wfc_util_log_error("wfc_util_fget_string : can not find End TAG");
}
} else {
wfc_util_log_error("wfc_util_fget_string : can not find Start TAG");
}
free(pReadBuff);
} else {
wfc_util_log_error("wfc_util_fget_string : can not malloc(%d)", (int)sz_file);
}
close( fd );
} else {
wfc_util_log_error("wfc_util_fget_string : can not open file");
}
return result;
}
/*
* wfc_util_ffile_check
*
* check whether pDestFName file exist or not
*
* pFileName : file name and path
* access_mode : R_OK | W_OK | X_OK | F_OK
*
* return : it will return 0 if the file exist
* or will return -1 if not.
*/
int wfc_util_ffile_check(char *pDestFName, int access_mode)
{
struct stat st;
if (access(pDestFName, access_mode) == 0) {
if( stat( pDestFName, &st ) < 0 ) {
wfc_util_log_error("Cannot stat the file \"%s\": %s", pDestFName, strerror(errno));
return -1;
}
//check if config file has some data or is it empty due to previous errors
if( st.st_size ) {
return 0;
}
} else {
wfc_util_log_error("Cannot access \"%s\": %s", pDestFName, strerror(errno));
}
return -1;
}
/*
* wfc_util_ffile_check_copy
*
* check whether pDestFName file exist if not it will copy from pSourceFName file
*
* return : it will return 0 if procedure is success
* or will return -1 if not.
*/
int wfc_util_ffile_check_copy(char *pDestFName, char *pSourceFName, mode_t mode, uid_t uID, gid_t gID)
{
#define WFC_BUFFER_SIZE 2048
char buf[WFC_BUFFER_SIZE] = {0}; // Null terminated
int srcfd, destfd;
int nread;
struct stat st;
if (access(pDestFName, R_OK|W_OK) == 0) {
if( stat( pDestFName, &st ) < 0 ) {
wfc_util_log_error("Cannot stat the file \"%s\": %s", pDestFName, strerror(errno));
return -1;
}
//check if config file has some data or is it empty due to previous errors
if( st.st_size ) {
return 0;
}
//else continue to write the config from default template.
} else if (errno != ENOENT) {
wfc_util_log_error("Cannot access \"%s\": %s", pDestFName, strerror(errno));
return -1;
}
srcfd = open(pSourceFName, O_RDONLY);
if (srcfd < 0) {
wfc_util_log_error("Cannot open \"%s\": %s", pSourceFName, strerror(errno));
return -1;
}
destfd = open(pDestFName, O_CREAT|O_WRONLY, mode);
if (destfd < 0) {
close(srcfd);
wfc_util_log_error("Cannot create \"%s\": %s", pDestFName, strerror(errno));
return -1;
}
while ((nread = read(srcfd, buf, WFC_BUFFER_SIZE-1)) != 0) {
if (nread < 0) {
wfc_util_log_error("Error reading \"%s\": %s", pSourceFName, strerror(errno));
close(srcfd);
close(destfd);
unlink(pDestFName);
return -1;
}
// WBT fix, according to manual, the number of bytes read can't be bigger than read_size. I don't know why WBT complains for this.
if (nread < WFC_BUFFER_SIZE)
buf[nread] = '\0';
else {
buf[WFC_BUFFER_SIZE-1] = '\0';
nread = WFC_BUFFER_SIZE-1;
}
write(destfd, buf, nread);
}
close(destfd);
close(srcfd);
/* remove this code because of permission problem when it is accessed from "atd" having system permission. */
{
#ifndef CONFIG_LGE_WLAN_WIFI_PATCH
uid_t uid = getuid();
gid_t gid = getgid();
wfc_util_log_error("Error changing group ownership (%d) of %s to %d: %s", gid, pDestFName, gID, strerror(errno));
if (0 == uid) {
#endif /* CONFIG_LGE_WLAN_WIFI_PATCH */
if (chown(pDestFName, uID, gID) < 0) {
wfc_util_log_error("Error changing group ownership of %s to %d: %s", pDestFName, gID, strerror(errno));
unlink(pDestFName);
return -1;
}
#ifndef CONFIG_LGE_WLAN_WIFI_PATCH
} else {
wfc_util_log_error("wfc_util_ffile_check_copy : we can not excute chown[uid = %d, gid = %d]", uid, getgid());
}
#endif /* CONFIG_LGE_WLAN_WIFI_PATCH */
}
return 0;
}

View File

@ -0,0 +1,92 @@
/*
* Copyright 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __WFC_UTIL_FCTRL_H__
#define __WFC_UTIL_FCTRL_H__
/*
* wfc_util_fset_buffer
*
* return : void
*/
void wfc_util_fset_buffer(char *pFileName, int positionStart, unsigned char *pNewValue, int newValueLength);
/*
* wfc_util_fget_buffer
*
* return : it will return the length of the stored buffer value if procedure is success
* or will return 0 if not.
*/
extern int wfc_util_fget_buffer(char *pFileName, int positionStart, int lengthToRead, unsigned char *pValueBuff, int buffLength);
/*
* wfc_util_fset_string
*
* The following format string will be added or updated to the file pFileName.
* [pSTagString][pNewValueString][pETagString]
*
* pFileName : file name and path
* pEndOfCfg : tag string to notify the end of configuration file
* pSTagString : tag string to notify purpose of the value
* pETagString : tag string to notify the end of the value
* pNewValueString : string to set for pSTagString
*
* return : void
*/
extern void wfc_util_fset_string(char *pFileName, char *pEndOfCfg, char *pSTagString, char *pETagString, char *pNewValueString);
/*
* wfc_util_fget_string
*
* Read value from the following format string in the file pFileName.
* [pSTagString][string value to read][pETagString]
*
* pFileName : file name and path
* pEndOfCfg : tag string to notify the end of configuration file
* pSTagString : tag string to notify purpose of the value
* pETagString : tag string to notify the end of the value
* pValueStringBuff : string buffer to get string value
* stringBuffLength : the length of pValueStringBuff
*
* return : it will return the length of the stored string value if procedure is success
* or will return 0 if not.
*/
extern int wfc_util_fget_string(char *pFileName, char *pEndOfCfg, char *pSTagString, char *pETagString, char *pValueStringBuff, int stringBuffLength);
/*
* wfc_util_ffile_check
*
* check whether pDestFName file exist or not
*
* pFileName : file name and path
* access_mode : R_OK | W_OK | X_OK | F_OK
*
* return : it will return 0 if the file exist
* or will return -1 if not.
*/
extern int wfc_util_ffile_check(char *pDestFName, int access_mode);
/*
* wfc_util_ffile_check_copy
*
* check whether pDestFName file exist if not it will copy from pSourceFName file
*
* return : it will return 0 if procedure is success
* or will return -1 if not.
*/
extern int wfc_util_ffile_check_copy(char *pDestFName, char *pSourceFName, mode_t mode, uid_t uID, gid_t gID);
#endif

32
conn_init/wfc_util_log.h Normal file
View File

@ -0,0 +1,32 @@
/*
* Copyright 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __WFC_UTIL_LOG_H__
#define __WFC_UTIL_LOG_H__
#ifdef ANDROID
#define LOG_TAG "WifiUtil"
#include <cutils/log.h>
#define wfc_util_log_info(...) ALOGI(__VA_ARGS__)
#define wfc_util_log_error(...) ALOGE(__VA_ARGS__)
#else /* ANDROID */
#define wfc_util_log_info(...) printf(__VA_ARGS__);printf("\n")
#define wfc_util_log_error(...) printf(__VA_ARGS__);printf("\n")
#endif /* ANDROID */
#endif

139
conn_init/wfc_util_main.c Normal file
View File

@ -0,0 +1,139 @@
/*
* Copyright 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <getopt.h>
#include "wfc_util_fctrl.h"
#include "wfc_util_common.h"
#ifdef WLAN_CHIP_VERSION_WCNSS
#ifndef WFC_UTIL_CFG_FILE_NAME
#define WFC_UTIL_CFG_FILE_NAME "./WCNSS_qcom_cfg.ini"
#endif
#ifndef WFC_UTIL_NV_BIN_FILE_NAME
#define WFC_UTIL_NV_BIN_FILE_NAME "./WCNSS_qcom_wlan_nv.bin"
#endif
#else /* WLAN_CHIP_VERSION_WCN1314 */
#ifndef WFC_UTIL_CFG_FILE_NAME
#define WFC_UTIL_CFG_FILE_NAME "./WCN1314_qcom_cfg.ini"
#endif
#ifndef WFC_UTIL_NV_BIN_FILE_NAME
#define WFC_UTIL_NV_BIN_FILE_NAME "./WCN1314_qcom_wlan_nv.bin"
#endif
#endif /* WLAN_CHIP_VERSION_XXXX */
#define WFC_UTIL_CFG_TAG_END_OF_CFG "END"
#define WFC_UTIL_CFG_TAG_MAC_ADDRESS "NetworkAddress="
#define WFC_UTIL_CFG_TAG_AP_MAC_ADDRESS "gAPMacAddr="
#define WFC_UTIL_CFG_TAG_END_OF_LINE "\n"
#define WFC_UTIL_CFG_LENGHT_MAC (6)
#define WFC_UTIL_CFG_LENGHT_MAC_STRING (WFC_UTIL_CFG_LENGHT_MAC*2)
/*
* persist/WCNSS_qcom_wlan_nv.bin
*
* typedef PACKED_PRE struct PACKED_POST
* {
* //always ensure fields are aligned to 32-bit boundaries
* tANI_U16 productId;
* tANI_U8 productBands;
* tANI_U8 wlanNvRevId;
*
* tANI_U8 numOfTxChains;
* tANI_U8 numOfRxChains;
* tANI_U8 macAddr[NV_FIELD_MAC_ADDR_SIZE];
* tANI_U8 mfgSN[NV_FIELD_MFG_SN_SIZE];
* } sNvFields;
*/
#define WFC_UTIL_NV_BIN_HEADER_LENGTH (4)
#define WFC_UTIL_NV_BIN_POS_PRODUCT_ID (WFC_UTIL_NV_BIN_HEADER_LENGTH + 0)
#define WFC_UTIL_NV_BIN_POS_PRODUCT_BAND (WFC_UTIL_NV_BIN_HEADER_LENGTH + 2)
#define WFC_UTIL_NV_BIN_POS_MAC_ADDR (WFC_UTIL_NV_BIN_HEADER_LENGTH + 6)
int main(int argc, char **argv)
{
int ret = 0;
char mac_add_buff[WFC_UTIL_CFG_LENGHT_MAC_STRING+1];
unsigned char mac_add_buff_2[WFC_UTIL_CFG_LENGHT_MAC] = {0x88, 0xcd, 0xba, 0x0c, 0x90, 0x00};
unsigned char mac_add_buff_3[WFC_UTIL_CFG_LENGHT_MAC] = {0x00, 0x90, 0x0c, 0xba, 0xcd, 0x88};
printf("wfc_util_main is started\n");
if(0 < wfc_util_fget_string(WFC_UTIL_CFG_FILE_NAME,
WFC_UTIL_CFG_TAG_END_OF_CFG,
WFC_UTIL_CFG_TAG_MAC_ADDRESS,
WFC_UTIL_CFG_TAG_END_OF_LINE,
mac_add_buff,
WFC_UTIL_CFG_LENGHT_MAC_STRING+1)) {
printf("wfc_util_main : %s%s\n", WFC_UTIL_CFG_TAG_MAC_ADDRESS, mac_add_buff);
} else {
printf("wfc_util_main : %s is not found\n", WFC_UTIL_CFG_TAG_MAC_ADDRESS);
}
wfc_util_fset_string(WFC_UTIL_CFG_FILE_NAME,
WFC_UTIL_CFG_TAG_END_OF_CFG,
WFC_UTIL_CFG_TAG_AP_MAC_ADDRESS,
WFC_UTIL_CFG_TAG_END_OF_LINE,
"00900cbacd88");
wfc_util_fset_string(WFC_UTIL_CFG_FILE_NAME,
WFC_UTIL_CFG_TAG_END_OF_CFG,
WFC_UTIL_CFG_TAG_MAC_ADDRESS,
WFC_UTIL_CFG_TAG_END_OF_LINE,
"00900cbacd88");
if(0 < wfc_util_fget_string(WFC_UTIL_CFG_FILE_NAME,
WFC_UTIL_CFG_TAG_END_OF_CFG,
WFC_UTIL_CFG_TAG_MAC_ADDRESS,
WFC_UTIL_CFG_TAG_END_OF_LINE,
mac_add_buff,
WFC_UTIL_CFG_LENGHT_MAC_STRING+1)) {
printf("wfc_util_main : %s%s\n", WFC_UTIL_CFG_TAG_MAC_ADDRESS, mac_add_buff);
wfc_util_atoh(mac_add_buff, strlen(mac_add_buff), mac_add_buff_2, WFC_UTIL_CFG_LENGHT_MAC);
printf("wfc_util_main : %s%02x:%02x:%02x:%02x:%02x:%02x\n",
WFC_UTIL_CFG_TAG_MAC_ADDRESS,
mac_add_buff_2[0], mac_add_buff_2[1], mac_add_buff_2[2],
mac_add_buff_2[3], mac_add_buff_2[4], mac_add_buff_2[5]);
wfc_util_htoa(mac_add_buff_2, WFC_UTIL_CFG_LENGHT_MAC, mac_add_buff, WFC_UTIL_CFG_LENGHT_MAC_STRING);
printf("wfc_util_main : %s%s\n", WFC_UTIL_CFG_TAG_MAC_ADDRESS, mac_add_buff);
} else {
printf("wfc_util_main : %s is not found\n", WFC_UTIL_CFG_TAG_MAC_ADDRESS);
}
wfc_util_fset_buffer(WFC_UTIL_NV_BIN_FILE_NAME,
WFC_UTIL_NV_BIN_POS_MAC_ADDR,
mac_add_buff_3,
WFC_UTIL_CFG_LENGHT_MAC);
if(0 < wfc_util_fget_buffer(WFC_UTIL_NV_BIN_FILE_NAME,
WFC_UTIL_NV_BIN_POS_MAC_ADDR,
6,
mac_add_buff_2,
WFC_UTIL_CFG_LENGHT_MAC)) {
printf("wfc_util_main : wfc_util_fget_buffer[%02x:%02x:%02x:%02x:%02x:%02x]\n",
mac_add_buff_2[0], mac_add_buff_2[1], mac_add_buff_2[2],
mac_add_buff_2[3], mac_add_buff_2[4], mac_add_buff_2[5]);
} else {
printf("wfc_util_main : %s is not found\n", WFC_UTIL_CFG_TAG_MAC_ADDRESS);
}
return ret;
}

676
conn_init/wfc_util_qcom.c Normal file
View File

@ -0,0 +1,676 @@
/*
* Copyright 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifdef CONFIG_LGE_WLAN_QCOM_PATCH
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "wfc_util_log.h"
#include "wfc_util_fctrl.h"
#include "wfc_util_common.h"
#include "private/android_filesystem_config.h"
#define WFC_UTIL_FEAUTRE_COPY_NV_BIN
#ifdef WLAN_CHIP_VERSION_WCNSS
#ifndef WFC_UTIL_CFG_FILE_NAME
#define WFC_UTIL_CFG_FILE_NAME "/data/misc/wifi/WCNSS_qcom_cfg.ini"
#endif
#ifndef WFC_UTIL_CFG_TEMPFILE_NAME
#define WFC_UTIL_CFG_TEMPFILE_NAME "/system/etc/wifi/WCNSS_qcom_cfg.ini"
#endif
#else /* WLAN_CHIP_VERSION_WCN1314 */
#ifndef WFC_UTIL_CFG_FILE_NAME
#define WFC_UTIL_CFG_FILE_NAME "/data/misc/wifi/WCN1314_qcom_cfg.ini"
#endif
#ifndef WFC_UTIL_CFG_TEMPFILE_NAME
#define WFC_UTIL_CFG_TEMPFILE_NAME "/system/etc/wifi/WCN1314_qcom_cfg.ini"
#endif
#endif /* WLAN_CHIP_VERSION_XXXX */
#ifdef WFC_UTIL_FEAUTRE_COPY_NV_BIN
#ifdef WLAN_CHIP_VERSION_WCNSS
#ifndef WFC_UTIL_NV_BIN_TEMPFILE_NAME
#define WFC_UTIL_NV_BIN_TEMPFILE_NAME "/system/etc/wifi/WCNSS_qcom_wlan_nv.bin"
#endif
#ifndef WFC_UTIL_NV_BIN_FILE_NAME
#define WFC_UTIL_NV_BIN_FILE_NAME "/data/misc/wifi/WCNSS_qcom_wlan_nv.bin"
#endif
#else /* WLAN_CHIP_VERSION_WCN1314 */
#ifndef WFC_UTIL_NV_BIN_TEMPFILE_NAME
#define WFC_UTIL_NV_BIN_TEMPFILE_NAME "/persist/WCN1314_qcom_wlan_nv.bin"
#endif
#ifndef WFC_UTIL_NV_BIN_FILE_NAME
#define WFC_UTIL_NV_BIN_FILE_NAME "/data/misc/wifi/WCN1314_qcom_wlan_nv.bin"
#endif
#endif /* WLAN_CHIP_VERSION_XXXX */
#else /* WFC_UTIL_FEAUTRE_COPY_NV_BIN */
#ifndef WFC_UTIL_NV_BIN_FILE_NAME
#ifdef WLAN_CHIP_VERSION_WCNSS
#define WFC_UTIL_NV_BIN_FILE_NAME "/persist/WCNSS_qcom_wlan_nv.bin"
#else /* WLAN_CHIP_VERSION_WCN1314 */
#define WFC_UTIL_NV_BIN_FILE_NAME "/persist/WCN1314_qcom_wlan_nv.bin"
#endif /* WLAN_CHIP_VERSION_XXXX */
#endif
#endif /* WFC_UTIL_FEAUTRE_COPY_NV_BIN */
#define WFC_UTIL_CFG_TAG_END_OF_CFG "END"
/*
* Station Mode MAC Address
*/
#ifdef WLAN_CHIP_VERSION_WCNSS
#define WFC_UTIL_CFG_TAG_MAC_ADDRESS "Intf0MacAddress="
#else /* WLAN_CHIP_VERSION_WCN1314 */
#define WFC_UTIL_CFG_TAG_MAC_ADDRESS "NetworkAddress="
#endif /* WLAN_CHIP_VERSION_XXXX */
/*
* AP Mode MAC Address
*/
#define WFC_UTIL_CFG_TAG_AP_MAC_ADDRESS "gAPMacAddr="
/*
* Idle Mode Power Save enable/disable for OTA test
*/
#define WFC_UTIL_CFG_TAG_IDLE_MODE_POWER_SAVE "gEnableImps="
/*
* Beacon Mode Power Save enable/disable for OTA test
*/
#define WFC_UTIL_CFG_TAG_POWER_SAVE "gEnableBmps="
/*
* L2 roaming on/off for OTA test
*/
#define WFC_UTIL_CFG_TAG_L2Roaming "gEnableHandoff="
/*
* Heartbeat24 changing for OtA test
*/
#define WFC_UTIL_CFG_TAG_HEARTBEAT24 "gHeartbeat24="
/*
* TAG for end of line
*/
#define WFC_UTIL_CFG_TAG_END_OF_LINE "\n"
#define WFC_UTIL_CFG_LENGHT_MAC (6)
#define WFC_UTIL_CFG_LENGHT_MAC_STRING (WFC_UTIL_CFG_LENGHT_MAC*2)
/*
* persist/WCNSS_qcom_wlan_nv.bin
*
* NV validity bitmap (4 bytes)
* {
* Bit 0 - Regulatory domain tables
* Bit 1 - Fields(including product ID, product bands, number of Tx/Rx chains, MAC address, manufacturing board number)
* Bit 2 - Optimal power per rate table
* Bit 3 - Default regulatory domain and country code
* Bit 4:31 - Reserved; always 0
* }
*
* typedef PACKED_PRE struct PACKED_POST
* {
* //always ensure fields are aligned to 32-bit boundaries
* tANI_U16 productId;
* tANI_U8 productBands; //0: 0.4 GHz, 1: 2.4+5.0 GHz, 2: 5.0 GHz
* tANI_U8 wlanNvRevId; //0: WCN1312, 1: WCN1314, 2: PRIMA
*
* tANI_U8 numOfTxChains;
* tANI_U8 numOfRxChains;
* tANI_U8 macAddr[NV_FIELD_MAC_ADDR_SIZE];
* tANI_U8 mfgSN[NV_FIELD_MFG_SN_SIZE];
* } sNvFields;
*/
#define WFC_UTIL_NV_BIN_HEADER_LENGTH (4)
#define WFC_UTIL_NV_BIN_POS_PRODUCT_ID (WFC_UTIL_NV_BIN_HEADER_LENGTH + 0)
#define WFC_UTIL_NV_BIN_POS_MAC_ADDR (WFC_UTIL_NV_BIN_HEADER_LENGTH + 6)
#ifdef WLAN_CHIP_VERSION_WCNSS
/* refer to prima/CORE/WDA/src/wlan_nv.c */
static unsigned char nvFilelds_default[6] = {0, 0, /* productId */
1, /* productBands */
2, /* wlanNvRevId */
1, /* numOfTxChains */
2}; /* numOfRxChains */
#else /* WLAN_CHIP_VERSION_WCN1314 */
static unsigned char nvFilelds_default[6] = {1, 0, /* productId */
1, /* productBands */
1, /* wlanNvRevId */
1, /* numOfTxChains */
1}; /* numOfRxChains */
#endif /* WLAN_CHIP_VERSION_XXXX */
/*
* wfc_util_qcom_is_default_mac
*
*
*
* return : it will return 1 if mac_add is default mac address,
* 2 if mac_add is RFT mac address
* or 0 if not.
*/
static int wfc_util_qcom_is_default_mac(char *mac_add)
{
#define WFC_UTIL_CFG_DEFAULT_MAC_RFT "00900CBACD88"
#define WFC_UTIL_CFG_DEFAULT_MAC_00 "000000000000"
#define WFC_UTIL_CFG_DEFAULT_MAC_FF "FFFFFFFFFFFF"
#define WFC_UTIL_CFG_DEFAULT_MAC_QCOM_I0 "000AF58989FF"
#define WFC_UTIL_CFG_DEFAULT_MAC_QCOM_I1 "000AF58989FE"
#define WFC_UTIL_CFG_DEFAULT_MAC_QCOM_I2 "000AF58989FD"
#define WFC_UTIL_CFG_DEFAULT_MAC_QCOM_I3 "000AF58989FC"
#define WFC_UTIL_CFG_DEFAULT_MAC_QCOM_AP "000AF58989EF"
int i, sZarray=0;
/*
* default mac address array
*/
char mac_add_buff[][WFC_UTIL_CFG_LENGHT_MAC_STRING+1] = {
{WFC_UTIL_CFG_DEFAULT_MAC_00},
{WFC_UTIL_CFG_DEFAULT_MAC_FF},
{WFC_UTIL_CFG_DEFAULT_MAC_QCOM_I0}
};
sZarray = sizeof(mac_add_buff) / sizeof(mac_add_buff[0]);
for(i=0; i<sZarray ;i++) {
if(0 == strncmp(mac_add, mac_add_buff[i], WFC_UTIL_CFG_LENGHT_MAC_STRING)) {
wfc_util_log_error("This is default MAC address [%s]", mac_add_buff[i]);
return 1;
}
}
/*
if(1 == wfc_util_is_random_mac(mac_add)) {
wfc_util_log_error("This is Random MAC address");
return 1;
}
*/
if(0 == strncmp(mac_add, WFC_UTIL_CFG_DEFAULT_MAC_RFT, WFC_UTIL_CFG_LENGHT_MAC_STRING)) {
wfc_util_log_error("This is RFT MAC address [%s]", WFC_UTIL_CFG_DEFAULT_MAC_RFT);
return 2;
}
return 0;
}
static void wfc_util_qcom_write_mac(char *mac_add)
{
/*
* Station Mode MAC Address
*/
wfc_util_fset_string(WFC_UTIL_CFG_FILE_NAME,
WFC_UTIL_CFG_TAG_END_OF_CFG,
WFC_UTIL_CFG_TAG_MAC_ADDRESS,
WFC_UTIL_CFG_TAG_END_OF_LINE,
mac_add);
/*
* AP Mode MAC Address
*/
wfc_util_fset_string(WFC_UTIL_CFG_FILE_NAME,
WFC_UTIL_CFG_TAG_END_OF_CFG,
WFC_UTIL_CFG_TAG_AP_MAC_ADDRESS,
WFC_UTIL_CFG_TAG_END_OF_LINE,
mac_add);
return;
}
/*
* When OTA is enabled, power save mode and L2 roaming trigger should be off
*/
static void wfc_util_qcom_write_ota_enable(void)
{
/*
* write Beacon Mode Power Save off and L2 Roaming off
*/
char *PowerSaveOff = "0";
//char *L2RoamingOff = "0";
char *Heartbeat24 = "120";
char string_buff[5];
wfc_util_fset_string(WFC_UTIL_CFG_FILE_NAME,
WFC_UTIL_CFG_TAG_END_OF_CFG,
WFC_UTIL_CFG_TAG_IDLE_MODE_POWER_SAVE,
WFC_UTIL_CFG_TAG_END_OF_LINE,
PowerSaveOff);
wfc_util_fset_string(WFC_UTIL_CFG_FILE_NAME,
WFC_UTIL_CFG_TAG_END_OF_CFG,
WFC_UTIL_CFG_TAG_POWER_SAVE,
WFC_UTIL_CFG_TAG_END_OF_LINE,
PowerSaveOff);
/* We don't need to change this becasue the default value of WFC_UTIL_CFG_TAG_L2Roaming is 0.
wfc_util_fset_string(WFC_UTIL_CFG_FILE_NAME,
WFC_UTIL_CFG_TAG_END_OF_CFG,
WFC_UTIL_CFG_TAG_L2Roaming,
WFC_UTIL_CFG_TAG_END_OF_LINE,
L2RoamingOff);
*/
if(0 < wfc_util_fget_string(WFC_UTIL_CFG_FILE_NAME,
WFC_UTIL_CFG_TAG_END_OF_CFG,
WFC_UTIL_CFG_TAG_HEARTBEAT24,
WFC_UTIL_CFG_TAG_END_OF_LINE,
string_buff,
5)) {
wfc_util_fset_string(WFC_UTIL_CFG_FILE_NAME,
WFC_UTIL_CFG_TAG_END_OF_CFG,
WFC_UTIL_CFG_TAG_HEARTBEAT24,
WFC_UTIL_CFG_TAG_END_OF_LINE,
Heartbeat24);
} else {
wfc_util_log_error("%s is not exist", WFC_UTIL_CFG_TAG_HEARTBEAT24);
}
return;
}
/*
* When OTA is enabled, power save mode and L2 roaming trigger should be off
*/
static void wfc_util_qcom_write_ota_disable(void)
{
/*
* write Beacon Mode Power Save on and L2 Roaming on
*/
char *PowerSaveOff = "1";
//char *L2RoamingOff = "1";
char *Heartbeat24 = "40";
char string_buff[5];
wfc_util_fset_string(WFC_UTIL_CFG_FILE_NAME,
WFC_UTIL_CFG_TAG_END_OF_CFG,
WFC_UTIL_CFG_TAG_IDLE_MODE_POWER_SAVE,
WFC_UTIL_CFG_TAG_END_OF_LINE,
PowerSaveOff);
wfc_util_fset_string(WFC_UTIL_CFG_FILE_NAME,
WFC_UTIL_CFG_TAG_END_OF_CFG,
WFC_UTIL_CFG_TAG_POWER_SAVE,
WFC_UTIL_CFG_TAG_END_OF_LINE,
PowerSaveOff);
/* We don't need to change this becasue the default value of WFC_UTIL_CFG_TAG_L2Roaming is 0.
wfc_util_fset_string(WFC_UTIL_CFG_FILE_NAME,
WFC_UTIL_CFG_TAG_END_OF_CFG,
WFC_UTIL_CFG_TAG_L2Roaming,
WFC_UTIL_CFG_TAG_END_OF_LINE,
L2RoamingOff);
*/
if(0 < wfc_util_fget_string(WFC_UTIL_CFG_FILE_NAME,
WFC_UTIL_CFG_TAG_END_OF_CFG,
WFC_UTIL_CFG_TAG_HEARTBEAT24,
WFC_UTIL_CFG_TAG_END_OF_LINE,
string_buff,
5)) {
wfc_util_fset_string(WFC_UTIL_CFG_FILE_NAME,
WFC_UTIL_CFG_TAG_END_OF_CFG,
WFC_UTIL_CFG_TAG_HEARTBEAT24,
WFC_UTIL_CFG_TAG_END_OF_LINE,
Heartbeat24);
} else {
wfc_util_log_error("%s is not exist", WFC_UTIL_CFG_TAG_HEARTBEAT24);
}
return;
}
static void wfc_util_qcom_write_mac_to_bin(unsigned char *mac_add)
{
unsigned char nvValidityBitmap[WFC_UTIL_NV_BIN_HEADER_LENGTH];
if(0 != wfc_util_ffile_check(WFC_UTIL_NV_BIN_FILE_NAME,
F_OK|R_OK|W_OK)) {
wfc_util_log_error("We don't access file [%s]", WFC_UTIL_NV_BIN_FILE_NAME);
return;
}
memset(nvValidityBitmap, 0, WFC_UTIL_NV_BIN_HEADER_LENGTH);
/*
* Write RFT MAC Address
*/
wfc_util_fset_buffer(WFC_UTIL_NV_BIN_FILE_NAME,
WFC_UTIL_NV_BIN_POS_MAC_ADDR,
mac_add,
WFC_UTIL_CFG_LENGHT_MAC);
/*
* Read NV validity bitmap
*/
if (0 < wfc_util_fget_buffer(WFC_UTIL_NV_BIN_FILE_NAME,
0,
WFC_UTIL_NV_BIN_HEADER_LENGTH,
nvValidityBitmap,
WFC_UTIL_NV_BIN_HEADER_LENGTH)){
/*
* Check whether Fields bit(Bit 1) is set
*/
if (0x02 & nvValidityBitmap[0]) {
wfc_util_log_info("We don't need to write the default value for NvFilelds");
} else {
/*
* Update the Fields bit(Bit 1)
*/
nvValidityBitmap[0] |= 0x02;
wfc_util_fset_buffer(WFC_UTIL_NV_BIN_FILE_NAME,
0,
nvValidityBitmap,
WFC_UTIL_NV_BIN_HEADER_LENGTH);
/*
* Write the default value for NvFilelds
*/
wfc_util_fset_buffer(WFC_UTIL_NV_BIN_FILE_NAME,
WFC_UTIL_NV_BIN_POS_PRODUCT_ID,
nvFilelds_default,
6);
}
} else {
wfc_util_log_error("Read Fail nvValidityBitmap");
}
return;
}
/*
* wfc_util_qcom_reset_mac_to_bin
*
* reset the mac address of nv bin file
*
* return : void
*/
static void wfc_util_qcom_reset_mac_to_bin(void)
{
unsigned char mac_addr[WFC_UTIL_CFG_LENGHT_MAC];
if(0 != wfc_util_ffile_check(WFC_UTIL_NV_BIN_FILE_NAME,
F_OK|R_OK|W_OK)) {
wfc_util_log_error("We don't access file [%s]", WFC_UTIL_NV_BIN_FILE_NAME);
return;
}
if(0 < wfc_util_fget_buffer(WFC_UTIL_NV_BIN_FILE_NAME,
WFC_UTIL_NV_BIN_POS_MAC_ADDR,
WFC_UTIL_CFG_LENGHT_MAC,
mac_addr,
WFC_UTIL_CFG_LENGHT_MAC)) {
if(0x00 == mac_addr[0] && 0x00 == mac_addr[1] && 0x00 == mac_addr[2] &&
0x00 == mac_addr[3] && 0x00 == mac_addr[4] && 0x00 == mac_addr[5])
{
return;
}
}
memset(mac_addr, 0, WFC_UTIL_CFG_LENGHT_MAC);
wfc_util_fset_buffer(WFC_UTIL_NV_BIN_FILE_NAME,
WFC_UTIL_NV_BIN_POS_MAC_ADDR,
mac_addr,
WFC_UTIL_CFG_LENGHT_MAC);
return;
}
static int wfc_util_qcom_write_mac_process(unsigned char *nv_mac_addr, char *mac_add_buff)
{
char nv_mac_add_buff[WFC_UTIL_CFG_LENGHT_MAC_STRING+1];
int is_default_nv_mac = 0;
int is_same_mac = -1;
if (NULL == nv_mac_addr) {
return 0;
}
wfc_util_htoa(nv_mac_addr, WFC_UTIL_CFG_LENGHT_MAC,
nv_mac_add_buff, WFC_UTIL_CFG_LENGHT_MAC_STRING+1);
is_default_nv_mac = wfc_util_qcom_is_default_mac(nv_mac_add_buff);
is_same_mac = strncmp(mac_add_buff, nv_mac_add_buff, WFC_UTIL_CFG_LENGHT_MAC_STRING);
/*
* 1. nv mac address is not a default mac address
* 2. same with mac address of config file
*/
if (((!is_default_nv_mac) && (0==is_same_mac)) ||
/*
* 1. nv mac address is RFT mac address
* 2. same with mac address of config file
*/
((2==is_default_nv_mac) && (0==is_same_mac))
) {
return 1;
}
/*
* 1. nv mac address not a default mac address excepting RFT mac address
* 2. does not same with mac address of config file
*/
else if ((1!=is_default_nv_mac) && (0!=is_same_mac)) {
wfc_util_log_error("Change %s%s", WFC_UTIL_CFG_TAG_MAC_ADDRESS, nv_mac_add_buff);
/*
* Update MAC address
*/
wfc_util_qcom_write_mac(nv_mac_add_buff);
#ifdef WFC_UTIL_FEATURE_DO_NOT_WRITE_MAC_TO_BIN
/*
* Write RFT MAC address to nv.bin
*/
if (2==is_default_nv_mac) {
wfc_util_qcom_write_mac_to_bin(nv_mac_addr);
/*
* reset mac address of nv.bin if nv_mac_addr is not RFT mac address
*/
} else {
wfc_util_qcom_reset_mac_to_bin();
}
#else /* WFC_UTIL_FEATURE_DO_NOT_WRITE_MAC_TO_BIN */
/*
* Write MAC address to nv.bin
*/
wfc_util_qcom_write_mac_to_bin(nv_mac_addr);
#endif /* WFC_UTIL_FEATURE_DO_NOT_WRITE_MAC_TO_BIN */
return 1;
}
return 0;
}
static void wfc_util_qcom_create_random_mac(void)
{
unsigned char random_mac_addr[WFC_UTIL_CFG_LENGHT_MAC];
char mac_add_buff[WFC_UTIL_CFG_LENGHT_MAC_STRING+1];
wfc_util_log_info("wfc_util_qcom_create_random_mac");
wfc_util_random_mac(random_mac_addr);
wfc_util_htoa(random_mac_addr, WFC_UTIL_CFG_LENGHT_MAC, mac_add_buff, WFC_UTIL_CFG_LENGHT_MAC_STRING+1);
wfc_util_qcom_write_mac(mac_add_buff);
#ifdef WFC_UTIL_FEATURE_DO_NOT_WRITE_MAC_TO_BIN
wfc_util_qcom_reset_mac_to_bin();
#else /* WFC_UTIL_FEATURE_DO_NOT_WRITE_MAC_TO_BIN */
wfc_util_qcom_write_mac_to_bin(random_mac_addr);
#endif /* WFC_UTIL_FEATURE_DO_NOT_WRITE_MAC_TO_BIN */
return;
}
/*
* wfc_util_qcom_check_config
*
* check the qcom wlan driver config file
*
* return : it will return 0 if procedure is success
* or will return -1 if not.
*/
int wfc_util_qcom_check_config(unsigned char *nv_mac_addr)
{
char mac_add_buff[WFC_UTIL_CFG_LENGHT_MAC_STRING+1];
/* make sure driver config file exists */
if(0 > wfc_util_ffile_check_copy(WFC_UTIL_CFG_FILE_NAME,
WFC_UTIL_CFG_TEMPFILE_NAME,
0660,
AID_SYSTEM,
/* we use "radio" for gid to access from "rild" for AT cmd. */
AID_WIFI/*AID_WIFI*/)) {
wfc_util_log_error("Fail to Access [%s]", WFC_UTIL_CFG_FILE_NAME);
return -1;
}
#ifdef WFC_UTIL_FEAUTRE_COPY_NV_BIN
if(0 > wfc_util_ffile_check_copy(WFC_UTIL_NV_BIN_FILE_NAME,
WFC_UTIL_NV_BIN_TEMPFILE_NAME,
0660,
AID_SYSTEM,
/* we use "radio" for gid to access from "rild" for AT cmd. */
AID_WIFI/*AID_WIFI*/)) {
wfc_util_log_error("Fail to Access [%s]", WFC_UTIL_NV_BIN_FILE_NAME);
return -1;
}
#endif /* WFC_UTIL_FEAUTRE_COPY_NV_BIN */
/*
* Read MAC address from config file
*/
if(0 < wfc_util_fget_string(WFC_UTIL_CFG_FILE_NAME,
WFC_UTIL_CFG_TAG_END_OF_CFG,
WFC_UTIL_CFG_TAG_MAC_ADDRESS,
WFC_UTIL_CFG_TAG_END_OF_LINE,
mac_add_buff,
WFC_UTIL_CFG_LENGHT_MAC_STRING+1)) {
wfc_util_log_info("%s%s", WFC_UTIL_CFG_TAG_MAC_ADDRESS, mac_add_buff);
/*
* Write nv mac address
*/
if (1 != wfc_util_qcom_write_mac_process(nv_mac_addr, mac_add_buff)) {
/*
* Check whether this is default mac address or not
*/
if (wfc_util_qcom_is_default_mac(mac_add_buff)) {
/*
* Create random MAC address
*/
wfc_util_qcom_create_random_mac();
}
}
} else {
wfc_util_log_error("%s does not have mac address", WFC_UTIL_CFG_FILE_NAME);
memset( mac_add_buff, 0, WFC_UTIL_CFG_LENGHT_MAC_STRING+1 );
/*
* Write nv mac address
*/
if (1 != wfc_util_qcom_write_mac_process(nv_mac_addr, mac_add_buff)) {
/*
* Create random MAC address
*/
wfc_util_qcom_create_random_mac();
}
}
return 0;
}
/*
* wfc_util_qcom_reset_mac
*
* reset the mac address of config file
*
* return : void
*/
void wfc_util_qcom_reset_mac(void)
{
wfc_util_qcom_write_mac("000000000000");
wfc_util_qcom_reset_mac_to_bin();
return;
}
/*
* wfc_util_qcom_ota_enable
*
* enable ota mode by reconfiguring BMPS and L2Roaming
*
* return : int (boolean)
*/
int wfc_util_qcom_ota_enable(void)
{
wfc_util_qcom_write_ota_enable();
return 1;
}
/*
* wfc_util_qcom_ota_disable
*
* disable ota mode by reconfiguring BMPS and L2Roaming
*
* return : int (boolean)
*/
int wfc_util_qcom_ota_disable(void)
{
wfc_util_qcom_write_ota_disable();
return 1;
}
/*
* wfc_util_qcom_checkt_roaming_off
*
* Check L2Roaming configuration
*
* return : int (boolean)
*/
int wfc_util_qcom_checkt_roaming_off(void)
{
char string_buff[5];
/*
* check whether OTA test is enabled or not.
*/
if(0 < wfc_util_fget_string(WFC_UTIL_CFG_FILE_NAME,
WFC_UTIL_CFG_TAG_END_OF_CFG,
//WFC_UTIL_CFG_TAG_L2Roaming,
WFC_UTIL_CFG_TAG_POWER_SAVE,
WFC_UTIL_CFG_TAG_END_OF_LINE,
string_buff,
5)) {
//wfc_util_log_info("%s%s", WFC_UTIL_CFG_TAG_L2Roaming, string_buff);
wfc_util_log_info("%s%s", WFC_UTIL_CFG_TAG_POWER_SAVE, string_buff);
if(0 == strncmp(string_buff, "0", 1)) {
return 1;
}
}
return 0;
}
#endif /* CONFIG_LGE_WLAN_QCOM_PATCH */

52
conn_init/wfc_util_qcom.h Normal file
View File

@ -0,0 +1,52 @@
/*
* Copyright 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __WFC_UTIL_QCOM_H__
#define __WFC_UTIL_QCOM_H__
#ifdef CONFIG_LGE_WLAN_QCOM_PATCH
/*
* wfc_util_qcom_check_config
*
* check the qcom wlan driver config file
*
* return : it will return 0 if procedure is success
* or will return -1 if not.
*/
extern int wfc_util_qcom_check_config(unsigned char *nv_mac_addr);
/*
* wfc_util_qcom_reset_mac
*
* reset the mac address of config file
*
* return : void
*/
extern void wfc_util_qcom_reset_mac(void);
/*
* wfc_util_qcom_ota_enable/disable
*
* enable OTA mode for Wi-Fi related certificiation
*
* return : int (boolean)
*/
extern int wfc_util_qcom_ota_enable(void);
extern int wfc_util_qcom_ota_disable(void);
extern int wfc_util_qcom_checkt_roaming_off(void);
#endif /* CONFIG_LGE_WLAN_QCOM_PATCH */
#endif

4557
data/etc/apns-conf.xml Executable file

File diff suppressed because it is too large Load Diff

275
device.mk Normal file
View File

@ -0,0 +1,275 @@
#
# Copyright (C) 2011 The Android Open-Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This file includes all definitions that apply to ALL msm8960 devices, and
# are also specific to msm8960 devices
#
# Everything in this directory will become public
DEVICE_PACKAGE_OVERLAYS := device/qcom/flo/overlay
LOCAL_KERNEL := device/asus/flo-kernel/kernel
PRODUCT_COPY_FILES := \
$(LOCAL_KERNEL):kernel
# This device is xhdpi. However the platform doesn't
# currently contain all of the bitmaps at xhdpi density so
# we do this little trick to fall back to the hdpi version
# if the xhdpi doesn't exist.
PRODUCT_AAPT_CONFIG := normal hdpi xhdpi
PRODUCT_AAPT_PREF_CONFIG := xhdpi
PRODUCT_PACKAGES := \
lights.msm8960
PRODUCT_PACKAGES += \
charger_res_images \
charger
# Live Wallpapers
PRODUCT_PACKAGES += \
LiveWallpapers \
LiveWallpapersPicker \
VisualizationWallpapers \
librs_jni
PRODUCT_COPY_FILES += \
device/asus/flo/WCNSS_cfg.dat:system/vendor/firmware/wlan/prima/WCNSS_cfg.dat \
device/asus/flo/WCNSS_qcom_cfg.ini:system/etc/wifi/WCNSS_qcom_cfg.ini \
device/asus/flo/WCNSS_qcom_wlan_nv.bin:system/etc/wifi/WCNSS_qcom_wlan_nv.bin
PRODUCT_COPY_FILES += \
device/asus/flo/snd_soc_msm_2x_Fusion3:system/etc/snd_soc_msm/snd_soc_msm_2x_Fusion3 \
device/asus/flo/snd_soc_msm_2x_Fusion3:system/etc/snd_soc_msm/snd_soc_msm_2x \
device/asus/flo/audio_policy.conf:system/etc/audio_policy.conf
PRODUCT_COPY_FILES += \
device/asus/flo/thermald-flo.conf:system/etc/thermald.conf
PRODUCT_COPY_FILES += \
device/asus/flo/init.flo.rc:root/init.flo.rc \
device/asus/flo/init.flo.usb.rc:root/init.flo.usb.rc \
device/asus/flo/fstab.flo:root/fstab.flo \
device/asus/flo/ueventd.flo.rc:root/ueventd.flo.rc \
device/asus/flo/media_profiles.xml:system/etc/media_profiles.xml \
device/asus/flo/media_codecs.xml:system/etc/media_codecs.xml
PRODUCT_COPY_FILES += \
device/asus/flo/kickstart_checker.sh:system/etc/kickstart_checker.sh
# Prebuilt kl and kcm keymaps
PRODUCT_COPY_FILES += \
device/asus/flo/apq8064-tabla-snd-card_Button_Jack.kl:system/usr/keylayout/apq8064-tabla-snd-card_Button_Jack.kl \
device/asus/flo/hs_detect.kl:system/usr/keylayout/hs_detect.kl \
device/asus/flo/pmic8xxx_pwrkey.kl:system/usr/keylayout/pmic8xxx_pwrkey.kl \
device/asus/flo/keypad_8064.kl:system/usr/keylayout/keypad_8064.kl \
device/asus/flo/apq8064-tabla-snd-card_Button_Jack.kcm:system/usr/keychars/apq8064-tabla-snd-card_Button_Jack.kcm \
device/asus/flo/hs_detect.kcm:system/usr/keychars/hs_detect.kcm \
device/asus/flo/keypad_8064.kcm:system/usr/keychars/keypad_8064.kcm \
device/asus/flo/pmic8xxx_pwrkey.kcm:system/usr/keychars/pmic8xxx_pwrkey.kcm
# Prebuilt input device calibration files
PRODUCT_COPY_FILES += \
device/asus/flo/touch_dev.idc:system/usr/idc/touch_dev.idc
# TP idc file
PRODUCT_COPY_FILES += \
device/asus/flo/elan-touchscreen.idc:system/usr/idc/elan-touchscreen.idc
# These are the hardware-specific features
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/handheld_core_hardware.xml:system/etc/permissions/handheld_core_hardware.xml \
frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:system/etc/permissions/android.hardware.camera.flash-autofocus.xml \
frameworks/native/data/etc/android.hardware.camera.front.xml:system/etc/permissions/android.hardware.camera.front.xml \
frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \
frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \
frameworks/native/data/etc/android.hardware.wifi.direct.xml:system/etc/permissions/android.hardware.wifi.direct.xml \
frameworks/native/data/etc/android.hardware.sensor.proximity.xml:system/etc/permissions/android.hardware.sensor.proximity.xml \
frameworks/native/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \
frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:system/etc/permissions/android.hardware.sensor.gyroscope.xml \
frameworks/native/data/etc/android.hardware.sensor.barometer.xml:system/etc/permissions/android.hardware.sensor.barometer.xml \
frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \
frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml \
frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \
frameworks/native/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml \
frameworks/native/data/etc/android.hardware.audio.low_latency.xml:system/etc/permissions/android.hardware.audio.low_latency.xml
# GPS configuration
PRODUCT_COPY_FILES += \
device/asus/flo/gps.conf:system/etc/gps.conf
PRODUCT_PROPERTY_OVERRIDES += \
ro.opengles.version=131072
PRODUCT_PROPERTY_OVERRIDES += \
ro.sf.lcd_density=320
# Audio Configuration
PRODUCT_PROPERTY_OVERRIDES += \
persist.audio.handset.mic=dmic \
persist.audio.fluence.mode=endfire \
persist.audio.lowlatency.rec=false \
af.resampler.quality=4
# Do not power down SIM card when modem is sent to Low Power Mode.
PRODUCT_PROPERTY_OVERRIDES += \
persist.radio.apm_sim_not_pwdn=1
# Ril sends only one RIL_UNSOL_CALL_RING, so set call_ring.multiple to false
PRODUCT_PROPERTY_OVERRIDES += \
ro.telephony.call_ring.multiple=0
# Kickstart
PRODUCT_PACKAGES += \
qcks \
ks \
efsks
#Stop rild if non 3G SKU
PRODUCT_PACKAGES += \
init.qcom.class_main.sh
#Upto 3 layers can go through overlays
PRODUCT_PROPERTY_OVERRIDES += debug.mdpcomp.maxlayer=3
PRODUCT_CHARACTERISTICS := nosdcard
PRODUCT_TAGS += dalvik.gc.type-precise
PRODUCT_PACKAGES += \
librs_jni \
com.android.future.usb.accessory
# Filesystem management tools
PRODUCT_PACKAGES += \
e2fsck \
setup_fs
PRODUCT_PACKAGES += \
libgenlock \
liboverlay \
hwcomposer.msm8960 \
gralloc.msm8960 \
copybit.msm8960
PRODUCT_PACKAGES += \
alsa.msm8960 \
audio_policy.msm8960 \
audio.primary.msm8960 \
audio.a2dp.default \
audio.usb.default \
audio.r_submix.default \
libaudio-resampler
PRODUCT_PACKAGES += \
hci_qcomm_init
PRODUCT_PACKAGES += \
power.msm8960
PRODUCT_COPY_FILES += \
device/asus/flo/init.flo.bt.sh:system/etc/init.flo.bt.sh
PRODUCT_PROPERTY_OVERRIDES += \
ro.qualcomm.bt.hci_transport=smd
PRODUCT_PACKAGES += \
camera.msm8960 \
libmmcamera_interface2 \
libmmcamera_interface
PRODUCT_PACKAGES += \
mm-vdec-omx-test \
mm-venc-omx-test720p \
libdivxdrmdecrypt \
libOmxVdec \
libOmxVenc \
libOmxCore \
libstagefrighthw \
libc2dcolorconvert
PRODUCT_PACKAGES += \
libloc_adapter \
libloc_eng \
libloc_api_v02 \
libgps.utils \
gps.msm8960
PRODUCT_PACKAGES += \
bdAddrLoader \
libwfcu \
conn_init \
charger_touch
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
rild.libpath=/system/lib/libril-qc-qmi-1.so
PRODUCT_PROPERTY_OVERRIDES += \
telephony.lteOnCdmaDevice=0
PRODUCT_PROPERTY_OVERRIDES += \
drm.service.enabled=true
PRODUCT_PROPERTY_OVERRIDES += \
wifi.interface=wlan0 \
wifi.supplicant_scan_interval=15
# Enable AAC 5.1 output
PRODUCT_PROPERTY_OVERRIDES += \
media.aac_51_output_enabled=true
PRODUCT_PROPERTY_OVERRIDES += \
debug.prerotation.disable=1
PRODUCT_PROPERTY_OVERRIDES += \
debug.egl.recordable.rgba8888=1
# for bugmailer
PRODUCT_PACKAGES += send_bug
PRODUCT_COPY_FILES += \
system/extras/bugmailer/bugmailer.sh:system/bin/bugmailer.sh \
system/extras/bugmailer/send_bug:system/bin/send_bug
# NFC packages
PRODUCT_PACKAGES += \
libnfc-nci \
libnfc_nci_jni \
nfc_nci.msm8960 \
NfcNci \
Tag \
com.android.nfc_extras
# NFCEE access control
ifeq ($(TARGET_BUILD_VARIANT),user)
NFCEE_ACCESS_PATH := device/asus/flo/nfc/nfcee_access.xml
else
NFCEE_ACCESS_PATH := device/asus/flo/nfc/nfcee_access_debug.xml
endif
PRODUCT_COPY_FILES += \
$(NFCEE_ACCESS_PATH):system/etc/nfcee_access.xml \
frameworks/native/data/etc/com.android.nfc_extras.xml:system/etc/permissions/com.android.nfc_extras.xml \
frameworks/native/data/etc/android.hardware.nfc.xml:system/etc/permissions/android.hardware.nfc.xml \
device/asus/flo/nfc/libnfc-brcm.conf:system/etc/libnfc-brcm.conf \
device/asus/flo/nfc/BCM20791B4_002.005.010.0031.0033.ncd:system/vendor/firmware/bcm2079x_pre_firmware.ncd \
device/asus/flo/nfc/BCM20791B4_002.005.010.0031.0034.ncd:system/vendor/firmware/bcm2079x_firmware.ncd
PRODUCT_LOCALES := en_US es_US de_DE zh_CN
$(call inherit-product, frameworks/native/build/tablet-7in-hdpi-1024-dalvik-heap.mk)
$(call inherit-product, hardware/qcom/msm8960/msm8960.mk)

26
dumpstate/Android.mk Normal file
View File

@ -0,0 +1,26 @@
# Copyright (C) 2011 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_C_INCLUDES := frameworks/native/cmds/dumpstate
LOCAL_SRC_FILES := dumpstate.c
LOCAL_MODULE := libdumpstate.flo
LOCAL_MODULE_TAGS := optional
include $(BUILD_STATIC_LIBRARY)

190
dumpstate/NOTICE Normal file
View File

@ -0,0 +1,190 @@
Copyright (C) 2011 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS

23
dumpstate/dumpstate.c Normal file
View File

@ -0,0 +1,23 @@
/*
* Copyright (C) 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <dumpstate.h>
void dumpstate_board()
{
dump_file("INTERRUPTS", "/proc/interrupts");
run_command("MODEM TOMBSTONES", 5, SU_PATH, "root", "ls", "-l", "/data/tombstones/mdm", NULL);
};

2
egl.cfg Normal file
View File

@ -0,0 +1,2 @@
0 0 android
0 1 adreno200

38
elan-touchscreen.idc Executable file
View File

@ -0,0 +1,38 @@
# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Input Device Configuration File for the ELAN touch panel device.
#
# These calibration values are derived from empirical measurements
# and may not be appropriate for use with other touch screens.
# Refer to the input device configuration documentation for more details.
#
# Basic Parameters
touch.deviceType = touchScreen
touch.orientationAware = 1
# Size
touch.size.calibration = area
touch.size.scale = 36
touch.size.bias = 0
# Pressure
touch.pressure.calibration = amplitude
touch.pressure.scale = 0.0048
# Orientation
touch.orientation.calibration = none

View File

@ -0,0 +1,29 @@
#!/bin/sh
# Copyright 2012 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# start jb-mr1-dev
# 477685 = JOO88
# end jb-mr1-dev
source ../../../common/clear-factory-images-variables.sh
BUILD=477685
DEVICE=msm8960
PRODUCT=
VERSION=joo88
#SRCPREFIX=signed-
BOOTLOADER=msm8960z09o
RADIO=m9615a-cefwmazm-2.0.1700.16
source ../../../common/generate-factory-images-common.sh

10
fstab.flo Normal file
View File

@ -0,0 +1,10 @@
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
/dev/block/platform/msm_sdcc.1/by-name/radio /firmware vfat ro,uid=1000,gid=1000,dmask=227,fmask=337 wait
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered wait,check
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc wait,check,encryptable=/dev/block/platform/msm_sdcc.1/by-name/metadata
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 ro,nosuid,nodev,barrier=1,data=ordered,nodelalloc wait

36
full_flo.mk Normal file
View File

@ -0,0 +1,36 @@
#
# Copyright 2012 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Sample: This is where we'd set a backup provider if we had one
# $(call inherit-product, device/sample/products/backup_overlay.mk)
# Get the long list of APNs
PRODUCT_COPY_FILES := device/asus/flo/data/etc/apns-conf.xml:system/etc/apns-conf.xml
# Inherit from the common Open Source product configuration
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
PRODUCT_NAME := full_flo
PRODUCT_DEVICE := flo
PRODUCT_BRAND := Android
PRODUCT_MODEL := Full JellyBean on Flo
PRODUCT_MANUFACTURER := ASUS
PRODUCT_RESTRICT_VENDOR_FILES := true
# Inherit from hardware-specific part of the product configuration
$(call inherit-product, device/asus/flo/device.mk)
$(call inherit-product-if-exists, vendor/asus/flo/device-vendor.mk)
#$(call inherit-product-if-exists, vendor/qcom/proprietary/common/config/device-vendor.mk)

84
gps.conf Normal file
View File

@ -0,0 +1,84 @@
XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra2.bin
XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra2.bin
XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra2.bin
# DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info
# 4 - Debug, 5 - Verbose
DEBUG_LEVEL = 3
# Intermediate position report, 1=enable, 0=disable
INTERMEDIATE_POS=0
# supl version 1.0
SUPL_VER=0x10000
# Error Estimate
# _SET = 1
# _CLEAR = 0
ERR_ESTIMATE=0
# GPS Capabilities bit mask
# SCHEDULING = 1
# MSB = 2
# MSA = 4
# ULP = 0x20
# default = MSA | MSB | SCHEDULING | ULP
CAPABILITIES=0x07
# Accuracy threshold for intermediate positions
# less accurate positions are ignored, 0 for passing all positions
# ACCURACY_THRES=5000
################################
##### AGPS server settings #####
################################
# FOR SUPL SUPPORT, set the following
# SUPL_HOST=supl.host.com or IP
# SUPL_PORT=1234
SUPL_HOST=supl.google.com
SUPL_PORT=7276
# FOR C2K PDE SUPPORT, set the following
# C2K_HOST=c2k.pde.com or IP
# C2K_PORT=1234
################################
# Sensor Settings
################################
# Needs to be set explicitly based on sensor
# There is no default value.
#GYRO_BIAS_RANDOM_WALK=
SENSOR_ACCEL_BATCHES_PER_SEC=2
SENSOR_ACCEL_SAMPLES_PER_BATCH=5
SENSOR_GYRO_BATCHES_PER_SEC=2
SENSOR_GYRO_SAMPLES_PER_BATCH=5
# Sensor Control Mode (0=AUTO, 1=FORCE_ON)
SENSOR_CONTROL_MODE=0
# Enable or Disable Sensors for GPS use (0=Enable, 1=Disable)
SENSOR_USAGE=1
# Choose GSIFF sensor provider (1=DSPS, 2=Android NDK)
SENSOR_PROVIDER=1
################################
# Indoor Positioning Settings
################################
# 0: QUIPC disabled, 1: QUIPC enabled, 2: forced QUIPC only
QUIPC_ENABLED = 0
################################
# EXTRA SETTINGS
################################
# Enable or Disable Wiper (1=Enable, 0=Disable)
ENABLE_WIPER=0
####################################
# LTE Positioning Profile Settings
####################################
# 0: Enable RRLP on LTE(Default) 1: Enable LPP_User_Plane on LTE
LPP_PROFILE = 0

15
hs_detect.kcm Normal file
View File

@ -0,0 +1,15 @@
# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
type SPECIAL_FUNCTION

4
hs_detect.kl Normal file
View File

@ -0,0 +1,4 @@
key 226 HEADSETHOOK WAKE
key 116 POWER WAKE
key 107 ENDCALL WAKE_DROPPED

76
init.flo.bt.sh Normal file
View File

@ -0,0 +1,76 @@
#!/system/bin/sh
BLUETOOTH_SLEEP_PATH=/proc/bluetooth/sleep/proto
LOG_TAG="msm8960-bluetooth"
LOG_NAME="${0}:"
loge ()
{
/system/bin/log -t $LOG_TAG -p e "$LOG_NAME $@"
}
logi ()
{
/system/bin/log -t $LOG_TAG -p i "$LOG_NAME $@"
}
failed ()
{
loge "$1: exit code $2"
exit $2
}
# Note that "hci_qcomm_init -e" prints expressions to set the shell variables
# BTS_DEVICE, BTS_TYPE, BTS_BAUD, and BTS_ADDRESS.
POWER_CLASS=`getprop qcom.bt.dev_power_class`
TRANSPORT=`getprop ro.qualcomm.bt.hci_transport`
DUTADDR=`getprop net.btdut.address`
#find the transport type
logi "Transport : $TRANSPORT"
logi "DUTADDR : $DUTADDR"
#load bd addr
if [$DUTADDR == ""]
then
BDADDR=`/system/bin/bdAddrLoader -f /persist/bluetooth/.bdaddr -h -x`
else
BDADDR=`/system/bin/bdAddrLoader -p net.btdut.address -s -x`
fi
setprop bluetooth.status off
logi "BDADDR: $BDADDR"
case $POWER_CLASS in
1) PWR_CLASS="-p 0" ;
logi "Power Class: 1";;
2) PWR_CLASS="-p 1" ;
logi "Power Class: 2";;
3) PWR_CLASS="-p 2" ;
logi "Power Class: CUSTOM";;
*) PWR_CLASS="";
logi "Power Class: Ignored. Default(1) used (1-CLASS1/2-CLASS2/3-CUSTOM)";
logi "Power Class: To override, Before turning BT ON; setprop qcom.bt.dev_power_class <1 or 2 or 3>";;
esac
if [$BDADDR == ""]
then
logwrapper /system/bin/hci_qcomm_init -e $PWR_CLASS -vv
else
logwrapper /system/bin/hci_qcomm_init -b $BDADDR -e $PWR_CLASS -vv
fi
case $? in
0) logi "Bluetooth QSoC firmware download succeeded, $PWR_CLASS $BDADDR $TRANSPORT";;
*) failed "Bluetooth QSoC firmware download failed" $exit_code_hci_qcomm_init;
setprop bluetooth.status off;
exit $exit_code_hci_qcomm_init;;
esac
setprop bluetooth.status on
logi "start bluetooth smd transport"
exit 0

470
init.flo.rc Normal file
View File

@ -0,0 +1,470 @@
#
# Copyright 2012 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
import init.flo.usb.rc
on early-init
mount debugfs debugfs /sys/kernel/debug
symlink /data/tombstones /tombstones
on init
# See storage config details at http://source.android.com/tech/storage/
mkdir /mnt/shell/emulated 0700 shell shell
mkdir /storage/emulated 0555 root root
export EXTERNAL_STORAGE /storage/emulated/legacy
export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
export EMULATED_STORAGE_TARGET /storage/emulated
# Support legacy paths
symlink /storage/emulated/legacy /sdcard
symlink /storage/emulated/legacy /mnt/sdcard
symlink /storage/emulated/legacy /storage/sdcard0
symlink /mnt/shell/emulated/0 /storage/emulated/legacy
on init
# Set permissions for persist partition
mkdir /persist 0771 system system
mkdir /firmware 0771 system system
on fs
mount_all ./fstab.flo
setprop ro.crypto.fuse_sdcard true
on early-boot
# set RLIMIT_MEMLOCK to 64MB
setrlimit 8 67108864 67108864
on boot
#Create QMUX deamon socket area
mkdir /dev/socket/qmux_radio 0770 radio radio
chmod 2770 /dev/socket/qmux_radio
mkdir /dev/socket/qmux_audio 0770 media audio
chmod 2770 /dev/socket/qmux_audio
mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth
chmod 2770 /dev/socket/qmux_bluetooth
mkdir /dev/socket/qmux_gps 0770 gps gps
chmod 2770 /dev/socket/qmux_gps
# Allow QMUX daemon to assign port open wait time
chown radio radio /sys/devices/virtual/hsicctl/hsicctl0/modem_wait
#Remove SUID bit for iproute2 ip tool
chmod 0755 /system/bin/ip
#port-bridge
chmod 0660 /dev/smd0
chown system system /dev/smd0
#BT DUN port-bridge
chmod 0660 /dev/smd7
chown bluetooth bluetooth /dev/smd7
chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state
# create symlink for fb1 as HDMI
symlink /dev/graphics/fb1 /dev/graphics/hdmi
# Remove write permissions to video related nodes
chmod 0664 /sys/devices/virtual/graphics/fb1/hpd
chmod 0664 /sys/devices/virtual/graphics/fb1/video_mode
chmod 0664 /sys/devices/virtual/graphics/fb1/format_3d
# Change owner and group for media server and surface flinger
chown system system /sys/devices/virtual/graphics/fb1/format_3d
chown system system /sys/devices/virtual/graphics/fb1/hpd
#For bridgemgr daemon to inform the USB driver of the correct transport
chown radio radio /sys/class/android_usb/f_rmnet_smd_sdio/transport
chmod 660 /dev/rtc0
chown system system /dev/rtc0
chown root system /proc/net/ip_conntrack
# Enable DEBUG_SUSPEND, DEBUG_EXIT_SUSPEND, and DEBUG_WAKEUP
write /sys/module/wakelock/parameters/debug_mask 7
#To allow interfaces to get v6 address when tethering is enabled
write /proc/sys/net/ipv6/conf/rmnet0/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet1/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet2/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet3/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet4/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet5/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet6/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet7/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio0/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio1/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio2/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio3/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio4/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio5/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio6/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio7/accept_ra 2
# NFC: create data/nfc for nv storage
mkdir /data/nfc 770 nfc nfc
mkdir /data/nfc/param 770 nfc nfc
# Assign TCP buffer thresholds to be ceiling value of technology maximums
# Increased technology maximums should be reflected here.
write /proc/sys/net/core/rmem_max 1220608
write /proc/sys/net/core/wmem_max 1220608
# msm specific files that need to be created on /data
on post-fs-data
mkdir /data/media 0770 media_rw media_rw
# Create the directories used by the Wireless subsystem
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
mkdir /data/tombstones 0771 system system
mkdir /tombstones/modem 0771 system system
mkdir /tombstones/lpass 0771 system system
mkdir /tombstones/wcnss 0771 system system
mkdir /tombstones/dsps 0771 system system
mkdir /tombstones/mdm 0771 system system
# to observe dnsmasq.leases file for dhcp information of soft ap.
chown dhcp system /data/misc/dhcp
write /dev/wcnss_wlan 1
write /sys/module/wcnss_ssr_8960/parameters/enable_riva_ssr 1
# Create directory used by audio subsystem
mkdir /data/misc/audio 0770 audio audio
# Workaround for conn_init not copying the updated firmware
rm /data/misc/wifi/WCNSS_qcom_cfg.ini
rm /data/misc/wifi/WCNSS_qcom_wlan_nv.bin
# Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections
# We chown/chmod /persist again so because mount is run as root + defaults
chown system system /persist
chmod 0664 /sys/devices/platform/msm_sdcc.1/polling
chmod 0664 /sys/devices/platform/msm_sdcc.2/polling
chmod 0664 /sys/devices/platform/msm_sdcc.3/polling
chmod 0664 /sys/devices/platform/msm_sdcc.4/polling
# Chown polling nodes as needed from UI running on system server
chown system system /sys/devices/platform/msm_sdcc.1/polling
chown system system /sys/devices/platform/msm_sdcc.2/polling
chown system system /sys/devices/platform/msm_sdcc.3/polling
chown system system /sys/devices/platform/msm_sdcc.4/polling
#Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant
mkdir /data/system 0775 system system
#symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant
#Create directory used by sensor subsystem(dsps)
mkdir /data/system/sensors
chmod 665 /data/system/sensors
write /data/system/sensors/settings 1
chmod 660 /data/system/sensors/settings
# AKM setting data
mkdir /data/misc/sensors
chmod 775 /data/misc/sensors
mkdir /persist/sensors
chmod 775 /persist/sensors
#Provide the access to hostapd.conf only to root and group
chmod 0660 /data/hostapd/hostapd.conf
# Enable the setgid bit on the directory
mkdir /data/audio 0770 media audio
chmod 2770 /data/audio
# kickstart
mkdir /data/qcks 0770 system system
chown system /dev/block/platform/msm_sdcc.1/by-name
setprop vold.post_fs_data_done 1
rm /data/local/tmp/adreno_config.txt
# LED On/Off synchronization
chown system system /sys/class/leds/red/device/lock
# communicate with mpdecision and thermald
mkdir /dev/socket/mpdecision 0770 system system
chmod 2770 /dev/socket/mpdecision
# adjust vibrator amplitude
write /sys/class/timed_output/vibrator/amp 70
# Enable Power modes and set the CPU Freq Sampling rates
write /sys/module/rpm_resources/enable_low_power/L2_cache 1
write /sys/module/rpm_resources/enable_low_power/pxo 1
write /sys/module/rpm_resources/enable_low_power/vdd_dig 1
write /sys/module/rpm_resources/enable_low_power/vdd_mem 1
write /sys/module/pm_8x60/modes/cpu0/power_collapse/suspend_enabled 1
write /sys/module/pm_8x60/modes/cpu1/power_collapse/suspend_enabled 1
write /sys/module/pm_8x60/modes/cpu2/power_collapse/suspend_enabled 1
write /sys/module/pm_8x60/modes/cpu3/power_collapse/suspend_enabled 1
write /sys/module/pm_8x60/modes/cpu0/power_collapse/idle_enabled 1
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "ondemand"
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "ondemand"
write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "ondemand"
write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "ondemand"
write /sys/devices/system/cpu/cpufreq/ondemand/up_threshold 90
write /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate 50000
write /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy 1
write /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor 4
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 384000
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 384000
write /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq 384000
write /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq 384000
write /sys/devices/system/cpu/cpu1/online 1
write /sys/devices/system/cpu/cpu2/online 1
write /sys/devices/system/cpu/cpu3/online 1
on charger
# Enable Power modes and set the CPU Freq Sampling rates
write /sys/module/rpm_resources/enable_low_power/L2_cache 1
write /sys/module/rpm_resources/enable_low_power/pxo 1
write /sys/module/rpm_resources/enable_low_power/vdd_dig 1
write /sys/module/rpm_resources/enable_low_power/vdd_mem 1
write /sys/module/pm_8x60/modes/cpu0/power_collapse/suspend_enabled 1
write /sys/module/pm_8x60/modes/cpu1/power_collapse/suspend_enabled 1
write /sys/module/pm_8x60/modes/cpu2/power_collapse/suspend_enabled 1
write /sys/module/pm_8x60/modes/cpu3/power_collapse/suspend_enabled 1
write /sys/module/pm_8x60/modes/cpu0/power_collapse/idle_enabled 1
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "powersave"
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "powersave"
write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "powersave"
write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "powersave"
write /sys/devices/system/cpu/cpufreq/ondemand/up_threshold 90
write /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate 50000
write /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy 1
write /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor 4
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 384000
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 384000
write /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq 384000
write /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq 384000
on property:init.svc.wpa_supplicant=stopped
stop dhcpcd
service rmt_storage /system/bin/rmt_storage
class main
user root
service hciattach /system/bin/sh /system/etc/init.flo.bt.sh
class late_start
user bluetooth
group qcom_oncrpc bluetooth net_bt_admin system
disabled
oneshot
on property:bluetooth.hciattach=true
start hciattach
on property:bluetooth.hciattach=false
setprop bluetooth.status off
# Remount persist as rw if needed
on property:ro.debuggable=1
mount ext4 /dev/block/platform/msm_sdcc.1/by-name/persist /persist rw remount nosuid nodev barrier=1 data=ordered nodelalloc
chown system system /persist
chmod 0771 /persist
# create filesystems if necessary
service setup_fs /system/bin/setup_fs \
/dev/block/platform/msm_sdcc.1/by-name/userdata \
/dev/block/platform/msm_sdcc.1/by-name/cache
class core
user root
group root
oneshot
service bridgemgrd /system/bin/bridgemgrd
class main
user radio
group radio
service qcom-c_main-sh /system/bin/sh /init.qcom.class_main.sh
class main
user root
oneshot
# QMUX must be in multiple groups to support external process connections
service qmuxd /system/bin/qmuxd
class main
user radio
group radio audio bluetooth gps
disabled
service ks_checker /system/bin/sh /system/etc/kickstart_checker.sh
class core
oneshot
service kickstart /system/bin/qcks -i /firmware/image/ -r /data/tombstones/mdm/
class core
user system
group system
disabled
oneshot
service asus-dbug-d /data/data/com.asus.debugger/files/asus-debugger-d
class late_start
disabled
on property:persist.radio.kickstart=on
start kickstart
on property:ril.asus_debugger_running=1
start asus-dbug-d
service netmgrd /system/bin/netmgrd
class main
disabled
service sensors /system/bin/sensors.qcom
class late_start
user root
group root
service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
-e/data/misc/wifi/entropy.bin
# we will start as root and wpa_supplicant will switch to user wifi
# after setting up the capabilities required for WEXT
# user wifi
# group wifi inet keystore
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service p2p_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant \
-ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf -N \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
-e/data/misc/wifi/entropy.bin -puse_p2p_group_interface=1
# we will start as root and wpa_supplicant will switch to user wifi
# after setting up the capabilities required for WEXT
# user wifi
# group wifi inet keystore
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL
class main
disabled
oneshot
service dhcpcd_p2p /system/bin/dhcpcd -aABKL
class main
disabled
oneshot
service iprenew_wlan0 /system/bin/dhcpcd -n
class main
disabled
oneshot
service iprenew_p2p /system/bin/dhcpcd -n
class main
disabled
oneshot
service dhcpcd_bnep0 /system/bin/dhcpcd -BKLG
disabled
oneshot
on property:ro.data.large_tcp_window_size=true
# Adjust socket buffer to enlarge TCP receive window for high bandwidth (e.g. DO-RevB)
write /proc/sys/net/ipv4/tcp_adv_win_scale 1
service charger /charger
class charger
# virtual sdcard daemon running as media_rw (1023)
service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023
class late_start
service thermald /system/bin/thermald
class main
service mpdecision /system/bin/mpdecision --no_sleep --avg_comp
class main
service ppd /system/bin/mm-pp-daemon
class late_start
user system
socket pps stream 0660 system system graphics
group system graphics
service qcamerasvr /system/bin/mm-qcamera-daemon
class late_start
user camera
group camera system inet input
service conn_init /system/bin/logwrapper /system/bin/conn_init
class main
user system
group system wifi
oneshot
service bdAddrLoader /system/bin/bdAddrLoader -f /persist/bluetooth/.bdaddr -h -x
class main
user bluetooth
group system bluetooth
oneshot
# bugreport is triggered by holding down volume down, volume up and power
service bugreport /system/bin/bugmailer.sh -v
class main
disabled
oneshot
keycodes 114 115 116
service qseecomd /system/bin/qseecomd
class late_start
user system
group system
service diag_mdlog /system/bin/logwrapper /system/bin/diag_mdlog -s 100
class late_start
disabled
# on property:gsm.sim.state=READY
# start diag_mdlog
on property:ro.boot.baseband=mdm
start qmuxd
chown system system /dev/block/mmcblk0p18
chmod 0660 /dev/block/mmcblk0p18
chown system system /dev/block/mmcblk0p19
chmod 0660 /dev/block/mmcblk0p19
start kickstart
setprop persist.sys.usb.config diag,mdm,adb
on property:ro.boot.baseband=apq
setprop ro.radio.noril yes
stop ril-daemon
setprop persist.sys.usb.config diag,adb

152
init.flo.usb.rc Normal file
View File

@ -0,0 +1,152 @@
# Copyright 2012 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
on init
write /sys/class/android_usb/android0/f_rndis/manufacturer LGE
write /sys/class/android_usb/android0/f_rndis/vendorID 18D1
write /sys/class/android_usb/android0/f_rndis/wceis 1
on boot
write /sys/class/android_usb/android0/iSerial $ro.serialno
write /sys/class/android_usb/android0/iManufacturer $ro.product.manufacturer
write /sys/class/android_usb/android0/iProduct $ro.product.model
# MTP
on property:sys.usb.config=mtp
stop adbd
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 0B05
write /sys/class/android_usb/android0/idProduct 4CC0
write /sys/class/android_usb/android0/bDeviceClass 0
write /sys/class/android_usb/android0/bDeviceSubClass 0
write /sys/class/android_usb/android0/bDeviceProtocol 0
write /sys/class/android_usb/android0/functions mtp
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=mtp,adb
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 0B05
write /sys/class/android_usb/android0/idProduct 4CC1
write /sys/class/android_usb/android0/bDeviceClass 0
write /sys/class/android_usb/android0/bDeviceSubClass 0
write /sys/class/android_usb/android0/bDeviceProtocol 0
write /sys/class/android_usb/android0/functions mtp,adb
write /sys/class/android_usb/android0/enable 1
start adbd
setprop sys.usb.state ${sys.usb.config}
# rndis
on property:sys.usb.config=rndis
stop adbd
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 0B05
write /sys/class/android_usb/android0/idProduct 4CC2
write /sys/class/android_usb/android0/bDeviceClass 239
write /sys/class/android_usb/android0/bDeviceSubClass 2
write /sys/class/android_usb/android0/bDeviceProtocol 1
write /sys/class/android_usb/android0/functions rndis
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=rndis,adb
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 0B05
write /sys/class/android_usb/android0/idProduct 4CC3
write /sys/class/android_usb/android0/bDeviceClass 239
write /sys/class/android_usb/android0/bDeviceSubClass 2
write /sys/class/android_usb/android0/bDeviceProtocol 1
write /sys/class/android_usb/android0/functions rndis,adb
write /sys/class/android_usb/android0/enable 1
start adbd
setprop sys.usb.state ${sys.usb.config}
# PTP
on property:sys.usb.config=ptp
stop adbd
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 0B05
write /sys/class/android_usb/android0/idProduct 4CC4
write /sys/class/android_usb/android0/bDeviceClass 0
write /sys/class/android_usb/android0/bDeviceSubClass 0
write /sys/class/android_usb/android0/bDeviceProtocol 0
write /sys/class/android_usb/android0/functions ptp
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=ptp,adb
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 0B05
write /sys/class/android_usb/android0/idProduct 4CC5
write /sys/class/android_usb/android0/bDeviceClass 0
write /sys/class/android_usb/android0/bDeviceSubClass 0
write /sys/class/android_usb/android0/bDeviceProtocol 0
write /sys/class/android_usb/android0/functions ptp,adb
write /sys/class/android_usb/android0/enable 1
start adbd
setprop sys.usb.state ${sys.usb.config}
# diag
on property:sys.usb.config=diag
stop adbd
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 1004
write /sys/class/android_usb/android0/idProduct 631B
write /sys/class/android_usb/android0/bDeviceClass 239
write /sys/class/android_usb/android0/bDeviceSubClass 2
write /sys/class/android_usb/android0/bDeviceProtocol 1
write /sys/class/android_usb/android0/f_acm/acm_transports tty
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
write /sys/class/android_usb/android0/functions acm,diag,mtp,adb
write /sys/class/android_usb/android0/enable 1
start adbd
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=diag,adb
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 05C6
write /sys/class/android_usb/android0/idProduct 9025
write /sys/class/android_usb/android0/f_diag/clients diag
write /sys/class/android_usb/android0/f_serial/transports smd,tty
write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
write /sys/class/android_usb/android0/enable 1
start adbd
setprop sys.usb.state $sys.usb.config
on property:sys.usb.config=diag,mdm,adb
stop adbd
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 05C6
write /sys/class/android_usb/android0/idProduct 9031
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
write /sys/class/android_usb/android0/f_serial/transports hsic,tty
write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
write /sys/class/android_usb/android0/enable 1
start adbd
setprop sys.usb.state ${sys.usb.config}
# Fusion 3 composition with diag_mdm and adb
on property:sys.usb.config=diag,diag_mdm,serial_hsic,serial_tty,rmnet_hsic,mass_storage,adb
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 05C6
write /sys/class/android_usb/android0/idProduct 9031
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
write /sys/class/android_usb/android0/f_serial/transports hsic,tty
write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
write /sys/class/android_usb/android0/enable 1
start adbd
setprop sys.usb.state ${sys.usb.config}

15
keypad_8064.kcm Normal file
View File

@ -0,0 +1,15 @@
# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
type SPECIAL_FUNCTION

2
keypad_8064.kl Normal file
View File

@ -0,0 +1,2 @@
key 114 VOLUME_DOWN WAKE
key 115 VOLUME_UP WAKE

11
kickstart_checker.sh Normal file
View File

@ -0,0 +1,11 @@
#!/system/bin/sh
setprop persist.radio.kickstart off
if [ $(getprop ro.baseband) == "mdm" ]; then
for f in $(ls /data/qcks/); do
(ls -l /data/qcks/$f | grep root) && rm /data/qcks/$f;
done
setprop persist.radio.kickstart on
fi

72
media_codecs.xml Normal file
View File

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright (C) 2012 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<MediaCodecs>
<Encoders>
<MediaCodec name="OMX.qcom.video.encoder.mpeg4" type="video/mp4v-es" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports"/>
<Quirk name="requires-loaded-to-idle-after-allocation"/>
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.h263" type="video/3gpp" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports"/>
<Quirk name="requires-loaded-to-idle-after-allocation"/>
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports"/>
<Quirk name="requires-loaded-to-idle-after-allocation"/>
</MediaCodec>
<MediaCodec name="OMX.google.amrnb.encoder" type="audio/3gpp" />
<MediaCodec name="OMX.google.aac.encoder" type="audio/mp4a-latm" />
<MediaCodec name="OMX.google.amrwb.encoder" type="audio/amr-wb" />
<MediaCodec name="OMX.google.flac.encoder" type="audio/flac" />
</Encoders>
<Decoders>
<MediaCodec name="OMX.google.vorbis.decoder" type="audio/vorbis" />
<MediaCodec name="OMX.google.mp3.decoder" type="audio/mpeg" />
<MediaCodec name="OMX.google.amrnb.decoder" type="audio/3gpp" />
<MediaCodec name="OMX.google.amrwb.decoder" type="audio/amr-wb" />
<MediaCodec name="OMX.google.aac.decoder" type="audio/mp4a-latm" />
<MediaCodec name="OMX.google.g711.alaw.decoder" type="audio/g711-alaw" />
<MediaCodec name="OMX.google.g711.mlaw.decoder" type="audio/g711-mlaw" />
<MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports"/>
<Quirk name="defers-output-buffer-allocation"/>
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.mpeg2" type="video/mpeg2" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports"/>
<Quirk name="defers-output-buffer-allocation"/>
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.mpeg4" type="video/mp4v-es" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports"/>
<Quirk name="defers-output-buffer-allocation"/>
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.h263" type="video/3gpp" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports"/>
<Quirk name="defers-output-buffer-allocation"/>
</MediaCodec>
<MediaCodec name="OMX.google.vpx.decoder" type="video/x-vnd.on2.vp8" />
<MediaCodec name="OMX.google.h264.decoder" type="video/avc" />
<MediaCodec name="OMX.google.h263.decoder" type="video/3gpp" />
<MediaCodec name="OMX.google.mpeg4.decoder" type="video/mp4v-es" />
</Decoders>
</MediaCodecs>

428
media_profiles.xml Normal file
View File

@ -0,0 +1,428 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE MediaSettings [
<!ELEMENT MediaSettings (CamcorderProfiles,
EncoderOutputFileFormat+,
VideoEncoderCap+,
AudioEncoderCap+,
VideoDecoderCap,
AudioDecoderCap)>
<!ELEMENT CamcorderProfiles (EncoderProfile+, ImageEncoding+, ImageDecoding, Camera)>
<!ELEMENT EncoderProfile (Video, Audio)>
<!ATTLIST EncoderProfile quality (high|low) #REQUIRED>
<!ATTLIST EncoderProfile fileFormat (mp4|3gp) #REQUIRED>
<!ATTLIST EncoderProfile duration (30|60) #REQUIRED>
<!ATTLIST EncoderProfile cameraId (0|1) #REQUIRED>
<!ELEMENT Video EMPTY>
<!ATTLIST Video codec (h264|h263|m4v) #REQUIRED>
<!ATTLIST Video bitRate CDATA #REQUIRED>
<!ATTLIST Video width CDATA #REQUIRED>
<!ATTLIST Video height CDATA #REQUIRED>
<!ATTLIST Video frameRate CDATA #REQUIRED>
<!ELEMENT Audio EMPTY>
<!ATTLIST Audio codec (amrnb|amrwb|aac) #REQUIRED>
<!ATTLIST Audio bitRate CDATA #REQUIRED>
<!ATTLIST Audio sampleRate CDATA #REQUIRED>
<!ATTLIST Audio channels (1|2) #REQUIRED>
<!ELEMENT ImageEncoding EMPTY>
<!ATTLIST ImageEncoding quality (90|80|70|60|50|40) #REQUIRED>
<!ELEMENT ImageDecoding EMPTY>
<!ATTLIST ImageDecoding memCap CDATA #REQUIRED>
<!ELEMENT Camera EMPTY>
<!ELEMENT EncoderOutputFileFormat EMPTY>
<!ATTLIST EncoderOutputFileFormat name (mp4|3gp) #REQUIRED>
<!ELEMENT VideoEncoderCap EMPTY>
<!ATTLIST VideoEncoderCap name (h264|h263|m4v|wmv) #REQUIRED>
<!ATTLIST VideoEncoderCap enabled (true|false) #REQUIRED>
<!ATTLIST VideoEncoderCap minBitRate CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap maxBitRate CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap minFrameWidth CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap maxFrameWidth CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap minFrameHeight CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap maxFrameHeight CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap minFrameRate CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap maxFrameRate CDATA #REQUIRED>
<!ELEMENT AudioEncoderCap EMPTY>
<!ATTLIST AudioEncoderCap name (amrnb|amrwb|aac|wma) #REQUIRED>
<!ATTLIST AudioEncoderCap enabled (true|false) #REQUIRED>
<!ATTLIST AudioEncoderCap minBitRate CDATA #REQUIRED>
<!ATTLIST AudioEncoderCap maxBitRate CDATA #REQUIRED>
<!ATTLIST AudioEncoderCap minSampleRate CDATA #REQUIRED>
<!ATTLIST AudioEncoderCap maxSampleRate CDATA #REQUIRED>
<!ATTLIST AudioEncoderCap minChannels (1|2) #REQUIRED>
<!ATTLIST AudioEncoderCap maxChannels (1|2) #REQUIRED>
<!ELEMENT VideoDecoderCap EMPTY>
<!ATTLIST VideoDecoderCap name (wmv) #REQUIRED>
<!ATTLIST VideoDecoderCap enabled (true|false) #REQUIRED>
<!ELEMENT AudioDecoderCap EMPTY>
<!ATTLIST AudioDecoderCap name (wma) #REQUIRED>
<!ATTLIST AudioDecoderCap enabled (true|false) #REQUIRED>
<!ELEMENT VideoEditorCap EMPTY>
<!ATTLIST VideoEditorCap maxInputFrameWidth CDATA #REQUIRED>
<!ATTLIST VideoEditorCap maxInputFrameHeight CDATA #REQUIRED>
<!ATTLIST VideoEditorCap maxOutputFrameWidth CDATA #REQUIRED>
<!ATTLIST VideoEditorCap maxOutputFrameHeight CDATA #REQUIRED>
<!ATTLIST VideoEditorCap maxPrefetchYUVFrames CDATA #REQUIRED>
<!ELEMENT ExportVideoProfile EMPTY>
<!ATTLIST ExportVideoProfile name (h264|h263|m4v) #REQUIRED>
<!ATTLIST ExportVideoProfile profile CDATA #REQUIRED>
<!ATTLIST ExportVideoProfile level CDATA #REQUIRED>
]>
<!--
This file is used to declare the multimedia profiles and capabilities
on an android-powered device.
-->
<MediaSettings>
<!-- Each camcorder profile defines a set of predefined configuration parameters -->
<CamcorderProfiles cameraId="0">
<EncoderProfile quality="qvga" fileFormat="3gp" duration="60">
<Video codec="m4v"
bitRate="128000"
width="320"
height="240"
frameRate="15" />
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="cif" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="1200000"
width="352"
height="288"
frameRate="30" />
<Audio codec="aac"
bitRate="96000"
sampleRate="48000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="480p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="5000000"
width="720"
height="480"
frameRate="30" />
<Audio codec="aac"
bitRate="96000"
sampleRate="48000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="720p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="8000000"
width="1280"
height="720"
frameRate="30" />
<Audio codec="aac"
bitRate="96000"
sampleRate="48000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="12000000"
width="1920"
height="1080"
frameRate="30" />
<Audio codec="aac"
bitRate="96000"
sampleRate="48000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="192000"
width="176"
height="144"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="1200000"
width="352"
height="288"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="aac"
bitRate="96000"
sampleRate="48000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="5000000"
width="720"
height="480"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="aac"
bitRate="96000"
sampleRate="48000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="8000000"
width="1280"
height="720"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="aac"
bitRate="96000"
sampleRate="48000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="12000000"
width="1920"
height="1080"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="aac"
bitRate="96000"
sampleRate="48000"
channels="1" />
</EncoderProfile>
<ImageEncoding quality="95" />
<ImageEncoding quality="80" />
<ImageEncoding quality="70" />
<ImageDecoding memCap="20000000" />
</CamcorderProfiles>
<CamcorderProfiles cameraId="1">
<EncoderProfile quality="qvga" fileFormat="3gp" duration="60">
<Video codec="m4v"
bitRate="128000"
width="320"
height="240"
frameRate="15" />
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="cif" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="1200000"
width="352"
height="288"
frameRate="30" />
<Audio codec="aac"
bitRate="96000"
sampleRate="48000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="480p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="5000000"
width="720"
height="480"
frameRate="30" />
<Audio codec="aac"
bitRate="96000"
sampleRate="48000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="720p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="8000000"
width="1280"
height="720"
frameRate="30" />
<Audio codec="aac"
bitRate="96000"
sampleRate="48000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="192000"
width="176"
height="144"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="1200000"
width="352"
height="288"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="aac"
bitRate="96000"
sampleRate="48000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="5000000"
width="720"
height="480"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="aac"
bitRate="96000"
sampleRate="48000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="8000000"
width="1280"
height="720"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="aac"
bitRate="96000"
sampleRate="48000"
channels="1" />
</EncoderProfile>
<ImageEncoding quality="95" />
<ImageEncoding quality="80" />
<ImageEncoding quality="70" />
<ImageDecoding memCap="20000000" />
</CamcorderProfiles>
<EncoderOutputFileFormat name="3gp" />
<EncoderOutputFileFormat name="mp4" />
<!--
If a codec is not enabled, it is invisible to the applications
In other words, the applications won't be able to use the codec
or query the capabilities of the codec at all if it is disabled
-->
<VideoEncoderCap name="h264" enabled="true"
minBitRate="64000" maxBitRate="12000000"
minFrameWidth="176" maxFrameWidth="1920"
minFrameHeight="144" maxFrameHeight="1080"
minFrameRate="15" maxFrameRate="30" />
<VideoEncoderCap name="h263" enabled="true"
minBitRate="64000" maxBitRate="2000000"
minFrameWidth="176" maxFrameWidth="800"
minFrameHeight="144" maxFrameHeight="480"
minFrameRate="15" maxFrameRate="30" />
<VideoEncoderCap name="m4v" enabled="true"
minBitRate="64000" maxBitRate="4000000"
minFrameWidth="176" maxFrameWidth="1920"
minFrameHeight="144" maxFrameHeight="1080"
minFrameRate="15" maxFrameRate="30" />
<AudioEncoderCap name="aac" enabled="true"
minBitRate="758" maxBitRate="288000"
minSampleRate="8000" maxSampleRate="48000"
minChannels="1" maxChannels="1" />
<AudioEncoderCap name="heaac" enabled="true"
minBitRate="8000" maxBitRate="64000"
minSampleRate="16000" maxSampleRate="48000"
minChannels="1" maxChannels="1" />
<AudioEncoderCap name="aaceld" enabled="true"
minBitRate="16000" maxBitRate="192000"
minSampleRate="16000" maxSampleRate="48000"
minChannels="1" maxChannels="1" />
<AudioEncoderCap name="amrwb" enabled="true"
minBitRate="6600" maxBitRate="23050"
minSampleRate="16000" maxSampleRate="16000"
minChannels="1" maxChannels="1" />
<AudioEncoderCap name="amrnb" enabled="true"
minBitRate="5525" maxBitRate="12200"
minSampleRate="8000" maxSampleRate="8000"
minChannels="1" maxChannels="1" />
<!--
FIXME:
We do not check decoder capabilities at present
At present, we only check whether windows media is visible
for TEST applications. For other applications, we do
not perform any checks at all.
-->
<VideoDecoderCap name="wmv" enabled="false"/>
<AudioDecoderCap name="wma" enabled="false"/>
<!--
The VideoEditor Capability configuration:
- maxInputFrameWidth: maximum video width of imported video clip.
- maxInputFrameHeight: maximum video height of imported video clip.
- maxOutputFrameWidth: maximum video width of exported video clip.
- maxOutputFrameHeight: maximum video height of exported video clip.
- maxPrefetchYUVFrames: maximum prefetch YUV frames for encoder,
used to limit the amount of memory for prefetched YUV frames.
For this platform, it allows maximum 30MB(3MB per 1080p frame x 10
frames) memory.
-->
<VideoEditorCap maxInputFrameWidth="1920"
maxInputFrameHeight="1080" maxOutputFrameWidth="1920"
maxOutputFrameHeight="1080" maxPrefetchYUVFrames="10"/>
<!--
The VideoEditor Export codec profile and level values
correspond to the values in OMX_Video.h.
E.g. for h264, profile value 1 means OMX_VIDEO_AVCProfileBaseline
and level 4096 means OMX_VIDEO_AVCLevel41.
Please note that the values are in decimal.
These values are for video encoder.
-->
<!--
Codec = h.264, Baseline profile, level 4.0
-->
<ExportVideoProfile name="h264" profile= "1" level="2048"/>
<!--
Codec = h.263, Baseline profile, level 70
-->
<ExportVideoProfile name="h263" profile= "1" level="128"/>
<!--
Codec = mpeg4, Simple profile, level 5
-->
<ExportVideoProfile name="m4v" profile= "1" level="128"/>
</MediaSettings>

Binary file not shown.

Binary file not shown.

291
nfc/libnfc-brcm.conf Normal file
View File

@ -0,0 +1,291 @@
###################### Start of libnfc-brcm-common.conf #######################
###############################################################################
# Application options
APPL_TRACE_LEVEL=0x01
PROTOCOL_TRACE_LEVEL=0x00000000
###############################################################################
# performance measurement
# Change this setting to control how often USERIAL log the performance (throughput)
# data on read/write/poll
# defailt is to log performance dara for every 100 read or write
#REPORT_PERFORMANCE_MEASURE=100
###############################################################################
# File used for NFA storage
NFA_STORAGE="/data/nfc"
###############################################################################
# Snooze Mode Settings
#
# By default snooze mode is enabled. Set SNOOZE_MODE_CFG byte[0] to 0
# to disable.
#
# If SNOOZE_MODE_CFG is not provided, the default settings are used:
# They are as follows:
# 8 Sleep Mode (0=Disabled 1=UART 8=SPI/I2C)
# 0 Idle Threshold Host
# 0 Idle Threshold HC
# 0 NFC Wake active mode (0=ActiveLow 1=ActiveHigh)
# 1 Host Wake active mode (0=ActiveLow 1=ActiveHigh)
#
#SNOOZE_MODE_CFG={08:00:00:00:01}
###############################################################################
# Insert a delay in milliseconds after NFC_WAKE and before write to NFCC
NFC_WAKE_DELAY=20
###############################################################################
# Various Delay settings (in ms) used in USERIAL
# POWER_ON_DELAY
# Delay after turning on chip, before writing to transport (default 300)
# PRE_POWER_OFF_DELAY
# Delay after deasserting NFC-Wake before turn off chip (default 0)
# POST_POWER_OFF_DELAY
# Delay after turning off chip, before USERIAL_close returns (default 0)
#
#POWER_ON_DELAY=300
#PRE_POWER_OFF_DELAY=0
#POST_POWER_OFF_DELAY=0
###############################################################################
# LPTD mode configuration
# byte[0] is the length of the remaining bytes in this value
# if set to 0, LPTD params will NOT be sent to NFCC (i.e. disabled).
# byte[1] is the param id it should be set to B9.
# byte[2] is the length of the LPTD parameters
# byte[3] indicates if LPTD is enabled
# if set to 0, LPTD will be disabled (parameters will still be sent).
# byte[4-n] are the LPTD parameters.
# By default, LPTD is enabled and default settings are used.
# See nfc_hal_dm_cfg.c for defaults
LPTD_CFG={00:B9:21:01:02:FF:FF:04:A0:0F:40:00:80:02:02:10:00:00:00:31:0C:30:00:00:00:00:00:00:00:00:00:00:00:00:00:00}
###############################################################################
# Startup Configuration (100 bytes maximum)
#
# For the 0xCA parameter, byte[9] (marked by 'AA') is for UICC0, and byte[10] (marked by BB) is
# for UICC1. The values are defined as:
# 0 : UICCx only supports ISO_DEP in low power mode.
# 2 : UICCx only supports Mifare in low power mode.
# 3 : UICCx supports both ISO_DEP and Mifare in low power mode.
#
# AA BB
NFA_DM_START_UP_CFG={1F:CB:01:01:A5:01:01:CA:14:00:00:00:00:06:E8:03:00:00:00:00:00:00:00:00:00:00:00:00:00:80:01:01}
###############################################################################
# Startup Vendor Specific Configuration (100 bytes maximum);
# byte[0] TLV total len = 0x5
# byte[1] NCI_MTS_CMD|NCI_GID_PROP = 0x2f
# byte[2] NCI_MSG_FRAME_LOG = 0x9
# byte[3] 2
# byte[4] 0=turn off RF frame logging; 1=turn on
# byte[5] 0=turn off SWP frame logging; 1=turn on
# NFA_DM_START_UP_VSC_CFG={05:2F:09:02:01:01}
###############################################################################
# Antenna Configuration - This data is used when setting 0xC8 config item
# at startup (before discovery is started). If not used, no value is sent.
#
# The settings for this value are documented here:
# http://wcgbu.broadcom.com/wpan/PM/Project%20Document%20Library/bcm20791B0/
# Design/Doc/PHY%20register%20settings/BCM20791-B2-1027-02_PHY_Recommended_Reg_Settings.xlsx
# This document is maintained by Paul Forshaw.
#
# The values marked as ?? should be tweaked per antenna or customer/app:
# {20:C8:1E:06:??:00:??:??:??:00:??:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:??:01:00:00:40:04}
# array[0] = 0x20 is length of the payload from array[1] to the end
# array[1] = 0xC8 is PREINIT_DSP_CFG
PREINIT_DSP_CFG={06:1F:00:0A:03:30:00:04:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:4C:01:00:00:40:04}
###############################################################################
# Configure crystal frequency when internal LPO can't detect the frequency.
#XTAL_FREQUENCY=0
###############################################################################
# Use Nexus S NXP RC work to allow our stack/firmware to work with a retail
# Nexus S that causes IOP issues. Note, this will not pass conformance and
# should be removed for production.
USE_NXP_P2P_RC_WORKAROUND=1
###############################################################################
# Configure the default Destination Gate used by HCI (the default is 4, which
# is the ETSI loopback gate.
#NFA_HCI_DEFAULT_DEST_GATE=0x04
###############################################################################
# Configure the single default SE to use. The default is to use the first
# SE that is detected by the stack. This value might be used when the phone
# supports multiple SE (e.g. 0xF3 and 0xF4) but you want to force it to use
# one of them (e.g. 0xF4).
ACTIVE_SE=0xF4
###############################################################################
# Configure the NFC Extras to open and use a static pipe. If the value is
# not set or set to 0, then the default is use a dynamic pipe based on a
# destination gate (see NFA_HCI_DEFAULT_DEST_GATE). Note there is a value
# for each UICC (where F3="UICC0" and F4="UICC1")
#NFA_HCI_STATIC_PIPE_ID_F3=0x70
NFA_HCI_STATIC_PIPE_ID_F4=0x71
###############################################################################
# When disconnecting from Oberthur secure element, perform a warm-reset of
# the secure element to deselect the applet.
# The default hex value of the command is 0x3. If this variable is undefined,
# then this feature is not used.
OBERTHUR_WARM_RESET_COMMAND=0x03
###############################################################################
# Force UICC to only listen to the following technology(s).
# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h.
# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_B.
UICC_LISTEN_TECH_MASK=0x03
###############################################################################
# Allow UICC to be powered off if there is no traffic.
# Timeout is in ms. If set to 0, then UICC will not be powered off.
#UICC_IDLE_TIMEOUT=30000
###############################################################################
# AID for Empty Select command
# If specified, this AID will be substituted when an Empty SELECT command is
# detected. The first byte is the length of the AID. Maximum length is 16.
AID_FOR_EMPTY_SELECT={08:A0:00:00:01:51:00:00:00}
###############################################################################
# Force tag polling for the following technology(s).
# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h.
# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_B |
# NFA_TECHNOLOGY_MASK_F | NFA_TECHNOLOGY_MASK_ISO15693 |
# NFA_TECHNOLOGY_MASK_B_PRIME | NFA_TECHNOLOGY_MASK_A_ACTIVE |
# NFA_TECHNOLOGY_MASK_F_ACTIVE.
#
# Notable bits:
# NFA_TECHNOLOGY_MASK_KOVIO 0x20
# NFA_TECHNOLOGY_MASK_A_ACTIVE 0x40
# NFA_TECHNOLOGY_MASK_F_ACTIVE 0x80
POLLING_TECH_MASK=0xDF
###############################################################################
# Force P2P to only listen for the following technology(s).
# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h.
# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_F |
# NFA_TECHNOLOGY_MASK_A_ACTIVE | NFA_TECHNOLOGY_MASK_F_ACTIVE
P2P_LISTEN_TECH_MASK=0xC5
###############################################################################
# Maximum Number of Credits to be allowed by the NFCC
# This value overrides what the NFCC specifices allowing the host to have
# the control to work-around transport limitations. If this value does
# not exist or is set to 0, the NFCC will provide the number of credits.
#MAX_RF_DATA_CREDITS=1
###############################################################################
# This setting allows you to disable registering the T4t Virtual SE that causes
# the NFCC to send PPSE requests to the DH.
# The default setting is enabled (i.e. T4t Virtual SE is registered).
#REGISTER_VIRTUAL_SE=1
###############################################################################
# When screen is turned off, specify the desired power state of the controller.
# 0: power-off-sleep state; DEFAULT
# 1: full-power state
# 2: screen-off card-emulation (CE4/CE3/CE1 modes are used)
#SCREEN_OFF_POWER_STATE=0
###############################################################################
# Firmware patch file
# If the value is not set then patch download is disabled.
FW_PATCH="/vendor/firmware/bcm2079x_firmware.ncd"
###############################################################################
# Firmware pre-patch file (sent before the above patch file)
# If the value is not set then pre-patch is not used.
FW_PRE_PATCH="/vendor/firmware/bcm2079x_pre_firmware.ncd"
###############################################################################
# Firmware patch format
# 1 = HCD
# 2 = NCD (default)
#NFA_CONFIG_FORMAT=2
###############################################################################
# SPD Debug mode
# If set to 1, any failure of downloading a patch will trigger a hard-stop
#SPD_DEBUG=0
###############################################################################
# SPD Max Retry Count
# The number of attempts to download a patch before giving up (defualt is 3).
# Note, this resets after a power-cycle.
#SPD_MAX_RETRY_COUNT=3
###############################################################################
# transport driver
#
# TRANSPORT_DRIVER=<driver>
#
# where <driver> can be, for example:
# "/dev/ttyS" (UART)
# "/dev/bcmi2cnfc" (I2C)
# "hwtun" (HW Tunnel)
# "/dev/bcmspinfc" (SPI)
# "/dev/btusb0" (BT USB)
TRANSPORT_DRIVER="/dev/bcm2079x-i2c"
###############################################################################
# power control driver
# Specify a kernel driver that support ioctl commands to control NFC_EN and
# NFC_WAKE gpio signals.
#
# POWER_CONTRL_DRIVER=<driver>
# where <driver> can be, for example:
# "/dev/nfcpower"
# "/dev/bcmi2cnfc" (I2C)
# "/dev/bcmspinfc" (SPI)
# i2c and spi driver may be used to control NFC_EN and NFC_WAKE signal
POWER_CONTROL_DRIVER="/dev/bcm2079x-i2c"
###############################################################################
# I2C transport driver options
# Mako does not support 10-bit I2C addresses
# Revert to 7-bit address
BCMI2CNFC_ADDRESS=0x77
###############################################################################
# I2C transport driver try to read multiple packets in read() if data is available
# remove the comment below to enable this feature
#READ_MULTIPLE_PACKETS=1
###############################################################################
# SPI transport driver options
#SPI_NEGOTIATION={0A:F0:00:01:00:00:00:FF:FF:00:00}
###############################################################################
# UART transport driver options
#
# PORT=1,2,3,...
# BAUD=115200, 19200, 9600, 4800,
# DATABITS=8, 7, 6, 5
# PARITY="even" | "odd" | "none"
# STOPBITS="0" | "1" | "1.5" | "2"
#UART_PORT=2
#UART_BAUD=115200
#UART_DATABITS=8
#UART_PARITY="none"
#UART_STOPBITS="1"
###############################################################################
# Insert a delay in microseconds per byte after a write to NFCC.
# after writing a block of data to the NFCC, delay this an amopunt of time before
# writing next block of data. the delay is calculated as below
# NFC_WRITE_DELAY * (number of byte written) / 1000 milliseconds
# e.g. after 259 bytes is written, delay (259 * 20 / 1000) 5 ms before next write
NFC_WRITE_DELAY=20
###############################################################################
# Default poll duration (in ms)
# The defualt is 500ms if not set (see nfc_target.h)
#NFA_DM_DISC_DURATION_POLL=333

11
nfc/nfcee_access.xml Normal file
View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Applications granted NFCEE access on user builds
See packages/apps/Nfc/etc/sample_nfcee_access.xml for full documentation.
-->
<!-- Google wallet release signature -->
<signer android:signature="3082044c30820334a003020102020900a8cd17c93da5d990300d06092a864886f70d01010505003077310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f6964311330110603550403130a476f6f676c65204e4643301e170d3131303332343031303635335a170d3338303830393031303635335a3077310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f6964311330110603550403130a476f6f676c65204e464330820120300d06092a864886f70d01010105000382010d00308201080282010100c30f88add9b492096a2c586a5a9a80356bfa026958f8ff0c5dfaf59f49268ad870dee821a53e1f5b170fc96245a3c982a7cb4527053be35e34f396d24b2291ec0c528d6e26927465e06875ea621f7ff98c40e3345b204907cc9354743acdaace65565f48ba74cd4121cdc876df3522badb095c20d934c56a3e5c393ee5f0e02f8fe0621f918d1f35a82489252c6fa6b63392a7686b3e48612d06a9cf6f49bff11d5d96289c9dfe14ac5762439697dd29eafdb9810de3263513a905ac8e8eaf20907e46750a5ab7bf9a77262f47b03f5a3c6e6d7b51343f69c7f725f70bcc1b4ad592250b705a86e6e83ee2ae37fe5701bcbdb26feefdfff60f6a5bdfb5b64793020103a381dc3081d9301d0603551d0e041604141ccece0eea4dc1121fc7515f0d0a0c72e08cc96d3081a90603551d230481a130819e80141ccece0eea4dc1121fc7515f0d0a0c72e08cc96da17ba4793077310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f6964311330110603550403130a476f6f676c65204e4643820900a8cd17c93da5d990300c0603551d13040530030101ff300d06092a864886f70d01010505000382010100a470c728e1d31b06d9af6ae768b565046c57806b9843724931d75d4ca10c321520d33ccfed2aa65462234c9ef9b6f910cc676b99cb7f9895d6c06763574fbb78331275dc5cf38fbaa918d7938c051ffba2ade8f303cde8d9e68a048d1fdb9e7c9f2a49b222c68fff422bf15569b85eeeedb04aa30873dbe64b9c9e74f8f2c2f6c40124aaa8d1780d18512b540add28b3e9581971a4170dd868cf5f31e44712b2c23bb51037d7ef9f87a6e5bdb35e2ceb6bb022636c17a56a96bc7a50258c0bd2ed7b31555a18452e17321a0d52838c82f63f742d74ff79586a5cbb7faf7198a84bcf744310e9e927597f00a23dd00660800c2238d90b2fb372dfdbba75bd852e" />
</resources>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Applications granted NFCEE access on userdebug/eng builds
See packages/apps/Nfc/etc/sample_nfcee_access.xml for full documentation.
-->
<!-- Google Wallet dev signature -->
<signer android:signature="3082044c30820334a003020102020900de7695041d7650c0300d06092a864886f70d01010505003077310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f6964311330110603550403130a476f6f676c65204e4643301e170d3131303332343031303332345a170d3338303830393031303332345a3077310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f6964311330110603550403130a476f6f676c65204e464330820120300d06092a864886f70d01010105000382010d00308201080282010100e6ff3defe92aa10d71eb0fa6408bc036b7e243eeed68a6a4763dc7a52a31757cdac61fe510bb73c716e4000104265b347fcecef4c42bf1e1379dd0a876f028227fbbc1f9bdd5d713b2f6a935a379d2cba9c96f92d2d0787c11f1eb19548008a6a072b34b91836cfa0ae1276780e9007530166986a11c9cef46cef7c704806dde9431fb60284d120ab0e7de1d633f07687d468c51139afffdc6bc9a207ca904b8be1da0aa7b4e97756f43606488be5cae3c68e8bb7942cdf51607c930a2fcda655b75d0759cba89ad06e739bd0ba29b1f404296c2c0a85a847f5ab0d067c6c3ec9c49212042ac63a7e53b546c65b46080b4e3e680e23e1f77cfe7f6de744b1a65020103a381dc3081d9301d0603551d0e04160414a2e89064b05d08865c34db930a9d840050117aec3081a90603551d230481a130819e8014a2e89064b05d08865c34db930a9d840050117aeca17ba4793077310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f6964311330110603550403130a476f6f676c65204e4643820900de7695041d7650c0300c0603551d13040530030101ff300d06092a864886f70d010105050003820101003771870ce87c3c52ea84899230c6e962d94b4d5f1293c25d88261541fd90b5555d1285cef3b8312c3f5df691a8aae04cb981b305e427fd1d2d9e1987e1d29078f13c8452990f1821980263d8d4bd36519348d8d8ba26d8b99fbf09f5fd3ebb0ea3c2f0c9376f1e1fca76f3a6a405429d081b752a7a90b756e9ab44da41abc8e1e8f88ac2758da743fb73e650719a57840ccb6b7add21b99fc681e456e1872c223d5c074adf55f6abda268c2d8b64ea0a8845eecd968f92b493127e75c753c3ff30cbc678b51c9f52961472f17da20a0dc6274aa2463434c1a9b614df697d8ff5ca8101e7a25c7db3fb055d65569c04b01d389cabba57b3a1703ec2e74a88d334" />
<!-- Google wallet release signature -->
<signer android:signature="3082044c30820334a003020102020900a8cd17c93da5d990300d06092a864886f70d01010505003077310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f6964311330110603550403130a476f6f676c65204e4643301e170d3131303332343031303635335a170d3338303830393031303635335a3077310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f6964311330110603550403130a476f6f676c65204e464330820120300d06092a864886f70d01010105000382010d00308201080282010100c30f88add9b492096a2c586a5a9a80356bfa026958f8ff0c5dfaf59f49268ad870dee821a53e1f5b170fc96245a3c982a7cb4527053be35e34f396d24b2291ec0c528d6e26927465e06875ea621f7ff98c40e3345b204907cc9354743acdaace65565f48ba74cd4121cdc876df3522badb095c20d934c56a3e5c393ee5f0e02f8fe0621f918d1f35a82489252c6fa6b63392a7686b3e48612d06a9cf6f49bff11d5d96289c9dfe14ac5762439697dd29eafdb9810de3263513a905ac8e8eaf20907e46750a5ab7bf9a77262f47b03f5a3c6e6d7b51343f69c7f725f70bcc1b4ad592250b705a86e6e83ee2ae37fe5701bcbdb26feefdfff60f6a5bdfb5b64793020103a381dc3081d9301d0603551d0e041604141ccece0eea4dc1121fc7515f0d0a0c72e08cc96d3081a90603551d230481a130819e80141ccece0eea4dc1121fc7515f0d0a0c72e08cc96da17ba4793077310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f6964311330110603550403130a476f6f676c65204e4643820900a8cd17c93da5d990300c0603551d13040530030101ff300d06092a864886f70d01010505000382010100a470c728e1d31b06d9af6ae768b565046c57806b9843724931d75d4ca10c321520d33ccfed2aa65462234c9ef9b6f910cc676b99cb7f9895d6c06763574fbb78331275dc5cf38fbaa918d7938c051ffba2ade8f303cde8d9e68a048d1fdb9e7c9f2a49b222c68fff422bf15569b85eeeedb04aa30873dbe64b9c9e74f8f2c2f6c40124aaa8d1780d18512b540add28b3e9581971a4170dd868cf5f31e44712b2c23bb51037d7ef9f87a6e5bdb35e2ceb6bb022636c17a56a96bc7a50258c0bd2ed7b31555a18452e17321a0d52838c82f63f742d74ff79586a5cbb7faf7198a84bcf744310e9e927597f00a23dd00660800c2238d90b2fb372dfdbba75bd852e" />
<!-- Platform dev-keys signature -->
<signer android:signature="308204a830820390a003020102020900bcdfe81405d5c69e300d06092a864886f70d0101050500308194310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e20566965773110300e060355040a1307416e64726f69643110300e060355040b1307416e64726f69643110300e06035504031307416e64726f69643122302006092a864886f70d0109011613616e64726f696440616e64726f69642e636f6d301e170d3131303931393230303634325a170d3339303230343230303634325a308194310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e20566965773110300e060355040a1307416e64726f69643110300e060355040b1307416e64726f69643110300e06035504031307416e64726f69643122302006092a864886f70d0109011613616e64726f696440616e64726f69642e636f6d30820120300d06092a864886f70d01010105000382010d00308201080282010100ef7a8a34d8151d0479a239903261fe5026c520d5d88cd65920c98e096d2770f49636da9ffc4e80c472b05bd62a435f8266912aa2a34a18f6f4856f9ef52c10b88c267627136726823e8f3389b051ba92920e10bbaae0e38879efbe681b05863b655d81a6f3b75a85eb230b38b23ea4ef56f2161ff01652ae2049881adbe60d3bf8b5386a81f7404c0cf0c111c0a35ab0a9760426e4af12add73327ec433e047e3517f47a2d3674c2b819354d56eb7fd6c9aa67dd05b4bb1ca8a7e1946c2494e9364ea677a25481ac81f434bff3dd56e93e59fccef0e24a753461cd1cf15f22b62251d07416057ac5ca3e03a24f7f4eca876bacc5a1828acbde04c5cfdb608c47020103a381fc3081f9301d0603551d0e0416041402f997668541fa74693bea699a5766893a362a5d3081c90603551d230481c13081be801402f997668541fa74693bea699a5766893a362a5da1819aa48197308194310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e20566965773110300e060355040a1307416e64726f69643110300e060355040b1307416e64726f69643110300e06035504031307416e64726f69643122302006092a864886f70d0109011613616e64726f696440616e64726f69642e636f6d820900bcdfe81405d5c69e300c0603551d13040530030101ff300d06092a864886f70d0101050500038201010047d6fb32cadeae4444c379b3441ff9ba10990c23d10472c54fb7ebd9c33b2a173836337e1c175c980847a8894f6a99782e9c2e2133629254295fe52749f93ec1e39d213dd06d0ba99de3b6b5d4d856fafe74e08113b7b23a1b56f4918ed41218a03b9564456480b665200267d3770a9463db413c6a47bd81d725cb7d39c9d0941693c59cbe727d40415f0815c3c8363fb8fa2e028ceeb3bbfbc6b119db5b72f0edb0bb417bfcbf74d9fa069de22afe56a50bcde7ea1078749bb9ec0adc0e6de045641ee3a82c576645160b4ab9710d3cb3201f23957da8de9084c0bec93ad1c8c2054195f13c926db07c8bdf15673acf6d791ec1d3a0d7e1b3470447acd95873" />
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You my obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<!-- These resources are around just to allow their values to be customized
for different hardware and product builds. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Array of ConnectivityManager.TYPE_xxxx values allowable for tethering -->
<!-- Common options are [1, 4] for TYPE_WIFI and TYPE_MOBILE_DUN or
<!== [0,1,5,7] for TYPE_MOBILE, TYPE_WIFI, TYPE_MOBILE_HIPRI and TYPE_BLUETOOTH -->
<integer-array translatable="false" name="config_tether_upstream_types">
<item>1</item>
<item>4</item>
</integer-array>
<!-- String containing the apn value for tethering. May be overriden by secure settings
TETHER_DUN_APN. Value is a comma separated series of strings:
"name,apn,proxy,port,username,password,server,mmsc,mmsproxy,mmsport,mcc,mnc,auth,type"
note that empty fields can be ommitted: "name,apn,,,,,,,,,310,260,,DUN" -->
<string translatable="false" name="config_tether_apndata">Orange Internet,orange.fr,,,orange,orange,,,,,208,01,,DUN"</string>
</resources>

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You my obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<!-- These resources are around just to allow their values to be customized
for different hardware and product builds. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Array of ConnectivityManager.TYPE_xxxx values allowable for tethering -->
<!-- Common options are [1, 4] for TYPE_WIFI and TYPE_MOBILE_DUN or
<!== [0,1,5,7] for TYPE_MOBILE, TYPE_WIFI, TYPE_MOBILE_HIPRI and TYPE_BLUETOOTH -->
<integer-array translatable="false" name="config_tether_upstream_types">
<item>1</item>
<item>4</item>
</integer-array>
<!-- String containing the apn value for tethering. May be overriden by secure settings
TETHER_DUN_APN. Value is a comma separated series of strings:
"name,apn,proxy,port,username,password,server,mmsc,mmsproxy,mmsport,mcc,mnc,auth,type"
note that empty fields can be ommitted: "name,apn,,,,,,,,,310,260,,DUN" -->
<string translatable="false" name="config_tether_apndata">INTERNET,airtelnet.es,,,vodafone,vodafone,,,,,214,01,,DUN"</string>
</resources>

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You my obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<!-- These resources are around just to allow their values to be customized
for different hardware and product builds. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Array of ConnectivityManager.TYPE_xxxx values allowable for tethering -->
<!-- Common options are [1, 4] for TYPE_WIFI and TYPE_MOBILE_DUN or
<!== [0,1,5,7] for TYPE_MOBILE, TYPE_WIFI, TYPE_MOBILE_HIPRI and TYPE_BLUETOOTH -->
<integer-array translatable="false" name="config_tether_upstream_types">
<item>1</item>
<item>4</item>
</integer-array>
<!-- String containing the apn value for tethering. May be overriden by secure settings
TETHER_DUN_APN. Value is a comma separated series of strings:
"name,apn,proxy,port,username,password,server,mmsc,mmsproxy,mmsport,mcc,mnc,auth,type"
note that empty fields can be ommitted: "name,apn,,,,,,,,,310,260,,DUN" -->
<string translatable="false" name="config_tether_apndata">Orange Internet PC,internet,,,orange,orange,,,,,214,03,,DUN"</string>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="config_usbHostBlacklist">
<item msgid="2854983642221012800">"/dev/bus/usb/001"</item>
</string-array>
</resources>

Some files were not shown because too many files have changed in this diff Show More