Special boot modes

Recovery: Volume DownPower‘Bootloader: Plug into lớn PCVolume UP

Source code

Devicehttp://www.github.com/cyanogenmod/android_device_lge_ls990
Kernel http://www.github.com/cyanogenmod/android_kernel_lge_g3

G3 (Sprint) Specifications Codename: Vendor: Manufacturer: Release date: Type: Platform: CPU: GPU: RAM: Weight: Dimensions: Screen size: Resolution: Screen density: Screen type: Internal storage: SD Card: Bluetooth: Wi-Fi: Main camera: Secondary camera: Power: CM supported:
*
ls990
LG
lge
năm trước May 28
phone
Qualcomm MSM8975AC Snapdragon 801
2.5 GHz quad-core Krait 400
Adreno 330
3GB
149 g (5.26 oz)
146.3 milimet (5.76 in) (h)74.6 milimet (2.94 in) (w)8.9 milimet (0.35 in) (d)
139.7 milimet (5.5 in)
2560×1440
538 ppi
True HD-IPS LCD
16GB/32GB
up to 128 GB
4.0
802.11 a/b/g/n/ac
13MP, flash: Dual flash
2.1MP
removeable Li-Ion 3000 mAh battery
12.1, 13

Note: DISCLAIMER

Modifying or replacing your device’s software may void your device’s warranty, lead to data loss, hair loss, financial loss, privacy loss, security breaches, or other damage, và therefore must be done entirely at your own risk. No one affiliated with the CyanogenMod project is responsible for your actions. Good luck.

You watching:


Installing CyanogenMod from recovery

Place the CyanogenMod .zip package, as well as any optional .zip packages, on the root of /sdcard:Note: You can copy the .zip packages to your device using any method you are familiar with. The adb method is used here because it is universal across all devices and works in both Android and recovery mode. If you are in recovery mode, you may need lớn ensure /sdthẻ (sometimes called Internal Storage) is mounted by checking its status in the Mounts thực đơn. If you have sầu booted regularly, USB debugging must be enabled.If you are not already in recovery, boot to lớn recovery mode now.Volume Down & PowerIn Team Win Recovery Project, select menu choices by tapping on the appropriately labelled button.Optional (Recommended): Select the Backup button lớn create a backup.Select Wipe & then Factory Reset.Select Install.Navigate lớn /sdcard & select the CyanogenMod .zip package.Follow the on-screen notices to install the package.Optional: Install any additional packages you wish using the same method (if you are installing multiple packages, install CyanogenMod first và then install any subsequent packages on top of it).Once installation has finished, return khổng lồ the main thực đơn & select Reboot, then System. The device will now boot inkhổng lồ CyanogenMod.
1 Introduction2 Build CyanogenMod and CyanogenMod Recovery2.1 Prepare the Build Environment3 Install the build

Introduction

These instructions will hopefully assist you khổng lồ start with a stoông xã G3 (Sprint), unlochồng the bootloader (if necessary), & then download the required tools as well as the very lachạy thử source code for CyanogenMod (based on Google’s Android operating system). Using these, you can build both CyanogenMod & CyanogenMod Recovery image from source code, and then install them both to lớn your device.

It is difficult lớn say how much experience is necessary khổng lồ follow these instructions. While this guide is certainly not for the very very very uninitiated, these steps shouldn’t require a PhD in software development either. Some readers will have sầu no difficulty và breeze through the steps easily. Others may struggle over the most basic operation. Because people’s experiences, backgrounds, và intuitions differ, it may be a good idea khổng lồ read through just to ascertain whether you feel comfortable or are getting over your head.

Remember, you assume all risk of trying this, but you will reap the rewards! It’s pretty satisfying to lớn boot into a fresh operating system you baked at home :) And once you’re an Android-building ninja, there will be no more need lớn wait for “nightly” builds from anyone. You will have at your fingertips the skills lớn build a full operating system from code lớn a running device, whenever you want. Where you go from there– maybe you’ll add a feature, fix a bug, add a translation, or use what you’ve learned to lớn build a new phầm mềm or port lớn a new device– or maybe you’ll never build again– it’s all really up to you.

What you’ll need

A relatively recent computer (Linux, OS X, or Windows) with a reasonable amount of RAM & about 100 GB of không tính tiền storage (more if you enable ccađậy or build for multiple devices). The less RAM you have, the longer the build will take (ayên for 8 GB or more). Using SSDs results in considerably faster build times than traditional hard drives. A USB cable compatible with the G3 (Sprint) (typically micro USB, but older devices may use mini USB or have sầu a proprietary cable) A decent internet connection & reliable electricity :)

If you are not accustomed khổng lồ using Linux– this is an excellent chance to learn. It’s free– just download và run a virtual machine (VM) such as Virtualbox, then install a Linux distribution such as Ubuntu (AOSPhường vets Ubuntu as well). Any recent 64-bit version should work great, but the lachạy thử is recommended.


Note:

You want lớn use a 64-bit version of Linux. A 32-bit Linux environment will only work if you are building CyanogenMod 6 và older. For CyanogenMod 10.1, if you encounter issues with 64bit host binaries, you can set BUILD_HOST_32bit=1 in your environment. This is generally not needed, though, especially with CyanogenMod 10.2 & newer.


Using a VM allows Linux to run as a guest inside your host computer– a computer in a computer, if you will. If you hate Linux for whatever reason, you can always just uninstall and delete the whole thing. (There are plenty of places khổng lồ find instructions for setting up Virtualbox with Ubuntu, so I’ll leave sầu it to you to lớn vì that.)

So let’s begin!

Build CyanogenMod và CyanogenMod Recovery

Prepare the Build Environment


Note:

You only need to lớn vì these steps the first time you build. If you previously prepared your build environment và have sầu downloaded the CyanogenMod source code for another device, skip to Prepare the device-specific code.


Install the SDKIf you have sầu not previously installed adb and fastboot, install the Android SDK. “SDK” stands for Software Developer Kit, & it includes useful tools that you can use to flash software, look at the system logs in real time, grab screenshots, & more– all from your computer.

Helpful Tip

While the SDK contains lots of different things– the two tools you are most interested in for building Android are adb & fastboot, located in the /platform-tools directory.


Install the Build Packages

Several “build packages” are needed khổng lồ build CyanogenMod. You can install these using the package manager of your choice.


Helpful Tip

A package manager in Linux is a system used to install or remove software (usually originating from the Internet) on your computer. With Ubuntu, you can use the Ubuntu Software Center. Even better, you may also use the apt-get install command directly in the Terminal. (Learn more about the apt packaging tool system from Wikipedia.)


For both 32-bit và 64-bit systems, you’ll need:

bc bison build-essential curl flex git gnupg gperf libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk2.8-dev libxml2 libxml2-utils lzop maven openjdk-7-jdk pngcrush schedtool squashfs-tools xsltproc zip zlib1g-devIn addition khổng lồ the above sầu, for 64-bit systems, get these:

g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-devFor Ubuntu 15.10 (wily) & newer, substitute:

lib32readline-gplv2-dev → lib32readline6-dev

For Ubuntu 16.04 (xenial) and newer, substitute (additionally see java notes below):

libwxgtk2.8-dev → libwxgtk3.0-dev openjdk-7-jdk → openjdk-8-jdk

Java versions: Different versions of CyanogenMod require different versions of the JDK (Java Development Kit):

CyanogenMod 7 – 9: Sun/Oracle Java SE 1.6 CyanogenMod 10.1: Sun/Oracle Java SE 1.6 or 1.7 CyanogenMod 10.2 – 11.0: Sun/Oracle Java SE 1.6 or 1.7 (OpenJDK 1.7 works fine, but the build system will display a warning) CyanogenMod 12.0 – 13.0: OpenJDK 1.7 (see note about OpenJDK 1.8 below) CyanogenMod 14.1: OpenJDK 1.8

Ubuntu 16.04 (Xenial Xerus) or newer và OpenJDK: Since OpenJDK 1.7 was removed from the official Ubuntu repositories, you have sầu a couple options:

Enable experimental OpenJDK 1.8 support in CyanogenMod 13.0 (not available in earlier version). To enable OpenJDK 1.8 tư vấn, add this line to your $HOME/.bashrc file: export EXPERIMENTAL_USE_JAVA8=true.

Also see http://source.game android.com/source/initializing.html which lists needed packages.

Create the directories

You will need khổng lồ mix up some directories in your build environment.

To create them:

$ mkdir -p ~/bin$ mkdir -p ~/android/system

Install the repo command

Enter the following to tải về the “repo” binary và make it executable (runnable):

$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo$ chmod a+x ~/bin/repo

Put the ~/bin directory in your path of execution

In recent versions of Ubuntu, ~/bin should already be in your PATH. You can check this by opening ~/.protệp tin with a text editor và verifying the following code exists (add it if it is missing):

# set PATH so it includes user's private bin if it existsif < -d "$HOME/bin" > ; then PATH="$HOME/bin:$PATH"fi

Initialize the CyanogenMod source repository

Enter the following to initialize the repository:

Note: Make sure the cm branch entered here is the one you wish to build & is supported on your device.

$ cd ~/android/system/$ repo init -u https://github.com/CyanogenMod/game android.git -b cm-13.0

Download the source code

To start the tải về of all the source code lớn your computer:

$ repo syncThe CM manifests include a sensible default configuration for repo, which we strongly suggest you use (i.e. don’t add any options lớn sync). For reference, our default values are -j 4 & -c. The -j 4 part means that there will be four simultaneous threads/connections. If you experience problems syncing, you can lower this to lớn -j 3 or -j 2. -c will ask repo lớn pull in only the current branch, instead of the entire CM history.

Prepare lớn wait a long time while the source code downloads.


Helpful Tip

The repo sync command is used khổng lồ update the lakiểm tra source code from CyanogenMod và Google. Remember it, as you can vày it every few days to keep your code base fresh & up-to-date.


Get prebuilt apps (CM11 và below)

Next,

$ cd ~/android/system/vendor/cmthen enter:

$ ./get-prebuiltsYou won’t see any confirmation- just another prompt. But this should cause some prebuilt apps to be loaded và installed into the source code. Once completed, this does not need to lớn be done again.

See more: Multiplayer Game Hacking And Cheat Codes, Multiplayer Game Hacking And Cheats

Prepare the device-specific code


Helpful Tip – Errors during breakfast

Different maintainers thiết lập their device inheritance rules differently. Some require a vendor directory khổng lồ be populated before breakfast will even succeed. If you receive an error here about vendor makefiles, then jump down to lớn the next section Extract proprietary blobs. The first portion of breakfast should have succeeded at pulling in the device tree & the extract blobs script should be available. After completing that section, you can rerun breakfast ls990


After the source downloads, ensure you are in the root of the source code (cd ~/android/system), then type:

$ source build/envsetup.sh$ breakfast ls990This will tải về the device specific configuration và kernel source for your device. An alternative to lớn using the breakfast command is lớn build your own local manifest. To vày this, you will need to locate your device on CyanogenMod’s GitHub and danh mục all of the repositories defined in cm.dependencies in your local manifest.


Helpful Tip

If you want to know more about what source build/envsetup.sh does or simply want to know more about the breakfast, brunch và lunch commands, you can head over lớn the Envthiết lập help page.


Helpful Tip

Instead of typing cd ~/android/system every time you want to return baông chồng to lớn the root of the source code, here’s a short command that will do it for you: croot. To use this commvà, you must first run source build/envthiết lập.sh from ~/android/system.


Extract proprietary blobs

Now ensure that your G3 (Sprint) is connected to lớn your computer via the USB cable và that you are in the ~/android/system/device/lge/ls990 directory (you can cd ~/android/system/device/lge/ls990 if necessary). Then run the extract-files.sh script:

$ ./extract-files.shYou should see the proprietary files (aka “blobs”) get pulled from the device và moved khổng lồ the ~/android/system/vendor/lge directory. If you see errors about adb being unable to pull the files, adb may not be in the path of execution. If this is the case, see the adb page for suggestions for dealing with “command not found” errors.


Note:

Your device should already be running a build of CyanogenMod for the branch you wish to build for the extract-files.sh script to function properly.


Note:

It’s important that these proprietary files are extracted to the ~/android/system/vendor/lge directory by using the extract-files.sh script. Makefiles are generated at the same time khổng lồ make sure the blobs are eventually copied to the device. Without these blobs, CyanogenMod may build without error, but you’ll be missing important functionality, such as graphics libraries that enable you lớn see anything!


Turn on caching to lớn speed up build

You can tốc độ up subsequent builds by adding

export USE_CCACHE=1lớn your ~/.bashrc tệp tin (what’s a .bashrc file?). Then, specify the amount of disk space khổng lồ dedicate khổng lồ ccabít by typing this from the top of your Android tree:

prebuilts/misc/linux-x86/ccache/ccabịt -M 50Gwhere 50G corresponds to 50GB of cađậy. This only needs lớn be run once và the setting will be remembered. Anywhere in the range of 25GB lớn 100GB will result in very noticeably increased build speeds (for instance, a typical 1hr build time can be reduced to 20min). If you’re only building for one device, 25GB-50GB is fine. If you plan lớn build for several devices that bởi not cốt truyện the same kernel source, ayên ổn for 75GB-100GB. This space will be permanently occupied on your drive, so take this inlớn consideration. See more information about ccache on Google’s android build environment initialization page.


Helpful Tip

If you are a very active sầu developer, working on many other projects than just Android, you might prefer lớn keep your Android ccabít independent (because it’s huge and can slow down the efficiency of ccache in your other projects). Beginning with CyanogenMod 12.1, you can specify environment variables for the location và kích thước of CyanogenMod’s ccache. Some syntax examples: export ANDROID_CCACHE_DIR="$HOME/android/.ccache" and export ANDROID_CCACHE_SIZE="50G".


Helpful Tip

If the build doesn’t start, try lunch & choose your device from the thực đơn. If that doesn’t work, try breakfast và choose from the menu. The command make ls990 should then work.


Helpful Tip

A second, bonus tip! If you get a comm& not found error for croot, brunch, or lunch, be sure you’ve sầu done the source build/envcài đặt.sh commvà in this Terminal session from the ~/android/system directory.


Helpful Tip

A third tip! If the build to lớn fails while downloading Gello, you’ll need lớn import a missing certificate inkhổng lồ Maven’s truststore. Detailed instructions on how to lớn vì chưng that can be found here


If the build breaks…

If you experience this not-enough-memory-related error…

ERROR: signandroid.jar failed: return code 1make: *** Error 1…you may want to make the following change to ~/android/system/build/tools/releasetools/comtháng.py:

Search for instances of -Xmx2048m (it should appear either under OPTIONS.java_args or near usage of signandroid.jar), and replace it with -Xmx1024m or -Xmx512m.

Then start the build again (with brunch).

If you see a message about things suddenly being “killed” for no reason, your (virtual) machine may have run out of memory or storage space. Assign it more resources & try again.

Install the build

Assuming the build completed without error (it will be obvious when it finishes), type:

$ cd $OUTin the same terminal window that you did the build. Here you’ll find all the files that were created. The stuff that will go in /system is in a folder called system. The stuff that will become your ramdisk is in a folder called root. And your kernel is called… kernel.

But that’s all just background info. The two files we are interested in are (1) recovery.img, which contains CyanogenMod Recovery, và (2) cm-13.0-20161224-UNOFFICIAL-ls990.zip, which is the CyanogenMod installation package.

Install CyanogenMod

Bachồng lớn the $OUT directory on your computer– you should see a tệp tin that looks something like:

cm-13.0-20161224-UNOFFICIAL-ls990.zip
Note:

The above sầu tệp tin name may vary depending on the version of CM you are building. Your build may not include a version number or may identify itself as a “KANG” rather than UNOFFICIAL version. Regardless, the file name will end in .zip & should be titled similarly lớn official builds.


Now you can flash the centimet...zip file above sầu as usual via recovery mode. Before doing so, now is a good time lớn make a backup of whatever installation is currently running on the device in case something goes wrong with the flash attempt. While CyanogenMod Recovery doesn’t have a backup feature, there are other custom recoveries available that bởi vì. You can also use something like Titanium Backup (root required) as an alternative sầu.

Success! So….what’s next?

You’ve sầu done it! Welcome lớn the elite club of self-builders. You’ve sầu built your operating system from scratch, from the ground up. You are the master/miáp lực of your domain… and hopefully you’ve sầu learned a bit on the way & had some fun too.

Now that you’ve succeeded in building CyanogenMod for your device, here are some suggestions on what lớn vì next.

Also, be sure lớn take a glance at the Dev Center on this wiki for all kinds of more detailed information about developer topics ranging from collecting logs, understanding what’s in the source code directories, submitting your own contributions, porting CyanogenMod to lớn new devices, và a lot more.

See more: Cách Cài The Sims 4 Việt Hóa Full Cho Máy Tính, Hướng Dẫn Tải Và Cài Đặt The Sims 4 Full Dlc 2018

Congrats again!

Content of this page is based on informations from wiki.cyanogenthủ thuật.org, under CC BY-SA 3.0 licence.


Chuyên mục: Chia sẻ