├── Android.mk
├── AndroidBoard.mk
├── BoardConfig.mk
├── MODULE_LICENSE_APACHE2
├── README.md
├── audio
├── audio_platform_info.xml
├── audio_policy.conf
└── mixer_paths.xml
├── bacon.mk
├── bluetooth
└── bdroid_buildcfg.h
├── camera
├── Android.mk
└── CameraWrapper.cpp
├── cm.dependencies
├── cm.mk
├── configs
├── libnfc-brcm.conf
└── libnfc-nxp.conf
├── device-proprietary-files.txt
├── extract-files.sh
├── init
├── Android.mk
└── init_bacon.c
├── overlay
├── frameworks
│ └── base
│ │ ├── core
│ │ └── res
│ │ │ └── res
│ │ │ ├── values
│ │ │ └── config.xml
│ │ │ └── xml
│ │ │ ├── power_profile.xml
│ │ │ └── storage_list.xml
│ │ └── packages
│ │ └── SystemUI
│ │ └── res
│ │ └── values
│ │ └── config.xml
└── packages
│ ├── apps
│ └── Settings
│ │ └── res
│ │ └── values
│ │ └── config.xml
│ └── services
│ └── Telephony
│ └── res
│ ├── values-mcc460
│ └── config.xml
│ └── values
│ └── config.xml
├── recovery
└── root
│ ├── etc
│ └── twrp.fstab
│ ├── init.recovery.bacon.rc
│ ├── sbin
│ ├── libQSEEComAPI.so
│ ├── libdiag.so
│ ├── libdrmfs.so
│ ├── libdrmtime.so
│ ├── librpmb.so
│ ├── libssd.so
│ └── qseecomd
│ └── vendor
│ └── lib
│ └── hw
│ └── keystore.msm8974.so
├── rootdir
├── Android.mk
└── etc
│ ├── fstab.bacon
│ ├── init.bacon.rc
│ └── init.qcom.usb.rc
├── setup-makefiles.sh
├── system.prop
└── vendorsetup.sh
/Android.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2014 The CyanogenMod Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | LOCAL_PATH := $(call my-dir)
18 |
19 | ifeq ($(TARGET_DEVICE),bacon)
20 |
21 | include $(call all-makefiles-under,$(LOCAL_PATH))
22 |
23 | endif
24 |
--------------------------------------------------------------------------------
/AndroidBoard.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | #----------------------------------------------------------------------
4 | # extra images
5 | #----------------------------------------------------------------------
6 | include build/core/generate_extra_images.mk
7 |
--------------------------------------------------------------------------------
/BoardConfig.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2014 The CyanogenMod Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | # Inherit from MSM8974 common
18 | -include device/oppo/msm8974-common/BoardConfigCommon.mk
19 |
20 | # Kernel
21 | TARGET_KERNEL_CONFIG := cyanogenmod_bacon_defconfig
22 | BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.hardware=bacon user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 androidboot.bootdevice=msm_sdcc.1 androidboot.selinux=permissive
23 |
24 | # Bluetooth
25 | BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/oneplus/bacon/bluetooth
26 |
27 | # Camera
28 | USE_DEVICE_SPECIFIC_CAMERA := true
29 | COMMON_GLOBAL_CFLAGS += -DOPPO_CAMERA_HARDWARE
30 |
31 | # Dex
32 | ifeq ($(HOST_OS),linux)
33 | ifeq ($(TARGET_BUILD_VARIANT),user)
34 | ifeq ($(WITH_DEXPREOPT),)
35 | WITH_DEXPREOPT := true
36 | endif
37 | endif
38 | endif
39 | DONT_DEXPREOPT_PREBUILTS := true
40 |
41 | # Filesystem
42 | BOARD_BOOTIMAGE_PARTITION_SIZE := 16777216
43 | BOARD_CACHEIMAGE_PARTITION_SIZE := 536870912
44 | BOARD_PERSISTIMAGE_PARTITION_SIZE := 33554432
45 | BOARD_RECOVERYIMAGE_PARTITION_SIZE := 16777216
46 | BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1388314624
47 | BOARD_USERDATAIMAGE_PARTITION_SIZE := 13271448576
48 | BOARD_USERDATAEXTRAIMAGE_PARTITION_SIZE := 59914792960
49 | BOARD_USERDATAEXTRAIMAGE_PARTITION_NAME := 64G
50 |
51 | # Recovery
52 | TARGET_RECOVERY_FSTAB := device/oneplus/bacon/rootdir/etc/fstab.bacon
53 |
54 | TARGET_OTA_ASSERT_DEVICE := bacon,A0001
55 |
56 | TARGET_INIT_VENDOR_LIB := libinit_bacon
57 |
58 | TARGET_WCNSS_MAC_PREFIX := e8bba8
59 |
60 | # Workaround for factory issue
61 | BOARD_VOLD_CRYPTFS_MIGRATE := true
62 |
63 | BOARD_NFC_CHIPSET := pn547
64 |
65 | AUDIO_FEATURE_LOW_LATENCY_PRIMARY := true
66 | AUDIO_FEATURE_ENABLED_LOW_LATENCY_CAPTURE := true
67 |
68 | # inherit from the proprietary version
69 | -include vendor/oneplus/bacon/BoardConfigVendor.mk
70 |
71 | #TWRP flags
72 | DEVICE_RESOLUTION := 1080x1920
73 | TW_TARGET_USES_QCOM_BSP := true
74 | TARGET_RECOVERY_PIXEL_FORMAT := "RGB_565"
75 | RECOVERY_GRAPHICS_USE_LINELENGTH := true
76 | TW_NO_USB_STORAGE := true
77 | TW_INCLUDE_CRYPTO := true
78 | BOARD_SUPPRESS_SECURE_ERASE := true
79 | RECOVERY_SDCARD_ON_DATA := true
80 | BOARD_HAS_NO_REAL_SDCARD := true
81 | TARGET_USERIMAGES_USE_F2FS := true
82 | RECOVERY_VARIANT := twrp
83 |
--------------------------------------------------------------------------------
/MODULE_LICENSE_APACHE2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamWin/android_device_oneplus_bacon/fec7b8148e24db17cf6fa606c909d91731eb9f39/MODULE_LICENSE_APACHE2
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Device tree for One+
2 |
3 | Copyright 2014, The CyanogenMod Project
4 |
5 |
--------------------------------------------------------------------------------
/audio/audio_platform_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/audio/audio_policy.conf:
--------------------------------------------------------------------------------
1 | # Global configuration section: lists input and output devices always present on the device
2 | # as well as the output device selected by default.
3 | # Devices are designated by a string that corresponds to the enum in audio.h
4 |
5 | global_configuration {
6 | attached_output_devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_TELEPHONY_TX
7 | default_output_device AUDIO_DEVICE_OUT_SPEAKER
8 | attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BACK_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX|AUDIO_DEVICE_IN_VOICE_CALL|AUDIO_DEVICE_IN_TELEPHONY_TX
9 | speaker_drc_enabled true
10 | }
11 |
12 | # audio hardware module section: contains descriptors for all audio hw modules present on the
13 | # device. Each hw module node is named after the corresponding hw module library base name.
14 | # For instance, "primary" corresponds to audio.primary..so.
15 | # The "primary" module is mandatory and must include at least one output with
16 | # AUDIO_OUTPUT_FLAG_PRIMARY flag.
17 | # Each module descriptor contains one or more output profile descriptors and zero or more
18 | # input profile descriptors. Each profile lists all the parameters supported by a given output
19 | # or input stream category.
20 | # The "channel_masks", "formats", "devices" and "flags" are specified using strings corresponding
21 | # to enums in audio.h and audio_policy.h. They are concatenated by use of "|" without space or "\n".
22 |
23 | audio_hw_modules {
24 | primary {
25 | outputs {
26 | primary {
27 | sampling_rates 44100|48000
28 | channel_masks AUDIO_CHANNEL_OUT_STEREO
29 | formats AUDIO_FORMAT_PCM_16_BIT
30 | 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|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_FM|AUDIO_DEVICE_OUT_FM_TX
31 | flags AUDIO_OUTPUT_FLAG_PRIMARY
32 | }
33 | deep_buffer {
34 | sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000
35 | channel_masks AUDIO_CHANNEL_OUT_STEREO
36 | formats AUDIO_FORMAT_PCM_16_BIT
37 | 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|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_FM|AUDIO_DEVICE_OUT_FM_TX
38 | flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER
39 | }
40 | multichannel {
41 | sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|96000
42 | channel_masks dynamic
43 | formats AUDIO_FORMAT_PCM_16_BIT
44 | devices AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY
45 | flags AUDIO_OUTPUT_FLAG_DIRECT
46 | }
47 | compress_offload {
48 | sampling_rates 8000|11025|16000|22050|32000|44100|48000|64000|88200|96000|176400|192000
49 | channel_masks AUDIO_CHANNEL_OUT_MONO|AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_2POINT1|AUDIO_CHANNEL_OUT_QUAD|AUDIO_CHANNEL_OUT_PENTA|AUDIO_CHANNEL_OUT_5POINT1|AUDIO_CHANNEL_OUT_6POINT1|AUDIO_CHANNEL_OUT_7POINT1
50 | formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_AAC_LC|AUDIO_FORMAT_AAC_HE_V1|AUDIO_FORMAT_AAC_HE_V2|AUDIO_FORMAT_MP2|AUDIO_FORMAT_PCM_16_BIT_OFFLOAD|AUDIO_FORMAT_PCM_24_BIT_OFFLOAD
51 | 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|AUDIO_DEVICE_OUT_FM_TX
52 | flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING
53 | }
54 | incall_music {
55 | sampling_rates 8000|16000|48000
56 | channel_masks AUDIO_CHANNEL_OUT_MONO
57 | formats AUDIO_FORMAT_PCM_16_BIT
58 | devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO
59 | flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_INCALL_MUSIC
60 | }
61 | voice_tx {
62 | sampling_rates 8000|16000|48000
63 | channel_masks AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_MONO
64 | formats AUDIO_FORMAT_PCM_16_BIT
65 | devices AUDIO_DEVICE_OUT_TELEPHONY_TX
66 | }
67 | voip_rx {
68 | sampling_rates 8000|16000
69 | channel_masks AUDIO_CHANNEL_OUT_MONO
70 | formats AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_AMR_NB|AUDIO_FORMAT_AMR_WB|AUDIO_FORMAT_QCELP|AUDIO_FORMAT_EVRC|AUDIO_FORMAT_EVRCB|AUDIO_FORMAT_EVRCWB|AUDIO_FORMAT_EVRCNW
71 | devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO
72 | flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_VOIP_RX
73 | }
74 | }
75 | inputs {
76 | primary {
77 | sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000
78 | channel_masks AUDIO_CHANNEL_IN_5POINT1|AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO|AUDIO_CHANNEL_IN_FRONT_BACK
79 | formats AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_AMR_NB|AUDIO_FORMAT_AMR_WB|AUDIO_FORMAT_QCELP|AUDIO_FORMAT_EVRC|AUDIO_FORMAT_EVRCB|AUDIO_FORMAT_EVRCWB|AUDIO_FORMAT_EVRCNW
80 | devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_BACK_MIC|AUDIO_DEVICE_IN_FM_RX|AUDIO_DEVICE_IN_FM_RX_A2DP|AUDIO_DEVICE_IN_VOICE_CALL
81 | }
82 | voice_rx {
83 | sampling_rates 8000|16000|48000
84 | channel_masks AUDIO_CHANNEL_IN_STEREO|AUDIO_CHANNEL_IN_MONO
85 | formats AUDIO_FORMAT_PCM_16_BIT
86 | devices AUDIO_DEVICE_IN_TELEPHONY_RX
87 | }
88 | }
89 | }
90 | a2dp {
91 | outputs {
92 | a2dp {
93 | sampling_rates 44100
94 | channel_masks AUDIO_CHANNEL_OUT_STEREO
95 | formats AUDIO_FORMAT_PCM_16_BIT
96 | devices AUDIO_DEVICE_OUT_ALL_A2DP
97 | }
98 | }
99 | }
100 | usb {
101 | outputs {
102 | usb_accessory {
103 | sampling_rates 44100
104 | channel_masks AUDIO_CHANNEL_OUT_STEREO
105 | formats AUDIO_FORMAT_PCM_16_BIT
106 | devices AUDIO_DEVICE_OUT_USB_ACCESSORY
107 | }
108 | usb_device {
109 | sampling_rates dynamic
110 | channel_masks dynamic
111 | formats dynamic
112 | devices AUDIO_DEVICE_OUT_USB_DEVICE
113 | }
114 | }
115 | inputs {
116 | usb_device {
117 | sampling_rates dynamic
118 | channel_masks AUDIO_CHANNEL_IN_STEREO
119 | formats AUDIO_FORMAT_PCM_16_BIT
120 | devices AUDIO_DEVICE_IN_USB_DEVICE
121 | }
122 | }
123 | }
124 | r_submix {
125 | outputs {
126 | submix {
127 | sampling_rates 48000
128 | channel_masks AUDIO_CHANNEL_OUT_STEREO
129 | formats AUDIO_FORMAT_PCM_16_BIT
130 | devices AUDIO_DEVICE_OUT_REMOTE_SUBMIX
131 | }
132 | }
133 | inputs {
134 | submix {
135 | sampling_rates 48000
136 | channel_masks AUDIO_CHANNEL_IN_STEREO
137 | formats AUDIO_FORMAT_PCM_16_BIT
138 | devices AUDIO_DEVICE_IN_REMOTE_SUBMIX
139 | }
140 | }
141 | }
142 | }
143 |
--------------------------------------------------------------------------------
/audio/mixer_paths.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 |
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 |
400 |
401 |
402 |
403 |
404 |
405 |
406 |
407 |
408 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 |
422 |
423 |
424 |
425 |
426 |
427 |
428 |
429 |
430 |
431 |
432 |
433 |
434 |
435 |
436 |
437 |
438 |
439 |
440 |
441 |
442 |
443 |
444 |
445 |
446 |
447 |
448 |
449 |
450 |
451 |
452 |
453 |
454 |
455 |
456 |
457 |
458 |
459 |
460 |
461 |
462 |
463 |
464 |
465 |
466 |
467 |
468 |
469 |
470 |
471 |
472 |
473 |
474 |
475 |
476 |
477 |
478 |
479 |
480 |
481 |
482 |
483 |
484 |
485 |
486 |
487 |
488 |
489 |
490 |
491 |
492 |
493 |
494 |
495 |
496 |
497 |
498 |
499 |
500 |
501 |
502 |
503 |
504 |
505 |
506 |
507 |
508 |
509 |
510 |
511 |
512 |
513 |
514 |
515 |
516 |
517 |
518 |
519 |
520 |
521 |
522 |
523 |
524 |
525 |
526 |
527 |
528 |
529 |
530 |
531 |
532 |
533 |
534 |
535 |
536 |
537 |
538 |
539 |
540 |
541 |
542 |
543 |
544 |
545 |
546 |
547 |
548 |
549 |
550 |
551 |
552 |
553 |
554 |
555 |
556 |
557 |
558 |
559 |
560 |
561 |
562 |
563 |
564 |
565 |
566 |
567 |
568 |
569 |
570 |
571 |
572 |
573 |
574 |
575 |
576 |
577 |
578 |
579 |
580 |
581 |
582 |
583 |
584 |
585 |
586 |
587 |
588 |
589 |
590 |
591 |
592 |
593 |
594 |
595 |
596 |
597 |
598 |
599 |
600 |
601 |
602 |
603 |
604 |
605 |
606 |
607 |
608 |
609 |
610 |
611 |
612 |
613 |
614 |
615 |
616 |
617 |
618 |
619 |
620 |
621 |
622 |
623 |
624 |
625 |
626 |
627 |
628 |
629 |
630 |
631 |
632 |
633 |
634 |
635 |
636 |
637 |
638 |
639 |
640 |
641 |
642 |
643 |
644 |
645 |
646 |
647 |
648 |
649 |
650 |
651 |
652 |
653 |
654 |
655 |
656 |
657 |
658 |
659 |
660 |
661 |
662 |
663 |
664 |
665 |
666 |
667 |
668 |
669 |
670 |
671 |
672 |
673 |
674 |
675 |
676 |
677 |
678 |
679 |
680 |
681 |
682 |
683 |
684 |
685 |
686 |
687 |
688 |
689 |
690 |
691 |
692 |
693 |
694 |
695 |
696 |
697 |
698 |
699 |
700 |
701 |
702 |
703 |
704 |
705 |
706 |
707 |
708 |
709 |
710 |
711 |
712 |
713 |
714 |
715 |
716 |
717 |
718 |
719 |
720 |
721 |
722 |
723 |
724 |
725 |
726 |
727 |
728 |
729 |
730 |
731 |
732 |
733 |
734 |
735 |
736 |
737 |
738 |
739 |
740 |
741 |
742 |
743 |
744 |
745 |
746 |
747 |
748 |
749 |
750 |
751 |
752 |
753 |
754 |
755 |
756 |
757 |
758 |
759 |
760 |
761 |
762 |
763 |
764 |
765 |
766 |
767 |
768 |
769 |
770 |
771 |
772 |
773 |
774 |
775 |
776 |
777 |
778 |
779 |
780 |
781 |
782 |
783 |
784 |
785 |
786 |
787 |
788 |
789 |
790 |
791 |
792 |
793 |
794 |
795 |
796 |
797 |
798 |
799 |
800 |
801 |
802 |
803 |
804 |
805 |
806 |
807 |
808 |
809 |
810 |
811 |
812 |
813 |
814 |
815 |
816 |
817 |
818 |
819 |
820 |
821 |
822 |
823 |
824 |
825 |
826 |
827 |
828 |
829 |
830 |
831 |
832 |
833 |
834 |
835 |
836 |
837 |
838 |
839 |
840 |
841 |
842 |
843 |
844 |
845 |
846 |
847 |
848 |
849 |
850 |
851 |
852 |
853 |
854 |
855 |
856 |
857 |
858 |
859 |
860 |
861 |
862 |
863 |
864 |
865 |
866 |
867 |
868 |
869 |
870 |
871 |
872 |
873 |
874 |
875 |
876 |
877 |
878 |
879 |
880 |
881 |
882 |
883 |
884 |
885 |
886 |
887 |
888 |
889 |
890 |
891 |
892 |
893 |
894 |
895 |
896 |
897 |
898 |
899 |
900 |
901 |
902 |
903 |
904 |
905 |
906 |
907 |
908 |
909 |
910 |
911 |
912 |
913 |
914 |
915 |
916 |
917 |
918 |
919 |
920 |
921 |
922 |
923 |
924 |
925 |
926 |
927 |
928 |
929 |
930 |
931 |
932 |
933 |
934 |
935 |
936 |
937 |
938 |
939 |
940 |
941 |
942 |
943 |
944 |
945 |
946 |
947 |
948 |
949 |
950 |
951 |
952 |
953 |
954 |
955 |
956 |
957 |
958 |
959 |
960 |
961 |
962 |
963 |
964 |
965 |
966 |
967 |
968 |
969 |
970 |
971 |
972 |
973 |
974 |
975 |
976 |
977 |
978 |
979 |
980 |
981 |
982 |
983 |
984 |
985 |
986 |
--------------------------------------------------------------------------------
/bacon.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2014 The CyanogenMod Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | # overlays
18 | DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay vendor/extra/overlays/phone-1080p
19 |
20 | # Boot animation
21 | TARGET_SCREEN_HEIGHT := 1920
22 | TARGET_SCREEN_WIDTH := 1080
23 |
24 | # Haters gonna hate..
25 | PRODUCT_CHARACTERISTICS := nosdcard
26 |
27 | # Ramdisk
28 | PRODUCT_PACKAGES += \
29 | libinit_bacon \
30 | fstab.bacon \
31 | init.bacon.rc \
32 | init.qcom.usb.rc \
33 | ueventd.bacon.rc
34 |
35 | # Audio
36 | PRODUCT_COPY_FILES += \
37 | $(LOCAL_PATH)/audio/audio_platform_info.xml:system/etc/audio_platform_info.xml \
38 | $(LOCAL_PATH)/audio/audio_policy.conf:system/etc/audio_policy.conf \
39 | $(LOCAL_PATH)/audio/mixer_paths.xml:system/etc/mixer_paths.xml
40 |
41 | # NFC packages
42 | PRODUCT_PACKAGES += \
43 | NfcNci \
44 | Tag \
45 | nfc_nci.pn54x.default \
46 | com.android.nfc_extras
47 |
48 | # NFC access control + feature files + configuration
49 | PRODUCT_COPY_FILES += \
50 | frameworks/native/data/etc/com.android.nfc_extras.xml:system/etc/permissions/com.android.nfc_extras.xml \
51 | frameworks/native/data/etc/android.hardware.nfc.xml:system/etc/permissions/android.hardware.nfc.xml \
52 | frameworks/native/data/etc/android.hardware.nfc.hce.xml:system/etc/permissions/android.hardware.nfc.hce.xml \
53 | $(LOCAL_PATH)/configs/libnfc-nxp.conf:system/etc/libnfc-nxp.conf \
54 | $(LOCAL_PATH)/configs/libnfc-brcm.conf:system/etc/libnfc-brcm.conf
55 |
56 | # System properties
57 | PRODUCT_PROPERTY_OVERRIDES += \
58 | ro.telephony.default_network=9
59 |
60 | # Fuuuuu
61 | PRODUCT_PACKAGES += camera.bacon
62 |
63 | # Device uses high-density artwork where available
64 | PRODUCT_AAPT_CONFIG := normal hdpi xhdpi xxhdpi
65 | PRODUCT_AAPT_PREF_CONFIG := xxhdpi
66 |
67 | # call dalvik heap config
68 | $(call inherit-product-if-exists, frameworks/native/build/phone-xxhdpi-2048-dalvik-heap.mk)
69 |
70 | # call hwui memory config
71 | $(call inherit-product-if-exists, frameworks/native/build/phone-xxhdpi-2048-hwui-memory.mk)
72 |
73 | # call the proprietary setup
74 | $(call inherit-product-if-exists, vendor/oneplus/bacon/bacon-vendor.mk)
75 |
76 | ifneq ($(QCPATH),)
77 | $(call inherit-product-if-exists, $(QCPATH)/prebuilt_HY11/target/product/msm8974/prebuilt.mk)
78 | endif
79 |
80 | # Inherit from msm8974-common
81 | $(call inherit-product, device/oppo/msm8974-common/msm8974.mk)
82 |
--------------------------------------------------------------------------------
/bluetooth/bdroid_buildcfg.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 The CyanogenMod Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #ifndef _BDROID_BUILDCFG_H
18 | #define _BDROID_BUILDCFG_H
19 |
20 | #define BLUETOOTH_QTI_SW TRUE
21 |
22 | #define BTM_DEF_LOCAL_NAME "OnePlus One"
23 | #define MAX_ACL_CONNECTIONS 7
24 | #define MAX_L2CAP_CHANNELS 16
25 |
26 | #define BTA_SKIP_BLE_READ_REMOTE_FEAT FALSE
27 | #define BTA_BLE_SKIP_CONN_UPD FALSE
28 |
29 | #define BLE_VND_INCLUDED TRUE
30 | #define BLE_PERIPHERAL_ADV_NAME TRUE
31 |
32 | #endif
33 |
--------------------------------------------------------------------------------
/camera/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 | LOCAL_MODULE := camera.bacon
5 | LOCAL_SRC_FILES := CameraWrapper.cpp
6 |
7 | LOCAL_C_INCLUDES := \
8 | system/media/camera/include
9 |
10 | LOCAL_SHARED_LIBRARIES := \
11 | libhardware liblog libcamera_client libutils libcutils libdl
12 |
13 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_SHARED_LIBRARIES)/hw
14 | LOCAL_CFLAGS := -Werror
15 | include $(BUILD_SHARED_LIBRARY)
16 |
--------------------------------------------------------------------------------
/camera/CameraWrapper.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012-2014, The CyanogenMod Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * @file CameraWrapper.cpp
19 | *
20 | * This file wraps a vendor camera module.
21 | *
22 | */
23 |
24 | //#define LOG_NDEBUG 0
25 |
26 | #define LOG_TAG "CameraWrapper"
27 | #include
28 |
29 | #include
30 | #include
31 | #include
32 | #include
33 | #include
34 | #include
35 | #include
36 | #include
37 |
38 | #define BACK_CAMERA_ID 0
39 | #define FRONT_CAMERA_ID 1
40 |
41 | using namespace android;
42 |
43 | static Mutex gCameraWrapperLock;
44 | static camera_module_t *gVendorModule = 0;
45 |
46 | static int camera_device_open(const hw_module_t *module, const char *name,
47 | hw_device_t **device);
48 | static int camera_get_number_of_cameras(void);
49 | static int camera_get_camera_info(int camera_id, struct camera_info *info);
50 |
51 | static struct hw_module_methods_t camera_module_methods = {
52 | .open = camera_device_open
53 | };
54 |
55 | camera_module_t HAL_MODULE_INFO_SYM = {
56 | .common = {
57 | .tag = HARDWARE_MODULE_TAG,
58 | .module_api_version = CAMERA_MODULE_API_VERSION_1_0,
59 | .hal_api_version = HARDWARE_HAL_API_VERSION,
60 | .id = CAMERA_HARDWARE_MODULE_ID,
61 | .name = "Baconator Camera",
62 | .author = "The CyanogenMod Project",
63 | .methods = &camera_module_methods,
64 | .dso = NULL, /* remove compilation warnings */
65 | .reserved = {0}, /* remove compilation warnings */
66 | },
67 | .get_number_of_cameras = camera_get_number_of_cameras,
68 | .get_camera_info = camera_get_camera_info,
69 | .set_callbacks = NULL, /* remove compilation warnings */
70 | .get_vendor_tag_ops = NULL, /* remove compilation warnings */
71 | .open_legacy = NULL, /* remove compilation warnings */
72 | .reserved = {0}, /* remove compilation warnings */
73 | };
74 |
75 | typedef struct wrapper_camera_device {
76 | camera_device_t base;
77 | int id;
78 | camera_device_t *vendor;
79 | bool initial_get;
80 | } wrapper_camera_device_t;
81 |
82 | #define VENDOR_CALL(device, func, ...) ({ \
83 | wrapper_camera_device_t *__wrapper_dev = (wrapper_camera_device_t*) device; \
84 | __wrapper_dev->vendor->ops->func(__wrapper_dev->vendor, ##__VA_ARGS__); \
85 | })
86 |
87 | #define CAMERA_ID(device) (((wrapper_camera_device_t *)(device))->id)
88 |
89 | static char *camera_get_parameters(struct camera_device *device);
90 | static int camera_set_parameters(struct camera_device *device,
91 | const char *params);
92 |
93 | static int check_vendor_module()
94 | {
95 | int rv = 0;
96 | ALOGV("%s", __FUNCTION__);
97 |
98 | if (gVendorModule)
99 | return 0;
100 |
101 | rv = hw_get_module_by_class("camera", "vendor",
102 | (const hw_module_t**)&gVendorModule);
103 | if (rv) {
104 | ALOGE("failed to open vendor camera module %d", rv);
105 | }
106 | return rv;
107 | }
108 |
109 | /*******************************************************************
110 | * implementation of camera_device_ops functions
111 | *******************************************************************/
112 |
113 | static int camera_set_preview_window(struct camera_device *device,
114 | struct preview_stream_ops *window)
115 | {
116 | ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
117 | (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
118 |
119 | if (!device)
120 | return -EINVAL;
121 |
122 | return VENDOR_CALL(device, set_preview_window, window);
123 | }
124 |
125 | static void camera_set_callbacks(struct camera_device *device,
126 | camera_notify_callback notify_cb,
127 | camera_data_callback data_cb,
128 | camera_data_timestamp_callback data_cb_timestamp,
129 | camera_request_memory get_memory,
130 | void *user)
131 | {
132 | ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
133 | (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
134 |
135 | if (!device)
136 | return;
137 |
138 | VENDOR_CALL(device, set_callbacks, notify_cb, data_cb, data_cb_timestamp,
139 | get_memory, user);
140 | }
141 |
142 | static void camera_enable_msg_type(struct camera_device *device,
143 | int32_t msg_type)
144 | {
145 | ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
146 | (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
147 |
148 | if (!device)
149 | return;
150 |
151 | VENDOR_CALL(device, enable_msg_type, msg_type);
152 | }
153 |
154 | static void camera_disable_msg_type(struct camera_device *device,
155 | int32_t msg_type)
156 | {
157 | ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
158 | (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
159 |
160 | if (!device)
161 | return;
162 |
163 | VENDOR_CALL(device, disable_msg_type, msg_type);
164 | }
165 |
166 | static int camera_msg_type_enabled(struct camera_device *device,
167 | int32_t msg_type)
168 | {
169 | ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
170 | (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
171 |
172 | if (!device)
173 | return 0;
174 |
175 | return VENDOR_CALL(device, msg_type_enabled, msg_type);
176 | }
177 |
178 | static int camera_start_preview(struct camera_device *device)
179 | {
180 | ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
181 | (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
182 |
183 | if (!device)
184 | return -EINVAL;
185 |
186 | return VENDOR_CALL(device, start_preview);
187 | }
188 |
189 | static void camera_stop_preview(struct camera_device *device)
190 | {
191 | ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
192 | (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
193 |
194 | if (!device)
195 | return;
196 |
197 | VENDOR_CALL(device, stop_preview);
198 | }
199 |
200 | static int camera_preview_enabled(struct camera_device *device)
201 | {
202 | ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
203 | (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
204 |
205 | if (!device)
206 | return -EINVAL;
207 |
208 | return VENDOR_CALL(device, preview_enabled);
209 | }
210 |
211 | static int camera_store_meta_data_in_buffers(struct camera_device *device,
212 | int enable)
213 | {
214 | ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
215 | (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
216 |
217 | if (!device)
218 | return -EINVAL;
219 |
220 | return VENDOR_CALL(device, store_meta_data_in_buffers, enable);
221 | }
222 |
223 | static bool is4k(CameraParameters2 ¶ms) {
224 | int video_width, video_height;
225 | params.getVideoSize(&video_width, &video_height);
226 |
227 | return video_width*video_height > 1920*1080;
228 | }
229 |
230 | static int camera_start_recording(struct camera_device *device)
231 | {
232 | ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
233 | (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
234 |
235 | if (!device)
236 | return EINVAL;
237 |
238 |
239 | CameraParameters2 parameters;
240 | parameters.unflatten(String8(camera_get_parameters(device)));
241 | if (CAMERA_ID(device) == BACK_CAMERA_ID) {
242 | if (is4k(parameters)) {
243 | parameters.set("preview-format", "nv12-venus");
244 | }
245 | parameters.set("picture-size", "4160x3120");
246 | }
247 | camera_set_parameters(device, strdup(parameters.flatten().string()));
248 |
249 | CameraParameters2 parameters2;
250 | parameters2.unflatten(String8(VENDOR_CALL(device, get_parameters)));
251 | parameters2.dump();
252 |
253 |
254 |
255 | return VENDOR_CALL(device, start_recording);
256 | }
257 |
258 | static void camera_stop_recording(struct camera_device *device)
259 | {
260 | ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
261 | (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
262 |
263 | if (!device)
264 | return;
265 |
266 | VENDOR_CALL(device, stop_recording);
267 | }
268 |
269 | static int camera_recording_enabled(struct camera_device *device)
270 | {
271 | ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
272 | (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
273 |
274 | if (!device)
275 | return -EINVAL;
276 |
277 | return VENDOR_CALL(device, recording_enabled);
278 | }
279 |
280 | static void camera_release_recording_frame(struct camera_device *device,
281 | const void *opaque)
282 | {
283 | ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
284 | (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
285 |
286 | if (!device)
287 | return;
288 |
289 | VENDOR_CALL(device, release_recording_frame, opaque);
290 | }
291 |
292 | static int camera_auto_focus(struct camera_device *device)
293 | {
294 | ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
295 | (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
296 |
297 | if (!device)
298 | return -EINVAL;
299 |
300 |
301 | return VENDOR_CALL(device, auto_focus);
302 | }
303 |
304 | static int camera_cancel_auto_focus(struct camera_device *device)
305 | {
306 | ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
307 | (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
308 |
309 | if (!device)
310 | return -EINVAL;
311 |
312 | return VENDOR_CALL(device, cancel_auto_focus);
313 | }
314 |
315 | static int camera_take_picture(struct camera_device *device)
316 | {
317 | ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
318 | (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
319 |
320 | if (!device)
321 | return -EINVAL;
322 |
323 | return VENDOR_CALL(device, take_picture);
324 | }
325 |
326 | static int camera_cancel_picture(struct camera_device *device)
327 | {
328 | ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
329 | (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
330 |
331 | if (!device)
332 | return -EINVAL;
333 |
334 | return VENDOR_CALL(device, cancel_picture);
335 | }
336 |
337 | static int camera_set_parameters(struct camera_device *device,
338 | const char *params)
339 | {
340 | ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
341 | (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
342 |
343 | if (!device)
344 | return -EINVAL;
345 |
346 | return VENDOR_CALL(device, set_parameters, params);
347 | }
348 |
349 | static char *camera_get_parameters(struct camera_device *device)
350 | {
351 | ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
352 | (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
353 |
354 | if (!device)
355 | return NULL;
356 |
357 | char *parameters = VENDOR_CALL(device, get_parameters);
358 | wrapper_camera_device_t *wrapper = (wrapper_camera_device_t *)device;
359 |
360 | if (wrapper->initial_get) {
361 | wrapper->initial_get = false;
362 | CameraParameters2 params;
363 | params.unflatten(String8(parameters));
364 | params.set("cyanogen-camera", "1");
365 | VENDOR_CALL(device, set_parameters, strdup(params.flatten().string()));
366 | parameters = VENDOR_CALL(device, get_parameters);
367 | }
368 |
369 | CameraParameters2 params;
370 | params.unflatten(String8(parameters));
371 | if (CAMERA_ID(device) == BACK_CAMERA_ID) {
372 | /* Disable 352x288 preview sizes, the combination of this preview size and larger resolutions stalls the HAL */
373 | params.set(CameraParameters::KEY_SUPPORTED_PREVIEW_SIZES,
374 | "1920x1080,1440x1080,1280x960,1280x720,768x432,720x480,640x480,576x432,384x288,320x240");
375 | } else if (CAMERA_ID(device) == FRONT_CAMERA_ID) {
376 | /* Inject all supported resolutions */
377 | params.set(CameraParameters::KEY_SUPPORTED_VIDEO_SIZES,
378 | "1280x720,864x480,800x480,720x480,640x480,480x320,384x288,352x288,320x240");
379 | }
380 |
381 | return strdup(params.flatten().string());
382 | }
383 |
384 | static void camera_put_parameters(struct camera_device *device, char *params)
385 | {
386 | ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
387 | (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
388 |
389 | if (device) {
390 | VENDOR_CALL(device, put_parameters, params);
391 | }
392 | }
393 |
394 | static int camera_send_command(struct camera_device *device,
395 | int32_t cmd, int32_t arg1, int32_t arg2)
396 | {
397 | ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
398 | (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
399 |
400 | if (!device)
401 | return -EINVAL;
402 |
403 | return VENDOR_CALL(device, send_command, cmd, arg1, arg2);
404 | }
405 |
406 | static void camera_release(struct camera_device *device)
407 | {
408 | ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
409 | (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
410 |
411 | if (!device)
412 | return;
413 |
414 | VENDOR_CALL(device, release);
415 | }
416 |
417 | static int camera_dump(struct camera_device *device, int fd)
418 | {
419 | ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
420 | (uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
421 |
422 | if (!device)
423 | return -EINVAL;
424 |
425 | return VENDOR_CALL(device, dump, fd);
426 | }
427 |
428 | extern "C" void heaptracker_free_leaked_memory(void);
429 |
430 | static int camera_device_close(hw_device_t *device)
431 | {
432 | int ret = 0;
433 | wrapper_camera_device_t *wrapper_dev = NULL;
434 |
435 | ALOGV("%s", __FUNCTION__);
436 |
437 | Mutex::Autolock lock(gCameraWrapperLock);
438 |
439 | if (!device) {
440 | ret = -EINVAL;
441 | goto done;
442 | }
443 |
444 | wrapper_dev = (wrapper_camera_device_t*) device;
445 |
446 | wrapper_dev->vendor->common.close((hw_device_t*)wrapper_dev->vendor);
447 | if (wrapper_dev->base.ops)
448 | free(wrapper_dev->base.ops);
449 | free(wrapper_dev);
450 | done:
451 | #ifdef HEAPTRACKER
452 | heaptracker_free_leaked_memory();
453 | #endif
454 | return ret;
455 | }
456 |
457 | /*******************************************************************
458 | * implementation of camera_module functions
459 | *******************************************************************/
460 |
461 | /* open device handle to one of the cameras
462 | *
463 | * assume camera service will keep singleton of each camera
464 | * so this function will always only be called once per camera instance
465 | */
466 |
467 | static int camera_device_open(const hw_module_t *module, const char *name,
468 | hw_device_t **device)
469 | {
470 | int rv = 0;
471 | int num_cameras = 0;
472 | int cameraid;
473 | wrapper_camera_device_t *camera_device = NULL;
474 | camera_device_ops_t *camera_ops = NULL;
475 |
476 | Mutex::Autolock lock(gCameraWrapperLock);
477 |
478 | ALOGV("%s", __FUNCTION__);
479 |
480 | if (name != NULL) {
481 | if (check_vendor_module())
482 | return -EINVAL;
483 |
484 | cameraid = atoi(name);
485 | num_cameras = gVendorModule->get_number_of_cameras();
486 |
487 | if (cameraid > num_cameras) {
488 | ALOGE("camera service provided cameraid out of bounds, "
489 | "cameraid = %d, num supported = %d",
490 | cameraid, num_cameras);
491 | rv = -EINVAL;
492 | goto fail;
493 | }
494 |
495 | camera_device = (wrapper_camera_device_t*)malloc(sizeof(*camera_device));
496 | if (!camera_device) {
497 | ALOGE("camera_device allocation fail");
498 | rv = -ENOMEM;
499 | goto fail;
500 | }
501 | memset(camera_device, 0, sizeof(*camera_device));
502 | camera_device->id = cameraid;
503 |
504 | camera_device->initial_get = true;
505 |
506 | rv = gVendorModule->common.methods->open(
507 | (const hw_module_t*)gVendorModule, name,
508 | (hw_device_t**)&(camera_device->vendor));
509 | if (rv) {
510 | ALOGE("vendor camera open fail");
511 | goto fail;
512 | }
513 | ALOGV("%s: got vendor camera device 0x%08X",
514 | __FUNCTION__, (uintptr_t)(camera_device->vendor));
515 |
516 | camera_ops = (camera_device_ops_t*)malloc(sizeof(*camera_ops));
517 | if (!camera_ops) {
518 | ALOGE("camera_ops allocation fail");
519 | rv = -ENOMEM;
520 | goto fail;
521 | }
522 |
523 | memset(camera_ops, 0, sizeof(*camera_ops));
524 |
525 | camera_device->base.common.tag = HARDWARE_DEVICE_TAG;
526 | camera_device->base.common.version = HARDWARE_DEVICE_API_VERSION(1, 0);
527 | camera_device->base.common.module = (hw_module_t *)(module);
528 | camera_device->base.common.close = camera_device_close;
529 | camera_device->base.ops = camera_ops;
530 |
531 | camera_ops->set_preview_window = camera_set_preview_window;
532 | camera_ops->set_callbacks = camera_set_callbacks;
533 | camera_ops->enable_msg_type = camera_enable_msg_type;
534 | camera_ops->disable_msg_type = camera_disable_msg_type;
535 | camera_ops->msg_type_enabled = camera_msg_type_enabled;
536 |
537 | camera_ops->start_preview = camera_start_preview;
538 | camera_ops->stop_preview = camera_stop_preview;
539 | camera_ops->preview_enabled = camera_preview_enabled;
540 | camera_ops->store_meta_data_in_buffers = camera_store_meta_data_in_buffers;
541 |
542 | camera_ops->start_recording = camera_start_recording;
543 | camera_ops->stop_recording = camera_stop_recording;
544 | camera_ops->recording_enabled = camera_recording_enabled;
545 | camera_ops->release_recording_frame = camera_release_recording_frame;
546 |
547 | camera_ops->auto_focus = camera_auto_focus;
548 | camera_ops->cancel_auto_focus = camera_cancel_auto_focus;
549 |
550 | camera_ops->take_picture = camera_take_picture;
551 | camera_ops->cancel_picture = camera_cancel_picture;
552 |
553 | camera_ops->set_parameters = camera_set_parameters;
554 | camera_ops->get_parameters = camera_get_parameters;
555 | camera_ops->put_parameters = camera_put_parameters;
556 | camera_ops->send_command = camera_send_command;
557 |
558 | camera_ops->release = camera_release;
559 | camera_ops->dump = camera_dump;
560 |
561 | *device = &camera_device->base.common;
562 | }
563 |
564 | return rv;
565 |
566 | fail:
567 | if (camera_device) {
568 | free(camera_device);
569 | camera_device = NULL;
570 | }
571 | if (camera_ops) {
572 | free(camera_ops);
573 | camera_ops = NULL;
574 | }
575 | *device = NULL;
576 | return rv;
577 | }
578 |
579 | static int camera_get_number_of_cameras(void)
580 | {
581 | ALOGV("%s", __FUNCTION__);
582 | if (check_vendor_module())
583 | return 0;
584 | return gVendorModule->get_number_of_cameras();
585 | }
586 |
587 | static int camera_get_camera_info(int camera_id, struct camera_info *info)
588 | {
589 | ALOGV("%s", __FUNCTION__);
590 | if (check_vendor_module())
591 | return 0;
592 | return gVendorModule->get_camera_info(camera_id, info);
593 | }
594 |
--------------------------------------------------------------------------------
/cm.dependencies:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "repository": "android_device_oppo_msm8974-common",
4 | "target_path": "device/oppo/msm8974-common"
5 | }
6 | ]
7 |
--------------------------------------------------------------------------------
/cm.mk:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2014 The CyanogenMod Project
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | # Inherit from those products. Most specific first.
16 | $(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
17 |
18 | # Inherit from bacon device
19 | $(call inherit-product, device/oneplus/bacon/bacon.mk)
20 |
21 | # Enhanced NFC
22 | $(call inherit-product, vendor/cm/config/nfc_enhanced.mk)
23 |
24 | # Inherit some common CM stuff.
25 | $(call inherit-product, vendor/cm/config/common_full_phone.mk)
26 |
27 | PRODUCT_NAME := cm_bacon
28 | PRODUCT_DEVICE := bacon
29 | PRODUCT_MANUFACTURER := OnePlus
30 | PRODUCT_MODEL := A0001
31 |
32 | PRODUCT_GMS_CLIENTID_BASE := android-oneplus
33 |
34 | PRODUCT_BRAND := oneplus
35 | TARGET_VENDOR_PRODUCT_NAME := bacon
36 | TARGET_VENDOR_DEVICE_NAME := A0001
37 | PRODUCT_BUILD_PROP_OVERRIDES += TARGET_DEVICE=A0001 PRODUCT_NAME=bacon
38 |
39 | ## Use the latest approved GMS identifiers unless running a signed build
40 | ifneq ($(SIGN_BUILD),true)
41 | PRODUCT_BUILD_PROP_OVERRIDES += BUILD_FINGERPRINT=oneplus/bacon/A0001:4.4.2/KVT49L/XNPH25R:user/release-keys PRIVATE_BUILD_DESC="bacon-user 4.4.2 KVT49L XNPH25R release-keys"
42 | endif
43 |
--------------------------------------------------------------------------------
/configs/libnfc-brcm.conf:
--------------------------------------------------------------------------------
1 | ## this file is used by Broadcom's Hardware Abstraction Layer at external/libnfc-nci/halimpl/
2 |
3 | ###############################################################################
4 | # Application options
5 | APPL_TRACE_LEVEL=0x02
6 | PROTOCOL_TRACE_LEVEL=0xFFFFFFFF
7 |
8 | ###############################################################################
9 | # performance measurement
10 | # Change this setting to control how often USERIAL log the performance (throughput)
11 | # data on read/write/poll
12 | # defailt is to log performance dara for every 100 read or write
13 | #REPORT_PERFORMANCE_MEASURE=100
14 |
15 | ###############################################################################
16 | # File used for NFA storage
17 | NFA_STORAGE="/data/nfc"
18 |
19 | ###############################################################################
20 | # Snooze Mode Settings
21 | #
22 | # By default snooze mode is enabled. Set SNOOZE_MODE_CFG byte[0] to 0
23 | # to disable.
24 | #
25 | # If SNOOZE_MODE_CFG is not provided, the default settings are used:
26 | # They are as follows:
27 | # 8 Sleep Mode (0=Disabled 1=UART 8=SPI/I2C)
28 | # 0 Idle Threshold Host
29 | # 0 Idle Threshold HC
30 | # 0 NFC Wake active mode (0=ActiveLow 1=ActiveHigh)
31 | # 1 Host Wake active mode (0=ActiveLow 1=ActiveHigh)
32 | #
33 | #SNOOZE_MODE_CFG={08:00:00:00:01}
34 |
35 | ###############################################################################
36 | # Insert a delay in milliseconds after NFC_WAKE and before write to NFCC
37 | NFC_WAKE_DELAY=20
38 |
39 | ###############################################################################
40 | # Various Delay settings (in ms) used in USERIAL
41 | # POWER_ON_DELAY
42 | # Delay after turning on chip, before writing to transport (default 300)
43 | # PRE_POWER_OFF_DELAY
44 | # Delay after deasserting NFC-Wake before turn off chip (default 0)
45 | # POST_POWER_OFF_DELAY
46 | # Delay after turning off chip, before USERIAL_close returns (default 0)
47 | #
48 | #POWER_ON_DELAY=300
49 | #PRE_POWER_OFF_DELAY=0
50 | #POST_POWER_OFF_DELAY=0
51 |
52 | ###############################################################################
53 | # LPTD mode configuration
54 | # byte[0] is the length of the remaining bytes in this value
55 | # if set to 0, LPTD params will NOT be sent to NFCC (i.e. disabled).
56 | # byte[1] is the param id it should be set to B9.
57 | # byte[2] is the length of the LPTD parameters
58 | # byte[3] indicates if LPTD is enabled
59 | # if set to 0, LPTD will be disabled (parameters will still be sent).
60 | # byte[4-n] are the LPTD parameters.
61 | # By default, LPTD is enabled and default settings are used.
62 | # See nfc_hal_dm_cfg.c for defaults
63 | LPTD_CFG={23: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}
64 |
65 | ###############################################################################
66 | # Startup Configuration (100 bytes maximum)
67 | #
68 | # For the 0xCA parameter, byte[9] (marked by 'AA') is for UICC0, and byte[10] (marked by BB) is
69 | # for UICC1. The values are defined as:
70 | # 0 : UICCx only supports ISO_DEP in low power mode.
71 | # 2 : UICCx only supports Mifare in low power mode.
72 | # 3 : UICCx supports both ISO_DEP and Mifare in low power mode.
73 | #
74 | # AA BB
75 | 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}
76 |
77 | ###############################################################################
78 | # Startup Vendor Specific Configuration (100 bytes maximum);
79 | # byte[0] TLV total len = 0x5
80 | # byte[1] NCI_MTS_CMD|NCI_GID_PROP = 0x2f
81 | # byte[2] NCI_MSG_FRAME_LOG = 0x9
82 | # byte[3] 2
83 | # byte[4] 0=turn off RF frame logging; 1=turn on
84 | # byte[5] 0=turn off SWP frame logging; 1=turn on
85 | # NFA_DM_START_UP_VSC_CFG={05:2F:09:02:01:01}
86 |
87 | ###############################################################################
88 | # Antenna Configuration - This data is used when setting 0xC8 config item
89 | # at startup (before discovery is started). If not used, no value is sent.
90 | #
91 | # The settings for this value are documented here:
92 | # http://wcgbu.broadcom.com/wpan/PM/Project%20Document%20Library/bcm20791B0/
93 | # Design/Doc/PHY%20register%20settings/BCM20791-B2-1027-02_PHY_Recommended_Reg_Settings.xlsx
94 | # This document is maintained by Paul Forshaw.
95 | #
96 | # The values marked as ?? should be tweaked per antenna or customer/app:
97 | # {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}
98 | # array[0] = 0x20 is length of the payload from array[1] to the end
99 | # array[1] = 0xC8 is PREINIT_DSP_CFG
100 | #PREINIT_DSP_CFG={20:C8:1E:06:1F:00:0F:03:3C:00:04:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:48:01:00:00:40:04}
101 |
102 | ###############################################################################
103 | # Configure crystal frequency when internal LPO can't detect the frequency.
104 | #XTAL_FREQUENCY=0
105 | ###############################################################################
106 | # Configure the default Destination Gate used by HCI (the default is 4, which
107 | # is the ETSI loopback gate.
108 | NFA_HCI_DEFAULT_DEST_GATE=0xF0
109 |
110 | ###############################################################################
111 | # Configure the single default SE to use. The default is to use the first
112 | # SE that is detected by the stack. This value might be used when the phone
113 | # supports multiple SE (e.g. 0xF3 and 0xF4) but you want to force it to use
114 | # one of them (e.g. 0xF4).
115 | #ACTIVE_SE=0xF3
116 |
117 | ###############################################################################
118 | # Configure the NFC Extras to open and use a static pipe. If the value is
119 | # not set or set to 0, then the default is use a dynamic pipe based on a
120 | # destination gate (see NFA_HCI_DEFAULT_DEST_GATE). Note there is a value
121 | # for each UICC (where F3="UICC0" and F4="UICC1")
122 | #NFA_HCI_STATIC_PIPE_ID_F3=0x70
123 | #NFA_HCI_STATIC_PIPE_ID_01=0x19
124 | NFA_HCI_STATIC_PIPE_ID_C0=0x19
125 | ###############################################################################
126 | # When disconnecting from Oberthur secure element, perform a warm-reset of
127 | # the secure element to deselect the applet.
128 | # The default hex value of the command is 0x3. If this variable is undefined,
129 | # then this feature is not used.
130 | OBERTHUR_WARM_RESET_COMMAND=0x03
131 |
132 | ###############################################################################
133 | # Force UICC to only listen to the following technology(s).
134 | # The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h.
135 | # Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_B | NFA_TECHNOLOGY_MASK_F
136 | UICC_LISTEN_TECH_MASK=0xC7
137 |
138 | ###############################################################################
139 | # Force HOST listen feature enable or disable.
140 | # 0: Disable
141 | # 1: Enable
142 | HOST_LISTEN_ENABLE=0x01
143 |
144 | ###############################################################################
145 | # Allow UICC to be powered off if there is no traffic.
146 | # Timeout is in ms. If set to 0, then UICC will not be powered off.
147 | #UICC_IDLE_TIMEOUT=30000
148 | UICC_IDLE_TIMEOUT=0
149 |
150 | ###############################################################################
151 | # AID for Empty Select command
152 | # If specified, this AID will be substituted when an Empty SELECT command is
153 | # detected. The first byte is the length of the AID. Maximum length is 16.
154 | AID_FOR_EMPTY_SELECT={08:A0:00:00:01:51:00:00:00}
155 | ###############################################################################
156 | # Maximum Number of Credits to be allowed by the NFCC
157 | # This value overrides what the NFCC specifices allowing the host to have
158 | # the control to work-around transport limitations. If this value does
159 | # not exist or is set to 0, the NFCC will provide the number of credits.
160 | MAX_RF_DATA_CREDITS=1
161 |
162 | ###############################################################################
163 | # This setting allows you to disable registering the T4t Virtual SE that causes
164 | # the NFCC to send PPSE requests to the DH.
165 | # The default setting is enabled (i.e. T4t Virtual SE is registered).
166 | #REGISTER_VIRTUAL_SE=1
167 |
168 | ###############################################################################
169 | # When screen is turned off, specify the desired power state of the controller.
170 | # 0: power-off-sleep state; DEFAULT
171 | # 1: full-power state
172 | # 2: screen-off card-emulation (CE4/CE3/CE1 modes are used)
173 | SCREEN_OFF_POWER_STATE=1
174 |
175 | ###############################################################################
176 | # Firmware patch file
177 | # If the value is not set then patch download is disabled.
178 | FW_PATCH="/vendor/firmware/bcm2079x_firmware.ncd"
179 |
180 | ###############################################################################
181 | # Firmware pre-patch file (sent before the above patch file)
182 | # If the value is not set then pre-patch is not used.
183 | FW_PRE_PATCH="/vendor/firmware/bcm2079x_pre_firmware.ncd"
184 |
185 | ###############################################################################
186 | # Firmware patch format
187 | # 1 = HCD
188 | # 2 = NCD (default)
189 | #NFA_CONFIG_FORMAT=2
190 |
191 | ###############################################################################
192 | # SPD Debug mode
193 | # If set to 1, any failure of downloading a patch will trigger a hard-stop
194 | #SPD_DEBUG=0
195 |
196 | ###############################################################################
197 | # SPD Max Retry Count
198 | # The number of attempts to download a patch before giving up (defualt is 3).
199 | # Note, this resets after a power-cycle.
200 | #SPD_MAX_RETRY_COUNT=3
201 |
202 | ###############################################################################
203 | # transport driver
204 | #
205 | # TRANSPORT_DRIVER=
206 | #
207 | # where can be, for example:
208 | # "/dev/ttyS" (UART)
209 | # "/dev/bcmi2cnfc" (I2C)
210 | # "hwtun" (HW Tunnel)
211 | # "/dev/bcmspinfc" (SPI)
212 | # "/dev/btusb0" (BT USB)
213 | TRANSPORT_DRIVER="/dev/bcm2079x"
214 |
215 | ###############################################################################
216 | # power control driver
217 | # Specify a kernel driver that support ioctl commands to control NFC_EN and
218 | # NFC_WAKE gpio signals.
219 | #
220 | # POWER_CONTRL_DRIVER=
221 | # where can be, for example:
222 | # "/dev/nfcpower"
223 | # "/dev/bcmi2cnfc" (I2C)
224 | # "/dev/bcmspinfc" (SPI)
225 | # i2c and spi driver may be used to control NFC_EN and NFC_WAKE signal
226 | POWER_CONTROL_DRIVER="/dev/bcm2079x"
227 |
228 | ###############################################################################
229 | # I2C transport driver options
230 | #
231 | BCMI2CNFC_ADDRESS=0
232 |
233 | ###############################################################################
234 | # I2C transport driver try to read multiple packets in read() if data is available
235 | # remove the comment below to enable this feature
236 | #READ_MULTIPLE_PACKETS=1
237 |
238 | ###############################################################################
239 | # SPI transport driver options
240 | #SPI_NEGOTIATION={0A:F0:00:01:00:00:00:FF:FF:00:00}
241 |
242 | ###############################################################################
243 | # UART transport driver options
244 | #
245 | # PORT=1,2,3,...
246 | # BAUD=115200, 19200, 9600, 4800,
247 | # DATABITS=8, 7, 6, 5
248 | # PARITY="even" | "odd" | "none"
249 | # STOPBITS="0" | "1" | "1.5" | "2"
250 |
251 | #UART_PORT=2
252 | #UART_BAUD=115200
253 | #UART_DATABITS=8
254 | #UART_PARITY="none"
255 | #UART_STOPBITS="1"
256 |
257 | ###############################################################################
258 | # Insert a delay in microseconds per byte after a write to NFCC.
259 | # after writing a block of data to the NFCC, delay this an amopunt of time before
260 | # writing next block of data. the delay is calculated as below
261 | # NFC_WRITE_DELAY * (number of byte written) / 1000 milliseconds
262 | # e.g. after 259 bytes is written, delay (259 * 20 / 1000) 5 ms before next write
263 | NFC_WRITE_DELAY=20
264 |
265 | ###############################################################################
266 | # Maximum Number of Credits to be allowed by the NFCC
267 | # This value overrides what the NFCC specifices allowing the host to have
268 | # the control to work-around transport limitations. If this value does
269 | # not exist or is set to 0, the NFCC will provide the number of credits.
270 | MAX_RF_DATA_CREDITS=1
271 |
272 | ###############################################################################
273 | # Antenna Configuration - This data is used when setting 0xC8 config item
274 | # at startup (before discovery is started). If not used, no value is sent.
275 | #
276 | # The settings for this value are documented here:
277 | # http://wcgbu.broadcom.com/wpan/PM/Project%20Document%20Library/bcm20791B0/
278 | # Design/Doc/PHY%20register%20settings/BCM20791-B2-1027-02_PHY_Recommended_Reg_Settings.xlsx
279 | # This document is maintained by Paul Forshaw.
280 | #
281 | # The values marked as ?? should be tweaked per antenna or customer/app:
282 | # {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}
283 | # array[0] = 0x20 is length of the payload from array[1] to the end
284 | # array[1] = 0xC8 is PREINIT_DSP_CFG
285 | #PREINIT_DSP_CFG={20:C8:1E:06:1F:00:0F:03:3C:00:04:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:48:01:00:00:40:04}
286 |
287 |
288 | ###############################################################################
289 | # Force tag polling for the following technology(s).
290 | # The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h.
291 | # Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_B |
292 | # NFA_TECHNOLOGY_MASK_F | NFA_TECHNOLOGY_MASK_ISO15693 |
293 | # NFA_TECHNOLOGY_MASK_B_PRIME | NFA_TECHNOLOGY_MASK_KOVIO |
294 | # NFA_TECHNOLOGY_MASK_A_ACTIVE | NFA_TECHNOLOGY_MASK_F_ACTIVE.
295 | #
296 | # Notable bits:
297 | # NFA_TECHNOLOGY_MASK_A 0x01 /* NFC Technology A */
298 | # NFA_TECHNOLOGY_MASK_B 0x02 /* NFC Technology B */
299 | # NFA_TECHNOLOGY_MASK_F 0x04 /* NFC Technology F */
300 | # NFA_TECHNOLOGY_MASK_ISO15693 0x08 /* Proprietary Technology */
301 | # NFA_TECHNOLOGY_MASK_KOVIO 0x20 /* Proprietary Technology */
302 | # NFA_TECHNOLOGY_MASK_A_ACTIVE 0x40 /* NFC Technology A active mode */
303 | # NFA_TECHNOLOGY_MASK_F_ACTIVE 0x80 /* NFC Technology F active mode */
304 | POLLING_TECH_MASK=0xEF
305 |
306 | ###############################################################################
307 | # Force P2P to only listen for the following technology(s).
308 | # The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h.
309 | # Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_F |
310 | # NFA_TECHNOLOGY_MASK_A_ACTIVE | NFA_TECHNOLOGY_MASK_F_ACTIVE
311 | #
312 | # Notable bits:
313 | # NFA_TECHNOLOGY_MASK_A 0x01 /* NFC Technology A */
314 | # NFA_TECHNOLOGY_MASK_F 0x04 /* NFC Technology F */
315 | # NFA_TECHNOLOGY_MASK_A_ACTIVE 0x40 /* NFC Technology A active mode */
316 | # NFA_TECHNOLOGY_MASK_F_ACTIVE 0x80 /* NFC Technology F active mode */
317 | P2P_LISTEN_TECH_MASK=0xC5
318 |
319 | PRESERVE_STORAGE=0x01
320 |
321 | ###############################################################################
322 | # Maximum EE supported number
323 | # NXP PN547C2 0x02
324 | # NXP PN65T 0x03
325 | NFA_MAX_EE_SUPPORTED=0x03
326 |
327 | ###############################################################################
328 | # NCI Hal Module name
329 | NCI_HAL_MODULE="nfc_nci.pn54x"
330 |
--------------------------------------------------------------------------------
/configs/libnfc-nxp.conf:
--------------------------------------------------------------------------------
1 | ## This file is used by NFC NXP NCI HAL(external/libnfc-nci/halimpl/pn547)
2 | ## and NFC Service Java Native Interface Extensions (packages/apps/Nfc/nci/jni/extns/pn547)
3 |
4 | ###############################################################################
5 | # Application options
6 | # Logging Levels
7 | # NXPLOG_DEFAULT_LOGLEVEL 0x01
8 | # ANDROID_LOG_DEBUG 0x03
9 | # ANDROID_LOG_WARN 0x02
10 | # ANDROID_LOG_ERROR 0x01
11 | # ANDROID_LOG_SILENT 0x00
12 | #
13 | NXPLOG_EXTNS_LOGLEVEL=0x02
14 | NXPLOG_NCIHAL_LOGLEVEL=0x02
15 | NXPLOG_NCIX_LOGLEVEL=0x02
16 | NXPLOG_NCIR_LOGLEVEL=0x02
17 | NXPLOG_FWDNLD_LOGLEVEL=0x02
18 | NXPLOG_TML_LOGLEVEL=0x02
19 |
20 | ###############################################################################
21 | # Extension for Mifare reader enable
22 | # 0x00 - Disabled
23 | # 0x01 - Enabled
24 | MIFARE_READER_ENABLE=0x01
25 |
26 | ###############################################################################
27 | # File location for Firmware
28 | #FW_STORAGE="/etc/firmware/libpn547_fw.so"
29 |
30 | ###############################################################################
31 | # System clock source selection configuration
32 | # CLK_SRC_XTAL - 0x01
33 | # CLK_SRC_PLL - 0x02
34 | NXP_SYS_CLK_SRC_SEL=0x02
35 |
36 | ###############################################################################
37 | # System clock frequency selection configuration for PLL
38 | # CLK_FREQ_13MHZ - 0x01
39 | # CLK_FREQ_19_2MHZ - 0x02
40 | # CLK_FREQ_24MHZ - 0x03
41 | # CLK_FREQ_26MHZ - 0x04
42 | # CLK_FREQ_38_4MHZ - 0x05
43 | # CLK_FREQ_52MHZ - 0x06
44 | NXP_SYS_CLK_FREQ_SEL=0x02
45 |
46 | ###############################################################################
47 | # The timeout value to be used for clock request acknowledgment
48 | # min value = 0x01 to max = 0x0A
49 | NXP_SYS_CLOCK_TO_CFG=0x0A
50 |
51 | ###############################################################################
52 | # NXP proprietary settings
53 | NXP_ACT_PROP_EXTN={2F, 02, 00}
54 |
55 | ###############################################################################
56 | # NFC forum profile settings
57 | NXP_NFC_PROFILE_EXTN={20, 02, 05, 01, A0, 44, 01, 00}
58 |
59 | ###############################################################################
60 | # Standby enable settings
61 | # 0x00 - Disabled
62 | # 0x01 - Enabled
63 | NXP_CORE_STANDBY={2F, 00, 01, 01}
64 |
65 |
66 | ###############################################################################
67 | # NXP RF ALM (NO BOOSTER) configuration settings for FW VERSION = 08.01.18
68 | ###############################################################################
69 | # A0, 0D, 03, 00, 40, 02 RF_CLIF_BOOT CLIF_ANA_NFCLD_REG
70 | # A0, 0D, 03, 04, 43, 20 RF_CLIF_CFG_INITIATOR CLIF_ANA_PBF_CONTROL_REG
71 | # A0, 0D, 03, 04, FF, 05 RF_CLIF_CFG_INITIATOR SMU_PMU_REG (0x40024010)
72 | # A0, 0D, 06, 06, 44, A3, 90, 03, 00 RF_CLIF_CFG_TARGET CLIF_ANA_RX_REG
73 | # A0, 0D, 06, 06, 30, CF, 00, 08, 00 RF_CLIF_CFG_TARGET CLIF_SIGPRO_ADCBCM_THRESHOLD_REG
74 | # A0, 0D, 06, 06, 2F, 8F, 05, 80, 0C RF_CLIF_CFG_TARGET CLIF_SIGPRO_ADCBCM_CONFIG_REG
75 | # A0, 0D, 04, 06, 03, 00, 6E RF_CLIF_CFG_TARGET CLIF_TRANSCEIVE_CONTROL_REG
76 | # A0, 0D, 03, 06, 48, 1F RF_CLIF_CFG_TARGET CLIF_ANA_CLK_MAN_REG
77 | # A0, 0D, 03, 06, 43, A0 RF_CLIF_CFG_TARGET CLIF_ANA_PBF_CONTROL_REG
78 | # A0, 0D, 06, 06, 42, 00, 00, FF, FF RF_CLIF_CFG_TARGET CLIF_ANA_TX_AMPLITUDE_REG
79 | # A0, 0D, 06, 06, 41, 80, 00, 00, 00 RF_CLIF_CFG_TARGET CLIF_ANA_TX_CLK_CONTROL_REG
80 | # A0, 0D, 03, 06, 37, 18 RF_CLIF_CFG_TARGET CLIF_TX_CONTROL_REG
81 | # A0, 0D, 03, 06, 16, 00 RF_CLIF_CFG_TARGET CLIF_TX_UNDERSHOOT_CONFIG_REG
82 | # A0, 0D, 03, 06, 15, 00 RF_CLIF_CFG_TARGET CLIF_TX_OVERSHOOT_CONFIG_REG
83 | # A0, 0D, 06, 06, FF, 05, 00, 00, 00 RF_CLIF_CFG_TARGET SMU_PMU_REG (0x40024010)
84 | # A0, 0D, 06, 08, 44, 00, 00, 00, 00 RF_CLIF_CFG_I_PASSIVE CLIF_ANA_RX_REG
85 | # A0, 0D, 06, 20, 4A, 00, 00, 00, 00 RF_CLIF_CFG_TECHNO_I_TX15693CLIF_ANA_TX_SHAPE_CONTROL_REG
86 | # A0, 0D, 06, 20, 42, 88, 10, FF, FF RF_CLIF_CFG_TECHNO_I_TX15693CLIF_ANA_TX_AMPLITUDE_REG
87 | # A0, 0D, 03, 20, 16, 00 RF_CLIF_CFG_TECHNO_I_TX15693CLIF_TX_UNDERSHOOT_CONFIG_REG
88 | # A0, 0D, 03, 20, 15, 00 RF_CLIF_CFG_TECHNO_I_TX15693CLIF_TX_OVERSHOOT_CONFIG_REG
89 | # A0, 0D, 06, 22, 44, 22, 00, 02, 00 RF_CLIF_CFG_TECHNO_I_RX15693CLIF_ANA_RX_REG
90 | # A0, 0D, 06, 22, 2D, 50, 44, 0C, 00 RF_CLIF_CFG_TECHNO_I_RX15693CLIF_SIGPRO_RM_CONFIG1_REG
91 | # A0, 0D, 04, 32, 03, 40, 3D RF_CLIF_CFG_BR_106_I_TXA CLIF_TRANSCEIVE_CONTROL_REG
92 | # A0, 0D, 06, 32, 42, F8, 10, FF, FF RF_CLIF_CFG_BR_106_I_TXA CLIF_ANA_TX_AMPLITUDE_REG
93 | # A0, 0D, 03, 32, 16, 00 RF_CLIF_CFG_BR_106_I_TXA CLIF_TX_UNDERSHOOT_CONFIG_REG
94 | # A0, 0D, 03, 32, 15, 01 RF_CLIF_CFG_BR_106_I_TXA CLIF_TX_OVERSHOOT_CONFIG_REG
95 | # A0, 0D, 03, 32, 0D, 22 RF_CLIF_CFG_BR_106_I_TXA CLIF_TX_DATA_MOD_REG
96 | # A0, 0D, 03, 32, 14, 22 RF_CLIF_CFG_BR_106_I_TXA CLIF_TX_SYMBOL23_MOD_REG
97 | # A0, 0D, 06, 32, 4A, 30, 0F, 01, 1F RF_CLIF_CFG_BR_106_I_TXA CLIF_ANA_TX_SHAPE_CONTROL_REG
98 | # A0, 0D, 06, 34, 2D, 24, 77, 0C, 00 RF_CLIF_CFG_BR_106_I_RXA_P CLIF_SIGPRO_RM_CONFIG1_REG
99 | # A0, 0D, 06, 34, 44, 21, 00, 02, 00 RF_CLIF_CFG_BR_106_I_RXA_P CLIF_ANA_RX_REG
100 | # A0, 0D, 06, 35, 44, 21, 00, 02, 00 RF_CLIF_CFG_BR_106_I_RXA_P CLIF_ANA_RX_REG
101 | # A0, 0D, 06, 38, 4A, 53, 07, 01, 1B RF_CLIF_CFG_BR_212_I_TXA CLIF_ANA_TX_SHAPE_CONTROL_REG
102 | # A0, 0D, 06, 38, 42, 68, 10, FF, FF RF_CLIF_CFG_BR_212_I_TXA CLIF_ANA_TX_AMPLITUDE_REG
103 | # A0, 0D, 03, 38, 16, 00 RF_CLIF_CFG_BR_212_I_TXA CLIF_TX_UNDERSHOOT_CONFIG_REG
104 | # A0, 0D, 03, 38, 15, 00 RF_CLIF_CFG_BR_212_I_TXA CLIF_TX_OVERSHOOT_CONFIG_REG
105 | # A0, 0D, 06, 3A, 2D, 15, 47, 0D, 00 RF_CLIF_CFG_BR_212_I_RXA CLIF_SIGPRO_RM_CONFIG1_REG
106 | # A0, 0D, 06, 3C, 4A, 52, 07, 01, 1B RF_CLIF_CFG_BR_424_I_TXA CLIF_ANA_TX_SHAPE_CONTROL_REG
107 | # A0, 0D, 06, 3C, 42, 68, 10, FF, FF RF_CLIF_CFG_BR_424_I_TXA CLIF_ANA_TX_AMPLITUDE_REG
108 | # A0, 0D, 03, 3C, 16, 00 RF_CLIF_CFG_BR_424_I_TXA CLIF_TX_UNDERSHOOT_CONFIG_REG
109 | # A0, 0D, 03, 3C, 15, 00 RF_CLIF_CFG_BR_424_I_TXA CLIF_TX_OVERSHOOT_CONFIG_REG
110 | # A0, 0D, 06, 3E, 2D, 15, 47, 0D, 00 RF_CLIF_CFG_BR_424_I_RXA CLIF_SIGPRO_RM_CONFIG1_REG
111 | # A0, 0D, 06, 40, 42, F0, 10, FF, FF RF_CLIF_CFG_BR_848_I_TXA CLIF_ANA_TX_AMPLITUDE_REG
112 | # A0, 0D, 03, 40, 0D, 02 RF_CLIF_CFG_BR_848_I_TXA CLIF_TX_DATA_MOD_REG
113 | # A0, 0D, 03, 40, 14, 02 RF_CLIF_CFG_BR_848_I_TXA CLIF_TX_SYMBOL23_MOD_REG
114 | # A0, 0D, 06, 40, 4A, 12, 07, 00, 00 RF_CLIF_CFG_BR_848_I_TXA CLIF_ANA_TX_SHAPE_CONTROL_REG
115 | # A0, 0D, 03, 40, 16, 00 RF_CLIF_CFG_BR_848_I_TXA CLIF_TX_UNDERSHOOT_CONFIG_REG
116 | # A0, 0D, 03, 40, 15, 00 RF_CLIF_CFG_BR_848_I_TXA CLIF_TX_OVERSHOOT_CONFIG_REG
117 | # A0, 0D, 06, 42, 2D, 15, 47, 0D, 00 RF_CLIF_CFG_BR_848_I_RXA CLIF_SIGPRO_RM_CONFIG1_REG
118 | # A0, 0D, 06, 46, 44, 21, 00, 02, 00 RF_CLIF_CFG_BR_106_I_RXB CLIF_ANA_RX_REG
119 | # A0, 0D, 06, 46, 2D, 05, 47, 0E, 00 RF_CLIF_CFG_BR_106_I_RXB CLIF_SIGPRO_RM_CONFIG1_REG
120 | # A0, 0D, 06, 44, 4A, 33, 07, 01, 07 RF_CLIF_CFG_BR_106_I_TXB CLIF_ANA_TX_SHAPE_CONTROL_REG
121 | # A0, 0D, 06, 44, 42, 88, 10, FF, FF RF_CLIF_CFG_BR_106_I_TXB CLIF_ANA_TX_AMPLITUDE_REG
122 | # A0, 0D, 03, 44, 16, 00 RF_CLIF_CFG_BR_106_I_TXB CLIF_TX_UNDERSHOOT_CONFIG_REG
123 | # A0, 0D, 03, 44, 15, 00 RF_CLIF_CFG_BR_106_I_TXB CLIF_TX_OVERSHOOT_CONFIG_REG
124 | # A0, 0D, 06, 4A, 44, 22, 00, 02, 00 RF_CLIF_CFG_BR_212_I_RXB CLIF_ANA_RX_REG
125 | # A0, 0D, 06, 4A, 2D, 05, 37, 0C, 00 RF_CLIF_CFG_BR_212_I_RXB CLIF_SIGPRO_RM_CONFIG1_REG
126 | # A0, 0D, 06, 48, 4A, 33, 07, 01, 07 RF_CLIF_CFG_BR_212_I_TXB CLIF_ANA_TX_SHAPE_CONTROL_REG
127 | # A0, 0D, 06, 48, 42, 88, 10, FF, FF RF_CLIF_CFG_BR_212_I_TXB CLIF_ANA_TX_AMPLITUDE_REG
128 | # A0, 0D, 03, 48, 16, 00 RF_CLIF_CFG_BR_212_I_TXB CLIF_TX_UNDERSHOOT_CONFIG_REG
129 | # A0, 0D, 03, 48, 15, 00 RF_CLIF_CFG_BR_212_I_TXB CLIF_TX_OVERSHOOT_CONFIG_REG
130 | # A0, 0D, 06, 4E, 44, 22, 00, 02, 00 RF_CLIF_CFG_BR_424_I_RXB CLIF_ANA_RX_REG
131 | # A0, 0D, 06, 4E, 2D, 05, 37, 0C, 00 RF_CLIF_CFG_BR_424_I_RXB CLIF_SIGPRO_RM_CONFIG1_REG
132 | # A0, 0D, 06, 4C, 4A, 33, 07, 01, 07 RF_CLIF_CFG_BR_424_I_TXB CLIF_ANA_TX_SHAPE_CONTROL_REG
133 | # A0, 0D, 06, 4C, 42, 88, 10, FF, FF RF_CLIF_CFG_BR_424_I_TXB CLIF_ANA_TX_AMPLITUDE_REG
134 | # A0, 0D, 03, 4C, 16, 00 RF_CLIF_CFG_BR_424_I_TXB CLIF_TX_UNDERSHOOT_CONFIG_REG
135 | # A0, 0D, 03, 4C, 15, 00 RF_CLIF_CFG_BR_424_I_TXB CLIF_TX_OVERSHOOT_CONFIG_REG
136 | # A0, 0D, 06, 52, 44, 22, 00, 02, 00 RF_CLIF_CFG_BR_848_I_RXB CLIF_ANA_RX_REG
137 | # A0, 0D, 06, 52, 2D, 05, 25, 0C, 00 RF_CLIF_CFG_BR_848_I_RXB CLIF_SIGPRO_RM_CONFIG1_REG
138 | # A0, 0D, 06, 50, 42, 90, 10, FF, FF RF_CLIF_CFG_BR_848_I_TXB CLIF_ANA_TX_AMPLITUDE_REG
139 | # A0, 0D, 06, 50, 4A, 11, 0F, 01, 07 RF_CLIF_CFG_BR_848_I_TXB CLIF_ANA_TX_SHAPE_CONTROL_REG
140 | # A0, 0D, 03, 50, 16, 00 RF_CLIF_CFG_BR_848_I_TXB CLIF_TX_UNDERSHOOT_CONFIG_REG
141 | # A0, 0D, 03, 50, 15, 00 RF_CLIF_CFG_BR_848_I_TXB CLIF_TX_OVERSHOOT_CONFIG_REG
142 | # A0, 0D, 06, 56, 2D, 05, 9E, 0C, 00 RF_CLIF_CFG_BR_212_I_RXF_P CLIF_SIGPRO_RM_CONFIG1_REG
143 | # A0, 0D, 06, 56, 44, 22, 00, 02, 00 RF_CLIF_CFG_BR_212_I_RXF_P CLIF_ANA_RX_REG
144 | # A0, 0D, 06, 5C, 2D, 05, 69, 0C, 00 RF_CLIF_CFG_BR_424_I_RXF_P CLIF_SIGPRO_RM_CONFIG1_REG
145 | # A0, 0D, 06, 5C, 44, 21, 00, 02, 00 RF_CLIF_CFG_BR_424_I_RXF_P CLIF_ANA_RX_REG
146 | # A0, 0D, 06, 54, 42, 88, 10, FF, FF RF_CLIF_CFG_BR_212_I_TXF CLIF_ANA_TX_AMPLITUDE_REG
147 | # A0, 0D, 06, 54, 4A, 33, 07, 01, 07 RF_CLIF_CFG_BR_212_I_TXF CLIF_ANA_TX_SHAPE_CONTROL_REG
148 | # A0, 0D, 03, 54, 16, 00 RF_CLIF_CFG_BR_212_I_TXF CLIF_TX_UNDERSHOOT_CONFIG_REG
149 | # A0, 0D, 03, 54, 15, 00 RF_CLIF_CFG_BR_212_I_TXF CLIF_TX_OVERSHOOT_CONFIG_REG
150 | # A0, 0D, 06, 5A, 42, 90, 10, FF, FF RF_CLIF_CFG_BR_424_I_TXF CLIF_ANA_TX_AMPLITUDE_REG
151 | # A0, 0D, 06, 5A, 4A, 31, 07, 01, 07 RF_CLIF_CFG_BR_424_I_TXF CLIF_ANA_TX_SHAPE_CONTROL_REG
152 | # A0, 0D, 03, 5A, 16, 00 RF_CLIF_CFG_BR_424_I_TXF CLIF_TX_UNDERSHOOT_CONFIG_REG
153 | # A0, 0D, 03, 5A, 15, 00 RF_CLIF_CFG_BR_424_I_TXF CLIF_TX_OVERSHOOT_CONFIG_REG
154 | # A0, 0D, 06, 98, 2F, AF, 05, 80, 0F RF_CLIF_GTM_B CLIF_SIGPRO_ADCBCM_CONFIG_REG
155 | # A0, 0D, 06, 9A, 42, 00, 00, FF, FF RF_CLIF_GTM_FELICA CLIF_ANA_TX_AMPLITUDE_REG
156 | # A0, 0D, 06, 30, 44, A3, 90, 03, 00 RF_CLIF_CFG_TECHNO_T_RXF CLIF_ANA_RX_REG
157 | # A0, 0D, 06, 6C, 44, A3, 90, 03, 00 RF_CLIF_CFG_BR_106_T_RXA CLIF_ANA_RX_REG
158 | # A0, 0D, 06, 6C, 30, CF, 00, 08, 00 RF_CLIF_CFG_BR_106_T_RXA CLIF_SIGPRO_ADCBCM_THRESHOLD_REG
159 | # A0, 0D, 06, 6C, 2F, 8F, 05, 80, 0C RF_CLIF_CFG_BR_106_T_RXA CLIF_SIGPRO_ADCBCM_CONFIG_REG
160 | # A0, 0D, 06, 70, 2F, 8F, 05, 80, 12 RF_CLIF_CFG_BR_212_T_RXA CLIF_SIGPRO_ADCBCM_CONFIG_REG
161 | # A0, 0D, 06, 70, 30, CF, 00, 08, 00 RF_CLIF_CFG_BR_212_T_RXA CLIF_SIGPRO_ADCBCM_THRESHOLD_REG
162 | # A0, 0D, 06, 74, 2F, 8F, 05, 80, 12 RF_CLIF_CFG_BR_424_T_RXA CLIF_SIGPRO_ADCBCM_CONFIG_REG
163 | # A0, 0D, 06, 74, 30, DF, 00, 07, 00 RF_CLIF_CFG_BR_424_T_RXA CLIF_SIGPRO_ADCBCM_THRESHOLD_REG
164 | # A0, 0D, 06, 78, 2F, 1F, 06, 80, 01 RF_CLIF_CFG_BR_848_T_RXA CLIF_SIGPRO_ADCBCM_CONFIG_REG
165 | # A0, 0D, 06, 78, 30, 3F, 00, 04, 00 RF_CLIF_CFG_BR_848_T_RXA CLIF_SIGPRO_ADCBCM_THRESHOLD_REG
166 | # A0, 0D, 06, 78, 44, A2, 90, 03, 00 RF_CLIF_CFG_BR_848_T_RXA CLIF_ANA_RX_REG
167 | # A0, 0D, 03, 78, 47, 00 RF_CLIF_CFG_BR_848_T_RXA CLIF_ANA_AGC_REG
168 | # A0, 0D, 06, 7C, 2F, AF, 05, 80, 0F RF_CLIF_CFG_BR_106_T_RXB CLIF_SIGPRO_ADCBCM_CONFIG_REG
169 | # A0, 0D, 06, 7C, 30, CF, 00, 07, 00 RF_CLIF_CFG_BR_106_T_RXB CLIF_SIGPRO_ADCBCM_THRESHOLD_REG
170 | # A0, 0D, 06, 7C, 44, A3, 90, 03, 00 RF_CLIF_CFG_BR_106_T_RXB CLIF_ANA_RX_REG
171 | # A0, 0D, 06, 7D, 30, CF, 00, 08, 00 RF_CLIF_CFG_BR_106_T_RXB CLIF_SIGPRO_ADCBCM_THRESHOLD_REG
172 | # A0, 0D, 06, 80, 2F, AF, 05, 80, 90 RF_CLIF_CFG_BR_212_T_RXB CLIF_SIGPRO_ADCBCM_CONFIG_REG
173 | # A0, 0D, 06, 80, 44, A3, 90, 03, 00 RF_CLIF_CFG_BR_212_T_RXB CLIF_ANA_RX_REG
174 | # A0, 0D, 06, 84, 2F, AF, 05, 80, 92 RF_CLIF_CFG_BR_424_T_RXB CLIF_SIGPRO_ADCBCM_CONFIG_REG
175 | # A0, 0D, 06, 84, 44, A3, 90, 03, 00 RF_CLIF_CFG_BR_424_T_RXB CLIF_ANA_RX_REG
176 | # A0, 0D, 06, 88, 2F, 7F, 04, 80, 10 RF_CLIF_CFG_BR_848_T_RXB CLIF_SIGPRO_ADCBCM_CONFIG_REG
177 | # A0, 0D, 06, 88, 30, 5F, 00, 16, 00 RF_CLIF_CFG_BR_848_T_RXB CLIF_SIGPRO_ADCBCM_THRESHOLD_REG
178 | # A0, 0D, 03, 88, 47, 00 RF_CLIF_CFG_BR_848_T_RXB CLIF_ANA_AGC_REG
179 | # A0, 0D, 06, 88, 44, A1, 90, 03, 00 RF_CLIF_CFG_BR_848_T_RXB CLIF_ANA_RX_REG
180 | # A0, 0D, 03, 0C, 48, 1F RF_CLIF_CFG_T_PASSIVE CLIF_ANA_CLK_MAN_REG
181 | # A0, 0D, 03, 10, 43, 20 RF_CLIF_CFG_T_ACTIVE CLIF_ANA_PBF_CONTROL_REG
182 | # A0, 0D, 06, 6A, 42, F8, 10, FF, FF RF_CLIF_CFG_BR_106_T_TXA_A CLIF_ANA_TX_AMPLITUDE_REG
183 | # A0, 0D, 03, 6A, 16, 00 RF_CLIF_CFG_BR_106_T_TXA_A CLIF_TX_UNDERSHOOT_CONFIG_REG
184 | # A0, 0D, 03, 6A, 15, 01 RF_CLIF_CFG_BR_106_T_TXA_A CLIF_TX_OVERSHOOT_CONFIG_REG
185 | # A0, 0D, 06, 6A, 4A, 30, 0F, 01, 1F RF_CLIF_CFG_BR_106_T_TXA_A CLIF_ANA_TX_SHAPE_CONTROL_REG
186 | # A0, 0D, 06, 8C, 42, 88, 10, FF, FF RF_CLIF_CFG_BR_212_T_TXF_A CLIF_ANA_TX_AMPLITUDE_REG
187 | # A0, 0D, 06, 8C, 4A, 33, 07, 01, 07 RF_CLIF_CFG_BR_212_T_TXF_A CLIF_ANA_TX_SHAPE_CONTROL_REG
188 | # A0, 0D, 03, 8C, 16, 00 RF_CLIF_CFG_BR_212_T_TXF_A CLIF_TX_UNDERSHOOT_CONFIG_REG
189 | # A0, 0D, 03, 8C, 15, 00 RF_CLIF_CFG_BR_212_T_TXF_A CLIF_TX_OVERSHOOT_CONFIG_REG
190 | # A0, 0D, 06, 92, 42, 90, 10, FF, FF RF_CLIF_CFG_BR_424_T_TXF_A CLIF_ANA_TX_AMPLITUDE_REG
191 | # A0, 0D, 06, 92, 4A, 31, 07, 01, 07 RF_CLIF_CFG_BR_424_T_TXF_A CLIF_ANA_TX_SHAPE_CONTROL_REG
192 | # A0, 0D, 03, 92, 16, 00 RF_CLIF_CFG_BR_424_T_TXF_A CLIF_TX_UNDERSHOOT_CONFIG_REG
193 | # A0, 0D, 03, 92, 15, 00 RF_CLIF_CFG_BR_424_T_TXF_A CLIF_TX_OVERSHOOT_CONFIG_REG
194 | # A0, 0D, 06, 0A, 30, CF, 00, 08, 00 RF_CLIF_CFG_I_ACTIVE CLIF_SIGPRO_ADCBCM_THRESHOLD_REG
195 | # A0, 0D, 06, 0A, 2F, 8F, 05, 80, 0C RF_CLIF_CFG_I_ACTIVE CLIF_SIGPRO_ADCBCM_CONFIG_REG
196 | # A0, 0D, 03, 0A, 48, 10 RF_CLIF_CFG_I_ACTIVE CLIF_ANA_CLK_MAN_REG
197 | # A0, 0D, 06, 0A, 44, A3, 90, 03, 00 RF_CLIF_CFG_I_ACTIVE CLIF_ANA_RX_REG
198 |
199 | # *** ALM(NO BOOSTER) FW VERSION = 08.01.18 ***
200 | NXP_RF_CONF_BLK_1={
201 | 20, 02, F3, 20,
202 | A0, 0D, 03, 00, 40, 02,
203 | A0, 0D, 03, 04, 43, 20,
204 | A0, 0D, 03, 04, FF, 05,
205 | A0, 0D, 06, 06, 44, A3, 90, 03, 00,
206 | A0, 0D, 06, 06, 30, CF, 00, 08, 00,
207 | A0, 0D, 06, 06, 2F, 8F, 05, 80, 0C,
208 | A0, 0D, 04, 06, 03, 00, 6E,
209 | A0, 0D, 03, 06, 48, 1A,
210 | A0, 0D, 03, 06, 43, A0,
211 | A0, 0D, 06, 06, 42, 00, 00, F6, F6,
212 | A0, 0D, 06, 06, 41, 80, 00, 00, 00,
213 | A0, 0D, 03, 06, 37, 18,
214 | A0, 0D, 03, 06, 16, 00,
215 | A0, 0D, 03, 06, 15, 00,
216 | A0, 0D, 06, 06, FF, 05, 00, 00, 00,
217 | A0, 0D, 06, 08, 44, 00, 00, 00, 00,
218 | A0, 0D, 06, 20, 4A, 00, 00, 00, 00,
219 | A0, 0D, 06, 20, 42, 88, 10, FF, FF,
220 | A0, 0D, 03, 20, 16, 00,
221 | A0, 0D, 03, 20, 15, 00,
222 | A0, 0D, 06, 22, 44, 22, 00, 02, 00,
223 | A0, 0D, 06, 22, 2D, 50, 44, 0C, 00,
224 | A0, 0D, 04, 32, 03, 40, 3D,
225 | A0, 0D, 06, 32, 42, F8, 10, FF, FF,
226 | A0, 0D, 03, 32, 16, 00,
227 | A0, 0D, 03, 32, 15, 01,
228 | A0, 0D, 03, 32, 0D, 22,
229 | A0, 0D, 03, 32, 14, 22,
230 | A0, 0D, 06, 32, 4A, 30, 0F, 01, 1F,
231 | A0, 0D, 06, 34, 2D, 24, 77, 0C, 00,
232 | A0, 0D, 06, 34, 44, 21, 00, 02, 00,
233 | A0, 0D, 06, 35, 44, 21, 00, 02, 00
234 | }
235 | # *** ALM(NO BOOSTER) FW VERSION = 08.01.18 ***
236 | NXP_RF_CONF_BLK_2={
237 | 20, 02, F4, 1F,
238 | A0, 0D, 06, 38, 4A, 53, 07, 01, 1B,
239 | A0, 0D, 06, 38, 42, 68, 10, FF, FF,
240 | A0, 0D, 03, 38, 16, 00,
241 | A0, 0D, 03, 38, 15, 00,
242 | A0, 0D, 06, 3A, 2D, 15, 47, 0D, 00,
243 | A0, 0D, 06, 3C, 4A, 52, 07, 01, 1B,
244 | A0, 0D, 06, 3C, 42, 68, 10, FF, FF,
245 | A0, 0D, 03, 3C, 16, 00,
246 | A0, 0D, 03, 3C, 15, 00,
247 | A0, 0D, 06, 3E, 2D, 15, 47, 0D, 00,
248 | A0, 0D, 06, 40, 42, F0, 10, FF, FF,
249 | A0, 0D, 03, 40, 0D, 02,
250 | A0, 0D, 03, 40, 14, 02,
251 | A0, 0D, 06, 40, 4A, 12, 07, 00, 00,
252 | A0, 0D, 03, 40, 16, 00,
253 | A0, 0D, 03, 40, 15, 00,
254 | A0, 0D, 06, 42, 2D, 15, 47, 0D, 00,
255 | A0, 0D, 06, 46, 44, 21, 00, 02, 00,
256 | A0, 0D, 06, 46, 2D, 05, 47, 0E, 00,
257 | A0, 0D, 06, 44, 4A, 33, 07, 01, 07,
258 | A0, 0D, 06, 44, 42, 88, 10, FF, FF,
259 | A0, 0D, 03, 44, 16, 00,
260 | A0, 0D, 03, 44, 15, 00,
261 | A0, 0D, 06, 4A, 44, 22, 00, 02, 00,
262 | A0, 0D, 06, 4A, 2D, 05, 37, 0C, 00,
263 | A0, 0D, 06, 48, 4A, 33, 07, 01, 07,
264 | A0, 0D, 06, 48, 42, 88, 10, FF, FF,
265 | A0, 0D, 03, 48, 16, 00,
266 | A0, 0D, 03, 48, 15, 00,
267 | A0, 0D, 06, 4E, 44, 22, 00, 02, 00,
268 | A0, 0D, 06, 4E, 2D, 05, 37, 0C, 00
269 | }
270 | # *** ALM(NO BOOSTER) FW VERSION = 08.01.18 ***
271 | NXP_RF_CONF_BLK_3={
272 | 20, 02, F7, 1E,
273 | A0, 0D, 06, 4C, 4A, 33, 07, 01, 07,
274 | A0, 0D, 06, 4C, 42, 88, 10, FF, FF,
275 | A0, 0D, 03, 4C, 16, 00,
276 | A0, 0D, 03, 4C, 15, 00,
277 | A0, 0D, 06, 52, 44, 22, 00, 02, 00,
278 | A0, 0D, 06, 52, 2D, 05, 25, 0C, 00,
279 | A0, 0D, 06, 50, 42, 90, 10, FF, FF,
280 | A0, 0D, 06, 50, 4A, 11, 0F, 01, 07,
281 | A0, 0D, 03, 50, 16, 00,
282 | A0, 0D, 03, 50, 15, 00,
283 | A0, 0D, 06, 56, 2D, 05, 9E, 0C, 00,
284 | A0, 0D, 06, 56, 44, 22, 00, 02, 00,
285 | A0, 0D, 06, 5C, 2D, 05, 69, 0C, 00,
286 | A0, 0D, 06, 5C, 44, 21, 00, 02, 00,
287 | A0, 0D, 06, 54, 42, 88, 10, FF, FF,
288 | A0, 0D, 06, 54, 4A, 33, 07, 01, 07,
289 | A0, 0D, 03, 54, 16, 00,
290 | A0, 0D, 03, 54, 15, 00,
291 | A0, 0D, 06, 5A, 42, 90, 10, FF, FF,
292 | A0, 0D, 06, 5A, 4A, 31, 07, 01, 07,
293 | A0, 0D, 03, 5A, 16, 00,
294 | A0, 0D, 03, 5A, 15, 00,
295 | A0, 0D, 06, 98, 2F, AF, 05, 80, 0F,
296 | A0, 0D, 06, 9A, 42, 00, 00, FF, FF,
297 | A0, 0D, 06, 30, 44, A3, 90, 03, 00,
298 | A0, 0D, 06, 6C, 44, A3, 90, 03, 00,
299 | A0, 0D, 06, 6C, 30, CF, 00, 08, 00,
300 | A0, 0D, 06, 6C, 2F, 8F, 05, 80, 0C,
301 | A0, 0D, 06, 70, 2F, 8F, 05, 80, 12,
302 | A0, 0D, 06, 70, 30, CF, 00, 08, 00
303 | }
304 | # *** ALM(NO BOOSTER) FW VERSION = 08.01.18 ***
305 | NXP_RF_CONF_BLK_4={
306 | 20, 02, F7, 1E,
307 | A0, 0D, 06, 74, 2F, 8F, 05, 80, 12,
308 | A0, 0D, 06, 74, 30, DF, 00, 07, 00,
309 | A0, 0D, 06, 78, 2F, 1F, 06, 80, 01,
310 | A0, 0D, 06, 78, 30, 3F, 00, 04, 00,
311 | A0, 0D, 06, 78, 44, A2, 90, 03, 00,
312 | A0, 0D, 03, 78, 47, 00,
313 | A0, 0D, 06, 7C, 2F, AF, 05, 80, 0F,
314 | A0, 0D, 06, 7C, 30, CF, 00, 07, 00,
315 | A0, 0D, 06, 7C, 44, A3, 90, 03, 00,
316 | A0, 0D, 06, 7D, 30, CF, 00, 08, 00,
317 | A0, 0D, 06, 80, 2F, AF, 05, 80, 90,
318 | A0, 0D, 06, 80, 44, A3, 90, 03, 00,
319 | A0, 0D, 06, 84, 2F, AF, 05, 80, 92,
320 | A0, 0D, 06, 84, 44, A3, 90, 03, 00,
321 | A0, 0D, 06, 88, 2F, 7F, 04, 80, 10,
322 | A0, 0D, 06, 88, 30, 5F, 00, 16, 00,
323 | A0, 0D, 03, 88, 47, 00,
324 | A0, 0D, 06, 88, 44, A1, 90, 03, 00,
325 | A0, 0D, 03, 0C, 48, 1A,
326 | A0, 0D, 03, 10, 43, 20,
327 | A0, 0D, 06, 6A, 42, F8, 10, FF, FF,
328 | A0, 0D, 03, 6A, 16, 00,
329 | A0, 0D, 03, 6A, 15, 01,
330 | A0, 0D, 06, 6A, 4A, 30, 0F, 01, 1F,
331 | A0, 0D, 06, 8C, 42, 88, 10, FF, FF,
332 | A0, 0D, 06, 8C, 4A, 33, 07, 01, 07,
333 | A0, 0D, 03, 8C, 16, 00,
334 | A0, 0D, 03, 8C, 15, 00,
335 | A0, 0D, 06, 92, 42, 90, 10, FF, FF,
336 | A0, 0D, 06, 92, 4A, 31, 07, 01, 07
337 | }
338 |
339 | ###############################################################################
340 | # Core configuration extensions
341 | # It includes
342 | # A002 - Clock Request
343 | # 0x00 - Disabled
344 | # 0x01 - Enabled
345 | # A003 - Clock Selection
346 | # Please refer to User Manual
347 | # A004 - Clock Time Out
348 | # Defined in ms
349 | # A00E - Load Modulation Mode
350 | # 0x00 - PLM
351 | # 0x01 - ALM
352 | # A011 - Clock specific configuration
353 | # Please refer to User Manual
354 | # A012 - NFCEE interface 2 configuration
355 | # 0x00 - SWP 2 interface is used
356 | # 0x02 - DWP interface is used
357 | # A013 - TVdd configuration
358 | # 0x00 - TVdd is set to 3.1V in Poll mode
359 | # 0x02 - TVdd is set to 2.7V in Poll mode
360 | # A040-A043 - Low Power Card Detector
361 | # Please refer to Application Note of LPCD
362 | # A05E - Jewel Reader
363 | # 0x00 - RID is not sent during activation
364 | # 0x01 - RID is sent during activation
365 | # A061 - Retry after LPCD
366 | # 0b0000XXXX - Number of retry if activation failed
367 | # 0bXXXX0000 - Duration to wait before retry (10ms per step)
368 | # Please refer to User Manual
369 | # A0CD - SWP interface 1: S1 line behavior
370 | # Defined S1 High time-out during Activation sequence
371 | # A0EC - SWP1 interface
372 | # 0x00 - Disabled
373 | # 0x01 - Enabled
374 | # A0ED - SWP2 interface
375 | # 0x00 - Disabled
376 | # 0x01 - Enabled
377 | NXP_CORE_CONF_EXTN={20, 02, 52, 13,
378 | A0, 02, 01, 01,
379 | A0, 03, 01, 11,
380 | A0, 04, 01, 0A,
381 | A0, 07, 01, 03,
382 | A0, 09, 02, E8, 03,
383 | A0, 0E, 01, 01,
384 | A0, 11, 04, CD, 67, 22, 01,
385 | A0, 12, 01, 02,
386 | A0, 13, 01, 00,
387 | A0, 40, 01, 01,
388 | A0, 41, 01, 02,
389 | A0, 42, 01, 19,
390 | A0, 43, 01, 00,
391 | A0, 47, 02, BA, 27,
392 | A0, 5E, 01, 01,
393 | A0, 61, 01, 00,
394 | A0, CD, 01, 0F,
395 | A0, EC, 01, 01,
396 | A0, ED, 01, 01
397 | }
398 |
399 | ###############################################################################
400 | # Core configuration settings
401 | # It includes
402 | # 18 - Poll Mode NFC-F: PF_BIT_RATE
403 | # 21 - Poll Mode ISO-DEP: PI_BIT_RATE
404 | # 28 - Poll Mode NFC-DEP: PN_NFC_DEP_SPEED
405 | # 30 - Lis. Mode NFC-A: LA_BIT_FRAME_SDD
406 | # 31 - Lis. Mode NFC-A: LA_PLATFORM_CONFIG
407 | # 33 - Lis. Mode NFC-A: LA_SEL_INFO
408 | # 50 - Lis. Mode NFC-F: LF_PROTOCOL_TYPE
409 | # 54 - Lis. Mode NFC-F: LF_CON_BITR_F
410 | # 5B - Lis. Mode ISO-DEP: LI_BIT_RATE
411 | # 60 - Lis. Mode NFC-DEP: LN_WT
412 | # 80 - Other Param.: RF_FIELD_INFO
413 | # 81 - Other Param.: RF_NFCEE_ACTION
414 | # 82 - Other Param.: NFCDEP_OP
415 | NXP_CORE_CONF={ 20, 02, 2B, 0D,
416 | 18, 01, 01,
417 | 21, 01, 00,
418 | 28, 01, 00,
419 | 30, 01, 08,
420 | 31, 01, 03,
421 | 33, 04, 01, 02, 03, 04,
422 | 50, 01, 02,
423 | 54, 01, 06,
424 | 5B, 01, 02,
425 | 60, 01, 0E,
426 | 80, 01, 01,
427 | 81, 01, 01,
428 | 82, 01, 0E
429 | }
430 |
431 | ###############################################################################
432 | # Mifare Classic Key settings
433 | #NXP_CORE_MFCKEY_SETTING={20, 02, 25,04, A0, 51, 06, A0, A1, A2, A3, A4, A5,
434 | # A0, 52, 06, D3, F7, D3, F7, D3, F7,
435 | # A0, 53, 06, FF, FF, FF, FF, FF, FF,
436 | # A0, 54, 06, 00, 00, 00, 00, 00, 00}
437 |
438 | ###############################################################################
439 | # Default SE Options
440 | # No secure element 0x00
441 | # eSE 0x01
442 | # UICC 0x02
443 | # MULTI_SE 0x03
444 | NXP_DEFAULT_SE=0x01
445 |
446 | ###############################################################################
447 | NXP_DEFAULT_NFCEE_TIMEOUT=0x06
448 |
449 | ###############################################################################
450 | #Enable SWP full power mode when phone is power off
451 | NXP_SWP_FULL_PWR_ON=0x00
452 |
453 | ###############################################################################
454 | #Chip type
455 | #PN547C2 0x01
456 | #PN65T 0x02
457 | NXP_NFC_CHIP=0x02
458 |
459 | ###############################################################################
460 | #SWP Reader feature
461 | #Timeout in seconds
462 | NXP_SWP_RD_START_TIMEOUT=0x0A
463 | #Timeout in seconds
464 | NXP_SWP_RD_TAG_OP_TIMEOUT=0x01
465 |
466 |
--------------------------------------------------------------------------------
/device-proprietary-files.txt:
--------------------------------------------------------------------------------
1 | # Camera
2 | lib/hw/camera.vendor.bacon.so
3 | vendor/lib/libchromatix_imx214_common.so
4 | vendor/lib/libchromatix_imx214_default_video.so
5 | vendor/lib/libchromatix_imx214_hfr_120.so
6 | vendor/lib/libchromatix_imx214_hfr_60.so
7 | vendor/lib/libchromatix_imx214_liveshot.so
8 | vendor/lib/libchromatix_imx214_preview.so
9 | vendor/lib/libchromatix_imx214_preview_binning.so
10 | vendor/lib/libchromatix_imx214_snapshot.so
11 | vendor/lib/libchromatix_imx214_snapshot_hdr.so
12 | vendor/lib/libchromatix_imx214_video_binning.so
13 | vendor/lib/libchromatix_imx214_video_cmcc.so
14 | vendor/lib/libchromatix_imx214_video_hdr.so
15 | vendor/lib/libchromatix_ov5648_common.so
16 | vendor/lib/libchromatix_ov5648_default_video.so
17 | vendor/lib/libchromatix_ov5648_preview.so
18 | vendor/lib/libchromatix_ov5648_preview_fb.so
19 | vendor/lib/libchromatix_ov5648_video_cmcc.so
20 | vendor/lib/libchromatix_ov5648_zsl.so
21 | vendor/lib/libchromatix_ov5648_zsl_fb.so
22 |
23 | # NFC
24 | etc/firmware/libpn547_fw.so:vendor/firmware/libpn547_fw.so
25 |
--------------------------------------------------------------------------------
/extract-files.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | #Use Traditional sorting
4 | export LC_ALL=C
5 |
6 | FP=$(cd ${0%/*} && pwd -P)
7 | export VENDOR=$(basename $(dirname $FP))
8 | export DEVICE=$(basename $FP)
9 | ./../../oppo/msm8974-common/extract-files.sh $@
10 |
--------------------------------------------------------------------------------
/init/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 |
5 | LOCAL_MODULE_TAGS := optional
6 | LOCAL_C_INCLUDES := system/core/init
7 | LOCAL_CFLAGS := -Wall
8 | LOCAL_SRC_FILES := init_bacon.c
9 | LOCAL_MODULE := libinit_bacon
10 | include $(BUILD_STATIC_LIBRARY)
11 |
--------------------------------------------------------------------------------
/init/init_bacon.c:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2014, The CyanogenMod Project
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are
6 | met:
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following
11 | disclaimer in the documentation and/or other materials provided
12 | with the distribution.
13 | * Neither the name of The Linux Foundation nor the names of its
14 | contributors may be used to endorse or promote products derived
15 | from this software without specific prior written permission.
16 |
17 | THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
18 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
20 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
21 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
24 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
27 | IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | #include
31 |
32 | #include "vendor_init.h"
33 | #include "property_service.h"
34 | #include "log.h"
35 | #include "util.h"
36 |
37 | static void import_kernel_nv(char *name, int for_emulator)
38 | {
39 | char *value = strchr(name, '=');
40 | int name_len = strlen(name);
41 |
42 | if (value == 0) return;
43 | *value++ = 0;
44 | if (name_len == 0) return;
45 |
46 | if (!strcmp(name,"oppo.rf_version")) {
47 | property_set("ro.oppo.rf_version", value);
48 | }
49 | else if (!strcmp(name,"oppo.pcb_version")) {
50 | property_set("ro.oppo.pcb_version", value);
51 | }
52 | }
53 |
54 | void vendor_load_properties()
55 | {
56 | import_kernel_cmdline(0, import_kernel_nv);
57 | }
58 |
59 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/core/res/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
32 |
33 | - 2
34 | - 7
35 | - 15
36 | - 50
37 | - 100
38 | - 200
39 | - 400
40 | - 1000
41 | - 2000
42 | - 3000
43 | - 5000
44 | - 10000
45 | - 30000
46 |
47 |
48 |
52 |
53 | - 13
54 | - 25
55 | - 32
56 | - 41
57 | - 52
58 | - 62
59 | - 69
60 | - 78
61 | - 88
62 | - 134
63 | - 178
64 | - 225
65 | - 255
66 | - 255
67 |
68 |
69 |
71 | 2
72 |
73 |
75 | 255
76 |
77 |
79 | 102
80 |
81 |
84 | 10
85 |
86 |
89 | true
90 |
91 |
92 | #ffffffff
93 |
94 |
96 | true
97 |
98 |
100 | true
101 |
102 |
110 |
118 |
119 |
121 | 4dp
122 |
123 |
124 |
125 | - 0
126 | - 25
127 | - 10
128 |
129 |
130 |
131 |
132 | - 0
133 | - 25
134 | - 8
135 |
136 |
137 |
138 |
139 | - 25
140 |
141 |
142 |
143 | com.android.systemui/com.android.systemui.doze.DozeService
144 | 5
145 | true
146 | true
147 |
148 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/core/res/res/xml/power_profile.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 | - 0
23 | - 71.55
24 | - 211.6
25 | - 59.22
26 | - 0.7
27 | - 3.30
28 | - 62.09
29 | - 52.1
30 | - 0.1
31 | - 0.1
32 | - 20.9
33 |
34 | - 185.6
35 | - 122.68
36 |
37 |
38 | 1.16
39 | 2.15
40 |
41 |
43 |
44 | 384000
45 | 486000
46 | 594000
47 | 702000
48 | 810000
49 | 918000
50 | 1026000
51 | 1134000
52 | 1242000
53 | 1350000
54 | 1458000
55 | 1512000
56 |
57 |
58 | - 3.5
59 | - 10.43
60 |
61 |
62 | 92.6
63 | 108.6
64 | 118.8
65 | 121.4
66 | 127.3
67 | 133.1
68 | 173.3
69 | 209.5
70 | 216.5
71 | 228.5
72 | 236.0
73 | 239.7
74 |
75 |
76 | - 3100
77 |
78 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/core/res/res/xml/storage_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/packages/SystemUI/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 | true
23 | true
24 |
25 |
--------------------------------------------------------------------------------
/overlay/packages/apps/Settings/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
19 |
20 | true
21 |
22 | 0.270
23 |
24 | 0.540
25 |
26 |
27 |
28 | true
29 |
30 | ONE A0001
31 | 12739A-A0001
32 |
33 |
34 |
35 | true
36 |
37 |
--------------------------------------------------------------------------------
/overlay/packages/services/Telephony/res/values-mcc460/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 | true
19 |
20 |
--------------------------------------------------------------------------------
/overlay/packages/services/Telephony/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 | true
19 |
20 |
--------------------------------------------------------------------------------
/recovery/root/etc/twrp.fstab:
--------------------------------------------------------------------------------
1 | # mount point fstype device [device2]
2 |
3 | #/firmware vfat /dev/block/mmcblk0p1 flags=mounttodecrypt
4 | /sbl1 emmc /dev/block/mmcblk0p2
5 | #OPPO 2014-02-18 hewei delete for without sbl2 and sbl3
6 | #/sbl2 emmc /dev/block/platform/msm_sdcc.1/by-name/sbl2
7 | #/sbl3 emmc /dev/block/platform/msm_sdcc.1/by-name/sbl3
8 | /rpm emmc /dev/block/mmcblk0p6
9 | /tz emmc /dev/block/mmcblk0p8
10 | /modem_st1 emmc /dev/block/mmcblk0p10
11 | /modem_st2 emmc /dev/block/mmcblk0p11
12 | /static_nv_bk emmc /dev/block/mmcblk0p13
13 | /oppodycnvbk emmc /dev/block/mmcblk0p12
14 | /aboot emmc /dev/block/mmcblk0p5
15 | /boot emmc /dev/block/mmcblk0p7
16 | /system ext4 /dev/block/mmcblk0p14
17 | /data ext4 /dev/block/mmcblk0p28 flags=encryptable=/dev/block/mmcblk0p27
18 | /cache ext4 /dev/block/mmcblk0p16
19 | /misc emmc /dev/block/mmcblk0p21
20 | /recovery emmc /dev/block/mmcblk0p17
21 | #OPPO 2014-01-14 hewei Add for logo volume and reserve4 volume
22 | /logo emmc /dev/block/mmcblk0p22
23 | /reserve4 emmc /dev/block/mmcblk0p27
24 |
25 | #OPPO 2014-01-26 hewei modify for 13077 mount T-card and sdcard
26 | #/external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1
27 | /usb_otg vfat /dev/block/sda1 /dev/block/sda flags=display="USB-OTG";storage;wipeingui;removable
28 |
--------------------------------------------------------------------------------
/recovery/root/init.recovery.bacon.rc:
--------------------------------------------------------------------------------
1 | on load_all_props_action
2 | load_all_props
3 |
4 | on firmware_mounts_complete
5 | rm /dev/.booting
6 |
7 | on fs
8 | mount_all ./fstab.bacon
9 |
10 | on late-init
11 | #export LD_PRELOAD libsigchain.so
12 | trigger fs
13 | trigger load_all_props_action
14 |
15 | # Remove a file to wake up anything waiting for firmware.
16 | trigger firmware_mounts_complete
17 |
18 | trigger early-boot
19 | trigger boot
20 |
21 | on boot
22 | # Enable Power modes and set the CPU Freq Sampling rates
23 | write /sys/module/lpm_levels/enable_low_power/l2 4
24 | write /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled 1
25 | write /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled 1
26 | write /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled 1
27 | write /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled 1
28 | write /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled 1
29 | write /sys/module/msm_thermal/core_control/enabled 0
30 | write /sys/devices/system/cpu/cpu1/online 1
31 | write /sys/devices/system/cpu/cpu2/online 1
32 | write /sys/devices/system/cpu/cpu3/online 1
33 | write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "ondemand"
34 | write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "ondemand"
35 | write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "ondemand"
36 | write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "ondemand"
37 | write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 300000
38 | write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 300000
39 | write /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq 300000
40 | write /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq 300000
41 | write /sys/module/msm_thermal/core_control/enabled 1
42 | setprop recovery.perf.mode 0
43 |
44 | service qseecomd /sbin/qseecomd
45 |
46 | on property:recovery.perf.mode=1
47 | write /sys/devices/system/cpu/cpu1/online 1
48 | write /sys/devices/system/cpu/cpu2/online 1
49 | write /sys/devices/system/cpu/cpu3/online 1
50 |
51 | on property:recovery.perf.mode=0
52 | write /sys/devices/system/cpu/cpu1/online 0
53 | write /sys/devices/system/cpu/cpu2/online 0
54 | write /sys/devices/system/cpu/cpu3/online 0
55 |
56 |
--------------------------------------------------------------------------------
/recovery/root/sbin/libQSEEComAPI.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamWin/android_device_oneplus_bacon/fec7b8148e24db17cf6fa606c909d91731eb9f39/recovery/root/sbin/libQSEEComAPI.so
--------------------------------------------------------------------------------
/recovery/root/sbin/libdiag.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamWin/android_device_oneplus_bacon/fec7b8148e24db17cf6fa606c909d91731eb9f39/recovery/root/sbin/libdiag.so
--------------------------------------------------------------------------------
/recovery/root/sbin/libdrmfs.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamWin/android_device_oneplus_bacon/fec7b8148e24db17cf6fa606c909d91731eb9f39/recovery/root/sbin/libdrmfs.so
--------------------------------------------------------------------------------
/recovery/root/sbin/libdrmtime.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamWin/android_device_oneplus_bacon/fec7b8148e24db17cf6fa606c909d91731eb9f39/recovery/root/sbin/libdrmtime.so
--------------------------------------------------------------------------------
/recovery/root/sbin/librpmb.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamWin/android_device_oneplus_bacon/fec7b8148e24db17cf6fa606c909d91731eb9f39/recovery/root/sbin/librpmb.so
--------------------------------------------------------------------------------
/recovery/root/sbin/libssd.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamWin/android_device_oneplus_bacon/fec7b8148e24db17cf6fa606c909d91731eb9f39/recovery/root/sbin/libssd.so
--------------------------------------------------------------------------------
/recovery/root/sbin/qseecomd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamWin/android_device_oneplus_bacon/fec7b8148e24db17cf6fa606c909d91731eb9f39/recovery/root/sbin/qseecomd
--------------------------------------------------------------------------------
/recovery/root/vendor/lib/hw/keystore.msm8974.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TeamWin/android_device_oneplus_bacon/fec7b8148e24db17cf6fa606c909d91731eb9f39/recovery/root/vendor/lib/hw/keystore.msm8974.so
--------------------------------------------------------------------------------
/rootdir/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH:= $(call my-dir)
2 | include $(CLEAR_VARS)
3 |
4 | # Device init files
5 |
6 | include $(CLEAR_VARS)
7 | LOCAL_MODULE := fstab.bacon
8 | LOCAL_MODULE_TAGS := optional eng
9 | LOCAL_MODULE_CLASS := ETC
10 | LOCAL_SRC_FILES := etc/fstab.bacon
11 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
12 | include $(BUILD_PREBUILT)
13 |
14 | include $(CLEAR_VARS)
15 | LOCAL_MODULE := init.bacon.rc
16 | LOCAL_MODULE_TAGS := optional eng
17 | LOCAL_MODULE_CLASS := ETC
18 | LOCAL_SRC_FILES := etc/init.bacon.rc
19 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
20 | include $(BUILD_PREBUILT)
21 |
22 | include $(CLEAR_VARS)
23 | LOCAL_MODULE := init.qcom.usb.rc
24 | LOCAL_MODULE_TAGS := optional eng
25 | LOCAL_MODULE_CLASS := ETC
26 | LOCAL_SRC_FILES := etc/init.qcom.usb.rc
27 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
28 | include $(BUILD_PREBUILT)
29 |
30 | include $(CLEAR_VARS)
31 | LOCAL_MODULE := ueventd.bacon.rc
32 | LOCAL_MODULE_TAGS := optional eng
33 | LOCAL_MODULE_CLASS := ETC
34 | LOCAL_SRC_FILES := ../../../oppo/msm8974-common/rootdir/etc/ueventd.qcom.rc
35 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
36 | include $(BUILD_PREBUILT)
37 |
38 |
--------------------------------------------------------------------------------
/rootdir/etc/fstab.bacon:
--------------------------------------------------------------------------------
1 | # Android fstab file.
2 | #
3 | # The filesystem that contains the filesystem checker binary (typically /system) cannot
4 | # specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
5 |
6 | #/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
7 | /dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,errors=panic wait,check,encryptable=/dev/block/platform/msm_sdcc.1/by-name/reserve4
8 | /dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,errors=panic wait,check
9 | /dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,data=ordered,nodelalloc,nomblk_io_submit,errors=panic wait,check
10 | /dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults
11 | /dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults
12 | /dev/block/platform/msm_sdcc.1/by-name/misc /misc emmc defaults defaults
13 | /dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait
14 |
15 | /devices/platform/xhci-hcd* auto auto defaults voldmanaged=usbdisk:auto
16 |
--------------------------------------------------------------------------------
/rootdir/etc/init.bacon.rc:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2014 The CyanogenMod Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | import /init.qcom-common.rc
18 |
19 | on fs
20 | mount_all ./fstab.bacon
21 | restorecon_recursive /persist
22 | setprop ro.crypto.fuse_sdcard true
23 |
24 | on init
25 | # See storage config details at http://source.android.com/tech/storage/
26 | chmod 0701 /mnt/media_rw
27 | mkdir /mnt/shell/emulated 0700 shell shell
28 | mkdir /storage/emulated 0555 root root
29 | mkdir /mnt/media_rw/usbdisk 0700 media_rw media_rw
30 | mkdir /storage/usbdisk 0700 root root
31 |
32 | export EXTERNAL_STORAGE /storage/emulated/legacy
33 | export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
34 | export EMULATED_STORAGE_TARGET /storage/emulated
35 | export SECONDARY_STORAGE /storage/usbdisk
36 |
37 | # Support legacy paths
38 | symlink /storage/emulated/legacy /sdcard
39 | symlink /storage/emulated/legacy /mnt/sdcard
40 | symlink /storage/emulated/legacy /storage/sdcard0
41 | symlink /mnt/shell/emulated/0 /storage/emulated/legacy
42 |
43 | on post-fs
44 | export_rc /system/etc/init.cne.rc
45 |
46 | on post-fs-data
47 | # Torch
48 | chown system camera /sys/class/leds/torch-light/brightness
49 | chmod 0660 /sys/class/leds/torch-light/brightness
50 |
51 | # virtual sdcard daemon running as media_rw (1023)
52 | service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
53 | class late_start
54 |
55 | service fuse_usbdisk /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/usbdisk /storage/usbdisk
56 | class late_start
57 | disabled
58 |
59 |
--------------------------------------------------------------------------------
/rootdir/etc/init.qcom.usb.rc:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
2 | #
3 | # Redistribution and use in source and binary forms, with or without
4 | # modification, are permitted provided that the following conditions are met:
5 | # * Redistributions of source code must retain the above copyright
6 | # notice, this list of conditions and the following disclaimer.
7 | # * Redistributions in binary form must reproduce the above copyright
8 | # notice, this list of conditions and the following disclaimer in the
9 | # documentation and/or other materials provided with the distribution.
10 | # * Neither the name of Code Aurora nor
11 | # the names of its contributors may be used to endorse or promote
12 | # products derived from this software without specific prior written
13 | # permission.
14 | #
15 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 | # IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | # NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
19 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22 | # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24 | # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25 | # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 | #
27 |
28 | on boot
29 | write /sys/class/android_usb/android0/iSerial ${ro.serialno}
30 | write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
31 | write /sys/class/android_usb/android0/iProduct ${ro.product.model}
32 | write /sys/class/android_usb/android0/f_rndis/manufacturer ${ro.product.manufacturer}
33 | write /sys/class/android_usb/android0/f_rndis/vendorID 22D9
34 | write /sys/class/android_usb/android0/f_rndis/wceis 1
35 |
36 | on property:sys.usb.config=charging
37 | stop adbd
38 | write /sys/class/android_usb/android0/enable 0
39 | write /sys/class/android_usb/android0/idVendor 05C6
40 | write /sys/class/android_usb/android0/idProduct 6768
41 | write /sys/class/android_usb/android0/functions charging
42 | write /sys/class/android_usb/android0/enable 1
43 | setprop sys.usb.state ${sys.usb.config}
44 |
45 | on property:sys.usb.config=mtp
46 | stop adbd
47 | write /sys/class/android_usb/android0/enable 0
48 | write /sys/class/android_usb/android0/idVendor 05C6
49 | write /sys/class/android_usb/android0/idProduct 6764
50 | write /sys/class/android_usb/android0/functions mtp
51 | write /sys/class/android_usb/android0/enable 1
52 | setprop sys.usb.state ${sys.usb.config}
53 |
54 | on property:sys.usb.config=mtp,adb
55 | stop adbd
56 | write /sys/class/android_usb/android0/enable 0
57 | write /sys/class/android_usb/android0/idVendor 05C6
58 | write /sys/class/android_usb/android0/idProduct 6765
59 | write /sys/class/android_usb/android0/functions mtp,adb
60 | write /sys/class/android_usb/android0/enable 1
61 | start adbd
62 | setprop sys.usb.state ${sys.usb.config}
63 |
64 | on property:sys.usb.config=rndis,adb
65 | stop adbd
66 | write /sys/class/android_usb/android0/enable 0
67 | write /sys/class/android_usb/android0/idVendor 05C6
68 | write /sys/class/android_usb/android0/idProduct 6766
69 | write /sys/class/android_usb/android0/functions rndis,adb
70 | write /sys/class/android_usb/android0/enable 1
71 | start adbd
72 | setprop sys.usb.state ${sys.usb.config}
73 |
74 | on property:sys.usb.config=mass_storage,adb
75 | stop adbd
76 | write /sys/class/android_usb/android0/enable 0
77 | write /sys/class/android_usb/android0/idVendor 05C6
78 | write /sys/class/android_usb/android0/idProduct 6767
79 | write /sys/class/android_usb/android0/functions adb,mass_storage
80 | write /sys/class/android_usb/android0/enable 1
81 | start adbd
82 | setprop sys.usb.state ${sys.usb.config}
83 |
84 | on property:sys.usb.config=mass_storage
85 | stop adbd
86 | write /sys/class/android_usb/android0/enable 0
87 | write /sys/class/android_usb/android0/idVendor 05C6
88 | write /sys/class/android_usb/android0/idProduct 6768
89 | write /sys/class/android_usb/android0/functions mass_storage
90 | write /sys/class/android_usb/android0/enable 1
91 | setprop sys.usb.state ${sys.usb.config}
92 |
93 | on property:sys.usb.config=adb
94 | write /sys/class/android_usb/android0/enable 0
95 | write /sys/class/android_usb/android0/idVendor 05C6
96 | write /sys/class/android_usb/android0/idProduct 6769
97 | write /sys/class/android_usb/android0/functions adb
98 | write /sys/class/android_usb/android0/enable 1
99 | start adbd
100 | setprop sys.usb.state ${sys.usb.config}
101 |
102 | on property:sys.usb.config=rndis
103 | write /sys/class/android_usb/android0/enable 0
104 | write /sys/class/android_usb/android0/idVendor 05C6
105 | write /sys/class/android_usb/android0/idProduct 676A
106 | write /sys/class/android_usb/android0/functions rndis
107 | write /sys/class/android_usb/android0/enable 1
108 | setprop sys.usb.state ${sys.usb.config}
109 |
110 | on property:sys.usb.config=diag,adb
111 | stop adbd
112 | write /sys/class/android_usb/android0/enable 0
113 | write /sys/class/android_usb/android0/iSerial 0123456789ABCDEF
114 | write /sys/class/android_usb/android0/idVendor 05C6
115 | write /sys/class/android_usb/android0/idProduct 676C
116 | write /sys/class/android_usb/android0/f_diag/clients diag
117 | write /sys/class/android_usb/android0/f_serial/transports tty
118 | write /sys/class/android_usb/android0/functions diag,adb
119 | write /sys/class/android_usb/android0/enable 1
120 | start adbd
121 | setprop sys.usb.state ${sys.usb.config}
122 |
123 | on property:sys.usb.config=diag_mdm,adb
124 | stop adbd
125 | write /sys/class/android_usb/android0/enable 0
126 | write /sys/class/android_usb/android0/iSerial 0123456789ABCDEF
127 | write /sys/class/android_usb/android0/idVendor 05C6
128 | write /sys/class/android_usb/android0/idProduct 676D
129 | write /sys/class/android_usb/android0/f_diag/clients diag_mdm
130 | write /sys/class/android_usb/android0/f_serial/transports hsic
131 | write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
132 | write /sys/class/android_usb/android0/functions diag,adb
133 | write /sys/class/android_usb/android0/enable 1
134 | start adbd
135 | setprop sys.usb.state ${sys.usb.config}
136 |
137 | on property:sys.usb.config=diag,diag_mdm,serial_hsic,serial_tty,rmnet_hsic,mass_storage,adb
138 | stop adbd
139 | write /sys/class/android_usb/android0/enable 0
140 | write /sys/class/android_usb/android0/iSerial 0123456789ABCDEF
141 | write /sys/class/android_usb/android0/idVendor 05C6
142 | write /sys/class/android_usb/android0/idProduct 676F
143 | write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
144 | write /sys/class/android_usb/android0/f_serial/transports hsic,tty
145 | write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic
146 | write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
147 | write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic
148 | write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
149 | write /sys/class/android_usb/android0/enable 1
150 | start adbd
151 | setprop sys.usb.state ${sys.usb.config}
152 |
153 | #added some configs for support ptp and cdrom by Xinhua.Song 2014-05-10
154 | on property:sys.usb.config=ptp
155 | stop adbd
156 | write /sys/class/android_usb/android0/enable 0
157 | write /sys/class/android_usb/android0/idVendor 05C6
158 | write /sys/class/android_usb/android0/idProduct 6771
159 | write /sys/class/android_usb/android0/functions ptp
160 | write /sys/class/android_usb/android0/enable 1
161 | setprop sys.usb.state ${sys.usb.config}
162 |
163 | on property:sys.usb.config=ptp,adb
164 | stop adbd
165 | write /sys/class/android_usb/android0/enable 0
166 | write /sys/class/android_usb/android0/idVendor 05C6
167 | write /sys/class/android_usb/android0/idProduct 6772
168 | write /sys/class/android_usb/android0/functions ptp,adb
169 | write /sys/class/android_usb/android0/enable 1
170 | start adbd
171 | setprop sys.usb.state ${sys.usb.config}
172 |
173 | on property:sys.usb.config=mtp,mass_storage
174 | stop adbd
175 | write /sys/class/android_usb/android0/enable 0
176 | write /sys/class/android_usb/android0/idVendor 05C6
177 | write /sys/class/android_usb/android0/idProduct 6773
178 | write /sys/class/android_usb/android0/functions mtp,mass_storage
179 | write /sys/class/android_usb/android0/enable 1
180 | setprop sys.usb.state ${sys.usb.config}
181 |
182 | on property:sys.usb.config=mtp,mass_storage,adb
183 | stop adbd
184 | write /sys/class/android_usb/android0/enable 0
185 | write /sys/class/android_usb/android0/idVendor 05C6
186 | write /sys/class/android_usb/android0/idProduct 6774
187 | write /sys/class/android_usb/android0/functions mtp,mass_storage,adb
188 | write /sys/class/android_usb/android0/enable 1
189 | start adbd
190 | setprop sys.usb.state ${sys.usb.config}
191 |
192 | #add a config for support rndis, diag and adb, added by Xinhua.Song 2014-05-10
193 | on property:sys.usb.config=rndis,diag,adb
194 | stop adbd
195 | write /sys/class/android_usb/android0/enable 0
196 | write /sys/class/android_usb/android0/iSerial 0123456789ABCDEF
197 | write /sys/class/android_usb/android0/idVendor 05C6
198 | write /sys/class/android_usb/android0/idProduct 6775
199 | write /sys/class/android_usb/android0/f_diag/clients diag
200 | write /sys/class/android_usb/android0/functions rndis,diag,adb
201 | write /sys/class/android_usb/android0/enable 1
202 | start adbd
203 | setprop sys.usb.state ${sys.usb.config}
204 |
205 | #add a config for default case by Xinhua.Song 2014-05-10
206 | on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_bam,mass_storage,adb
207 | write /sys/class/android_usb/android0/enable 0
208 | write /sys/class/android_usb/android0/iSerial 0123456789ABCDEF
209 | write /sys/class/android_usb/android0/idVendor 05C6
210 | write /sys/class/android_usb/android0/idProduct 9025
211 | write /sys/class/android_usb/android0/f_diag/clients diag
212 | write /sys/class/android_usb/android0/f_serial/transports smd,tty
213 | write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
214 | write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
215 | write /sys/class/android_usb/android0/enable 1
216 | start adbd
217 | setprop sys.usb.state ${sys.usb.config}
218 |
--------------------------------------------------------------------------------
/setup-makefiles.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | set -e
4 |
5 | export VENDOR=oneplus
6 | export DEVICE=bacon
7 | ./../../oppo/msm8974-common/setup-makefiles.sh $@
8 |
--------------------------------------------------------------------------------
/system.prop:
--------------------------------------------------------------------------------
1 | #
2 | # system.prop for one+
3 | #
4 |
5 | ro.sf.lcd_density=480
6 | rild.libpath=/system/vendor/lib/libril-qc-qmi-1.so
7 | persist.radio.add_power_save=1
8 | persist.radio.apm_sim_not_pwdn=1
9 | rol.ril.ext.ecclist=112,911,999,110,122,119,120,000,08,118
10 |
11 | # sensors
12 | ro.qc.sdk.camera.facialproc=true
13 | ro.qc.sdk.gestures.camera=false
14 | ro.qti.sdk.sensors.gestures=true
15 | ro.qti.sensors.bte=true
16 | ro.qti.sensors.gtap=true
17 | ro.qti.sensors.vmd=true
18 |
19 | # gps
20 | persist.gps.qc_nlp_in_use=0
21 | ro.gps.agps_provider=1
22 |
23 | # cabl is handled by the panel
24 | ro.qualcomm.cabl=0
25 |
--------------------------------------------------------------------------------
/vendorsetup.sh:
--------------------------------------------------------------------------------
1 | add_lunch_combo cm_bacon-user
2 | add_lunch_combo cm_bacon-userdebug
3 | add_lunch_combo cm_bacon-eng
4 |
--------------------------------------------------------------------------------