Starting with Desire Z for more than two years, the flagship machine of the year is now increasingly difficult to run large apps, so use it as a testing machine. I downloaded the cyanogenmod source code online, compiled the code, and brushed the Desire Z.
On the CM official website, there is a tutorial on compiling cm brush HTC Desire Z, but I simply follow the tutorial and need to execute it at the beginning. /extract-files.sh to extract the property file in the mobile phone, cm_dz_src/device/HTC/directory Regan did not find vision, and later refer to a blog on the internet, I downloaded
Vision package and for Vision proprietary package are compiled successfully.
1. Build an android Source Code compiling environment.
I will not repeat it here.
2. Download The cm7 source code. You can refer to the official tutorial of cm at the beginning.
Create the directories
You will need to set up some directories in your build environment.
To create them:
$ mkdir -p ~/bin$ mkdir -p ~/CM_DZ_SRC
Install
repo
Command
Enter the following to download the "Repo" binary and make it executable (runnable ):
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo$ chmod a+x ~/bin/repo
Put
~/bin
Directory in your path of execution
Make sure that~/bin
Directory you just created is in your path
Of execution so that you can easily runrepo
Command even when you're not in~/bin
.
Assuming you are using the bash shell, the default in recent versions of ubuntu, you can set it like this:
$ export PATH=${PATH}:~/bin
Initialize the cyanogenmod source Repository
Enter the following to initialize the Repository:
$ cd ~/CM_DZ_SRC$ repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
Download the source code
To start the download of all the source code to your computer:
$ repo sync
3. After the CM source code is downloaded, you do not need to follow the official tutorial to directly connect your phone to your computer and extract the property files from your phone.
Enable USB debugging on the mobile phone. After the connection, if ADB devices can be found normally, go to the cm_dz_src/device/HTC/vision/directory,
PS: If cm_dz_src/device/HTC/does not have a corresponding mobile phone model, go to GitHub and download a package for the mobile phone model of for cm, my vision directory does not exist at the beginning, that is, it was downloaded on GitHub. Copy it to cm_dz_src/device/HTC/and change the name.
In cm_dz_src/device/HTC/vision/, run the extract-files.sh to extract the property file of the phone.
If some files cannot be found during file extraction, Google is still requested. If the keyword is proprietary_vendor_htc, some proprietary files on GitHub will be downloaded. After selecting the correct branch, download the missing file and place it in the cm_dz_src/vendor/HTC/vision/proprietary/directory.
4. Download the ROM manager.
Get prebuilt Rom Manager
Next,
$ cd /home/ritter/work/CM_DZ_SRC/vendor/cyanogen
Then enter:
$ ./get-rommanager
5. You can finally compile it.
Start the build
Time to start building! So now type:
$ source build/envsetup.sh$ brunch vision
6. The cm-7-20130603-unofficial-vision.zip file is compiled in the cm_dz_src/out/target/product/vision/directory ,:
7. Conclusion:
The key is that the corresponding mobile phone model cannot be found in the source code downloaded from the official website, and the mobile phone attribute files may be missing when being extracted. They are all found on GitHub and manually added to the file. Finally, the compilation is successful.