Unifi V2 signed firmware

UNIFI AP V2

I'm opening this discussion regards the unifi's firmwares for uap-v2 and uap-lr-v2.
Ubiquiti has signed their firmware so the fwupdate.real rejects un-signed, furthermore:

  • The bootloader tftp recovery check the sign -> link
  • The uboot command erase unlook, mw, doens't work. (Flash is like locked)
  • UniFi firmware does not have the mtd binary.

bootlog

From hardware side the device support itn't tricky but I don't have any way to write this flash.

..any advice is welcome

What firmware is oldest one for V2?
Since they removed mtd from newer firmware I usually just downgrade to older version that has it.
There should be old enough version for v2 that has mtd

See also:

I'll test next week the most oldest firmware avaeble on ubnt dl.

The oldest firmware avable on ubnt dl is:
UniFi firmware 3.7.29 for UAP-v2, UAP-LR-v2 Firmware 2016-12-12

i've recently came up with an idea how to flash locked/signed firmware on litebeam ac gen2. basically you start flashing same ubiquiti fw that is already on device and interrupt the process, that leaves mtd partitions unlocked and you can flash another image to these using dd. more info in this GH comment-> https://github.com/openwrt/openwrt/pull/689#issuecomment-493658317

let us know if it works on unifi uaps

With

echo "5edfacbf" > /proc/ubnthal/.uf 

I could flash an opewnwrt image, but it seems there are still some problems: Console Log:

ar7240> reset

Resetting...

U-Boot unifi-v2.0.4.295-g6dbfde2a (Dec 11 2018 - 15:20:42)

DRAM:  64 MB
Base:0x80000000, Top:0x84000000, Res logbuf:0xa3ff3800, log_magic:0x4a5a5a1a kseg: 0xa0000000
Flash:  8 MB
Net:   athr8032_phy_probe: unit=0, AR8032 Detected
eth0: 78:8a:20:e2:30:a1
athr8032_phy_probe: unit=0, AR8032 Detected
eth0
Board: Copyright Ubiquiti Networks Inc. 2014
Hit any key to stop autoboot:  0
Board: Ubiquiti Networks AR9342 board (e582-31.1122.0030)
0. Name = u-boot, offset = 0, start_addr=9f000000, size=393216,start_sector=0, end_sector=5
1. Name = u-boot-env, offset = 60000, start_addr=9f060000, size=65536,start_sector=6, end_sector=6
2. Name = kernel, offset = 70000, start_addr=9f070000, size=7602176,start_sector=7, end_sector=122
3. Name = cfg, offset = 7b0000, start_addr=9f7b0000, size=262144,start_sector=123, end_sector=126
4. Name = EEPROM, offset = 7f0000, start_addr=9f7f0000, size=65536,start_sector=127, end_sector=127
UBNT application initialized
## Booting image at 9f070000 ...
Image Name:   MIPS OpenWrt Linux-5.10.146
Created:      2022-07-05  21:49:31 UTC
Image Type:   MIPS Linux Kernel Image (lzma compressed)
Data Size:    2196126 Bytes =  2.1 MB
Load Address: 80060000
Entry Point:  80060000
Verifying Checksum at 0x9f070040 ...OK
Uncompressing Kernel Image ... OK

Starting kernel ...

[    0.000000] Linux version 5.10.146 (miki@gluonbuild) (mips-openwrt-linux-musl-gcc (OpenWrt GCC 11.2.0 r19800+6-a7fb589e8a) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 Tue Jul 5 21:49:31 2022
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] MIPS: machine is Ubiquiti UniFi AP
[    0.000000] SoC: Atheros AR9342 rev 2
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 56384K/65536K available (5342K kernel code, 583K rwdata, 1208K rodata, 1180K init, 203K bss, 9152K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 51
[    0.000000] CPU clock: 185.032 MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 20658623107 ns
[    0.000031] sched_clock: 32 bits at 92MHz, resolution 10ns, wraps every 23211935738ns
[    0.025695] Calibrating delay loop... 92.05 BogoMIPS (lpj=460288)
[    0.125185] pid_max: default: 32768 minimum: 301
[    0.140590] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.164177] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.194972] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.227473] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.259323] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.281407] pinctrl core: initialized pinctrl subsystem
[    0.312241] NET: Registered protocol family 16
[    0.505421] clocksource: Switched to clocksource MIPS
[    0.526038] NET: Registered protocol family 2
[    0.541051] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.567272] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.594516] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.619264] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.642021] TCP: Hash tables configured (established 1024 bind 1024)
[    0.662982] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.684275] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.707492] NET: Registered protocol family 1
[    0.721767] PCI: CLS 0 bytes, default 32
[    0.756922] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.789946] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.808875] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.844055] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.870938] pinctrl-single 18040028.pinmux: 64 pins, size 8
[    0.892229] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.920995] printk: console [ttyS0] disabled
[    0.935217] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 9, base_baud = 140000000) is a 16550A