Creating a Custom ROM for the LeEco Le 2 Pro X620 Part 2

Creating a Custom ROM for the LeEco Le 2 Pro X620 Part 2


Customising our ROM

In the previous instalment of this series, I showed how to take the stock LeEco ROM and modify it so it could be flashed with TWRP. This involved changing the update-binary and disabling verified boot.

In this part we will see how we can remove unwanted apps and add in our own apps, including the Google Play store.

Initial Setup

Follow the previous post to the end of the "Setting up a Project" section, replacing the name of our ROM with Le2X620Custom018S.

We will leave our original Le2X620Stock018S installation alone, so we can always revert to it should we get into trouble!

In the superr_Le2X620Custom018S directory, add the following folders:

system removed
system added

We will use these folders to keep a track of what we have removed and what we will be adding.

Downloads

We will download the latest Google Apps from opengapps.org:

http://opengapps.org/

Chose:
Platform: ARM64
Android 6.0
Variant: Stock

Move the download into a temporary folder (I use android/GApps) and unzip the file. Later in the process we will extract some Google applications from this folder.

Removing unwanted apps

Move the following apps from the "system" folder to the equivalent folder in "system removed":

app

Keyboards

BaiduInput
LatinIME
SogouInput

LeEco apps

Browser
Calculator
Calendar
HomeTime
legamecenter
leSport
LetvShop
LetvStore
Music
superlive
tqtLeTv

Google apps (to update)

GoogleContactsSyncAdapter

priv-app

The LeEco Launcher (to be replaced by Google Now)

Launcher3

Additional LeEco apps

LetvUserManual
LetvVideoLeading

Stk1

Google apps (to update)

GmsCore
GoogleLoginService
GoogleServicesFramework

vendor/operator/app

Extra Chinese apps

Baidu_location
BaiduMap
LeMi
WPS

Re-adding the Google Core apps

Adding back the Google Core files we removed earlier will ensure that all the Google Services are up to date and correctly integrated.

Open the GApps folder in a file browser window and navigate into the extracted open_gapps-xxx/Core folder.

Open a second file browser window into superrr_Le2X620Custom018S/system added

The .tar.lz files in the first (Core) Window are largely one of the following formats:

<name of zip>/nodpi/<destination folder>/<app name/subfolder>
<name of zip>/<destination folder>

Some folders have nodpi along with other specified dpi values, e.g. 480 or 240-320-480. Chose nodpi in preference, otherwise whichever is available, giving preference to 480, which is the correct DPI for a 1080p display.

For each of the following zipped file, we need to Drag and drop <destination folder> from the .tar.lz into the second (system added) Window

gmscore-arm64.tar.lz
googlecontactssync-all.tar
gsfcore-all.tar.lz
gsflogin-all.tar.lz

Adding the Play Store

Inside the folder superrr_Le2X620Custom018S, we need to create the following folder structure:

system added/vendor/operator/app

In the GApps window, extract the Play Store PhoneSky folder directly into app:

vending-all.tar.lz

This should create the following, which is the Play Store:

system added/vendor/operator/app/Phonesky/Phonesky.apk

NOTE: It is important to extract the Play Store into this "system/vendor/operator/app" location rather than the standard "system/app". The Play Store will not function if placed into the system/app folder.

Adding other Google Apps

From the GApps window, extract the following into system added:

calculatorgoogle-all.tar.lz
calendargoogle-all.tar.lz
calsync-all.tar.lz
chrome-arm.tar.lz
gmail-all.tar.lz
googlenow-all.tar.lz
keyboardgoogle-arm64.tar.lz
maps-arm64.tar.lz
music-all.tar.lz

photos-arm64.tar.lz
search-arm64.tar.lz
youtube-arm64.tar.lz

Integrating the apps into system

Now we have a system added folder full of the applications we wish to add, we will integrate them into the main system folder.

Copy the contents of system added into system.

Building the ROM

Now we have all the relevant files in place, it is time to build our ROM.

In the Kitchen, select:

8) ROM Tools Menu
7) Build Menu
1) Build full ROM Zip
n (sign the zip)
<enter>
q

Once complete, your ROM is ready.

Installing the ROM

Copy Le2X620Custom18S.zip from the superr_Le2X620Custom18S directory onto the device. Wipe and flash with TWRP.

Pre-made ROM image

I have uploaded the ROMs created during this tutorial to Androidfilehost, in case you have an Le 2 X620 and just want to try out the ROM rather than make it yourself:

Mikes LeEco X620 ROMs

download file now