├── Patchrom Developer Guide.docx ├── README.md └── default.xml /Patchrom Developer Guide.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeWaCode/patchrom/42f467a8e4937d3900cd539e4c47aed86a23aa56/Patchrom Developer Guide.docx -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Patchrom 2 | =========== 3 | 4 | Get Android SDK 5 | ---------------- 6 | 7 | In order to build LeWa patchrom, you should have the [android sdk installed](https://developer.android.com/sdk/installing.html). 8 | 9 | Then add sdk tools and platfrom tools to PATH 10 | 11 | $ vim .bashrc 12 | 13 | export PATH=$PATH:~/android-sdk/tools:~/android-sdk/platform-tools 14 | 15 | Getting Started 16 | --------------- 17 | 18 | To get started with LeWaCode/patchrom, you'll need to get familiar with [Git and Repo](http://source.android.com/source/using-repo.html). 19 | 20 | To initialize your local repository using the LeWa patchrom trees, use a command like this: 21 | 22 | mkdir patchrom 23 | 24 | cd patchrom 25 | 26 | repo init -u git://github.com/LeWaCode/patchrom.git -b jellybean 27 | 28 | Then to sync up: 29 | 30 | repo sync 31 | 32 | Build 33 | -------- 34 | 35 | Assumed current directory is patchrom and you want to build the ROM for Xiaomi m1s 36 | 37 | 38 | . build/envsetup.sh 39 | 40 | cd m1s 41 | 42 | make fullota 43 | 44 | After build completed, there will be a fullota.zip under out directory, now you can flash this file into your device. 45 | 46 | Porting device 47 | ---------------- 48 | 49 | Asssumed current directory is patchrom and you want to port lewa to a new android device maguro 50 | 51 | Prerequiste: 52 | 53 | (1) Your device has root or has a rooted kernel 54 | 55 | (2) Your device has CWM or TWRP recovery 56 | 57 | Workflow: 58 | 59 | (1) Connect your device to PC, ensure adb works 60 | 61 | (2) Run the following commonds in terminal 62 | 63 | . build/envsetup.sh 64 | 65 | mkdir maguro 66 | 67 | cd maguro 68 | 69 | adb reboot recovery 70 | 71 | ../tools/releasetools/ota_target_from_phone -r (this will generate a stockrom.zip, flash this zip in recovery mode to ensure it works) 72 | 73 | cp ../build/makefile . (change the local-zip-files to stockrom.zip, read the comments in makefile) 74 | 75 | make workspace 76 | 77 | make firstpatch (this command will patch the lewa code into framework.jar, services.jar and android.policy.jar, you should resolve the conflict in temp/reject) 78 | 79 | make fullota 80 | Now you get the LEWA ROM that you port for maguro, enjoy it! 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | --------------------------------------------------------------------------------