Touchscreen not working after building and flashing clean msm kernel for the Google Pixel blueline

3,602 views
Skip to first unread message

chiang...@gmail.com

unread,
Mar 29, 2019, 10:26:25 AM3/29/19
to Android Building
Hi

I have built and flashed clean AOSP.
fastboot flashall -w
Which worked like a charm.

Thn I build msm and flashed it with
fastboot boot Image.lz4-dtb

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?

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?

Alessio Balsini

unread,
Mar 29, 2019, 10:45:37 AM3/29/19
to android-...@googlegroups.com
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

chiang...@gmail.com

unread,
Apr 1, 2019, 12:40:30 PM4/1/19
to Android Building
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!

Alessio Balsini

unread,
Apr 2, 2019, 4:49:06 AM4/2/19
to android-...@googlegroups.com
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
> --
> --
> You received this message because you are subscribed to the "Android Building" mailing list.
> To post to this group, send email to android-...@googlegroups.com
> To unsubscribe from this group, send email to
> android-buildi...@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-buildi...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Chiang Lee

unread,
Apr 2, 2019, 11:51:43 AM4/2/19
to android-...@googlegroups.com
Thank you!
This seemed to work :)
Had to run the adb disable-verity command before remounting.

I tried enabling dm-verity after pushing the .ko modules

It has resulted in "Your device is corrupt. It can't be trusted and may not work properly.
Visit this link on another device: g.co/ABH"

Pressing the power button to continue takes me into the bootloader for a few seconds, I see the Google logo for about 1sec. And Im back into the Fastboot Mode. I guess I can flash Pixel factory image. But how do I get pass the dm-verity check?

Thanks!

Alessio Balsini

unread,
Apr 2, 2019, 5:23:04 PM4/2/19
to android-...@googlegroups.com
> Thank you!
> This seemed to work :)
> Had to run the adb disable-verity command before remounting.

That's strange, `adb remount` with -R should also disable verity.
Anyway, cool that it worked.

> I tried enabling dm-verity after pushing the .ko modules
>
> It has resulted in "Your device is corrupt. It can't be trusted and may not work properly.
> Visit this link on another device: g.co/ABH"
>
> Pressing the power button to continue takes me into the bootloader for a few seconds, I see the Google logo for about 1sec. And Im back into the Fastboot Mode. I guess I can flash Pixel factory image. But how do I get pass the dm-verity check?

That is an expected behavior, enforced for security reasons.
Unfortunately, being able to pass the verity checks would require to
update vendor.img, as well as the keys for all the verity checks, that
is not possible...

Regards,
Alessio

chiang...@gmail.com

unread,
Apr 3, 2019, 9:42:31 AM4/3/19
to Android Building
Thanks!

Hmm,

So it is not possible to flash custom ROM/kernels on the Google Pixel Device ending up with enabled dm-verity? Or is that for all Android Devices? Is it possible to flash custom rom/kernels without disabling dm-verity?

Raymond Wanyoike

unread,
Jun 3, 2019, 9:49:53 AM6/3/19
to Android Building
Hello,

Following the guide at https://source.android.com/setup/build/building-kernels for the Pixel 3 (blueline) will put you in the same situation; a bootable kernel, but without touchscreen (and I suspect other drivers, like audio) working:

$ repo init -u https://android.googlesource.com/kernel/manifest -b android-msm-crosshatch-4.9-pie-qpr2
$ repo sync
$ build/build.sh
$ adb reboot bootloader
$ fastboot boot out/dist/Image.lz4-dtb
$ # boots, but :(


> I suspect your device is missing the touch screen drivers (maybe the 
> drivers you have in your device are not compatible with your kernel). 

I find it odd that custom Pixel 3 kernels available on XDA (https://forum.xda-developers.com) boot and work (fastboot boot <kernel>) with stock vendor modules, but the kernels generated from the build guide requires workarounds to move things to /vendor/lib/modules.

Would this mean that the guide is broken for Pixel 3 (blueline), that the build/build.sh script is not suitable for building stock vendor compatible kernels?

Michael Burrows

unread,
Jun 3, 2019, 9:50:24 AM6/3/19
to Android Building
Thank you for helping me out a while back Alessio! I am now about to build the kernel again. Is there a way to implement the touchdriver(and maybe other drivers missing aswell) before building? To avoid having to do the steps you have provided me with? I know there are drivers I have to download before building AOSP. But I cannot seem to find any information about downloading drivers for the kernel.

Thank you once again

Alessio Balsini

unread,
Jun 3, 2019, 10:31:22 AM6/3/19
to android-...@googlegroups.com
Not so easy... :) Drivers built for a given kernel may not be
compatible with a different kernel build due to ABI breakages.
As a result, in most of the cases (is ABI changed), old drivers must
be substituted with new ones to work.

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-...@googlegroups.com
> To unsubscribe from this group, send email to
> android-buildi...@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-buildi...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/972c4d83-7eb3-4bde-a8ae-288f2f4edf8e%40googlegroups.com.

Raymond Wanyoike

unread,
Jun 3, 2019, 11:59:30 AM6/3/19
to android-...@googlegroups.com
OK; more troubleshooting. 😅 Compiled the blueline kernel; patched it with root (su); and booted it it up:

...
$ adb shell
$ su
# insmod /vendor/lib/modules/snd-soc-sdm845.ko
insmod: failed to load /vendor/lib/modules/snd-soc-sdm845.ko: Required key not available
# dmesg | tail -n3
[  507.155988] PMI: smblib_get_prop_dc_online: POWER_PATH_STATUS = 0x95
[  507.156461] healthd: battery l=88 v=4314 t=27.6 h=2 st=2 c=-494 fc=2956000 cc=65 chg=u
[  519.116179] PKCS#7 signature not signed with a trusted key


😅 signature not signed with a trusted key

You received this message because you are subscribed to a topic in the Google Groups "Android Building" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-building/ou630PviyDc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to android-buildi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/CAKM9miKVVSzXkTVgfpaqbfS66R7DRxfbyCtWB3qR%3Dufo2BpZbw%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.


--
Raymond

Alessio Balsini

unread,
Jun 3, 2019, 12:38:54 PM6/3/19
to android-...@googlegroups.com
Wasn't that module already loaded by init?

-Alessio

Raymond Wanyoike

unread,
Jun 3, 2019, 3:08:00 PM6/3/19
to android-...@googlegroups.com
I don't know; dmesg shows a bunch of errors in early boot:

# dmesg|grep PKCS#7
[    1.846059] PKCS#7 signature not signed with a trusted key
[    1.855653] PKCS#7 signature not signed with a trusted key
[    1.864403] PKCS#7 signature not signed with a trusted key
[    1.871683] PKCS#7 signature not signed with a trusted key
[    1.881490] PKCS#7 signature not signed with a trusted key
[    1.897577] PKCS#7 signature not signed with a trusted key
[    1.908881] PKCS#7 signature not signed with a trusted key
[    1.921134] PKCS#7 signature not signed with a trusted key
[    1.937646] PKCS#7 signature not signed with a trusted key
[    1.957838] PKCS#7 signature not signed with a trusted key


I tracked down the touchscreen module to /vendor/lib/modules/ftm5.ko

# insmod /vendor/lib/modules/ftm5.ko
insmod: failed to load /vendor/lib/modules/ftm5.ko: Required key not available

I'll keep digging...


For more options, visit https://groups.google.com/d/optout.


--
Raymond

Людмила Салмина

unread,
Jun 13, 2019, 12:28:01 PM6/13/19
to android-...@googlegroups.com

пн, 3 июн. 2019 г., 17:49 Raymond Wanyoike <raymond....@gmail.com>:
--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@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-buildi...@googlegroups.com.

Saurabh Sakhare

unread,
Aug 9, 2019, 10:58:50 AM8/9/19
to Android Building


On Friday, March 29, 2019 at 7:56:25 PM UTC+5:30, chiang...@gmail.com wrote:
Hi
I have a doubt. If i compile kernel with gcc. It boots up but touch screen is not working can I use AOSP gcc compiled modules.? 
 will it work?  

Alessio Balsini

unread,
Aug 9, 2019, 12:39:37 PM8/9/19
to Android Building


On Monday, June 3, 2019 at 12:08:00 PM UTC-7, Raymond Wanyoike wrote:
I don't know; dmesg shows a bunch of errors in early boot:

# dmesg|grep PKCS#7
[    1.846059] PKCS#7 signature not signed with a trusted key
[    1.855653] PKCS#7 signature not signed with a trusted key
[    1.864403] PKCS#7 signature not signed with a trusted key
[    1.871683] PKCS#7 signature not signed with a trusted key
[    1.881490] PKCS#7 signature not signed with a trusted key
[    1.897577] PKCS#7 signature not signed with a trusted key
[    1.908881] PKCS#7 signature not signed with a trusted key
[    1.921134] PKCS#7 signature not signed with a trusted key
[    1.937646] PKCS#7 signature not signed with a trusted key
[    1.957838] PKCS#7 signature not signed with a trusted key


I tracked down the touchscreen module to /vendor/lib/modules/ftm5.ko

# insmod /vendor/lib/modules/ftm5.ko
insmod: failed to load /vendor/lib/modules/ftm5.ko: Required key not available

I'll keep digging...

On Mon, Jun 3, 2019 at 7:38 PM 'Alessio Balsini' via Android Building <android-...@googlegroups.com> wrote:
Wasn't that module already loaded by init?

-Alessio


> 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-...@googlegroups.com.

> To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/972c4d83-7eb3-4bde-a8ae-288f2f4edf8e%40googlegroups.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-...@googlegroups.com
To unsubscribe from this group, send email to

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 a topic in the Google Groups "Android Building" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-building/ou630PviyDc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to android-...@googlegroups.com.


--
Raymond

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to

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-...@googlegroups.com.

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to

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 a topic in the Google Groups "Android Building" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-building/ou630PviyDc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to android-...@googlegroups.com.


--
Raymond

Luca Porzio

unread,
Oct 8, 2020, 11:48:15 AM10/8/20
to Android Building
Hi,

Did anybody tried to overwrite the vendor modules by using Magisk remounting ?

Thanks,
   Luca

Reply all
Reply to author
Forward
0 new messages