Here follows a possible approach. There are faster ways of achieving
the same result, but this is probably easier to explain :)

Copy the Image.lz4-dtb file you generated with build/build.sh to the
AOSP kernel folder of your device, substituting the existing one:

$ cp 
${YOUR_KERNEL_REPO}/blueline/out/android-msm-bluecross-4.9/dist/Image.lz4-dtb
${ANDROID_BUILD_TOP}/device/google/crosshatch-kernel/

Go back to the AOSP folder and generate the boot.img that will contain
your kernel and write it to the device.

$ m bootimage
$ adb reboot bootloader
$ fastboot flash boot out/target/product/blueline/boot.img

Now your device has the updated kernel (you can check with `adbs shell
uname -a`), but outdated kernel modules (among which there is the
non-working touchscreen driver).
Remount the filesystem in R/W (by default is read-only at boot):

$ adb root
$ adb remount -R

`adb remount -R` will also disable verity (if not already disabled)
and reboot the device if required. If the device was rebooted, re-run
the previous commands.
Now it's time to push the updated kernel modules to the device:

$ adb push ${YOUR_KERNEL_REPO}/blueline/out/android-msm-bluecross-4.9/dist/*.ko
/vendor/lib/modules/

Reboot the device, now everything should work fine.

Cheers,
Alessio

On Mon, Apr 1, 2019 at 5:40 PM <chianglee1...@gmail.com> wrote:
>
> I built the kernel using this guide 
> https://source.android.com/setup/build/building-kernels
>
> with the build/build.sh command
>
> Do you have a tutorial for using the make bootimage command? Or should I just 
> run the make bootimage command instead of the shell? And flash it in the same 
> way
>
> Thanks!
>
>
> fredag 29. mars 2019 15.45.37 UTC+1 skrev Alessio Balsini følgende:
>>
>> Hi,
>>
>> > The phone reboots. But then I am not able to use the touch screen at all. 
>> > I cant unlock the phones sim card. If I hold down the power button for a 
>> > while and reboot it. The touch screen works. Not sure what causes that, 
>> > but maybe the kernel has been removed and switched out with the old one?
>>
>> How did you build the kernel?
>> I suspect your device is missing the touch screen drivers (maybe the
>> drivers you have in your device are not compatible with your kernel).
>>
>> `fastboot boot` just loads your boot image into ram, it does not flash
>> the boot partition. That's why the device switches back to the old
>> kernel after reboot.
>>
>> > Another similar question is. If Id like to put the Image.lz4-dtb file 
>> > inside the AOSP ROM. Where should I put it, and is that possible? If that 
>> > would make me able to flash both kernel and ROM at the same time?
>>
>> You should update the files in device/google/crosshatch-kernel and
>> then run `make bootimage`.
>>
>> Cheers,
>> Alessio
>
> --
> --
> You received this message because you are subscribed to the "Android 
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups 
> "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to android-building+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to