Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,814,393 Members 53,679 Now Online
XDA Developers Android and Mobile Development Forum

[Scripts support init.d] Developer something that should take into account

Tip us?
 
kaiiori
Old
(Last edited by kaiiori; 19th August 2014 at 09:16 PM.)
#1  
kaiiori's Avatar
Member - OP
Thanks Meter 125
Posts: 72
Join Date: Apr 2013
Location: cabo san lucas b.c.s.

 
DONATE TO ME
Prompt [Scripts support init.d] Developer something that should take into account

Introduction:
Developers and users in general hope that this information will be of help and understand how important this issue is
to develop the script according assume smartphone

Warning:
In most of the roms we can find a folder called init.d where you will find a variety of script that are optimizations for
the system itself there is only a detail as you may have noticed the scripts that are used are the same as those used in xperia x8,
type, among other variety as well as file modifications Encourage build.prop only device in this topic we will learn to notice how
the scripts are built and running as smoothly as possible.

Because I say that the scripts are the same? Simple is good since I have seen your code and have compared with the terminals I have
the code and some things should not be there just do not serve the terminal to Encourage and lagee much scripts are not universal
trust me

Some things like values?? optimzacion kernel (sysctl) such xperia L example of code are these:
-kernel= kernel.auto_msgmni = 0
-vm= vm.block_dump = 0
-fs= fs.aio-max-nr = 65536
-net= net.core.dev_weight = 64

note: and so on the more codes each terminal should be just the scripts for each terminal

some files should not come optimizations init.d support
host file this file is normally used to block advertising terminal does support that file in init.d wonder?
comes as other files named sqlite3 that is used to access the root does support init.d ???? now the other file called zipalign that is
normally used to sign apk applications to sign in support init.d ???

the init.d support should be different for each terminal is different because each firmware should not be general
important: it is my view and my knower that is also something constructive

1.-Basic commands and file handling
command: #!/bin/bash
information: +-/home: User home directories

command cd
command to change directory.

command ls
list contents of directories

command cp
copy files/directories

command rm
delete files/directories

command mkdir
create directories

command sysctl
Configure kernel parameters at runtime

2.-All configurations such scripts
/system/etc

3.- startup file
path of the file to be started: /system/etc/init.d/init

example code:
Seed file support init.d: /system/etc/udev/rules.d/init.rules

KERNEL=="mount*", ACTION=="change", SUBSYSTEM=="platform", RUN+="/system/etc/init.d/init"

5.- permissions script
chmod 755

6.- Example of script
#!/bin/bash
# This is a comment
echo "Hello world"

7.- Conditional if o if-else
example

code if:
if value
then
values
fi

code if-else:
if value
then
values
else

8.- Code if o if-else
example:
-a file: True if the file exists
-e file: The same
-b file: True if file exists and has a special block
-c file: True if file exists and is of type character
-d file: True if file exists and is a directory
-f file: True if file exists and is a common file
-g file: True if file exists and its set bit in September GroupID
-h file: True if file exists and is a symbolic link
-k file: True if file exists and its sticky bit set
-p file: True if file exists and is a named pipe
-r file: True if file exists and is readable
-s file: True if file exists and is greater than 0
-u file: True if file exists and has the setuid bit set
-w file: True if file exists and is writable
-x file: True if file exists and has execute permissions
-O file: True if file exists and is nuetro EUID user
-G file: True if file exists and is in our group EGID
-L file: True if file exists and is a symbolic link
-S file: True if file exists and is a socket
-N file: True if file exists and has changed since the last reading

9.- Checks
example:
if [ ! -e $1 ]
then
echo “No”
fi

10.- the main thing you have to develop the script support init.d

Note: In the coming days I will do a better, more detailed documentation
.
The Following 2 Users Say Thank You to kaiiori For This Useful Post: [ Click to Expand ]
 
kaiiori
Old
#2  
kaiiori's Avatar
Member - OP
Thanks Meter 125
Posts: 72
Join Date: Apr 2013
Location: cabo san lucas b.c.s.

 
DONATE TO ME
reserved
.
The Following User Says Thank You to kaiiori For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes