Jump to content

Huawei MediaPad T5 (huawei-agassi2)

From postmarketOS Wiki
Huawei MediaPad T5
Splash screen with kernel 7.0.0
Splash screen with kernel 7.0.0
Manufacturer Huawei
Name MediaPad T5
Codename huawei-agassi2
Model AGS2-W09/AGS2-W19 (Wi-Fi only); AGS2-L03/AGS2-L09 (LTE/Wi-Fi)
Released 2018
Type tablet
Hardware
Chipset HiSilicon Kirin 659
CPU 4x 2.36 GHz Cortex-A53
4x 1.7 GHz Cortex-A53
GPU Mali-T830 MP2
Display 1920 x 1200 IPS
Storage 16/32 GB
Memory 2/3 GB
Architecture aarch64
Software
Original software
The software and version the device was shipped with.
Android (EMUI) 8.0
Extended version
The most recent supported version from the manufacturer.
Android (EMUI)
FOSS bootloader no
postmarketOS
Category testing
Mainline
Instead of a Linux kernel fork, it is possible to run (Close to) Mainline.
yes
pmOS kernel
The kernel version that runs on the device's port.
7.0.0
Features
Flashing
Whether it is possible to flash the device with pmbootstrap flasher.
Works
USB Networking
After connecting the device with USB to your PC, you can connect to it via telnet (initramfs) or SSH (booted system).
Works
Internal storage
eMMC, SD cards, UFS...
Untested
SD card
Also includes other external storage cards.
Untested
Battery
Whether charging and battery level reporting work.
Untested
Screen
Whether the display works; ideally with sleep mode and brightness control.
Partial
Touchscreen
Untested
Multimedia
3D Acceleration
Untested
Audio
Audio playback, microphone, headset and buttons.
Untested
Camera
Untested
Connectivity
WiFi
Untested
Bluetooth
Untested
Ethernet
Untested
GPS
Untested
Modem
Calls
Untested
SMS
Untested
Mobile data
Untested
Miscellaneous
FDE
Full disk encryption and unlocking with unl0kr.
Untested
USB OTG
USB On-The-Go or USB-C Role switching.
Untested
Sensors
Accelerometer
Handles automatic screen rotation in many interfaces.
Untested
Haptics
Untested

Contributors

Users owning this device

  • Akku (Notes: Wi-Fi 2GB/16GB (AGS2-W09), stock Android 8.0.0.371(OCEC635))
  • Tigersusyt (Notes: AGS2-L09? - Not 100% sure what the exact model is, but it is a model with cell capabilities, currently not usable as it needs a new lcd flex cable)
  • Tildeguy (Notes: mainlining, AGS2-L09 3/32gb)

How to enter flash mode

  • Recovery Mode: With the device powered off, hold Volume Up and Power. Once the phone vibrates and boots up, release Power. Keep holding Volume Up until it boots to recovery.
  • eRecovery mode: Same as Recovery mode, but with a USB cable plugged in to a computer.
  • Fastboot: With the device powered off, hold Volume Down and Power.

Installation

Unlocking the bootloader

  1. Power off and disassemble the device.
    Insert the sharp end of the knife under the display frame (not under the display but under its frame!) and carefully unclip the connector. Insert a plastic card (or cut a circle out of a plastic two-liter bottle) into the hole that appears and draw along the entire line so that all the connectors unclip. (from 4pda)
    For more details, follow this disassembly video on YouTube.
    Be very careful when disassembling! The glass is very easy to break (I did).
  2. Download PotatoNV-crossplatform and the Python requirements, then run the script:
    $ git clone https://github.com/mashed-potatoes/PotatoNV-crossplatform --recursive
    $ cd PotatoNV-crossplatform
    $ pip install -r requirements.txt
    $ python -m usrlock -b hisi65x_a -k 0123456789ABCDEF
    
  3. Short the test point and connect a USB cable to a computer.
    Test point location
  4. Wait for the message: info Reboot result: None

Other guides:

Installation and building

Generate the mainline huawei-agassi2 package with $ pmbootstrap init and build the Hi6250 kernel with the envkernel.sh script:

$ git clone https://github.com/tildeknown/linux-hi6250
$ cd linux-hi6250
$ . /path/to/pmbootstrap/helpers/envkernel.sh
$ export ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
$ make hi6250_defconfig
$ make -j$(nproc)
$ pmbootstrap build --force --envkernel linux-huawei-agassi2
$ deactivate
$ pmbootstrap install # for initramfs
$ cd ..

uniLoader

Copy the kernel blobs and build uniLoader:

$ pmbootstrap export # for initramfs
$ git clone https://github.com/ivoszbg/uniLoader
$ cd uniLoader
$ cp ../linux-hi6250/.output/arch/arm64/boot/Image blob
$ cp ../linux-hi6250/.output/arch/arm64/boot/dts/hisilicon/hi6250-huawei-agassi2.dtb blob/dtb
$ cp /tmp/postmarketOS-export/initramfs blob/ramdisk
$ export ARCH=aarch64 CROSS_COMPILE=aarch64-linux-gnu-
$ make agassi2_defconfig
$ make

Generating the boot images

$ curl -O https://raw.githubusercontent.com/tildeknown/mkbootimg/refs/heads/main/mkbootimg.py
$ chmod +x mkbootimg.py
$ ./mkbootimg.py --kernel uniLoader.gz \
--ramdisk /dev/null --board '' --pagesize 2048 --base 0 \
--kernel_offset 0x480000 --ramdisk_offset 0x8000000 \
--second_offset 0x1300000 --tags_offset 0x7e00000 \
--cmdline 'loglevel=4 coherent_pool=512K page_tracker=on slub_min_objects=12 unmovable_isolate1=2:192M,3:224M,4:256M printktimer=0xfff0a000,0x534,0x538 androidboot.selinux=enforcing buildvariant=user' \
-o /tmp/kernel-boot.img
$ ./mkbootimg.py --kernel /dev/null --ramdisk /tmp/postmarketOS-export/initramfs \
--board '' --pagesize 2048 --base 0 \
--kernel_offset 0x10008000 --ramdisk_offset 0x11000000 \
--second_offset 0x10f00000 --tags_offset 0x10000100 \
--cmdline buildvariant=user -o /tmp/ramdisk-boot.img

Flashing

$ fastboot flash kernel /tmp/kernel-boot.img
$ fastboot flash ramdisk /tmp/ramdisk-boot.img
$ fastboot reboot

External links