View: 3649|Reply: 6

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!

20

threads

187

posts

1099

credits

Gold member

Rank: 6Rank: 6

credits
1099
Published in 2025-8-14 23:51:56 | Show all floors
"I love the way you write and share your niche! Very interesting and different! Keep it coming!        " Rub Ranking
Published in 2025-11-19 22:32:57 | Show all floors
Hello, Neat post. There is an issue along with your website in internet explorer, might test this¡K IE nonetheless is the marketplace chief and a big section of people will pass over your excellent writing due to this problem.        russian market
Published in 3 daybefore | Show all floors
Hello! I merely wish to provide a massive thumbs up for that great information you’ve got here for this post. We are returning to your blog for more soon.        findsome
Published in 3 daybefore | Show all floors
What I want to know is why I should care? I mean, not to say that what youve got to say isnt important, but I mean, its so generic. Everyones talking about this man. Give us something more, something that we can get behind so we can feel as passionately about it as you do.        blackstash
Published in yesterday 20:09 | Show all floors
An impressive share, I just now with all this onto a colleague who had previously been doing small analysis within this. And then he the fact is bought me breakfast because I stumbled upon it for him.. smile. So i want to reword that: Thnx for that treat! But yeah Thnkx for spending any time to discuss this, Personally i think strongly about this and adore reading on this topic. If at all possible, as you become expertise, could you mind updating your website to comprehend details? It really is extremely ideal for me. Large thumb up with this writing!        vookum
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list