How to update kernel in official image

I’m trying to using official image on our x86 devices, but wifi and 4g do not work. so i want to build kernel (branch is master) and update kernel.but it report this error:

root@localhost:/home/cyndent# snap info pc-kernel_4.4.0-161.189_i386.snap 
path:       "pc-kernel_4.4.0-161.189_i386.snap"
name:       pc-kernel
summary:    The Ubuntu generic Linux kernel
version:    4.4.0-161.189 kernel
build-date: today at 08:10 UTC
license:    unset
description: |
  This Ubuntu generic Linux kernel
type: kernel
root@localhost:/home/cyndent# snap list
Name       Version        Rev   Tracking  Publisher   Notes
core       16-2.41        7712  stable    canonical✓  core
pc         16.04-0.10     34    stable    canonical✓  gadget
pc-kernel  4.4.0-157.185  259   stable    canonical✓  kernel
root@localhost:/home/cyndent# snap install pc-kernel_4.4.0-161.189_i386.snap --devmode --dangerous 
error: cannot perform the following tasks:
- Mount snap "pc-kernel" (unset) (cannot replace signed kernel snap with an unasserted one)

i use --devmode --dangerous to update kernel ,but it do not work.

If i need to make a new image by myself to update kernel?

Yes, AFAIK, you cannot switch between an signed kernel and an unsigned kernel, you will need to build a new image with the unsigned kernel in it.

if your original image was a local build using a locally built kernel as well, you can use snap install --dangerous <kernel snapfile> on the device… but as Ian said, this only works when your original image was already using a local kernel snap via the --extra-snaps option to ubuntu-image.