forked from MiCode/patchrom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
81 lines (44 loc) · 1.9 KB
/
README
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
Patchrom
===========
Get Android SDK
----------------
In order to build patchrom project, you must have android sdk installed.(http://developer.android.com/sdk/installing.html)
And add the sdk tools and platform-tools to PATH.
vim .bashrc
export PATH=$PATH:/home/xxx/android-sdk/tools:/home/xxx/anroid-sdk/platform-tools
Getting Started
---------------
To get started with MiCode/patchrom, you'll need to get
familiar with [Git and Repo](http://source.android.com/download/using-repo).
To initialize your local repository using the patchrom trees, use a command like this:
mkdir patchrom
cd patchrom
repo init -u git://github.com/MiCode/patchrom.git -b miui-7 -m android-4.4.4.xml
Then to sync up:
repo sync
Build
--------
Assumed current directory is patchtom and you want to build the ROM for Google Nexus5
. build/envsetup.sh
cd nexus5
make fullota
After build completed, there will be a fullota.zip under out directory, now you can flash this file into your device.
Porting new device
------------------
Asssumed current directory is patchrom and you want to port miui to a new android device xblade
Prerequiste:
(1) Your device has root privilege or a rooted kernel(preferred)
(2) Your device can flash ZIP from recovery(ext4 or CWM recovery is preferred)
Workflow:
(1) connect your device to PC, ensure adb works
(2) run the following commands
. build/envsetup.sh
mkdir xblade
cd xblade
adb reboot recovery
../tools/releasetools/ota_target_from_phone -r (this will generate a stockrom.zip, flash this zip in recovery mode to ensure it works)
cp ../honor/makefile .(modify the local-zip-file to stockrom.zip, read the comments in makefile)
make workspace
make firstpatch (this will add the miui code into framework/android.policy/services.jar, resolve any conflict)
make fullota
Now you can get your own miui ROM, enjoy it!