View: 1249|Reply: 1

CM4 Android 11 - making persistent changes to ueventd.rc

[Copy link]

1

threads

2

posts

23

credits

Novice

Rank: 1

credits
23
Published in 2023-10-16 07:52:41 | Show all floors |Read mode
Hi,


I'm developping an app which accesses the hardware directly and requires access to /dev/i2c-2. For the app to work I need to set /dev/i2c-2 access permissions to 666. I currently do this via:
  1. chmod 666 /dev/i2c-2
Copy code
this works OK but it is not persistent and has to be repeated after each reboot.

My understanding is that I can accomplish the same by modfying ueventd.rc but the file is currently read-only as it is on a ramdisk wich gets mounted from an image file at boot time.

I don't know where this image file is located or if it is possible to modify it.

Any ideas?

Thanks!

1

threads

2

posts

23

credits

Novice

Rank: 1

credits
23
 Author| Published in 2023-10-17 13:23:02 | Show all floors
So it turns out I was missing a step...

After doing: adb root
I also had to do an: adb remount

Which will remount /system and /vendor as read/write allowing changes. Then I am able to edit and save changes to /vendor/ueventd.rc which already contains an inscription for /dev/i2c-2...

So there was no need to play around with the boot image file.

Hope this helps someone!
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list