FORUMS

Which OEM Would You Like to Help?

Most manufacturers have moments of greatness and moments of decadence, and in the past few years … more

Root T-Mobile S6/Edge on 5.1.1 Without Tripping Knox

If you purchase phones from a carrier, you may be no stranger to the difficulties … more

IonVR Coming Soon, HTC M9 Dev Edition Gets Android 5.1 – XDA TV

The HTC M9 Developer Edition has received Android 5.1. That and … more

Android 5.1.1 Omni ROM For Motorola Xoom

Back in Feb 2011, the Motorola Xoom became the first device to be sold with Android 3.0 … more

Adding a custom init.rc script

n/a posts
Thanks Meter: 0
 
By psych.half, Guest on 15th May 2014, 05:57 AM
Post Reply Subscribe to Thread Email Thread
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, 06:24 PM |#2  
moonbutt74's Avatar
Senior Member
Thanks Meter: 1,004
 
More
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, 06:37 PM |#3  
Guest
Thanks Meter: 0
 
More
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, 07:26 PM |#4  
moonbutt74's Avatar
Senior Member
Thanks Meter: 1,004
 
More
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, 07:43 PM |#5  
Guest
Thanks Meter: 0
 
More
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, 07:51 PM |#6  
moonbutt74's Avatar
Senior Member
Thanks Meter: 1,004
 
More
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, 07:56 PM |#7  
Guest
Thanks Meter: 0
 
More
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, 08:08 PM |#8  
moonbutt74's Avatar
Senior Member
Thanks Meter: 1,004
 
More
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