forked from Customrombay/database
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsyncWithHavocOS.dart
124 lines (112 loc) · 5.46 KB
/
syncWithHavocOS.dart
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
import 'dart:io';
import 'package:yaml/yaml.dart';
import 'tools/extended_codename_creator.dart';
import 'tools/add_to_support.dart';
void main() async {
int numberOfCovered = 0;
int numberOfNotCovered = 0;
List<String> listOfNotCovered = [];
List<String> listOfCovered = [];
for (var file in await Directory("filesFromHavocOS/twelve/gapps/").list().toList()) {
String content = await File(file.path).readAsString();
stdout.write("${file.path}\n");
var ydoc = loadYaml(content);
String readVendor = ydoc["oem"];
String readCodename = ydoc["codename"];
String extendedCodename = extendedCodenameCreator(readCodename: readCodename, readVendor: readVendor);
if (File("database/phone_data/$extendedCodename.yaml").existsSync()) {
numberOfCovered += 1;
listOfCovered += [extendedCodename];
addToSupport(androidVersion: "12", extendedCodename: extendedCodename, romName: "HavocOS", romState: "Official", romSupport: true, romWebpage: "https://havoc-os.com/", deviceWebpage: "https://havoc-os.com/device#$readCodename");
}
else {
numberOfNotCovered += 1;
listOfNotCovered += [extendedCodename];
}
}
for (var file in await Directory("filesFromHavocOS/eleven/gapps/").list().toList()) {
String content = await File(file.path).readAsString();
stdout.write("${file.path}\n");
var ydoc = loadYaml(content);
String readVendor = ydoc["oem"];
String readCodename = ydoc["codename"];
String extendedCodename = extendedCodenameCreator(readCodename: readCodename, readVendor: readVendor);
if (!(listOfCovered.contains(extendedCodename)) && !(listOfNotCovered.contains(extendedCodename))) {
if (File("database/phone_data/$extendedCodename.yaml").existsSync()) {
numberOfCovered += 1;
listOfCovered += [extendedCodename];
addToSupport(androidVersion: "11", extendedCodename: extendedCodename, romName: "HavocOS", romState: "Official", romSupport: true, romWebpage: "https://havoc-os.com/", deviceWebpage: "https://havoc-os.com/device#$readCodename");
}
else {
numberOfNotCovered += 1;
listOfNotCovered += [extendedCodename];
}
}
}
for (var file in await Directory("filesFromHavocOS/eleven/vanilla/").list().toList()) {
String content = await File(file.path).readAsString();
stdout.write("${file.path}\n");
var ydoc = loadYaml(content);
String readVendor = ydoc["oem"];
String readCodename = ydoc["codename"];
String extendedCodename = extendedCodenameCreator(readCodename: readCodename, readVendor: readVendor);
if (!(listOfCovered.contains(extendedCodename)) && !(listOfNotCovered.contains(extendedCodename))) {
if (File("database/phone_data/$extendedCodename.yaml").existsSync()) {
numberOfCovered += 1;
listOfCovered += [extendedCodename];
addToSupport(androidVersion: "11", extendedCodename: extendedCodename, romName: "HavocOS", romState: "Official", romSupport: true, romWebpage: "https://havoc-os.com/", deviceWebpage: "https://havoc-os.com/device#$readCodename");
}
else {
numberOfNotCovered += 1;
listOfNotCovered += [extendedCodename];
}
}
}
for (var file in await Directory("filesFromHavocOS/ten/gapps/").list().toList()) {
String content = await File(file.path).readAsString();
stdout.write("${file.path}\n");
var ydoc = loadYaml(content);
List response = ydoc["response"];
Map toParse = response[0];
String readVendor = toParse["oem"];
String readCodename = toParse["codename"];
String extendedCodename = extendedCodenameCreator(readCodename: readCodename, readVendor: readVendor);
if (!(listOfCovered.contains(extendedCodename)) && !(listOfNotCovered.contains(extendedCodename))) {
if (File("database/phone_data/$extendedCodename.yaml").existsSync()) {
numberOfCovered += 1;
listOfCovered += [extendedCodename];
addToSupport(androidVersion: "10", extendedCodename: extendedCodename, romName: "HavocOS", romState: "Official", romSupport: true, romWebpage: "https://havoc-os.com/", deviceWebpage: "https://havoc-os.com/device#$readCodename");
}
else {
numberOfNotCovered += 1;
listOfNotCovered += [extendedCodename];
}
}
}
for (var file in await Directory("filesFromHavocOS/ten/vanilla/").list().toList()) {
String content = await File(file.path).readAsString();
stdout.write("${file.path}\n");
var ydoc = loadYaml(content);
List response = ydoc["response"];
Map toParse = response[0];
String readVendor = toParse["oem"];
String readCodename = toParse["codename"];
String extendedCodename = extendedCodenameCreator(readCodename: readCodename, readVendor: readVendor);
if (!(listOfCovered.contains(extendedCodename)) && !(listOfNotCovered.contains(extendedCodename))) {
if (File("database/phone_data/$extendedCodename.yaml").existsSync()) {
numberOfCovered += 1;
listOfCovered += [extendedCodename];
addToSupport(androidVersion: "10", extendedCodename: extendedCodename, romName: "HavocOS", romState: "Official", romSupport: true, romWebpage: "https://havoc-os.com/", deviceWebpage: "https://havoc-os.com/device#$readCodename");
}
else {
numberOfNotCovered += 1;
listOfNotCovered += [extendedCodename];
}
}
}
stdout.write("Covered: $numberOfCovered\n");
stdout.write("Not covered: $numberOfNotCovered\n");
for (var device in listOfNotCovered) {
stdout.write("$device\n");
}
}