Creating a Custom ROM for the Honor Note 8
Creating a TWRP flashable Stock ROM
In this post I will provide an overview of how to creating a ROM for the Honor Note 8 using SuperRs Kitchen.
I chose to target the Note 8 as it fits in very well with my requirements - superb hardware centred around a 6.6" QHD AMOLED display and a super fast Kirin 955 chipset, but a poor Stock ROM and a rather limited Custom ROM scene.
Setting up the Kitchen
For this tutorial we will start out with an installation of Ubuntu 16.04 and install SuperRs kitchen on top. As I have already outlined this process in my previous post I will not re-iterate it here. Following the Pre-requisites and Installing the Kitchen sections of that post will provide us with the starting point we need to proceed.
Downloads
We will start the process with the a Stock ROM for the Honor Note 8 - there are few full Stock ROMs available, but I have uploaded what I could find to Androidfilehost:
Honor Note 8 Stock ROMs
In this tutorial I will be using the B027 firmware, although a later firmware would be preferable. I may add to this collection at a later date.
Extracting the image files from UPDATE.APP
Honor ROMs are packaged as an UPDATE.APP file, which contains the .img files for each partition in the device.
The easiest way to extract the raw .img files from the UPDATE.APP file is by using the Huawei Update Extractor tool, written by worstenbrood:
Huawei Update Extractor
Note that this is a Windows tool, so this must be run inside this OS.
Open the UPDATE.APP file with the tool (using the default Unknown profile) and extract the BOOT.img and SYSTEM.img file via the right mouse button menu.
It should be noted that SuperRs Kitchen does not recognise image files with capitals, so rename:
BOOT.img -> boot.img
SYSTEM.img -> system.img
In the Kitchen, Create a new project.
I called mine:
Honor_Note_8_GoogleIntegration_V1
Copy the boot.img and system.img files into the relevant directory:
android/superrs-kitchen/superr_Honor_Note_8_GoogleIntegration_V1
Extract the image to create our workspace:
4) Extract for new ROM
y
<enter super user password when prompted>
Honor_Note_8_GoogleIntegration_V1
1) Detect by-name from boot/recovery images (recommended)
1) set_metadata (For KitKat+)
Removing Verified Boot
Like most OEM ROMs, the boot.img is secure and will not boot if the system image has been modified. We need to remove security from the boot image if we want our firmware to boot.
In the Kitchen:
7) Boot/Recovery Tools
1) Unpack boot.img
<enter super user password when prompted>
4) Insecure/Secure the boot.img (CURRENT: Secure)
5) Remove dm-verity (CURRENT: Enabled)
1) Pack boot.img (delete ramdisk work directory)
m = Main Menu
Changing the Asserts
TWRP can prevent the wrong firmware from being flashed onto a device by checking the name of the device before the flashing process starts.
With the Note 8, SuperRs script picks up "hwedison" as the name of the device. Various versions of TWRP for the Note 8 I have tried call it different names (e.g EDISON, KSet), so it is best to remove the check.
To prevent the flash from failing we need to change the hardware name manually.
In the Kitchen:
8) ROM Tools Menu
4) Asserts Menu
1) Add/Remove Device (CURRENT: hwedison)
Delete hwedison
m = Main Menu
Customising the ROM
At this point we have a purely stock TWRP flashable ROM. At this stage we can perform a test build to make sure everything is OK - if you wish to do this, see the Building the ROM section later in the post.
There are a number of apps that we will ideally need to remove and add in order to make something a little more usable in the West.
In the superr_Honor_Note_8_GoogleIntegration_V1 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.
Move the following apps from the "system" folder to the equivalent folder in "system removed":
app
BaiduInput_for_Huawei - Keyboard
Calculator - Huawei calculator (to be replaced)
ChnTelecomAutoReg - China Telecom registration
HwCryptoMessageService - SMS /MMS Service
HwLauncher6 - Huawei Launcher
HwPowerGenieEngine3 - Removed to prevent unwanted app closure
HwVAssistant - Hi Voice Chinese voice control
HwYellowPage - Chinese Yellow Pages in the dialler
LatinIME - Stock Latin keyboard
SkyTone - Unwanted Skytone app
talkback - Google Talkback (to be updated)
WebViewGoogle - Google Web View (to be updated)
delapp
Amap - Chinese Mapping
HiSkyTone - Second half of unwanted SkyTone app
priv-app
Browser_tms - Default web browser (to be replaced)
Calendar - Huawei calendar (to be replaced)
Email - Stock Email app (to be replaced)
GmsCore - Core Google Services (to be updated)
GoogleLoginService - Core Google Services (to be updated)
GoogleServicesFramework - Core Google Services (to be updated)
HiSpace - Hi Space app
HwMwLauncher - Huawei Launcher
HwNotePad - Huawei Notepad (to be replaced)
HwPhoneService - Hi Care app
HwSystemManager - Phone Manager (prevent unwanted app restrictions)
Mms - SMS / MMS app (to be replaced)
Re-adding the Google Core appsBrowser_tms - Default web browser (to be replaced)
Calendar - Huawei calendar (to be replaced)
Email - Stock Email app (to be replaced)
GmsCore - Core Google Services (to be updated)
GoogleLoginService - Core Google Services (to be updated)
GoogleServicesFramework - Core Google Services (to be updated)
HiSpace - Hi Space app
HwMwLauncher - Huawei Launcher
HwNotePad - Huawei Notepad (to be replaced)
HwPhoneService - Hi Care app
HwSystemManager - Phone Manager (prevent unwanted app restrictions)
Mms - SMS / MMS app (to be replaced)
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_superr_Honor_Note_8_GoogleIntegration_V1/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 default DPI for the Note 8.
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
vending-all.tar.lz
Adding other Google Apps
From the GApps window, extract the following into system added:
calendargoogle-all.tar.lz
calsync-all.tar.lz
chrome-arm.tar.lz
gmail-all.tar.lz
googlenow-all.tar.lz
keep-arm64.tar.lz
keyboardgoogle-arm64.tar.lz
maps-arm64.tar.lz
messenger-arm64.tar.lz
search-arm64.tar.lz
talkback-all.tar.lz
webviewgoogle-arm64.tar.lz
Note that I would normally include YouTube and Google Photos in my set of core apps, but this appears to cause issues during flashing - at least with the version of TWRP I am currently using.
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.
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 the resultant Honor_Note_8_GoogleIntegration_V1.zip file onto the device. Wipe and flash with TWRP.
download file now