Tag Archives: android smart phone

/e/ : A user Data Privacy respecting operating system

A lot has been written and discussed in the media about the unwelcome intrusion by big business houses into our private lives. Details about the Facebook data sharing scandal with Cambridge Analytic or leaks about the way Google has been ‘Googling’ our personal information and sharing it with its business partners are on news channels everywhere. If you have ever browsed to purchase a product on the internet, then you would have observed subtle hints of this intrusion in action. For days after you would be seeing advertisements from companies selling products similar to the one you were browsing. This happens when your browsing behavior is captured and shared with business houses. These business houses now attempt to coax you into buying their products which are of a similar kind. Welcome to the world of zero data privacy!

To understand the situation better, have a look at your smart phone and the applications you use on a daily basis. On android phones, almost every second application is in some way connected to Google. Gmail, Google maps, Google Assistant, Google Drive the list is endless. When you install these apps they ask you for your permission to access your contacts, your text messages, files, folders, images etc. While on the face these requests may look harmless, take some time and think about the issue seriously. What if the product or service you had browsed was of a personal nature? That information in the hands of a stranger could be dangerous for you in the long run. This pilfering of your personal data is happening through your smartphones and computers every single day, every minute. Google, Microsoft, Apple, Amazon everyone has a finger in this pie. What is even worse is that they are making billions out of your personal information! So now that I have scared you enough you might be wondering if there is a way out of this mess? Do not worry help is just round the corner.

gael-with-eelo

Introducing /e/. /e/ is the brain child of Gaël Duval – the man behind the popular linux distribution – Mandrake Linux. The popular Linux OS is still remembered for its extremely user friendly interface and smooth and efficient functioning. It helped introduce millions to linux. After moving out of mandrake Linux which was renamed to Mandriva in 2006 Gael was the Chairman and Chief Technology Officer at Ulteo. The company is bought by AZNetwork group in 2015.In 2016, he co-founded NFactory.io, an incubator-accelerator of “startups.

The rampant ‘data pilfering’ on smartphone devices by Google and Apple set Gaël thinking. The result was a series of three articles ‘Leaving Apple & Google: my eelo odyssey’. In these articles he announced his intention to come out with an alternate platform for devices. An operating system which would respect the individual and value his right to privacy. A Kickstarter campaign to fund the idea was launched. People from around the world contributed. This was a clear indication that the concept had popular support, all that it lacked was a clear direction.
Gaël has come out with a mission which declares the following as its objectives:

  • We make available independent and open source IT infrastructure products & services, with an emphasis on respect for user data privacy, for the benefit of all.
  • We think that /e/ can have a global, worldwide impact as a major open source project in the public interest. It will help by freeing users from personal data spying and advertising.
  • /e/ is about freedom and privacy in the digital world.

A copy of the manifest is attached below:

e manifesto

To set the record straight, Gaël’s team is not writing the code from scratch. It has picked up a branch from the Lineage code base and has started with it. The lineage code base is a free open source operating system based on the android platform which caters to smartphones and tablets. The code is accessible through GitHub. At present /e/ has a team of about fifteen developers working full time under the direction and guidance of Gaël developing the first release of the operating system. Gaël’s team is currently working on various elements in the operating system which he insists would have a great UI. Those who have used Mandriva earlier can definitely look forward to Gaël delivering on that promise! Various third party applications are currently being integrated . The base OS would have a “reasonable minimum” set of application to begin with. The idea being that a user could always add more applications as per his or her requirement. There would be no forceful installation of applications that sit there unused taking up space and sending back the users personal information!

The team target to release their first beta version of the OS by August end of 2018. The next step would be the opening up of the source code repository. This should be the trigger for developers from around the world to pitch in and add their code as well. Version 1.0 of /e/ is targeted for the end of 2018 or early 2019.

/e/ has come out with a road map for its development activities

  • June 2018: early access to /e/ email for /e/ backers
  • July 2018: early access to /e/ drive for /e/ backers
  • August 2018: /e/ OS beta (MVP) release with several web services (search, app store)
  • September 2018: /e/ OS source code release on /e/ GitLab
  • September 2018: /e/ email and drive open to more users
  • October 2018: smartphones with /e/ OS start shipping to /e/ backers
  • January 2019: smartphones with /e/ OS start selling
/e/ road map

For more information about /e/ go to the web site.

To read more about Gaël Duval

To contribute to /e/ financially

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.

OEM unlocking and enabling developer options

Every wondered what Enabling OEM unlocking Developer options means? This is a simple step by step guide which will help you with enabling OEM unlocking Developer options for android phones.

In case you are wondering why you even need to do all this in the first place let us answer that as simply as is possible. You need to enable OEM unlocking and activate developer options in your android smart phone if and only if you want to install a custom ROM on your phone.
If you do not have any such plans then it is better you move to the short stories section on this website and read the stories there.

For those who dare to mess around with their smart phones read on….

Stage One: Downloading Google Platform tools

Download the latest version of the Google platform tools from the links given below. The link is the official link on the Android site. It has links for different operating systems.
https://developer.android.com/studio/releases/platform-tools
These tools are required to access the Fastboot features of your phone.

Follow the steps as described on the site to install on your PC. This is important as you would need the tools to be fully functional when running on your PC. To understand this step completely please read this post first.

If you have Google Platform tools on your PC and understand what they do then read on.

Stage Two : Enabling OEM unlocking and Developer options

Settings App

 

 

 

 

Step 1: On the smart phone go to Settings. It would be the gear shaped icon in the screen on the left.

 

Step 2: On Settings page scroll to the end of the screen to find the System link. Check image shot to the right. The system link is right at the bottom . System Link on the Settings App

 

 

 

 

 

System Screen DetailsStep 3: Open System >> Click on About Phone. Again the link is at the end of the screen. Somehow you will feel that they want us to miss these settings!

 

 

 

 

 

Step 4: Scroll to the end of the screen >> Build numberAbout Phone Screen

 

 

 

 

 

Step 5: Tap 7 times on Build number… yes, you read that right. Tap seven times on build number. By the third or fourth tap you will start getting a pop up which will mention in reverse the number of taps required out of seven!
Once you complete the mandatory seven taps  you would have enabled Developer options on the phone. If you have enabled a pattern lock it will show up to confirm it is you who want to enable Developer Options

About Phone with Developer OptionsStep 6: Go back to the System screen and now you should see a new option >>Developer options.
In the screenshot to the left see the option just above system update and below Backup.

 

 

 

 

 

Step 7: In Developer options screen select OEM unlocking. By default it would be grayed out. By selected it the option turns green!Developer Options with OEM unlocking enabled

 

 

 

 

 

 

Step 8: In Developer options screen select USB DebuggingDeveloper Options with USB Debugging enabled

That is it, you can now come back.

You have enabled USB debugging and OEM unlocking on your android smart phone.

Let the games begin 🙂

 

 

 

 

 

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?