Repository navigation
Expand file tree
/
Copy pathinstall.php
More file actions
274 lines (225 loc) · 10.4 KB
/
Copy pathinstall.php
File metadata and controls
274 lines (225 loc) · 10.4 KB
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
<?php
include 'functions.php';
include 'vendor/Parsedown.php';
$domain = GetDomain();
$device = $_GET['name'] ?? '';
$crversion = $_GET['crversion'] ?? '';
if (empty($crversion)) {
header("Location: " . $domain . "/downloads#" . $device . "", true, 301);
exit;
}
//define vars
$data = GetDeviceInfo($device, $crversion);
$oem = $data[0] ?? '';
if (empty($oem)){
header("Location: " . $domain , true, 301);
exit;
}
$file = 'install_docs/' . $crversion . '/' . $device . '.md';
if (!file_exists($file)){
header("Location: " . $domain , true, 301);
exit;
}
$content = file_get_contents($file);
$devicename = $data[1]['device'];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title>crDroid.net - How to install crDroid <?php echo $crversion; ?> for <?php echo $devicename; ?> (<?php echo $device; ?>)</title>
<meta name="description" content="install crDroid <?php echo $crversion; ?> for <?php echo $devicename; ?> (<?php echo $device; ?>)">
<meta name="keywords" content="crDroid, crDroid ROM, crDroid <?php echo $crversion; ?>, ROM, <?php echo $devicename; ?>, <?php echo $device; ?>">
<!-- Favicons -->
<link href="<?php echo $domain; ?>/img/favicon.ico" rel="icon">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Raleway:300,300i,400,400i,500,500i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i" rel="stylesheet">
<!-- Vendor CSS Files -->
<link href="<?php echo $domain; ?>/vendor/aos/aos.css" rel="stylesheet">
<link href="<?php echo $domain; ?>/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="<?php echo $domain; ?>/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
<link href="<?php echo $domain; ?>/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
<link href="<?php echo $domain; ?>/vendor/glightbox/css/glightbox.min.css" rel="stylesheet">
<link href="<?php echo $domain; ?>/vendor/swiper/swiper-bundle.min.css" rel="stylesheet">
<!-- Bootstrap dark mode -->
<link id="dark-theme-style" rel="stylesheet" />
<!-- Main CSS File -->
<link href="<?php echo $domain; ?>/css/style.css" rel="stylesheet">
<!-- Google verification -->
<meta name="google-site-verification" content="v_DBWc21zWokjHdPNpABWYSkB3lSz6u7mPGXsmOPGt8" />
<!-- Matomo Tag Manager -->
<script>
var _mtm = window._mtm = window._mtm || [];
_mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'});
(function() {
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src='https://analytics.crdroid.net/js/container_RN6gKcgX.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Tag Manager -->
<!-- Copy button css -->
<style>
.code-container {
position: relative;
}
.copy-btn {
position: absolute;
top: -4px;
right: 0;
opacity: 0.5;
}
.copy-btn:hover {
opacity: 1;
}
</style>
</head>
<body>
<!-- ======= Header ======= -->
<header id="header" class="fixed-top header-transparent ">
<div class="container d-flex align-items-center justify-content-between">
<div class="logo">
<!--<h1><a href="<?php echo $domain; ?>">crDroid</a></h1>-->
<a href="<?php echo $domain; ?>"><img src="<?php echo $domain; ?>/img/logo.png" alt="" class="img-fluid"></a>
</div>
<nav id="navbar" class="navbar">
<ul>
<li><a class="nav-link" href="<?php echo $domain; ?>">Home</a></li>
<li><a class="nav-link" href="<?php echo $domain; ?>/downloads">Download</a></li>
<li><a class="nav-link" href="<?php echo $domain; ?>/blog">Blog</a></li>
<li><a class="nav-link" href="<?php echo $domain; ?>/translations">Translations</a></li>
<li><a class="nav-link" href="https://stats.crdroid.net">Stats</a></li>
<li><a class="nav-link" href="<?php echo $domain; ?>/donate">Support us</a></li>
<li><a class="nav-link" href="<?php echo $domain; ?>/legal">Legal</a></li>
<li><a class="nav-link scrollto" href="#footer">Contact</a></li>
<!--<li><a class="getstarted" href="dl.php">Download</a></li>-->
</ul>
<i class="bi bi-list mobile-nav-toggle"></i>
</nav><!-- .navbar -->
<a class="switcher" role="button" id="theme-toggler" onclick="toggleTheme()"></a>
</div>
</header><!-- End Header -->
<!-- ======= Intro Section ======= -->
<section id="blog" class="d-flex align-items-center blogbg">
<div class="container">
<div class="row">
<div class="d-lg-flex flex-lg-column justify-content-center align-items-stretch pt-5 pt-lg-0 order-2 order-lg-1" data-aos="fade-up">
<div>
<h1>Install crDroid <?php echo $crversion; ?> for <?php echo $devicename; ?></h1>
<h3><?php echo $device; ?></h3>
</div>
</div>
</div>
</div>
</section><!-- End intro -->
<main id="main">
<section class="inner-page">
<div class="container">
<div class="pb-2">
<a href="<?php echo $domain; ?>/<?php echo $device; ?>/<?php echo $crversion; ?>"><i class='bx bx-chevrons-left'></i> Back to download page</a>
</div>
<!-- List device info -->
<div class="row">
<div class="col-md col-lg">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<div>
<b>Warning:</b> The provided instructions are for <b>crDroid <?php echo $crversion; ?> running on <?php echo $devicename . " (" . $device . ")</b>"; ?>. These will only work if you follow every section and step precisely.<br>
Do <b>not</b> continue after something fails!
<hr>
<p class='mb-0'>Before you start, make sure you’ve <b>deleted every Google account</b> from the device on a fresh install. This will prevent “Factory Reset Protection” (FRP) from kicking in during the setup steps.</p>
<p class='mb-0'>Installation is only possible on a device with <b>unlocked bootloader!</b></p>
</div>
</div>
<div class="alert alert-warning" role="alert">
crDroid is provided as-is without warranty, and while we strive to ensure functionality, you install it at your own risk.
<br>
We are not responsible for any damage you made to your device. You have been warned!
</div>
<div>
<h2>Flashing instructions</h2>
<br>
<!-- Markdown parsing -->
<?php
$Parsedown = new Parsedown();
echo $Parsedown->text($content);
?>
</div>
<div>
<h2>Require support?</h2>
For support questions, check out forum or telegram links found on our <a href="<?php echo $domain; ?>/<?php echo $device; ?>/<?php echo $crversion; ?>/support">support page</a><br>
</div>
</div>
</div>
</div>
</div>
</section>
</main><!-- End #main -->
<!-- ======= Footer ======= -->
<footer class='footerbg' id="footer">
<div class="footer-top">
<div class="container">
<div class="row">
<div class="col-lg col-md-6 footer-contact">
<h3>crDroid Android Project</h3>
<p>
<strong>Email:</strong> contact@crdroid.net<br>
</p>
<div class="social-links mt-3">
<a href="https://t.me/crDroidAndroid"><i class='bx bxl-telegram'></i></a>
<a href="https://github.com/crdroidandroid"><i class='bx bxl-github' ></i></a>
</div>
</div>
</div>
</div>
</div>
<div class="container py-4">
<div class="copyright">
© Copyright 2016-<?php echo date("Y");?> <strong><span>crDroid Android</span></strong>.
</div>
<div class="credits">
Designed by <a href="https://gwolf2u.com">Lup Gabriel</a>, buildservers powered by <a href="https://www.interserver.net/r/836686">InterServer</a> and website hosted @ <a href="https://scopehosts.com">ScopeHosts</a>
</div>
</div>
</footer><!-- End Footer -->
<a href="#" class="back-to-top d-flex align-items-center justify-content-center"><i class="bi bi-arrow-up-short"></i></a>
<!-- Vendor JS Files -->
<script src="<?php echo $domain; ?>/vendor/aos/aos.js"></script>
<script src="<?php echo $domain; ?>/vendor/jquery/jquery-3.6.0.min.js"></script>
<script src="<?php echo $domain; ?>/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="<?php echo $domain; ?>/vendor/glightbox/js/glightbox.min.js"></script>
<script src="<?php echo $domain; ?>/vendor/swiper/swiper-bundle.min.js"></script>
<script src="<?php echo $domain; ?>/vendor/bootstrap-dark/js/darkmode.js"></script>
<!-- Main JS File -->
<script src="<?php echo $domain; ?>/js/main.js"></script>
<!-- Copy button js -->
<script>
$(document).ready(function() {
$('pre code').each(function() {
var codeText = $(this).text().trim();
var copyButton = $('<button class="btn btn-secondary btn-sm copy-btn"><i class="bx bx-copy"></i></button>');
// Wrap the code content and the copy button in a container
var codeContainer = $('<div class="code-container"></div>');
codeContainer.append($(this).contents());
codeContainer.append(copyButton);
// Replace the code content with the code container
$(this).html(codeContainer);
copyButton.click(function() {
copyToClipboard(codeText);
$(this).html('<i class="bx bx-check"></i> Copied');
setTimeout(function() {
copyButton.html('<i class="bx bx-copy"></i>');
}, 2000);
});
});
function copyToClipboard(text) {
var $temp = $('<input>');
$('body').append($temp);
$temp.val(text).select();
document.execCommand('copy');
$temp.remove();
}
});
</script>
</body>
</html>