I would like to create a local server for Android branch android-4.3_r1.1 I follow this thread: Cloning Android sources to a local repository server
But I couldn\'t
The repo init --mirror -u $URL/platform/manifest
method is sane, but you'll only sync the gits listed in the manifest in question (the master branch, in this example). So, while all gits that are synced will contain all branches and tags needed, the manifest itself doesn't include all gits so subsequent attempts to initialize workspaces based on the created mirror will fail if the manifest branch you've chosen to sync points to gits not included in the master branch's manifest.
The AOSP team has set up special manifest, mirror/manifest, that isn't useful for building anything but lists all gits from all branches and therefore is highly useful for mirroring. In other words, initialize your mirror like this:
repo init --mirror -u https://android.googlesource.com/mirror/manifest
See the AOSP Downloading the Source documentation.