Category Archives: Technical

Articles related to technical issue. Custom ROM, boot loaders etc. Click on the menu to browse articles…

How to flash official lineage ROM for Xiaomi MiA1 tissot

Update 18 July 2018:
The first OTA Over the air ROM rolled out on the Tuesday 17, July. While this was a milestone moment for those who had the Lineage ROM on the Xiaomi Mi A1 there was a major hiccup in the release.
The first problem was the OTA downloads were extremely slow. When it finally made to the user’s phones the update failed.

Screenshot_Updater_20180718-022951

The telegram group for MiA1 was flooded with messages from MiA1 users and the issue is expected to be resolved in the next build. There is a build every Tuesday.

The current work around is as under ;

Please note this option works when coming from the previous week’s signed Lineage official ROM

Step 1: Download the latest ROM the July 17 version from here  
Please note the download may take a long time. On my 10 Mb line it took a couple of hours!!! Once downloaded copy the ROM on to your phone.

Step 2: Reboot to recovery

Please DO NOT WIPE ANYTHING

Step 3 : Flash the latest lineage official ROM, downloaded in Step # 1

Step 4: Reboot to recovery again

Step 5: Flash Mind the Gapps

Step 6: Flash Magisk

Step 7: Reboot

—————–

The official lineage ROM for the Xiaomi MiA1 was released on 10 July 2018. The release was eagerly awaited by thousands across the world. The only problem was that when it rolled in the user were in for a surprise… a slightly unpleasant surprise. The flashing of the ROM required a whole new set of steps and there were problems at each stage. I consider myself as quite an expert at flashing the unofficial ROM‘s..at least on my MiA1 and had even built a ROM for the MiA1  based on code from GitHub. but I had some real problems this time. After a lot of false starts I finally managed to get the official ROM on my phone.Given below are the steps I took. You would need adb and fastboot on your PC to achieve all this. In case you do not have the same please click here and also enable phone developer options.

Step 1:Download and copy the files mentioned below to your phones Downloads folder. Copy the Boot recovery.img file to the adb folder.

Step 2: If coming from a the unofficial Lineage ROM get to the boot loader screen.
Power off phone.
Hold Power + Volume down button.
When the phone vibrates release. You should be in the Boot loader screen.

Step 3: From your PC go to the folder where you have adb and type

fastboot boot boot-recovery.img
Within seconds the recovery image will be loaded on to you phone and you should be in the TWRP screen.

Step 4:  Wipe cache, data and system

5 . Flash Lineage Official

6. Flash TWRP by CosmicDan file TWRP-Installer-3.2.1-with-Tissot-Manager-2.3.zip
This TWRP will install itself on both A and B partitions of your phone.

7. In TWRP Reboot to Recovery

8. Flash Magisk 16.6

9. Flash Mind the gapps

10. Reboot System and wait for the phone to boot up.

Download the files from here.

A Noob’s guide to building a Lineage ROM

As the title mentions, this is a guide by a noob which spells out the steps that build a lineage ROM. What the title does not mention is that this article is aimed at noobs as well. Now lets get down to business.

lineageos-15.1

Disclaimer: Please note that by following the steps as mentioned in this article you can seriously damage your smart phone. There is a good chance your phone would be bricked i.e. effectively be rendered useless and cause a lot of frustration, irritation and make you pull at your hair. If you hit that point later, Please do not look towards me to save you since I am also new to this and like you learning how to traverse this parallel universe of custom ROM development. That being said do not despair. As the saying goes browse and you shall find – Check out the internet and you would find others who have messed up their smartphones and yet somehow lived to tell the tale. In most cases you would be able to revive your phone. Ideally do not use your daily driver for such experimentation.

After reading all this if still want to go ahead then read on.
Objective:
Build a custom lineage ROM for your smart phone. I own a Xiaomi MiA1 and used the same as my target phone. You may have a different model but technically the build steps should be the same for all android phone models.

Requirements:
A linux based or a Mac computer.
Windows computers do not directly support the tools required for this type of development. As such they are not being covered in this article.
The recommended operating system is Ubuntu.

Other requirements:

  • A basic understanding of Linux based OS specifically Ubuntu.
  • Ability to type and use the command line. Write or copy paste commands in the Ubuntu konsole.
  • A basic understanding of programming concepts, read and update XML files, understand error messages.
  • Fast internet access.
  • Steady electricity supply.
  • Lots and lots of patience.

You will understand why the last three requirement are mentioned as you read on

Hardware recommendations – ideally your system should exceed these conditions

  • 64 bit environment
  • 100 GB of free hard disk space
  • 16 GB RAM / swap space.

My hardware configuration:

  • Intel i5 processor
  • 16 GB RAM
  • 1 TB hard disk.
    Please note even with this configuration it takes me about 3 hours to build the code!
    Operating system:
    I used the Ubuntu 18.04 build which is the latest at the time of writing. I will be covering only the Ubuntu OS as part of this article as I do not have a Mac and as such it is out of scope for me!

Steps to build the Custom ROM from scratch
Step 1: Setup Ubuntu
Assuming you have set up the Ubuntu OS if not click this link for a detailed explanation of the installation of Ubuntu.
Step 2: Installation of Java Development Kit
In a console window type or copy past the below commands.
Wait for one line of command to execute before typing or pasting the next

sudo apt-get update
sudo apt-get install openjdk-8-jdk

Please note the sudo command will ask you to enter your password.

Step 3: Installing required packages ( this is a single line not multiple lines)

sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc unzip

Step 4: Configure your smart phone access

These tools will provide you access to the device once you have complete the

build and are ready to flash the Rom.

sudo apt-get install android-tools-adb

sudo apt-get install fastboot

Step 5: Creating your work directories

mkdir -p ~/bin

mkdir -p ~//lineage

Step 6: Installing Repo

The Android source tree is located in a Git repository and is hosted by Google. The Git repository includes metadata for the Android source. Repo is a tool that makes it easier to work with Git .

curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo

Next type below command to make repo executable.

chmod a+x ~/bin/repo

Step 7: Initialize your lineage source

Now change directory and move into the newly created lineage folder.
You can do this either by Opening nautilus and right clicking inside the lineage folder and selected ‘Open Terminal here’ or by typing the below command

cd ~//lineage

Important: Ensure you are in the lineage folder before executing the next set of commands

Step 8: Configure your Git user

You can set these on the GitHub website. Once you have set your GitHub web site

Type \ paste these commands. Replace the text within “ ” with your credentials.

git config –global user.name “Your Name”

git config –global user.email “you@example.com”

Step 9: Initialize the repo

repo init -u https://github.com/LineageOS/android.git -b lineage-15.1

A successful initialization will end with a message stating that Repo is initialized in your working directory. Your client directory should now contain a .repo directory where files such as the manifest will be kept.

Step 8: Download the source code

This is the step where you will realize the importance of having a fast internet connection. The source code size is about 30 – 35 GB. I have a 10 mbps line and at times the download speed shoots up to 20- 25 mbps!!!  Yet it takes me anything from 4 – 10 hours to download the code!
My suggestion is check the time when your local ISP download speeds are at its best. For me it is during the night. I set the download up at night and go to sleep!

The command to type \ paste to get the source code is :

repo sync -c -f –force-sync –no-clone-bundle –no-tags –optimized-fetch –prune

Optional Step 8 a: Take a backup of your source code

I copy the entire folder and keep a copy on an external device. This is just in case there is any need for me to format my hard disk. I do not copy the .Repo and .Cache folders on to my backup. To check hidden folders press Ctrl + H.

Step 9: Get the source code for your specific device.

This is an important part to understand. The code which you downloaded is generic in nature. For your particular device you would need to get files which are specific to your device.
The source for all these files is github. You are targeting three sets of folders – Device, Kernel and vendor. The git clone commands given below are for the tissot or Xiaomi Mia1 phone. Similarly other phones have their locations on GitHub from where you can get files specific to them.

git clone https://github.com/TheScarastic/andr…msm8953-common -b lineage-15.1 device/xiaomi/msm8953

git clone https://github.com/TheScarastic/andr…_xiaomi_tissot -b lineage-15.1 device/xiaomi/tissot

git clone https://github.com/TheScarastic/prop…_vendor_xiaomi -b lineage-15.1 vendor/xiaomi

git clone https://github.com/Tissot-Developmen…_xiaomi_tissot -b 8.1 kernel/xiaomi/msm8953

The format of the command will remain the same for all phones only check the url and the folder names.

Step 10: Modify Caching to speed up the build process.

Type \ paste one command at a time and wait for it to execute before posting the next.

export CCACHE_DIR=./.ccache
ccache -C
export USE_CCACHE=1
export CCACHE_COMPRESS=1
prebuilts/misc/linux-x86/ccache/ccache -M 50G

Step 11: Configure JACK

JACK is the java compiler and can cause crashes – believe me! A simple fix is this command which you type next
export _JACK_VM_ARGS=”-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G”

Step 12: Cleaning up the build folder

make clean

Step 13: Initializing the build

source build/envsetup.sh

Step 14: Starting the build

croot
brunch tissot

Screenshot_Settings_20180705

Now sit back and wait for a few hours. Check the screen, occasionally for what is happening. There will a ton or warnings showing up.Do not worry about the warnings. Read the message displayed on the screen for clues as to what is happening.
The entire build took about 3 hours on my machine with nothing else running. This duration can increase and decrease based on the configuration of your build machine. It can also depend on the files downloaded during the Repo sync process.

Finally you will get the .iso file in a folder labeled out. Check the screen shot above. It shows the build settings screen. Have been using it as on my main driver and so far so good.

Handling Error messages:

There is a very good chance that the build will stop many times. When this happens read the error message and then try googling it. I can guarantee that there would be number of other people across the world who have faced similar issues while building their custom ROM’s. See what solutions have been suggested and try them out. It took me almost a week to get my first build right!
Then in the same day I got 2 builds in a row that were successful! It has a lot with having all the right files in the build environment + a good hardware configuration + lots of luck!

At times the error message which stopped the build could report that a particular file is not found in a particular folder. Do a search in the base lineage folder and see if the file is there in any other folder. Simply copy it to the folder where the build is expecting it. After that run the build commands again and restart the build.

Remember to use your default login. I used su – superuser and ran into trouble while doing a repo with the normal login. So I do not use su for the build and do the entire build and repo sync with my login.  Since i installed the system Ubuntu is satisfied with my credentials.

As I mentioned at the start this is my first shot at building a custom ROM. While there is not exactly much customization being done here as the source code is available on Lineage.com and the files specific to the device were shared by various developers on GitHub. All that I have done is that I downloaded the code and recompiled it on my machine. Having said that there is a sense of pride that you feel when you see your name in the settings tab!!!!

Hope this was a easy to understand guide to help noobs around the world do their own custom ROM development. This article is as I mentioned a guide, you should refer the links given below and get a complete understanding of the process of building ROM’s before you start on your own. So good luck with your custom ROM building!!!

Some important links which you should visit to understand how the experts do it.

Build ROM from source for Tissot 
The Android Source Code
How to build your own custom Android ROM

To download the build click the links below:
Please note that you are downloading and installing the build at your own risk. I will not be responsible for your phone bricking up and also will not be able to support you in case of any issues.

On a personal note I have been using the same build on my daily driver for the last couple of days with no issues. I have GApps installed and am able to use some 46 apps with no issues including Twitter, Whatsapp, Quora, XDA, WordPress among others. The phone camera and fingerprint features are working normally.

Download Links

ROM:
lineage-15.1-20180704-UNOFFICIAL-tissot.zip

TWRP Recovery Installer:
Twrp-recoveryInstaller-3.2.1-2-oreo.zip

GApps Aroma 64bit ( please note all arm64 bit variant work,but i prefer Aroma as it gives me the option to select what I want to install. You can download the latest Gapps from here
open_gapps-arm64-8.1-aroma-20180511.zip

Magisk
Magisk-v16.0.zip

Fix for the camera in case it does not work
Google_Cam_Fix_for_LineageOS_v1.0.zip

The process to flash the build is given here. Please use the same sequence to avoid issues.

What Data Privacy is and why is it important

The purpose of this article is to explain what Data Privacy is and why is it important in layman’s terms. Of late most of us have seen a spurt of emails with the subject line mentioning updates to Data privacy policy. In my case the first one came from Xiaomi – since I own a phone of theirs, then another mail came from Google and now I see even my website hosting provider has issued one!

If you watch the news, you must have seen the videos of Mark Zuckerberg the founder of Facebook appearing before a committee of the US Senate last month. The events that led to this senate hearing occurred a couple of year’s back. It was a U.K based political consulting firm, Cambridge Analytica that triggered this sudden avalanche of interest in Data Privacy. Cambridge Analytica, combined data mining, data brokerage and data analytics to extract information from Facebook users.

The method adopted by Cambridge Analytica was rather simple. Through an application called ‘thisisyourdigitallife’ it asked Facebook users if it could collect their data. About 270,000 users volunteered and gave permission to the application to collect and share their data. Now with this approval and in violation of Facebook’s policies Cambridge Analytica gained access to the friend networks of these 270,000 users. Cambridge Analytica using this application illegally gained data on about 50 million users who were in the friend’s network of these 270,000. Remember that a majority of these 50 million, had not explicitly allowed Cambridge Analytica permission to access their personal data.
The data collected basically related to the user behaviour and browsing patterns. It analysed political leaning of the user and accordingly targeted segments of Facebook users with what it called ‘Strategic Communications’. While many mainstream political scientists question CA’s claims about the effectiveness of its methods of targeting voters the matter was considered serious enough by most governments of the world to suspend its operations in their territories.

By its own admission Cambridge Analytica declared that they were involved in 44 US political races in 2014. In 2015, CA admitted it performed data analysis services for Ted Cruz’s presidential campaign in the US. In 2016, CA claimed to have worked for Donald Trump’s presidential campaign as well as the ‘Leave.EU-campaign’ for the United Kingdom’s referendum on European Union membership. CA’s role in those campaigns has been controversial and is the subject of ongoing criminal investigations in both countries. As the bad press and negative publicity from all these disclosures reverberated across the world, on 1 May 2018, Cambridge Analytica and its parent company filed for insolvency and closed operations.

Now does that mean that all is well and the world is a better place to live in… well actually no. There are still some huge monsters out there and they are not hiding under the bed but still using your data and making money out of it. The worst part of it is that we are willingly providing our approval to these ‘monsters’ to collect and use our personal data.

Most of us own smart phones. Every time we install an application on our phones it innocently asks us permission to access the camera, microphone, contact list, folders etc, etc. We have become so used to these requests that we hardly read them and approve the request. That is when the problem starts.
Google, Amazon, Microsoft and Apple are the giants in the tech world. Today we have reached a stage where we are totally dependent on their application, products and tools. If you do not believe me try this simple test. Try removing or not using google products on your android phone for a day. This would mean not using Gmail, You Tube, Google Maps amongst other applications which you downloaded from Google Play. It would be next to impossible given our dependence on Google and other such companies for most of our mundane internet work. Be it sending or receiving emails, browsing websites, purchasing or selling products online we are puppets in the hands of these massive tech giants.

Now consider this scenario. Assume you want to buy a shoe. You do not have the time to go to the local shoe store, or maybe the design or make you are looking for is not available locally. The first thing you would do is open up your browser and search for the brand of your choice. We would search through Google or check out the options available on Amazon or other similar online retailers. Once you have searched you may or may not decide to purchase the shoe online. Suppose in our scenario you do not go ahead with the online purchase but decide to purchase it locally. As far as you are concerned the matter of the shoe is closed, right? Well the internet and these massive companies do not think so. After this, for a few weeks if you are observant you will notice that as you log on to any web site, you would see advertisements for shoes showing up on the sides of the pages you are browsing. This goes on for a few days. Ever wondered why that happens?

This happens because the information that you had browsed the web, searching for shoes is captured by your browser and passed on by the Googles and Amazon’s of the world. They in turn pass it on to the various web sites which sell these products. IN this way these advertisements customized for your requirements start appearing on to your web browser. If you happen to notice the ad and go ahead and click on it that takes you to the shop where you can buy the shoes. In case you make a purchase then a commission from the sale goes to all these intermediaries who essentially tricked you into buying their product. In essence the internet search engines and business portal make billions out of millions of users like you and me. Now how does that feel? Do you feel cheated or you are ok with being spied upon?

In the above scenario it was a simple shoe now imagine if you happened to browse a porn site or purchased some lingerie online. As a human being you have every right to do that. The problem is that information is also passed on to all the relevant companies who can target you in future. Imagine the case where the same PC or Laptop is shared between multiple people in the same house. How would you like it if your children or grandparent suddenly find their web site plastered by ads for such products? Another slightly dangerous aspect of this breach of data privacy is that organisations where you apply for jobs may want to check you background through your internet searches. The fact that you have in the past browsed such sites will make you un-fit to get jobs.

Then there is another side to this whole story. A lot of website propound extremist ideologies and display information about how to make explosives or propound violence. This browsing information has in the past been used by police organisations to track and arrest operatives from perpetrating acts of violence and mayhem. By tracking onsite browsing data, intelligence organisations have been able to find such criminals before they could put their plans into action. There are specific group who search the web for people who visit child- pornography sites or have such information. Such investigative work has resulted in the arrest across the world. While this is a positive aspect of such data collection it should be remembered that there is a fine line between protection and harassment and too often government agencies tend to overstep their limits and monitor citizens above and beyond what is permissible. Examples are the extreme cases of censorship applied by the Chinese government.
All this bring us to the question as to what is it that we as citizens do to protect ourselves from such blatant violation of our privacy. One way is read carefully the pop-up that come up when you install applications on your cell phones. If you feel that it is too intrusive do not accept it. Find alternative applications and products that respect your privacy and do not intrude into your private life. We will be publishing details of such applications and tools on this web site. Keep reading and stay safe!

Installing a Custom Rom on the Xiaomi MiA1

Update:

Read the warning before Installing a Custom Rom on the Xiaomi MiA1

Warning: Installing or Flashing a Custom ROM voids the warranty of your smart phone. So unless you are sure you want to do this and have a basic idea of ROM and how to flash them on smart phones, there is a good chance you may brick your phone. Please proceed at your own risk.

Now that you have been warned and despite it if you would want to risk your sanity and the sanctity of your smart phone then read on…

Process to install a custom ROM on the Xiomi MiA1 has been updated. The process for a clean flash is as under

  1. Open up ADB on your PC. Steps to start or install ADB on your PC are given here.
  2. Check ADB is detecting your phone. There should be a number followed by devices. If it shows as unknown device or something else please read the instructions given here
  3. Remove phone lock if enabled on your phone- this could be a pattern or fingerprint. Set it to none under Settings >>Security & Privacy >> Screen lock
  4. At the command prompt type
    adb reboot bootloader
  5. This should take your phone into the boot loader mode.
  6. At the command prompt type
    fastboot devices
  7. When you see your device showing up type the following at the command prompt
    fastboot boot boot-recovery.img
  8. Wait for a few seconds your phone screen will display the TWRP main screen
  9. Go to the main menu, and tap Wipe.
  10. Now tap Format Data and continue with the formatting process. This will remove encryption as well as delete all files stored on the internal storage.
  11. Return to the previous menu and tap Advanced Wipe.
  12. Select the System partition to be wiped and then Swipe to Wipe.
  13. Place the LineageOS .zip package, as well as any other .zip packages on the root of /sdcard:
    • Using adb: adb push filename.zip /sdcard/
    • You can use any method you are comfortable with. adb is universal across all devices, and works both in Android and recovery mode, providing USB debugging is enabled.
  14. Go back to return to main menu, then tap Install.
  15. Navigate to /sdcard, and select the LineageOS .zip package.
  16. Follow the on-screen prompts to install the package.
  17. Once the Lineage OS is installed install TWRP immediately.
  18. Reboot to recovery. This will take you to the TWRP recovery. This is an important step for the MiA1 as it has two partitions.
  19. Once you are in the TWRP push the other files using adb push commands to the same /sdcard/ folder
  20. You can push the Magisk, Open Gaps and Camera fix zip files. All the urls for all the files are given on this page.
  21. Install in the following sequence
  22. Magisk
  23. OpenGapps
  24. Reboot system

Wait for the phone to reboot. It will take a few minutes to start.

————————————Previous Article __________________

Files to Download before proceeding

  1. Custom ROM of your choice. I prefer the Lineage 15.1 Unofficial version downloadable from here

Please note this is the site of the XDA forum for MiA1. To read more details on XDA and the other ROM options available please scroll down.

  1. TWRP and recovery
    Download both the recovery image and the TWRP installer. Please check which version you are downloading as both the nougat and the Oreo version are available at the site. The choice will depend on which OS you have on your MiA1 currently. For e.g. if it is the Oreo 8.0 version from Xiaomi that you want to overwrite then download the oreo version of TWRP. Click here to download
  2. Google Platform Tools.

Once you have the files installed on your PC copy the recovery img downloaded in Step # 2 about and place it in this folder. Preferably on C Drive. To understand what exactly happens here read this article.
Google Platform Tools download urls

Windows

Mac

Linux

This is a suite of Google applications that will install the framework as well as google applications on your phone. Unless you plan not to use Google applications or do any downloads from google Play you will need a version of GApps as well.

I would recommend downloading the Aroma variant as it has a graphical interface where you can pick and choose which google applications to. For example, you can un select Gmail and Duo and the rest of the Google Apps will still work!

The other combinations to choose are Arm 64 and 8.1
All Variant under Arm64 and 8.1 work. PICO has the smallest size when it comes to downloads.

Gapps Url : https://opengapps.org/

  1. Magisk .Download the latest version from here
  2. The fix for the camera. The stock camera tends to misbehave on custom ROM’s. Remember Xiaomi also provides its own camera along with the default ROM!

Download the Google_Cam_Fix_for_LineageOS_v1.0 from here.

Steps to install the ROM

  1. Copy all the above files in your download folder.
  2. Enable developer options if not already done. To read how to do it click here.
  3. Remove any Pattern or Fingerprint locks you may have set. You can do this from Settings >> Security & Privacy >> Device Security >> Screen Pattern set it to none. It will ask you for the pattern to confirm. Select None.
  4. Power Off your phone.
  5. Wait for a minute for the phone to completely power down.
  6. Now there are two options. If you are installing the custom ROM and TWRP for the first time, then you have to Press the power button and the Volume Down – button together.

To better explain what that mean – the volume button is a long button right? Now press the lower end of it along with the power button.

You should feel the phone vibrate in about 2-3 seconds. Let go of all the buttons.

  1. The phone will boot into the Fastboot screen. This image of a Chinese army hat wearing bunny should appear on your screen with the words Fastboot written all over.
  2. Connect your phone via the data cable to your PC. Open command prompt (CMD) and browse to the folder where you have the Google Platform Tools copied.
  3. If you have not unlocked your phone, then you would need to read this and perform these steps first
  4. On your PC open up the command prompt and type
    fastboot devices

This would show you an ID and a device. This is your phone showing up in the fastboot mode.

  1. Now type at the command prompt

fastboot boot recovery…img

where recovery.img is the name of the recovery file you have downloaded and copied in to the Google Platform tools folder.

  1. This will install the recovery image on your phone. Wait for 2-3 seconds and you will get a message saying success.
  2. The TWRP screen as visible to the right will show up.
    twrp
  3. Swipe to factory reset
  4. Got to Wipe and clear out Data, dalvik,system
  5. Go to Install
  6. Flash ROM zip
  7. Go to Twrp reboot options and switch to another slot (ex. if you are on slot_a then switch to slot_b)
  8. REMEMBER DO NOT REBOOT AT THIS STAGE. You do not have an operating system on your phone and will end up with a bricked phone if you reboot now.
  9. Flash latest Twrp installer
  10. Reboot into Twrp recovery
  11. Flash latest Magisk
  12. Flash gapps zip (platform ARM64 + Android 8.1 + Variant (all gapps will work))
  13. Flash Camera…zip
  14. Reboot to system

Remember the first time it reboots it will take about 10-15 minutes. So have a cup of tea or at least leave the phone alone. Let the OS do its magic. Once it reboots the phone will ask you for the setup details.

Go ahead use a custom ROM and declare your independence!!!

To download the latest build unofficial Lineage build for the MiA1 click the links below:

Please note that you are downloading and installing the build at your own risk. I will not be responsible for your phone bricking up and also will not be able to support you in case of any issues.

On a personal note I have been using the same build on my daily driver for the last couple of days with no issues. I have GApps installed and am able to use some 46 apps with no issues including Twitter, Whatsapp, Quora, XDA, WordPress among others. The phone camera and fingerprint features are working normally.

Download Links

ROM:
lineage-15.1-20180704-UNOFFICIAL-tissot.zip

TWRP boot image :
Boot recovery image

TWRP Recovery Installer:
Twrp-recoveryInstaller-3.2.1-2-oreo.zip

GApps Aroma 64bit ( please note all arm64 bit variant work,but i prefer Aroma as it gives me the option to select what I want to install. You can download the latest Gapps from here
open_gapps-arm64-8.1-aroma-20180511.zip

Magisk
Magisk-v16.0.zip

Fix for the camera in case it does not work
Google_Cam_Fix_for_LineageOS_v1.0.zip

Some important links:

Why install a custom ROM on a Xiaomi MiA1

Before you figure out how to install a custom ROM on a Xiaomi MiA1 you would want to ask the question why would you want to do that. After all the MiA1 is an Android One phone. Which effectively means it runs stock android. So why waste time and install another custom ROM on the device?
That is a good question. I did it because of the following reasons.

1. It was possible.

2. MiA1 is from the house of Xiaomi so the stock ROM is a bit of a misnomer. The Chinese company does have a few tricks up its sleeve. There are a few Mi proprietary apps that come along with the phone. This includes the Mi Camera, the Mi remote control and the Feedback app. The camera on custom ROM’s has issues. The first thing I do when installing the default Mi ROM is I uninstall the remote and the disable the feedback app.

3. The third and most important reason is that Xiaomi in keeping with the Chinese tradition of spying on its people leaks a lot of your personal information back to the Chinese servers. Don’t believe me then read this circular that was issues by the Xiaomi a couple of days back.  The rules are going to come in practice from My 25, 2018. Users will be asked to accept the privacy policy. Once they do it the following information will be collected ……ensure that you are seated before you read this

According to Xiaomi USA, these are the personal data that it will collect once users accept its the new privacy policy.

* Information provided or uploaded voluntarily (including your contact details): Xiaomi may collect “any and all personal information” provided to them like name, mobile phone number, email address, delivery address, ID card, driver license, passport details, Mi Account details (e.g. security related information, name, birthday, gender), order, invoicing details, materials or data that may sync through Mi Cloud or other apps (e.g. photos, contact lists), information in relation to creating an account and participating in the MIUI Forum or other Xiaomi platforms, phone numbers inserted into contacts or to send a message, feedback, and any other information provided.

* Financial information: Information related to completing purchases. For example, bank account number, account holder name, credit card number etc.

* Social information: Information related to your social activities. For example, current employer, current job title, education background, professional training background etc.

I am sure you would not believe this. To read the full privacy policy, click here

Read Articles on

Why install a custom ROM on a Xiaomi MiA1

OEM unlocking and enabling developer options

Unlocking the bootloader of Xiaomi phones

What are Google Platform Tools?