265 Commits
bka ... udc

Author SHA1 Message Date
suvojit213
0468a6a327 sky: Add vendor setup script for kernel, vendor, and hardware repositories
- Cloned the kernel source for Redmi 12 5G / Poco M6 Pro 5G (sky).
- Added the vendor source for device configuration.
- Integrated the hardware repository from LineageOS.

Setup complete for the initial project structure.
2024-11-16 18:39:49 +05:30
Lostark13
d30ed8bdba sky: Manage HBM and CABC states on screen events
LcdFeaturesService: Preserve HBM and CABC settings across screen on/off events

This service listens for screen on and off events to manage High Brightness Mode (HBM)
and Content Adaptive Brightness Control (CABC) settings. When the screen turns on,
the service restores the last known HBM and CABC values. When the screen turns off,
it saves the current HBM and CABC states to maintain consistency in user settings.

- Registers a BroadcastReceiver for ACTION_SCREEN_ON and ACTION_SCREEN_OFF events.
- Restores HBM and CABC properties on screen on to maintain previous settings.
- Saves current HBM and CABC properties on screen off.

This change ensures that display settings for HBM and CABC remain consistent, improving
user experience when toggling the screen on and off.
2024-11-15 07:29:13 +05:30
Lostark13
33c0fe82c2 sky: Changes to doze overlays 2024-11-14 09:22:52 +05:30
suvojit213
33d72f83a4 sky: Remove unwanted package
sky: Remove preinstalled packages to streamline the build.

- Added `RemovePackages` module to `device.mk` for handling package removal.
- Configured `Android.mk` to exclude specific packages:
  - Aperture
  - MusicFX

This update removes these packages from the final build, reducing unnecessary apps and optimizing the ROM for the device.
2024-11-14 09:22:52 +05:30
suvojit213
84ccbc32c7 sky: Disable Quick Tap support
Set TARGET_SUPPORTS_QUICK_TAP to false in lineage_sky.mk

- Quick Tap support is disabled for Evolution X due to lack of proper functionality on this device.
2024-11-14 09:22:52 +05:30
Lostark13
547f35f25c sky: Add support for LCD features (HBM & CABC)
Introduce support for LCD display features: High Brightness Mode (HBM) and Content Adaptive Backlight Control (CABC).

- High Brightness Mode (HBM): Boosts the display's maximum brightness to improve visibility in direct sunlight, at the cost of increased power consumption.
- Content Adaptive Backlight Control (CABC): Dynamically adjusts display and backlight brightness based on the content shown to reduce power consumption without compromising display quality.

These features enhance display functionality, offering better visibility and optimized power management.
2024-11-14 09:22:52 +05:30
Lostark13
abe2322001 sky: Add available color modes configuration
- Define available color modes in `config_availableColorModes` array.
- Included COLOR_MODE_256, COLOR_MODE_257, and COLOR_MODE_258.
2024-11-14 09:22:52 +05:30
Lostark13
264d72aa7b sky: Update CarrierConfig from HyperOS 1.0.5
Change-Id: I03a444de70ece5800148dd6ec0c4cac3039c32bc
2024-11-14 09:22:52 +05:30
Manish Kushwaha
98468068f6 sky: Migrate sensor HAL to AIDL interface
Bug: 247478991
Test: tested on-device (P23) ab/P46941077
Test: `sensor_test -ahal list` and `sensor_test list`
Test: `sensor_test -ahal sample -s0` and `sensor_test sample -s0`

Change-Id: I40f6ab6b7780c53cd638a1f77c95f6c324dc2d15
Signed-off-by: ralph950412 <ralph950412@gmail.com>
Signed-off-by: Rasenkai <rasenkai99@gmail.com>

Change-Id: I9acf2be7f6e5fed2e5f82948c0b77f9d67783318
2024-11-14 09:22:52 +05:30
lostark13
5f5a9a98a6 sky: Props cleanup 2024-11-14 09:22:52 +05:30
Arian
fa5583e731 sky: Drop modemManager blobs
Change-Id: Ic0d8eff53db30254da2c7cbfab0db4ade1fb1bc8
2024-11-14 09:22:52 +05:30
Arian
880dbbc427 sky: Drop qesdk blobs
Change-Id: Ib5e64bdde9fea4ff868ee2222ae1064eb3ef3d48
2024-11-14 09:22:52 +05:30
Arian
e15412894b sky: Drop psiclient blobs
Change-Id: I81346135d961b772c5981ee818f65f8ccedb7ceb
2024-11-14 09:22:52 +05:30
Arian
622a2403cf sky: Drop embmssl blobs
Change-Id: I8fadba34ce12ac8371e116404249c7ecd9338e7e
2024-11-14 09:22:52 +05:30
Arian
415b125e17 sky: Stop building automotive vehicle manager lib
Change-Id: I9d03cb4746bfc6ed3a9b61db70465cdcd3669c32
2024-11-14 09:22:52 +05:30
Arian
edf23e7313 sky: Stop building atrace service
Change-Id: If51fd3019dd823b2fb31f7d8273de6bc9cf8f173
2024-11-14 09:22:52 +05:30
Yumi Yukimura
d9e48fe77a sky: Migrate to QTI USB Gadget 1.2 HIDL
Change-Id: I6adbca2fab9a3fe0477d17f9786166828b786710
2024-11-14 09:22:52 +05:30
Nolen Johnson
5b55c8f687 sky: Swap to QTI USB init scripts
Change-Id: Ibb01a6a8b9817b01a8db397cdf82a89659562d62
2024-11-14 09:22:52 +05:30
AdarshGrewal
79b70a2c2f sky: Build libsndcardparser from source
Change-Id: I338a79e8c5e4cfe4070e249f952b6c6b18ca6202
2024-11-14 09:22:52 +05:30
Lostark13
9af0e67000 sky: Rebalance haptic feedback strength
Change-Id: I40c585a70c25e7a6c209b3a2463b6f5941296f9b
2024-11-14 09:22:52 +05:30
Arian
dec2ca4b51 sky: Drop 32bit c2audio seccomp policy
Change-Id: I3b342f43ed594bca8425cc05c4c1b96807cf5e80
2024-11-14 09:22:52 +05:30
codeworkx
bbaaef913a sky: wifi-display: Add WfdCommon to boot jars
Change-Id: I2465b9509d8514f594a62160899a50c23f263b7f
2024-11-14 09:22:52 +05:30
Michael Bestas
a77007cf09 sky: extract-files improvements
Change-Id: I517698ca3b5a93e10a5b167417631c7f8d0ab9e2
2024-11-14 09:22:52 +05:30
Bruno Martins
4c703fa061 sky: Build opensource soundtrigger HAL
Change-Id: I956d53a67841a9e1e296de6b73f08ef2efac7470
2024-11-14 09:22:52 +05:30
AdarshGrewal
4149b2ae40 sky: Build audioadsprpcd from source
Change-Id: I19d38c534edf26886bd354548eaee661dd79f793
2024-11-14 09:22:52 +05:30
Arian
64a897c2ca sky: Disable proprietary listen sound model
Change-Id: I9a836a8c0a68a45b1c4ae5233adfd1f14789b8f6
2024-11-14 09:22:52 +05:30
Bruno Martins
c02cdb37f8 sky: Switch to source-built mlipay interface
Change-Id: I7daaaffd9fe7a870e42c1d882b52dc93b3231120
2024-11-14 09:22:52 +05:30
Yumi Yukimura
f3c8e80bbd sky: Use led vibrator
Change-Id: I363310714e1042ae1a73f63ed01a21d33514b8d6
2024-11-14 09:22:52 +05:30
Arian
91d13f1529 sky: Add hotword enrollment permissions
Change-Id: I4ddb3dcf85ab45b02808cbe3d28cb8caa2858dca
2024-11-14 09:22:52 +05:30
Lostark13
e851afd6a3 sky: Drop aosp bt audio manifest entry 2024-11-14 09:22:51 +05:30
Lostark13
bd6f873971 sky: drop bt audio hal 2024-11-14 09:22:51 +05:30
Lostark13
d1f718ec3a sky: Properly set acdb for different regions
- fixes low sound

Change-Id: I72152320275e06ee533a4bd1d3dca829df3e6c7f
2024-11-14 09:22:51 +05:30
Lostark13
7e032fea91 sky: Align display props with stock
Change-Id: I70809f2965f17d5e1fba99e3532e3ece56228229
2024-11-14 09:22:51 +05:30
Lostark13
57c5035b1f sky: Cleanup manifest
Change-Id: I9b754f64a933903ac3bc3ef4a96b2efdba811cef
2024-11-14 09:22:51 +05:30
Lostark13
c2d908b383 sky: Fix cpu variant runtime flags
Change-Id: I39623bd475c6093613fb1d8fea087fd29bb572ea
2024-11-14 09:22:51 +05:30
Lostark13
b66ef2e474 sky: Fixup vintf entries
Change-Id: I7905658c733ddfb77e3196034674cd7d9b110238
2024-11-14 09:22:51 +05:30
Arian
d5ae95617f sky: Get rid of unnecessary 32-bit blobs
Change-Id: I6b4fc2a77231b775e367d1adf7bf238f765a3e7a
Co-authored-by: Lostark13 <tushar9915@gmail.com>
2024-11-14 09:22:51 +05:30
Lostark13
3ea847e560 sky: powerhint: Remove AI ML hint
Change-Id: Ic2f7a63c948baece81e753849a169663e3ffd436
2024-11-14 09:22:51 +05:30
Lostark13
50991eb9c5 sky: powerhint: Remove camera hints
Change-Id: I54050e408192923b82536ead932accb90e6a957f
2024-11-14 09:22:51 +05:30
Sebastiano Barezzi
6bb5870f15 sky: powerhint: Drop EnergyAware node
Change-Id: I42adc40264df0b9c0b03c6862bb0c5703710254d
2024-11-14 09:22:51 +05:30
Arian
0f1350c49b sky: Nuke misoundfx effect
Change-Id: I5672e554a2b2b21fbadfe915b9a89cd2365f3864
Signed-off-by: Arian <arian.kulmer@web.de>

Change-Id: I0591a72f78bc7365ee2aa0fea6c69ddb5f273978
2024-11-14 09:22:51 +05:30
Lostark13
0c27ee8361 fixup! sky: powerhint: L3 node
Change-Id: I13c356df0ac9f58ee3564db7a32d119147329540
2024-11-14 09:22:51 +05:30
Suvojeet Sengupta
b8fd7fbf0a sky: Reimprovised device specsheet 2024-11-14 09:22:51 +05:30
suvojit213
f3cf9e85cb sky: Disable blur 2024-11-14 09:22:51 +05:30
suvojit213 Name
69cc0fd635 sky: Update blobs from V816.0.6.0.UMWINXM 2024-11-14 09:22:51 +05:30
rahul
a9485dc78f sky: Build libavservices_minijail
Change-Id: I7bc43dc152771514e8b8595b2c385c96db9013d0
2024-11-14 09:22:51 +05:30
Arian
4dfc964918 sky: sepolicy: Drop nfc rules which are handled by sepolicy_vndr already
Change-Id: Ifa04e62bc2cb5a9b24cdaf5c6de92edda4613525
2024-11-14 09:22:51 +05:30
Lostark13
7bcb67ccfe sky: Fixup ims libs symlink
Change-Id: I08835617e221e3947ca72c471c9b4e59b71687d7
2024-11-14 09:22:51 +05:30
Michael Bestas
e156b8e2fd sky: Remove media_codecs_google_c2*
AOSP codecs can be used by default and it is not necessary to include
them device side.

Change-Id: I8227b06f0466b614f12fa9008402b92461ea3dd0
2024-11-14 09:22:51 +05:30
Michael Bestas
cd248f4575 sky: Use AOSP default Codec2/OMX ranks
debug.stagefright.ccodec=4
is the default value in frameworks.

debug.stagefright.omx_default_rank=0
was used to rank OMX SW codecs lower than OMX HW codecs
but we have removed all OMX SW codecs now.

Change-Id: Idf55ec02c2c0f4d2fa73f949cffef0d820a54570
2024-11-14 09:22:51 +05:30
Aaron Kling
f7a21bb2af sky: Remove software omx codec references
These are no longer available as of Android 14 QPR3. The C2 codecs
available by default in the swcodec apex will be used instead.

Change-Id: I8cdf3e700823779a7382c66c3df8410d41209b7c
2024-11-14 09:22:51 +05:30
Arian
168cf7bdb6 sky: Kill libstagefrighthw
This will not be loaded when vendor.media.omx=0 is set

Change-Id: I6c87910028feae4c0711ce9bfc0ed2fb5e7445c0
2024-11-14 09:22:51 +05:30
Sungtak Lee
77f3ca6d6a sky: Disable OMX
Bug: 222649162
Test: make
Change-Id: Iaf1046c610804c5bdb3b0f591e9907539534ea06
2024-11-14 09:22:51 +05:30
Adithya R
48b3dab376 sky: Switch to 64-bit-only builds
Remove 32bit support entirely from the OS.

Co-authored-by: redducc <sushmit718@gmail.com>
Change-Id: I705e2fca23dbdee297afcde45e9090b6d124e0be
2024-11-14 09:22:51 +05:30
Terminator-J
d852518fc2 sky: rootdir: Fix the battery drain due to statsd
* Fix battery drain after 100h of uptime
2024-11-14 09:22:51 +05:30
suvojit213
0ff8c82a7a sky: Initialize for Evolution X 9.x 2024-11-14 09:21:56 +05:30
Arian
fcf6c0a35c sky: Build qti thermal hal from source
Change-Id: Iff18a5fb4a5717aa6b77fdd64a87367dccd5df0b
2024-07-16 20:00:33 +00:00
Lostark13
e6a980683b sky: Remove some 32 bit blobs
Change-Id: I4318384c88e559f8fe3967c2a99f9b24f127622c
2024-07-16 20:00:33 +00:00
Lostark13
653a38ed2e sky: Drop tcmd blobs
Change-Id: I2b8110665e8fe401d84b08c91bb2496c64cadef3
2024-07-16 20:00:32 +00:00
Bruno Martins
d5777b54b5 sky: Use common libqti-perfd-client and power-libperfmgr
Change-Id: I22d6b35c72629553817005deaefcae60abc72cfd
2024-07-16 20:00:32 +00:00
Arian
72f6015099 sky: Provide a static lib for power mode extension
Change-Id: I3e2cf17bf1e733838e9e18afdf3f888e814593dc
2024-07-16 20:00:32 +00:00
Sebastiano Barezzi
0f5ca794d2 sky: rootdir: Initial libperfmgr init config
* From coral, heavily stripped down

Change-Id: Ib6846e4f4f23baf56910d2330e26846b99830218
Signed-off-by: saikiran2001 <bjsaikiran@gmail.com>
2024-07-16 20:00:31 +00:00
Bruno Martins
d232cc3a7f sky: Migrate to Xiaomi power HAL AIDL
Change-Id: I42170d51a517170b58d532addd9c38496e43457c
Signed-off-by: saikiran2001 <bjsaikiran@gmail.com>
2024-07-16 20:00:31 +00:00
Arian
e0dc5ac3a1 sky: Address some more sepolicy denials
Signed-off-by: saikiran2001 <bjsaikiran@gmail.com>
Change-Id: I30336e307bdee64803bea103932e9b1533ebda11
2024-07-16 20:00:31 +00:00
saikiran2001
b476ad4c45 sky: Nuke qcom powerhal manifest entry
* Also remove redundant touchpanel sepolicy definition

Change-Id: Ie408eba1724a4624907bc8a0dcd70f52f03cdf82
2024-07-16 20:00:31 +00:00
saikiran2001
586b9b6a65 sky: Adapt powerhint for sky
Change-Id: I7dedec0ad31c1559358db6ba22673a5ab2ca7012
2024-07-16 20:00:30 +00:00
Vaisakh Murali
43a2f96fe8 sky: powerhint: Reduce the little cluster min frequency for INTERACTION
Change-Id: Idacee130d2d78ecb3f6bb078deca1e92020da87a
2024-07-16 20:00:30 +00:00
Vaisakh Murali
d83c313d4d sky: powerhint: Make interaction hint energy aware
Change-Id: I74603fb03d7998a3f5ae5354c6e38cadaf561c8c
2024-07-16 20:00:30 +00:00
Vaisakh Murali
3629a8099a sky: Switch to OSS libperfmgr
Entirely re-written powerhint.

Change-Id: Ib4dfdb7fafd0e0bab6591fe516a3d87e42a06ffe
2024-07-16 20:00:30 +00:00
Chenyang Zhong
32940ea787 sky: libqti-perfd-client: return a dummy value
Return a positive integer for perf lock acquire and release so
that Goodix/FPC fingerprint sensor blobs will not complain.

Goodix:
E [goodixHAL][gf_hal_milan_f_series]: goodix_perf_lock_acquire: Failed to acquire perf lock, err: 0
E [goodixHAL][gf_hal_milan_f_series]: goodix_perf_lock_release: Perf lock release error 0

FPC:
E fpc_tac : fpc_perf_lock_acquire: Incorrect params, Failed to acquire perf lock, err
E fpc_tac : fpc_perf_lock_release: Perf lock release error 0

Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
Change-Id: I861672e9a738c2204755d802670f4b28b662f286
2024-07-11 19:58:36 +00:00
Bruno Martins
7867cbd6a5 sky: libqti-perfd-client: Remove namespace declaration
It's pointless when using extern "C".

Change-Id: Ibdf9f06a70aa3a75687b33781c78cf2172bb334d
2024-07-11 19:58:36 +00:00
Lucchetto
e2e94985e9 sky: Create dummy libqti-perfd-client
* proprietary perfd blobs can finally be nuked without breaking goodix
* we could even map the functions to use libperfmgr powerhints in the future

Change-Id: I124652f3041761966a3e3bd97c757fecc39cc5fb
Signed-off-by: saikiran2001 <bjsaikiran@gmail.com>
2024-07-11 19:58:36 +00:00
Wei Wang
dad5a4b25c sky: Remove QTI perfd
Bug: 69270928
Test: Build and boot device and test camera
Change-Id: I87b283206f462fb5c8ec9cdd303ae2934fe9bfc4
Signed-off-by: saikiran2001 <bjsaikiran@gmail.com>
2024-07-11 19:58:36 +00:00
TH779
4b76cf9d00 sky: sepolicy: Address Pixel power libperfmgr HAL denials
Co-authored-by: Arian <arian.kulmer@web.de>
Signed-off-by: TH779 <i@779.moe>
2024-07-11 19:58:36 +00:00
chaptsand
1e90821cec sky: Build Pixel AIDL power HAL
Change-Id: I95871dd46ff04a42ec4463493439687882258484
2024-07-11 19:58:36 +00:00
Jesse Chan
9fc255c2c8 sky: libperfmgr: initialize powerHAL when boot is completed
Change-Id: I801b3aba05ef0be14c7af1969ddf9318c05ef64c
2024-07-11 19:58:36 +00:00
redducc
52762cd03a sky: power: Rebrand to sky 2024-07-11 19:58:36 +00:00
chaptsand
71e81c9521 sky: Import cleaned Pixel AIDL power HAL
Change-Id: Ie508a7dcd7c69ae7969a53eb8c6e0adac03bf801
2024-07-11 19:58:36 +00:00
Wei Wang
69650e468c sky: Boot time tuning
Test: build and boottime test
Change-Id: Ib8f31d39501b4747f0c268d2dd87e814bcc7843b
Signed-off-by: Wei Wang <wvw@google.com>
Signed-off-by: Vaisakh Murali <mvaisakh@statixos.com>
2024-07-11 11:01:53 +00:00
Arian
557f62c4c5 sky: Build display hal
- Blobs from ingot-user 14 UKQ1.231121.127 127 release-keys

sky: Drop 32 bit display blobs

Co-authored-by: Tushar Bharti <tushar9915@gmail.com>
Change-Id: I4aab1cdbf93b2931dc948e687eb009600bd95e1e
2024-07-11 11:01:53 +00:00
Vaisakh Murali
638a25185a sky: Enable zram block device
Enable 55% of swapping size.

Change-Id: Ic377bae839a6f69598563afa85d68a1a444ea956
2024-07-11 11:01:53 +00:00
Vaisakh Murali
5de34296a3 sky: Ship stock volume tables
Change-Id: Iadb5504408bbeed562f14f19b875bf4ef6ba7a1e
2024-07-11 11:01:53 +00:00
Vaisakh Murali
24302d7373 sky: Don't ship a2dp audio policy config
Change-Id: I3e9139f161fcc80d4a9585b6f13b3c6b42d152d4
2024-07-11 11:01:53 +00:00
Arian
7380fe7f0f sky: Cleanup media section and build oss ones
Change-Id: I6fb771855b3e540f6ef27342e5fa84deed4f3fb7
2024-07-11 11:01:53 +00:00
jendermine
94413ed4d9 sky: Update blobs to V816.0.5.0.UMWINXM
Change-Id: Ief5e1248b1617a708a60a910858b7cb0c48465d5
2024-07-11 11:01:53 +00:00
Arian
9055c6935f sky: Build qcom soundfx effects from source
Change-Id: Idc4f0c317b2aa69856456dc02693409ddb37b4ec
2024-07-11 11:01:53 +00:00
Michael Bestas
5ccaee6ac9 sky: Build FM
Change-Id: I5c296d1630cb4c2732ee8ec80c28f44d1a0b629c
2024-07-11 11:01:53 +00:00
Lostark13
7ea466fa32 sky: Use new thermal configs
Change-Id: Id8f3dc78bd48defdd4ce0b9041674772258d2187
2024-07-11 11:01:53 +00:00
Lostark13
bfed1d1a6b sky: Pin modified thermal configs
- Increased charging threshold and cpu throttling
2024-07-11 11:01:53 +00:00
justinweng
7456b68708 sky: Extend audio offload buffer size to 256kb
* Remove duplicated prop while we are at it

Extend buffer size for offload playback to reduce the frequency of CPU
wake up.
It makes ADSP to process more data one time and reduce the number of
times to wake up CPU.

Bug: 137973303
Test: MP3 playback
Change-Id: If8eb1d3041161979063bf852e2b0b397e87e7c05
2024-07-08 14:34:04 +00:00
Paul Crowley
eadead96c3 sky: Remove wait_for_keymaster and all references
No longer needed now init listens for property changes on a
separate thread.

Bug: 186580823
Test: Cuttlefish boots successfully
Change-Id: Ief3a546d2154231d18957c2f703bd128966d7288
2024-07-08 06:59:47 +00:00
Michael Bestas
28c8897c97 sky: Build missing libraries for 14 QPR3
Change-Id: I6a84526ca1e9f4e5140c8068646433cab3fe85b2
2024-07-05 06:37:44 +00:00
Bruno Martins
0ff998edba sky: Convert WiFi firmware symlink to install_symlink target
The last bit that was preventing building hermetic images.

Change-Id: I75bb7de4593a7992f6015317cf97e088beeba0cb
2024-07-03 07:05:19 +00:00
Bruno Martins
2b5a79823f sky: Move to new RFS install_symlink targets
Change-Id: I9560fd0da00958d9349a0881b5a5f64a2c02e495
2024-07-03 07:05:19 +00:00
clarencelol
23547b4d2c sky: sepolicy: Fix sepolicy on compilation
* The following types on /data/ /odm/ /product/ /vendor/ must not be associated with the "app_data_file_type" attribute.
Violator types and corresponding paths:
('app_data_file', '/data/user/0/com.android.camera(/.*)?')

Change-Id: I6cb3f75ba19cd4952d1fd41dd5a71dba88019eef
2024-07-03 07:05:19 +00:00
Chirayu Desai
81072c53e0 sky: Don't set BOARD_API_LEVEL
build/make/core/board_config.mk:1001: error: BOARD_API_LEVEL must not
set manully. The build system automatically sets this value..

Change-Id: If59ae9dea6cb13701d7217a1c0a355d4e07113eb
2024-07-01 17:05:59 +00:00
Michael Bestas
7127fa485e sky: Drop COMMON_LUNCH_CHOICES
As of 14 QPR2 this is broken, let's remove it instead of updating it
every 3 months. breakfast is the way to go.

Change-Id: I097bd54b894d9a49c7ce8b1ab6f343349e268fd8
2024-07-01 17:05:43 +00:00
Jens Reidel
6ab73e809b sky: sepolicy: Drop extcon rules
These live in device/qcom/sepolicy_vndr now.

Change-Id: I33a51a18bdf9fbef01c5c12647646472c4850b32
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2024-05-31 09:38:39 +00:00
Lostark13
5c44712210 sky: Update blobs to V816.0.2.0.UMWINXM 2024-05-28 21:35:56 +00:00
Michael Bestas
1d0f68ff5c sky: parts: Convert to SwitchPreferenceCompat
Change-Id: Ic1cbaba37d499da1855af9c3930f2df426e2d3af
2024-04-28 20:20:08 +00:00
Lostark13
e2e5b6e0eb sky: Add support for NFC devices 2024-04-28 20:12:17 +00:00
Giovanni Ricca
d1d3cbd13b sky: Build goodix lib from source
Change-Id: Ibaf1b9489b509318032c720c9c83e315cfe6ab3e
2024-04-28 16:22:04 +00:00
Lostark13
ef887cd45a sky: Build USB hal from source 2024-04-28 16:08:43 +00:00
jendermine
0150efe0b4 sky: Switch to prebuilt libgrpc++_unsecure 2024-04-16 18:02:37 +00:00
redducc
f615ca442e sky: Don't set for redmi 12R variant
Change-Id: I4a82eba4e589e357525be2d9da58eed6246c1599
2024-04-16 14:37:42 +05:30
Peter Kalauskas
9fdec60b02 sky: parts: Enable use_resource_processor for all sysui deps
This will make the build faster

Test: m checkbuild
Bug: 295208392
Change-Id: I0c1bd901429bbe3bf81c1530e156735f8637a96e
2024-04-16 04:51:04 +00:00
jendermine
9e7197e05a sky: Drop Dirac 2024-04-15 21:07:46 +00:00
Prateek Maru
9193d01b94 sky: Add device specsheet 2024-04-15 21:07:46 +00:00
redducc
98c588d6e3 sky: Rework init
Change-Id: I66dc270b3679f0b6b0683e60f94742769a784a16
2024-04-15 21:07:46 +00:00
redducc
cac2add57d sky: Specify river in board-info.txt
Change-Id: I6559045787c5bc8a312e302e49171f704b53ed3d
2024-04-15 21:07:46 +00:00
Adithya R
29a1da1304 sky: perf: Boost big cluster as well on input
HWC and SF runs on big cluster too (foreground cpuset).

Change-Id: Ib76468f941bcf51437b3afb94e0611972aeee493
2024-04-15 21:07:46 +00:00
Karthik Gopalan
a60d1339f4 sky: memory: Enable SVELTE memory configuration
Enable SVELTE memory configuration.

Change-Id: I2653de0eb18b207ee453fdd549a5d1a69f3ad33e
2024-03-03 06:02:33 +00:00
redducc
efb0fc204a sky: Tune charging control parameters
- This device takes atleast 130m to charge from 0 to 100, set the time
  margin to 140m to account for slower chargers or hotter ambient temps.
- Once the target is hit, try to maintain it by letting it drain at max
  -1% before restarting charging, instead of the default 10%.

Co-authored-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Change-Id: I8e383535e140f979ec7b854e1c2b551e1b502c89
Signed-off-by: jendermine <jendermine@gmail.com>
2024-02-10 11:59:23 +05:30
jendermine
e40eb17b9f Revert "sky: rootdir: Switch to lz4 for zram"
This reverts commit ab77e0a684.
2024-02-09 22:58:45 +05:30
redducc
66aaadf47a Revert "sky: Drop advanced SF offsets config"
* The display hal is ages old

This reverts commit 61061a78da.
2024-02-08 18:35:58 +01:00
redducc
6814e84e61 sky: Add dirac and clear speaker
https://github.com/ghostrider-reborn/android_device_xiaomi_lisa/tree/topaz/parts
2024-02-08 18:26:35 +01:00
redducc
9670824549 sky: Inherit 4gb dalvik heap instead of 6gb
Co-authored-by: jendermine <jendermine@gmail.com>
2024-02-08 18:21:59 +01:00
redducc
2c43b377e6 sky: overlay: Update vibration overlays 2024-02-08 18:20:23 +01:00
Adithya R
fc14240a34 sky: Update performance tuning
- Introduce a new shell script to set IRQ affinity, since different
  kernels can have different IRQ numbers
- Drop scheduler migration tuning until proper testing.

Signed-off-by: redducc <sushmit718@gmail.com>
2024-02-08 18:15:58 +01:00
Sugakesshaa
9038418ebf sky: display: Disable HWC usage for VDS
Fixes system freezes and janks while screen recording.

Change-Id: Ic21a277a520cda57c765cecace68d2bc0a7f1ded
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
2024-02-08 18:03:19 +01:00
Tobias Merkel
1cc1e75bf2 sky: Build android.hardware.drm-service.clearkey
Change-Id: I026ac2d84156f0c083adb118bc51c4fd18e5b450
2024-01-25 18:53:33 +05:30
redducc
6172ebe165 sky: Label some camera properties
Signed-off-by: redducc <sushmit718@gmail.com>
2024-01-25 18:53:33 +05:30
redducc
94bf2fd9ea sky: Use correct Architecture flags
Signed-off-by: redducc <sushmit718@gmail.com>
2024-01-25 18:53:33 +05:30
redducc
a09ed3ba7b sky: Add some missing camera blobs
Signed-off-by: redducc <sushmit718@gmail.com>
2024-01-25 18:53:33 +05:30
redducc
61aa845390 sky: Include firmware 2024-01-25 18:53:33 +05:30
redducc
ac4d2fc41b sky: Drop some tuning from perf script 2024-01-25 18:53:33 +05:30
Adithya R
c476626171 sky: parts: Fix thermal profile screen state handling 2024-01-25 18:53:28 +05:30
redducc
4b236395b4 sky: Add focaltech_8725 touch firmware 2024-01-19 10:20:18 +05:30
redducc
da039aa61e sky: Import XiaomiParts from marble tree
* https://github.com/AOSPA/android_device_xiaomi_marble/tree/topaz/parts

- Cleanup for sky
2024-01-19 10:20:03 +05:30
redducc
c9b502c4ee Revert "sky: Set config_displayLightSensorType to xiaomi.sensor.ambientlight.raw"
This reverts commit 77d94a4bdc.
2024-01-19 09:58:33 +05:30
Gareth Kitchen
eb58f71ff9 sky: gps: Localise NTP to improve GPS TTFF
Testing response times to time.android.com from around the globe reveals
in ms:-

Europe			 <30
Middle East		 <68
North America		<150
Johannesburg		 183
Buenos Aires		 220
Tokyo			 226
Sydney			 276
Hong Kong		 285
Brisbane		 295
Mumbai			 349
Beijing			4691
Shanghai		4906
Russia			 n/a

Whilst time.android.com is NOT used for GPS NTP, North American time servers
are, by specifying north-america.pool.ntp.org as default in the framework,
to align with pixel devices.  I am assuming similar response times to these
servers from around the world.

Great for North America and it appears Europe but it does not address the
global issue. Also, the pool.ntp.org project forbids both hardware and
software vendors from using these default zone names.
http://www.pool.ntp.org/en/vendors.html

It makes sense, therefore, to leverage the ntp.org's existing 'android' vendor
name to make the default ntp server for GPS purposes:
1.android.pool.ntp.org this will return a random but accurate NTP server in
close geopraphic proximity to the device.

Testing on my own build in the UK seems to improve hot and cold TTFF
considerably.

Change-Id: I144af45757efa35b32daf034eece6e046d2bde79
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
2024-01-19 09:56:14 +05:30
Adithya R
682f8444bc sky: Selectively import xiaomi changes in gps.conf 2024-01-19 09:56:14 +05:30
Adithya R
23ac731bef sky: Bring in gps.conf from GPS HAL
https: //git.codelinaro.org/clo/la/platform/hardware/qcom/gps/-/blob/LA.VENDOR.1.0.r1-24300-WAIPIO.QSSI13.0/etc/gps.conf
Change-Id: Iecdda265f34f0e3bbf94466703c0f4630dddd4a4
2024-01-19 09:55:39 +05:30
redducc
61061a78da sky: Drop advanced SF offsets config 2024-01-19 09:52:31 +05:30
Omkar Chandorkar
631f75aa9f sky: overlay: Steal CarrierConfig from phone1
* From Nothing OS 2.0.4

Change-Id: I8b761a30c86d72d6bd454332ec3042a22c1a7aac
Signed-off-by: Omkar Chandorkar <gotenksIN@aospa.co>
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
2024-01-19 09:50:20 +05:30
Ken Huang
37882ca89f sky: Set 90Hz frame rate multiple threshold
Bug: 215043570
Test: play 24fps video and check refresh rate
Change-Id: Ie638f9dcf11e25bdd903d6cde2d0eeb794668e52
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
2024-01-19 09:48:38 +05:30
redducc
20db7782d9 sky: Revert back to stock perf blobs 2024-01-16 10:01:12 +05:30
redducc
1b49ce1ee9 sky: Build recovery partition in ota packages
* It was removed to preserve custom recoveries but we don't have to do it now.
2023-12-22 09:27:26 +00:00
Jake Weinstein
dfc08af527 sky: Use foreground cpuset/uclamp for gralloc
Makes sure rendering has enough capacity.

Change-Id: I7ad051248353485a8090bec578b2c4325ea06024
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
2023-12-21 04:40:13 +00:00
Jake Weinstein
26a3c9f8a9 sky: Use foreground uclamp for hwcomposer
Matches SF, makes sure rendering always
has enough capacity.

Also switches to task_profiles.

Change-Id: I2a2de504be7d3f4f66f31445f44fbbf9376bd927
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
2023-12-21 04:40:13 +00:00
Vishalcj17
b91fe58e7f sky: Switch hwcomposer to foreground CPU set
* Greatly affects the performance/latency of the display
   considering you have foreground set to 0-6 cores on <SM7350
   whilst being power efficient.

 * This shows an improvement on HWUI graph and even jankbench.

Change-Id: I6438375d844e1b1f38872fb53bdfadfb644fc722
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
2023-12-21 04:40:13 +00:00
Edwin Moquete
458ff36a07 sky: Disable display refresh rate override
This got enabled by default on U, and it causes apps like
Chrome and Youtube to set the refresh rate to 30FPS when
playing some videos.

Change-Id: I649bf03d550c2b9726c7957d15ed09e455d874ec
2023-12-21 04:40:13 +00:00
Jake Weinstein
c0ddd5fdf7 sky: Move overlays to product
While previous Android versions respected priorities
regardless of partition, Android 14 prioritizes partitions.

Overlay precedence
When multiple overlays override the same resources, the order of the overlays is important. An overlay has greater precedence than overlays with configurations preceding its own configuration. The precedence order of overlays in different partitions (from least to greatest precedence) is as follows.

system
vendor
odm
oem
product
system_ext

This is a shame for GSI compatibility, but we can't override
otherwise.

Change-Id: I6aecb852b9f90d8db74328316655e8403482b586
2023-12-21 04:40:13 +00:00
Alex Sarraf
5c4c518ab7 sky: Set debug.sf.auto_latch_unsignaled to 0
Need to explicitly set auto_latch_unsignaled property to
disabled state to keep latch-unsignaled as the default
behavior.

Change-Id: I3856caaf0a68e7e720819f25338d1eb9196f56b0
2023-12-21 04:40:06 +00:00
mikeNG
631b52da76 sky: Build charger_res_images
* Fix offline charging animation not showing

Signed-off-by: Alexey Shelby <shelbyhell@proton.me>
2023-12-20 08:10:06 +00:00
Alex Damaratski
d4268c12f8 sky: Build libsuspend
* Required by kpoc_charger

Change-Id: Ia33222329585abc451d9490c40728e7ab4287298
2023-12-20 08:10:06 +00:00
Jake Weinstein
1bcf312cfa sky: Pin some overlays
* Also declare support for sustained performance while we are at it.

Signed-off-by: redducc <sushmit718@gmail.com>
2023-12-20 06:17:15 +00:00
Jake Weinstein
1702bfea86 sky: rootdir: Disable multiple kswapd threads
https://lore.kernel.org/lkml/20180403133115.GA5501@dhcp22.suse.cz/
2023-12-20 06:17:15 +00:00
redducc
fb1e5d7498 Revert "sky: rootdir: Remove CAF input boost"
This reverts commit 6d229237a4.
2023-12-20 06:17:15 +00:00
Michael Bestas
e66535b626 sky: Build Lineage Health HAL
Change-Id: I70cc903a03ac9fa3303bb8fa039c9de4806449bf
Signed-off-by: redducc <sushmit718@gmail.com>
2023-12-20 06:17:15 +00:00
redducc
e6b3d4222b sky: Don't reserve partitions
Signed-off-by: redducc <sushmit718@gmail.com>
2023-12-20 06:17:15 +00:00
Rasenkai
0899d2ca49 sky: power: Add NVTCapacitiveTouchScreen support
Change-Id: Ifd151f0642b495f80cc512d4fe19d1cfab97bcf8
2023-12-20 06:17:15 +00:00
Arian
d1fbdbacd2 sky: rootdir: Override power HAL service and add input group
* This allows to access /dev/input/event* which is required for DT2W.

Change-Id: Idbab93138ba3221338413283552004d92e8ef333
2023-12-20 06:17:15 +00:00
redducc
fe5854b609 Revert "sky: Rework dalvik configurations"
This reverts commit 1a2d253b9a.
2023-12-20 06:17:14 +00:00
Jake Weinstein
325aff1d0e sky: Update perf (vendor) to Shennong (SM8650)
missi_phone_cn_only64-user-14-UKQ1.230804.001-V816.0.9.0.UNBCNXM-release-keys

Change-Id: I9b383fa96444951eaff7d75336d4ba036221eea0
2023-12-20 06:17:14 +00:00
Alan Chen
b9a81a237a sky: wifi: Enable Optimized Power Management
gEnablePowerSaveOffload was renamed to gOptimizedPowerManagement

[1]: 10989ba376
[2]: 9ef1447db3

Signed-off-by: redducc <sushmit718@gmail.com>
2023-12-20 06:17:14 +00:00
Mourya BAruah
373a59965d sky: Add haptics overlays 2023-12-20 06:17:14 +00:00
redducc
6a1a739027 sky: sepolicy: Address few wakeup nodes 2023-12-20 06:17:14 +00:00
redducc
e1e81a0d5f sky: Allow access to few sysfs nodes
Signed-off-by: redducc <sushmit718@gmail.com>
2023-12-20 06:17:14 +00:00
Lostark13
a4fb01d853 sky: Add NFC Support for river global 2023-12-20 06:17:14 +00:00
redducc
3abfb51376 sky: Add sky libinit
Signed-off-by: redducc <sushmit718@gmail.com>
2023-12-20 06:17:14 +00:00
ghostrider-reborn
745c209084 sky: Update perf stack from Pong
Signed-off-by: saikiran2001 <bjsaikiran@gmail.com>
Signed-off-by: redducc <sushmit718@gmail.com>
2023-12-20 06:17:14 +00:00
redducc
20bec2e17f sky: Import and update perf configs from LA.QSSI.14.0.r1 2023-12-20 06:17:07 +00:00
Chenyang Zhong
ab77e0a684 sky: rootdir: Switch to lz4 for zram
5.4+ kernel defaults to lzo-rle for zram. lzo-rle added run-length
encoding for lzo, which is beneficial to the use case of zram that
often has long runs of zero bytes. However, according to my testing
results, lzo-rle still has lower decompression throughput and higher
access latency compared to lz4. lzo-rle beats lz4 in compression
ratio, but most Xiaomi SM8350+ devices have either 8GB or 12GB of RAM
where memory pressure hardly happens. Therefore, lz4's higher throughput
and lower latency is more preferable.

Now that I added LZ4_FAST_DEC_LOOP to the kernel lz4 module from
upstream lz4 1.9.x release, the decompression speed has increased
by another 10%, which leads further ahead lzo-rle.

Test setup:
- Disable swap on zram if it is enabled
  $ swapoff /dev/block/zram0
- If you want to change the comp_algorithm after zram has been
  initialized, reset zram first.
  $ echo 1 > /sys/block/zram0/reset
- Set the comp_algorithm. For example, for lz4
  $ echo lz4 > /sys/block/zram0/comp_algorithm
- Set up zram size
  $ echo 4294967296 > /sys/block/zram0/disksize
- Make the swap
  $ mkswap /dev/block/zram0
- Pre-fill zram with 1GB of real-word zram data dumped previously under
  memory pressure. For example,
  $ dd if=/sdcard/zram.test of=/dev/block/zram0 bs=1m count=1000

Random 4k read:
$ fio --readonly --name=randread --direct=1 --rw=randread --ioengine=psync \
  --randrepeat=0 --numjobs=4 --iodepth=1 --group_reporting=1 \
  --filename=/dev/block/zram0 --bs=4K --size=1000M

lzo-rle: read: IOPS=1547k, BW=6042MiB/s (6336MB/s)(4000MiB/662msec)
lz4: read: IOPS=1646k, BW=6431MiB/s (6743MB/s)(4000MiB/622msec)
lz4 fast dec: read: IOPS=1775k, BW=6932MiB/s (7269MB/s)(4000MiB/577msec)

Sequencial 4k read:
$ fio --readonly --name=zram_seqread --direct=1 --rw=read --ioengine=psync \
  --numjobs=4 --iodepth=1 --group_reporting=1 --filename=/dev/block/zram0 \
  --bs=4K --size=1000M

lzo-rle: read: IOPS=1816k, BW=7092MiB/s (7437MB/s)(4000MiB/564msec)
lz4: read: IOPS=1907k, BW=7449MiB/s (7811MB/s)(4000MiB/537msec)
lz4 fast dec: read: IOPS=2004k, BW=7828MiB/s (8208MB/s)(4000MiB/511msec)

Compression ratio from /sys/block/zram0/mm_stat
lzo-rle: 1048576000 -> 81969152
lz4: 1048576000 -> 86200320

zstd was also considered. It offers really nice compression ratio,
1048576000 -> 59899904, but the throughput and latency are so much
worse than lz4 and lzo-rle. It is probably more suitable for traditional
desktop/server swap setup with less aggressive swappiness value. It can
also help alleviate high memory pressure situation by compressing the
RAM to smaller size.

Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Signed-off-by: redducc <sushmit718@gmail.com>
2023-12-20 05:00:19 +00:00
Adithya R
024cc997ad sky: rootdir: Import init.kernel.post_boot.sh 2023-12-20 05:00:19 +00:00
redducc
e17de932d1 sky: Fixup dtbo location 2023-12-20 05:00:19 +00:00
redducc
f143609fe1 sky: Update perf stack from CLO LA.QSSI.14.0.r1 2023-12-20 05:00:19 +00:00
redducc
9c060a0f94 sky: Fix up peak refresh rate overlay 2023-12-20 05:00:19 +00:00
redducc
7ce8bab216 sky: Copy some necessary vndk libs from source
Signed-off-by: redducc <sushmit718@gmail.com>
2023-12-20 05:00:19 +00:00
markakash
5414c07182 sky: overlay: Specify ambient color temperature sensor
* E DisplayPowerController[0]: failed to set up display white-balance: java.lang.IllegalStateException: cannot find sensor com.google.sensor.color
2023-12-20 05:00:19 +00:00
Wei Wang
c36bf8058b sky: init.target.rc: enable zram on boot_complete
This help to save ~50ms in boot time and bootanim shown time

Bug: 62957152
Test: boot and swap look normal after boot
Change-Id: Idda2cc2aafca2f98f3c1faf4d1a08c7ae3203483
Signed-off-by: saikiran2001 <bjsaikiran@gmail.com>
2023-12-20 05:00:19 +00:00
someone5678
3ab9244c04 sky: fstab: Mount zram partition
Change-Id: Ie2f2d0e2e000814fa1810e5bcfefdf369e2b31d3
Signed-off-by: saikiran2001 <bjsaikiran@gmail.com>
2023-12-20 05:00:19 +00:00
redducc
2094aa7db3 sky: rootdir: Drop useless partitions from fstab 2023-12-20 05:00:19 +00:00
Sunil Ravi
519a16df9d sky: wifi: Disable TDLS offchannel
* Only for certification, disable it in production builds

Test: Basic wifi sanity test
Change-Id: I4bef76edb8663835953e45274805c5e15dfea808
Signed-off-by: saikiran2001 <bjsaikiran@gmail.com>
2023-12-20 04:57:27 +00:00
Adithya R
38ee178d8b sky: Enable QCRIL radio power saving 2023-12-20 04:57:27 +00:00
kerneltoast
de5263837d sky: wifi: Relax WiFi re-association RSSI thresholds
Change-Id: I073f08eed69b2454e1fd2350c8f7e8bb8983641b
2023-12-20 04:57:27 +00:00
redducc
ab2ac1e5f5 sky: Adjust Auto brightness debounce values 2023-12-18 01:37:26 -05:00
redducc
6d229237a4 sky: rootdir: Remove CAF input boost
Change-Id: I4fd567962dac1e043139eb01ae756ad00a67c528
2023-12-18 01:37:26 -05:00
redducc
5eb5c10845 sky: Import perf script from aospa tree
* https://github.com/AOSPA/android_device_xiaomi_sky/blob/uvite/rootdir/etc/init.sky.perf.rc
2023-12-18 01:37:26 -05:00
YuKongA
77d94a4bdc sky: Set config_displayLightSensorType to xiaomi.sensor.ambientlight.raw
* At least this will make the auto-brightness work
2023-12-18 01:37:26 -05:00
redducc
32cce5f8be sky: Define vendor.sys.thermal.data.path 2023-12-18 01:37:26 -05:00
saikiran2001
d7f13998f8 sky: Import Thermal limits stack from stock 2023-12-18 01:37:26 -05:00
saikiran2001
197ade0062 sky: Build android.hardware.thermal@2.0-service.qti-v2 from source
Prebuilt one isn't working anymore -
10-22 10:17:52.513  3045  3045 E android.hardware.thermal@2.0-service.qti-v2: ThermalHAL not initialized properly.
10-22 10:17:52.515  4110  4375 E ThermalHalWrapper: Couldn't get temperatures because of HAL error: ThermalHAL not initialized properly.
2023-12-18 01:37:26 -05:00
redducc
ceb81d8ca2 sky: Patch libhme.so to work with libstdc++_vendor.so 2023-12-18 01:37:26 -05:00
redducc
e76cd8fe04 sky: Build libstdc++ from source 2023-12-18 01:37:26 -05:00
redducc
4c60874c85 sky: Add vndk fwk blobs from stock 2023-12-18 01:37:26 -05:00
redducc
b952b763f7 sky: Add refresh rate props 2023-12-18 01:37:26 -05:00
saikiran2001
6ee5254f93 sky: Add missing drm lib 2023-12-18 01:37:26 -05:00
Dyneteve
0343f7573f sky: Configure default light sensor type
Fixes adaptive brightness after r35 merge
2023-12-18 01:37:26 -05:00
Lostark13
1a2d253b9a sky: Rework dalvik configurations 2023-12-18 01:37:26 -05:00
Lostark13
72443f5a5a sky: sepolicy: Address proximity denials 2023-12-18 01:37:26 -05:00
sashascurtu
efaa844d97 sky: Build sensorservice 1.0 HAL
Fixes:
W HidlServiceManagement: Waited one second for android.frameworks.sensorservice@1.0::ISensorManager/default
I hwservicemanager: Since android.frameworks.sensorservice@1.0::ISensorManager/default is not registered, trying to start it as a lazy HAL.
I HidlServiceManagement: getService: Trying again for android.frameworks.sensorservice@1.0::ISensorManager/default...
W libc    : Unable to set property ctl.interface_start to android.frameworks.sensorservice@1.0::ISensorManager/default: error code: 0x20

Change-Id: If6fdef9dc39daaba9138fe3f8acf06cb6a0e78f8
2023-12-18 01:37:26 -05:00
redducc
b7ba3bcce6 sky: Build some json packages 2023-12-18 01:37:26 -05:00
redducc
649632afc0 sky: Fixup sfps location 2023-12-18 01:37:26 -05:00
redducc
40fb43eaf2 sky: Label health hal 2023-12-18 01:37:26 -05:00
redducc
6e826883ee sky: Drop telephony injection 2023-12-18 01:37:26 -05:00
redducc
a0389ce8ed sky: Add some prebuilt usb and agm libs from stock 2023-12-18 01:37:26 -05:00
Fabian Leutenegger
3f2190f9f6 sky: healthd-ext: Fix charge_counter and ETA values
Based on 137843ec4f

Co-authored-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Change-Id: I3d000d283302a84ee9fcbd5a85ef26817b68c0a7
2023-12-18 01:37:26 -05:00
chrisl7
b9ba4af581 sky: healthd-ext: Define override to QTI AIDL healthd-ext hal
Change-Id: I26009b1f20c02219dd371ad184cad4eafb9e8eec
2023-12-18 01:37:26 -05:00
chrisl7
227cc6e4e0 sky: healthd-ext: Rename hal to xiaomi to avoid compilation conflicts
Change-Id: I8f33b6870eccfd19272cfbdb816b5b53371012c5
2023-12-18 01:37:26 -05:00
Fenglin Wu
4e2e727acc sky: healthd-ext: update VINTF manifest version to 2
Update VINTF manifest version to 2 to match with the latest definition
in android.hardware.health.IHealth AIDL interface.

Change-Id: Iabf4165c52cca95ff8aa75a67bbc61f4c102bb9e
(cherry picked from commit ad957d158ad1d53193536a2e0cee016836d90cd0)
2023-12-18 01:37:26 -05:00
Fenglin Wu
56f8e4aea2 sky: healthd-ext: Update AIDL HAL service installation paths
Update the installation path for vendor and recovery partition
respectively.

Change-Id: I1908d10d782127f555e2fb316f3640bc93efcdbd
2023-12-18 01:37:26 -05:00
Fenglin Wu
1e9c52eead sky: healthd-ext: Add suspend support for charger mode
Override ChargerEnableSuspend() function to true to support kernel
suspend and resume in charger mode.

Change-Id: I01ceaecf7e918504624b2bf1bfb34207fcde74e7
2023-12-18 01:37:26 -05:00
Fenglin Wu
729ec5510e sky: healthd-ext: Add health HAL AIDL implementation
Add health HAL AIDL implementation which is a service running for
both health HAL and charger mode.

Change-Id: I1f3205d1e34d93ed1739d5fa29c95a8f2b2d2894
2023-12-18 01:37:26 -05:00
redducc
89e512ebe4 sky: Update to android.hardware.power@1.3 2023-12-18 01:37:26 -05:00
YuKongA
3d93c734f8 sky: Drop qti-telephony-common.jar
Well, there's no way I can fix it easily, so let's throw it away for now.
2023-12-18 01:37:26 -05:00
Shinjo Akane
8ef59f7da9 sky: Build android.hardware.security.rkp-V1-ndk
* Note that the `IRemotelyProvisionedComponent` HAL, and it's
 associated types, used to also be defined in this directory.
 As of Android U, this HAL has been moved to a different directory
 (../rkp). This move is ABI compatible, as the interfaces have
 been maintained. The build is split so that the generated code
 may be built with different options.

* https://android.googlesource.com/platform/hardware/interfaces/+/refs/tags/android-14.0.0_r1/security/keymint
2023-12-18 01:37:26 -05:00
Master
646cb5f906 sky: Disable sparse image build on all type of file system
We use ext4 type. Sparse image cause mounting issue

Signed-off-by: Master <mhmdeveloperofficial@gmail.com>
2023-12-18 01:37:26 -05:00
Shinjo Akane
2117f8d38b sky: Build libprotobuf-cpp-full-3.9.1-vendorcompat
Signed-off-by: Shinjo Akane <akane@akanework.org>
2023-12-18 01:37:26 -05:00
Sarthak Roy
714b21a6db sky: Switch to Wifi service AIDL 2023-12-18 01:37:26 -05:00
Shinjo Akane
f9956f1bdd sky: Patch all libs to use full libprotobuf
Signed-off-by: Shinjo Akane <akane@akanework.org>
2023-12-18 01:37:26 -05:00
redducc
43fe60aa06 sky: PixelOS bringup 2023-12-18 01:37:25 -05:00
Lostark13
640cd029ce sky: remove some overlays 2023-12-18 01:37:25 -05:00
Lostark13
30c79444c1 sky: Switch to enforcing 2023-12-18 01:37:25 -05:00
Arian
173c312389 sky: Add power HAL extension to handle dt2w 2023-12-18 01:37:25 -05:00
Lostark13
17c0d7f3a2 sky: dont stop cnss on shutdown request 2023-12-18 01:37:25 -05:00
Adithya R
d6f5a2f632 sky: rootdir: Update SSR setup paths
5.10+ platforms use the new remoteproc subsystems.
2023-12-18 01:37:25 -05:00
dianlujitao
8c66383162 fixup: sky: Enable AOSP bluetooth audio HAL v2
Change-Id: I4d12752ae5fb2829d6612647c8740c84967f5434
2023-12-18 01:37:25 -05:00
Lostark13
7be1efd495 sky: Pull thermal engine configs from stock 2023-12-18 01:37:25 -05:00
Lostark13
128d90cff1 sky: Build vibrator 2023-12-18 01:37:25 -05:00
PRANAY BHARGAV BHAVARAJU
bd7e9ef1fa sky: ueventd: Avoid setting permission for /dev/hw_random
Below patch from system/core is setting required access policy
for /dev/hw_random. And CTS test is updated accordingly

https://android-review.googlesource.com/c/platform/system/core/+/2229337
https://android-review.googlesource.com/c/platform/cts/+/2232052

Change-Id: I762dfa3b1e84dee6c49fc178b5b75cf1c134cfb7
2023-12-18 01:37:25 -05:00
Lostark13
c862cb7ed0 sky: use cust acdbdta 2023-12-18 01:37:25 -05:00
Lostark13
ea5a4ce2e2 sky: initial sepolicy
Kanged from los marble
2023-12-18 01:37:23 -05:00
Lostark13
f6d177d805 sky: Add telephony_injection 2023-09-19 14:41:07 +05:30
Lostark13
1dc9b663bb sky: kang patched ims blobs 2023-09-19 14:39:04 +05:30
Lostark13
21c0025d10 sky: Add qcrilNvOpt to fcm 2023-09-19 14:38:24 +05:30
Lostark13
9c4949099e sky: add goodix fingerprint to fcm 2023-09-19 14:37:35 +05:30
Lostark13
b0c125d5a7 sky: uprev gnss to v4 2023-09-19 14:37:35 +05:30
Lostark13
4cbd45022e sky: Uprev qti ims to v11 2023-09-19 14:37:35 +05:30
Lostark13
4aab56fd1e sky: drop some manifest entries 2023-09-19 14:37:08 +05:30
Lostark13
1c15bd4077 sky: vintf: drop fingerprint extensions 2023-09-19 14:36:09 +05:30
Sebastiano Barezzi
581b096c34 sky: Use RSA4096 keys for recovery and vbmeta_system
* Per https://android.googlesource.com/platform/external/avb/+/master/README.md#build-system-integration, SHA256_RSA4096 is used if BOARD_AVB_ALGORITHM isn't defined
* We can assume bootloader is able to understand RSA4096 keys for recovery and vbmeta_system as well

Change-Id: I7325387ed4bf04407629c48bbc2e7126c151c192
2023-09-19 14:36:09 +05:30
Lostark13
b03acbcb10 sky: Fix wifi flags 2023-09-19 14:35:43 +05:30
Lostark13
7857cd9306 sky: Force sysfs fallback for fw loading 2023-09-19 14:35:24 +05:30
Lostark13
298ee19cdc sky: Add permissions for FP hal 2023-09-19 14:35:24 +05:30
xiaowang
569288e2c6 sky: props: Add support for low power adaptive control feature
High power consumption issues were reported for some HS/CK/Speaker
in close range(1 meter) on hastings platform as they may not have
perfect RSSI golden range logic for power control and always request
SOC to increase TX power to max power level. Newer hastings SOC support
LPA power control to avoid unnecessary higher power consumption.

The change enable this soc feature according to value of property.
And disable it for special remote devices which have been added in BL
when new ACL link is created.

If feature is enabled, controllable power level for remote is L0-L9,
BT controller increase it to L10 or L11 according to RSSI and NAK rate.
Otherwise controllable power level for remote is from 0 to max power
level signified in NVM, most likely L11 for hastings.

Signed-off-by: frozenking <frozenking1240196@gmail.com>
2023-09-19 14:35:24 +05:30
dianlujitao
84520fbd88 sky: Disable BT A2DP AAC whitelist.
* Results in some supposedly AAC compatible devices
  like the Samsung Galaxy Buds Live not having it as
  an option despite being a supported codec of the
  device.

Signed-off-by: frozenking <frozenking1240196@gmail.com>
2023-09-19 14:35:24 +05:30
Satheesh Kumar Pallemoni
8144cc9b42 sky: AAC frame control enabled for hal implementation.
- Added below two changes to enable the AAC frame control
when property persist.vendor.bt.a2dp.hal.implementation
has nbeen enabled.

- Send bitrate value to MM on basis of MTU and sample rate.

- A2dpSrc: Calculate bitrate with exact peer MTU value.

Signed-off-by: frozenking <frozenking1240196@gmail.com>
2023-09-19 14:35:24 +05:30
Alexander Koskovich
7131a0815b sky: prop: Enable Qualcomm TrueWireless™ Stereo
Signed-off-by: frozenking <frozenking1240196@gmail.com>
2023-09-19 14:35:24 +05:30
M Safoorah Banu
3a6c348272 sky: Enable TWS plus feature using persist property
- Enable/Disable TWS plus feature support using persist
   property - "persist.vendor.btstack.enable.twsplus"

 - TWS plus feature is supported only if property is set to
   "True" else feature is not supported.By default property
   is set to False.
Signed-off-by: frozenking <frozenking1240196@gmail.com>
2023-09-19 14:35:24 +05:30
Woody Lin
f617d9dd8e sky: Enable zygote critical window
Signed-off-by: frozenking <frozenking1240196@gmail.com>
2023-09-19 14:35:23 +05:30
frozenking
cea073aba1 sky: Load ravelin mediacodecs config
Co-authored-by: johnmart19 <johnivan19999@gmail.com>
2023-09-19 14:35:23 +05:30
Anand
e8be20de54 sky: wifi: Enable automatic channel selection
* Automatic Channel Selection algorithms and implementations
   are used to enable interfaces to automatically figure
   out which channel configuration to use for initiating
   communication, for any mode of operation which initiates
   radiation (AP, Mesh, IBSS, P2P).

   https://wireless.wiki.kernel.org/en/users/documentation/acs

Change-Id:  a0ef55bc7edfd44d07824c34a59001149f5e6dc3
Signed-off-by: frozenking <frozenking1240196@gmail.com>
2023-09-19 14:35:23 +05:30
Arian
6991360cd3 sky: Switch to uninfied supplicant service rc entry
Change-Id: I6cc5a1d062c19be570d5631cb7ea9c760a992aef
2023-09-19 14:35:23 +05:30
Arian
7c0d169c4e sky: Set audio flags
Change-Id: I43706f761ac871638d00c2ca4b14c083de5d9701
2023-09-19 14:35:23 +05:30
Luofan Chen
a4c2b1bc96 sky: Define TARGET_GRALLOC_HANDLE_HAS_RESERVED_SIZE
Otherwise the error happens:

 E qdmetadata: Invalid gralloc handle (at 0x7fc743ec58): ver(12/12) ints(23/22) fds(2/2)
 E qdmetadata: validateAndMap: Private handle is invalid - handle:0x7fc743ec58

Change-Id: Ia62146e8e4bef1342dc964724bd0d088656ad4bc
2023-09-19 14:35:23 +05:30
YuKongA
a8f8c55916 sky: Include bluetooth_audio_policy_configuration_7_0.xml 2023-09-19 14:35:23 +05:30
CBG-leeco
3f37cd0a1b sky: Fix qti_power_hal
* This fixes the following logspam:

E/ QTI PowerHAL: Failed to acquire lock for hint_id: 10A5
2023-09-19 14:35:23 +05:30
YuKongA
8002f7258e sky: Add reserved size of dynamic partition 2023-09-19 14:35:23 +05:30
Arian
6cd4bed6d7 sky: Build libvolumelistener from source
Change-Id: I99b9699d3c01c04ee2afd8e0575cdf0d7a8de76d
2023-09-19 14:35:23 +05:30
Lostark13
31f378e2fc sky: config: Add audio policy configuration from stock 2023-09-19 14:35:23 +05:30
Lostark13
143ea84a43 sky: Fix keymint service 2023-09-19 14:35:23 +05:30
YuKongA
bbf04bcc54 sky: Build vendor.display.config@2.0.vendor 2023-09-19 14:35:23 +05:30
Lostark13
b3cd9b186d sky: Set QCV family skus 2023-09-19 14:35:23 +05:30
Lostark13
c2d256c015 sky: update kernel building 2023-09-19 14:35:23 +05:30
YuKongA
9f1454a66f sky: fix copy kernel modules
- move prebuilts to kernel repo
2023-09-19 14:35:22 +05:30
YuKongA
0d82deff0d sky: import scripts from stock
* Refer to https://github.com/cupid-development/android_device_xiaomi_sm8450-common/tree/lineage-20/rootdir/etc
2023-09-19 14:35:22 +05:30
Kyuofox
f7829db77c sky: Replace libutils with VNDK v32 for display composer
Change-Id: I4079f46bebda0203d5af98b658eee4bcc838ed5b
2023-09-19 14:35:22 +05:30
YuKongA
c77a7db509 sky: Import config.fs from https://git.codelinaro.org/clo/la/device/qcom/common/-/blob/qcom-devices.lnx.7.0.r1-rel 2023-09-19 14:35:22 +05:30
YuKongA
3d75b8d816 sky: Add A/B syslink 2023-09-19 14:34:58 +05:30
Lostark13
66b3a6c29b sky: Build vendor 2023-09-19 14:34:19 +05:30
YuKongA
0fff79c645 sky: import hidl from https://github.com/cupid-development/android_device_xiaomi_sm8450-common/tree/lineage-20/hidl 2023-09-19 14:32:19 +05:30
YuKongA
c2d413341f sky: Import compatibility_matrix.xml
* from https://git.codelinaro.org/clo/la/device/qcom/common/-/blob/qcom-devices.lnx.7.0.r1-rel/compatibility_matrix.xml
2023-09-19 14:30:58 +05:30
Lostark13
0b73b67eed sky: Import manifest_ravelin 2023-09-19 14:30:48 +05:30
YuKongA
671cba6fd9 sky: import props from stock 2023-09-18 19:55:11 +05:30
807 changed files with 24598 additions and 7878 deletions

View File

@@ -6,6 +6,25 @@
soong_namespace {
imports: [
"hardware/google/interfaces",
"hardware/google/pixel",
"hardware/qcom-caf/bootctrl",
"vendor/qcom/opensource/commonsys-intf/display",
"hardware/xiaomi",
],
}
// Wi-Fi firmware symlinks
install_symlink {
name: "firmware_adrastea_wlan_mac.bin_symlink",
installed_location: "firmware/wlan/qca_cld/adrastea/wlan_mac.bin",
symlink_target: "/mnt/vendor/persist/adrastea/wlan_mac.bin",
vendor: true,
}
install_symlink {
name: "firmware_adrastea_WCNSS_qcom_cfg.ini_symlink",
installed_location: "firmware/wlan/qca_cld/adrastea/WCNSS_qcom_cfg.ini",
symlink_target: "/vendor/etc/wifi/adrastea/WCNSS_qcom_cfg.ini",
vendor: true,
}

View File

@@ -10,14 +10,43 @@ ifeq ($(TARGET_DEVICE),sky)
include $(call all-makefiles-under,$(LOCAL_PATH))
include $(CLEAR_VARS)
# A/B builds require us to create the mount points at compile time.
FIRMWARE_MOUNT_POINT := $(TARGET_OUT_VENDOR)/firmware_mnt
$(FIRMWARE_MOUNT_POINT): $(LOCAL_INSTALLED_MODULE)
@echo "Creating $(FIRMWARE_MOUNT_POINT)"
@mkdir -p $(TARGET_OUT_VENDOR)/firmware_mnt
BT_FIRMWARE_MOUNT_POINT := $(TARGET_OUT_VENDOR)/bt_firmware
$(BT_FIRMWARE_MOUNT_POINT): $(LOCAL_INSTALLED_MODULE)
@echo "Creating $(BT_FIRMWARE_MOUNT_POINT)"
@mkdir -p $(TARGET_OUT_VENDOR)/bt_firmware
DSP_MOUNT_POINT := $(TARGET_OUT_VENDOR)/dsp
$(DSP_MOUNT_POINT): $(LOCAL_INSTALLED_MODULE)
@echo "Creating $(DSP_MOUNT_POINT)"
@mkdir -p $(TARGET_OUT_VENDOR)/dsp
VM_SYSTEM_MOUNT_POINT := $(TARGET_OUT_VENDOR)/vm-system
$(VM_SYSTEM_MOUNT_POINT): $(LOCAL_INSTALLED_MODULE)
@echo "Creating $(VM_SYSTEM_MOUNT_POINT)"
@mkdir -p $(TARGET_OUT_VENDOR)/vm-system
ALL_DEFAULT_INSTALLED_MODULES += \
$(FIRMWARE_MOUNT_POINT) \
$(BT_FIRMWARE_MOUNT_POINT) \
$(DSP_MOUNT_POINT) \
$(VM_SYSTEM_MOUNT_POINT)
# Symlinks
IMS_LIBS := libimscamera_jni.so libimsmedia_jni.so
IMS_SYMLINKS := $(addprefix $(TARGET_OUT_SYSTEM_EXT_APPS_PRIVILEGED)/Ims/lib/arm64/,$(notdir $(IMS_LIBS)))
IMS_SYMLINKS := $(addprefix $(TARGET_OUT_SYSTEM_EXT_APPS_PRIVILEGED)/ims/lib/arm64/,$(notdir $(IMS_LIBS)))
$(IMS_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "IMS lib link: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf /system_ext/lib64/$(notdir $@) $@
ALL_DEFAULT_INSTALLED_MODULES += $(IMS_SYMLINKS)
ALL_DEFAULT_INSTALLED_MODULES += \
$(IMS_SYMLINKS)
endif

View File

@@ -6,8 +6,3 @@
PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/lineage_sky.mk
COMMON_LUNCH_CHOICES := \
lineage_sky-eng \
lineage_sky-userdebug \
lineage_sky-user

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2023 The Android Open Source Project
# Copyright (C) 2024 The Android Open Source Project
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -8,6 +8,7 @@
-include vendor/xiaomi/sky/BoardConfigVendor.mk
DEVICE_PATH := device/xiaomi/sky
KERNEL_PATH := $(DEVICE_PATH)-kernel
# A/B
AB_OTA_UPDATER := true
@@ -17,6 +18,7 @@ AB_OTA_PARTITIONS += \
dtbo \
odm \
product \
recovery \
system \
system_ext \
vbmeta \
@@ -27,16 +29,25 @@ AB_OTA_PARTITIONS += \
# Architecture
TARGET_ARCH := arm64
TARGET_ARCH_VARIANT := armv8-a
TARGET_ARCH_VARIANT := armv8-2a-dotprod
TARGET_CPU_ABI := arm64-v8a
TARGET_CPU_ABI2 :=
TARGET_CPU_VARIANT := generic
TARGET_CPU_VARIANT := cortex-a76
TARGET_CPU_VARIANT_RUNTIME := kryo300
TARGET_2ND_ARCH := arm
TARGET_2ND_ARCH_VARIANT := armv7-a-neon
TARGET_2ND_CPU_ABI := armeabi-v7a
TARGET_2ND_CPU_ABI2 := armeabi
TARGET_2ND_CPU_VARIANT := generic
# Audio
$(call soong_config_set, android_hardware_audio, run_64bit, true)
AUDIO_FEATURE_ENABLED_DLKM := true
AUDIO_FEATURE_ENABLED_DTS_EAGLE := false
AUDIO_FEATURE_ENABLED_GEF_SUPPORT := true
AUDIO_FEATURE_ENABLED_HW_ACCELERATED_EFFECTS := false
AUDIO_FEATURE_ENABLED_INSTANCE_ID := true
AUDIO_FEATURE_ENABLED_PAL_HIDL := true
AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
BOARD_SUPPORTS_OPENSOURCE_STHAL := true
TARGET_USES_QCOM_MM_AUDIO := true
# Boot control
SOONG_CONFIG_NAMESPACES += ufsbsg
@@ -44,54 +55,116 @@ SOONG_CONFIG_ufsbsg += ufsframework
SOONG_CONFIG_ufsbsg_ufsframework := bsg
# Bootloader
PRODUCT_PLATFORM := parrot
TARGET_BOOTLOADER_BOARD_NAME := sky
TARGET_NO_BOOTLOADER := false
TARGET_USES_REMOTEPROC := true
TARGET_NO_KERNEL := false
TARGET_USES_UEFI := true
TARGET_NO_BOOTLOADER := true
TARGET_BOARD_INFO_FILE := $(DEVICE_PATH)/board-info.txt
# Build
BUILD_BROKEN_DUP_RULES := true
BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true
BUILD_BROKEN_VENDOR_PROPERTY_NAMESPACE := true
# Display
TARGET_SCREEN_DENSITY := 396
TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS := true
TARGET_GRALLOC_HANDLE_HAS_CUSTOM_CONTENT_MD_RESERVED_SIZE := false
TARGET_GRALLOC_HANDLE_HAS_RESERVED_SIZE := true
TARGET_USES_DISPLAY_RENDER_INTENTS := true
TARGET_USES_GRALLOC4 := true
TARGET_USES_HWC2 := true
MAX_VIRTUAL_DISPLAY_DIMENSION := 4096
NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
# Fstab
PRODUCT_COPY_FILES += \
$(DEVICE_PATH)/rootdir/etc/fstab.default:$(TARGET_COPY_OUT_VENDOR_RAMDISK)/first_stage_ramdisk/fstab.default
# DRM
TARGET_ENABLE_MEDIADRM_64 := true
# DTB
BOARD_USES_DT := true
BOARD_PREBUILT_DTBIMAGE_DIR := $(KERNEL_PATH)/dtbs
BOARD_PREBUILT_DTBOIMAGE := $(KERNEL_PATH)/dtbs/dtbo.img
# Init
TARGET_INIT_VENDOR_LIB := //$(DEVICE_PATH):libinit_sky
TARGET_RECOVERY_DEVICE_MODULES := libinit_sky
# Filesystem
TARGET_FS_CONFIG_GEN := $(DEVICE_PATH)/configs/config.fs
# FM
BOARD_HAVE_QCOM_FM := true
# Kernel
TARGET_KERNEL_ARCH := arm64
TARGET_KERNEL_HEADER_ARCH := arm64
BOARD_KERNEL_PAGESIZE := 4096
BOARD_KERNEL_BASE := 0x00000000
BOARD_KERNEL_CMDLINE := \
video=vfb:640x400,bpp=32,memsize=3072000 \
disable_dma32=on \
swinfo.fingerprint=$(LINEAGE_VERSION) \
mtdoops.fingerprint=$(LINEAGE_VERSION)
BOARD_BOOTCONFIG := \
androidboot.hardware=qcom \
androidboot.memcg=1 \
androidboot.usbcontroller=a600000.dwc3 \
androidboot.init_fatal_reboot_target=recovery
BOARD_BOOT_HEADER_VERSION := 4
BOARD_MKBOOTIMG_ARGS := --header_version $(BOARD_BOOT_HEADER_VERSION)
BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
TARGET_COMPILE_WITH_MSM_KERNEL := false
TARGET_FORCE_PREBUILT_KERNEL := true
BOARD_EXCLUDE_KERNEL_FROM_RECOVERY_IMAGE := true
BOARD_KERNEL_IMAGE_NAME := Image
BOARD_KERNEL_BASE := 0x00000000
BOARD_KERNEL_PAGESIZE := 4096
BOARD_KERNEL_TAGS_OFFSET := 0x01E00000
BOARD_RAMDISK_OFFSET := 0x02000000
BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive
BOARD_KERNEL_CMDLINE := video=vfb:640x400,bpp=32,memsize=3072000 bootinfo.fingerprint=$(LINEAGE_VERSION) mtdoops.fingerprint=$(LINEAGE_VERSION)
BOARD_KERNEL_CMDLINE += firmware_class.path=/vendor/firmware
BOARD_KERNEL_CMDLINE += console=ttyMSM0,115200n8 earlycon msm_geni_serial.con_enabled=1 androidboot.selinux=permissive audit=0
BOARD_BOOTCONFIG := androidboot.hardware=qcom androidboot.memcg=1 androidboot.usbcontroller=a600000.dwc3
BOARD_BOOTCONFIG += androidboot.console=ttyMSM0
BOARD_RAMDISK_USE_LZ4 := true
BOARD_INCLUDE_DTB_IN_BOOTIMG := true
BOARD_USES_GENERIC_KERNEL_IMAGE := true
TARGET_PREBUILT_KERNEL := $(DEVICE_PATH)/prebuilts/kernel
BOARD_PREBUILT_DTBOIMAGE := $(DEVICE_PATH)/prebuilts/dtbo.img
# Kill lineage kernel build task while preserving kernel
TARGET_NO_KERNEL_OVERRIDE := true
# Workaround to make lineage's soong generator work
TARGET_KERNEL_SOURCE := $(KERNEL_PATH)/kernel-headers
# Sepolicy - XiaomiParts
SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += \
$(DEVICE_PATH)/sepolicy/private/xiaomi/devicesettings
# Kernel Binary
TARGET_KERNEL_VERSION := 5.10
LOCAL_KERNEL := $(KERNEL_PATH)/Image
PRODUCT_COPY_FILES += \
$(LOCAL_KERNEL):kernel
# Kernel modules
BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD := $(strip $(shell cat $(KERNEL_PATH)/vendor_ramdisk/modules.load))
BOARD_VENDOR_RAMDISK_KERNEL_MODULES := $(addprefix $(KERNEL_PATH)/vendor_ramdisk/, $(BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD))
BOARD_VENDOR_RAMDISK_KERNEL_MODULES_BLOCKLIST_FILE := $(KERNEL_PATH)/vendor_ramdisk/modules.blocklist
# Also add recovery modules to vendor ramdisk
BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD := $(strip $(shell cat $(KERNEL_PATH)/vendor_ramdisk/modules.load.recovery))
RECOVERY_MODULES := $(addprefix $(KERNEL_PATH)/vendor_ramdisk/, $(BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD))
# Prevent duplicated entries (to solve duplicated build rules problem)
BOARD_VENDOR_RAMDISK_KERNEL_MODULES := $(sort $(BOARD_VENDOR_RAMDISK_KERNEL_MODULES) $(RECOVERY_MODULES))
# Vendor modules (installed to vendor_dlkm)
BOARD_VENDOR_KERNEL_MODULES_LOAD := $(strip $(shell cat $(KERNEL_PATH)/vendor_dlkm/modules.load))
BOARD_VENDOR_KERNEL_MODULES := $(addprefix $(KERNEL_PATH)/vendor_dlkm/, $(BOARD_VENDOR_KERNEL_MODULES_LOAD))
BOARD_VENDOR_KERNEL_MODULES_BLOCKLIST_FILE := $(KERNEL_PATH)/vendor_dlkm/modules.blocklist
# Lineage Health
TARGET_HEALTH_CHARGING_CONTROL_CHARGING_PATH := /sys/class/qcom-battery/input_suspend
TARGET_HEALTH_CHARGING_CONTROL_CHARGING_ENABLED := 0
TARGET_HEALTH_CHARGING_CONTROL_CHARGING_DISABLED := 1
TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_BYPASS := false
# Malloc
MALLOC_SVELTE := true
# Metadata
BOARD_USES_METADATA_PARTITION := true
# OTA assert
TARGET_OTA_ASSERT_DEVICE := sky, skyin
# Partitions
BOARD_FLASH_BLOCK_SIZE := 131072 # (BOARD_KERNEL_PAGESIZE * 64)
@@ -100,17 +173,17 @@ BOARD_BOOTIMAGE_PARTITION_SIZE := 100663296
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 104857600
BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE := 100663296
BOARD_SUPER_PARTITION_SIZE := 9126805504
BOARD_SUPER_PARTITION_SIZE := 6979321856
BOARD_SUPER_PARTITION_GROUPS := qti_dynamic_partitions
BOARD_QTI_DYNAMIC_PARTITIONS_PARTITION_LIST := odm product system system_ext vendor vendor_dlkm
BOARD_QTI_DYNAMIC_PARTITIONS_SIZE := 9122611200
BOARD_QTI_DYNAMIC_PARTITIONS_SIZE := 6975127552
BOARD_PARTITION_LIST := $(call to-upper, $(BOARD_QTI_DYNAMIC_PARTITIONS_PARTITION_LIST))
$(foreach p, $(BOARD_PARTITION_LIST), $(eval BOARD_$(p)IMAGE_FILE_SYSTEM_TYPE := ext4))
$(foreach p, $(BOARD_PARTITION_LIST), $(eval TARGET_COPY_OUT_$(p) := $(call to-lower, $(p))))
BOARD_PREBUILT_ODMIMAGE := $(DEVICE_PATH)/prebuilts/odm.img
BOARD_PREBUILT_VENDORIMAGE := $(DEVICE_PATH)/prebuilts/vendor.img
BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_VENDOR_DLKMIMAGE_FILE_SYSTEM_TYPE := ext4
TARGET_COPY_OUT_ODM := odm
TARGET_COPY_OUT_PRODUCT := product
@@ -118,69 +191,98 @@ TARGET_COPY_OUT_SYSTEM_EXT := system_ext
TARGET_COPY_OUT_VENDOR := vendor
TARGET_COPY_OUT_VENDOR_DLKM := vendor_dlkm
TARGET_USERIMAGES_USE_F2FS := true
BOARD_USES_VENDOR_DLKMIMAGE := true
BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := f2fs
# Platform
TARGET_BOARD_PLATFORM := parrot
TARGET_BOARD_PLATFORM_GPU := qcom-adreno613
QCOM_BOARD_PLATFORMS += parrot
BOARD_USES_QCOM_HARDWARE := true
# Disable sparse on all filesystem images
TARGET_USERIMAGES_SPARSE_EROFS_DISABLED := true
TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
TARGET_USERIMAGES_SPARSE_F2FS_DISABLED := true
# Power
TARGET_POWER_LIBPERFMGR_MODE_EXTENSION_LIB := //$(DEVICE_PATH):libperfmgr-ext-xiaomi
# Properties
TARGET_ODM_PROP += $(DEVICE_PATH)/configs/properties/odm.prop
TARGET_PRODUCT_PROP += $(DEVICE_PATH)/configs/properties/product.prop
TARGET_SYSTEM_PROP += $(DEVICE_PATH)/configs/properties/system.prop
TARGET_SYSTEM_EXT_PROP += $(DEVICE_PATH)/configs/properties/system_ext.prop
TARGET_VENDOR_PROP += $(DEVICE_PATH)/configs/properties/vendor.prop
# Recovery
TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"
TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/rootdir/etc/fstab.default
BOARD_HAS_LARGE_FILESYSTEM := true
TARGET_USERIMAGES_USE_F2FS := true
BOARD_USES_RECOVERY_AS_BOOT := false
BOARD_EXCLUDE_KERNEL_FROM_RECOVERY_IMAGE := true
BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT := false
# RIL
ENABLE_VENDOR_RIL_SERVICE := true
# Vendor boot
BOARD_VENDOR_RAMDISK_FRAGMENTS := dlkm
BOARD_VENDOR_RAMDISK_FRAGMENT.dlkm.KERNEL_MODULE_DIRS := top
BOARD_VENDOR_RAMDISK_KERNEL_MODULES := $(wildcard $(DEVICE_PATH)/prebuilts/modules/ramdisk/*.ko)
BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD := $(strip $(shell cat $(DEVICE_PATH)/prebuilts/modules/ramdisk/modules.load))
BOARD_VENDOR_RAMDISK_KERNEL_MODULES_BLOCKLIST_FILE := $(DEVICE_PATH)/prebuilts/modules/ramdisk/modules.blocklist
BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD := $(strip $(shell cat $(DEVICE_PATH)/prebuilts/modules/ramdisk/modules.load.recovery))
# Screen density
TARGET_SCREEN_DENSITY := 440
# Vendor_dlkm
BOARD_VENDOR_KERNEL_MODULES := $(wildcard $(DEVICE_PATH)/prebuilts/modules/vendor/*.ko)
BOARD_VENDOR_KERNEL_MODULES_LOAD := $(strip $(shell cat $(DEVICE_PATH)/prebuilts/modules/vendor/modules.load))
BOARD_VENDOR_KERNEL_MODULES_BLOCKLIST_FILE := $(DEVICE_PATH)/prebuilts/modules/vendor/modules.blocklist
# Security patch level
VENDOR_SECURITY_PATCH := 2024-08-01
# Sepolicy
include device/qcom/sepolicy/SEPolicy.mk
include device/qcom/sepolicy_vndr/SEPolicy.mk
include device/lineage/sepolicy/libperfmgr/sepolicy.mk
SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/private
SELINUX_IGNORE_NEVERALLOWS := true
SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/public
BOARD_VENDOR_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/vendor
# Vendor Boot
PRODUCT_COPY_FILES += \
$(DEVICE_PATH)/rootdir/etc/fstab.default:$(TARGET_COPY_OUT_VENDOR_RAMDISK)/first_stage_ramdisk/fstab.default
# Verified Boot
BOARD_AVB_ENABLE := true
BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 3
BOARD_MOVE_GSI_AVB_KEYS_TO_VENDOR_BOOT := true
BOARD_AVB_RECOVERY_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
BOARD_AVB_RECOVERY_ALGORITHM := SHA256_RSA2048
BOARD_AVB_RECOVERY_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem
BOARD_AVB_RECOVERY_ALGORITHM := SHA256_RSA4096
BOARD_AVB_RECOVERY_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
BOARD_AVB_RECOVERY_ROLLBACK_INDEX_LOCATION := 1
BOARD_AVB_VBMETA_SYSTEM := system system_ext product
BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA2048
BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem
BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA4096
BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 2
# VINTF
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := $(DEVICE_PATH)/configs/vintf/compatibility_matrix.device.xml
DEVICE_MANIFEST_SKUS := ravelin
DEVICE_MATRIX_FILE := $(DEVICE_PATH)/configs/vintf/compatibility_matrix.xml
DEVICE_MANIFEST_RAVELIN_FILES := \
$(DEVICE_PATH)/configs/vintf/manifest_ravelin.xml
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \
$(DEVICE_PATH)/configs/vintf/vendor_framework_compatibility_matrix.xml \
$(DEVICE_PATH)/configs/vintf/xiaomi_framework_compatibility_matrix.xml \
vendor/lineage/config/device_framework_matrix.xml
ODM_MANIFEST_SKUS += hceese hcesim hcesim1 hcesim1ese hcesimese
ODM_MANIFEST_HCEESE_FILES := $(DEVICE_PATH)/configs/vintf/manifest_hceese.xml
ODM_MANIFEST_HCESIM_FILES := $(DEVICE_PATH)/configs/vintf/manifest_hcesim.xml
ODM_MANIFEST_HCESIM1_FILES := $(DEVICE_PATH)/configs/vintf/manifest_hcesim1.xml
ODM_MANIFEST_HCESIM1ESE_FILES := $(DEVICE_PATH)/configs/vintf/manifest_hcesim1ese.xml
ODM_MANIFEST_HCESIMESE_FILES := $(DEVICE_PATH)/configs/vintf/manifest_hcesimese.xml
# VNDK
BOARD_VNDK_VERSION := current
# WiFi
BOARD_WLAN_DEVICE := qcwcn
BOARD_HOSTAPD_DRIVER := NL80211
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
CONFIG_ACS := true
QC_WIFI_HIDL_FEATURE_DUAL_AP := true
QC_WIFI_HIDL_FEATURE_DUAL_STA := true
WIFI_DRIVER_STATE_CTRL_PARAM := "/dev/wlan"
WIFI_DRIVER_STATE_OFF := "OFF"
WIFI_DRIVER_STATE_ON := "ON"
WIFI_HIDL_FEATURE_AWARE := true
WIFI_HIDL_FEATURE_DUAL_INTERFACE := true
WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
WPA_SUPPLICANT_VERSION := VER_0_8_X

View File

@@ -1 +1,24 @@
# device_xiaomi_sky
# Xiaomi Redmi Note 12R/Redmi 12 5G/POCO M6 Pro 5G (Sky/River)
This device tree is for the Xiaomi Redmi Note 12R, Redmi 12 5G, and POCO M6 Pro 5G, all codenamed "Sky" or "River".
## Device Specifications
| Feature | Specification |
|---|---|
| **CPU** | Octa-core<br>2x Cortex-A78 @ 2.2GHz<br>6x Cortex-A55 @ 2.0GHz |
| **Chipset** | Qualcomm Snapdragon 4 Gen 2 Mobile Platform<br>(Samsung Foundry's 4nm FinFET) |
| **GPU** | Qualcomm Adreno 619 |
| **Memory** | 4GB / 6GB / 8GB LPDDR4x |
| **Storage** | 128GB / 256GB UFS 2.2 |
| **Display** | 6.79-inch FHD+ (1080p) IPS LCD<br>90Hz refresh rate<br>240Hz touch sampling rate<br>550 nits peak brightness |
| **Rear Camera** | 50MP (wide), f/1.8, PDAF<br>2MP (depth), f/2.4 |
| **Front Camera** | 8MP (wide), f/2.0, 1.12µm |
| **Battery** | 5000mAh (typ) Li-Polymer |
| **Dimensions** | 168.60 x 76.28 x 8.17 mm<br>199g |
| **Shipped Android Version** | 13.0 |
| **Release Date** | August 1, 2023 (Global) |
## Device Image
![Redmi 12 5G](https://i05.appmifile.com/964_item_it/07/10/2023/21c12381e99dc35091df4536b8fcf237!600x600!85.png)

13
RemovePackages/Android.mk Normal file
View File

@@ -0,0 +1,13 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := RemovePackages
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_TAGS := optional
LOCAL_OVERRIDES_PACKAGES := \
Aperture \
MusicFX
LOCAL_UNINSTALLABLE_MODULE := true
LOCAL_CERTIFICATE := PRESIGNED
LOCAL_SRC_FILES := /dev/null
include $(BUILD_PREBUILT)

11
biometrics/Android.bp Normal file
View File

@@ -0,0 +1,11 @@
//
// Copyright (C) 2023 The LineageOS Project
//
// SPDX-License-Identifier: Apache-2.0
//
cc_library_shared {
name: "libvendor.goodix.hardware.biometrics.fingerprint@2.1",
shared_libs: ["vendor.goodix.hardware.biometrics.fingerprint@2.1"],
vendor_available: true,
}

View File

@@ -1 +1 @@
require board=parrot|sky
require board=parrot|sky|river

546
configs/WCNSS_qcom_cfg.ini Normal file
View File

@@ -0,0 +1,546 @@
# This file allows user to override the factory
# defaults for the WLAN Driver
# Enable IMPS or not
gEnableImps=1
# Enable BMPS or not
gEnableBmps=1
# Phy Mode (auto, b, g, n, etc)
# Valid values are 0-9, with 0 = Auto, 4 = 11n, 9 = 11ac
# 1 = 11abg, 2 = 11b, 3 = 11g, 5 = 11g only, 6 = 11n only
# 7 = 11b only 8 = 11ac only.
gDot11Mode=0
# Assigned MAC Addresses - This will be used until NV items are in place
# Each byte of MAC address is represented in Hex format as XX
Intf0MacAddress=000AF58989FF
Intf1MacAddress=000AF58989FE
Intf2MacAddress=000AF58989FD
Intf3MacAddress=000AF58989FC
# UAPSD service interval for VO,VI, BE, BK traffic
InfraUapsdVoSrvIntv=0
InfraUapsdViSrvIntv=0
InfraUapsdBeSrvIntv=0
InfraUapsdBkSrvIntv=0
# Flag to allow STA send AddTspec even when ACM is Off
gAddTSWhenACMIsOff=1
# Flags to filter Mcast and Bcast RX packets.
# Value 0: No filtering, 1: Filter all Multicast.
# 2: Filter all Broadcast. 3: Filter all Mcast abd Bcast
McastBcastFilter=3
#Flag to enable HostARPOffload feature or not
hostArpOffload=1
#Flag to enable HostNSOffload feature or not
hostNSOffload=1
# 802.11n Protection flag
gEnableApProt=1
#Enable OBSS protection
gEnableApOBSSProt=0
#Enable/Disable UAPSD for SoftAP
gEnableApUapsd=1
# Fixed Rate
gFixedRate=0
# Maximum Tx power
# gTxPowerCap=30
# Fragmentation Threshold
# gFragmentationThreshold=2346
# RTS threshold
RTSThreshold=1048576
# Intra-BSS forward
gDisableIntraBssFwd=0
# WMM Enable/Disable
WmmIsEnabled=0
# 802.11d support
g11dSupportEnabled=0
# 802.11h support
g11hSupportEnabled=1
# DFS Master Capability
gEnableDFSMasterCap=1
# ESE Support and fast transition
EseEnabled=0
ImplicitQosIsEnabled=0
gNeighborScanTimerPeriod=200
gNeighborLookupThreshold=85
gNeighborScanChannelMinTime=20
gNeighborScanChannelMaxTime=30
gMaxNeighborReqTries=3
# Legacy (non-ESE, non-802.11r) Fast Roaming Support
# To enable, set FastRoamEnabled=1
# To disable, set FastRoamEnabled=0
FastRoamEnabled=1
# Check if the AP to which we are roaming is better than current AP in
# terms of RSSI. Checking is disabled if set to Zero.Otherwise it will
# use this value as to how better the RSSI of the new/roamable AP should
# be for roaming
RoamRssiDiff=5
# To enable, set gRoamIntraBand=1 (Roaming within band)
# To disable, set gRoamIntraBand=0 (Roaming across band)
gRoamIntraBand=0
#Short Guard Interval Enable/disable
gShortGI20Mhz=1
gShortGI40Mhz=1
#Auto Shutdown Value in seconds. A value of 0 means Auto shutoff is disabled
gAPAutoShutOff=0
#Auto Shutdown wlan : Value in Seconds. 0 means disabled. Max 1 day = 86400 sec
gWlanAutoShutdown = 0
# Not used.
gApAutoChannelSelection=0
#Preferred band (both or 2.4 only or 5 only)
BandCapability=0
#Channel Bonding
gChannelBondingMode5GHz=1
#Say gGoKeepAlivePeriod(5 seconds) and gGoLinkMonitorPeriod(10 seconds).
#For every 10 seconds DUT send Qos Null frame(i.e., Keep Alive frame if link
#is idle for last 10 seconds.) For both active and power save clients.
#Power save clients: DUT set TIM bit from 10th second onwards and till client
#honors TIM bit. If doesn't honor for 5 seconds then DUT remove client.
#Active clients: DUT send Qos Null frame for 10th seconds onwards if it is not
#success still we try on 11th second if not tries on 12th and so on till 15th
#second. Hence before disconnection DUT will send 5 NULL frames. Hence in any
#case DUT will detect client got removed in (10+5) seconds.
#i.e., (gGoKeepAlivePeriod + gGoLinkMonitorPeriod)..
#gGoLinkMonitorPeriod/ gApLinkMonitorPeriod is period where link is idle and
#it is period where we send NULL frame.
#gApLinkMonitorPeriod = 10
#gGoLinkMonitorPeriod = 10
#gGoKeepAlivePeriod/gApKeepAlivePeriod is time to spend to check whether frame
#are succeed to send or not. Hence total effective detection time is
# (gGoLinkMonitorPeriod + gGoKeepAlivePeriod) /
# (gApLinkMonitorPeriod + gApKeepAlivePeriod)
gGoKeepAlivePeriod = 20
gApKeepAlivePeriod = 20
#If set will start with active scan after driver load, otherwise will start with
#passive scan to find out the domain
gEnableBypass11d=1
#If set to 0, will not scan DFS channels
gEnableDFSChnlScan=1
# Enable DFS channel roam
# 0: DISABLE, 1: ENABLED_NORMAL, 2: ENABLED_ACTIVE
gAllowDFSChannelRoam=1
gVhtChannelWidth=2
#Data Inactivity Timeout when in powersave (in ms)
gDataInactivityTimeout=200
# Set txchainmask and rxchainmask
# These parameters are used only if gEnable2x2 is 0
# Valid values are 1,2
# Set gSetTxChainmask1x1=1 or gSetRxChainmask1x1=1 to select chain0.
# Set gSetTxChainmask1x1=2 or gSetRxChainmask1x1=2 to select chain1.
gSetTxChainmask1x1=1
gSetRxChainmask1x1=1
# Scan Timing Parameters
# gPassiveMaxChannelTime=110
# gPassiveMinChannelTime=60
gActiveMaxChannelTime=40
gActiveMinChannelTime=20
#If set to 0, MCC is not allowed.
gEnableMCCMode=1
# MCC to SCC Switch mode:
# 0-Disable
# 1-Enable
# 2-Force SCC if same band, with SAP restart
# 3-Force SCC if same band, without SAP restart by sending (E)CSA
# 4-Force SCC if same band (or) use SAP mandatory channel for DBS,
# without SAP restart by sending (E)CSA
gWlanMccToSccSwitchMode = 3
# 1=enable STBC; 0=disable STBC
gEnableRXSTBC=1
# 1=enable tx STBC; 0=disable
gEnableTXSTBC=1
# 1=enable rx LDPC; 0=disable
gEnableRXLDPC=1
#Enable/Disable Tx beamforming
gTxBFEnable=1
#Enable/Disable Tx beamformee in SAP mode
gEnableTxBFeeSAP=1
# Enable Tx beamforming in VHT20MHz
# Valid values are 0,1. If commented out, the default value is 0.
# 0=disable, 1=enable
gEnableTxBFin20MHz=1
#Enable/Disable SU Tx beamformer support.
gEnableTxSUBeamformer=1
gEnableFastRoamInConcurrency=1
#Maxium Channel time in msec
gMaxMediumTime = 6000
# 802.11K support
gRrmEnable=1
#Enable Power Save offload
gOptimizedPowerManagement=2
#Enable firmware uart print
gEnablefwprint=0
# Firmware log mode
# Valid values are 0,1,2
# 0=Disable, 1=WMI, 2=DIAG
gEnablefwlog=1
# Maximum Receive AMPDU size (VHT only. Valid values:
# 0->8k 1->16k 2->32k 3->64k 4->128k)
gVhtAmpduLenExponent=7
# Maximum MPDU length (VHT only. Valid values:
# 0->3895 octets, 1->7991 octets, 2->11454 octets)
gVhtMpduLen=2
# Maximum number of wow filters required
#gMaxWoWFilters=22
# WOW Enable/Disable.
# 0 - Disable both magic pattern match and pattern byte match.
# 1 - Enable magic pattern match on all interfaces.
# 2 - Enable pattern byte match on all interfaces.
# 3 - Enable both magic pattern and pattern byte match on all interfaces.
# Default value of gEnableWoW is 3.
# gEnableWoW=0
# Enable or Disable MCC Adaptive Scheduler at the FW
# 1=Enable (default), 0=Disable
gEnableMCCAdaptiveScheduler=1
#Enable or Disable p2p device address administered
isP2pDeviceAddrAdministrated=0
# Remove Overlap channel restriction
gEnableOverLapCh=0
#Enable VHT on 2.4Ghz
gEnableVhtFor24GHzBand=1
#Disable 40M on 2.4g
gChannelBondingMode24GHz=0
#Maximum number of offload peers supported
# gMaxOffloadPeers=2
# controlling the following offload patterns
# through ini parameter. Default value is 1
# to disable set it to zero. ssdp = 0
# Setup multicast pattern for mDNS 224.0.0.251,
# SSDP 239.255.255.250 and LLMNR 224.0.0.252
ssdp=0
#Enable Memory Deep Sleep
gEnableMemDeepSleep=1
# Regulatory Setting; 0=STRICT; 1=CUSTOM
gRegulatoryChangeCountry=1
# RA filtering rate limit param, the current value would not
# help if the lifetime in RA is less than 3*60=3min. Then
# we need to change it, though it is uncommon.
# gRAFilterEnable=0
gRArateLimitInterval=600
# Maximum number of concurrent connections
gMaxConcurrentActiveSessions=3
# Disable/Enable GreenAP
# 0 to disable, 1 to enable, default: 1
gEnableGreenAp=0
# Radar PRI multiplier
gDFSradarMappingPriMultiplier=4
gPNOScanSupport=1
#Enable/Disable LPASS support
# 0 to disable, 1 to enable
gEnableLpassSupport=1
# Whether userspace country code setting shld have priority
gCountryCodePriority=1
# Enable(1)/Disable(0) SIFS burst
gEnableSifsBurst=3
# Enable or Disable Multi-user MIMO
# 1=Enable (default), 0=Disable
gEnableMuBformee=1
# Enable/Disable channel avoidance for SAP in SCC scenario
# 0 - disable
# 1 - enable
gSapSccChanAvoidance=0
# Inactivity time (in ms) to end TX Service Period while in IBSS power save mode
gIbssTxSpEndInactivityTime=10
# Enable TDLS External Control. That is, user space application has to
# first configure a peer MAC in wlan driver towards which TDLS is desired.
# Device will establish TDLS only towards those configured peers whenever
# TDLS criteria (throughput and RSSI threshold) is met and teardown TDLS
# when teardown criteria (idle packet count and RSSI) is met. However,
# device will accept TDLS connection if it is initiated from any other peer,
# even if that peer is not configured.
# 0 - disable
# 1 - enable
# For TDLS External Control, Implicit Trigger must also be enabled.
gTDLSExternalControl=1
# Enable support for TDLS off-channel operation
# 0 - disable
# 1 - enable
# TDLS off-channel operation will be invoked when there is only one
# TDLS connection.
gEnableTDLSOffChannel=0
# Enable or Disable Random MAC (Spoofing)
# 1=Enable (default), 0=Disable
gEnableMacAddrSpoof=1
################ Datapath feature set Begin ################
# Bus bandwidth threshold values in terms of number of packets
gBusBandwidthHighThreshold=2000
gBusBandwidthMediumThreshold=500
gBusBandwidthLowThreshold=150
# Bus bandwidth compute timeout value in ms
gBusBandwidthComputeInterval=100
# VHT Tx/Rx MCS values
# Valid values are 0,1,2. If commented out, the default value is 0.
# 0=MCS0-7, 1=MCS0-8, 2=MCS0-9
gVhtRxMCS=2
gVhtTxMCS=2
# VHT Tx/Rx MCS values for 2x2
# Valid values are 0,1,2. If commented out, the default value is 0.
# 0=MCS0-7, 1=MCS0-8, 2=MCS0-9
gEnable2x2=1
gVhtRxMCS2x2=2
gVhtTxMCS2x2=2
#IPA config is a bit mask and following are the configurations.
#bit0 IPA Enable
#bit1 IPA PRE Filter enable
#bit2 IPv6 enable
#bit3 IPA Resource Manager (RM) enable
#bit4 IPA Clock scaling enable
#bit5 IPA uC ENABLE
#bit6 IPA uC STA ENABLE
#bit8 IPA Real Time Debugging
gIPAConfig=0x7d
gIPADescSize=800
# Enable/Disable RX full reorder offload
gReorderOffloadSupported=1
# Enable CE classification
# 1 - enable(default) 0 - disable
gCEClassifyEnable=1
# Enable Rx handling options
# Rx_thread=1 RPS=2(default for ROME) NAPI=4(default for ihelium)
rx_mode=5
# Enable(Tx) fastpath for data traffic.
# 1 - enable(default) 0 - disable
gEnableFastPath=1
# This flag enables IP, TCP and UDP checksum offload
# 1 - enable(default) 0 - disable
gEnableIpTcpUdpChecksumOffload=1
# Enable TCP Segmentation Offload
# 1 - enable 0 - disable
TSOEnable=1
# Enable Generic Receive Offload
# 1 - enable(default) 0 - disable
GROEnable=1
# Enable HT MPDU Density
# 4 for 2 micro sec
ght_mpdu_density=4
# Enable flow steering to enable multiple CEs for Rx flows.
# Multiple Rx CEs<==>Multiple Rx IRQs<==>probably different CPUs.
# Parallel Rx paths.
# 1 - enable 0 - disable(default)
gEnableFlowSteering=1
# Time in microseconds after which a NAPI poll must yield
ce_service_max_yield_time=500
#Maximum number of HTT messages to be processed per NAPI poll
ce_service_max_rx_ind_flush=1
# Maximum number of MSDUs the firmware will pack in one HTT_T2H_MSG_TYPE_RX_IN_ORD_PADDR_IND
maxMSDUsPerRxInd=8
# Enable NUD tracking feature
# 1 - enable 0 - disable(default)
gEnableNUDTracking=1
# Enable PEER UNMAP CONF SUPPORT
# 1 - enable 0 - disable(default)
gEnablePeerUnmapConfSupport=1
rpsRxQueueCpuMapList=f3
################ Datapath feature set End ################
################ NAN feature set start ###################
# Enable NAN discovery (NAN 1.0)
# 1 - enable 0 - disable(default)
gEnableNanSupport=1
# Enable NAN Datapath
genable_nan_datapath=1
################ NAN feature set end #####################
adaptive_dwell_mode_enabled=1
hostscan_adaptive_dwell_mode=1
adapt_dwell_lpf_weight=80
adapt_dwell_wifi_act_threshold=10
MAWCEnabled=0
# Enable/Disable rtt sta mac randomization
enable_rtt_mac_randomization=1
#Enable/Disable SNR monitoring
gEnableSNRMonitoring=1
# Allow STA+SAP SCC on DFS channel with master mode support disabled
g_sta_sap_scc_on_dfs_chan=1
# Enable ETSI SRD channels by Xiaomi. Qualcom default value is disable
etsi13_srd_chan_in_master_mode=3
# Rx thread affinity mask in UL case
RX_THREAD_UL_CPU_AFFINITY_MASK=0xc0
#Sets RSSI preference for 5GHz over 2.4GHz AP
gSelect5GHzMargin=5
#RSSI threshold offset for 2G to 5G roam
roam_bad_rssi_thresh_offset_2g=0
#Set station burst duration
sta_scan_burst_duration=120
#RSSI threshold for background roam
roam_bg_scan_bad_rssi_thresh=-76
gEnablePacketLog=1
read_mac_addr_from_mac_file=1
#enable indoor channel in SAP mode
gindoor_channel_support=1
#Enable/Disable Modulated DTIM feature
gEnableModulatedDTIM=3
#Set MaxLIModulate Dtim
gMaxLIModulatedDTIM=3
#Sets dense roam RSSI Threshold diff
groam_dense_rssi_thresh_offset=5
#traffic Threshold required for dense roam scan
gtraffic_threshold=50
gRoamBmissFirstBcnt=10
gRoamBmissFinalBcnt=20
#To Enable/Disable PER based Roaming in FW
gper_roam_enabled=3
#ARP access category
arp_ac_category=0
#Enable/Disable LPRx
gEnableLPRx=0
gEnableSelfRecovery=1
#Enable/Disable FT open feature
enable_ftopen=0
# Packet Log buffer size
PktlogBufSize=1
# Enable Keep alive with non-zero period value
gStaKeepAlivePeriod = 30
gEnableSARV1toSARV2=1
#Enable max link speed
gReportMaxLinkSpeed=2
#APF: Android Packet Filter
gActiveMcBcBpfMode=1
#Allow STA+SAP SCC on DFS channel
#set ini np_chan_weight value to 1,
#then DFS channel will be most likely put at last in available chanlist and
#DFS channel will be the last choice when no other normal channel can be used.
#If config chanlist with DFS channels only, SAP still can be started on DFS channel successfully.
np_chan_weight=1
END
# Note: Configuration parser would not read anything past the END marker

View File

@@ -0,0 +1,457 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- Copyright (c) 2016-2021, The Linux Foundation. All rights reserved
Not a Contribution.
-->
<!-- Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
Changes from Qualcomm Innovation Center are provided under the following license:
Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted (subject to the limitations in the
disclaimer below) provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Qualcomm Innovation Center, Inc. nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<audioPolicyConfiguration version="7.0" xmlns:xi="http://www.w3.org/2001/XInclude">
<!-- version section contains a “version” tag in the form “major.minor” e.g version=”1.0” -->
<!-- Global configuration Decalaration -->
<globalConfiguration speaker_drc_enabled="true" call_screen_mode_supported="true"/>
<!-- Modules section:
There is one section per audio HW module present on the platform.
Each module section will contains two mandatory tags for audio HAL “halVersion” and “name”.
The module names are the same as in current .conf file:
“primary”, “A2DP”, “remote_submix”, “USB”
Each module will contain the following sections:
“devicePorts”: a list of device descriptors for all input and output devices accessible via this
module.
This contains both permanently attached devices and removable devices.
“mixPorts”: listing all output and input streams exposed by the audio HAL
“routes”: list of possible connections between input and output devices or between stream and
devices.
"route": is defined by an attribute:
-"type": <mux|mix> means all sources are mutual exclusive (mux) or can be mixed (mix)
-"sink": the sink involved in this route
-"sources": all the sources than can be connected to the sink via vis route
“attachedDevices”: permanently attached devices.
The attachedDevices section is a list of devices names. The names correspond to device names
defined in <devicePorts> section.
“defaultOutputDevice”: device to be used by default when no policy rule applies
-->
<modules>
<!-- Primary Audio HAL -->
<module name="primary" halVersion="2.0">
<attachedDevices>
<item>Earpiece</item>
<item>Speaker</item>
<item>Telephony Tx</item>
<item>Built-In Mic</item>
<item>Built-In Back Mic</item>
<item>FM Tuner</item>
<item>Telephony Rx</item>
</attachedDevices>
<defaultOutputDevice>Speaker</defaultOutputDevice>
<mixPorts>
<mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_FAST AUDIO_OUTPUT_FLAG_PRIMARY">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort>
<mixPort name="raw" role="source"
flags="AUDIO_OUTPUT_FLAG_FAST AUDIO_OUTPUT_FLAG_RAW">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort>
<mixPort name="haptics output" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO_HAPTIC_A"/>
</mixPort>
<mixPort name="deep_buffer" role="source"
flags="AUDIO_OUTPUT_FLAG_DEEP_BUFFER">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort>
<mixPort name="mmap_no_irq_out" role="source" flags="AUDIO_OUTPUT_FLAG_DIRECT AUDIO_OUTPUT_FLAG_MMAP_NOIRQ">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort>
<mixPort name="hifi_playback" role="source" />
<mixPort name="direct_pcm" role="source"
flags="AUDIO_OUTPUT_FLAG_DIRECT">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000 128000 176400 192000"
channelMasks="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"/>
<profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000 128000 176400 192000 352800 384000"
channelMasks="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"/>
<profile name="" format="AUDIO_FORMAT_PCM_24_BIT_PACKED"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000 128000 176400 192000 352800 384000"
channelMasks="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"/>
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000 128000 176400 192000 352800 384000"
channelMasks="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"/>
</mixPort>
<mixPort name="compressed_offload" role="source"
flags="AUDIO_OUTPUT_FLAG_DIRECT AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD AUDIO_OUTPUT_FLAG_NON_BLOCKING AUDIO_OUTPUT_FLAG_GAPLESS_OFFLOAD">
<profile name="" format="AUDIO_FORMAT_MP3"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
<profile name="" format="AUDIO_FORMAT_FLAC"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000 128000 176400 192000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
<profile name="" format="AUDIO_FORMAT_ALAC"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000 128000 176400 192000"
channelMasks="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"/>
<profile name="" format="AUDIO_FORMAT_APE"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000 128000 176400 192000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
<profile name="" format="AUDIO_FORMAT_AAC_LC"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
<profile name="" format="AUDIO_FORMAT_AAC_HE_V1"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
<profile name="" format="AUDIO_FORMAT_AAC_HE_V2"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
<profile name="" format="AUDIO_FORMAT_DTS"
samplingRates="32000 44100 48000"
channelMasks="AUDIO_CHANNEL_OUT_MONO AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_2POINT1 AUDIO_CHANNEL_OUT_QUAD AUDIO_CHANNEL_OUT_PENTA AUDIO_CHANNEL_OUT_5POINT1"/>
<profile name="" format="AUDIO_FORMAT_DTS_HD"
samplingRates="32000 44100 48000 64000 88200 96000 128000 176400 192000"
channelMasks="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"/>
<profile name="" format="AUDIO_FORMAT_WMA"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000"
channelMasks="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"/>
<profile name="" format="AUDIO_FORMAT_WMA_PRO"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000"
channelMasks="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"/>
<profile name="" format="AUDIO_FORMAT_VORBIS"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000 128000 176400 192000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
<profile name="" format="AUDIO_FORMAT_AAC_ADTS_LC"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
<profile name="" format="AUDIO_FORMAT_AAC_ADTS_HE_V1"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
<profile name="" format="AUDIO_FORMAT_AAC_ADTS_HE_V2"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
</mixPort>
<mixPort name="voice_tx" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000 16000 48000" channelMasks="AUDIO_CHANNEL_OUT_MONO AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort>
<mixPort name="voip_rx" role="source"
flags="AUDIO_OUTPUT_FLAG_VOIP_RX">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000 16000 32000 48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort>
<mixPort name="incall_music_uplink" role="source"
flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000 16000 48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort>
<mixPort name="primary input" role="sink" maxOpenCount="2" maxActiveCount="2">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_IN_FRONT_BACK"/>
</mixPort>
<mixPort name="fast input" role="sink"
flags="AUDIO_INPUT_FLAG_FAST">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_IN_FRONT_BACK"/>
</mixPort>
<mixPort name="quad mic" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_INDEX_MASK_4"/>
</mixPort>
<mixPort name="voip_tx" role="sink"
flags="AUDIO_INPUT_FLAG_VOIP_TX">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000 16000 32000 48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
<mixPort name="usb_surround_sound" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 88200 96000 176400 192000"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_IN_FRONT_BACK AUDIO_CHANNEL_INDEX_MASK_3 AUDIO_CHANNEL_INDEX_MASK_4 AUDIO_CHANNEL_IN_5POINT1 AUDIO_CHANNEL_INDEX_MASK_6 AUDIO_CHANNEL_INDEX_MASK_8"/>
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 88200 96000 176400 192000"
channelMasks="AUDIO_CHANNEL_IN_5POINT1 AUDIO_CHANNEL_INDEX_MASK_6 AUDIO_CHANNEL_INDEX_MASK_8"/>
<profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 88200 96000 176400 192000"
channelMasks="AUDIO_CHANNEL_IN_5POINT1 AUDIO_CHANNEL_INDEX_MASK_6 AUDIO_CHANNEL_INDEX_MASK_8"/>
</mixPort>
<mixPort name="record_24" role="sink" maxOpenCount="2" maxActiveCount="2">
<profile name="" format="AUDIO_FORMAT_PCM_24_BIT_PACKED"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 96000 192000"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_IN_FRONT_BACK AUDIO_CHANNEL_INDEX_MASK_3 AUDIO_CHANNEL_INDEX_MASK_4"/>
<profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 96000 192000"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_IN_FRONT_BACK AUDIO_CHANNEL_INDEX_MASK_3 AUDIO_CHANNEL_INDEX_MASK_4"/>
<profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000 96000 192000"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_IN_FRONT_BACK AUDIO_CHANNEL_INDEX_MASK_3 AUDIO_CHANNEL_INDEX_MASK_4"/>
</mixPort>
<mixPort name="voice_rx" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000 16000 48000" channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
<mixPort name="mmap_no_irq_in" role="sink" flags="AUDIO_INPUT_FLAG_MMAP_NOIRQ">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_IN_FRONT_BACK AUDIO_CHANNEL_INDEX_MASK_3"/>
</mixPort>
<mixPort name="hifi_input" role="sink" />
</mixPorts>
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
<devicePort tagName="Earpiece" type="AUDIO_DEVICE_OUT_EARPIECE" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
</devicePort>
<devicePort tagName="Speaker" role="sink" type="AUDIO_DEVICE_OUT_SPEAKER" address="">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="Wired Headset" type="AUDIO_DEVICE_OUT_WIRED_HEADSET" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="Wired Headphones" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="Line" type="AUDIO_DEVICE_OUT_LINE" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000 16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
</devicePort>
<devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000 16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
</devicePort>
<devicePort tagName="BT SCO Car Kit" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000 16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
</devicePort>
<devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000 16000" channelMasks="AUDIO_CHANNEL_OUT_MONO AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="HDMI" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000 11025 16000 22050 32000 44100 48000 64000 88200 96000 128000 176400 192000"/>
</devicePort>
<devicePort tagName="Proxy" type="AUDIO_DEVICE_OUT_PROXY" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000 11025 16000 22050 32000 44100 48000 64000 88200 96000 128000 176400 192000"/>
</devicePort>
<devicePort tagName="FM" type="AUDIO_DEVICE_OUT_FM" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_MONO AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="USB Device Out" type="AUDIO_DEVICE_OUT_USB_DEVICE" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="44100 48000 64000 88200 96000 128000 176400 192000"/>
</devicePort>
<devicePort tagName="USB Headset Out" type="AUDIO_DEVICE_OUT_USB_HEADSET" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="44100 48000 64000 88200 96000 128000 176400 192000"/>
</devicePort>
<!-- Input devices declaration, i.e. Source DEVICE PORT -->
<devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_IN_FRONT_BACK"/>
</devicePort>
<devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_IN_FRONT_BACK"/>
</devicePort>
<devicePort tagName="FM Tuner" type="AUDIO_DEVICE_IN_FM_TUNER" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
</devicePort>
<devicePort tagName="Wired Headset Mic" type="AUDIO_DEVICE_IN_WIRED_HEADSET" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000"
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_IN_FRONT_BACK"/>
</devicePort>
<devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000 16000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</devicePort>
<devicePort tagName="Telephony Rx" type="AUDIO_DEVICE_IN_TELEPHONY_RX" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000 16000 48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</devicePort>
<devicePort tagName="USB Device In" type="AUDIO_DEVICE_IN_USB_DEVICE" role="source">
</devicePort>
<devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source">
</devicePort>
</devicePorts>
<!-- route declaration, i.e. list all available sources for a given sink -->
<routes>
<route type="mix" sink="Earpiece"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out,haptics output"/>
<route type="mix" sink="Speaker"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out,haptics output"/>
<route type="mix" sink="Wired Headset"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out,haptics output"/>
<route type="mix" sink="Wired Headphones"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out,haptics output"/>
<route type="mix" sink="Line"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out,haptics output"/>
<route type="mix" sink="HDMI"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,haptics output"/>
<route type="mix" sink="Proxy"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,haptics output"/>
<route type="mix" sink="FM"
sources="primary output"/>
<route type="mix" sink="BT SCO"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,haptics output"/>
<route type="mix" sink="BT SCO Headset"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,haptics output"/>
<route type="mix" sink="BT SCO Car Kit"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,haptics output"/>
<route type="mix" sink="USB Device Out"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out,hifi_playback,haptics output"/>
<route type="mix" sink="USB Headset Out"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx,mmap_no_irq_out,hifi_playback,haptics output"/>
<route type="mix" sink="Telephony Tx"
sources="voice_tx,incall_music_uplink"/>
<route type="mix" sink="voice_rx"
sources="Telephony Rx"/>
<route type="mix" sink="primary input"
sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic,FM Tuner,Telephony Rx"/>
<route type="mix" sink="usb_surround_sound"
sources="USB Device In,USB Headset In"/>
<route type="mix" sink="fast input"
sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In,Wired Headset Mic"/>
<route type="mix" sink="quad mic"
sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In,Wired Headset Mic"/>
<route type="mix" sink="voip_tx"
sources="Built-In Mic,Built-In Back Mic,BT SCO Headset Mic,USB Device In,USB Headset In,Wired Headset Mic"/>
<route type="mix" sink="record_24"
sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic"/>
<route type="mix" sink="mmap_no_irq_in"
sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,USB Device In,USB Headset In"/>
<route type="mix" sink="hifi_input" sources="USB Device In,USB Headset In" />
</routes>
</module>
<!-- A2DP Audio HAL -->
<!-- <module name="a2dp" halVersion="2.0">
<mixPorts>
<mixPort name="a2dp input" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="44100 48000" channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
</mixPorts>
<devicePorts>
<devicePort tagName="BT A2DP In" type="AUDIO_DEVICE_IN_BLUETOOTH_A2DP" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="44100 48000" channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
</devicePort>
</devicePorts>
<routes>
<route type="mix" sink="a2dp input"
sources="BT A2DP In"/>
</routes>
</module> -->
<!-- Usb Audio HAL -->
<module name="usb" halVersion="2.0">
<mixPorts>
<mixPort name="usb_accessory output" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort>
</mixPorts>
<devicePorts>
<devicePort tagName="USB Host Out" type="AUDIO_DEVICE_OUT_USB_ACCESSORY" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
</devicePorts>
<routes>
<route type="mix" sink="USB Host Out"
sources="usb_accessory output"/>
</routes>
</module>
<!-- Remote Submix Audio HAL -->
<xi:include href="/vendor/etc/r_submix_audio_policy_configuration.xml"/>
<!-- Bluetooth Audio HAL -->
<xi:include href="/vendor/etc/bluetooth_audio_policy_configuration_7_0.xml"/>
</modules>
<!-- End of Modules section -->
<!-- Volume section -->
<xi:include href="/vendor/etc/audio_policy_volumes.xml"/>
<xi:include href="/vendor/etc/default_volume_tables.xml"/>
<!-- End of Volume section -->
</audioPolicyConfiguration>

230
configs/config.fs Normal file
View File

@@ -0,0 +1,230 @@
[AID_VENDOR_QTI_DIAG]
value:2901
[AID_VENDOR_QDSS]
value:2902
[AID_VENDOR_RFS]
value:2903
[AID_VENDOR_RFS_SHARED]
value:2904
[AID_VENDOR_ADPL_ODL]
value:2905
[AID_VENDOR_QRTR]
value:2906
[AID_VENDOR_THERMAL]
value:2907
[AID_VENDOR_FASTRPC]
value:2908
[AID_VENDOR_QTR]
value:2909
[vendor/bin/wcnss_filter]
mode: 0755
user: AID_BLUETOOTH
group: AID_BLUETOOTH
caps: BLOCK_SUSPEND
[system/vendor/bin/wcnss_filter]
mode: 0755
user: AID_BLUETOOTH
group: AID_BLUETOOTH
caps: BLOCK_SUSPEND
[vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti]
mode: 0755
user: AID_BLUETOOTH
group: AID_BLUETOOTH
caps: BLOCK_SUSPEND NET_ADMIN
[system/vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti]
mode: 0755
user: AID_SYSTEM
group: AID_SYSTEM
caps: BLOCK_SUSPEND NET_ADMIN
[vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti-lazy]
mode: 0755
user: AID_BLUETOOTH
group: AID_BLUETOOTH
caps: BLOCK_SUSPEND NET_ADMIN
[system/vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti-lazy]
mode: 0755
user: AID_SYSTEM
group: AID_SYSTEM
caps: BLOCK_SUSPEND NET_ADMIN
[system/bin/cnss-daemon]
mode: 0755
user: AID_BLUETOOTH
group: AID_BLUETOOTH
caps: NET_BIND_SERVICE
[vendor/bin/pm-service]
mode: 0755
user: AID_SYSTEM
group: AID_SYSTEM
caps: NET_BIND_SERVICE
[system/vendor/bin/pm-service]
mode: 0755
user: AID_SYSTEM
group: AID_SYSTEM
caps: NET_BIND_SERVICE
[system/bin/pm-service]
mode: 0755
user: AID_SYSTEM
group: AID_SYSTEM
caps: NET_BIND_SERVICE
[vendor/bin/pd-mapper]
mode: 0755
user: AID_SYSTEM
group: AID_SYSTEM
caps: NET_BIND_SERVICE
[system/vendor/bin/pd-mapper]
mode: 0755
user: AID_SYSTEM
group: AID_SYSTEM
caps: NET_BIND_SERVICE
[system/bin/pd-mapper]
mode: 0755
user: AID_SYSTEM
group: AID_SYSTEM
caps: NET_BIND_SERVICE
[vendor/bin/imsdatadaemon]
mode: 0755
user: AID_RADIO
group: AID_RADIO
caps: NET_BIND_SERVICE
[system/vendor/bin/imsdatadaemon]
mode: 0755
user: AID_RADIO
group: AID_RADIO
caps: NET_BIND_SERVICE
[vendor/bin/ims_rtp_daemon]
mode: 0755
user: AID_RADIO
group: AID_RADIO
caps: NET_BIND_SERVICE
[system/vendor/bin/ims_rtp_daemon]
mode: 0755
user: AID_RADIO
group: AID_RADIO
caps: NET_BIND_SERVICE
[vendor/bin/imsrcsd]
mode: 0755
user: AID_RADIO
group: AID_RADIO
caps: NET_BIND_SERVICE BLOCK_SUSPEND WAKE_ALARM
[system/vendor/bin/imsrcsd]
mode: 0755
user: AID_RADIO
group: AID_RADIO
caps: NET_BIND_SERVICE BLOCK_SUSPEND WAKE_ALARM
[vendor/bin/imsdaemon]
mode: 0755
user: AID_RADIO
group: AID_RADIO
caps: NET_BIND_SERVICE BLOCK_SUSPEND WAKE_ALARM
[vendor/bin/cnd]
mode: 0755
user: AID_SYSTEM
group: AID_SYSTEM
caps: NET_BIND_SERVICE BLOCK_SUSPEND NET_ADMIN
[system/vendor/bin/cnd]
mode: 0755
user: AID_SYSTEM
group: AID_SYSTEM
caps: NET_BIND_SERVICE BLOCK_SUSPEND NET_ADMIN
[vendor/bin/slim_daemon]
mode: 0755
user: AID_GPS
group: AID_GPS
caps: NET_BIND_SERVICE
[system/vendor/bin/slim_daemon]
mode: 0755
user: AID_GPS
group: AID_GPS
caps: NET_BIND_SERVICE
[vendor/bin/loc_launcher]
mode: 0755
user: AID_GPS
group: AID_GPS
caps: SETUID SETGID
[system/vendor/bin/loc_launcher]
mode: 0755
user: AID_GPS
group: AID_GPS
caps: SETUID SETGID
[vendor/bin/xtwifi-client]
mode: 0755
user: AID_GPS
group: AID_GPS
caps: NET_BIND_SERVICE BLOCK_SUSPEND WAKE_ALARM
[vendor/bin/sensors.qti]
mode: 0755
user: AID_SYSTEM
group: AID_SYSTEM
caps: NET_BIND_SERVICE
[firmware/]
mode: 0771
user: AID_SYSTEM
group: AID_SYSTEM
caps: 0
[firmware/image/*]
mode: 0771
user: AID_SYSTEM
group: AID_SYSTEM
caps: 0
[vendor/firmware_mnt/image/*]
mode: 0771
user: AID_SYSTEM
group: AID_SYSTEM
caps: 0
[bt_firmware/]
mode: 0771
user: AID_SYSTEM
group: AID_SYSTEM
caps: 0
[persist/]
mode: 0771
user: AID_SYSTEM
group: AID_SYSTEM
caps: 0
[dsp/]
mode: 0771
user: AID_MEDIA
group: AID_MEDIA
caps: 0

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2018, 2020 The Linux Foundation. All rights reserved. -->
<!-- -->
<!-- Redistribution and use in source and binary forms, with or without -->
<!-- modification, are permitted provided that the following conditions are -->
<!-- met: -->
<!-- * Redistributions of source code must retain the above copyright -->
<!-- notice, this list of conditions and the following disclaimer. -->
<!-- * Redistributions in binary form must reproduce the above -->
<!-- copyright notice, this list of conditions and the following -->
<!-- disclaimer in the documentation and/or other materials provided -->
<!-- with the distribution. -->
<!-- * Neither the name of The Linux Foundation nor the names of its -->
<!-- contributors may be used to endorse or promote products derived -->
<!-- from this software without specific prior written permission. -->
<!-- -->
<!-- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -->
<!-- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -->
<!-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -->
<!-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -->
<!-- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -->
<!-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -->
<!-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -->
<!-- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -->
<!-- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -->
<!-- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -->
<!-- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -->
<devices>
<device name="qti-haptics"/>
<device name="qcom-hv-haptics"/>
<device name="drv2624:haptics"/>
<device name="aw8624_haptic"/>
</devices>

439
configs/gps.conf Normal file
View File

@@ -0,0 +1,439 @@
# Error Estimate
# _SET = 1
# _CLEAR = 0
ERR_ESTIMATE=0
#NTP server
NTP_SERVER=1.android.pool.ntp.org
#XTRA CA path
XTRA_CA_PATH=/usr/lib/ssl-1.1/certs
# DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info
# 4 - Debug, 5 - Verbose
# If DEBUG_LEVEL is commented, Android's logging levels will be used
DEBUG_LEVEL = 3
# Intermediate position report, 1=enable, 0=disable
INTERMEDIATE_POS=0
# supl version 1.0
SUPL_VER=0x20004
# Emergency SUPL, 1=enable, 0=disable
SUPL_ES=0
#Choose PDN for Emergency SUPL
#1 - Use emergency PDN
#0 - Use regular SUPL PDN for Emergency SUPL
USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=0
#SUPL_MODE is a bit mask set in config.xml per carrier by default.
#If it is uncommented here, this value will overwrite the value from
#config.xml.
#MSA=0X2
#MSB=0X1
SUPL_MODE=3
# GPS Capabilities bit mask
# SCHEDULING = 0x01
# MSB = 0x02
# MSA = 0x04
# ON_DEMAND_TIME = 0x10
# default = ON_DEMAND_TIME | MSA | MSB | SCHEDULING
CAPABILITIES=0x17
# Accuracy threshold for intermediate positions
# less accurate positions are ignored, 0 for passing all positions
ACCURACY_THRES=70
################################
##### AGPS server settings #####
################################
# FOR SUPL SUPPORT, set the following
# SUPL_HOST=supl.host.com or IP
# SUPL_PORT=1234
# FOR MO SUPL SUPPORT, set the following
# MO_SUPL_HOST=supl.host.com or IP
# MO_SUPL_PORT=1234
# FOR C2K PDE SUPPORT, set the following
# C2K_HOST=c2k.pde.com or IP
# C2K_PORT=1234
# Bitmask of slots that are available
# for write/install to, where 1s indicate writable,
# and the default value is 0 where no slots
# are writable. For example, AGPS_CERT_WRITABLE_MASK
# of b1000001010 makes 3 slots available
# and the remaining 7 slots unwritable.
#AGPS_CERT_WRITABLE_MASK=0
####################################
# LTE Positioning Profile Settings
####################################
# LPP_PROFILE is a bit mask
# 0: Enable RRLP on LTE(Default)
# 0x1: LPP User Plane
# 0x2: LPP Control Plane
# 0x4: LPP User Plane for NR5G
# 0x8: LPP Control Plane for NR5G
LPP_PROFILE = 0xf
####################################
#Datum Type
####################################
# 0: WGS-84
# 1: PZ-90
DATUM_TYPE = 0
################################
# EXTRA SETTINGS
################################
# NMEA provider (1=Modem Processor, 0=Application Processor)
NMEA_PROVIDER=0
################################
# NMEA TAG BLOCK GROUPING
################################
# NMEA tag block grouping is only applicable to GSA
# Default is disabled
# 0 - disabled
# 1 - enabled
NMEA_TAG_BLOCK_GROUPING_ENABLED = 0
# Customized NMEA GGA fix quality that can be used to tell
# whether SENSOR contributed to the fix.
#
# When this configuration item is not enabled (set to any value that is not 1),
# GGA fix quality conforms to NMEA standard spec as below:
# PPP/DGNSS/SBAS correction fix w/ or w/o sensor: 2
# RTK fixed fix w/ or w/o sensor: 4
# RTK float fix w/ or w/o sensor: 5
# SPE fix w/ or w/o sensor: 1
# Sensor dead reckoning fix: 6
#
# When this configuration is enabled (set to 1), GGA fix quality
# will be output as below:
# PPP fix w/o sensor: 59, w/ sensor: 69
# DGNSS/SBAS correction fix w/o sensor: 2, w/ sensor: 62
# RTK fixed fix w/o sensor: 4, w/ sensor: 64
# RTK float fix w/o sensor: 5, w/ sensor: 65,
# SPE fix w/o sensor: 1, and w/ sensor: 61
# Sensor dead reckoning fix: 6
#
# any value that is not 1 - disabled
# 1 - enabled
CUSTOM_NMEA_GGA_FIX_QUALITY_ENABLED = 0
################################
# NMEA Reporting Rate Config, valid only when NMEA_PROVIDER is set to "0"
################################
# NMEA Reporting Rate
# Set it to "1HZ" for 1Hz NMEA Reporting
# Set it to "NHZ" for NHz NMEA Reporting
#Default : NHZ (overridden by position update rate if set to lower rates)
NMEA_REPORT_RATE=NHZ
# Mark if it is a SGLTE target (1=SGLTE, 0=nonSGLTE)
SGLTE_TARGET=0
##################################################
# Select Positioning Protocol on A-GLONASS system
##################################################
# 0x1: RRC CPlane
# 0x2: RRLP UPlane
# 0x4: LLP Uplane
A_GLONASS_POS_PROTOCOL_SELECT = 0xf
##################################################
# Select technology for LPPe Control Plane
##################################################
# 0x1: DBH for LPPe CP
# 0x2: WLAN AP Measurements for LPPe CP
# 0x4: SRN AP measurement for CP
# 0x8: Sensor Barometer Measurement LPPe CP
# 0x10: Allow LPPe during non-E911 session over CP
# 0x20: Allow shipping the Civic Address to the server over CP
LPPE_CP_TECHNOLOGY = 0
##################################################
# Select technology for LPPe User Plane
##################################################
# 0x1: DBH for LPPe UP
# 0x2: WLAN AP Measurements for LPPe UP
# 0x4: SRN AP measurement for UP
# 0x8: Sensor Barometer Measurement LPPe UP
# 0x10: Allow LPPe during non-E911 session over UP
# 0x20: Allow shipping the Civic Address to the server over UP
LPPE_UP_TECHNOLOGY = 0
##################################################
# AGPS_CONFIG_INJECT
##################################################
# enable/disable injection of AGPS configurations:
# SUPL_VER
# SUPL_HOST
# SUPL_PORT
# MO_SUPL_HOST
# MO_SUPL_PORT
# C2K_HOST
# C2K_PORT
# LPP_PROFILE
# A_GLONASS_POS_PROTOCOL_SELECT
# 0: disable
# 1: enable
AGPS_CONFIG_INJECT = 1
##################################################
# GNSS settings for automotive use cases
# Configurations in following section are
# specific to automotive use cases, others
# please do not change, keep the default values
##################################################
XTRA_TEST_ENABLED = 1
XTRA_THROTTLE_ENABLED = 0
XTRA_SYSTEM_TIME_INJECT = 1
# AP Coarse Timestamp Uncertainty
##################################################
# default : 10
# AP time stamp uncertainty, until GNSS receiver
# is able to acquire better timing information
AP_TIMESTAMP_UNCERTAINTY = 10
#####################################
# DR_SYNC Pulse Availability
#####################################
# 0 : DR_SYNC pulse not available (default)
# 1 : DR_SYNC pulse available
# This configuration enables the driver to make use
# of PPS events generated by DR_SYNC pulse
# Standard Linux PPS driver needs to be enabled
DR_SYNC_ENABLED = 0
#####################################
# PPS Device name
#####################################
PPS_DEVICENAME = /dev/pps0
#####################################
# Ignore PPS at Startup and after long outage
#####################################
IGNORE_PPS_PULSE_COUNT = 1
#####################################
# Long GNSS RF outage in seconds
#####################################
GNSS_OUTAGE_DURATION = 10
#####################################
# Engine hub timer offset in msec
#####################################
ENGINEHUB_TIMER_OFFSET_MSEC = 200
EHUB_AGGREGATOR_POSITION_AGE_MSEC = 1000
#####################################
# AP Clock Accuracy
#####################################
# Quality of APPS processor clock (in PPM).
# Value specified is used for calculation of
# APPS time stamp uncertainty
AP_CLOCK_PPM = 100
#####################################
# MAX ms difference to detect missing pulse
#####################################
# Specifies time threshold in ms to validate any missing PPS pulses
MISSING_PULSE_TIME_DELTA = 900
#####################################
# Propagation time uncertainty
#####################################
# This settings enables time uncertainty propagation
# logic incase of missing PPS pulse
PROPAGATION_TIME_UNCERTAINTY = 1
#######################################
# APN / IP Type Configuration
# APN and IP Type to use for setting
# up WWAN call.
# Use below values for IP Type:
# v4 = 1
# v6 = 2
# v4v6 = 3
# Values for SUB_ID: 0 (DEFAULT), 1 or 2
#######################################
# INTERNET_APN = abc.xyz
# INTERNET_IP_TYPE = 1
# INTERNET_SUB_ID = 0
# SUPL_APN = abc.xyz
# SUPL_IP_TYPE = 1
# SUPL_APN_SUB2 = abc.xyz
# SUPL_IP_TYPE_SUB2 = 1
#####################################
# Set Roaming
#####################################
# This setting enables/disables
# roaming (disable=0 or enable=1)
# SET_ROAMING = 0
#####################################
# Modem type
#####################################
# This setting configures modem type
# (external=0 or internal=1)
# comment out the next line to vote
# for the first modem in the list
MODEM_TYPE = 1
##################################################
# CONSTRAINED TIME UNCERTAINTY MODE
##################################################
# 0 : disabled (default)
# 1 : enabled
# This setting enables GPS engine to keep its time
# uncertainty below the specified constraint
#CONSTRAINED_TIME_UNCERTAINTY_ENABLED = 0
# If constrained time uncertainty mode is enabled,
# this setting specifies the time uncertainty
# threshold that gps engine need to maintain.
# In unit of milli-seconds.
# Default is 0.0 meaning that modem default value
# of time uncertainty threshold will be used.
#CONSTRAINED_TIME_UNCERTAINTY_THRESHOLD = 0.0
# If constrained time uncertainty mode is enabled,
# this setting specifies the power budget that
# gps engine is allowed to spend to maintain the time
# uncertainty.
# Default is 0 meaning that GPS engine is not constained
# by power budget and can spend as much power as needed.
# In unit of 0.1 milli watt second.
#CONSTRAINED_TIME_UNCERTAINTY_ENERGY_BUDGET = 0
##################################################
# POSITION ASSISTED CLOCK ESTIMATOR
##################################################
# 0 : disabled (default)
# 1 : enabled
# This setting enables GPS engine to estimate clock
# bias and drift when the signal from at least 1
# SV is available and the UEs position is known by
# other position engines.
#POSITION_ASSISTED_CLOCK_ESTIMATOR_ENABLED = 0
#####################################
# package names and NFW entities they control
#####################################
# Each entry below reperesnts an NFW client
# and the package that controls it.
# A package may control more than one NFW client,
# but an NFW client is controlled by one package only
#
# In case multiple attribution app feature is not supported
# all entries below should correspond to the same package name
NFW_CLIENT_CP = com.example.android.locationattribution
NFW_CLIENT_SUPL = com.example.android.locationattribution
NFW_CLIENT_IMS = com.example.android.locationattribution
NFW_CLIENT_SIM = com.example.android.locationattribution
NFW_CLIENT_MDT = com.example.android.locationattribution
NFW_CLIENT_TLOC = com.example.android.locationattribution
NFW_CLIENT_RLOC = com.example.android.locationattribution
NFW_CLIENT_V2X = com.example.android.locationattribution
NFW_CLIENT_R1 = com.example.android.locationattribution
NFW_CLIENT_R2 = com.example.android.locationattribution
NFW_CLIENT_R3 = com.example.android.locationattribution
#####################################
# CP_MTLR_ES
#####################################
# CP MTLR ES, 1=enable, 0=disable
CP_MTLR_ES=0
##################################################
# GNSS_DEPLOYMENT
##################################################
# 0 : Enable QTI GNSS (default)
# 1 : Enable QCSR SS5
# 2 : Enable PDS API
# This setting use to select between QTI GNSS,
# QCSR SS5 hardware receiver, and PDS API.
# By default QTI GNSS receiver is enabled.
# GNSS_DEPLOYMENT = 0
##################################################
## LOG BUFFER CONFIGURATION
##################################################
#LOG_BUFFER_ENABLED, 1=enable, 0=disable
#*_LEVEL_TIME_DEPTH, maximum time depth of level *
#in log buffer, unit is second
#*_LEVEL_MAX_CAPACITY, maximum numbers of level *
#log print sentences in log buffer
LOG_BUFFER_ENABLED = 0
E_LEVEL_TIME_DEPTH = 600
E_LEVEL_MAX_CAPACITY = 50
W_LEVEL_TIME_DEPTH = 500
W_LEVEL_MAX_CAPACITY = 100
I_LEVEL_TIME_DEPTH = 400
I_LEVEL_MAX_CAPACITY = 200
D_LEVEL_TIME_DEPTH = 30
D_LEVEL_MAX_CAPACITY = 300
V_LEVEL_TIME_DEPTH = 200
V_LEVEL_MAX_CAPACITY = 400
##################################################
# Allow buffer diag log packets when diag memory allocation
# fails during boot up time.
##################################################
BUFFER_DIAG_LOGGING = 1
##################################################
# LOC_DIAGIFACE_ENABLED
##################################################
# Enable or disable loading of loc diag interface
# by modules using it.
# 1=enable, 0=disable
LOC_DIAGIFACE_ENABLED = 1
#######################################
# NTRIP CLIENT LIBRARY NAME
#######################################
# NTRIP_CLIENT_LIB_NAME =
##################################################
# Correction Data Framework settings
# Default values:
# CDFW_SOURCE_PRIORITY_1 = INTERNAL_1 RTCM
# CDFW_INJECT_DATA_INTERVAL = 600000 //10 mins
# CDFW_RTCM_MESSAGE_INTERVAL = 1000 //1 second
#
# If multiple sources coexist on a PL,
# the prorioty sequence can be set by the integer number.
# PRIORITY_1 is higher than PRIORITY_2, for example,
# CDFW_SOURCE_PRIORITY_1 = INTERNAL_1 RTCM
# CDFW_SOURCE_PRIORITY_2 = CV2X RTCM
##################################################
##################################################
# RF LOSS
# The loss in 0.1 dbHz from the C/N0 at the antenna port
# These values must be configured by OEM if not
# supported in QMI LOC message
# There is one entry for each signal type
##################################################
RF_LOSS_GPS = 0
RF_LOSS_GPS_L5 = 0
RF_LOSS_GLO_LEFT = 0
RF_LOSS_GLO_CENTER = 0
RF_LOSS_GLO_RIGHT = 0
RF_LOSS_BDS = 0
RF_LOSS_BDS_B2A = 0
RF_LOSS_GAL = 0
RF_LOSS_GAL_E5 = 0
RF_LOSS_NAVIC = 0

446
configs/powerhint.json Normal file
View File

@@ -0,0 +1,446 @@
{
"Nodes": [
{
"Name": "CPULittleClusterMaxFreq",
"Path": "/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq",
"Values": [
"9999999",
"1958400",
"1804800"
],
"DefaultIndex": 0,
"ResetOnInit": true
},
{
"Name": "CPULittleClusterMinFreq",
"Path": "/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq",
"Values": [
"9999999",
"1632000",
"1478400",
"1286400",
"1094400",
"921600",
"806400",
"672000",
"499200"
],
"ResetOnInit": true
},
{
"Name": "CPUBigClusterMaxFreq",
"Path": "/sys/devices/system/cpu/cpu6/cpufreq/scaling_max_freq",
"Values": [
"9999999",
"2208000",
"2131200"
],
"DefaultIndex": 0,
"ResetOnInit": true
},
{
"Name": "CPUBigClusterMinFreq",
"Path": "/sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq",
"Values": [
"9999999",
"2054400",
"1900800",
"1651200",
"1497600",
"1344000",
"1190400",
"960000",
"691200"
],
"ResetOnInit": true
},
{
"Name": "GPUMaxFreq",
"Path": "/sys/class/kgsl/kgsl-3d0/max_pwrlevel",
"Values": [
"0",
"1",
"3"
],
"DefaultIndex": 0,
"ResetOnInit": true
},
{
"Name": "GPUMinFreq",
"Path": "/sys/class/kgsl/kgsl-3d0/min_pwrlevel",
"Values": [
"0",
"3",
"6"
],
"ResetOnInit": true
},
{
"Name": "GPUBusMinFreq",
"Path": "/sys/class/devfreq/3d00000.qcom,kgsl-3d0/min_freq",
"Values": [
"955000000",
"850000000",
"765000000",
"605000000",
"500000000",
"340000000",
"0"
],
"ResetOnInit": true
},
{
"Name": "GPUForceRailOn",
"Path": "/sys/class/kgsl/kgsl-3d0/force_rail_on",
"Values": [
"1",
"0"
],
"ResetOnInit": true
},
{
"Name": "GPUForceClkOn",
"Path": "/sys/class/kgsl/kgsl-3d0/force_clk_on",
"Values": [
"1",
"0"
],
"ResetOnInit": true
},
{
"Name": "GPUIdleTimer",
"Path": "/sys/class/kgsl/kgsl-3d0/idle_timer",
"Values": [
"10000",
"50"
],
"ResetOnInit": true
},
{
"Name": "UclampTAMin",
"Path": "/dev/cpuctl/top-app/cpu.uclamp.min",
"Values": [
"26",
"0",
"30",
"35",
"45"
],
"DefaultIndex": 0,
"ResetOnInit": true
},
{
"Name": "UclampTALatency",
"Path": "/dev/cpuctl/top-app/cpu.uclamp.latency_sensitive",
"Values": [
"1",
"0"
],
"ResetOnInit": true
},
{
"Name": "CPUBWHystTriggerCount",
"Path": "/sys/devices/system/cpu/bus_dcvs/DDR/19091000.qcom,bwmon-ddr/hyst_trigger_count",
"Values": [
"0",
"3"
],
"ResetOnInit": true
},
{
"Name": "CPUBWHistMemory",
"Path": "/sys/devices/system/cpu/bus_dcvs/DDR/19091000.qcom,bwmon-ddr/hist_memory",
"Values": [
"0",
"20"
],
"ResetOnInit": true
},
{
"Name": "CPUBWHystLength",
"Path": "/sys/devices/system/cpu/bus_dcvs/DDR/19091000.qcom,bwmon-ddr/hyst_length",
"Values": [
"0",
"10"
],
"ResetOnInit": true
},
{
"Name": "CPUBWSampleMs",
"Path": "/sys/devices/system/cpu/bus_dcvs/DDR/19091000.qcom,bwmon-ddr/sample_ms",
"Values": [
"10",
"4"
],
"ResetOnInit": true
},
{
"Name": "CPUBWIOPercent",
"Path": "/sys/devices/system/cpu/bus_dcvs/DDR/19091000.qcom,bwmon-ddr/io_percent",
"Values": [
"80",
"34"
],
"ResetOnInit": true
},
{
"Name": "CPUBWMinFreq",
"Path": "/sys/devices/system/cpu/bus_dcvs/DDR/19091000.qcom,bwmon-ddr/min_freq",
"Values": [
"547000",
"768000",
"1017000",
"1353600",
"1555000",
"1708000",
"2092000"
],
"ResetOnInit": true
},
{
"Name": "L3LittleClusterMinFreq",
"Path": "/sys/devices/system/cpu/bus_dcvs/L3/soc:qcom,memlat:l3:silver/min_freq",
"Values": [
"1440000",
"1305600",
"307200"
],
"ResetOnInit": true
},
{
"Name": "L3BigClusterMinFreq",
"Path": "/sys/devices/system/cpu/bus_dcvs/L3/soc:qcom,memlat:l3:gold/min_freq",
"Values": [
"1440000",
"1401600",
"307200"
],
"ResetOnInit": true
},
{
"Name": "PMQoSCpuDmaLatency",
"Path": "/dev/cpu_dma_latency",
"Values": [
"44",
"100"
],
"HoldFd": true
},
{
"Name": "PowerHALMainState",
"Path": "vendor.powerhal.state",
"Values": [
"SUSTAINED_PERFORMANCE",
""
],
"Type": "Property"
},
{
"Name": "PowerHALAudioState",
"Path": "vendor.powerhal.audio",
"Values": [
"AUDIO_STREAMING_LOW_LATENCY",
""
],
"Type": "Property"
},
{
"Name": "PowerHALRenderingState",
"Path": "vendor.powerhal.rendering",
"Values": [
"EXPENSIVE_RENDERING",
""
],
"Type": "Property"
}
],
"Actions": [
{
"PowerHint": "SUSTAINED_PERFORMANCE",
"Node": "PowerHALMainState",
"Duration": 0,
"Value": "SUSTAINED_PERFORMANCE"
},
{
"PowerHint": "SUSTAINED_PERFORMANCE",
"Node": "CPUBigClusterMaxFreq",
"Duration": 0,
"Value": "2208000"
},
{
"PowerHint": "SUSTAINED_PERFORMANCE",
"Node": "CPULittleClusterMaxFreq",
"Duration": 0,
"Value": "1958400"
},
{
"PowerHint": "SUSTAINED_PERFORMANCE",
"Node": "GPUMaxFreq",
"Duration": 0,
"Value": "3"
},
{
"PowerHint": "INTERACTION",
"Node": "CPULittleClusterMinFreq",
"Duration": 0,
"Value": "806400"
},
{
"PowerHint": "INTERACTION",
"Node": "UclampTALatency",
"Duration": 0,
"Value": "1"
},
{
"PowerHint": "LAUNCH",
"Node": "UclampTAMin",
"Duration": 3000,
"Value": "45"
},
{
"PowerHint": "INTERACTION",
"Node": "CPUBWHystTriggerCount",
"Duration": 0,
"Value": "0"
},
{
"PowerHint": "INTERACTION",
"Node": "CPUBWHystLength",
"Duration": 0,
"Value": "0"
},
{
"PowerHint": "INTERACTION",
"Node": "CPUBWHistMemory",
"Duration": 0,
"Value": "0"
},
{
"PowerHint": "INTERACTION",
"Node": "CPUBWMinFreq",
"Duration": 0,
"Value": "1555000"
},
{
"PowerHint": "LAUNCH",
"Node": "CPUBigClusterMaxFreq",
"Duration": 5000,
"Value": "9999999"
},
{
"PowerHint": "LAUNCH",
"Node": "CPUBigClusterMinFreq",
"Duration": 5000,
"Value": "9999999"
},
{
"PowerHint": "LAUNCH",
"Node": "CPULittleClusterMinFreq",
"Duration": 5000,
"Value": "9999999"
},
{
"PowerHint": "LAUNCH",
"Node": "PMQoSCpuDmaLatency",
"Duration": 5000,
"Value": "44"
},
{
"PowerHint": "LAUNCH",
"Node": "CPUBWHystTriggerCount",
"Duration": 5000,
"Value": "0"
},
{
"PowerHint": "LAUNCH",
"Node": "CPUBWHystLength",
"Duration": 5000,
"Value": "0"
},
{
"PowerHint": "LAUNCH",
"Node": "CPUBWHistMemory",
"Duration": 5000,
"Value": "0"
},
{
"PowerHint": "LAUNCH",
"Node": "CPUBWMinFreq",
"Duration": 5000,
"Value": "2092000"
},
{
"PowerHint": "LAUNCH",
"Node": "GPUForceClkOn",
"Duration": 5000,
"Value": "1"
},
{
"PowerHint": "LAUNCH",
"Node": "GPUForceRailOn",
"Duration": 5000,
"Value": "1"
},
{
"PowerHint": "LAUNCH",
"Node": "GPUIdleTimer",
"Duration": 5000,
"Value": "10000"
},
{
"PowerHint": "LAUNCH",
"Node": "L3LittleClusterMinFreq",
"Duration": 5000,
"Value": "1440000"
},
{
"PowerHint": "LAUNCH",
"Node": "L3BigClusterMinFreq",
"Duration": 5000,
"Value": "1440000"
},
{
"PowerHint": "AUDIO_LAUNCH",
"Node": "PMQoSCpuDmaLatency",
"Duration": 2000,
"Value": "44"
},
{
"PowerHint": "AUDIO_STREAMING_LOW_LATENCY",
"Node": "PowerHALAudioState",
"Duration": 0,
"Value": "AUDIO_STREAMING_LOW_LATENCY"
},
{
"PowerHint": "AUDIO_STREAMING_LOW_LATENCY",
"Node": "PMQoSCpuDmaLatency",
"Duration": 0,
"Value": "44"
},
{
"PowerHint": "EXPENSIVE_RENDERING",
"Node": "PowerHALRenderingState",
"Duration": 0,
"Value": "EXPENSIVE_RENDERING"
},
{
"PowerHint": "EXPENSIVE_RENDERING",
"Node": "GPUMinFreq",
"Duration": 0,
"Value": "0"
},
{
"PowerHint": "EXPENSIVE_RENDERING",
"Node": "GPUBusMinFreq",
"Duration": 0,
"Value": "765000000"
},
{
"PowerHint": "EXPENSIVE_RENDERING",
"Node": "GPUMaxFreq",
"Duration": 0,
"Value": "1"
}
]
}

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<permissions>
<privapp-permissions package="com.android.hotwordenrollment.okgoogle">
<permission name="android.permission.INTERACT_ACROSS_USERS"/>
<permission name="android.permission.KEYPHRASE_ENROLLMENT_APPLICATION"/>
<permission name="android.permission.MANAGE_VOICE_KEYPHRASES"/>
</privapp-permissions>
<privapp-permissions package="com.android.hotwordenrollment.xgoogle">
<permission name="android.permission.INTERACT_ACROSS_USERS"/>
<permission name="android.permission.KEYPHRASE_ENROLLMENT_APPLICATION"/>
<permission name="android.permission.MANAGE_VOICE_KEYPHRASES"/>
</privapp-permissions>
</permissions>

View File

@@ -0,0 +1,2 @@
# Qti
ro.vendor.qti.va_odm.support=1

View File

@@ -1,29 +1,34 @@
# Audio
ro.config.vc_call_vol_steps=11
ro.config.media_vol_steps=25
# Bluetooth
bluetooth.profile.a2dp.source.enabled=true
bluetooth.profile.avrcp.target.enabled=true
bluetooth.profile.avrcp.controller.enabled=false
bluetooth.profile.hfp.ag.enabled=true
bluetooth.profile.asha.central.enabled=true
bluetooth.profile.gatt.enabled=true
bluetooth.profile.hid.host.enabled=true
bluetooth.profile.hid.device.enabled=true
bluetooth.profile.map.server.enabled=true
bluetooth.profile.opp.enabled=true
bluetooth.profile.pan.nap.enabled=true
bluetooth.profile.pan.panu.enabled=true
bluetooth.profile.pbap.server.enabled=true
bluetooth.profile.sap.server.enabled=false
vendor.audio_hal.period_size=192
vendor.audio.tunnel.encode=false
vendor.voice.path.for.pcm.voip=true
vendor.audio.offload.multiaac.enable=true
vendor.audio.parser.ip.buffer.size=262144
vendor.audio.flac.sw.decoder.24bit=true
vendor.audio.use.sw.alac.decoder=true
vendor.audio.use.sw.ape.decoder=true
vendor.audio.hw.aac.encoder=true
af.fast_track_multiplier=1
audio.offload.video=true
audio.deep_buffer.media=true
audio.sys.noisy.broadcast.delay=500
audio.sys.mute.latency.factor=2
audio.sys.routing.latency=0
audio.offload.min.duration.secs=30
audio.sys.offload.pstimeout.secs=3
ro.af.client_heap_size_kbyte=7168
media.stagefright.audio.deep=false
aaudio.mmap_exclusive_policy=2
aaudio.hw_burst_min_usec=2000
# Audio Graph Manager
ro.miui.build.region=in
# Blur
ro.sf.blurs_are_expensive=1
ro.surface_flinger.supports_background_blur=1
ro.sf.blurs_are_expensive=0
ro.surface_flinger.supports_background_blur=0
# Radio
persist.vendor.radio.hidl_dev_service=true
# Sensors
persist.vendor.sensors.enable.mag_filter=true
ro.vendor.radio.5g=3
ro.vendor.radio.features_common=3

View File

@@ -1,3 +1,10 @@
# Bluetooth
persist.vendor.btstack.enable.twsplus=true
persist.vendor.btstack.enable.twsplussho=true
persist.vendor.bt.a2dp.hal.implementation=true
persist.vendor.bt.a2dp.aac_whitelist=false
persist.vendor.btstack.enable.lpa=true
# Charger
ro.charger.enable_suspend=1
@@ -26,12 +33,9 @@ persist.radio.is_vonr_enabled_1=true
# Sensors
persist.vendor.sensors.enable.mag_filter=true
# Set the Bluetooth Class of Device
# Service Field: 0x5A -> 90
# Bit 17: Networking
# Bit 19: Capturing
# Bit 20: Object Transfer
# Bit 22: Telephony
# MAJOR_CLASS: 0x02 -> 2 (Phone)
# MINOR_CLASS: 0x0C -> 12 (Smart Phone)
bluetooth.device.class_of_device=90,2,12
# SSR
persist.vendor.ssr.enable_ramdumps=1
# WiFi display
persist.debug.wfd.enable=1
persist.sys.wfd.virtual=0

View File

@@ -1,11 +1,5 @@
# Bluetooth
persist.bluetooth.bluetooth_audio_hal.disabled=false
persist.bluetooth.a2dp_offload.disabled=true
ro.bluetooth.a2dp_offload.supported=false
# DPM
persist.vendor.dpm.feature=1
# RIL
ro.telephony.sim_slots.count=2
telephony.active_modems.max_count=2

View File

@@ -0,0 +1,335 @@
# Audio
aaudio.hw_burst_min_usec=2000
aaudio.mmap_exclusive_policy=2
aaudio.mmap_policy=1
af.fast_track_multiplier=1
audio.deep_buffer.media=true
audio.offload.video=true
audio.sys.noisy.broadcast.delay=600
audio.sys.offload.pstimeout.secs=3
persist.audio.button_jack.profile=volume
persist.audio.button_jack.switch=0
persist.audio.fluence.speaker=true
persist.audio.fluence.voicecall=true
persist.audio.fluence.voicecomm=true
persist.audio.fluence.voicerec=false
persist.vendor.audio.ambisonic.auto.profile=false
persist.vendor.audio.ambisonic.capture=false
persist.vendor.audio.apptype.multirec.enabled=false
persist.vendor.audio.avs.afe_api_version=2
persist.vendor.audio.fluence.speaker=true
persist.vendor.audio.fluence.tmic.enabled=false
persist.vendor.audio.fluence.voicecall=true
persist.vendor.audio.fluence.voicerec=false
persist.vendor.audio.ha_proxy.enabled=true
persist.vendor.audio.ras.enabled=false
persist.vendor.audio.ring.filter.mask=0
persist.vendor.audio.spv3.enable=true
ro.vendor.audio.game.mode=true
ro.vendor.audio.playbackcapture.screen=true
ro.vendor.audio.policy.engine.odm=true
ro.vendor.audio.ring.filter=false
ro.vendor.audio.scenario.support=true
ro.vendor.audio.sdk.fluencetype=none
ro.vendor.audio.sdk.ssr=false
ro.vendor.audio.sfx.earadj=true
ro.vendor.audio.sfx.scenario=true
ro.vendor.audio.sos=true
ro.vendor.audio.soundfx.type=mi
ro.vendor.audio.soundfx.usb=true
ro.vendor.audio.soundtrigger=sva
ro.vendor.audio.soundtrigger.appdefine.cnn.level=45
ro.vendor.audio.soundtrigger.appdefine.gmm.level=55
ro.vendor.audio.soundtrigger.appdefine.gmm.user.level=65
ro.vendor.audio.soundtrigger.appdefine.vop.level=10
ro.vendor.audio.soundtrigger.lowpower=true
ro.vendor.audio.soundtrigger.pangaea=1
ro.vendor.audio.soundtrigger.snr=16
ro.vendor.audio.soundtrigger.sva-5.0=1
ro.vendor.audio.soundtrigger.training.level=50
ro.vendor.audio.soundtrigger.wakeupword=1
ro.vendor.audio.soundtrigger.xanzn.cnn.level=58
ro.vendor.audio.soundtrigger.xanzn.gmm.level=80
ro.vendor.audio.soundtrigger.xanzn.gmm.user.level=80
ro.vendor.audio.soundtrigger.xanzn.vop.level=10
ro.vendor.audio.soundtrigger.xatx.cnn.level=95
ro.vendor.audio.soundtrigger.xatx.gmm.level=40
ro.vendor.audio.soundtrigger.xatx.gmm.user.level=40
ro.vendor.audio.soundtrigger.xatx.vop.level=0
ro.vendor.audio.soundtrigger.xiaomievent=1
ro.vendor.audio.surround.support=true
ro.vendor.audio.us.proximity=true
ro.vendor.audio.us.proximity_waitfornegative_feature=true
ro.vendor.audio.vocal.support=true
ro.vendor.audio.voice.change.support=true
ro.vendor.audio.voice.change.version=2
ro.vendor.audio.voice.change.youme.support=true
ro.vendor.audio.voice.volume.boost=manual
# Audio feature
vendor.audio.adm.buffering.ms=2
vendor.audio.c2.preferred=true
vendor.audio.dolby.ds2.enabled=false
vendor.audio.dolby.ds2.hardbypass=false
vendor.audio.enable.mirrorlink=false
vendor.audio.feature.a2dp_offload.enable=true
vendor.audio.feature.afe_proxy.enable=true
vendor.audio.feature.anc_headset.enable=false
vendor.audio.feature.audiozoom.enable=false
vendor.audio.feature.battery_listener.enable=true
vendor.audio.feature.compr_cap.enable=false
vendor.audio.feature.compr_voip.enable=false
vendor.audio.feature.compress_in.enable=true
vendor.audio.feature.compress_meta_data.enable=true
vendor.audio.feature.concurrent_capture.enable=true
vendor.audio.feature.custom_stereo.enable=true
vendor.audio.feature.deepbuffer_as_primary.enable=false
vendor.audio.feature.display_port.enable=true
vendor.audio.feature.dmabuf.cma.memory.enable=true
vendor.audio.feature.dsm_feedback.enable=false
vendor.audio.feature.dynamic_ecns.enable=true
vendor.audio.feature.ext_hw_plugin.enable=false
vendor.audio.feature.external_dsp.enable=false
vendor.audio.feature.external_speaker.enable=false
vendor.audio.feature.external_speaker_tfa.enable=false
vendor.audio.feature.fluence.enable=true
vendor.audio.feature.fm.enable=true
vendor.audio.feature.hdmi_edid.enable=true
vendor.audio.feature.hdmi_passthrough.enable=true
vendor.audio.feature.hfp.enable=true
vendor.audio.feature.hifi_audio.enable=false
vendor.audio.feature.hwdep_cal.enable=false
vendor.audio.feature.incall_music.enable=true
vendor.audio.feature.keep_alive.enable=true
vendor.audio.feature.kpi_optimize.enable=true
vendor.audio.feature.maxx_audio.enable=false
vendor.audio.feature.multi_voice_session.enable=true
vendor.audio.feature.ras.enable=true
vendor.audio.feature.record_play_concurency.enable=false
vendor.audio.feature.snd_mon.enable=true
vendor.audio.feature.spkr_prot.enable=true
vendor.audio.feature.src_trkn.enable=true
vendor.audio.feature.ssrec.enable=true
vendor.audio.feature.usb_offload.enable=true
vendor.audio.feature.usb_offload_burst_mode.enable=true
vendor.audio.feature.usb_offload_sidetone_volume.enable=false
vendor.audio.feature.vbat.enable=true
vendor.audio.feature.wsa.enable=false
vendor.audio.flac.sw.decoder.24bit=true
vendor.audio.hal.boot.timeout.ms=20000
vendor.audio.hal.output.suspend.supported=true
vendor.audio.hdr.record.enable=false
vendor.audio.hw.aac.encoder=false
vendor.audio.offload.buffer.size.kb=256
vendor.audio.offload.gapless.enabled=true
vendor.audio.offload.multiaac.enable=true
vendor.audio.offload.multiple.enabled=false
vendor.audio.offload.passthrough=false
vendor.audio.offload.track.enable=true
vendor.audio.parser.ip.buffer.size=262144
vendor.audio.safx.pbe.enabled=false
vendor.audio.tunnel.encode=false
vendor.audio.ull_record_period_multiplier=2
vendor.audio.use.sw.alac.decoder=true
vendor.audio.use.sw.ape.decoder=true
vendor.audio.use.sw.mpegh.decoder=true
vendor.audio.voice.receiver.status=false
vendor.audio.volume.headset.gain.depcal=true
vendor.audio_hal.in_period_size=144
vendor.audio_hal.period_multiplier=3
vendor.audio_hal.period_size=192
# Bluetooth
bluetooth.hardware.power.idle_cur_ma=6
bluetooth.hardware.power.operating_voltage_mv=3700
bluetooth.hardware.power.rx_cur_ma=28
bluetooth.hardware.power.tx_cur_ma=36
bluetooth.profile.a2dp.source.enabled=true
bluetooth.profile.avrcp.target.enabled=true
bluetooth.profile.avrcp.controller.enabled=false
bluetooth.profile.hfp.ag.enabled=true
bluetooth.profile.asha.central.enabled=true
bluetooth.profile.gatt.enabled=true
bluetooth.profile.hid.host.enabled=true
bluetooth.profile.hid.device.enabled=true
bluetooth.profile.map.server.enabled=true
bluetooth.profile.opp.enabled=true
bluetooth.profile.pan.nap.enabled=true
bluetooth.profile.pan.panu.enabled=true
bluetooth.profile.pbap.server.enabled=true
bluetooth.profile.sap.server.enabled=false
persist.vendor.bt.a2dp_offload_cap=sbc-aptx-aptxtws-aptxhd-aac-ldac-lhdc
ro.bluetooth.a2dp_offload.supported=true
persist.bluetooth.a2dp_offload.disabled=false
persist.bluetooth.a2dp_offload.cap=sbc-aac-aptx-aptxhd-ldac-lhdc
persist.vendor.qcom.bluetooth.a2dp_offload_cap=sbc-aptx-aptxtws-aptxhd-aac-ldac-aptxadaptiver2
persist.vendor.qcom.bluetooth.aac_frm_ctl.enabled=true
persist.vendor.qcom.bluetooth.twsp_state.enabled=false
persist.vendor.qcom.bluetooth.a2dp_mcast_test.enabled=false
persist.vendor.qcom.bluetooth.scram.enabled=false
persist.vendor.qcom.bluetooth.aac_vbr_ctl.enabled=true
persist.vendor.qcom.bluetooth.aptxadaptiver2_1_support=true
persist.sys.fflag.override.settings_bluetooth_hearing_aid=true
ro.vendor.bluetooth.csip_qti=true
# Camera
camera.disable_zsl_mode=true
ro.camera.enableCamera1MaxZsl=1
persist.sys.miui.camera.boost.killAdj_threshold=500:251:200:50
persist.sys.miui.camera.protect_prev_ext=true
# Display
vendor.display.comp_mask=0
vendor.display.disable_3d_adaptive_tm=1
vendor.display.disable_excl_rect=0
vendor.display.disable_excl_rect_partial_fb=1
vendor.display.disable_hw_recovery_dump=1
vendor.display.disable_offline_rotator=1
vendor.display.disable_scaler=0
vendor.display.disable_sdr_dimming=1
vendor.display.disable_sdr_histogram=1
vendor.display.disable_stc_dimming=1
vendor.display.enable_async_powermode=0
vendor.display.enable_async_vds_creation=1
vendor.display.enable_dpps_dynamic_fps=1
vendor.display.enable_early_wakeup=1
vendor.display.enable_hdr10_gpu_target=1
vendor.display.enable_optimize_refresh=0
vendor.display.enable_rc_support=1
vendor.display.enable_rounded_corner=1
vendor.display.idle_time=0
vendor.display.use_smooth_motion=1
# DPM
persist.vendor.dpm.vndr.idletimer.mode=default
persist.vendor.dpm.vndr.halservice.enable=1
persist.vendor.dpm.vndr.feature=1
# DRM
drm.service.enabled=true
# Fingerprint
ro.hardware.fp.sideCap=true
# FM
vendor.qcom.bluetooth.soc=cherokee
# RFP
ro.frp.pst=/dev/block/bootdevice/by-name/frp
# Gatekeeper
vendor.gatekeeper.disable_spu=true
# Graphics
persist.sys.sf.color_saturation=1.0
persist.sys.sf.color_mode=7
persist.sys.sf.native_mode=256
debug.sf.hw=0
debug.sf.enable_hwc_vds=false
debug.egl.hw=0
debug.sf.auto_latch_unsignaled=0
debug.sf.high_fps_late_app_phase_offset_ns=1000000
debug.sf.high_fps_late_sf_phase_offset_ns=-2000000
debug.sf.high_fps_early_phase_offset_ns=-4000000
debug.sf.high_fps_early_gl_phase_offset_ns=-2000000
debug.sf.disable_client_composition_cache=1
debug.sf.enable_gl_backpressure=1
debug.sf.enable_advanced_sf_phase_offset=1
debug.sf.predict_hwc_composition_strategy=0
debug.sf.treat_170m_as_sRGB=1
ro.hardware.vulkan=adreno
ro.hardware.egl=adreno
ro.opengles.version=196610
ro.surface_flinger.has_wide_color_display=true
ro.surface_flinger.has_HDR_display=true
ro.surface_flinger.use_color_management=true
ro.surface_flinger.wcg_composition_dataspace=143261696
ro.surface_flinger.protected_contents=true
ro.surface_flinger.enable_frame_rate_override=false
ro.surface_flinger.use_content_detection_for_refresh_rate=true
ro.surface_flinger.force_hwc_copy_for_virtual_displays=true
ro.surface_flinger.max_frame_buffer_acquired_buffers=3
ro.surface_flinger.max_virtual_display_dimension=4096
ro.vendor.all_modes.colorpick_adjust=true
vendor.gralloc.disable_ubwc=0
# Refresh Rate
ro.surface_flinger.set_display_power_timer_ms=1000
ro.surface_flinger.set_idle_timer_ms=500
ro.surface_flinger.set_touch_timer_ms=1000
debug.sf.frame_rate_multiple_threshold=90
# Incremental
ro.incremental.enable=yes
# LMK
persist.sys.lmk.camera_minfree_levels=18432:0,23040:100,27648:200,64512:300,115712:800,216370:900
persist.sys.lmkd.double_watermark.enable=true
persist.sys.lmkd.extend_reclaim.enable=true
# Media
debug.c2.use_dmabufheaps=1
debug.mdpcomp.logs=0
debug.stagefright.c2inputsurface=-1
vendor.mm.enable.qcom_parser=16777215
vendor.media.omx=0
# Misc
sys.vendor.shutdown.waittime=500
# Perf
ro.vendor.extension_library=libqti-perfd-client.so
ro.vendor.perf-hal.ver=2.3
ro.vendor.perf.scroll_opt=1
ro.vendor.perf.scroll_opt.heavy_app=2
vendor.power.pasr.enabled=false
vendor.pasr.activemode.enabled=false
# QFP
persist.vendor.qfp=true
# QSPM
ro.vendor.qspm.enable=true
# Radio
persist.radio.multisim.config=dsds
persist.vendor.radio.dynamic_sar=1
persist.vendor.radio.apm_sim_not_pwdn=1
persist.vendor.radio.add_power_save=1
persist.vendor.radio.sib16_support=1
persist.vendor.radio.custom_ecc=1
persist.vendor.radio.procedure_bytes=SKIP
persist.vendor.radio.enableadvancedscan=true
# RCS
persist.vendor.rcs.singlereg.feature=1
# Sensors
persist.vendor.sensors.support_direct_channel=false
# SOC
ro.soc.manufacturer=QTI
# SSR
persist.vendor.ssr.restart_level=ALL_ENABLE
# USB
persist.sys.usb.config=none
vendor.usb.diag.func.name=ffs
vendor.usb.dpl.inst.name=dpl
vendor.usb.qdss.inst.name=qdss_sw
vendor.usb.rmnet.func.name=gsi
vendor.usb.rmnet.inst.name=rmnet
vendor.usb.rndis.func.name=gsi
vendor.usb.use_ffs_mtp=1
vendor.usb.use_gadget_hal=1
sys.usb.mtp.batchcancel=1
# Vibrator
vendor.qcom.vibrator.led.enable_effects=1
vendor.qcom.vibrator.led.mv_max=3544
vendor.qcom.vibrator.led.mv_min=1504
vendor.qcom.vibrator.led.effect_ms_multiplier=5
# WiFi
wifi.aware.interface=wifi-aware0

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,96 @@
<!-- Copyright (c) 2017, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of The Linux Foundation nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<compatibility-matrix version="1.0" type="device">
<hal format="hidl" optional="false">
<name>android.frameworks.sensorservice</name>
<version>1.0</version>
<interface>
<name>ISensorManager</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl" optional="false">
<name>android.hidl.allocator</name>
<version>1.0</version>
<interface>
<name>IAllocator</name>
<instance>ashmem</instance>
</interface>
</hal>
<hal format="hidl" optional="false">
<name>android.hidl.manager</name>
<version>1.0</version>
<interface>
<name>IServiceManager</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl" optional="false">
<name>android.hidl.memory</name>
<version>1.0</version>
<interface>
<name>IMapper</name>
<instance>ashmem</instance>
</interface>
</hal>
<hal format="hidl" optional="false">
<name>android.hidl.token</name>
<version>1.0</version>
<interface>
<name>ITokenManager</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl" optional="false">
<name>android.system.wifi.keystore</name>
<version>1.0</version>
<interface>
<name>IKeystore</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl" optional="true">
<name>vendor.qti.hardware.sigma_miracast</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>Isigma_miracast</name>
<instance>sigmahal</instance>
<instance>sigmahal64</instance>
</interface>
</hal>
<hal format="hidl" optional="true">
<name>vendor.qti.hardware.qccsyshal</name>
<transport>hwbinder</transport>
<version>1.0-1</version>
<interface>
<name>IQccsyshal</name>
<instance>qccsyshal</instance>
</interface>
</hal>
</compatibility-matrix>

View File

@@ -0,0 +1,69 @@
<!--copyright (c) 2017, 2018 The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of The Linux Foundation nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<manifest version="1.0" type="device">
<!-- NFC HAL service -->
<hal format="hidl">
<name>android.hardware.nfc</name>
<transport>hwbinder</transport>
<version>1.2</version>
<interface>
<name>INfc</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>vendor.nxp.hardware.nfc</name>
<transport>hwbinder</transport>
<version>2.0</version>
<interface>
<name>INqNfc</name>
<instance>default</instance>
</interface>
</hal>
<!-- secure element -->
<hal format="hidl">
<name>android.hardware.secure_element</name>
<transport>hwbinder</transport>
<version>1.2</version>
<interface>
<name>ISecureElement</name>
<instance>eSE1</instance>
</interface>
</hal>
<!-- eSEPowerManager -->
<hal format="hidl">
<name>vendor.qti.esepowermanager</name>
<transport>hwbinder</transport>
<version>1.1</version>
<interface>
<name>IEsePowerManager</name>
<instance>default</instance>
</interface>
</hal>
</manifest>

View File

@@ -0,0 +1,60 @@
<!--copyright (c) 2017, 2018 The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of The Linux Foundation nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<manifest version="1.0" type="device">
<!-- NFC HAL service -->
<hal format="hidl">
<name>android.hardware.nfc</name>
<transport>hwbinder</transport>
<version>1.2</version>
<interface>
<name>INfc</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>vendor.nxp.hardware.nfc</name>
<transport>hwbinder</transport>
<version>2.0</version>
<interface>
<name>INqNfc</name>
<instance>default</instance>
</interface>
</hal>
<!-- secure element -->
<hal format="hidl">
<name>android.hardware.secure_element</name>
<transport>hwbinder</transport>
<version>1.2</version>
<interface>
<name>ISecureElement</name>
<instance>SIM1</instance>
<instance>SIM2</instance>
</interface>
</hal>
</manifest>

View File

@@ -0,0 +1,59 @@
<!--copyright (c) 2017, 2018 The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of The Linux Foundation nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<manifest version="1.0" type="device">
<!-- NFC HAL service -->
<hal format="hidl">
<name>android.hardware.nfc</name>
<transport>hwbinder</transport>
<version>1.2</version>
<interface>
<name>INfc</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>vendor.nxp.hardware.nfc</name>
<transport>hwbinder</transport>
<version>2.0</version>
<interface>
<name>INqNfc</name>
<instance>default</instance>
</interface>
</hal>
<!-- secure element -->
<hal format="hidl">
<name>android.hardware.secure_element</name>
<transport>hwbinder</transport>
<version>1.2</version>
<interface>
<name>ISecureElement</name>
<instance>SIM1</instance>
</interface>
</hal>
</manifest>

View File

@@ -0,0 +1,69 @@
<!--copyright (c) 2017, 2018 The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of The Linux Foundation nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<manifest version="1.0" type="device">
<!-- NFC HAL service -->
<hal format="hidl">
<name>android.hardware.nfc</name>
<transport>hwbinder</transport>
<version>1.2</version>
<interface>
<name>INfc</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>vendor.nxp.hardware.nfc</name>
<transport>hwbinder</transport>
<version>2.0</version>
<interface>
<name>INqNfc</name>
<instance>default</instance>
</interface>
</hal>
<!-- secure element -->
<hal format="hidl">
<name>android.hardware.secure_element</name>
<transport>hwbinder</transport>
<version>1.2</version>
<interface>
<name>ISecureElement</name>
<instance>eSE1</instance>
<instance>SIM1</instance>
</interface>
</hal>
<!-- eSEPowerManager -->
<hal format="hidl">
<name>vendor.qti.esepowermanager</name>
<transport>hwbinder</transport>
<version>1.1</version>
<interface>
<name>IEsePowerManager</name>
<instance>default</instance>
</interface>
</hal>
</manifest>

View File

@@ -0,0 +1,70 @@
<!--copyright (c) 2017, 2018 The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of The Linux Foundation nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<manifest version="1.0" type="device">
<!-- NFC HAL service -->
<hal format="hidl">
<name>android.hardware.nfc</name>
<transport>hwbinder</transport>
<version>1.2</version>
<interface>
<name>INfc</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>vendor.nxp.hardware.nfc</name>
<transport>hwbinder</transport>
<version>2.0</version>
<interface>
<name>INqNfc</name>
<instance>default</instance>
</interface>
</hal>
<!-- secure element -->
<hal format="hidl">
<name>android.hardware.secure_element</name>
<transport>hwbinder</transport>
<version>1.2</version>
<interface>
<name>ISecureElement</name>
<instance>eSE1</instance>
<instance>SIM1</instance>
<instance>SIM2</instance>
</interface>
</hal>
<!-- eSEPowerManager -->
<hal format="hidl">
<name>vendor.qti.esepowermanager</name>
<transport>hwbinder</transport>
<version>1.1</version>
<interface>
<name>IEsePowerManager</name>
<instance>default</instance>
</interface>
</hal>
</manifest>

View File

@@ -0,0 +1,644 @@
<!--
Input:
manifest_ravelin.xml
manifest.xml
-->
<manifest version="4.0" type="device" target-level="6">
<hal format="hidl">
<name>android.hardware.audio</name>
<transport>hwbinder</transport>
<version>7.0</version>
<interface>
<name>IDevicesFactory</name>
<instance>default</instance>
</interface>
<fqname>@7.0::IDevicesFactory/default</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.audio.effect</name>
<transport>hwbinder</transport>
<version>7.0</version>
<interface>
<name>IEffectsFactory</name>
<instance>default</instance>
</interface>
<fqname>@7.0::IEffectsFactory/default</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.bluetooth</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IBluetoothHci</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IBluetoothHci/default</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.camera.provider</name>
<transport>hwbinder</transport>
<version>2.7</version>
<interface>
<name>ICameraProvider</name>
<instance>legacy/1</instance>
</interface>
<fqname>@2.7::ICameraProvider/legacy/1</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.drm</name>
<transport>hwbinder</transport>
<fqname>@1.3::ICryptoFactory/wfdhdcp</fqname>
<fqname>@1.3::IDrmFactory/wfdhdcp</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.gatekeeper</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IGatekeeper</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IGatekeeper/default</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.ir</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IConsumerIr</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IConsumerIr/default</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.keymaster</name>
<transport>hwbinder</transport>
<fqname>@4.1::IKeymasterDevice/default</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.radio</name>
<transport>hwbinder</transport>
<fqname>@1.2::ISap/slot1</fqname>
<fqname>@1.2::ISap/slot2</fqname>
<fqname>@1.6::IRadio/slot1</fqname>
<fqname>@1.6::IRadio/slot2</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.radio.config</name>
<transport>hwbinder</transport>
<version>1.3</version>
<interface>
<name>IRadioConfig</name>
<instance>default</instance>
</interface>
<fqname>@1.3::IRadioConfig/default</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.tetheroffload.config</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IOffloadConfig</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IOffloadConfig/default</fqname>
</hal>
<hal format="hidl">
<name>android.hardware.tetheroffload.control</name>
<transport>hwbinder</transport>
<version>1.1</version>
<interface>
<name>IOffloadControl</name>
<instance>default</instance>
</interface>
<fqname>@1.1::IOffloadControl/default</fqname>
</hal>
<hal format="hidl">
<name>com.dsi.ant</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IAnt</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IAnt/default</fqname>
</hal>
<hal format="hidl">
<name>com.qualcomm.qti.dpm.api</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IdpmQmi</name>
<instance>dpmQmiService</instance>
</interface>
<fqname>@1.0::IdpmQmi/dpmQmiService</fqname>
</hal>
<hal format="hidl">
<name>com.qualcomm.qti.imscmservice</name>
<transport>hwbinder</transport>
<version>2.2</version>
<interface>
<name>IImsCmService</name>
<instance>qti.ims.connectionmanagerservice</instance>
</interface>
<fqname>@2.2::IImsCmService/qti.ims.connectionmanagerservice</fqname>
</hal>
<hal format="hidl">
<name>com.qualcomm.qti.uceservice</name>
<transport>hwbinder</transport>
<version>2.3</version>
<interface>
<name>IUceService</name>
<instance>com.qualcomm.qti.uceservice</instance>
</interface>
<fqname>@2.3::IUceService/com.qualcomm.qti.uceservice</fqname>
</hal>
<hal format="hidl">
<name>vendor.goodix.hardware.biometrics.fingerprint</name>
<transport>hwbinder</transport>
<version>2.1</version>
<interface>
<name>IGoodixFingerprintDaemon</name>
<instance>default</instance>
</interface>
<interface>
<name>IGoodixFingerprintDaemonExt</name>
<instance>default</instance>
</interface>
<fqname>@2.1::IGoodixFingerprintDaemon/default</fqname>
<fqname>@2.1::IGoodixFingerprintDaemonExt/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.data.factory</name>
<transport>hwbinder</transport>
<version>2.5</version>
<interface>
<name>IFactory</name>
<instance>default</instance>
</interface>
<fqname>@2.5::IFactory/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.AGMIPC</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IAGM</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IAGM/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.alarm</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IAlarm</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IAlarm/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.bluetooth_audio</name>
<transport>hwbinder</transport>
<version>2.1</version>
<interface>
<name>IBluetoothAudioProvidersFactory</name>
<instance>default</instance>
</interface>
<fqname>@2.1::IBluetoothAudioProvidersFactory/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.bluetooth_sar</name>
<transport>hwbinder</transport>
<version>1.1</version>
<interface>
<name>IBluetoothSar</name>
<instance>default</instance>
</interface>
<fqname>@1.1::IBluetoothSar/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.btconfigstore</name>
<transport>hwbinder</transport>
<version>2.0</version>
<interface>
<name>IBTConfigStore</name>
<instance>default</instance>
</interface>
<fqname>@2.0::IBTConfigStore/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.cacert</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IService</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IService/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.camera.postproc</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IPostProcService</name>
<instance>camerapostprocservice</instance>
</interface>
<fqname>@1.0::IPostProcService/camerapostprocservice</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.capabilityconfigstore</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>ICapabilityConfigStore</name>
<instance>default</instance>
</interface>
<fqname>@1.0::ICapabilityConfigStore/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.data.connection</name>
<transport>hwbinder</transport>
<version>1.1</version>
<interface>
<name>IDataConnection</name>
<instance>slot1</instance>
<instance>slot2</instance>
</interface>
<fqname>@1.1::IDataConnection/slot1</fqname>
<fqname>@1.1::IDataConnection/slot2</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.data.iwlan</name>
<transport>hwbinder</transport>
<version>1.1</version>
<interface>
<name>IIWlan</name>
<instance>slot1</instance>
<instance>slot2</instance>
</interface>
<fqname>@1.1::IIWlan/slot1</fqname>
<fqname>@1.1::IIWlan/slot2</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.data.latency</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>ILinkLatency</name>
<instance>default</instance>
</interface>
<fqname>@1.0::ILinkLatency/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.dpmservice</name>
<transport>hwbinder</transport>
<version>1.1</version>
<interface>
<name>IDpmService</name>
<instance>DpmService</instance>
</interface>
<fqname>@1.1::IDpmService/DpmService</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.dsp</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IDspService</name>
<instance>dspservice</instance>
</interface>
<fqname>@1.0::IDspService/dspservice</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.embmssl</name>
<transport>hwbinder</transport>
<version>1.1</version>
<interface>
<name>IEmbms</name>
<instance>embmsslServer0</instance>
</interface>
<fqname>@1.1::IEmbms/embmsslServer0</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.factory</name>
<transport>hwbinder</transport>
<version>1.1</version>
<interface>
<name>IFactory</name>
<instance>default</instance>
</interface>
<fqname>@1.1::IFactory/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.fm</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IFmHci</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IFmHci/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.mwqemadapter</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IMwqemAdapter</name>
<instance>MwqemAdapter</instance>
</interface>
<fqname>@1.0::IMwqemAdapter/MwqemAdapter</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.pal</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IPAL</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IPAL/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.qccvndhal</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IQccvndhal</name>
<instance>qccvndhal</instance>
</interface>
<fqname>@1.0::IQccvndhal/qccvndhal</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.qseecom</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IQSEECom</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IQSEECom/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.qteeconnector</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IAppConnector</name>
<instance>default</instance>
</interface>
<interface>
<name>IGPAppConnector</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IAppConnector/default</fqname>
<fqname>@1.0::IGPAppConnector/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.radio.am</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IQcRilAudio</name>
<instance>slot1</instance>
<instance>slot2</instance>
</interface>
<fqname>@1.0::IQcRilAudio/slot1</fqname>
<fqname>@1.0::IQcRilAudio/slot2</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.radio.internal.deviceinfo</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IDeviceInfo</name>
<instance>deviceinfo</instance>
</interface>
<fqname>@1.0::IDeviceInfo/deviceinfo</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.radio.lpa</name>
<transport>hwbinder</transport>
<version>1.2</version>
<interface>
<name>IUimLpa</name>
<instance>UimLpa0</instance>
<instance>UimLpa1</instance>
</interface>
<fqname>@1.2::IUimLpa/UimLpa0</fqname>
<fqname>@1.2::IUimLpa/UimLpa1</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.radio.qcriNvOpt</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IqcriNvOpt</name>
<instance>qcrinvopt0</instance>
<instance>qcrinvopt1</instance>
</interface>
<fqname>@1.0::IqcriNvOpt/qcrinvopt0</fqname>
<fqname>@1.0::IqcriNvOpt/qcrinvopt1</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.radio.qcrilhook</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IQtiOemHook</name>
<instance>oemhook0</instance>
<instance>oemhook1</instance>
</interface>
<fqname>@1.0::IQtiOemHook/oemhook0</fqname>
<fqname>@1.0::IQtiOemHook/oemhook1</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.radio.qtiradio</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IQtiRadio</name>
<instance>slot1</instance>
<instance>slot2</instance>
</interface>
<fqname>@1.0::IQtiRadio/slot1</fqname>
<fqname>@1.0::IQtiRadio/slot2</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.radio.qtiradio</name>
<transport>hwbinder</transport>
<version>2.6</version>
<interface>
<name>IQtiRadio</name>
<instance>slot1</instance>
<instance>slot2</instance>
</interface>
<fqname>@2.6::IQtiRadio/slot1</fqname>
<fqname>@2.6::IQtiRadio/slot2</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.radio.uim</name>
<transport>hwbinder</transport>
<version>1.2</version>
<interface>
<name>IUim</name>
<instance>Uim0</instance>
<instance>Uim1</instance>
</interface>
<fqname>@1.2::IUim/Uim0</fqname>
<fqname>@1.2::IUim/Uim1</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.radio.uim_remote_client</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IUimRemoteServiceClient</name>
<instance>uimRemoteClient0</instance>
<instance>uimRemoteClient1</instance>
</interface>
<fqname>@1.0::IUimRemoteServiceClient/uimRemoteClient0</fqname>
<fqname>@1.0::IUimRemoteServiceClient/uimRemoteClient1</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.radio.uim_remote_server</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IUimRemoteServiceServer</name>
<instance>uimRemoteServer0</instance>
<instance>uimRemoteServer1</instance>
</interface>
<fqname>@1.0::IUimRemoteServiceServer/uimRemoteServer0</fqname>
<fqname>@1.0::IUimRemoteServiceServer/uimRemoteServer1</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.secureprocessor.device</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>ISecureProcessor</name>
<instance>qti-tee</instance>
</interface>
<fqname>@1.0::ISecureProcessor/qti-tee</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.sensorscalibrate</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>ISensorsCalibrate</name>
<instance>default</instance>
</interface>
<fqname>@1.0::ISensorsCalibrate/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.soter</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>ISoter</name>
<instance>default</instance>
</interface>
<fqname>@1.0::ISoter/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.trustedui</name>
<transport>hwbinder</transport>
<fqname>@1.1::ITrustedInput/default</fqname>
<fqname>@1.1::ITrustedInput/qtee-vm</fqname>
<fqname>@1.2::ITrustedUI/default</fqname>
<fqname>@1.2::ITrustedUI/qtee-vm</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.tui_comm</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>ITuiComm</name>
<instance>default</instance>
</interface>
<fqname>@1.0::ITuiComm/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.wifi.wifilearner</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IWifiStats</name>
<instance>wifiStats</instance>
</interface>
<fqname>@1.0::IWifiStats/wifiStats</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.hardware.wifidisplaysession</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IWifiDisplaySession</name>
<instance>wifidisplaysession</instance>
</interface>
<interface>
<name>IWifiDisplaySessionAudioTrack</name>
<instance>wifidisplaysessionaudiotrack</instance>
</interface>
<interface>
<name>IWifiDisplaySessionImageTrack</name>
<instance>wifidisplaysessionimagetrack</instance>
</interface>
<interface>
<name>IWifiDisplaySessionVideoTrack</name>
<instance>wifidisplaysessionvideotrack</instance>
</interface>
<fqname>@1.0::IWifiDisplaySession/wifidisplaysession</fqname>
<fqname>@1.0::IWifiDisplaySessionAudioTrack/wifidisplaysessionaudiotrack</fqname>
<fqname>@1.0::IWifiDisplaySessionImageTrack/wifidisplaysessionimagetrack</fqname>
<fqname>@1.0::IWifiDisplaySessionVideoTrack/wifidisplaysessionvideotrack</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.ims.callinfo</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IService</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IService/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.ims.factory</name>
<transport>hwbinder</transport>
<version>1.1</version>
<version>2.1</version>
<interface>
<name>IImsFactory</name>
<instance>default</instance>
</interface>
<fqname>@1.1::IImsFactory/default</fqname>
<fqname>@2.1::IImsFactory/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.imsrtpservice</name>
<transport>hwbinder</transport>
<version>3.0</version>
<interface>
<name>IRTPService</name>
<instance>imsrtpservice</instance>
</interface>
<fqname>@3.0::IRTPService/imsrtpservice</fqname>
</hal>
<hal format="hidl">
<name>vendor.qti.qspmhal</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IQspmhal</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IQspmhal/default</fqname>
</hal>
<kernel target-level="6"/>
</manifest>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,38 @@
<!--
Copyright (C) 2023 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<compatibility-matrix version="1.0" type="framework">
<hal format="hidl" optional="true">
<name>vendor.xiaomi.hardware.mfidoca</name>
<version>1.0</version>
<interface>
<name>IFidoService</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl" optional="true">
<name>vendor.xiaomi.hardware.mlipay</name>
<version>1.0-1</version>
<interface>
<name>IMlipayService</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl" optional="true">
<name>vendor.xiaomi.hardware.mtdservice</name>
<version>1.0-3</version>
<interface>
<name>IMTService</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl" optional="true">
<name>vendor.xiaomi.hardware.tidaservice</name>
<version>1.0-2</version>
<interface>
<name>ITidaService</name>
<instance>default</instance>
</interface>
</hal>
</compatibility-matrix>

564
device.mk
View File

@@ -1,38 +1,142 @@
#
# Copyright (C) 2023 The Android Open Source Project
# Copyright (C) 2024 The Android Open Source Project
#
# SPDX-License-Identifier: Apache-2.0
#
DEVICE_PATH := device/xiaomi/sky
# SHIPPING API
PRODUCT_SHIPPING_API_LEVEL := 31
# Inherit virtual_ab_ota_product.
$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota/launch_with_vendor_ramdisk.mk)
# VNDK API
PRODUCT_TARGET_VNDK_VERSION := 32
PRODUCT_EXTRA_VNDK_VERSIONS := 32
# Installs gsi keys into ramdisk, to boot a developer GSI with verified boot.
$(call inherit-product, $(SRC_TARGET_DIR)/product/developer_gsi_keys.mk)
# Setup dalvik vm configs.
$(call inherit-product, frameworks/native/build/phone-xhdpi-4096-dalvik-heap.mk)
# Call the proprietary setup.
$(call inherit-product, vendor/xiaomi/sky/sky-vendor.mk)
# Enable updating of APEXes.
$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
# Add common definitions for Qualcomm
$(call inherit-product, hardware/qcom-caf/common/common.mk)
# Project ID Quota.
$(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk)
QCV_FAMILY_SKUS := parrot ravelin
# AAPT
PRODUCT_AAPT_CONFIG := normal
PRODUCT_AAPT_PREF_CONFIG := xxhdpi
# A/B
AB_OTA_POSTINSTALL_CONFIG += \
RUN_POSTINSTALL_system=true \
POSTINSTALL_PATH_system=system/bin/otapreopt_script \
FILESYSTEM_TYPE_system=erofs \
FILESYSTEM_TYPE_system=ext4 \
POSTINSTALL_OPTIONAL_system=true
AB_OTA_POSTINSTALL_CONFIG += \
RUN_POSTINSTALL_vendor=true \
POSTINSTALL_PATH_vendor=bin/checkpoint_gc \
FILESYSTEM_TYPE_vendor=erofs \
FILESYSTEM_TYPE_vendor=ext4 \
POSTINSTALL_OPTIONAL_vendor=true
PRODUCT_PACKAGES += \
checkpoint_gc \
otapreopt_script
# AIDL NDK backend
PRODUCT_PACKAGES += \
android.hardware.common-V2-ndk_platform.vendor \
android.hardware.gnss-V1-ndk_platform.vendor \
android.hardware.identity-V3-ndk_platform.vendor \
android.hardware.keymaster-V3-ndk_platform.vendor \
android.hardware.light-V1-ndk_platform.vendor \
android.hardware.memtrack-V1-ndk_platform.vendor \
android.hardware.security.keymint-V1-ndk_platform.vendor \
android.hardware.security.secureclock-V1-ndk_platform.vendor \
android.hardware.security.sharedsecret-V1-ndk_platform.vendor
# ANT+
PRODUCT_PACKAGES += \
com.dsi.ant@1.0.vendor:64
# Audio
SOONG_CONFIG_NAMESPACES += android_hardware_audio
SOONG_CONFIG_android_hardware_audio += run_64bit
SOONG_CONFIG_android_hardware_audio_run_64bit := true
PRODUCT_PACKAGES += \
android.hardware.audio@7.0-impl:64 \
android.hardware.audio.effect@7.0-impl:64 \
android.hardware.audio.service \
android.hardware.soundtrigger@2.3-impl:64
PRODUCT_PACKAGES += \
audio.bluetooth.default:64 \
audio.r_submix.default:64 \
audio.usb.default:64 \
sound_trigger.primary.parrot:64
PRODUCT_PACKAGES += \
audioadsprpcd
PRODUCT_PACKAGES += \
libqcompostprocbundle:64 \
libqcomvisualizer:64 \
libqcomvoiceprocessing:64 \
libvolumelistener:64 \
libsndcardparser:64
PRODUCT_COPY_FILES += \
frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration_7_0.xml \
frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml \
frameworks/native/data/etc/android.hardware.audio.pro.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.pro.xml \
frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio/sku_ravelin/audio_policy_configuration.xml \
$(LOCAL_PATH)/configs/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio/sku_ravelin_qssi/audio_policy_configuration.xml
# Audio Graph Manager
PRODUCT_PACKAGES += \
agmcap \
agmcompressplay\
agmplay \
cplay \
libagm_compress_plugin \
libagm_mixer_plugin \
libagm_pcm_plugin \
libagmclient \
libagmmixer \
vendor.qti.hardware.AGMIPC@1.0-service
# Bluetooth
PRODUCT_PACKAGES += \
android.hardware.bluetooth@1.0.vendor:64 \
android.hardware.bluetooth.audio-impl:64 \
vendor.qti.hardware.bluetooth_audio@2.1.vendor:64 \
vendor.qti.hardware.btconfigstore@1.0.vendor:64 \
vendor.qti.hardware.btconfigstore@2.0.vendor:64
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \
frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml
# Boot animation
TARGET_BOOT_ANIMATION_RES := 1080
# Boot control
PRODUCT_PACKAGES += \
android.hardware.boot@1.2-impl-qti \
android.hardware.boot@1.2-impl-qti.recovery \
android.hardware.boot@1.2-impl-qti:64 \
android.hardware.boot@1.2-impl-qti.recovery:64 \
android.hardware.boot@1.2-service \
bootctrl.parrot \
bootctrl.parrot.recovery
@@ -40,21 +144,147 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES_DEBUG += \
bootctl
# Dtb
# Camera
PRODUCT_PACKAGES += \
android.hardware.camera.provider@2.7.vendor:64 \
libcamera_metadata.vendor:64 \
libexif.vendor:64 \
libutilscallstack.vendor:64 \
libyuv.vendor:64 \
vendor.qti.hardware.camera.postproc@1.0.vendor:64
PRODUCT_COPY_FILES += \
$(DEVICE_PATH)/prebuilts/dtb:dtb.img
frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.flash-autofocus.xml \
frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml \
frameworks/native/data/etc/android.hardware.camera.full.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.full.xml \
frameworks/native/data/etc/android.hardware.camera.raw.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.raw.xml
# Capabilityconfigstore
PRODUCT_PACKAGES += \
vendor.qti.hardware.capabilityconfigstore@1.0.vendor:64
# Charger
PRODUCT_PACKAGES += \
libsuspend \
charger_res_images
# CURL
PRODUCT_PACKAGES += \
libcurl.vendor
# Device Settings
PRODUCT_PACKAGES += \
XiaomiParts
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/parts/init.xiaomiparts.rc:$(TARGET_COPY_OUT_PRODUCT)/etc/init/init.xiaomiparts.rc
PRODUCT_SYSTEM_EXT_PROPERTIES += \
persist.lcd.cabc_mode=1
# Display
PRODUCT_PACKAGES += \
android.hardware.graphics.mapper@4.0-impl-qti-display \
vendor.qti.hardware.display.allocator-service \
vendor.qti.hardware.display.composer-service
PRODUCT_PACKAGES += \
init.qti.display_boot.rc \
init.qti.display_boot.sh
PRODUCT_PACKAGES += \
vendor.display.config@1.11.vendor \
vendor.qti.hardware.display.config-V2-ndk_platform.vendor \
vendor.qti.hardware.display.mapper@2.0.vendor
PRODUCT_COPY_FILES += \
hardware/qcom-caf/sm8450/display/config/snapdragon_color_libs_config.xml:$(TARGET_COPY_OUT_VENDOR)/etc/snapdragon_color_libs_config.xml
# DRM
PRODUCT_PACKAGES += \
android.hardware.drm@1.4.vendor:64 \
android.hardware.drm-service.clearkey \
libdrm.vendor:64
# Dumpstate
PRODUCT_PACKAGES += \
android.hardware.dumpstate@1.1.vendor:64
# Fastbootd
PRODUCT_PACKAGES += \
android.hardware.fastboot@1.1-impl-mock \
fastbootd
# Fingerprint
PRODUCT_PACKAGES += \
android.hardware.biometrics.fingerprint@2.3-service.xiaomi
PRODUCT_PACKAGES += \
libvendor.goodix.hardware.biometrics.fingerprint@2.1.vendor
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml
# Firmware
$(call inherit-product-if-exists, vendor/xiaomi/firmware/sky/config.mk)
# FM
PRODUCT_PACKAGES += \
FM2 \
qcom.fmradio
# F2FS utilities
PRODUCT_PACKAGES += \
sg_write_buffer \
f2fs_io \
check_f2fs
# Gatekeeper
PRODUCT_PACKAGES += \
android.hardware.gatekeeper@1.0.vendor:64
# GPS
PRODUCT_PACKAGES += \
android.hardware.gnss@2.1.vendor:64 \
android.hardware.power@1.3.vendor:64 \
libgrpc++_unsecure.vendor:64
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/gps.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gps.conf
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.location.gps.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.location.gps.xml
# Graphics
PRODUCT_PACKAGES += \
libgui_vendor:64
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.opengles.aep.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.opengles.aep.xml \
frameworks/native/data/etc/android.hardware.vulkan.compute-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.compute-0.xml \
frameworks/native/data/etc/android.hardware.vulkan.level-1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level-1.xml \
frameworks/native/data/etc/android.hardware.vulkan.version-1_1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version-1_1.xml \
frameworks/native/data/etc/android.software.opengles.deqp.level-2021-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.opengles.deqp.level.xml \
frameworks/native/data/etc/android.software.vulkan.deqp.level-2021-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.vulkan.deqp.level.xml
# Health
PRODUCT_PACKAGES += \
android.hardware.health-service.xiaomi \
android.hardware.health-service.xiaomi_recovery \
android.hardware.health@1.0.vendor \
android.hardware.health@2.1.vendor
# HIDL
PRODUCT_PACKAGES += \
android.hidl.allocator@1.0.vendor:64 \
android.hidl.memory.block@1.0.vendor:64 \
libhidltransport.vendor:64 \
libhwbinder.vendor:64
# Hotword Enrollement
PRODUCT_COPY_FILES += \
$(DEVICE_PATH)/configs/privapp-permissions-hotword.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/privapp-permissions-hotword.xml
# Input
PRODUCT_COPY_FILES += \
$(DEVICE_PATH)/configs/idc/uinput-fpc.idc:$(TARGET_COPY_OUT_SYSTEM)/usr/idc/uinput-fpc.idc \
@@ -62,6 +292,110 @@ PRODUCT_COPY_FILES += \
$(DEVICE_PATH)/configs/keylayout/uinput-fpc.kl:$(TARGET_COPY_OUT_SYSTEM)/usr/keylayout/uinput-fpc.kl \
$(DEVICE_PATH)/configs/keylayout/uinput-goodix.kl:$(TARGET_COPY_OUT_SYSTEM)/usr/keylayout/uinput-goodix.kl
# IPACM
PRODUCT_PACKAGES += \
ipacm \
IPACM_cfg.xml \
IPACM_Filter_cfg.xml
# IR
PRODUCT_PACKAGES += \
android.hardware.ir@1.0-impl:64 \
android.hardware.ir@1.0-service
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.consumerir.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.consumerir.xml
# JSON
PRODUCT_PACKAGES += \
libjson:64 \
libjsoncpp:64 \
libjsoncpp_ndk \
libjsoncpp.vendor:64
# Keymaster
PRODUCT_PACKAGES += \
android.hardware.keymaster@4.1.vendor:64 \
libkeymaster_messages.vendor:64
# Keymint
PRODUCT_PACKAGES += \
android.hardware.security.rkp-V1-ndk.vendor:64
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.software.device_id_attestation.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.device_id_attestation.xml
# Lineage Health
PRODUCT_PACKAGES += \
vendor.lineage.health-service.default
# Media
PRODUCT_PACKAGES += \
libcodec2_hidl@1.0.vendor:64 \
libsfplugin_ccodec_utils.vendor:64 \
libavservices_minijail \
libavservices_minijail.vendor:64 \
libavservices_minijail_vendor
# Mlipay
PRODUCT_PACKAGES += \
vendor.xiaomi.hardware.mlipay@1.1.vendor
# NFC
PRODUCT_PACKAGES += \
NfcNci \
android.hardware.nfc@1.2.vendor:64 \
libchrome.vendor:64
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.nfc.hce.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesim/android.hardware.nfc.hce.xml \
frameworks/native/data/etc/android.hardware.nfc.hcef.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesim/android.hardware.nfc.hcef.xml \
frameworks/native/data/etc/android.hardware.nfc.uicc.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesim/android.hardware.nfc.uicc.xml \
frameworks/native/data/etc/android.hardware.nfc.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesim/android.hardware.nfc.xml \
frameworks/native/data/etc/com.android.nfc_extras.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesim/com.android.nfc_extras.xml \
frameworks/native/data/etc/com.nxp.mifare.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesim/com.nxp.mifare.xml
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.nfc.hce.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesim1/android.hardware.nfc.hce.xml \
frameworks/native/data/etc/android.hardware.nfc.hcef.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesim1/android.hardware.nfc.hcef.xml \
frameworks/native/data/etc/android.hardware.nfc.uicc.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesim1/android.hardware.nfc.uicc.xml \
frameworks/native/data/etc/android.hardware.nfc.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesim1/android.hardware.nfc.xml \
frameworks/native/data/etc/com.android.nfc_extras.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesim1/com.android.nfc_extras.xml \
frameworks/native/data/etc/com.nxp.mifare.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesim1/com.nxp.mifare.xml
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.nfc.ese.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesim1ese/android.hardware.nfc.ese.xml \
frameworks/native/data/etc/android.hardware.nfc.hce.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesim1ese/android.hardware.nfc.hce.xml \
frameworks/native/data/etc/android.hardware.nfc.hcef.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesim1ese/android.hardware.nfc.hcef.xml \
frameworks/native/data/etc/android.hardware.nfc.uicc.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesim1ese/android.hardware.nfc.uicc.xml \
frameworks/native/data/etc/android.hardware.nfc.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesim1ese/android.hardware.nfc.xml \
frameworks/native/data/etc/com.android.nfc_extras.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesim1ese/com.android.nfc_extras.xml \
frameworks/native/data/etc/com.nxp.mifare.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesim1ese/com.nxp.mifare.xml
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.nfc.ese.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesimese/android.hardware.nfc.ese.xml \
frameworks/native/data/etc/android.hardware.nfc.hce.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesimese/android.hardware.nfc.hce.xml \
frameworks/native/data/etc/android.hardware.nfc.hcef.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesimese/android.hardware.nfc.hcef.xml \
frameworks/native/data/etc/android.hardware.nfc.uicc.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesimese/android.hardware.nfc.uicc.xml \
frameworks/native/data/etc/android.hardware.nfc.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesimese/android.hardware.nfc.xml \
frameworks/native/data/etc/com.android.nfc_extras.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesimese/com.android.nfc_extras.xml \
frameworks/native/data/etc/com.nxp.mifare.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesimese/com.nxp.mifare.xml
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.nfc.ese.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hceese/android.hardware.nfc.ese.xml \
frameworks/native/data/etc/android.hardware.nfc.hce.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hceese/android.hardware.nfc.hce.xml \
frameworks/native/data/etc/android.hardware.nfc.hcef.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hceese/android.hardware.nfc.hcef.xml \
frameworks/native/data/etc/android.hardware.nfc.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hceese/android.hardware.nfc.xml \
frameworks/native/data/etc/com.android.nfc_extras.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hceese/com.android.nfc_extras.xml \
frameworks/native/data/etc/com.nxp.mifare.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hceese/com.nxp.mifare.xml
# Network
PRODUCT_PACKAGES += \
android.system.net.netd@1.1.vendor
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.software.ipsec_tunnels.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.ipsec_tunnels.xml
# Overlays
DEVICE_PACKAGE_OVERLAYS += \
$(DEVICE_PATH)/overlay-lineage
@@ -69,22 +403,60 @@ DEVICE_PACKAGE_OVERLAYS += \
# Partitions
PRODUCT_USE_DYNAMIC_PARTITIONS := true
# Power
PRODUCT_PACKAGES += \
android.hardware.power-service.lineage-libperfmgr \
libperfmgr.vendor \
libqti-perfd-client
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/powerhint.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.json
# Properties
include $(DEVICE_PATH)/configs/properties/default.mk
# Protobuf
PRODUCT_PACKAGES += \
libprotobuf-cpp-full-3.9.1-vendorcompat
# QTI
PRODUCT_PACKAGES += \
vendor.qti.hardware.systemhelper@1.0.vendor:64
# RenderScript
PRODUCT_PACKAGES += \
android.hardware.renderscript@1.0-impl:64
# RIL
PRODUCT_PACKAGES += \
android.hardware.radio.config@1.3.vendor:64 \
android.hardware.radio.deprecated@1.0.vendor:64
PRODUCT_PACKAGES += \
Ims \
QtiTelephony
# Perf
PRODUCT_PACKAGES += \
vendor.qti.hardware.perf@2.3
# Rootdir
PRODUCT_PACKAGES += \
init.recovery.qcom.rc \
init.recovery.usb.rc
charger_fw_fstab.qti \
fstab.default \
init.class_main.sh \
init.sky.rc \
init.sky.perf.rc \
init.qcom.class_core.sh \
init.qcom.early_boot.sh \
init.qcom.post_boot.sh \
init.qcom.power.rc \
init.qcom.rc \
init.qcom.sh \
init.target.rc \
ueventd.qcom.rc \
ueventd-odm.rc \
init.recovery.qcom.rc
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/bin/init.kernel.post_boot.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.kernel.post_boot.sh \
$(LOCAL_PATH)/rootdir/bin/init.sky.perf.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.sky.perf.sh
# RRO Overlays
PRODUCT_PACKAGES += \
@@ -97,13 +469,67 @@ PRODUCT_PACKAGES += \
WifiResCommon \
WifiResTarget
# Power
# Remove unwanted packages
PRODUCT_PACKAGES += \
android.hardware.power-service-qti
RemovePackages
# Secure element
PRODUCT_PACKAGES += \
android.hardware.secure_element@1.2.vendor:64
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.se.omapi.ese.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hceese/android.hardware.se.omapi.ese.xml \
frameworks/native/data/etc/android.hardware.se.omapi.uicc.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hceese/android.hardware.se.omapi.uicc.xml
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.se.omapi.uicc.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesim/android.hardware.se.omapi.uicc.xml
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.se.omapi.uicc.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesim1/android.hardware.se.omapi.uicc.xml
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.se.omapi.ese.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesim1ese/android.hardware.se.omapi.ese.xml \
frameworks/native/data/etc/android.hardware.se.omapi.uicc.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesim1ese/android.hardware.se.omapi.uicc.xml
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.se.omapi.ese.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesimese/android.hardware.se.omapi.ese.xml \
frameworks/native/data/etc/android.hardware.se.omapi.uicc.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_hcesimese/android.hardware.se.omapi.uicc.xml
# Sensors
PRODUCT_PACKAGES += \
android.frameworks.sensorservice@1.0 \
android.frameworks.sensorservice@1.0.vendor:64 \
android.hardware.sensors-service.xiaomi-multihal \
libsensorndkbridge:64
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/sku_ravelin/android.hardware.sensor.accelerometer.xml \
frameworks/native/data/etc/android.hardware.sensor.compass.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/sku_ravelin/android.hardware.sensor.compass.xml \
frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/sku_ravelin/android.hardware.sensor.gyroscope.xml \
frameworks/native/data/etc/android.hardware.sensor.light.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/sku_ravelin/android.hardware.sensor.light.xml \
frameworks/native/data/etc/android.hardware.sensor.proximity.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/sku_ravelin/android.hardware.sensor.proximity.xml \
frameworks/native/data/etc/android.hardware.sensor.stepcounter.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/sku_ravelin/android.hardware.sensor.stepcounter.xml \
frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/sku_ravelin/android.hardware.sensor.stepdetector.xml
# Servicetracker
PRODUCT_PACKAGES += \
vendor.qti.hardware.servicetracker@1.2.vendor:64
# SHIPPING API
PRODUCT_SHIPPING_API_LEVEL := 31
# Soong namespaces
PRODUCT_SOONG_NAMESPACES += \
$(DEVICE_PATH)
$(DEVICE_PATH) \
hardware/google/interfaces \
hardware/google/pixel \
hardware/xiaomi \
hardware/lineage/interfaces/power-libperfmgr \
hardware/qcom-caf/common/libqti-perfd-client
# SQLite
PRODUCT_PACKAGES += \
libsqlite.vendor:64
# Telephony
PRODUCT_PACKAGES += \
@@ -126,6 +552,23 @@ PRODUCT_PACKAGES += \
PRODUCT_BOOT_JARS += \
telephony-ext
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.telephony.cdma.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.cdma.xml \
frameworks/native/data/etc/android.hardware.telephony.gsm.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.gsm.xml \
frameworks/native/data/etc/android.hardware.telephony.ims.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.ims.xml \
frameworks/native/data/etc/android.software.sip.voip.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.sip.voip.xml
# Thermal
PRODUCT_PACKAGES += \
android.hardware.thermal@2.0-service.qti-v2
PRODUCT_VENDOR_PROPERTIES += \
vendor.sys.thermal.data.path=/data/vendor/thermal/
# Touchscreen
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml
# Update engine
PRODUCT_PACKAGES += \
checkpoint_gc \
@@ -136,3 +579,82 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES_DEBUG += \
update_engine_client
# USB
PRODUCT_PACKAGES += \
android.hardware.usb@1.3-service-qti \
android.hardware.usb.gadget@1.2-service-qti
PRODUCT_PACKAGES += \
init.qcom.usb.rc \
init.qcom.usb.sh \
usb_compositions.conf
PRODUCT_SOONG_NAMESPACES += vendor/qcom/opensource/usb/etc
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml \
frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml
# VENDOR API
BOARD_SHIPPING_API_LEVEL := $(BOARD_API_LEVEL)
# Vendor service manager
PRODUCT_PACKAGES += \
vndservicemanager
# Verified boot
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.software.verified_boot.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.verified_boot.xml
# Vibrator
PRODUCT_PACKAGES += \
vendor.qti.hardware.vibrator.service
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/excluded-input-devices.xml:$(TARGET_COPY_OUT_VENDOR)/etc/excluded-input-devices.xml
# VNDK
PRODUCT_PACKAGES += \
libstdc++_vendor
PRODUCT_COPY_FILES += \
prebuilts/vndk/v32/arm64/arch-arm64-armv8-a/shared/vndk-sp/libutils.so:$(TARGET_COPY_OUT_VENDOR)/lib64/libutils-v32.so \
prebuilts/vndk/v32/arm64/arch-arm64-armv8-a/shared/vndk-sp/libutils.so:$(TARGET_COPY_OUT_VENDOR)/lib64/libutils-v32.so \
prebuilts/vndk/v32/arm64/arch-arm64-armv8-a/shared/vndk-core/libbinder.so:$(TARGET_COPY_OUT_VENDOR)/lib64/libbinder-v32.so \
prebuilts/vndk/v32/arm64/arch-arm64-armv8-a/shared/vndk-sp/libhidlbase.so:$(TARGET_COPY_OUT_VENDOR)/lib64/libhidlbase-v32.so
# Wi-Fi
PRODUCT_PACKAGES += \
android.hardware.wifi-service \
android.hardware.wifi.hostapd@1.0.vendor \
wpa_cli \
libwpa_client:64 \
hostapd \
libwifi-hal-qcom:64 \
wpa_supplicant \
wpa_supplicant.conf
PRODUCT_COPY_FILES += \
$(DEVICE_PATH)/configs/WCNSS_qcom_cfg.ini:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/adrastea/WCNSS_qcom_cfg.ini
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.wifi.aware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.aware.xml \
frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \
frameworks/native/data/etc/android.hardware.wifi.passpoint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.passpoint.xml \
frameworks/native/data/etc/android.hardware.wifi.rtt.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.rtt.xml \
frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml
# WiFi Display
PRODUCT_PACKAGES += \
libnl \
libpng.vendor \
libwfdaac_vendor
PRODUCT_BOOT_JARS += \
WfdCommon
# WiFi firmware symlinks
PRODUCT_PACKAGES += \
firmware_adrastea_wlan_mac.bin_symlink \
firmware_adrastea_WCNSS_qcom_cfg.ini_symlink

16
evolution.dependencies Normal file
View File

@@ -0,0 +1,16 @@
[
{
"repository": "device_xiaomi_sky-kernel",
"target_path": "device/xiaomi/sky-kernel"
},
{
"repository": "vendor_xiaomi_sky",
"target_path": "vendor/xiaomi/sky"
},
{
"repository": "LineageOS/android_hardware_xiaomi",
"target_path": "hardware/xiaomi",
"remote": "github",
"branch": "lineage-21"
}
]

View File

@@ -54,6 +54,86 @@ if [ -z "${SRC}" ]; then
SRC="adb"
fi
function blob_fixup() {
case "${1}" in
vendor/bin/sensors.qti)
"${PATCHELF}" --replace-needed "libprotobuf-cpp-lite-3.9.1.so" "libprotobuf-cpp-full-3.9.1.so" "${2}"
;;
vendor/bin/sensors-qesdk)
"${PATCHELF}" --replace-needed "libprotobuf-cpp-lite-3.9.1.so" "libprotobuf-cpp-full-3.9.1.so" "${2}"
;;
vendor/etc/media_codecs_ravelin.xml)
sed -i -E '/media_codecs_(google_audio|google_c2|google_telephony|vendor_audio)/d' "${2}"
;;
vendor/lib64/libqshcamera.so)
"${PATCHELF}" --replace-needed "libprotobuf-cpp-lite-3.9.1.so" "libprotobuf-cpp-full-3.9.1.so" "${2}"
;;
vendor/lib64/libsnsdiaglog.so)
"${PATCHELF}" --replace-needed "libprotobuf-cpp-lite-3.9.1.so" "libprotobuf-cpp-full-3.9.1.so" "${2}"
;;
vendor/lib64/sensors.touch.so)
"${PATCHELF}" --replace-needed "libprotobuf-cpp-lite-3.9.1.so" "libprotobuf-cpp-full-3.9.1.so" "${2}"
;;
vendor/lib64/sensors.ssc.so)
"${PATCHELF}" --replace-needed "libprotobuf-cpp-lite-3.9.1.so" "libprotobuf-cpp-full-3.9.1.so" "${2}"
;;
vendor/lib64/libssc.so)
"${PATCHELF}" --replace-needed "libprotobuf-cpp-lite-3.9.1.so" "libprotobuf-cpp-full-3.9.1.so" "${2}"
;;
vendor/lib64/libsensorcal.so)
"${PATCHELF}" --replace-needed "libprotobuf-cpp-lite-3.9.1.so" "libprotobuf-cpp-full-3.9.1.so" "${2}"
;;
vendor/lib64/mediadrm/libwvdrmengine.so)
"${PATCHELF}" --replace-needed "libprotobuf-cpp-lite-3.9.1.so" "libprotobuf-cpp-full-3.9.1.so" "${2}"
;;
vendor/lib64/libsnsapi.so)
"${PATCHELF}" --replace-needed "libprotobuf-cpp-lite-3.9.1.so" "libprotobuf-cpp-full-3.9.1.so" "${2}"
;;
vendor/lib64/libssccalapi@2.0.so)
"${PATCHELF}" --replace-needed "libprotobuf-cpp-lite-3.9.1.so" "libprotobuf-cpp-full-3.9.1.so" "${2}"
;;
vendor/lib64/libgnss.so)
"${PATCHELF}" --replace-needed "libprotobuf-cpp-lite-3.9.1.so" "libprotobuf-cpp-full-3.9.1.so" "${2}"
;;
vendor/lib64/libwvhidl.so)
"${PATCHELF}" --replace-needed "libprotobuf-cpp-lite-3.9.1.so" "libprotobuf-cpp-full-3.9.1.so" "${2}"
;;
vendor/lib/libsnsdiaglog.so)
"${PATCHELF}" --replace-needed "libprotobuf-cpp-lite-3.9.1.so" "libprotobuf-cpp-full-3.9.1.so" "${2}"
;;
vendor/lib/sensors.touch.so)
"${PATCHELF}" --replace-needed "libprotobuf-cpp-lite-3.9.1.so" "libprotobuf-cpp-full-3.9.1.so" "${2}"
;;
vendor/lib/sensors.ssc.so)
"${PATCHELF}" --replace-needed "libprotobuf-cpp-lite-3.9.1.so" "libprotobuf-cpp-full-3.9.1.so" "${2}"
;;
vendor/lib/libssc.so)
"${PATCHELF}" --replace-needed "libprotobuf-cpp-lite-3.9.1.so" "libprotobuf-cpp-full-3.9.1.so" "${2}"
;;
vendor/lib/libsensorcal.so)
"${PATCHELF}" --replace-needed "libprotobuf-cpp-lite-3.9.1.so" "libprotobuf-cpp-full-3.9.1.so" "${2}"
;;
vendor/lib/mediadrm/libwvdrmengine.so)
"${PATCHELF}" --replace-needed "libprotobuf-cpp-lite-3.9.1.so" "libprotobuf-cpp-full-3.9.1.so" "${2}"
;;
vendor/lib/libsnsapi.so)
"${PATCHELF}" --replace-needed "libprotobuf-cpp-lite-3.9.1.so" "libprotobuf-cpp-full-3.9.1.so" "${2}"
;;
vendor/lib/libssccalapi@2.0.so)
"${PATCHELF}" --replace-needed "libprotobuf-cpp-lite-3.9.1.so" "libprotobuf-cpp-full-3.9.1.so" "${2}"
;;
vendor/lib/libgnss.so)
"${PATCHELF}" --replace-needed "libprotobuf-cpp-lite-3.9.1.so" "libprotobuf-cpp-full-3.9.1.so" "${2}"
;;
vendor/lib64/libqtikeymint.so)
"${PATCHELF}" --add-needed "android.hardware.security.rkp-V1-ndk.so" "${2}"
;;
vendor/lib64/libhme.so)
"${PATCHELF}" --replace-needed "libstdc++.so" "libstdc++_vendor.so" "${2}"
;;
esac
}
# Initialize the helper
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}"

48
healthd-ext/Android.bp Normal file
View File

@@ -0,0 +1,48 @@
cc_defaults {
name: "android.hardware.health-service.xiaomi-defaults",
relative_install_path: "hw",
vintf_fragments: ["android.hardware.health-service.xiaomi.xml"],
vendor: true,
recovery_available: true,
defaults: [
"libhealth_aidl_impl_user",
],
include_dirs: [
"system/core/healthd",
"system/core/healthd/include",
"system/core/healthd/include_charger"
],
static_libs: [
"libhealth_aidl_impl",
],
srcs: [
"main.cpp",
],
cflags: [
"-Wall",
"-Werror",
],
}
cc_binary {
name: "android.hardware.health-service.xiaomi",
recovery: false,
vendor: true,
defaults: ["android.hardware.health-service.xiaomi-defaults"],
init_rc: ["android.hardware.health-service.xiaomi.rc"],
overrides: ["charger","android.hardware.health-service.qti"],
}
cc_binary {
name: "android.hardware.health-service.xiaomi_recovery",
vendor: false,
recovery: true,
defaults: ["android.hardware.health-service.xiaomi-defaults"],
init_rc: ["android.hardware.health-service.xiaomi_recovery.rc"],
overrides: ["charger.recovery", "android.hardware.health-service.qti_recovery"],
}

View File

@@ -0,0 +1,14 @@
service vendor.health-default /vendor/bin/hw/android.hardware.health-service.xiaomi
class hal
user system
group system
capabilities WAKE_ALARM BLOCK_SUSPEND
file /dev/kmsg w
service vendor.charger /vendor/bin/hw/android.hardware.health-service.xiaomi --charger
class charger
seclabel u:r:charger_vendor:s0
user system
group system wakelock input graphics
capabilities SYS_BOOT WAKE_ALARM BLOCK_SUSPEND
file /dev/kmsg w

View File

@@ -0,0 +1,12 @@
<!--
Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
SPDX-License-Identifier: BSD-3-Clause-Clear
-->
<manifest version="1.0" type="device">
<hal format="aidl">
<name>android.hardware.health</name>
<version>2</version>
<fqname>IHealth/default</fqname>
</hal>
</manifest>

View File

@@ -0,0 +1,7 @@
service vendor.health-recovery /system/bin/hw/android.hardware.health-service.xiaomi_recovery
class hal
seclabel u:r:hal_health_default:s0
user system
group system
capabilities WAKE_ALARM BLOCK_SUSPEND
file /dev/kmsg w

123
healthd-ext/main.cpp Normal file
View File

@@ -0,0 +1,123 @@
/*
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause-Clear
*/
#define LOG_TAG "android.hardware.health-service.xiaomi"
#include <android-base/logging.h>
#include <android/binder_interface_utils.h>
#include <health/utils.h>
#include <health-impl/ChargerUtils.h>
#include <health-impl/Health.h>
#include <cutils/klog.h>
using aidl::android::hardware::health::HalHealthLoop;
using aidl::android::hardware::health::Health;
#if !CHARGER_FORCE_NO_UI
using aidl::android::hardware::health::charger::ChargerCallback;
using aidl::android::hardware::health::charger::ChargerModeMain;
namespace aidl::android::hardware::health {
class ChargerCallbackImpl : public ChargerCallback {
public:
ChargerCallbackImpl(const std::shared_ptr<Health>& service) : ChargerCallback(service) {}
bool ChargerEnableSuspend() override { return true; }
};
} //namespace aidl::android::hardware::health
#endif
namespace aidl::android::hardware::health {
static constexpr int kChargeCounterMultiplier = 1000; // mAh to uAh
static constexpr int kChargeTimeToFullMultiplier = 60; // mins to secs
class HealthImpl : public Health {
public:
using Health::Health;
virtual ~HealthImpl() {}
ndk::ScopedAStatus getChargeCounterUah(int32_t* out) override;
protected:
void UpdateHealthInfo(HealthInfo* health_info) override;
};
void HealthImpl::UpdateHealthInfo(HealthInfo* health_info) {
if (health_info->batteryChargeTimeToFullNowSeconds == 65535) {
health_info->batteryChargeTimeToFullNowSeconds = -1;
} else {
health_info->batteryChargeTimeToFullNowSeconds *= kChargeTimeToFullMultiplier;
}
health_info->batteryChargeCounterUah *= kChargeCounterMultiplier;
}
ndk::ScopedAStatus HealthImpl::getChargeCounterUah(int32_t* out) {
*out *= kChargeCounterMultiplier;
return ndk::ScopedAStatus::ok();
}
} // namespace aidl::android::hardware::health
static constexpr const char* gInstanceName = "default";
static constexpr std::string_view gChargerArg{"--charger"};
constexpr char ucsiPSYName[]{"ucsi-source-psy-soc:qcom,pmic_glink:qcom,ucsi1"};
#define RETRY_COUNT 100
void qti_healthd_board_init(struct healthd_config *hc)
{
int fd;
unsigned char retries = RETRY_COUNT;
int ret = 0;
unsigned char buf;
hc->ignorePowerSupplyNames.push_back(android::String8(ucsiPSYName));
retry:
if (!retries) {
KLOG_ERROR(LOG_TAG, "Cannot open battery/capacity, fd=%d\n", fd);
return;
}
fd = open("/sys/class/power_supply/battery/capacity", 0440);
if (fd >= 0) {
KLOG_INFO(LOG_TAG, "opened battery/capacity after %d retries\n", RETRY_COUNT - retries);
while (retries) {
ret = read(fd, &buf, 1);
if(ret >= 0) {
KLOG_INFO(LOG_TAG, "Read Batt Capacity after %d retries ret : %d\n", RETRY_COUNT - retries, ret);
close(fd);
return;
}
retries--;
usleep(100000);
}
KLOG_ERROR(LOG_TAG, "Failed to read Battery Capacity ret=%d\n", ret);
close(fd);
return;
}
retries--;
usleep(100000);
goto retry;
}
int main(int argc, char** argv) {
#ifdef __ANDROID_RECOVERY__
android::base::InitLogging(argv, android::base::KernelLogger);
#endif
auto config = std::make_unique<healthd_config>();
qti_healthd_board_init(config.get());
::android::hardware::health::InitHealthdConfig(config.get());
auto binder = ndk::SharedRefBase::make<aidl::android::hardware::health::HealthImpl>(gInstanceName, std::move(config));
if (argc >= 2 && argv[1] == gChargerArg) {
#if !CHARGER_FORCE_NO_UI
KLOG_INFO(LOG_TAG, "Starting charger mode with UI.");
auto charger_callback = std::make_shared<aidl::android::hardware::health::ChargerCallbackImpl>(binder);
return ChargerModeMain(binder, charger_callback);
#endif
KLOG_INFO(LOG_TAG, "Starting charger mode without UI.");
} else {
KLOG_INFO(LOG_TAG, "Starting health HAL.");
}
auto hal_health_loop = std::make_shared<HalHealthLoop>(binder, binder);
return hal_health_loop->StartLoop();
}

10
init/Android.bp Normal file
View File

@@ -0,0 +1,10 @@
cc_library_static {
name: "libinit_sky",
srcs: ["init_sky.cpp"],
recovery_available: true,
whole_static_libs: ["libbase"],
include_dirs: [
"system/libbase/include",
"system/core/init"
]
}

93
init/init_sky.cpp Normal file
View File

@@ -0,0 +1,93 @@
/*
Copyright (c) 2015, The Linux Foundation. All rights reserved.
Copyright (C) 2016 The CyanogenMod Project.
Copyright (C) 2019-2020 The LineageOS Project.
Copyright (C) 2021 The Android Open Source Project.
Copyright (C) 2022-2023 Paranoid Android.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of The Linux Foundation nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <cstdlib>
#include <string.h>
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
#include <sys/_system_properties.h>
#include <android-base/properties.h>
#include "property_service.h"
#include "vendor_init.h"
using android::base::GetProperty;
using std::string;
// List of partitions to override props
static const string source_partitions[] = {
"", "bootimage.", "odm.", "product.", "system.",
"system_ext.", "vendor.", "vendor_dlkm."
};
void property_override(char const prop[], char const value[]) {
auto pi = (prop_info*) __system_property_find(prop);
if (pi != nullptr)
__system_property_update(pi, value, strlen(value));
else
__system_property_add(prop, strlen(prop), value, strlen(value));
}
void set_ro_build_prop(const string &prop, const string &value) {
string prop_name;
for (const string &source : source_partitions) {
prop_name = "ro.product." + source + prop;
property_override(prop_name.c_str(), value.c_str());
}
}
void set_device_props(const string brand, const string device,
const string model, const string name, const string marketname) {
set_ro_build_prop("brand", brand);
set_ro_build_prop("device", device);
set_ro_build_prop("model", model);
set_ro_build_prop("name", name);
set_ro_build_prop("marketname", marketname);
property_override("ro.product.board", device.c_str());
property_override("bluetooth.device.default_name", marketname.c_str());
}
void vendor_load_properties() {
// Detect variant and override properties
string region = GetProperty("ro.boot.hwc", "");
string boardid = GetProperty("ro.boot.boardid", "");
if (region == "India" && boardid == "S88019EP1") {
set_device_props("POCO", "sky", "23076PC4BI", "sky_p_in", "POCO M6 Pro 5G");
} else {
set_device_props("Redmi", "sky", "23076RN4BI", "sky_in", "Redmi 12 5G");
}
// Set hardware revision
property_override("ro.boot.hardware.revision", GetProperty("ro.boot.hwversion", "").c_str());
}

View File

@@ -7,28 +7,17 @@
DEVICE_PATH := device/xiaomi/sky
# Configure core_64_bit.mk
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk)
# Configure full_base_telephony.mk
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
# Configure launch_with_vendor_ramdisk.mk
$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota/launch_with_vendor_ramdisk.mk)
# Configure emulated_storage.mk
$(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk)
# Configure updatable_apex.mk
$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
# Configure developer_gsi_keys.mk
$(call inherit-product, $(SRC_TARGET_DIR)/product/developer_gsi_keys.mk)
# Inherit common LineageOS configurations
# Inherit common Evolution-X configurations
$(call inherit-product, vendor/lineage/config/common_full_phone.mk)
# Setup dalvik vm configs
$(call inherit-product, frameworks/native/build/phone-xhdpi-6144-dalvik-heap.mk)
EVO_BUILD_TYPE := Official
TARGET_SUPPORTS_QUICK_TAP := false
TARGET_BOOT_ANIMATION_RES := 1080
USE_PIXEL_CHARGER := true
# Inherit device configurations
$(call inherit-product, $(DEVICE_PATH)/device.mk)

6
ndk/Android.bp Normal file
View File

@@ -0,0 +1,6 @@
cc_library_shared {
name: "vendor.qti.hardware.display.config-V2-ndk_platform",
shared_libs: ["vendor.qti.hardware.display.config-V2-ndk"],
system_ext_specific: true,
vendor_available: true,
}

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2024 Evolution X
SPDX-License-Identifier: Apache-2.0
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- About device screen, build maintainer -->
<string name="build_maintainer_summary">Ashwani × Suvojeet Sengupta </string>
<string name="build_maintainer_donate_url">https://t.me/suvojeet_sengupta</string>
</resources>

26
parts/Android.bp Normal file
View File

@@ -0,0 +1,26 @@
//
// Copyright (C) 2017-2021 The LineageOS Project
// (C) 2023 Paranoid Android
//
// SPDX-License-Identifier: Apache-2.0
//
android_app {
name: "XiaomiParts",
init_rc: ["init.xiaomiparts.rc"],
srcs: ["src/**/*.java"],
resource_dirs: ["res"],
certificate: "platform",
platform_apis: true,
system_ext_specific: true,
privileged: true,
static_libs: [
"org.lineageos.settings.resources",
],
optimize: {
proguard_flags_files: ["proguard.flags"],
},
}

105
parts/AndroidManifest.xml Normal file
View File

@@ -0,0 +1,105 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.lineageos.settings"
android:versionCode="3"
android:versionName="3.0"
android:sharedUserId="android.uid.system">
<uses-sdk
android:minSdkVersion="24"
android:targetSdkVersion="30" />
<uses-permission android:name="android.permission.DEVICE_POWER" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<application
android:allowBackup="true"
android:label="@string/app_name"
android:persistent="true">
<receiver android:name=".BootCompletedReceiver">
<intent-filter android:priority="1000">
<action android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
<activity
android:name=".thermal.ThermalSettingsActivity"
android:label="@string/thermal_title"
android:icon="@drawable/ic_thermal_settings"
android:theme="@style/Theme.SubSettingsBase_v31">
<intent-filter>
<action android:name="com.android.settings.action.IA_SETTINGS" />
</intent-filter>
<meta-data
android:name="com.android.settings.category"
android:value="com.android.settings.category.ia.system" />
<meta-data
android:name="com.android.settings.summary"
android:resource="@string/thermal_summary" />
<meta-data
android:name="com.android.settings.icon"
android:resource="@drawable/ic_thermal_settings" />
</activity>
<activity
android:name=".speaker.ClearSpeakerActivity"
android:label="@string/clear_speaker_title"
android:theme="@style/Theme.SubSettingsBase">
<intent-filter>
<action android:name="com.android.settings.action.IA_SETTINGS" />
</intent-filter>
<meta-data android:name="com.android.settings.category"
android:value="com.android.settings.category.ia.sound" />
</activity>
<service
android:name=".thermal.ThermalService"
android:permission="ThermalService">
</service>
<activity
android:name=".display.LcdFeaturesPreferenceActivity"
android:label="@string/lcd_features_title"
android:exported="false"
android:theme="@style/Theme.SubSettingsBase">
<intent-filter>
<action android:name="com.android.settings.action.IA_SETTINGS" />
</intent-filter>
<meta-data
android:name="com.android.settings.category"
android:value="com.android.settings.category.ia.display" />
<meta-data
android:name="com.android.settings.summary"
android:resource="@string/lcd_features_summary" />
</activity>
<service
android:name=".display.HbmTileService"
android:exported="true"
android:icon="@drawable/ic_hbm"
android:label="@string/lcd_hbm_tile_title"
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
<intent-filter>
<action android:name="android.service.quicksettings.action.QS_TILE"/>
</intent-filter>
</service>
<service
android:name=".display.CabcTileService"
android:exported="true"
android:icon="@drawable/ic_cabc"
android:label="@string/lcd_cabc_title"
android:permission="android.permission.BIND_QUICK_SETTINGS_TILE">
<intent-filter>
<action android:name="android.service.quicksettings.action.QS_TILE"/>
</intent-filter>
</service>
<service
android:name=".display.LcdFeaturesService"
android:exported="true"
android:permission="LcdFeaturesService">
</service>
</application>
</manifest>

40
parts/init.xiaomiparts.rc Normal file
View File

@@ -0,0 +1,40 @@
# Copyright (C) 2021 Paranoid Android
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
on boot
chown system system /sys/devices/virtual/display/disp_param/disp_param
chmod 0660 /sys/devices/virtual/display/disp_param/disp_param
on property:persist.lcd.hbm_mode=0
write /sys/devices/virtual/display/disp_param/disp_param "0xa0000"
on property:persist.lcd.hbm_mode=1
write /sys/devices/virtual/display/disp_param/disp_param "0xb0000"
on property:persist.lcd.hbm_mode=2
write /sys/devices/virtual/display/disp_param/disp_param "0xc0000"
on property:persist.lcd.hbm_mode=3
write /sys/devices/virtual/display/disp_param/disp_param "0xd0000"
on property:persist.lcd.cabc_mode=0
write /sys/devices/virtual/display/disp_param/disp_param "0x400"
on property:persist.lcd.cabc_mode=1
write /sys/devices/virtual/display/disp_param/disp_param "0x100"
on property:persist.lcd.cabc_mode=2
write /sys/devices/virtual/display/disp_param/disp_param "0x200"
on property:persist.lcd.cabc_mode=3
write /sys/devices/virtual/display/disp_param/disp_param "0x300"

3
parts/proguard.flags Normal file
View File

@@ -0,0 +1,3 @@
-keep class org.lineageos.settings.* {
*;
}

View File

@@ -0,0 +1,19 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/textColorSecondary">
<path
android:fillColor="#000000"
android:pathData="M19.5 19h-4c-0.276 0-0.5-0.224-0.5-0.5s0.224-0.5 0.5 -0.5h4c0.827 0 1.5-0.673 1.5-1.5v-1c0-0.276 0.224 -0.5 0.5 -0.5h0.991c0.276 0 0.5-0.224 0.5 -0.5v-6c0-0.276-0.224-0.5-0.5-0.5h-0.991c-0.276 0-0.5-0.224-0.5-0.5v-1c0-0.827-0.673-1.5-1.5-1.5h-4c-0.276 0-0.5-0.224-0.5-0.5s0.224-0.5 0.5 -0.5h4c1.378 0 2.5 1.122 2.5 2.5v0.5h0.491c0.827 0 1.5 0.673 1.5 1.5v6c0 0.827-0.673 1.5-1.5 1.5h-0.491v0.5c0 1.378-1.122 2.5-2.5 2.5z" />
<path
android:fillColor="#000000"
android:pathData="M6.75 19h-4.25c-1.378 0-2.5-1.122-2.5-2.5v-10c0-1.378 1.122-2.5 2.5-2.5h6c0.276 0 0.5 0.224 0.5 0.5 s-0.224 0.5 -0.5 0.5 h-6c-0.827 0-1.5 0.673 -1.5 1.5v10c0 0.827 0.673 1.5 1.5 1.5h4.25c0.276 0 0.5 0.224 0.5 0.5 s-0.224 0.5 -0.5 0.5 z" />
<path
android:fillColor="#000000"
android:pathData="M11.804 18c-3.053 0-4.804-2.032-4.804-5.574 0-1.637 0.769 -2.897 1.583-4.23 0.954 -1.563 1.939-3.178 1.939-5.696 0-0.198 0.116 -0.376 0.297 -0.457 0.181 -0.079 0.391 -0.046 0.538 0.086l0.136 0.122 c2.453 2.212 5.507 4.965 5.507 9.734 0 2.897-1.626 6.015-5.196 6.015zm-0.339-14.424c-0.238 2.207-1.183 3.754-2.029 5.141-0.77 1.262-1.436 2.353-1.436 3.709 0 2.087 0.66 4.574 3.804 4.574 2.883 0 4.196-2.6 4.196-5.015 0-3.946-2.291-6.356-4.535-8.409z" />
<path
android:fillColor="#000000"
android:pathData="M6.555 23c-0.226 0-0.43-0.153-0.485-0.382-0.065-0.269 0.1 -0.539 0.368 -0.604 5.912-1.432 5.309-9.891 5.302-9.976-0.022-0.275 0.184 -0.516 0.458 -0.538 0.278 -0.03 0.516 0.183 0.539 0.458 0.007 0.094 0.679 9.395-6.063 11.028-0.041 0.01 -0.08 0.014 -0.119 0.014 z" />
</vector>

View File

@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorControlNormal">
<path
android:fillColor="#000"
android:pathData="M20 4H4C2.9 4 2 4.9 2 6v12c0 1.1 0.9 2 2 2h16c1.1 0 2-0.9 2-2V6c0-1.1-0.9-2-2-2zm0 14H4V6h16v12z"/>
<path
android:fillColor="#000"
android:pathData="M8.29 15.71c-0.49-0.49-0.88-1.06-1.14-1.7c-0.26-0.64-0.4-1.32-0.4-2.01c0-1.35 0.52-2.69 1.53-3.72L7.05 7.05C5.68 8.41 5 10.21 5 12s0.68 3.59 2.06 4.94l1.23-1.23zM12 15.5c1.93 0 3.5-1.57 3.5-3.5S13.93 8.5 12 8.5S8.5 10.07 8.5 12s1.57 3.5 3.5 3.5zm0-5c0.83 0 1.5 0.67 1.5 1.5s-0.67 1.5-1.5 1.5s-1.5-0.67-1.5-1.5s0.67-1.5 1.5-1.5zm3.72 5.22l1.23 1.23C18.32 15.59 19 13.79 19 12s-0.68-3.59-2.06-4.94l-1.23 1.23c0.49 0.49 0.88 1.06 1.14 1.7c0.26 0.64 0.4 1.32 0.4 2.01c0 1.35-0.52 2.69-1.53 3.72z"/>
</vector>

View File

@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorControlNormal">
<path
android:fillColor="#000"
android:pathData="M12 1.43c-2.39 0-4.68 0.94-6.36 2.63C3.94 5.75 3 8.04 3 10.43v7c0 1.1 0.9 2 2 2h4v-8H5v-1c0-3.87 3.13-7 7-7s7 3.13 7 7v1h-4v8h4c1.1 0 2-0.9 2-2v-7c0-2.4-0.95-4.68-2.64-6.37C16.68 2.37 14.4 1.43 12 1.43zm-5 12v4H5v-4h2zm12 4h-2v-4h2v4z"/>
<path
android:fillColor="#000"
android:pathData="M15 22.57v-2h2v2h-2zm-4 0v-2h2v2h-2zm-4 0v-2h2v2H7z"/>
</vector>

View File

@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorControlNormal">
<path
android:fillColor="#000"
android:pathData="M16.9 21.02V2.98h-2v18.04h2zm4 0v-9.7h-2v9.7h2zm-8 0v-16h-2v16h2zm-6 0h2V9h-2v12.03z"/>
<path
android:fillColor="#000"
android:pathData="M5.1 21.02h-2v-3.11h2v3.11z"/>
</vector>

View File

@@ -0,0 +1,8 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorControlNormal" >
<path android:fillColor="#000" android:pathData="M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0 c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2 c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1 C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06 c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41 l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41 c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36 c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z" />
</vector>

View File

@@ -0,0 +1,9 @@
<!-- drawable/music_clef_bass.xml -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorControlNormal">
<path android:fillColor="#000" android:pathData="M18.5 5A1.5 1.5 0 1 1 17 6.5A1.5 1.5 0 0 1 18.5 5M18.5 11A1.5 1.5 0 1 1 17 12.5A1.5 1.5 0 0 1 18.5 11M10 4A5 5 0 0 0 5 9V10A2 2 0 1 0 7.18 8A3 3 0 0 1 10 6A4 4 0 0 1 14 10C14 13.59 11.77 16.19 7 18.2L7.76 20.04C13.31 17.72 16 14.43 16 10A6 6 0 0 0 10 4Z" />
</vector>

View File

@@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="?android:attr/colorAccent"
android:pathData="M21.12 7.88l-1.54 1.54C19.85 10.23 20 11.1 20 12c0 4.41-3.59 8-8 8s-8-3.59-8-8s3.59-8 8-8c0.9 0 1.77 0.15 2.58 0.42l1.53-1.53C14.85 2.32 13.46 2 12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10c0-1.47-0.32-2.86-0.88-4.12z"/>
<path
android:fillColor="?android:attr/colorAccent"
android:pathData="M10.5 13.71c0.18 0.19 0.4 0.33 0.65 0.44c0.24 0.1 0.5 0.15 0.76 0.15c0.27 0 0.53-0.05 0.77-0.15c0.24-0.1 0.46-0.25 0.65-0.44l5.66-8.49l-8.5 5.66c-0.18 0.19-0.33 0.4-0.43 0.65c-0.1 0.24-0.15 0.5-0.15 0.77c0 0.26 0.05 0.52 0.15 0.76c0.1 0.24 0.25 0.47 0.44 0.65z"/>
</vector>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24"
android:viewportWidth="24">
<path
android:fillColor="?android:attr/colorAccent"
android:pathData="M2.546,5.862C4.557,2.772 8.042,0.727 12,0.727C15.958,0.727 19.443,2.772 21.454,5.862C21.584,5.947 21.674,6.086 21.694,6.246C22.697,7.931 23.273,9.899 23.273,12C23.273,18.222 18.222,23.273 12,23.273C5.778,23.273 0.727,18.222 0.727,12C0.727,9.899 1.303,7.931 2.306,6.246C2.326,6.086 2.416,5.947 2.546,5.862ZM7.784,18.049L5.229,18.049C6.602,19.585 8.49,20.651 10.62,20.977C9.503,20.219 8.537,19.221 7.784,18.049ZM18.771,18.049L16.31,18.049C15.564,19.211 14.608,20.202 13.503,20.957C15.583,20.61 17.424,19.555 18.771,18.049ZM13.235,18.049L10.86,18.049C11.207,18.703 11.606,19.307 12.047,19.852C12.488,19.307 12.888,18.703 13.235,18.049ZM6.086,13.083L2.983,13.083C3.101,14.074 3.379,15.016 3.79,15.882L6.713,15.882C6.393,15.001 6.178,14.062 6.086,13.083ZM21.017,13.083L18.008,13.083C17.916,14.062 17.702,15.001 17.382,15.882L20.21,15.882C20.621,15.016 20.899,14.074 21.017,13.083ZM14.67,13.083L9.424,13.083C9.503,14.057 9.689,14.997 9.962,15.882L14.132,15.882C14.406,14.997 14.591,14.057 14.67,13.083ZM6.78,7.939L3.877,7.939C3.418,8.854 3.109,9.858 2.983,10.917L6.086,10.917C6.184,9.872 6.422,8.871 6.78,7.939ZM20.123,7.939L17.315,7.939C17.672,8.871 17.91,9.872 18.008,10.917L21.017,10.917C20.891,9.858 20.582,8.854 20.123,7.939ZM14.076,7.939L10.019,7.939C9.714,8.877 9.509,9.877 9.424,10.917L14.67,10.917C14.585,9.877 14.38,8.877 14.076,7.939ZM10.62,3.023C8.574,3.336 6.751,4.333 5.393,5.772L7.901,5.772C8.637,4.677 9.56,3.742 10.62,3.023ZM13.503,3.043C14.551,3.759 15.465,4.687 16.193,5.772L18.607,5.772C17.276,4.361 15.499,3.376 13.503,3.043ZM12.047,4.148C11.647,4.643 11.281,5.187 10.957,5.772L13.138,5.772C12.814,5.187 12.448,4.643 12.047,4.148Z" />
</vector>

View File

@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="?android:attr/colorAccent"
android:pathData="M20 5h-3.17L15 3H9L7.17 5H4C2.9 5 2 5.9 2 7v12c0 1.1 0.9 2 2 2h16c1.1 0 2-0.9 2-2V7c0-1.1-0.9-2-2-2zm0 14H4V7h16v12zM12 9c-2.21 0-4 1.79-4 4s1.79 4 4 4s4-1.79 4-4s-1.79-4-4-4z"/>
</vector>

View File

@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="?android:attr/colorAccent"
android:pathData="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8c0-1.85 0.63-3.55 1.69-4.9L16.9 18.31c-1.4 1.1-3.12 1.7-4.9 1.69zm6.31-3.1L7.1 5.69C8.5 4.59 10.22 3.99 12 4c4.42 0 8 3.58 8 8c0 1.85-0.63 3.55-1.69 4.9z"/>
</vector>

View File

@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="?android:attr/colorAccent"
android:pathData="M6.54 5C6.6 5.89 6.75 6.76 6.99 7.59l-1.2 1.2C5.38 7.59 5.12 6.32 5.03 5h1.51zm9.86 12.02c0.85 0.24 1.72 0.39 2.6 0.45v1.49c-1.32-0.09-2.59-0.35-3.8-0.75l1.2-1.19zM7.5 3H4C3.45 3 3 3.45 3 4c0 9.39 7.61 17 17 17c0.55 0 1-0.45 1-1v-3.49c0-0.55-0.45-1-1-1c-1.24 0-2.45-0.2-3.57-0.57c-0.1-0.04-0.2-0.05-0.31-0.05c-0.26 0-0.51 0.1-0.71 0.29l-2.2 2.2c-2.83-1.45-5.14-3.76-6.59-6.59l2.2-2.2C9.1 8.31 9.18 7.92 9.07 7.57C8.69 6.42 8.5 5.21 8.5 4c0-0.55-0.45-1-1-1z"/>
</vector>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24"
android:viewportWidth="24">
<group
android:scaleX="0.921041"
android:scaleY="0.924579"
android:translateX="0.752324"
android:translateY="0.893459">
<path
android:fillColor="?android:attr/colorAccent"
android:fillType="evenOdd"
android:pathData="M10.228 14.833c-0.006 0 -0.894 0.008 -1.83 1.069 -0.716 0.812 -1.981 2.473 -3.218 3.16 -0.07 0.041 -0.143 0.078 -0.218 0.111 -0.311 0.143 -0.619 0.217 -0.913 0.192l-0.015 0C3.63 19.362 3.252 19.254 2.924 19.066 1.702 18.44 1.782 17.099 1.782 17.099c0 -0.07 0.004 -0.139 0.01 -0.206C1.847 15.696 2.143 9.661 2.563 8.549 3.102 6.316 5.114 4.656 7.51 4.656l9.423 0c2.478 0 4.545 1.775 4.997 4.123 0.383 1.539 0.65 6.984 0.702 8.114 0.006 0.067 0.009 0.136 0.009 0.206 0 0 0.081 1.341 -1.142 1.967 -0.327 0.188 -0.706 0.296 -1.109 0.299l-0.015 0c-0.294 0.025 -0.602 -0.049 -0.914 -0.192 -0.074 -0.033 -0.147 -0.07 -0.218 -0.111 -1.236 -0.687 -2.502 -2.348 -3.217 -3.16 -0.936 -1.061 -1.824 -1.069 -1.83 -1.069l-3.968 0zM8.247 6.379c1.935 0 3.507 1.571 3.507 3.507 0 1.935 -1.572 3.507 -3.507 3.507 -1.936 0 -3.507 -1.572 -3.507 -3.507 0 -1.936 1.571 -3.507 3.507 -3.507zm9.138 4.16c0.454 0 0.823 0.369 0.823 0.823 0 0.454 -0.369 0.823 -0.823 0.823 -0.454 0 -0.823 -0.369 -0.823 -0.823 0 -0.454 0.369 -0.823 0.823 -0.823zm-8.421 0.07l0 0.814c0 0.399 -0.324 0.723 -0.723 0.723 -0.399 0 -0.723 -0.324 -0.723 -0.723l0 -0.814 -0.815 0C6.304 10.609 5.98 10.285 5.98 9.886 5.98 9.487 6.304 9.163 6.703 9.163l0.815 0 0 -0.815c0 -0.399 0.324 -0.723 0.723 -0.723 0.399 0 0.723 0.324 0.723 0.723l0 0.815 0.815 0c0.399 0 0.723 0.324 0.723 0.723 0 0.399 -0.324 0.722 -0.723 0.723l-0.815 0zm10.72 -0.723c0 0.454 -0.369 0.823 -0.823 0.823 -0.454 0 -0.823 -0.369 -0.823 -0.823 0 -0.455 0.369 -0.823 0.823 -0.823 0.454 0 0.823 0.368 0.823 0.823zm-2.952 0c0 0.454 -0.369 0.823 -0.823 0.823 -0.455 0 -0.823 -0.369 -0.823 -0.823 0 -0.455 0.368 -0.823 0.823 -0.823 0.454 0 0.823 0.368 0.823 0.823zm0.653 -2.3c0.454 0 0.823 0.369 0.823 0.824 0 0.454 -0.369 0.823 -0.823 0.823 -0.454 0 -0.823 -0.369 -0.823 -0.823 0 -0.455 0.369 -0.824 0.823 -0.824z"
android:strokeLineJoin="round"
android:strokeMiterLimit="1.41421" />
</group>
</vector>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="?android:attr/colorAccent"
android:pathData="M12,2C8.13,2 5,5.13 5,9c0,5.25 7,13 7,13s7,-7.75 7,-13c0,-3.87 -3.13,-7 -7,-7zM12,11.5c-1.38,0 -2.5,-1.12 -2.5,-2.5s1.12,-2.5 2.5,-2.5 2.5,1.12 2.5,2.5 -1.12,2.5 -2.5,2.5z"
android:strokeWidth="1"/>
</vector>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24"
android:viewportWidth="24">
<group
android:scaleX="1.05866"
android:scaleY="1.05866"
android:translateX="-0.652026"
android:translateY="-0.703971">
<path
android:fillColor="?android:attr/colorControlNormal"
android:fillType="evenOdd"
android:pathData="M11.066 10.383l0 -2.773 -2.033 -2.033c-0.364 -0.365 -0.364 -0.956 0 -1.321 0.365 -0.364 0.956 -0.364 1.321 0l0.712 0.713 0 -1.111c0 -0.515 0.419 -0.934 0.934 -0.934 0.515 0 0.934 0.419 0.934 0.934l0 1.111 0.712 -0.713c0.365 -0.364 0.956 -0.364 1.321 0 0.364 0.365 0.364 0.956 0 1.321l-2.033 2.033 0 2.773 2.401 -1.387 0.744 -2.777c0.134 -0.498 0.646 -0.794 1.144 -0.66 0.498 0.133 0.794 0.646 0.66 1.143L17.622 7.676 18.584 7.12c0.447 -0.257 1.018 -0.104 1.276 0.342 0.258 0.446 0.104 1.018 -0.342 1.276l-0.962 0.555 0.973 0.261c0.498 0.133 0.794 0.646 0.661 1.144 -0.134 0.497 -0.646 0.793 -1.144 0.66L16.269 10.614 13.868 12l2.401 1.386 2.777 -0.744c0.498 -0.133 1.01 0.163 1.144 0.66 0.133 0.498 -0.163 1.011 -0.661 1.144l-0.973 0.261 0.962 0.555c0.446 0.258 0.6 0.83 0.342 1.276 -0.258 0.446 -0.829 0.599 -1.276 0.342l-0.962 -0.556 0.261 0.974c0.134 0.497 -0.162 1.01 -0.66 1.143 -0.498 0.134 -1.01 -0.162 -1.144 -0.66l-0.744 -2.777 -2.401 -1.387 0 2.886 2.033 2.034c0.364 0.364 0.364 0.956 0 1.32 -0.365 0.365 -0.956 0.365 -1.321 0l-0.712 -0.712 0 0.997c0 0.515 -0.419 0.934 -0.934 0.934 -0.515 0 -0.934 -0.419 -0.934 -0.934l0 -0.997 -0.712 0.712c-0.365 0.365 -0.956 0.365 -1.321 0 -0.364 -0.364 -0.364 -0.956 0 -1.32l2.033 -2.034 0 -2.886 -2.499 1.443 -0.744 2.778C7.689 18.335 7.177 18.631 6.679 18.498 6.181 18.365 5.885 17.852 6.019 17.354L6.28 16.381 5.416 16.88C4.969 17.137 4.398 16.984 4.14 16.538 3.882 16.092 4.036 15.52 4.482 15.262L5.346 14.764 4.372 14.503C3.875 14.369 3.579 13.857 3.712 13.359 3.846 12.861 4.358 12.565 4.856 12.699L7.633 13.443 10.132 12 7.633 10.557 4.856 11.301C4.358 11.435 3.846 11.139 3.712 10.641 3.579 10.143 3.875 9.631 4.372 9.497L5.346 9.236 4.482 8.738C4.036 8.48 3.882 7.908 4.14 7.462 4.398 7.016 4.969 6.863 5.416 7.12L6.28 7.619 6.019 6.646C5.885 6.148 6.181 5.635 6.679 5.502 7.177 5.369 7.689 5.665 7.823 6.162l0.744 2.778 2.499 1.443z"
android:strokeLineJoin="round"
android:strokeMiterLimit="1.41421" />
</group>
</vector>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="24"
android:viewportWidth="24">
<group
android:scaleX="1.20862"
android:scaleY="1.21327"
android:translateX="-0.686496"
android:translateY="-0.544151">
<path
android:fillColor="?android:attr/colorAccent"
android:fillType="evenOdd"
android:pathData="M13.29 18.046l-8.091 0c-1.277 0 -2.315 -1.037 -2.315 -2.315l0 -4.631c0 -1.277 1.038 -2.315 2.315 -2.315l8.091 0c1.272 0 2.305 1.027 2.315 2.296l1.307 -0.754c0.065 -0.038 0.135 -0.067 0.21 -0.086l0.002 0 0 0 0 0 0 0c0.062 -0.015 0.126 -0.023 0.188 -0.023l0.001 0 0.003 0c0.146 0.001 0.283 0.041 0.401 0.11 0.11 0.065 0.205 0.156 0.276 0.272 0.043 0.071 0.076 0.15 0.096 0.233l0 0.002c0.014 0.059 0.02 0.119 0.02 0.178l0 0.001 0 4.803 0 0.001c0 0.059 -0.006 0.119 -0.02 0.178l0 0.001 0 0 0 0 0 0.001c-0.02 0.084 -0.053 0.162 -0.096 0.233 -0.071 0.116 -0.166 0.208 -0.276 0.272 -0.118 0.07 -0.255 0.11 -0.401 0.11l0 0 0 0 -0.003 0 -0.001 0c-0.062 0 -0.126 -0.007 -0.188 -0.023l0 0 0 0 0 0 -0.002 0c-0.075 -0.018 -0.145 -0.047 -0.21 -0.085L15.605 15.75c-0.01 1.269 -1.043 2.296 -2.315 2.296zm-1.773 -4.63c0 -0.107 -0.027 -0.214 -0.083 -0.313l0 0 0 0 -0.001 -0.002 -0.001 0C11.409 13.06 11.381 13.023 11.349 12.988 11.305 12.94 11.254 12.9 11.198 12.869L7.919 10.975C7.867 10.945 7.811 10.922 7.752 10.908l-0.001 -0.001 0 0 0 0 0 0C7.702 10.895 7.652 10.889 7.602 10.889l0 0 -0.002 0 -0.001 0 0 0C7.484 10.89 7.376 10.921 7.283 10.976 7.196 11.027 7.12 11.099 7.064 11.191 7.03 11.247 7.004 11.309 6.989 11.375l0 0.001 0 0 0 0 0 0.001c-0.011 0.046 -0.016 0.094 -0.016 0.141l0 0 0 3.795 0 0.001c0 0.047 0.005 0.094 0.016 0.141l0 0.001c0.015 0.066 0.041 0.128 0.075 0.185 0.056 0.091 0.132 0.163 0.219 0.214 0.093 0.055 0.201 0.087 0.316 0.087l0.003 0 0 0c0.05 0 0.1 -0.006 0.149 -0.018l0 0 0 0 0 0 0.001 0c0.059 -0.015 0.115 -0.038 0.167 -0.068l3.279 -1.893c0.056 -0.032 0.107 -0.072 0.151 -0.119 0.032 -0.035 0.06 -0.073 0.083 -0.113l0.001 -0.001 0.001 -0.001 0 -0.001 0 0c0.056 -0.098 0.083 -0.206 0.083 -0.312zM6.026 4.848c0.955 0 1.731 0.776 1.731 1.731C7.757 7.535 6.981 8.31 6.026 8.31 5.07 8.31 4.295 7.535 4.295 6.579 4.295 5.624 5.07 4.848 6.026 4.848Zm4.986 -2.216c1.567 0 2.839 1.272 2.839 2.839 0 1.567 -1.272 2.839 -2.839 2.839 -1.567 0 -2.839 -1.272 -2.839 -2.839 0 -1.567 1.272 -2.839 2.839 -2.839z"
android:strokeLineJoin="round"
android:strokeMiterLimit="1.41421" />
</group>
</vector>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="?android:attr/colorAccent"
android:pathData="M18,4l2,4h-3l-2,-4h-2l2,4h-3l-2,-4H8l2,4H7L5,4H4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V4h-4z"
android:strokeWidth="1"/>
</vector>

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2020 The LineageOS Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<androidx.recyclerview.widget.RecyclerView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/thermal_rv_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="vertical" />

View File

@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2020 The LineageOS Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:paddingBottom="8dp"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingTop="8dp">
<ImageView
android:id="@+id/app_icon"
android:layout_width="@android:dimen/app_icon_size"
android:layout_height="@android:dimen/app_icon_size"
android:layout_marginEnd="12dp"
android:layout_gravity="center"
android:contentDescription="@null"
android:scaleType="centerInside" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/app_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:ellipsize="marquee"
android:singleLine="true"
android:textAlignment="viewStart"
android:textAppearance="?android:attr/textAppearanceListItem"
android:textColor="?android:attr/textColorPrimary" />
<Spinner
android:id="@+id/app_mode"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<ImageView
android:id="@+id/state"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:padding="8dp"
android:scaleType="centerInside"
android:src="@drawable/ic_thermal_default" />
</LinearLayout>

Binary file not shown.

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2018 The LineageOS Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<string-array name="lcd_hbm_modes" translatable="false">
<item>"Off"</item>
<item>"Low"</item>
<item>"Medium"</item>
<item>"High"</item>
</string-array>
<string-array name="lcd_hbm_values" translatable="false">
<item>"0"</item>
<item>"1"</item>
<item>"2"</item>
<item>"3"</item>
</string-array>
<string-array name="lcd_cabc_modes" translatable="false">
<item>"Off"</item>
<item>"Low (UI)"</item>
<item>"Medium (Videos)"</item>
<item>"High (Images)"</item>
</string-array>
<string-array name="lcd_cabc_values" translatable="false">
<item>"0"</item>
<item>"1"</item>
<item>"3"</item>
<item>"2"</item>
</string-array>
</resources>

View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2018 The LineageOS Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<!-- Xiaomi Parts -->
<string name="app_name">Xiaomi Parts</string>
<!-- Thermal Profiles -->
<string name="thermal_title">Thermal profiles</string>
<string name="thermal_summary">Per-app thermal profile configuration</string>
<string name="thermal_default">Default</string>
<string name="thermal_benchmark">Benchmark</string>
<string name="thermal_browser">Browser</string>
<string name="thermal_camera">Camera</string>
<string name="thermal_dialer">Dialer</string>
<string name="thermal_gaming">Gaming</string>
<string name="thermal_navigation">Navigation</string>
<string name="thermal_streaming">Streaming</string>
<string name="thermal_video">Video</string>
<!-- Clear Speaker -->
<string name="clear_speaker_title">Clear speaker</string>
<string name="clear_speaker_summary">Play a 30-second audio to clear the speaker</string>
<string name="clear_speaker_description">Run this feature once or twice if you find that your speaker is lightly blocked by dust. Set media volume to maximum.\n\nIf the speaker is blocked heavily, run this feature 2-5 times while shaking your device with the speaker facing downwards.\n\nWARNING: Ensure that any headphones are unplugged.</string>
<!-- LCD Features -->
<string name="lcd_features_title">LCD features</string>
<string name="lcd_features_summary">High Brightness Mode, CABC</string>
<string name="lcd_hbm_title">High Brightness Mode (HBM)</string>
<string name="lcd_hbm_tile_title">HBM</string>
<string name="lcd_cabc_title">CABC Mode</string>
<string name="lcd_features_info">High Brightness Mode (HBM) increases the maximum brightness of the display to improve visibility under sunlight. Increases power consumption.\n\nCABC (Content Adaptive Backlight Control) adjusts display and backlight brightness based on currently shown content, to reduce power consumption without degradation.</string>
</resources>

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2022 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<!-- Using in SubSettings page including injected settings page -->
<style name="Theme.SubSettingsBase_v31" parent="Theme.SettingsBase_v31">
<!-- Suppress the built-in action bar -->
<item name="android:windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
<!-- Set up edge-to-edge configuration for top app bar -->
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="colorControlNormal">?android:attr/colorControlNormal</item>
<!-- For AndroidX AlertDialog -->
<item name="alertDialogTheme">@style/Theme.AlertDialog.SettingsLib</item>
</style>
</resources>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/clear_speaker_title">
<SwitchPreferenceCompat
android:key="clear_speaker_pref"
android:title="@string/clear_speaker_title"
android:icon="@drawable/ic_clear_speaker"
android:summary="@string/clear_speaker_summary"/>
<com.android.settingslib.widget.FooterPreference
android:key="footer_preference"
android:title="@string/clear_speaker_description"
android:selectable="false" />
</PreferenceScreen>

View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2021 Paranoid Android
Licensed under the Apache License, Version 2.0 (the "License"
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/lcd_features_title" >
<ListPreference
android:key="pref_hbm"
android:title="@string/lcd_hbm_title"
android:entries="@array/lcd_hbm_modes"
android:entryValues="@array/lcd_hbm_values"
android:defaultValue="0" />
<ListPreference
android:key="pref_cabc"
android:title="@string/lcd_cabc_title"
android:entries="@array/lcd_cabc_modes"
android:entryValues="@array/lcd_cabc_values"
android:defaultValue="0" />
<com.android.settingslib.widget.FooterPreference
android:key="lcd_features_footer"
android:title="@string/lcd_features_info"
android:selectable="false" />
</PreferenceScreen>

View File

@@ -0,0 +1,42 @@
/*
* Copyright (C) 2018 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.lineageos.settings;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.IBinder;
import android.view.Display.HdrCapabilities;
import android.view.SurfaceControl;
import org.lineageos.settings.display.LcdFeaturesService;
import org.lineageos.settings.thermal.ThermalUtils;
public class BootCompletedReceiver extends BroadcastReceiver {
@Override
public void onReceive(final Context context, Intent intent) {
if (!intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) {
return;
}
// Thermal Profiles
ThermalUtils.startService(context);
context.startService(new Intent(context, LcdFeaturesService.class));
}
}

View File

@@ -0,0 +1,76 @@
/*
* Copyright (C) 2023 Paranoid Android
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.lineageos.settings.display;
import android.content.Context;
import android.os.SystemProperties;
import android.service.quicksettings.Tile;
import android.service.quicksettings.TileService;
import java.util.Arrays;
import org.lineageos.settings.R;
public class CabcTileService extends TileService {
private Context context;
private Tile tile;
private String[] CabcModes;
private String[] CabcValues;
private int currentCabcMode;
@Override
public void onCreate() {
super.onCreate();
context = getApplicationContext();
CabcModes = context.getResources().getStringArray(R.array.lcd_cabc_modes);
CabcValues = context.getResources().getStringArray(R.array.lcd_cabc_values);
}
private void updateCurrentCabcMode() {
currentCabcMode = Arrays.asList(CabcValues).indexOf(SystemProperties.get(LcdFeaturesPreferenceFragment.CABC_PROP, "0"));
}
private void updateCabcTile() {
tile.setState(currentCabcMode > 0 ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE);
tile.setContentDescription(CabcModes[currentCabcMode]);
tile.setSubtitle(CabcModes[currentCabcMode]);
tile.updateTile();
}
@Override
public void onStartListening() {
super.onStartListening();
tile = getQsTile();
updateCurrentCabcMode();
updateCabcTile();
}
@Override
public void onClick() {
super.onClick();
updateCurrentCabcMode();
if (currentCabcMode == CabcModes.length - 1) {
currentCabcMode = 0;
} else {
currentCabcMode++;
}
SystemProperties.set(LcdFeaturesPreferenceFragment.CABC_PROP, CabcValues[currentCabcMode]);
updateCabcTile();
}
}

View File

@@ -0,0 +1,74 @@
/*
* Copyright (C) 2023 Paranoid Android
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.lineageos.settings.display;
import android.content.Context;
import android.os.SystemProperties;
import android.service.quicksettings.Tile;
import android.service.quicksettings.TileService;
import org.lineageos.settings.R;
public class HbmTileService extends TileService {
private Context context;
private Tile tile;
private String[] HbmModes;
private String[] HbmValues;
private int currentHbmMode;
@Override
public void onCreate() {
super.onCreate();
context = getApplicationContext();
HbmModes = context.getResources().getStringArray(R.array.lcd_hbm_modes);
HbmValues = context.getResources().getStringArray(R.array.lcd_hbm_values);
}
private void updateCurrentHbmMode() {
currentHbmMode = SystemProperties.getInt(LcdFeaturesPreferenceFragment.HBM_PROP, 0);
}
private void updateHbmTile() {
tile.setState(currentHbmMode > 0 ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE);
tile.setContentDescription(HbmModes[currentHbmMode]);
tile.setSubtitle(HbmModes[currentHbmMode]);
tile.updateTile();
}
@Override
public void onStartListening() {
super.onStartListening();
tile = getQsTile();
updateCurrentHbmMode();
updateHbmTile();
}
@Override
public void onClick() {
super.onClick();
updateCurrentHbmMode();
if (currentHbmMode == HbmModes.length - 1) {
currentHbmMode = 0;
} else {
currentHbmMode++;
}
SystemProperties.set(LcdFeaturesPreferenceFragment.HBM_PROP, Integer.toString(currentHbmMode));
updateHbmTile();
}
}

View File

@@ -0,0 +1,31 @@
/*
* Copyright (C) 2023 Paranoid Android
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.lineageos.settings.display;
import android.os.Bundle;
import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity;
public class LcdFeaturesPreferenceActivity extends CollapsingToolbarBaseActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getFragmentManager().beginTransaction()
.replace(com.android.settingslib.collapsingtoolbar.R.id.content_frame, new LcdFeaturesPreferenceFragment())
.commit();
}
}

View File

@@ -0,0 +1,80 @@
/*
* Copyright (C) 2021 Paranoid Android
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.lineageos.settings.display;
import android.content.Context;
import android.os.Bundle;
import android.os.SystemProperties;
import androidx.preference.ListPreference;
import androidx.preference.Preference;
import androidx.preference.PreferenceFragment;
import org.lineageos.settings.R;
public class LcdFeaturesPreferenceFragment extends PreferenceFragment
implements Preference.OnPreferenceChangeListener {
public static final String HBM_PROP = "persist.lcd.hbm_mode";
public static final String CABC_PROP = "persist.lcd.cabc_mode";
private static final String KEY_HBM = "pref_hbm";
private static final String KEY_CABC = "pref_cabc";
private ListPreference mHbmPref;
private ListPreference mCabcPref;
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
}
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
addPreferencesFromResource(R.xml.lcd_features_settings);
mHbmPref = (ListPreference) findPreference(KEY_HBM);
mHbmPref.setOnPreferenceChangeListener(this);
mCabcPref = (ListPreference) findPreference(KEY_CABC);
mCabcPref.setOnPreferenceChangeListener(this);
}
@Override
public void onResume() {
super.onResume();
mHbmPref.setValue(SystemProperties.get(HBM_PROP, "0"));
mHbmPref.setSummary(mHbmPref.getEntry());
mCabcPref.setValue(SystemProperties.get(CABC_PROP, "0"));
mCabcPref.setSummary(mCabcPref.getEntry());
}
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
final String key = preference.getKey();
if (key.equals(KEY_HBM)) {
mHbmPref.setValue((String) newValue);
mHbmPref.setSummary(mHbmPref.getEntry());
SystemProperties.set(HBM_PROP, (String) newValue);
} else if (key.equals(KEY_CABC)) {
mCabcPref.setValue((String) newValue);
mCabcPref.setSummary(mCabcPref.getEntry());
SystemProperties.set(CABC_PROP, (String) newValue);
}
return true;
}
}

View File

@@ -0,0 +1,84 @@
/*
* Copyright (c) 2016 The CyanogenMod Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.lineageos.settings.display;
import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.IBinder;
import android.os.SystemProperties;
import android.util.Log;
public class LcdFeaturesService extends Service {
private static final String TAG = "LcdFeaturesService";
private static final boolean DEBUG = false;
private String lastCABC;
private String lastHBM;
@Override
public void onCreate() {
if (DEBUG) Log.d(TAG, "Creating service");
IntentFilter screenStateFilter = new IntentFilter(Intent.ACTION_SCREEN_ON);
screenStateFilter.addAction(Intent.ACTION_SCREEN_OFF);
registerReceiver(mScreenStateReceiver, screenStateFilter);
lastHBM = SystemProperties.get(LcdFeaturesPreferenceFragment.HBM_PROP, "0");
lastCABC = SystemProperties.get(LcdFeaturesPreferenceFragment.CABC_PROP, "0");
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
if (DEBUG) Log.d(TAG, "Starting service");
return START_STICKY;
}
@Override
public void onDestroy() {
if (DEBUG) Log.d(TAG, "Destroying service");
super.onDestroy();
this.unregisterReceiver(mScreenStateReceiver);
}
@Override
public IBinder onBind(Intent intent) {
return null;
}
private void onDisplayOn() {
if (DEBUG) Log.d(TAG, "Display on");
SystemProperties.set(LcdFeaturesPreferenceFragment.HBM_PROP, lastHBM);
SystemProperties.set(LcdFeaturesPreferenceFragment.CABC_PROP, lastCABC);
}
private void onDisplayOff() {
if (DEBUG) Log.d(TAG, "Display off");
lastHBM = SystemProperties.get(LcdFeaturesPreferenceFragment.HBM_PROP, "0");
lastCABC = SystemProperties.get(LcdFeaturesPreferenceFragment.CABC_PROP, "0");
}
private BroadcastReceiver mScreenStateReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(Intent.ACTION_SCREEN_ON)) {
onDisplayOn();
} else if (intent.getAction().equals(Intent.ACTION_SCREEN_OFF)) {
onDisplayOff();
}
}
};
}

View File

@@ -0,0 +1,124 @@
/*
* Copyright (C) 2022 Paranoid Android
*
* SPDX-License-Identifier: Apache-2.0
*/
package org.lineageos.settings.doze;
import android.app.KeyguardManager;
import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.os.IBinder;
import android.os.PowerManager;
import android.os.SystemClock;
import android.os.UserHandle;
import android.util.Log;
public class PocketService extends Service {
private static final String TAG = "PocketService";
private static final boolean DEBUG = false;
/* xiaomi.sensor.large_area_detect */
private static final int TYPE_LARGE_AREA_TOUCH_SENSOR = 33171031;
private PowerManager mPowerManager;
private KeyguardManager mKeyguardManager;
private SensorManager mSensorManager;
private Sensor mTouchSensor;
private boolean mUserPresent;
@Override
public void onCreate() {
if (DEBUG) Log.i(TAG, "Creating service");
mPowerManager = (PowerManager) getSystemService(Context.POWER_SERVICE);
mKeyguardManager = (KeyguardManager) getSystemService(Context.KEYGUARD_SERVICE);
mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
mTouchSensor = mSensorManager.getDefaultSensor(TYPE_LARGE_AREA_TOUCH_SENSOR);
IntentFilter screenStateFilter = new IntentFilter();
screenStateFilter.addAction(Intent.ACTION_SCREEN_ON);
screenStateFilter.addAction(Intent.ACTION_SCREEN_OFF);
screenStateFilter.addAction(Intent.ACTION_USER_PRESENT);
registerReceiver(mScreenStateReceiver, screenStateFilter);
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
if (DEBUG) Log.i(TAG, "Starting service");
return START_STICKY;
}
@Override
public void onDestroy() {
if (DEBUG) Log.i(TAG, "Destroying service");
unregisterReceiver(mScreenStateReceiver);
mSensorManager.unregisterListener(mSensorListener, mTouchSensor);
super.onDestroy();
}
@Override
public IBinder onBind(Intent intent) {
return null;
}
public static void startService(Context context) {
context.startServiceAsUser(new Intent(context, PocketService.class), UserHandle.CURRENT);
}
private BroadcastReceiver mScreenStateReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
switch (intent.getAction()) {
case Intent.ACTION_SCREEN_ON:
if (DEBUG) Log.i(TAG, "Received ACTION_SCREEN_ON mUserPresent=" + mUserPresent);
if (mUserPresent) return;
mSensorManager.registerListener(mSensorListener,
mTouchSensor, SensorManager.SENSOR_DELAY_NORMAL);
break;
case Intent.ACTION_SCREEN_OFF:
if (DEBUG) Log.i(TAG, "Received ACTION_SCREEN_OFF");
mSensorManager.unregisterListener(mSensorListener, mTouchSensor);
mUserPresent = false;
break;
case Intent.ACTION_USER_PRESENT:
if (DEBUG) Log.i(TAG, "Received ACTION_USER_PRESENT");
// disable when unlocked
mSensorManager.unregisterListener(mSensorListener, mTouchSensor);
mUserPresent = true;
break;
}
}
};
private SensorEventListener mSensorListener = new SensorEventListener() {
@Override
public void onAccuracyChanged(Sensor sensor, int accuracy) {
// no-op
}
@Override
public void onSensorChanged(SensorEvent event) {
boolean isTouchDetected = event.values[0] == 1;
boolean isOnKeyguard = mKeyguardManager.isKeyguardLocked();
if (DEBUG)
Log.i(TAG, "onSensorChanged type=" + event.sensor.getType()
+ " value=" + event.values[0] + " isTouchDetected="
+ isTouchDetected + " isOnKeyguard=" + isOnKeyguard);
if (isTouchDetected && isOnKeyguard) {
Log.i(TAG, "In pocket, going to sleep");
mPowerManager.goToSleep(SystemClock.uptimeMillis());
}
}
};
}

View File

@@ -0,0 +1,32 @@
/*
* Copyright (C) 2020-2024 Paranoid Android
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.lineageos.settings.speaker;
import android.os.Bundle;
import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity;
public class ClearSpeakerActivity extends CollapsingToolbarBaseActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getFragmentManager().beginTransaction()
.replace(com.android.settingslib.collapsingtoolbar.R.id.content_frame, new ClearSpeakerFragment())
.commit();
}
}

View File

@@ -0,0 +1,121 @@
/*
* Copyright (C) 2020 Paranoid Android
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.lineageos.settings.speaker;
import android.content.Context;
import android.content.res.AssetFileDescriptor;
import android.media.AudioManager;
import android.media.AudioAttributes;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.util.Log;
import androidx.preference.Preference;
import androidx.preference.PreferenceFragment;
import androidx.preference.SwitchPreferenceCompat;
import org.lineageos.settings.R;
import java.io.IOException;
public class ClearSpeakerFragment extends PreferenceFragment implements
Preference.OnPreferenceChangeListener {
private static final String TAG = ClearSpeakerFragment.class.getSimpleName();
private static final String PREF_CLEAR_SPEAKER = "clear_speaker_pref";
private AudioManager mAudioManager;
private Handler mHandler;
private MediaPlayer mMediaPlayer;
private SwitchPreferenceCompat mClearSpeakerPref;
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
addPreferencesFromResource(R.xml.clear_speaker_settings);
mClearSpeakerPref = (SwitchPreferenceCompat) findPreference(PREF_CLEAR_SPEAKER);
mClearSpeakerPref.setOnPreferenceChangeListener(this);
mHandler = new Handler();
mAudioManager = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE);
}
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
if (preference == mClearSpeakerPref) {
boolean value = (Boolean) newValue;
if (value) {
if (startPlaying()) {
mHandler.removeCallbacksAndMessages(null);
mHandler.postDelayed(() -> {
stopPlaying();
}, 30000);
return true;
}
}
}
return false;
}
@Override
public void onStop() {
super.onStop();
stopPlaying();
}
public boolean startPlaying() {
mAudioManager.setParameters("status_earpiece_clean=on");
mMediaPlayer = new MediaPlayer();
getActivity().setVolumeControlStream(AudioManager.STREAM_MUSIC);
mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
mMediaPlayer.setLooping(true);
try {
AssetFileDescriptor file = getResources().openRawResourceFd(R.raw.clear_speaker_sound);
try {
mMediaPlayer.setDataSource(file.getFileDescriptor(), file.getStartOffset(), file.getLength());
} finally {
file.close();
}
mClearSpeakerPref.setEnabled(false);
mMediaPlayer.setVolume(1.0f, 1.0f);
mMediaPlayer.prepare();
mMediaPlayer.start();
} catch (IOException ioe) {
Log.e(TAG, "Failed to play speaker clean sound!", ioe);
return false;
}
return true;
}
public void stopPlaying() {
if (mMediaPlayer != null) {
if (mMediaPlayer.isPlaying()) {
mMediaPlayer.stop();
mMediaPlayer.reset();
mMediaPlayer.release();
mMediaPlayer = null;
}
}
mAudioManager.setParameters("status_earpiece_clean=off");
mClearSpeakerPref.setEnabled(true);
mClearSpeakerPref.setChecked(false);
}
}

View File

@@ -0,0 +1,113 @@
/*
* Copyright (C) 2020 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.lineageos.settings.thermal;
import android.app.ActivityTaskManager;
import android.app.TaskStackListener;
import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.Configuration;
import android.os.IBinder;
import android.os.RemoteException;
import android.util.Log;
public class ThermalService extends Service {
private static final String TAG = "ThermalService";
private static final boolean DEBUG = false;
private boolean mScreenOn = true;
private String mCurrentApp = "";
private ThermalUtils mThermalUtils;
private BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
switch (intent.getAction()) {
case Intent.ACTION_SCREEN_OFF:
mScreenOn = false;
setThermalProfile();
break;
case Intent.ACTION_SCREEN_ON:
mScreenOn = true;
setThermalProfile();
break;
}
}
};
@Override
public void onCreate() {
if (DEBUG) Log.d(TAG, "Creating service");
try {
ActivityTaskManager.getService().registerTaskStackListener(mTaskListener);
} catch (RemoteException e) {
// Do nothing
}
mThermalUtils = new ThermalUtils(this);
registerReceiver();
super.onCreate();
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
if (DEBUG) Log.d(TAG, "Starting service");
return START_STICKY;
}
@Override
public IBinder onBind(Intent intent) {
return null;
}
private void registerReceiver() {
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_SCREEN_OFF);
filter.addAction(Intent.ACTION_SCREEN_ON);
this.registerReceiver(mIntentReceiver, filter);
}
private void setThermalProfile() {
if (mScreenOn) {
mThermalUtils.setThermalProfile(mCurrentApp);
} else {
mThermalUtils.setDefaultThermalProfile();
}
}
private final TaskStackListener mTaskListener = new TaskStackListener() {
@Override
public void onTaskStackChanged() {
try {
final ActivityTaskManager.RootTaskInfo focusedTask =
ActivityTaskManager.getService().getFocusedRootTaskInfo();
if (focusedTask != null && focusedTask.topActivity != null) {
ComponentName taskComponentName = focusedTask.topActivity;
String foregroundApp = taskComponentName.getPackageName();
if (!foregroundApp.equals(mCurrentApp)) {
mCurrentApp = foregroundApp;
setThermalProfile();
}
}
} catch (Exception e) {}
}
};
}

View File

@@ -0,0 +1,43 @@
/*
* Copyright (C) 2020-2024 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.lineageos.settings.thermal;
import android.os.Bundle;
import android.view.MenuItem;
import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity;
public class ThermalSettingsActivity extends CollapsingToolbarBaseActivity {
private static final String TAG_THERMAL = "thermal";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getFragmentManager().beginTransaction().replace(com.android.settingslib.collapsingtoolbar.R.id.content_frame,
new ThermalSettingsFragment(), TAG_THERMAL).commit();
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home) {
onBackPressed();
return true;
}
return false;
}
}

View File

@@ -0,0 +1,439 @@
/**
* Copyright (C) 2020 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.lineageos.settings.thermal;
import android.annotation.Nullable;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.SectionIndexer;
import android.widget.Spinner;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.preference.PreferenceFragment;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.LinearLayoutManager;
import com.android.settingslib.applications.ApplicationsState;
import org.lineageos.settings.R;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ThermalSettingsFragment extends PreferenceFragment
implements ApplicationsState.Callbacks {
private AllPackagesAdapter mAllPackagesAdapter;
private ApplicationsState mApplicationsState;
private ApplicationsState.Session mSession;
private ActivityFilter mActivityFilter;
private Map<String, ApplicationsState.AppEntry> mEntryMap =
new HashMap<String, ApplicationsState.AppEntry>();
private ThermalUtils mThermalUtils;
private RecyclerView mAppsRecyclerView;
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mApplicationsState = ApplicationsState.getInstance(getActivity().getApplication());
mSession = mApplicationsState.newSession(this);
mSession.onResume();
mActivityFilter = new ActivityFilter(getActivity().getPackageManager());
mAllPackagesAdapter = new AllPackagesAdapter(getActivity());
mThermalUtils = new ThermalUtils(getActivity());
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
return inflater.inflate(R.layout.thermal_layout, container, false);
}
@Override
public void onViewCreated(final View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mAppsRecyclerView = view.findViewById(R.id.thermal_rv_view);
mAppsRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
mAppsRecyclerView.setAdapter(mAllPackagesAdapter);
}
@Override
public void onResume() {
super.onResume();
getActivity().setTitle(getResources().getString(R.string.thermal_title));
rebuild();
}
@Override
public void onDestroy() {
super.onDestroy();
mSession.onPause();
mSession.onDestroy();
}
@Override
public void onPackageListChanged() {
mActivityFilter.updateLauncherInfoList();
rebuild();
}
@Override
public void onRebuildComplete(ArrayList<ApplicationsState.AppEntry> entries) {
if (entries != null) {
handleAppEntries(entries);
mAllPackagesAdapter.notifyDataSetChanged();
}
}
@Override
public void onLoadEntriesCompleted() {
rebuild();
}
@Override
public void onAllSizesComputed() {
}
@Override
public void onLauncherInfoChanged() {
}
@Override
public void onPackageIconChanged() {
}
@Override
public void onPackageSizeChanged(String packageName) {
}
@Override
public void onRunningStateChanged(boolean running) {
}
private void handleAppEntries(List<ApplicationsState.AppEntry> entries) {
final ArrayList<String> sections = new ArrayList<String>();
final ArrayList<Integer> positions = new ArrayList<Integer>();
final PackageManager pm = getActivity().getPackageManager();
String lastSectionIndex = null;
int offset = 0;
for (int i = 0; i < entries.size(); i++) {
final ApplicationInfo info = entries.get(i).info;
final String label = (String) info.loadLabel(pm);
final String sectionIndex;
if (!info.enabled) {
sectionIndex = "--"; // XXX
} else if (TextUtils.isEmpty(label)) {
sectionIndex = "";
} else {
sectionIndex = label.substring(0, 1).toUpperCase();
}
if (lastSectionIndex == null ||
!TextUtils.equals(sectionIndex, lastSectionIndex)) {
sections.add(sectionIndex);
positions.add(offset);
lastSectionIndex = sectionIndex;
}
offset++;
}
mAllPackagesAdapter.setEntries(entries, sections, positions);
mEntryMap.clear();
for (ApplicationsState.AppEntry e : entries) {
mEntryMap.put(e.info.packageName, e);
}
}
private void rebuild() {
mSession.rebuild(mActivityFilter, ApplicationsState.ALPHA_COMPARATOR);
}
private int getStateDrawable(int state) {
switch (state) {
case ThermalUtils.STATE_BENCHMARK:
return R.drawable.ic_thermal_benchmark;
case ThermalUtils.STATE_BROWSER:
return R.drawable.ic_thermal_browser;
case ThermalUtils.STATE_CAMERA:
return R.drawable.ic_thermal_camera;
case ThermalUtils.STATE_DIALER:
return R.drawable.ic_thermal_dialer;
case ThermalUtils.STATE_GAMING:
return R.drawable.ic_thermal_gaming;
case ThermalUtils.STATE_NAVIGATION:
return R.drawable.ic_thermal_navigation;
case ThermalUtils.STATE_STREAMING:
return R.drawable.ic_thermal_streaming;
case ThermalUtils.STATE_VIDEO:
return R.drawable.ic_thermal_video;
case ThermalUtils.STATE_DEFAULT:
default:
return R.drawable.ic_thermal_default;
}
}
private class ViewHolder extends RecyclerView.ViewHolder {
private TextView title;
private Spinner mode;
private ImageView icon;
private View rootView;
private ImageView stateIcon;
private ViewHolder(View view) {
super(view);
this.title = view.findViewById(R.id.app_name);
this.mode = view.findViewById(R.id.app_mode);
this.icon = view.findViewById(R.id.app_icon);
this.stateIcon = view.findViewById(R.id.state);
this.rootView = view;
view.setTag(this);
}
}
private class ModeAdapter extends BaseAdapter {
private final LayoutInflater inflater;
private final int[] items = {
R.string.thermal_default,
R.string.thermal_benchmark,
R.string.thermal_browser,
R.string.thermal_camera,
R.string.thermal_dialer,
R.string.thermal_gaming,
R.string.thermal_navigation,
R.string.thermal_streaming,
R.string.thermal_video
};
private ModeAdapter(Context context) {
inflater = LayoutInflater.from(context);
}
@Override
public int getCount() {
return items.length;
}
@Override
public Object getItem(int position) {
return items[position];
}
@Override
public long getItemId(int position) {
return 0;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
TextView view;
if (convertView != null) {
view = (TextView) convertView;
} else {
view = (TextView) inflater.inflate(android.R.layout.simple_spinner_dropdown_item,
parent, false);
}
view.setText(items[position]);
view.setTextSize(14f);
return view;
}
}
private class AllPackagesAdapter extends RecyclerView.Adapter<ViewHolder>
implements AdapterView.OnItemSelectedListener, SectionIndexer {
private List<ApplicationsState.AppEntry> mEntries = new ArrayList<>();
private String[] mSections;
private int[] mPositions;
public AllPackagesAdapter(Context context) {
mActivityFilter = new ActivityFilter(context.getPackageManager());
}
@Override
public int getItemCount() {
return mEntries.size();
}
@Override
public long getItemId(int position) {
return mEntries.get(position).id;
}
@NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
return new ViewHolder(LayoutInflater.from(parent.getContext())
.inflate(R.layout.thermal_list_item, parent, false));
}
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
Context context = holder.itemView.getContext();
ApplicationsState.AppEntry entry = mEntries.get(position);
if (entry == null) {
return;
}
holder.mode.setAdapter(new ModeAdapter(context));
holder.mode.setOnItemSelectedListener(this);
holder.title.setText(entry.label);
holder.title.setOnClickListener(v -> holder.mode.performClick());
mApplicationsState.ensureIcon(entry);
holder.icon.setImageDrawable(entry.icon);
int packageState = mThermalUtils.getStateForPackage(entry.info.packageName);
holder.mode.setSelection(packageState, false);
holder.mode.setTag(entry);
holder.stateIcon.setImageResource(getStateDrawable(packageState));
}
private void setEntries(List<ApplicationsState.AppEntry> entries,
List<String> sections, List<Integer> positions) {
mEntries = entries;
mSections = sections.toArray(new String[sections.size()]);
mPositions = new int[positions.size()];
for (int i = 0; i < positions.size(); i++) {
mPositions[i] = positions.get(i);
}
notifyDataSetChanged();
}
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
final ApplicationsState.AppEntry entry = (ApplicationsState.AppEntry) parent.getTag();
int currentState = mThermalUtils.getStateForPackage(entry.info.packageName);
if (currentState != position) {
mThermalUtils.writePackage(entry.info.packageName, position);
notifyDataSetChanged();
}
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
@Override
public int getPositionForSection(int section) {
if (section < 0 || section >= mSections.length) {
return -1;
}
return mPositions[section];
}
@Override
public int getSectionForPosition(int position) {
if (position < 0 || position >= getItemCount()) {
return -1;
}
final int index = Arrays.binarySearch(mPositions, position);
/*
* Consider this example: section positions are 0, 3, 5; the supplied
* position is 4. The section corresponding to position 4 starts at
* position 3, so the expected return value is 1. Binary search will not
* find 4 in the array and thus will return -insertPosition-1, i.e. -3.
* To get from that number to the expected value of 1 we need to negate
* and subtract 2.
*/
return index >= 0 ? index : -index - 2;
}
@Override
public Object[] getSections() {
return mSections;
}
}
private class ActivityFilter implements ApplicationsState.AppFilter {
private final PackageManager mPackageManager;
private final List<String> mLauncherResolveInfoList = new ArrayList<String>();
private ActivityFilter(PackageManager packageManager) {
this.mPackageManager = packageManager;
updateLauncherInfoList();
}
public void updateLauncherInfoList() {
Intent i = new Intent(Intent.ACTION_MAIN);
i.addCategory(Intent.CATEGORY_LAUNCHER);
List<ResolveInfo> resolveInfoList = mPackageManager.queryIntentActivities(i, 0);
synchronized (mLauncherResolveInfoList) {
mLauncherResolveInfoList.clear();
for (ResolveInfo ri : resolveInfoList) {
mLauncherResolveInfoList.add(ri.activityInfo.packageName);
}
}
}
@Override
public void init() {
}
@Override
public boolean filterApp(ApplicationsState.AppEntry entry) {
boolean show = !mAllPackagesAdapter.mEntries.contains(entry.info.packageName);
if (show) {
synchronized (mLauncherResolveInfoList) {
show = mLauncherResolveInfoList.contains(entry.info.packageName);
}
}
return show;
}
}
}

View File

@@ -0,0 +1,196 @@
/*
* Copyright (C) 2020 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.lineageos.settings.thermal;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.RemoteException;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.view.Display;
import android.view.Surface;
import android.view.WindowManager;
import androidx.preference.PreferenceManager;
import org.lineageos.settings.utils.FileUtils;
public final class ThermalUtils {
private static final String THERMAL_CONTROL = "thermal_control";
protected static final int STATE_DEFAULT = 0;
protected static final int STATE_BENCHMARK = 1;
protected static final int STATE_BROWSER = 2;
protected static final int STATE_CAMERA = 3;
protected static final int STATE_DIALER = 4;
protected static final int STATE_GAMING = 5;
protected static final int STATE_NAVIGATION = 6;
protected static final int STATE_STREAMING = 7;
protected static final int STATE_VIDEO = 8;
private static final String THERMAL_STATE_DEFAULT = "500";
private static final String THERMAL_STATE_BENCHMARK = "10";
private static final String THERMAL_STATE_BROWSER = "11";
private static final String THERMAL_STATE_CAMERA = "12";
private static final String THERMAL_STATE_DIALER = "8";
private static final String THERMAL_STATE_GAMING = "520";
private static final String THERMAL_STATE_NAVIGATION = "19";
private static final String THERMAL_STATE_STREAMING = "14";
private static final String THERMAL_STATE_VIDEO = "21";
private static final String THERMAL_BENCHMARK = "thermal.benchmark=";
private static final String THERMAL_BROWSER = "thermal.browser=";
private static final String THERMAL_CAMERA = "thermal.camera=";
private static final String THERMAL_DIALER = "thermal.dialer=";
private static final String THERMAL_GAMING = "thermal.gaming=";
private static final String THERMAL_NAVIGATION = "thermal.navigation=";
private static final String THERMAL_STREAMING = "thermal.streaming=";
private static final String THERMAL_VIDEO = "thermal.video=";
private static final String THERMAL_SCONFIG = "/sys/class/thermal/thermal_message/sconfig";
private Display mDisplay;
private SharedPreferences mSharedPrefs;
protected ThermalUtils(Context context) {
mSharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
WindowManager mWindowManager = context.getSystemService(WindowManager.class);
mDisplay = mWindowManager.getDefaultDisplay();
}
public static void startService(Context context) {
context.startServiceAsUser(new Intent(context, ThermalService.class),
UserHandle.CURRENT);
}
private void writeValue(String profiles) {
mSharedPrefs.edit().putString(THERMAL_CONTROL, profiles).apply();
}
private String getValue() {
String value = mSharedPrefs.getString(THERMAL_CONTROL, null);
if (value == null || value.isEmpty()) {
value = THERMAL_BENCHMARK + ":" + THERMAL_BROWSER + ":" + THERMAL_CAMERA + ":" + THERMAL_DIALER + ":" +
THERMAL_GAMING + ":" + THERMAL_NAVIGATION + ":" + THERMAL_STREAMING + ":" + THERMAL_VIDEO;
writeValue(value);
}
return value;
}
protected void writePackage(String packageName, int mode) {
String value = getValue();
value = value.replace(packageName + ",", "");
String[] modes = value.split(":");
String finalString;
switch (mode) {
case STATE_BENCHMARK:
modes[0] = modes[0] + packageName + ",";
break;
case STATE_BROWSER:
modes[1] = modes[1] + packageName + ",";
break;
case STATE_CAMERA:
modes[2] = modes[2] + packageName + ",";
break;
case STATE_DIALER:
modes[3] = modes[3] + packageName + ",";
break;
case STATE_GAMING:
modes[4] = modes[4] + packageName + ",";
break;
case STATE_NAVIGATION:
modes[5] = modes[5] + packageName + ",";
break;
case STATE_STREAMING:
modes[6] = modes[6] + packageName + ",";
break;
case STATE_VIDEO:
modes[7] = modes[7] + packageName + ",";
break;
}
finalString = modes[0] + ":" + modes[1] + ":" + modes[2] + ":" + modes[3] + ":" +
modes[4] + ":" + modes[5] + ":" + modes[6] + ":" + modes[7];
writeValue(finalString);
}
protected int getStateForPackage(String packageName) {
String value = getValue();
String[] modes = value.split(":");
int state = STATE_DEFAULT;
if (modes[0].contains(packageName + ",")) {
state = STATE_BENCHMARK;
} else if (modes[1].contains(packageName + ",")) {
state = STATE_BROWSER;
} else if (modes[2].contains(packageName + ",")) {
state = STATE_CAMERA;
} else if (modes[3].contains(packageName + ",")) {
state = STATE_DIALER;
} else if (modes[4].contains(packageName + ",")) {
state = STATE_GAMING;
} else if (modes[5].contains(packageName + ",")) {
state = STATE_NAVIGATION;
} else if (modes[6].contains(packageName + ",")) {
state = STATE_STREAMING;
} else if (modes[7].contains(packageName + ",")) {
state = STATE_VIDEO;
}
return state;
}
protected void setDefaultThermalProfile() {
FileUtils.writeLine(THERMAL_SCONFIG, THERMAL_STATE_DEFAULT);
}
protected void setThermalProfile(String packageName) {
String value = getValue();
String modes[];
String state = THERMAL_STATE_DEFAULT;
if (value != null) {
modes = value.split(":");
if (modes[0].contains(packageName + ",")) {
state = THERMAL_STATE_BENCHMARK;
} else if (modes[1].contains(packageName + ",")) {
state = THERMAL_STATE_BROWSER;
} else if (modes[2].contains(packageName + ",")) {
state = THERMAL_STATE_CAMERA;
} else if (modes[3].contains(packageName + ",")) {
state = THERMAL_STATE_DIALER;
} else if (modes[4].contains(packageName + ",")) {
state = THERMAL_STATE_GAMING;
} else if (modes[5].contains(packageName + ",")) {
state = THERMAL_STATE_NAVIGATION;
} else if (modes[6].contains(packageName + ",")) {
state = THERMAL_STATE_STREAMING;
} else if (modes[7].contains(packageName + ",")) {
state = THERMAL_STATE_VIDEO;
}
}
FileUtils.writeLine(THERMAL_SCONFIG, state);
}
}

View File

@@ -0,0 +1,160 @@
/*
* Copyright (C) 2016 The CyanogenMod Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.lineageos.settings.utils;
import android.util.Log;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public final class FileUtils {
private static final String TAG = "FileUtils";
private FileUtils() {
// This class is not supposed to be instantiated
}
/**
* Reads the first line of text from the given file.
* Reference {@link BufferedReader#readLine()} for clarification on what a line is
*
* @return the read line contents, or null on failure
*/
public static String readOneLine(String fileName) {
String line = null;
BufferedReader reader = null;
try {
reader = new BufferedReader(new FileReader(fileName), 512);
line = reader.readLine();
} catch (FileNotFoundException e) {
Log.w(TAG, "No such file " + fileName + " for reading", e);
} catch (IOException e) {
Log.e(TAG, "Could not read from file " + fileName, e);
} finally {
try {
if (reader != null) {
reader.close();
}
} catch (IOException e) {
// Ignored, not much we can do anyway
}
}
return line;
}
/**
* Writes the given value into the given file
*
* @return true on success, false on failure
*/
public static boolean writeLine(String fileName, String value) {
BufferedWriter writer = null;
try {
writer = new BufferedWriter(new FileWriter(fileName));
writer.write(value);
} catch (FileNotFoundException e) {
Log.w(TAG, "No such file " + fileName + " for writing", e);
return false;
} catch (IOException e) {
Log.e(TAG, "Could not write to file " + fileName, e);
return false;
} finally {
try {
if (writer != null) {
writer.close();
}
} catch (IOException e) {
// Ignored, not much we can do anyway
}
}
return true;
}
/**
* Checks whether the given file exists
*
* @return true if exists, false if not
*/
public static boolean fileExists(String fileName) {
final File file = new File(fileName);
return file.exists();
}
/**
* Checks whether the given file is readable
*
* @return true if readable, false if not
*/
public static boolean isFileReadable(String fileName) {
final File file = new File(fileName);
return file.exists() && file.canRead();
}
/**
* Checks whether the given file is writable
*
* @return true if writable, false if not
*/
public static boolean isFileWritable(String fileName) {
final File file = new File(fileName);
return file.exists() && file.canWrite();
}
/**
* Deletes an existing file
*
* @return true if the delete was successful, false if not
*/
public static boolean delete(String fileName) {
final File file = new File(fileName);
boolean ok = false;
try {
ok = file.delete();
} catch (SecurityException e) {
Log.w(TAG, "SecurityException trying to delete " + fileName, e);
}
return ok;
}
/**
* Renames an existing file
*
* @return true if the rename was successful, false if not
*/
public static boolean rename(String srcPath, String dstPath) {
final File srcFile = new File(srcPath);
final File dstFile = new File(dstPath);
boolean ok = false;
try {
ok = srcFile.renameTo(dstFile);
} catch (SecurityException e) {
Log.w(TAG, "SecurityException trying to rename " + srcPath + " to " + dstPath, e);
} catch (NullPointerException e) {
Log.e(TAG, "NullPointerException trying to rename " + srcPath + " to " + dstPath, e);
}
return ok;
}
}

11
power/Android.bp Normal file
View File

@@ -0,0 +1,11 @@
cc_library_static {
name: "libperfmgr-ext-xiaomi",
vendor: true,
srcs: [
"power-mode.cpp",
],
shared_libs: [
"android.hardware.power-V4-ndk",
"libbase",
],
}

96
power/power-mode.cpp Normal file
View File

@@ -0,0 +1,96 @@
/*
* Copyright (C) 2021 The LineageOS Project
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <aidl/android/hardware/power/BnPower.h>
#include <android-base/file.h>
#include <android-base/logging.h>
#include <sys/ioctl.h>
#include <linux/input.h>
namespace {
int open_ts_input() {
int fd = -1;
DIR *dir = opendir("/dev/input");
if (dir != NULL) {
struct dirent *ent;
while ((ent = readdir(dir)) != NULL) {
if (ent->d_type == DT_CHR) {
char absolute_path[PATH_MAX] = {0};
char name[80] = {0};
strcpy(absolute_path, "/dev/input/");
strcat(absolute_path, ent->d_name);
fd = open(absolute_path, O_RDWR);
if (ioctl(fd, EVIOCGNAME(sizeof(name) - 1), &name) > 0) {
if (strcmp(name, "fts_ts") == 0 || strcmp(name, "NVTCapacitiveTouchScreen") == 0)
break;
}
close(fd);
fd = -1;
}
}
closedir(dir);
}
return fd;
}
} // anonymous namespace
namespace aidl {
namespace google {
namespace hardware {
namespace power {
namespace impl {
namespace pixel {
static constexpr int kInputEventWakeupModeOff = 4;
static constexpr int kInputEventWakeupModeOn = 5;
using ::aidl::android::hardware::power::Mode;
bool isDeviceSpecificModeSupported(Mode type, bool* _aidl_return) {
switch (type) {
case Mode::DOUBLE_TAP_TO_WAKE:
*_aidl_return = true;
return true;
default:
return false;
}
}
bool setDeviceSpecificMode(Mode type, bool enabled) {
switch (type) {
case Mode::DOUBLE_TAP_TO_WAKE: {
int fd = open_ts_input();
if (fd == -1) {
LOG(WARNING)
<< "DT2W won't work because no supported touchscreen input devices were found";
return false;
}
struct input_event ev;
ev.type = EV_SYN;
ev.code = SYN_CONFIG;
ev.value = enabled ? kInputEventWakeupModeOn : kInputEventWakeupModeOff;
write(fd, &ev, sizeof(ev));
close(fd);
return true;
}
default:
return false;
}
}
} // namespace impl
} // namespace power
} // namespace hardware
} // namespace google
} // namespace aidl
} // namespace pixel

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

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