Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,730,529 Members 40,572 Now Online
XDA Developers Android and Mobile Development Forum

Adding a custom init.rc script

Tip us?
psych.half Old
#1  
Guest
Thanks Meter
Posts: n/a
Default Adding a custom init.rc script

i know we can add a init rc script.. by using..

import /init.something.rc in init.rc or init.<hardware>.rc

but they have to be included in the ramdisk.. so i have to like unpack boot.img, decompress ramdisk,
modify files, compress, repack, flash.. modify files, compress, repack flash.. @_@

is there some way i can get it to load a custom rc script.. in /system or some other partition? so i can just edit the rc script there..

i will add it later to ramdisk.. i just need this for testing.. is there some workaround for this??
 
moonbutt74
Old
#2  
moonbutt74's Avatar
Senior Member
Thanks Meter 124
Posts: 335
Join Date: May 2014
Default hey

Quote:
Originally Posted by psych.half View Post
i know we can add a init rc script.. by using..

import /init.something.rc in init.rc or init.<hardware>.rc

but they have to be included in the ramdisk.. so i have to like unpack boot.img, decompress ramdisk,
modify files, compress, repack, flash.. modify files, compress, repack flash.. @_@

is there some way i can get it to load a custom rc script.. in /system or some other partition? so i can just edit the rc script there..

i will add it later to ramdisk.. i just need this for testing.. is there some workaround for this??
go here
http://forum.xda-developers.com/show....php?t=2073775
[no message]

War Ensemble on Ukelele https://www.youtube.com/watch?v=VznAYy5yL2A
The Following User Says Thank You to moonbutt74 For This Useful Post: [ Click to Expand ]
psych.half Old
#3  
Guest
Thanks Meter
Posts: n/a
Quote:
Originally Posted by moonbutt74 View Post
and i know how to unpack/repack boot.img and edit ramdisk... done it like hundereds times..

the problem is that the device i am working on does not have fastboot.. so testing my changes in ramdisk is really difficult...

i just want to add a custom rc script.. somewhere in /system partition.. so i can just edit the rc script there. without having to pack/repack the boot.img

something like this should be added in init.rc or init.<hardware>.rc
Code:
import /system/etc/init.custom.rc
but i don't know where to add that..
 
moonbutt74
Old
#4  
moonbutt74's Avatar
Senior Member
Thanks Meter 124
Posts: 335
Join Date: May 2014
Question hey

Quote:
Originally Posted by psych.half View Post
and i know how to unpack/repack boot.img and edit ramdisk... done it like hundereds times..

the problem is that the device i am working on does not have fastboot.. so testing my changes in ramdisk is really difficult...

i just want to add a custom rc script.. somewhere in /system partition.. so i can just edit the rc script there. without having to pack/repack the boot.img

something like this should be added in init.rc or init.<hardware>.rc
Code:
import /system/etc/init.custom.rc
but i don't know where to add that..
okay so, probably not what you really want but maybe useful
http://forum.xda-developers.com/gala...nit-d-t2135610
http://forum.xda-developers.com/show....php?t=1276578

maybe enabling the boot script thing and biting the bullet for a one time dd will work out
when i'm testing something i switch my boot and recovery to save button ware [DON'T DO THAT IF YOUR SANE!!]
else you'll have to find some way to get the fastboot thing going, maybe test in emulator instead?
[no message]

War Ensemble on Ukelele https://www.youtube.com/watch?v=VznAYy5yL2A
The Following User Says Thank You to moonbutt74 For This Useful Post: [ Click to Expand ]
psych.half Old
#5  
Guest
Thanks Meter
Posts: n/a
Quote:
Originally Posted by moonbutt74 View Post
okay so, probably not what you really want but maybe useful
http://forum.xda-developers.com/gala...nit-d-t2135610
http://forum.xda-developers.com/show....php?t=1276578

maybe enabling the boot script thing and biting the bullet for a one time dd will work out
when i'm testing something i switch my boot and recovery to save button ware [DON'T DO THAT IF YOUR SANE!!]
else you'll have to find some way to get the fastboot thing going, maybe test in emulator instead?
that requires, the root filesystem to be rw.. the initramfs is saved in mmc... :| i will have to look into implementing it..

i have done that.. OwO

hmm.. i will see..
anyways thanks for helping...
 
moonbutt74
Old
#6  
moonbutt74's Avatar
Senior Member
Thanks Meter 124
Posts: 335
Join Date: May 2014
Question confused

Quote:
Originally Posted by psych.half View Post
that requires, the root filesystem to be rw.. the initramfs is saved in mmc... :| i will have to look into implementing it..

i have done that.. OwO

hmm.. i will see..
anyways thanks for helping...
so, you're not rooted?
can you adb?
what device?
[no message]

War Ensemble on Ukelele https://www.youtube.com/watch?v=VznAYy5yL2A
psych.half Old
#7  
Guest
Thanks Meter
Posts: n/a
Quote:
Originally Posted by moonbutt74 View Post
so, you're not rooted?
can you adb?
what device?
i am rooted.. :| i meant, changes to root filesystem are lost on reboot..
the rw kernel mentioned there saves the changes to rootfilesystem...

yeah.. adb works :v
 
moonbutt74
Old
#8  
moonbutt74's Avatar
Senior Member
Thanks Meter 124
Posts: 335
Join Date: May 2014
Question fastboot...

Quote:
Originally Posted by psych.half View Post
i am rooted.. :| i meant, changes to root filesystem are lost on reboot..
the rw kernel mentioned there saves the changes to rootfilesystem...

yeah.. adb works :v
maybe something helpful in this
http://forum.xda-developers.com/show....php?t=2317790

so what device ? what are you trying to achieve?
[no message]

War Ensemble on Ukelele https://www.youtube.com/watch?v=VznAYy5yL2A

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Hide Numbers on Your SMS and Call Logs with Reflection

How many times have you given your device to someone else in order to show them a … more

Implement Split View in Your LG G2 KitKat Rom with Automated Installer

Some of you may have remembered a story on the Portal a few weeks back … more

Cast Your Device Screen the Way it Was Meant to be with Second Screen

Not too long ago here on the XDA Portal, we covered how Google had made … more

Samsung Gear Live Unboxed the XDA Way – XDA Developer TV

XDA Developer TV Producer AdamOutleris known for his XDA Unboxingseries where … more