forked from FlokoROM/patch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vendor_lineage.diff
502 lines (489 loc) · 17 KB
/
vendor_lineage.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
diff --git a/build/core/main_version.mk b/build/core/main_version.mk
index d0318770..01b2f448 100644
--- a/build/core/main_version.mk
+++ b/build/core/main_version.mk
@@ -6,11 +6,11 @@ endif
# crDroid System Version
ADDITIONAL_SYSTEM_PROPERTIES += \
- ro.crdroid.build.version=$(LINEAGE_VERSION) \
- ro.crdroid.display.version=$(LINEAGE_DISPLAY_VERSION) \
- ro.crdroid.version=$(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR) \
- ro.modversion=$(CR_VERSION) \
- ro.crdroidlegal.url=https://crdroid.net/legal.php
+ ro.floko.build.version=$(LINEAGE_VERSION) \
+ ro.floko.display.version=$(LINEAGE_DISPLAY_VERSION) \
+ ro.floko.version=$(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR) \
+ ro.modversion=$(FLOKO_VERSION) \
+ ro.flokolegal.url=https://wiki.maud.io/floko/legal
# LineageOS Platform SDK Version
ADDITIONAL_SYSTEM_PROPERTIES += \
diff --git a/build/tools/changelog.sh b/build/tools/changelog.sh
index 46ccb87e..ff5b07bd 100755
--- a/build/tools/changelog.sh
+++ b/build/tools/changelog.sh
@@ -37,7 +37,7 @@ else
fi
fi
-REPO_LIST="$(cat .repo/project.list | sed '\?^vendor/crDroidOTA?d')"
+REPO_LIST="$(repo list --path)"
for i in $(seq $changelog_days); do
After_Date=`date --date="$i days ago" +%m-%d-%Y`
k=$(expr $i - 1)
diff --git a/build/tools/roomservice.py b/build/tools/roomservice.py
deleted file mode 100755
index 2b3cdd7b..00000000
--- a/build/tools/roomservice.py
+++ /dev/null
@@ -1,311 +0,0 @@
-#!/usr/bin/env python
-# Copyright (C) 2012-2013, The CyanogenMod Project
-# Copyright (C) 2012-2015, SlimRoms Project
-# Copyright (C) 2016-2017, AOSiP
-# Copyright (C) 2022, crDroid 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.
-
-from __future__ import print_function
-
-import base64
-import json
-import netrc
-import os
-import sys
-
-from xml.etree import ElementTree
-
-try:
- # For python3
- import urllib.error
- import urllib.parse
- import urllib.request
-except ImportError:
- # For python2
- import imp
- import urllib2
- import urlparse
- urllib = imp.new_module('urllib')
- urllib.error = urllib2
- urllib.parse = urlparse
- urllib.request = urllib2
-
-DEBUG = False
-
-custom_local_manifest = ".repo/local_manifests/roomservice.xml"
-custom_default_revision = "13.0"
-custom_dependencies = "crdroid.dependencies"
-org_manifest = "crdroidandroid" # leave empty if org is provided in manifest
-org_display = "crDroid Android" # needed for displaying
-
-github_auth = None
-
-
-local_manifests = '.repo/local_manifests'
-if not os.path.exists(local_manifests):
- os.makedirs(local_manifests)
-
-
-def debug(*args, **kwargs):
- if DEBUG:
- print(*args, **kwargs)
-
-
-def add_auth(g_req):
- global github_auth
- if github_auth is None:
- try:
- auth = netrc.netrc().authenticators("api.github.com")
- except (netrc.NetrcParseError, IOError):
- auth = None
- if auth:
- github_auth = base64.b64encode(
- ('%s:%s' % (auth[0], auth[2])).encode()
- )
- else:
- github_auth = ""
- if github_auth:
- g_req.add_header("Authorization", "Basic %s" % github_auth)
-
-
-def indent(elem, level=0):
- # in-place prettyprint formatter
- i = "\n" + " " * level
- if len(elem):
- if not elem.text or not elem.text.strip():
- elem.text = i + " "
- if not elem.tail or not elem.tail.strip():
- elem.tail = i
- for elem in elem:
- indent(elem, level+1)
- if not elem.tail or not elem.tail.strip():
- elem.tail = i
- else:
- if level and (not elem.tail or not elem.tail.strip()):
- elem.tail = i
-
-def load_manifest(manifest):
- try:
- man = ElementTree.parse(manifest).getroot()
- except (IOError, ElementTree.ParseError):
- man = ElementTree.Element("manifest")
- return man
-
-def get_from_manifest(device_name):
- if os.path.exists(custom_local_manifest):
- man = load_manifest(custom_local_manifest)
- for local_path in man.findall("project"):
- lp = local_path.get("path").strip('/')
- if lp.startswith("device/") and lp.endswith("/" + device_name):
- return lp
- return None
-
-
-def is_in_manifest(project_path):
- man = load_manifest(custom_local_manifest)
- for local_path in man.findall("project"):
- if local_path.get("path") == project_path:
- return True
- return False
-
-
-def add_to_manifest(repos, fallback_branch=None):
- lm = load_manifest(custom_local_manifest)
-
- for repo in repos:
- repo_name = repo['repository']
- repo_path = repo['target_path']
- if 'branch' in repo:
- repo_branch=repo['branch']
- else:
- repo_branch=custom_default_revision
- if 'remote' in repo:
- repo_remote=repo['remote']
- elif "/" not in repo_name:
- repo_remote=org_manifest
- elif "/" in repo_name:
- repo_remote="github"
-
- if is_in_manifest(repo_path):
- print('already exists: %s' % repo_path)
- continue
-
- print('Adding dependency:\nRepository: %s\nBranch: %s\nRemote: %s\nPath: %s\n' % (repo_name, repo_branch,repo_remote, repo_path))
-
- project = ElementTree.Element(
- "project",
- attrib={"path": repo_path,
- "remote": repo_remote,
- "name": "%s" % repo_name}
- )
-
- if repo_branch is not None:
- project.set('revision', repo_branch)
- elif fallback_branch:
- print("Using branch %s for %s" %
- (fallback_branch, repo_name))
- project.set('revision', fallback_branch)
- else:
- print("Using default branch for %s" % repo_name)
- lm.append(project)
-
- indent(lm)
- raw_xml = "\n".join(('<?xml version="1.0" encoding="UTF-8"?>',
- ElementTree.tostring(lm).decode()))
-
- f = open(custom_local_manifest, 'w')
- f.write(raw_xml)
- f.close()
-
-_fetch_dep_cache = []
-
-
-def fetch_dependencies(repo_path, fallback_branch=None):
- global _fetch_dep_cache
- if repo_path in _fetch_dep_cache:
- return
- _fetch_dep_cache.append(repo_path)
-
- print('Looking for dependencies')
-
- dep_p = '/'.join((repo_path, custom_dependencies))
- if os.path.exists(dep_p):
- with open(dep_p) as dep_f:
- dependencies = json.load(dep_f)
- else:
- dependencies = {}
- print('%s has no additional dependencies.' % repo_path)
-
- fetch_list = []
- syncable_repos = []
-
- for dependency in dependencies:
- if not is_in_manifest(dependency['target_path']):
- if not dependency.get('branch'):
- dependency['branch'] = custom_default_revision
-
- fetch_list.append(dependency)
- syncable_repos.append(dependency['target_path'])
- else:
- print("Dependency already present in manifest: %s => %s" % (dependency['repository'], dependency['target_path']))
-
- if fetch_list:
- print('Adding dependencies to manifest\n')
- add_to_manifest(fetch_list, fallback_branch)
-
- if syncable_repos:
- print('Syncing dependencies')
- os.system('repo sync --force-sync --no-tags --current-branch --no-clone-bundle %s' % ' '.join(syncable_repos))
-
- for deprepo in syncable_repos:
- fetch_dependencies(deprepo)
-
-
-def has_branch(branches, revision):
- return revision in (branch['name'] for branch in branches)
-
-
-def detect_revision(repo):
- """
- returns None if using the default revision, else return
- the branch name if using a different revision
- """
- print("Checking branch info")
- githubreq = urllib.request.Request(
- repo['branches_url'].replace('{/branch}', ''))
- add_auth(githubreq)
- result = json.loads(urllib.request.urlopen(githubreq).read().decode())
-
- print("Calculated revision: %s" % custom_default_revision)
-
- if has_branch(result, custom_default_revision):
- return custom_default_revision
-
- print("Branch %s not found" % custom_default_revision)
- sys.exit()
-
-
-def main():
- global DEBUG
- try:
- depsonly = bool(sys.argv[2] in ['true', 1])
- except IndexError:
- depsonly = False
-
- if os.getenv('ROOMSERVICE_DEBUG'):
- DEBUG = True
-
- product = sys.argv[1]
- device = product[product.find("_") + 1:] or product
-
- if depsonly:
- repo_path = get_from_manifest(device)
- if repo_path:
- fetch_dependencies(repo_path)
- else:
- print("Trying dependencies-only mode on a "
- "non-existing device tree?")
- sys.exit()
-
- print("Device {0} not found. Attempting to retrieve device repository from "
- "{1} Github (http://github.com/{2}).".format(device, org_display, org_manifest))
-
- githubreq = urllib.request.Request(
- "https://api.github.com/search/repositories?"
- "q={0}+user:{1}+in:name+fork:true".format(device, org_manifest))
- add_auth(githubreq)
-
- repositories = []
-
- try:
- result = json.loads(urllib.request.urlopen(githubreq).read().decode())
- except urllib.error.URLError:
- print("Failed to search GitHub")
- sys.exit(1)
- except ValueError:
- print("Failed to parse return data from GitHub")
- sys.exit(1)
- for res in result.get('items', []):
- repositories.append(res)
-
- for repository in repositories:
- repo_name = repository['name']
-
- if not (repo_name.startswith("android_device_") and
- repo_name.endswith("_" + device)):
- continue
- print("Found repository: %s" % repository['name'])
-
- fallback_branch = detect_revision(repository)
- manufacturer = repo_name.replace("android_device_", "").replace("_" + device, "")
- repo_path = "device/%s/%s" % (manufacturer, device)
- adding = [{'repository': "crdroidandroid/" + repo_name, 'target_path': repo_path}]
-
- add_to_manifest(adding, fallback_branch)
-
- print("Syncing repository to retrieve project.")
- os.system('repo sync --force-sync --no-tags --current-branch --no-clone-bundle %s' % repo_path)
- print("Repository synced!")
-
- fetch_dependencies(repo_path, fallback_branch)
- print("Done")
- sys.exit()
-
- print("Repository for %s not found in the %s Github repository list."
- % (device, org_display))
- print("If this is in error, you may need to manually add it to your "
- "%s" % custom_local_manifest)
-
-if __name__ == "__main__":
- main()
diff --git a/config/common.mk b/config/common.mk
index a797c010..611c3b08 100644
--- a/config/common.mk
+++ b/config/common.mk
@@ -2,9 +2,8 @@
$(call inherit-product-if-exists, vendor/extra/product.mk)
$(call inherit-product-if-exists, vendor/lineage/config/crdroid.mk)
$(call inherit-product-if-exists, vendor/addons/config.mk)
-$(call inherit-product-if-exists, external/faceunlock/config.mk)
-PRODUCT_BRAND ?= crDroidAndroid
+PRODUCT_BRAND ?= Floko
PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0
@@ -16,7 +15,7 @@ PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
ro.com.google.clientidbase=$(PRODUCT_GMS_CLIENTID_BASE)
endif
-ifeq ($(TARGET_BUILD_VARIANT),eng)
+ifneq ($(TARGET_BUILD_VARIANT),user)
# Disable ADB authentication
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += ro.adb.secure=0
else
@@ -124,8 +123,7 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \
LineageParts \
LineageSettingsProvider \
- LineageSetupWizard \
- Updater
+ LineageSetupWizard
PRODUCT_COPY_FILES += \
vendor/lineage/prebuilt/common/etc/init/init.lineage-updater.rc:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/init/init.lineage-updater.rc
@@ -232,9 +230,7 @@ PRODUCT_PACKAGE_OVERLAYS += vendor/crowdin/overlay
PRODUCT_EXTRA_RECOVERY_KEYS += \
vendor/lineage/build/target/product/security/lineage
-include vendor/lineage/config/version.mk
-
--include vendor/lineage-priv/keys/keys.mk
+include vendor/lineage/config/floko.mk
-include $(WORKSPACE)/build_env/image-auto-bits.mk
-include vendor/lineage/config/partner_gms.mk
diff --git a/config/crdroid.mk b/config/crdroid.mk
index b841de7c..66299fbc 100644
--- a/config/crdroid.mk
+++ b/config/crdroid.mk
@@ -31,13 +31,13 @@ PRODUCT_PRODUCT_PROPERTIES += \
ro.input.video_enabled=false
# Blurs
-ifeq ($(TARGET_ENABLE_BLUR), true)
+ifeq ($(TARGET_DISABLE_BLUR), true)
PRODUCT_SYSTEM_EXT_PROPERTIES += \
- ro.sf.blurs_are_expensive=1 \
- ro.surface_flinger.supports_background_blur=1
+ ro.launcher.blur.appLaunch=0
else
PRODUCT_PRODUCT_PROPERTIES += \
- ro.launcher.blur.appLaunch=0
+ ro.sf.blurs_are_expensive=1 \
+ ro.surface_flinger.supports_background_blur=1
endif
# Disable async MTE on system_server
diff --git a/config/floko.mk b/config/floko.mk
new file mode 100644
index 00000000..66221945
--- /dev/null
+++ b/config/floko.mk
@@ -0,0 +1,10 @@
+PRODUCT_VERSION_MAJOR = 13
+PRODUCT_VERSION_MINOR = 0
+
+FLOKO_VERSION := 7.0
+
+# Internal version
+LINEAGE_VERSION := Floko-v$(FLOKO_VERSION)-$(LINEAGE_BUILD)-$(shell date -u +%Y%m%d)
+
+# Display version
+LINEAGE_DISPLAY_VERSION := Floko-v$(FLOKO_VERSION)-$(LINEAGE_BUILD)
diff --git a/config/version.mk b/config/version.mk
deleted file mode 100644
index 439b35dd..00000000
--- a/config/version.mk
+++ /dev/null
@@ -1,11 +0,0 @@
-PRODUCT_VERSION_MAJOR = 13
-PRODUCT_VERSION_MINOR = 0
-
-# Increase CR Version with each major release.
-CR_VERSION := 9.14
-
-# Internal version
-LINEAGE_VERSION := crDroidAndroid-$(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(shell date +%Y%m%d)-$(LINEAGE_BUILD)-v$(CR_VERSION)
-
-# Display version
-LINEAGE_DISPLAY_VERSION := crDroidAndroid-$(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(LINEAGE_BUILD)-v$(CR_VERSION)
diff --git a/overlay/common/packages/apps/Settings/res/values/config.xml b/overlay/common/packages/apps/Settings/res/values/config.xml
index 635d6c19..05d0eebf 100644
--- a/overlay/common/packages/apps/Settings/res/values/config.xml
+++ b/overlay/common/packages/apps/Settings/res/values/config.xml
@@ -32,10 +32,6 @@
<string name="config_wallpaper_picker_class" translatable="false">com.android.customization.picker.CustomizationPickerActivity</string>
<!-- Fully-qualified class name for the styles & wallpaper picker activity. -->
<string name="config_styles_and_wallpaper_picker_class" translatable="false">com.android.customization.picker.CustomizationPickerActivity</string>
- <!-- Action name for the wallpaper picker activity. -->
- <string name="config_wallpaper_picker_action" translatable="false">android.intent.action.MAIN</string>
- <!-- Action name for the styles & wallpaper picker activity. -->
- <string name="config_styles_and_wallpaper_picker_action" translatable="false">android.intent.action.MAIN</string>
<!-- Whether memory from app_info_settings is available or not. -->
<bool name="config_show_app_info_settings_memory">true</bool>
diff --git a/prebuilt/common/bin/backuptool.sh b/prebuilt/common/bin/backuptool.sh
index 9c3dbbbe..9b86b623 100755
--- a/prebuilt/common/bin/backuptool.sh
+++ b/prebuilt/common/bin/backuptool.sh
@@ -47,7 +47,7 @@ if [ ! -r $S/build.prop ]; then
echo "Backup/restore is not possible. Partition is probably empty"
return 1
fi
-if ! grep -q "^ro.crdroid.version=$V.*" $S/build.prop; then
+if ! grep -q "^ro.floko.version=$V.*" $S/build.prop; then
echo "Backup/restore is not possible. Incompatible ROM version: $V"
return 2
fi
diff --git a/prebuilt/common/bin/backuptool_ab.sh b/prebuilt/common/bin/backuptool_ab.sh
index 16ceab39..bb3f894a 100755
--- a/prebuilt/common/bin/backuptool_ab.sh
+++ b/prebuilt/common/bin/backuptool_ab.sh
@@ -56,7 +56,7 @@ if [ ! -r /system/build.prop ]; then
echo "Backup/restore is not possible. Partition is probably empty"
return 1
fi
-if ! grep -q "^ro.crdroid.version=$V.*" /system/build.prop; then
+if ! grep -q "^ro.floko.version=$V.*" /system/build.prop; then
echo "Backup/restore is not possible. Incompatible ROM version: $V"
return 2
fi
diff --git a/prebuilt/common/etc/init/init.lineage-updater.rc b/prebuilt/common/etc/init/init.lineage-updater.rc
index 4307e185..9d2cd5ce 100644
--- a/prebuilt/common/etc/init/init.lineage-updater.rc
+++ b/prebuilt/common/etc/init/init.lineage-updater.rc
@@ -1,4 +1,4 @@
on post-fs-data
# Create an additional OTA package directory that unlike /data/ota_package
# will not be touched by GmsCore.
- mkdir /data/crdroid_updates 0770 system cache encryption=Require
+ mkdir /data/floko_updates 0770 system cache encryption=Require