Huawei Y3 II 3G (huawei-lua-u22)

Contributors

 * HenriDellal
 * z3ntu

Maintainers
HenriDellal

How to enter flash mode
Run  on your host machine to get in fastboot mode

How to unlock the bootloader
You will need these tools to unlock the bootloader: Unpack SP Flash Tool and run it. Then choose required download agent and scatter file on Download tab. Go to "Read back tab" and add new task. Click on the task to edit it. Choose location to save and name your file as ROM_0. Then fill 0xB1180000 value in Length field and proceed. If you want, you may backup userdata partition. Create another task for it with start at 0xC0180000 and length 0x111200000. When the tasks are ready, click "Read back" button, turn off the phone and connect it to USB 2.0 port. Backup process should start.
 * SP Flash Tool v5.1532 (It's recommended to use Linux version of it)
 * Download Agent (DA_LUNA_KEY.bin) Check this link for other required files
 * Scatter file
 * ROM Backup Splitter
 * Files from unlocked phone

When the backup is ready, split it on partitions with ROM Backup Splitter. Choose scatter file, ROM_0 file and directory where the result files have to be stored, then choose Actions > Split ROM.

Unpack unlock_files.zip, start SP Flash Tool and choose scatter from unpacked archive. Click Download and connect your phone. Flashing process should start.

When flashing is done, turn on the phone, go to Developer Options and turn on USB debugging and OEM unlock. After that, move your phone in fastboot mode with. Run. Confirm bootloader unlock by pressing Volume+. After that, turn off the phone, open SP Flash Tool and flash nvram.bin and pro_info from your backup. After flashing turn on the phone and check IMEI. They must match the ones printed under the battery.

Installation
To install postmarketOS on this phone, you have to: It's possible to boot postmarketOS now. Turn off the phone, then hold Power and Volume+ buttons, release Power. When Huawei logo appears, you may release Volume+.
 * Check if your phone has unlocked bootloader. If it doesn't, follow instructions above to unlock it.
 * Run  and follow instructions.
 * Run, where /dev/mmcblk0 must be replaced with proper SD card device (run lsblk to find it).
 * Put SD card in the phone and enter flash mode (fastboot).
 * In fastboot, run  to flash kernel instead of recovery. Fastboot implementation on this device doesn't allow flashing any partitions besides system and recovery.

Wi-Fi
Wi-Fi is presented by 3 interfaces: ccmni0, ccmni1, ccmni2. Currently unavailable.

LED
It's possible to change brightness of display backlight and notification LEDs by echoing values like The flashlight can be enabled with
 * 1) echo 255 > /sys/class/leds/lcd-backlight/brightness
 * 2) echo 255 > /sys/class/leds/red/brightness
 * 3) echo 255 > /sys/class/leds/blue/brightness
 * 4) echo 255 > /sys/class/leds/green/brightness
 * 1) echo 255 > /sys/class/leds/flashlight/brightness