LineageOS

最後更新: 2018-07-20

 


Install

 

# 進入 fastboot

adb reboot bootloader / power + down

# unlock

fastboot oem unlock

# load twrp

fastboot boot recovery-3.2.1-2-oreo

# 在 twrp flash OS

Wipe All

Flash lineage-15.1-20180717-nightly-tissot-signed.zip

# 在 twrp flash GApps

reboot to bootloader

Flash open_gapps-arm64-8.1-full-20180705.zip

# 正常開機

reboot

Setup OS

# reboot to twrp flash tools

Flash MI+A1+DUAL+CAMERA.zip

Flash addonsu-15.1-arm64-signed.zip

reboot

 


Enable ADB

STEP 1:

Go to Settings -> Click on "About phone" -> then Tap Seven times on the "Build number"

open "Developer options"  ->  scroll a little bit down and look for the ""

 


Boot into recovery mode

 

power + up

 


Root

 

Enable ROOT on LineageOS 15.1 ROM

STEP 1:

Download the suitable SU addon for LineageOS 15.1:

# Website: https://download.lineageos.org/extras

https://mirrorbits.lineageos.org/su/20180708/addonsu-15.1-arm64-signed.zip

STEP 2:

Flash "addonsu-15.1-arm64-signed.zip" with twrp

STEP 3:

open Developer options and then scroll a little bit down on the Developer Options settings and look for the Root access setting,

which must be showing Disabled. Just click on the Root access and set it to Apps and ADB or Apps only or ADB only, as per your need.

 


Encryption

 

Checking

Settings > Security & fingerprint > check under the “Encryption” section

It should say “Encrypted”.

All the stock firmware and several custom ROMs force encryption through this method.

 

Encrytion Fail

Phone

TWRP from LOS

PC

C:\adb>adb devices

List of devices attached
??????????????    recovery

adb shell

mount | grep data

/dev/block/mmcblk0p49 on /data type ext4 (rw,seclabel,relatime,data=ordered)
/dev/block/mmcblk0p49 on /sdcard type ext4 (rw,seclabel,relatime,data=ordered)

umount /dev/block/mmcblk0p49

e2fsck -f /dev/block/mmcblk0p49

resize2fs /dev/block/mmcblk0p49

resize2fs 1.43.3 (04-Sep-2016)
The filesystem is already 13449081 (4k) blocks long.  Nothing to do!

For disk encryption to work you'll need to shrink file system on /data partition without shrinking the partition itself by 32 kilobytes

# 8 blocks by 4 kilobytes to make space for encryption footer

# where reduced_size = current_size - 8

resize2fs /dev/block/mmcblk0p49 reduced_size

i.e.

resize2fs /dev/block/mmcblk0p49 13449073

Resizing the filesystem on /dev/block/mmcblk0p49 to 13449073 (4k) blocks.
The filesystem on /dev/block/mmcblk0p49 is now 13449073 (4k) blocks long.

 


 

 

 

 

 

Creative Commons license icon Creative Commons license icon