Edit init.rc file for Android

Post Reply
im7RJ
Posts: 4
Joined: Tue Sep 14, 2021 11:28 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 1 time
Been thanked: 0
Contact:

Edit init.rc file for Android

Post by im7RJ »

I am trying to add e2fsck command to init.rc because I want the odroid to check the partitions everytime it boots. But since it is read-only I cannot make changes to it or delete it. Also, according to what I have read on internet it seems that you have to make changes in Ramdisk to make the change permanent. Does anyone know how this can be achieved?

Luke.go
Posts: 652
Joined: Mon May 30, 2016 1:55 pm
languages_spoken: english
Has thanked: 91 times
Been thanked: 99 times
Contact:

Re: Edit init.rc file for Android

Post by Luke.go »

Please try to write your commands to /odm/etc/init/*.rc files. :)
These users thanked the author Luke.go for the post:
im7RJ (Fri Sep 17, 2021 11:18 pm)

im7RJ
Posts: 4
Joined: Tue Sep 14, 2021 11:28 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Edit init.rc file for Android

Post by im7RJ »

thank you, I have achieved this however it didn't solve my problem.

This is my problem:-
I want my Odroid N2 Android to check the disk on every boot and if it detects some error or detects that the disk is corrupted it should repair itself. I need some suggestion regarding this. I have tried to run a script on every boot, however since the disks are mounted by then and they are in use I can't umount the disk and run e2fsck on the disk. I have used tune2fs -c 1 to check the disk on each boot, however I don't know whether it only checks the file system and doesn't repair it. If you can confirm this I will be grateful. But I think that it only checks and doesn't repair. I would really appreciate your help on this matter. The odroid N2 is not easily accessible once it has been put to use and due to this I really need it to do this.

Post Reply

Return to “Android”

Who is online

Users browsing this forum: No registered users and 3 guests