[Nexus 4 General] djibe89:
[GUIDE/TUTORIAL/HOWTO] Google Nexus 4 stock to Android 11

[GUIDE/TUTORIAL/HOWTO] Google/LG Nexus 4 E960/mako stock to Android 11 / LineageOS 18.1

This detailed step-by-step guide helps you transform your Google Nexus 4 with Android 5.1 to a powerful one with Android 11.

### I'll make a few notes using this style: PLEASE READ THEM.

Before going further, make sure you have the correct model.

Go to Settings > About phone > Model number: Nexus 4

If not, you can quit this tutorial now.

Right below, check for Android version, if not 5.1.1:

Connect to Wifi network and go to System updates submenu > Check for update.

Install updates.

If Android is 5.1.1, tap 7 times on Build number to unlock Developer settings.

See you down there.

CHANGELOG

v4. Moved to BiTGApps

v3. Moved to Android 11

v2. Updated for Netflix SD/Disney+ (try and tell me), update pack

v1. Initial release

1) DOWNLOAD

- djibe Nexus 4 pack: https://drive.google.com/file/d/1RAQ6v7iycSLMdUr2hBh4RPvVzIZifIVR/view?usp=sharing

(contains USB drivers r13 + fastboot & adb + voron00 TWRP recovery 3.5.0_9-0 + Magisk root).

Unzip pack on Windows desktop.

+ ROM LineageOS 18.1 Unofficial: https://xdaforums.com/t/rom-unofficial-lineageos-18-1-mako.3758779/

Download latest build: https://drive.google.com/open?id=1e-mO4qaEP1y0wrBbbPwsISdJuW_TeLQo

Not working: Widevine DRM (Netflix won't play HD)

+ BiTgapps Package ARM 11: https://github.com/BiTGApps/BiTGApps-Release/releases

+ Phone must be fully charged to 100%

2) INSTALL WINDOWS DRIVERS AND BACKUP

Go to the folder you unzipped earlier.

navigate to usb_driver_r13-windows > usb_driver.

Right click on android_winusb.inf and select Install. Confirm with OK.

Restart Windows.

Make sure Google/provider account is synchronized.

Backup photos, documents, contacts, WhatsApp before going any further (ex: use the backupyourmobile app).

Connect phone to PC and retrieve data.

3) UNLOCK BOOTLOADER OF GOOGLE NEXUS 4

Go to Settings > Developer options and switch USB debugging ON.

Open a Windows command prompt on the /djibe pack folder you unziped earlier:

select folder with left click, right click while holding SHIFT on keyboard > Open command windows here

Connect phone to PC.

Enter command

adb devices

, confirm commands by pressing Enter.

Command starts adb and returns

004d206a1416f1bb unauthorized

ADB (Android Debug Bridge) has started but phone is waiting for authorization.

On phone, authorize adb commands from Allow USB debugging dialog: tap on OK.

Enter command

adb devices

Command now returns

004d206a1416f1bb device

Then enter command

adb reboot bootloader

Phone restarts and prints a Droid with on the last line: LOCK STATE - locked

### All data will be erased !

Enter command

fastboot oem unlock

Using Volume+, select Yes - Unlock bootloader, confirm by pressing Power.

Droid's last line is now: LOCK STATE - unlocked, phone is unlocked !

Then use Volume keys to select Start and Power to confirm.

Wait during long boot.

4) FLASH TWRP 3.5 RECOVERY

Back to Android, unlock Developer options and activate USB debugging again.

Now enter again

adb reboot bootloader

Droid shows up again on phone.

Now enter

fastboot flash recovery voron00-recovery-mako.img

Command returns Finished. Total time: 1.828s

Use Volume keys to select Recovery mode, confirm with Power.

Welcome to TWRP recovery.

Check Never show this screen during boot again and Swipe to Allow Modifications.

Go to Backup > select Boot, System and Data partitions.

Swipe to Backup and wait during backup.

Back to home screen > Mount.

You can access folders from PC if Data partition is checked and bottom right button displays Disable MTP.

From Windows Explorer, navigate to Nexus 4 > Internal Storage.

Copy TWRP folder and paste it somewhere safe on PC.

This is a perfect backup in case of crash.

5) RESIZE PARTITIONS

ROM requires at least 1272 MB on /system partition.

### The following script will work only on stock partition table.

### DO NOT use it on a reconfigured device (but see Clamor repartition: https://xdaforums.com/t/repartition-nexus-4-repartition-mako-8gb-16gb-ua-twrp.3844383/)

Copy repartition_mako.zip into Internal Storage partition, along TWRP and DCIM folder (this time from PC > phone).

Disconnect phone.

### Make sure battery is > 50%

Back to TWRP Home > Install.

Scroll down to see repartition_mako.zip > tap on it and Swipe to confirm Flash.

Wait during repartition, phone auto reboots to TWRP.

6) WIPE PARTITIONS

Now go Wipe > Advanced Wipe.

Select Dalvik / ART Cache, System, Data, Internal Storage, Cache and Swipe to Wipe.

Tap on Home button > Reboot > Recovery > Swipe to Reboot.

### Don't try F2FS, it won't work.

7) FLASH ANDROID + BITGAPPS + MAGISK

On restart, check Never show this screen during boot again and Swipe to Allow Modifications.

Back to Mount.

Copy ROM + GAPPS + Magisk.

Select lineage-*.zip

Then back to Home > Reboot > Recovery.

Go back to Install > select bitgapps*.zip and flash.

Opional for root: Then back to Home > Reboot > Recovery

Install > Magisk*.zip

When done message prompts, tap on Wipe Cache/Dalvik and Swipe to Wipe, wait.

Disconnect phone from PC.

Then tap on Reboot System.

Let the phone boot (about 10 minutes).

8) ROOT WITH MAGISK

Configure Android as you like.

Magisk root starts with Android, no extra manipulation needed.

You can manage permissions and extra modules with Magisk Manager app.

Open Magisk app (v23+).

Go to Settings > go to App Rename app to Godmode to hide it.

Below, switch MagiskHide ON.

Now go to Magisk Modules tab > install liboemcrypto disabler and MagiskHide Props Config.

Connect to your Google account, download from Play Store Netflix and Disney+.

### If you are already connected to Google account.

Clear cache (Settings > Apps > All apps > Google Play Store > Storage > Clear storage) and restart tab.

Relaunch Play Store, Netflix and Disney+ will be available in SD.

9) OTHER APPS

- You can use GPS Status & Toolbox for faster GPS fix.

- Developer options

Settings > About phone

Tap 7 times on build number.

Back to Settings > System > Advanced > Developer options

Set Windows animation scale, Transition animation scale and Animator duration scale to .5x

That's it.

Enjoy ;-)

Thanks: @voron00, @Ziyan, @Clamor, TWRP team, LineageOS team, OpenGApps team

--------------------------------

Boot in recovery mode

Power down phone.

Hold Volume+ + Volume- + Power 2 seconds and release.

Then use Volume keys to select Recovery mode and confirm with Power.