Category Archives: Technical

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

/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

Easy way to add custom packages to a LineageOS4MicroG ROM

So you have figured out how to build your own custom ROM using Docker…if not click here.
Once you have become an expert at it you would want to add a custom touch to the build. I realized that I was downloading a few apps which I wanted to use. For example – twitter, whatsapp, nextcloud and so on. Now remember these are apps which are not going to be installed by default as they are owned by different organizations and due to licensing issues they cannot and will not be a part of any Lineage ROM that you will download officially from the web. So what do you do?

Simple you add the apk’s to your custom build. Remember as long as you are not going to going to distribute it online you should be ok because as mentioned these applications are licensed to different organizations and not open source.

Steps to add a custom apk to your ROM.

Please note : This method works on the docker setup environment.

Step 1:

Download the apk (s) of your choice. For e.g. say I downloaded nextcloud , Nextcloud notes and twitter apks.

Step 2:

Create a folder with the apk name for e.g. NextCloud or Notes. Something short and simple.

Step 3:

Copy paste the downloaded apk into the folder. Remember to download the correct apk to the designated folder 🙂

Step 4:
Change the name of the apk file. For e.g. the name of the NextCloud apk is com.nextcloud.client_3.3.0-30030099_minAPI14(arm64-v8a,armeabi,armeabi-v7a,x86,x86_64)(nodpi)_apkmirror.com.apk!!!! (download it yourself if you think I am joking)
Rename the apk to something simple for e.g. NextCloud.apk
Do not worry renaming will not impact your build.
Step 5:

Add an Android.mk file with text like below to each of the folders. The below is the sample I always use.
Two values need to be changed in this file.
One the LOCAL_MODULE and the other the LOCAL_SRC_FILES.
For e.g from the below example the words FDroid and Fdroid.apk need to be replaced by the apk folder name and the apk name. If I am adding the NextCloud apk then the value for LOCAL_MODULE will be the folder name i.e. NextCloud and the value for LOCAL_SRC_FILES would be NextCloud.apk.

Similarly you have to create Android.mk files for each of the apks that you are adding.

Each folder will have one apk file and one Android.mk file with the below contents

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := FDroid
LOCAL_SRC_FILES := FDroid.apk
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
LOCAL_CERTIFICATE := PRESIGNED
include $(BUILD_PREBUILT)

Step 6:

Now make a few additions to the following file

vendor/lineage/config/common.mk

Browse down to the PRODUCT_PACKAGES +=

The default line may look like this – (your file would be different from this these are just samples)

PRODUCT_PACKAGES += FDroid GmsCore GsfProxy FakeStore MozillaNlpBackend NominatimNlpBackend com.google.android.maps.jar FDroid FDroidPrivilegedExtension

Add the names of the custom packages you have added to make it look something like this

PRODUCT_PACKAGES += FDroid Flym GmsCore GsfProxy FakeStore MozillaNlpBackend NextCloud NominatimNlpBackend Notes com.google.android.maps.jar FDroid FDroidPrivilegedExtension Telegram Twitter WhatsApp WordPress

save the common.mk

Copy the complete list of packages as you would need it in the next step

Step 7: Pass the package list copied from the previous step and pass it to your docker run command for example now your command should look like …with all the custom packages being passed.

docker run \
-e “BRANCH_NAME=lineage-15.1” \
-e “DEVICE_LIST=tissot” \
-e “SIGN_BUILDS=true” \
-e “CCACHE_SIZE=100G” \
-e “SIGNATURE_SPOOFING=restricted” \
-e “CUSTOM_PACKAGES=FDroid Flym GmsCore GsfProxy FakeStore MozillaNlpBackend NextCloud NominatimNlpBackend Notes com.google.android.maps.jar FDroid FDroidPrivilegedExtension Telegram Twitter WhatsApp WordPress ” \
-v “/home/username/lineageos4microg/lineage:/srv/src” \
-v “/home/username/lineageos4microg/zips:/srv/zips” \
-v “/home/username/lineageos4microg/logs:/srv/logs” \
-v “/home/username/lineageos4microg/cache:/srv/ccache” \
-v “/home/username/lineageos4microg/keys:/srv/keys” \
-v “/home/username/lineageos4microg/manifests:/srv/local_manifests” \
lineageos4microg/docker-lineage-cicd:latest

Step 8: Once the build is complete. Pick it up from the zips folder and flash on your phone.

Check all the apps you installed are running

Step 9: Congratulate yourself for having built your customized ROM!!!
Enjoy!!!

Build a LineageOs4MicroG ROM using Docker on Ubuntu

One month back if anyone had said that I could build a ROM using Docker I would have laughed. I had taught myself how to build a custom ROM for my cell phone the hard way. I have three phones at home. The three phones have three different flavors of the Android Operating system. My current daily driver is a MiA1 tissot. The phone was released with Nougat and was later updated to Oreo. The current version of Oreo is 8.1. The phone is officially supported by LineageOs4MicroG. That is where I decided to try my hand at using Docker to build my own ROM. After a few false starts it finally worked. Now it works like clockwork. Let me share what I did with you.

Before we proceed let me explain what MicroG is. To those – like myself – who do not want to have Google services on their phone and yet are addicted to apps like twitter, whatsapp or GooglePay – MicroG is a must. The problem with Google is that, their apps tend to steal your personal information and marketing it. I do not like that. Yet I need to use apps like WhatsApp and Twitter. These apps need Google play store to run in the background. The way around is to install MicroG. What MicroG does is it spoofs the apps into believing that Google Play is installed on your phone!

Installing Micro G the standard way- downloading apk’s and installing them- is a pain. The easiest way is to either download a custom ROM with MicroG already built in or build a custom ROM yourself. This is where LineageOS4MicroG comes in. These builds require docker to be setup on your PC.

A word about Docker.

Docker is a build method which is almost entirely automated. Once you have the environment up and running on your PC you just sit back and wait for the build to complete. No action is required from your side. Lets see what the per-requisites are for setting up a Docker build environment.

Step 1:
Install docker on your PC. I use a Ubuntu PC but Docker can be installed on windows as well as Mac.

Check the docker web site for instructions specific to your system.

Confirm that docker is installed on your PC by running the below command

docker
run hello-world

the output should be something like this

docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world ca4f61b1923c: Pull complete Digest: sha256:ca0eeb6fb05351dfc8759c20733c91def84cb8007aa89a5bf606bc8b315b9fc7 Status: Downloaded newer image for hello-world:latest Hello from Docker! This message shows that your installation appears to be working correctly. ...

Step 2: pull the lineageos4microg on to your pc

docker
pull lineageos4microg/docker-lineage-cicd

You should see a screen similar to the screenshot below….this was for another pull..but you get the idea 🙂

docker pull image

Step 3:

Create directories

sudo mkdir -p \

/lineageos4microg/src \

/lineageos4microg/zips \

/lineageos4microg/logs \

/lineageos4microg/ccache \

/lineageos4microg/keys \

/lineageos4microg/local_manifests

this would create directories on the file system. The lineageos4microg environment takes up about 150 GB of space so I do not prefer creating folders outside /home as I ran into space problems

An easier way is to just create folders using nautilus under home for e.g.

Create a folder lineageos4microg under home

and inside it create these 6 folders

lineage
zips
logs
cache
keys
manifests

Step 4:

Create an xml file… copy paste this in notepad, gedit and save with the name custom_package.xml

The name is not important, it is the .xml part which is important.

<?xml version=”1.0″ encoding=”UTF-8″?>
<manifest>
<project name=”lineageos4microg/android_prebuilts_prebuiltapks” path=”prebuilts/prebuiltapks” remote=”github” revision=”master” />
</manifest>

Step 5:

start the build with the below command

docker run \
-e “BRANCH_NAME=lineage-15.1” \
-e “DEVICE_LIST=<device name>” \
-e “SIGN_BUILDS=true” \
-e “CCACHE_SIZE=100G” \
-e “SIGNATURE_SPOOFING=restricted” \
-e “CUSTOM_PACKAGES=GmsCore GsfProxy FakeStore MozillaNlpBackend NominatimNlpBackend com.google.android.maps.jar FDroid FDroidPrivilegedExtension” \
-v “/home/manoj/lineageos4microg/lineage:/srv/src” \
-v “/home/manoj/lineageos4microg/zips:/srv/zips” \
-v “/home/manoj/lineageos4microg/logs:/srv/logs” \
-v “/home/manoj/lineageos4microg/cache:/srv/ccache” \
-v “/home/manoj/lineageos4microg/keys:/srv/keys” \
-v “/home/manoj/lineageos4microg/manifests:/srv/local_manifests” \
lineageos4microg/docker-lineage-cicd:latest

Please note:

– replace the <device name> with your phone name. For e.g. my MiA1 is called tissot. You can get your device name by typing the below adb command

$ adb shell getprop ro.product.device

assuming you have adb setup and functioning on your pc. If not click here xxxxx

– in the above command I have set Ccache size as100G. This is because I have a lot of empty space on my PC. Set it to 50G or as per your convenience.

– the PC will seem to hang with the message Syncing repositories. This is because the setup is downloading files from the internet. This process can take a long -long time. You can see what is happening by checking the log files. Copy the logs on to your desktop and open this copy. Do not try to open the actual logs as data is being written on to it.

what these commands mean:
All the command starting with the -e are setting your environment for the build. The cache size, Lineage branch (in this case 15.1) , signature spoofing – read detailed documentation links to understand this better. Safe to say use restricted for now.
All the commands starting with the -v are the location of your source files or folders where your logs and zip is to be placed. I got errors here when the path was not correct.

Check the path to get the command to run smoothly. It is a one time task. Save the command to run it again the next time you want to build.

The \ sign mark the end of each line.

To see more samples refer the links given below for the LineageOS4microG site.

Step 6:

Once the build is complete you will find the build in the zips folder.

Enjoy!!!

The advantage of the Docker build is once the environment is set up it does all the work almost automatically. The resources on the PC are optimally used. For e.g. I have 15 GB or RAM but am unable to run any other application while building normally. With Docker I use my PC as normall while the build is running in the background. You can run multiple device builds at the same time, You just have to add device names separated by a comma.

Additional reading for reference and trouble shooting

Docker installation : get details for your PC

For e.g. for Ubuntu https://docs.docker.com/install/linux/docker-ce/ubuntu/

LineageOS4MicroG related documentation

Announcing the birth of a mobile OS!!!

Logo of /e/ ROM currently in beta

There is a new operating system (OS) for smart phones in town. This new OS, currently in its beta version, goes by the name / e /. Project / e / is the brain child of Gaël Duval – the

A photo of Gaël Duval - the brain behind /e/

man who in a previous avatar scripted the popular Mandrake Linux Operating system.

The project team uses / e / as a temporary placeholder name while the product is in beta. The name for the finished product is yet to be announced.

What is a mobile OS?
To the uninitiated, a mobile OS is the soul behind your smart phone. The brain that runs the hardware. The hardware or the parts of a mobile that you get to touch and hold are the brawn part on your phone.

Who are the current players in the Mobile OS world?

Currently we have two major players in the Mobile OS market. Android (read Google) and iOS (read Apple). Between them they dominate the market. Check out the latest statistics as published by Gartner.

GartnerOSPercentages

Look at the figures for the 2nd quarter of 2018 or the numbers under the column heading 2Q18 Market Share (%).
The numbers show Google’s Android having an 88% share of the world smart phone market. The remaining 11.9 % is with Apple with its IOS. Now look at the numbers for the other OS’s….as expected the numbers are 0.0!!!!

What do these numbers mean?
The numbers mean that the world and we the end users are directly controlled by these two giant organizations viz Google and Apple. Also involved in filtering our web experience are organizations like Microsoft and Amazon.
The smart phone is now an essential part of our lives. From the minute we wake up to the sound alarm on our phones to the minute we go off to sleep after checking check our phones, our phones are our constant companions.

We use phones to check emails, read the news, chat, talk, take photos…. the list goes on and on. Apps like Facebook, Whats app and twitter have become a part of our vocabulary and lives. These social media accounts keep us in sync with our friends and foes from around the world.

While we are busy using these apps, what we do not realize is that we are also leaving a digital footprint behind us. Details of what we have typed, chatted, uploaded or downloaded are saved on servers at these organization. For example Gmail owns your email data and reads what ever you type. How else do we have auto complete and suggestions popping up while we are still typing out the sentences? While these organizations deny this manipulate it is common knowledge that a major source of their revenue is through selective exposure of our data to third party businesses. Ever wondered how ads from Amazon or Flipkart show up on the sidelines of you web pages, vending products you browsed couple of days back? That happens because browsers save our surfing history and then that data is used by these companies to makes sales pitches. Welcome to the world of targeted advertising! All this is done in the name of facilitating a smooth browsing and purchasing experience!
This is where / e / comes in. The idea behind Gaël Duval’s OS was to seal this data pilferage from the mobile OS. Changes are made at the code level and applications made more secure. The idea to is to prevent leakage of our data be if personal or browsing history.

What / e / brings to the table

In its current beta version the OS is forked from the Lineage OS 14.1. To explain further lineage OS is a free open source operating system for smartphones and tablet computers. It is based on the android source code. The current beta version of / e / is based on Nougat. Android has come out with Oreo and Pie two upgrades after Nougat. Development for the upgrade to Oreo or Lineage 15.1 is on at / e /.

Devices supported in the current version of / e /

There are about 25 plus phones which have ROM’s in the beta version. As mentioned before development for devices which work on oreo or Lineage 15.1 is underway and expected to be released soon.

A few screenshots of phones running / e / are given below

Main screen of /e/ ROM
Settings Page of /e/ ROM
eAppSuggestionScreen

For more details on the project take a look at the following sites

/ e / Web site : https://e.foundation/

/ e / forum : https://community.e.foundation/

Read about Gaël Duval https://en.wikipedia.org/wiki/Ga%C3%ABl_Duval

Understand what Targeted Advertising is https://en.wikipedia.org/wiki/Targeted_advertising

To check on the availability of devices and how to install them on your phone check out the web page here:

Interested in building the OS… well check out the details here https://gitlab.e.foundation/e/wiki/en/wikis/build

How to flash lineage official OTA on the MiA1

Let me explain the process of how to flash lineage official OTA on the MiA1. The reason why this needs a separate post is because it is slightly complicated and the chances of failure are high. The process of flashing the lineage ROM on the MiA1 has changed now that we have a signed Over the Air (OTA) ROM coming in every week on Tuesday.
I am assuming that you have a basic understanding about flashing ROM’s  and understand why custom ROM’s are flashed. I am also assuming you know about platform tools like adb and fastboot and have a working adb and fastboot on your PC.

WARNING: As always remember there is a good chance  that the process of flashing custom ROM’s can seriously damage your phone and even permanently brick it i.e. render it useless. You have been warned  and are doing so at your own risk.

Now that we are done with the warning lets start flashing.
Before you proceed download these files.
Downloads:
Please note these files are available either from this web site or you can search for them on the web and download them from their original sites. I leave the option to you. The point is you would need these files to continue with the task at hand.

Copy required files
Copy the boot recovery image file into the folder where you installed adb on your PC.
Copy the remaining files on to your phone. These files are Lineage ROM for 10 July + Mind the Gaps + TWRP installer.
Copy them into the download folder on your phone. You can either use the PC or try it through adb push is you are comfortable with that.
The command for an adb push would be as under

adb push TWRP-installer-3.2.1-with-Tissot-Manager-2.3.zip  /Downloads
adb push <complete file name to be pushed including extension> /<destination>

Coming from Stock MiA1 ROM follow the steps given below. These steps should be the same even if you are coming from other unofficial version of the Lineage ROM  and want to install the official lineage ROM.

fastbootmode

Step 1. Boot phone into fastboot mode

From a PC which has adb and the correct drivers installed type the above command to boot the phone into the fastboot mode. This is the mode where you get the picture of a bunny wearing the Chinese army hat!

Alternately you can also switch off the phone. Press and hold volume – and power button and keep holding till you feel it vibrate. This should happen in 1-2 seconds. Then release. The bunny in the hat should be on your screen now!

Step 2 : From the folder where you have installed adb and copied the Boot recovery image type the below command in the console.
fastboot boot boot-recovery.img

Within 2-3 seconds the boot image will be hot booted on you phone and you should be in the TWRP screen.

Step 3. Wipe cache, data and system

Step 4. Flash the Lineage Official ROM for July 10. This is a slightly weird step required because flashing the latest ROM directly will give you an signature verification error!!!
Hope this error is fixed in later versions of the ROM.

Step 5. Flash the TWRP installer .
This TWRP is by CosmicDan and specifically create for the Tissot. Please note the TWRP screen will give you very detailed instructions at each stage of the installation. Read it carefully. In spite of all the help on this page or the Lineage  web sites the setup may still fail in some cases. That is where the messages on the TWRP screen would come in handy. Read the messages and you would be able to resolve most of the issue on your own.

Step 6.   Reboot Recovery. This is a required step
Step 7.   Flash Magisk 16.6
Step 8.   Flash Mind the gapps
Step 9.   Reboot System
Once you have the ROM up and running. Go to  System >> About phone >> Tap the build number 7 times and you will be into developer mode. Enable USB debugging and Advance restart. If you are not familiar with these steps click here for details  
This is just in case you are stuck again and need to recover your phone then it would be helpful to have USB debugging enabled on your phone to allow access through adb from your PC.

Now remember you are in the July 19 version of the ROM.

To get the latest OTA update

  • Go to System >> About Phone >> LineageOS updates and click to download the latest build for your phone.
    Downloading_6%

    This is a painfully slow download so have patience and relax.
    The download from the lineage web site can take hours. It took about 4 hours on my phone that too on a 10 MB internet WiFi connection!
    Once the download is complete install the build . This will also take some time.
    Preparing for first Boot

When the build is finally installed, you can check the results in settings.
The latest ROM released on the Tuesday of the current week should be showing up.

Here there is an important thing to note. Once the new ROM is installed it will wipe out your magisk and TWRP installation .
Mind the Gapps will work seamlessly.
Flash TWRP and magisk again if you need them.

Settings_1

Best of luck!