[
  {
    "path": "README",
    "content": "Patchrom\n===========\n\nGet Android SDK\n----------------\n\nIn order to build patchrom project, you must have android sdk installed.(http://developer.android.com/sdk/installing.html)\n\nAnd add the sdk tools and platform-tools to PATH.\n\nvim .bashrc\n\nexport PATH=$PATH:/home/xxx/android-sdk/tools:/home/xxx/anroid-sdk/platform-tools\n\nGetting Started\n---------------\n\nTo get started with MiCode/patchrom, you'll need to get\nfamiliar with [Git and Repo](http://source.android.com/download/using-repo).\n\nTo initialize your local repository using the patchrom trees, use a command like this:\n\n    mkdir patchrom\n\n    cd patchrom\n\n    repo init -u git://github.com/MiCode/patchrom.git -b marshmallow\n\nThen to sync up:\n\n    repo sync\n\nBuild\n--------\n\nAssumed current directory is patchtom and you want to build the ROM for Nexus6P\n\n\n     . build/envsetup.sh\n     cd angler\n     make fullota\n\nAfter build completed, there will be a fullota.zip under out directory, now you can flash this file into your device.\n\n\nPorting new device\n------------------\n\nAsssumed current directory is patchrom and you want to port miui to a new android device xblade\n\nPrerequiste:\n(1) Your device has root privilege or a rooted kernel(preferred)\n\n(2) Your device can flash ZIP from recovery(twrp recovery is preferred)\n\nWorkflow:\n\n(1) connect your device to PC, ensure adb works\n\n(2) run the following commands\n\n     . build/envsetup.sh\n\n     mkdir xblade\n\n     cd xblade\n      \n     adb reboot recovery\n\n     ../tools/releasetools/ota_target_from_phone -r (this will generate a stockrom.zip, flash this zip in recovery mode to ensure it works)\n\n     cp ../honor/makefile .(modify the local-zip-file to stockrom.zip, read the comments in makefile)\n\n     make workspace\n\n     make firstpatch (this will add the miui code into framework/android.policy/services.jar, resolve any conflict)\n\n     make fullota\n\nNow you can get your own miui ROM, enjoy it!\n\n"
  },
  {
    "path": "default.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<manifest>\n\n  <remote name=\"github\"\n           fetch=\"..\" />\n\n  <default revision=\"refs/heads/marshmallow\"\n           remote=\"github\"\n           sync-c=\"true\"\n           sync-j=\"4\" />\n\n  <project path=\"build\" name=\"MiCode/patchrom_build\">\n    <copyfile src=\"makefile\" dest=\"Makefile\" />\n  </project>\n  <project path=\"manifest\" name=\"MiCode/patchrom\" />\n  <project path=\"android\" name=\"MiCode/patchrom_android\" />\n  <project path=\"miui\" name=\"MiCode/patchrom_miui\" />\n  <project path=\"tools\" name=\"MiCode/patchrom_tools\" />\n  <project path=\"angler\" name=\"MiCode/patchrom_angler\" />\n</manifest>\n"
  }
]