= DRAFT - Updating/syncing the phablet kernels to the apparmor3 = This page is under construction == About apparmor3 in the phablet kernels == <> = Support Notes = == Installing a phablet device with Ubuntu touch == TODO == Updating the kernel in the emulator == 0. build a kernel and get the bzImage or get the image from a deb:{{{ $ dpkg-deb -x /linux-....deb ./extracted $ cp ./extracted/boot/vmlinuz-* ./bzImage-goldfish }}} 0. copy the bzImage in to place. Eg:{{{ $ cp bzImage-goldfish ~/.local/share/ubuntu-emulator//ubuntu-kernel }}} == Updating the kernel on the device == Also see: https://wiki.ubuntu.com/Kernel/Dev/AndroidKernel 0. build a kernel and get the zImage or extract the zImage from a deb:{{{ $ dpkg-deb -x /linux-....deb ./extracted $ cp ./extracted/boot/vmlinuz-* ./zImage }}} 0. push the kernel to the phablet:{{{ $ adb push arch/arm/boot/zImage /data/ubuntu/ or $ adb push /home/jj/linux-image-3.1.10-6-grouper_3.1.10-6.14_armhf.deb /data/ubuntu/ }}} 0. connect to the tablet:{{{ $ adb root $ adb shell }}} 0. if android is the root system and ubuntu is in a chroot:{{{ # ubuntu_chroot shell }}} 0. Find where to flash the kernel (see below: find the boot partition) 0. If using deb, install the kernel (from within adb). Eg `dpkg -i linux-image-3.1.10-6-grouper_3.1.10-6.14_armhf.deb` 0. Flash the kernel: * if kernel from deb:{{{ # abootimg -u /dev/mmcblk0p2 -k /boot/vmlinuz-3.1.10-6-grouper }}} * if zImage:{{{ # abootimg -u /dev/mmcblk0p6 -k /data/ubuntu/zImage }}} 0. reboot == Updating the kernel cmdline on the device == 0. if you don't already have a bootimage.cfg, extract the bootimage:{{{ # dd if=/dev/mmcblk0p2 of=./boot.img # abootimg -x ./boot.img }}} 0. edit bootimage.cfg by adding options to cmdline:{{{ cmdline = console=tty1 apparmor=0 }}} 0. update the flashed boot image (same partition as kernel):{{{ abootimg -u /dev/mmcblk0p2 -f bootimg.cfg }}} == Find the boot partition == List the block partitions (devices might be in /dev/block/platform in older releases or /dev/disk/by-partlabel in newer. Note /dev/... may be /dev/block/... on android. * Older releases: * nexus 7 (look for what 'LNX' points at) ls -la /dev/block/platform/sdhci-tegra.3/by-name/ lrwxrwxrwx 1 root root 20 Apr 3 09:21 LNX -> /dev/block/mmcblk0p2 LNX is the boot partition (where vmlinux resides) SOS is another boot partition (the recovery one but we won't use it) * nexus 4 (look for what 'boot' points at) ls -al /dev/block/platform/msm_sdcc.1/by-name/ lrwxrwxrwx 1 root root 20 Apr 3 10:05 boot -> /dev/block/mmcblk0p6 * Newer releases: * nexus 4 (look for what 'boot' points at) ls -al /dev/disk/by-partlabel/ lrwxrwxrwx 1 root root 15 May 14 13:02 boot -> ../../mmcblk0p6 Get boot partition info to check if its really set up as a boot partition * abootimg -i /dev/block/mmcblk0p2 (older releases) * abootimg -i abootimg -i /dev/mmcblk0p6 (newer releases)