Github Tutorial App Shows You How to Use… Github

Github can get pretty complicated and using it can become quite daunting, especially … more

Google Glass-like Clip-On For Regular Glasses Developed by Sony

For the price of $2,000, a pair of glasses that can run apps, take pictures, … more

Micromax Takes OnePlus to Court! Android Wear Receives Lollipop – XDA TV

Android 5.0 Lollipop is available officially for the Moto 360! … more

Google Invites Selected Devs to Buy Project Tango Development Kit

Just about a month ago, the curious Project Tango development kit was … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Adding a custom init.rc script

OP psych.half

psych.half
15th May 2014, 06:57 AM   |  #1  
Guest
Thanks Meter: 0
 
n/a posts
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??
27th May 2014, 07:24 PM   |  #2  
moonbutt74's Avatar
Senior Member
Thanks Meter: 414
 
896 posts
Join Date:Joined: May 2014
hey
Quote:
Originally Posted by psych.half

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
The Following User Says Thank You to moonbutt74 For This Useful Post: [ View ]
psych.half
27th May 2014, 07:37 PM   |  #3  
Guest
Thanks Meter: 0
 
n/a posts
Quote:
Originally Posted by moonbutt74

go here
http://forum.xda-developers.com/show....php?t=2073775

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..
27th May 2014, 08:26 PM   |  #4  
moonbutt74's Avatar
Senior Member
Thanks Meter: 414
 
896 posts
Join Date:Joined: May 2014
Question hey
Quote:
Originally Posted by psych.half

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?
The Following User Says Thank You to moonbutt74 For This Useful Post: [ View ]
psych.half
27th May 2014, 08:43 PM   |  #5  
Guest
Thanks Meter: 0
 
n/a posts
Quote:
Originally Posted by moonbutt74

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...
27th May 2014, 08:51 PM   |  #6  
moonbutt74's Avatar
Senior Member
Thanks Meter: 414
 
896 posts
Join Date:Joined: May 2014
Question confused
Quote:
Originally Posted by psych.half

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?
psych.half
27th May 2014, 08:56 PM   |  #7  
Guest
Thanks Meter: 0
 
n/a posts
Quote:
Originally Posted by moonbutt74

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
27th May 2014, 09:08 PM   |  #8  
moonbutt74's Avatar
Senior Member
Thanks Meter: 414
 
896 posts
Join Date:Joined: May 2014
Question fastboot...
Quote:
Originally Posted by psych.half

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?

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes