Skip to content

LineageOS GSI for Minimal Phone (MP01)

Notifications You must be signed in to change notification settings

MP01Experiments/MP01-LineageGSI

 
 

Repository files navigation

LineageOS 22.2 GSI for Minimal Phone (MP01)

You'll need to get familiar with Git and Repo as well as TrebleDroid Wiki.

For known issues, bug reports, and future features see the project issues

Display Notes

Currently I'm testing using v25 of the screen firmware, I'll include a way to migrate between builds at some point. I'll also provide a side-by-side so you can pick which version suits you the best.

Resources

Current Workarounds

  1. Presets aren't setup OOB, go to Settings > PHH Settings > My device > Apply presets
  2. IMS isn't setup OOB, go to Settings > PHH Settings > IMS features > and tap on Create IMS APN and Install IMS APK for MediaTek R+ vendor Reboot when you see You may reboot!

As far as I know this should be done automatically by treble presets, but isn't?

  1. Out of the box, the keyboard layout isn't fully functional, to fix this, open FinQwerty > Physical Keyboard Settings and change the layout to QWERTY English Layout for Minimal Phone MP01.
  2. No launcher is set as the default. You can fix this when you open inkOS, it'll prompt you to set the default launcher.
  3. The dark theme is still the default, this is horrible on e-Ink, switch to Light during setup.
  4. The e-Ink panel auto switching can be a little finnicky, you can disable this by double clicking the refresh button, pressing the cog, and enabling Disable Per-App Refreh Mode.

Build Script (Testing)

bash <(curl -s https://raw.githubusercontent.com/chardidathing/MP01-LineageGSI/refs/heads/15/build.sh)
Manual Build Instructions (Incomplete)
### Create the directories

As a first step, you'll have to create and enter a folder with the appropriate name
To do that, run these commands:

```bash
mkdir LineageOS
cd LineageOS
```

### To initialize your local repository, run this command:

```bash
repo init -u https://github.com/LineageOS/android.git -b lineage-22.2 --git-lfs
```


### Clone the Manifest to add necessary dependencies for gsi:

    git clone https://github.com/MisterZtr/treble_manifest.git .repo/local_manifests  -b 15-los-qpr2



### Afterwards, sync the source by running this command:

```bash
repo sync --force-sync --optimized-fetch --no-tags --no-clone-bundle --prune -j4
```


### Next, apply patches:

Copy the patches folder to rom folder and in rom folder

```
bash patches/apply-patches.sh .
```

## Generating Rom Makefile

Clone this repository, and then in device/phh/treble folder, run following commands:,

```
cd device/phh/treble
bash generate.sh lineage
```

Also, copy the files treble_arm64_bgN.mk and treble_arm64_bvN.mk to this folder


### Turn on caching to speed up build

You can speed up subsequent builds by adding these lines to your ~/.bashrc OR ~/.zshrc file:

```
export USE_CCACHE=1
export CCACHE_COMPRESS=1
export CCACHE_MAXSIZE=50G # 50 GB
``` 

## Compilation 

In ROM folder, for vanilla version:

```
. build/envsetup.sh
ccache -M 50G -F 0
lunch treble_arm64_bvN-bp1a-userdebug
make systemimage -j$(nproc --all)
```

For version with google services:

```
. build/envsetup.sh
ccache -M 50G -F 0
lunch treble_arm64_bgN-bp1a-userdebug
make systemimage -j$(nproc --all)
```


## Compress

After compilation,
If you want to compress the build, i recommend use [7-zip](https://aur.archlinux.org/packages/7-zip), for a fast and safe way
In rom folder,

```
cd out/target/product/tdgsi_arm64_ab
7zz a system.img.xz "system.img"
```

Troubleshoot

If you face any conflicts while applying patches, apply the patch manually

Credits

About

LineageOS GSI for Minimal Phone (MP01)

Resources

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

No packages published

Languages

  • Shell 92.6%
  • Makefile 7.4%