Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vendor overlay breaks stock vendor mount #233

Closed
natsumerinchan opened this issue Feb 12, 2023 · 51 comments
Closed

vendor overlay breaks stock vendor mount #233

natsumerinchan opened this issue Feb 12, 2023 · 51 comments

Comments

@natsumerinchan
Copy link
Contributor

natsumerinchan commented Feb 12, 2023

Describe the bug
I get stuck on the first screen when I first start up after installed this module.

After successfully entering the system, the module has been disabled.

To Reproduce
Steps to reproduce the behavior:

  1. Flash this module 门禁卡.zip
  2. Reboot

Expected behavior
This module is created by cardemulator, allows the app to systemless modify /vendor/etc/libnfc-nxp.conf for the purpose of emulating nfc cards.

Screenshots
If applicable, add screenshots to help explain your problem.
After the second time reboot

Smartphone (please complete the following information):

  • Device: [Oneplus 9RT]
  • OS: [PixelOS]
  • Version [33]

Additional context
Add any other context about the problem here.
KernelSU_bugreport_2023-02-12_14_16.tar.gz

@tiann
Copy link
Owner

tiann commented Feb 12, 2023

please execute: ls -al /system and give me the output

@natsumerinchan
Copy link
Contributor Author

截图 2023-02-12 14-48-29

@tiann
Copy link
Owner

tiann commented Feb 12, 2023

After install the nfc module, execute: chcon u:object_r:vendor_configs_file:s0 /data/adb/ksu/modules/NFC_Card_Emulator/vendor/etc/libnfc-nxp.conf and have a try

@natsumerinchan
Copy link
Contributor Author

I flashed the module and no system folder appeared, are they in modules_update.img?I haven't rebooted yet.
Screenshot_20230212-152859_质感文件

So I try to add customize.sh and post-fs-data.sh to set selinux context but it is still error.

nfc.zip

@tiann
Copy link
Owner

tiann commented Feb 12, 2023

What happened if you rename the libnfc-nxp.conf to someone else?

@natsumerinchan
Copy link
Contributor Author

I renamed it to celica.conf and it is still error

@tiann
Copy link
Owner

tiann commented Feb 12, 2023

only an empty /vendor/etc would cause error?

@natsumerinchan
Copy link
Contributor Author

yes

@tiann
Copy link
Owner

tiann commented Feb 12, 2023

Maybe add chcon u:object_r:vendor_configs_file:s0 /vendor/etc ?

@natsumerinchan
Copy link
Contributor Author

Failed.
nfc.zip

@tiann
Copy link
Owner

tiann commented Feb 12, 2023

please execute: ls -alZ /vendor and ls -alZ /vendor/etc

@natsumerinchan
Copy link
Contributor Author

vendor.txt
vendor-etc.txt

@tiann
Copy link
Owner

tiann commented Feb 12, 2023

And what is mount -t overlay?

@natsumerinchan
Copy link
Contributor Author

[celica@arch ~]$ adb shell
martini:/ $ su
martini:/ # mount -t overlay
overlay on /system type overlay (ro,seclabel,relatime,lowerdir=/data/adb/ksu/modules/lhroot/system:/data/adb/ksu/modules/xmlpak/system:/data/adb/ksu/modules/busybox-ndk/system:/data/adb/ksu/modules/zygisksu/system:/data/adb/ksu/modules/lxgwttftemplatec/system:/data/adb/ksu/modules/zipsigner/system:/data/adb/ksu/modules/magic-flash/system:/data/adb/ksu/modules/go-touch-mapper/system:/data/adb/ksu/modules/com.aurora.services/system:/data/adb/ksu/modules/nano-ndk/system:/system)
overlay on /product type overlay (ro,seclabel,relatime,lowerdir=/data/adb/ksu/modules/lxgwttftemplatec/product:/product)
martini:/ #

@tiann
Copy link
Owner

tiann commented Feb 12, 2023

When you install the nfc module(dont reboot), upload the /data/adb/ksu/modules_update.img

@natsumerinchan
Copy link
Contributor Author

@tiann
Copy link
Owner

tiann commented Feb 12, 2023

Install the module and before reboot, replace modules_update.img with this one: https://taichi.lanzoum.com/itpkU0nccefc
(unzip it first)

@natsumerinchan
Copy link
Contributor Author

Still error😂

@tiann
Copy link
Owner

tiann commented Feb 12, 2023

What if you put a setenforce 0 to post-fs-data.sh?

@natsumerinchan
Copy link
Contributor Author

Still the same, maybe the problem is not on selinux?

@tiann
Copy link
Owner

tiann commented Feb 12, 2023

please try this: https://taichi.lanzoum.com/ij6GE0nchlwb

@natsumerinchan
Copy link
Contributor Author

natsumerinchan commented Feb 12, 2023

It is booting success now!But the file have not overlayed to the real /vendor/etc directory.
Screenshot_20230212-171807_质感文件
Screenshot_20230212-171831_质感文件

@tiann
Copy link
Owner

tiann commented Feb 12, 2023

What is mount -t overlay?

@natsumerinchan
Copy link
Contributor Author

[celica@arch ~]$ adb shell
martini:/ $ su
martini:/ # mount -t overlay
overlay on /system type overlay (ro,seclabel,relatime,lowerdir=/data/adb/ksu/modules/lhroot/system:/data/adb/ksu/modules/xmlpak/system:/data/adb/ksu/modules/busybox-ndk/system:/data/adb/ksu/modules/zygisksu/system:/data/adb/ksu/modules/lxgwttftemplatec/system:/data/adb/ksu/modules/zipsigner/system:/data/adb/ksu/modules/magic-flash/system:/data/adb/ksu/modules/go-touch-mapper/system:/data/adb/ksu/modules/com.aurora.services/system:/data/adb/ksu/modules/nano-ndk/system:/system)
overlay on /product type overlay (ro,seclabel,relatime,lowerdir=/data/adb/ksu/modules/lxgwttftemplatec/product:/product)
martini:/ #                                                                                                                                                                                                                                   martini:/ #

@tiann
Copy link
Owner

tiann commented Feb 12, 2023

vendor overlay is gone? ls -alZ /data/adb/ksu/modules/NFC_Card_Emulator?

@natsumerinchan
Copy link
Contributor Author

截图 2023-02-12 17-51-35

@tiann
Copy link
Owner

tiann commented Feb 12, 2023

Please send me the log in Settings - Send log

@natsumerinchan
Copy link
Contributor Author

@tiann
Copy link
Owner

tiann commented Feb 12, 2023

Log Catcher-v22.5(27).zip

The logcat buffer is gone, please use this module get logcat.

the log will be /cache/bootlog or /data/local/bootlog

@natsumerinchan
Copy link
Contributor Author

@tiann
Copy link
Owner

tiann commented Feb 12, 2023

@natsumerinchan
Copy link
Contributor Author

Bootloop now,how to enable safety mode

@tiann
Copy link
Owner

tiann commented Feb 12, 2023

Your device would bootloop with only one /system/vendor folder?

@tiann
Copy link
Owner

tiann commented Feb 12, 2023

Bootloop now,how to enable safety mode

I don't have Oneplus device, but for xiaomi devices, you can reboot to recovery, and there is a option "reboot with safe mode"

@natsumerinchan
Copy link
Contributor Author

I will try to flash the offical boot and use magisk to delete nfc module

@natsumerinchan
Copy link
Contributor Author

Maybe kernelsu should add a feature that automatically disables all modules after 3 bootloops?

@natsumerinchan
Copy link
Contributor Author

Start up now

@natsumerinchan
Copy link
Contributor Author

Only install nfc and log catcher

Screenshot_20230212-191210_KernelSU
bootlog.tar.gz
oldlogbak.tar.gz
boot-2023-02-12-19-11-33.log

@tiann
Copy link
Owner

tiann commented Feb 12, 2023

install the module and upload modules_update.img

@natsumerinchan
Copy link
Contributor Author

@tiann
Copy link
Owner

tiann commented Feb 12, 2023

How about this one?
modules_update.img.zip

@natsumerinchan
Copy link
Contributor Author

@tiann
Copy link
Owner

tiann commented Feb 13, 2023

I have no idea why simply overlay vendor would cause bootloop, i test Redmi and pixel, it seems working.

When bootloop, is the system_server or adbd launched?

@natsumerinchan
Copy link
Contributor Author

Vibrate when booting, can not connect to adbd.

@natsumerinchan
Copy link
Contributor Author

natsumerinchan commented Feb 13, 2023

@HuskyDG
Copy link
Contributor

HuskyDG commented Feb 14, 2023

There are some mounts under /vendor

@HuskyDG
Copy link
Contributor

HuskyDG commented Feb 14, 2023

I think KernelSU didn't handle this.
Screenshot_20230214-181938_Trình chạy Pixel

@tiann
Copy link
Owner

tiann commented Feb 14, 2023

I think KernelSU didn't handle this. Screenshot_20230214-181938_Trình chạy Pixel

I think so

@natsumerinchan
Copy link
Contributor Author

截图 2023-02-14 19-59-43

@tiann tiann changed the title Cannot to use nfc card emulation module vendor overlay breaks stock vendor mount Feb 21, 2023
@tiann
Copy link
Owner

tiann commented Feb 21, 2023

KernelSU_v0.3.8-28-g47bcccd-release.apk.zip
@natsumerinchan Could you test this package?

@natsumerinchan
Copy link
Contributor Author

natsumerinchan commented Feb 21, 2023

KernelSU_v0.3.8-28-g47bcccd-release.apk.zip @natsumerinchan Could you test this package?

Nice!!! It is working now:

Screenshot_20230221-201346_质感文件
Screenshot_20230221-201448_质感文件
Screenshot_20230221_202135

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants