[HELP] Need help to modify boot.img for sdcard boot - Xiaomi Redmi 2 Questions & Answers

Hello,
My internal memory emmc is dead even bad sector on the bootloader picture with a line of colored pixel.
I try to found the best way for move all to the external sdcard but someone can help me to choose the right line to modify please ? (fstab seem not enough)
./ueventd.rc:/dev/block/bootdevice/by-name/config 0660 system system
./ueventd.qcom.rc:/dev/block/bootdevice/by-name/config 0660 system system
./fstab.qcom:/dev/block/bootdevice/by-name/system /system ext4 ro,barrier=1,discard wait
./fstab.qcom:/dev/block/bootdevice/by-name/userdata /data ext4 nosuid,nodev,barrier=1,noauto_da_alloc,discard wait,check,resize,encryptable=footer
./fstab.qcom:/dev/block/bootdevice/by-name/config /frp emmc defaults defaults
./fstab.qcom:/devices/soc.0/7864900.sdhci/mmc_host /storage/sdcard1 vfat nosuid,nodev wait,voldmanaged=sdcard1:auto,noemulatedsd
./init.rc: mkdir /storage 0751 root sdcard_r
./init.rc: group drm system inet drmrpc sdcard_r sdcard_rw media_rw
./init.target.rc: mount ext4 /dev/block/bootdevice/by-name/cache /cache nosuid nodev barrier=1
./init.target.rc: mount ext4 /dev/block/bootdevice/by-name/persist /persist nosuid nodev barrier=1
./init.target.rc: mount vfat /dev/block/bootdevice/by-name/modem /firmware ro context=ubject_r:firmware_file:s0,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337
./init.target.rc: mount ext4 /dev/block/bootdevice/by-name/system /system ro barrier=1
./init.qcom.rc: mkdir /mnt/media_rw/sdcard1 0700 media_rw media_rw
./init.qcom.rc: mkdir /storage/sdcard1 0700 root root
./init.qcom.rc: export SECONDARY_STORAGE /storage/sdcard1
./init.qcom.rc: symlink /storage/emulated/legacy /sdcard
./init.qcom.rc: symlink /storage/emulated/legacy /mnt/sdcard
./init.qcom.rc: symlink /storage/emulated/legacy /storage/sdcard0
./init.qcom.rc: group bluetooth net_bt_admin sdcard_rw sdcard_r media_rw
./init.qcom.rc: group radio cache inet misc audio sdcard_r sdcard_rw diag qcom_diag log
./init.qcom.rc: group radio cache inet misc audio sdcard_r sdcard_rw diag qcom_diag log
./init.qcom.rc:service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
./init.qcom.rc:service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/sdcard1 /storage/sdcard1
./init.qcom.rc:service fuse_uicc0 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/uicc0 /storage/uicc0
./init.qcom.rc:service fuse_uicc1 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/uicc1 /storage/uicc1
./init.qcom.rc:service fuse_usbotg /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/usbotg /storage/usbotg
./init.qcom.rc: group system qcom_diag sdcard_rw sdcard_r media_rw
./init.qcom.rc: group system qcom_diag sdcard_rw sdcard_r media_rw
./init.qcom.rc: group root inet log sdcard_r sdcard_rw qcom_diag radio net_raw
./init.qcom.factory.rc: mount vfat /dev/block/mmcblk1p1 /storage/sdcard1
./init.qcom.sh:emmc_boot=`getprop ro.boot.emmc`
./file_contexts:/dev/block/bootdevice/by-name/modemst1 ubject_r:modem_efs_partition_device:s0
./file_contexts:/dev/block/bootdevice/by-name/modemst2 ubject_r:modem_efs_partition_device:s0
./file_contexts:/dev/block/bootdevice/by-name/fsg ubject_r:modem_efs_partition_device:s0
./file_contexts:/dev/block/bootdevice/by-name/fsc ubject_r:modem_efs_partition_device:s0
./file_contexts:/dev/block/bootdevice/by-name/ssd ubject_r:ssd_device:s0
./file_contexts:/dev/block/bootdevice/by-name/mdm1m9kefs1 ubject_r:efs_boot_dev:s0
./file_contexts:/dev/block/bootdevice/by-name/mdm1m9kefs2 ubject_r:efs_boot_dev:s0
./file_contexts:/dev/block/bootdevice/by-name/mdm1m9kefs3 ubject_r:efs_boot_dev:s0
./file_contexts:/dev/block/bootdevice/by-name/mdm1m9kefsc ubject_r:efs_boot_dev:s0
./file_contexts:/dev/block/bootdevice/by-name/misc ubject_r:misc_partition:s0
./file_contexts:/dev/block/bootdevice/by-name/bootselect ubject_r:bootselect_device:s0
./file_contexts:/dev/block/bootdevice/by-name/config ubject_rersistent_data_block_device:s0
./file_contexts:/dev/block/mmcblk0rpmb ubject_r:rpmb_device:s0
./file_contexts:/dev/block/mmcblk1 ubject_r:sd_device:s0
./file_contexts:/dev/block/mmcblk1p1 ubject_r:sd_device:s0
./file_contexts:/dev/block/mmcblk0 ubject_r:mmc_block_device:s0
./file_contexts:/system/bin/sdcard ubject_r:sdcardd_exec:s0
Click to expand...
Click to collapse
Thank you for your help and ask if I missing a file in the boot.img file.

Related

APPS2SD newbie help please please

can anyone help me?? I don't get the line /system/sd to continue procedure for installing apps on SD card..... I have Amon Ra 1.6 recovery but original ROM.....
I must change ROM or any good and expert user can help me to resolve this enigma?
List of command via Windows 7 consolle CMD terminal.
List of devices attached
HT9AWLG02845 device
C:\A21\tools>adb remount
remount succeeded
C:\A21\tools>adb shell
# dd if=/sdcard/busybox of=/system/xbin/busybox
dd if=/sdcard/busybox of=/system/xbin/busybox
/system/xbin/busybox: cannot open for write: No such file or directory
# dd if=/sdcard/busybox of=/system/bin/busybox
dd if=/sdcard/busybox of=/system/bin/busybox
1283+1 records in
1283+1 records out
657372 bytes transferred in 0.305 secs (2155318 bytes/sec)
# chmod 4755 /system/bin/busybox
chmod 4755 /system/bin/busybox
# busybox df -h
busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 93.0M 0 93.0M 0% /dev
tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock3 150.0M 136.5M 13.5M 91% /system
/dev/block/mtdblock5 165.1M 149.2M 15.9M 90% /data
/dev/block/mtdblock4 150.0M 4.9M 145.1M 3% /cache
/dev/block//vold/179:1
6.6G 3.0G 3.6G 46% /sdcard
#
# su
# ls -l /data
lrwxrwxrwx root root 2010-06-14 01:35 drm -> /data/local
-rwxrwxrwx media system 44 2010-07-15 22:35 awbautocal.bin
drwxr-xr-x system system 2010-06-24 14:42 tombstones
drwxrwx--t system misc 2010-06-14 01:36 misc
drwxrwx--x system system 2010-06-14 01:35 app-private
-rw-rw-rw- root shell 91 2010-07-02 22:34 reboot.chk
drwxrwx--x system system 2010-07-17 22:52 data
drwxrwx--x system system 2010-07-17 22:52 dalvik-cache
drwxrwx--x system system 2010-07-17 22:52 app
drwx------ root root 2010-07-11 17:17 property
drwxrwx--x shell shell 2010-06-14 01:36 local
drwxrwxrwx bluetooth bluetooth 2010-06-28 22:05 btips
-rw-rw-rw- media system 14 2010-07-10 13:14 StreamingPacketLost.txt
drwxrwx--x system system 2010-07-12 00:12 anr
prw-r--r-- system system 2010-06-14 19:36 gps_nmea_fifo
drwxrwxr-x system system 2010-07-17 22:52 system
drwxrwx--- root root 1980-01-06 03:12 lost+found
#su
# busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 93.0M 0 93.0M 0% /dev
tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock3 150.0M 136.5M 13.5M 91% /system
/dev/block/mtdblock5 165.1M 148.5M 16.7M 90% /data
/dev/block/mtdblock4 150.0M 4.8M 145.2M 3% /cache
/dev/block//vold/179:1
6.6G 2.8G 3.8G 42% /sdcard
#

There's some interesting stuff in here

So, I lost the inital backup I made of my A7 before I started screwing with it, so I was making another, since most everything is working. I was snooping around some of the files and found some interesting stuff. Check it out!
Billy
Code:
/init.goldfish.rc
on boot
setprop ARGH ARGH
setprop net.eth0.dns1 10.0.2.3
setprop net.gprs.local-ip 10.0.2.15
setprop ro.radio.use-ppp no
setprop ro.build.product generic
setprop ro.product.device generic
# fake some battery state
setprop status.battery.state Slow
setprop status.battery.level 5
setprop status.battery.level_raw 50
setprop status.battery.level_scale 9
# disable some daemons the emulator doesn't want
stop dund
stop akmd
setprop ro.setupwizard.mode EMULATOR
# enable Google-specific location features,
# like NetworkLocationProvider and LocationCollector
setprop ro.com.google.locationfeatures 1
# For the emulator, which bypasses Setup Wizard, you can specify
# account info for the device via these two properties. Google
# Login Service will insert these accounts into the database when
# it is created (ie, after a data wipe).
#
# setprop ro.config.hosted_account [email protected]:password
# setprop ro.config.google_account [email protected]:password
#
# You MUST have a Google account on the device, and you MAY
# additionally have a hosted account. No other configuration is
# supported, and arbitrary breakage may result if you specify
# something else.
service goldfish-setup /system/etc/init.goldfish.sh
oneshot
service qemud /system/bin/qemud
socket qemud stream 666
oneshot
# -Q is a special logcat option that forces the
# program to check wether it runs on the emulator
# if it does, it redirects its output to the device
# named by the androidboot.console kernel option
# if not, is simply exit immediately
service goldfish-logcat /system/bin/logcat -Q
oneshot
Code:
/init_recovery.rc
on init
# setup the global environment
export PATH /sbin:/system/sbin:/system/bin:/system/xbin
export LD_LIBRARY_PATH /system/lib
export PATH /sbin
export ANDROID_ROOT /system
export ANDROID_DATA /data
export EXTERNAL_STORAGE /sdcard
# Backward compatibility
symlink /system/etc /etc
symlink /sys/kernel/debug /d
# create mountpoints
mkdir /sdcard
mkdir /misc
#mkdir /staging
mkdir /system
mkdir /data
mkdir /cache
mount tmpfs /tmp /tmp
# mount mtd partitions
# Mount /system rw first to give the filesystem a chance to save a checkpoint
mount ext3 /dev/block/mmcblk3p1 /system
mount ext3 /dev/block/mmcblk3p1 /system ro remount
mount ext3 /dev/block/mmcblk3p2 /cache nosuid nodev
chown system cache /cache
chmod 0770 /cache
mount ext3 /dev/block/mmcblk3p3 /misc nosuid nodev
chown system misc /misc
chmod 0770 /misc
#temparyRCK
# ulimit -l unlimited
#mount ext3 /dev/block/mmcblk3px /staging nosuid nodev
#chown system staging /staging
#chmod 0770 /staging
mount ext3 /dev/block/mmcblk3p5 /data nosuid nodev
# mount ext3 /dev/block/mmcblk3p5 /data nosuid nodev
chown system system /data
chmod 0771 /data
#temparyRCK
#mount vfat /dev/block/vold/179:1 /mnt/sdcard nosuid nodev
mount vfat /dev/block/mmcblk0p1 /sdcard nosuid nodev
chown system system /sdcard
chmod 0777 /sdcard
on boot
#adjust the dalivk size
setprop dalvik.vm.heapsize 64m
# basic network init
ifup lo
hostname localhost
domainname localdomain
class_start default
service console /system/bin/sh
console
service adbd /sbin/adbd
disabled
on property:ro.kernel.qemu=1
start adbd
on property:persist.service.adb.enable_NV_DISABLED=1
start adbd
on property:persist.service.adb.enable=0
stop adbd
service recovery /sbin/recovery
service debuggerd /system/bin/debuggerd
on property:persist.service.adb.enable_NV_DISABLED=1
insmod /system/lib/hw/g_android.ko
start adbd
Code:
/init.rc
on init
sysclktz 0
loglevel 3
# setup the global environment
export PATH /system/bb:/sbin:/system/sbin:/system/bin:/system/xbin
export LD_LIBRARY_PATH /system/lib
export ANDROID_BOOTLOGO 1
export ANDROID_ROOT /system
export ANDROID_ASSETS /system/app
export ANDROID_DATA /data
export EXTERNAL_STORAGE /storage
export ASEC_MOUNTPOINT /mnt/asec
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/com.nvidia.graphics.jar
# Backward compatibility
symlink /system/etc /etc
symlink /sys/kernel/debug /d
# create mountpoints
mkdir /mnt 0775 root system
mkdir /storage 0777 system system
symlink /storage /sdcard
# Create cgroup mount point for cpu accounting
mkdir /acct
mount cgroup none /acct cpuacct
mkdir /acct/uid
# Backwards Compat - XXX: Going away in G*
mkdir /sdcard 0777 system system
mkdir /system
mkdir /data 0771 system system
mkdir /cache 0770 system cache
mkdir /misc 0777 system misc
mkdir /config 0500 root root
# Directory for putting things only root should see.
mkdir /mnt/secure 0700 root root
# Directory for staging bindmounts
mkdir /mnt/secure/staging 0700 root root
# Directory-target for where the secure container
# imagefile directory will be bind-mounted
mkdir /mnt/secure/asec 0700 root root
# Secure container public mount points.
mkdir /mnt/asec 0700 root system
mount tmpfs tmpfs /mnt/asec mode=0755,gid=1000
mkdir /mnt/storage 0000 system system
symlink /mnt/storage storage
mount rootfs rootfs / ro remount
write /proc/sys/kernel/panic_on_oops 1
write /proc/sys/kernel/hung_task_timeout_secs 0
write /proc/cpu/alignment 4
write /proc/sys/kernel/sched_latency_ns 10000000
write /proc/sys/kernel/sched_wakeup_granularity_ns 2000000
write /proc/sys/kernel/sched_compat_yield 1
write /proc/sys/kernel/sched_child_runs_first 0
write /sys/class/rfkill/rfkill0/state 0
# Create cgroup mount points for process groups
mkdir /dev/cpuctl
mount cgroup none /dev/cpuctl cpu
chown system system /dev/cpuctl
chown system system /dev/cpuctl/tasks
chmod 0777 /dev/cpuctl/tasks
write /dev/cpuctl/cpu.shares 1024
mkdir /dev/cpuctl/fg_boost
chown system system /dev/cpuctl/fg_boost/tasks
chmod 0777 /dev/cpuctl/fg_boost/tasks
write /dev/cpuctl/fg_boost/cpu.shares 1024
mkdir /dev/cpuctl/bg_non_interactive
chown system system /dev/cpuctl/bg_non_interactive/tasks
chmod 0777 /dev/cpuctl/bg_non_interactive/tasks
# 5.0 %
write /dev/cpuctl/bg_non_interactive/cpu.shares 52
# mount mtd partitions
# Mount /system rw first to give the filesystem a chance to save a checkpoint
mount ext3 /dev/block/mmcblk3p1 /system
mount ext3 /dev/block/mmcblk3p1 /system ro remount
# We chown/chmod /data again so because mount is run as root + defaults
mount ext3 /dev/block/mmcblk3p5 /data nosuid nodev
chown system system /data
chmod 0771 /data
mount ext3 /dev/block/mmcblk3p3 /misc nosuid nodev
chown system misc /misc
chmod 0770 /misc
# Create dump dir and collect dumps.
# Do this before we mount cache so eventually we can use cache for
# storing dumps on platforms which do not have a dedicated dump partition.
mkdir /data/dontpanic
chown root log /data/dontpanic
chmod 0750 /data/dontpanic
# Collect apanic data, free resources and re-arm trigger
copy /proc/apanic_console /data/dontpanic/apanic_console
chown root log /data/dontpanic/apanic_console
chmod 0640 /data/dontpanic/apanic_console
copy /proc/apanic_threads /data/dontpanic/apanic_threads
chown root log /data/dontpanic/apanic_threads
chmod 0640 /data/dontpanic/apanic_threads
write /proc/apanic_console 1
# Same reason as /data above
mount ext3 /dev/block/mmcblk3p2 /cache nosuid nodev
chown system cache /cache
chmod 0770 /cache
# This may have been created by the recovery system with odd permissions
chown system system /cache/recovery
chmod 0770 /cache/recovery
#change permissions on vmallocinfo so we can grab it from bugreports
chown root log /proc/vmallocinfo
chmod 0440 /proc/vmallocinfo
#change permissions on kmsg & sysrq-trigger so bugreports can grab kthread stacks
chown root system /proc/kmsg
chmod 0440 /proc/kmsg
chown root system /proc/sysrq-trigger
chmod 0220 /proc/sysrq-trigger
# create basic filesystem structure
mkdir /data/misc 01771 system misc
mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth
mkdir /data/misc/bluetooth 0770 system system
mkdir /data/misc/keystore 0700 keystore keystore
mkdir /data/misc/vpn 0770 system system
mkdir /data/misc/systemkeys 0700 system system
mkdir /data/misc/vpn/profiles 0770 system system
# give system access to wpa_supplicant.conf for backup and restore
mkdir /data/misc/wifi 0770 wifi wifi
chmod 0770 /data/misc/wifi
chmod 0660 /data/misc/wifi/wpa_supplicant.conf
mkdir /data/local 0771 shell shell
mkdir /data/local/tmp 0771 shell shell
mkdir /data/data 0771 system system
mkdir /data/app-private 0771 system system
mkdir /data/app 0771 system system
mkdir /data/property 0700 root root
# create dalvik-cache and double-check the perms
mkdir /data/dalvik-cache 0771 system system
chown system system /data/dalvik-cache
chmod 0771 /data/dalvik-cache
# create the lost+found directories, so as to enforce our permissions
mkdir /data/lost+found 0770
mkdir /cache/lost+found 0770
# double check the perms, in case lost+found already exists, and set owner
chown root root /data/lost+found
chmod 0770 /data/lost+found
chown root root /cache/lost+found
chmod 0770 /cache/lost+found
on boot
#adjust the dalivk size
setprop dalvik.vm.heapsize 64m
# basic network init
ifup lo
hostname localhost
domainname localdomain
# set RLIMIT_NICE to allow priorities from 19 to -20
setrlimit 13 40 40
# Define the oom_adj values for the classes of processes that can be
# killed by the kernel. These are used in ActivityManagerService.
setprop ro.FOREGROUND_APP_ADJ 0
setprop ro.VISIBLE_APP_ADJ 1
setprop ro.SECONDARY_SERVER_ADJ 2
setprop ro.BACKUP_APP_ADJ 2
setprop ro.HOME_APP_ADJ 4
setprop ro.HIDDEN_APP_MIN_ADJ 7
setprop ro.CONTENT_PROVIDER_ADJ 14
setprop ro.EMPTY_APP_ADJ 15
# Define the memory thresholds at which the above process classes will
# be killed. These numbers are in pages (4k).
setprop ro.FOREGROUND_APP_MEM 1536
setprop ro.VISIBLE_APP_MEM 2048
setprop ro.SECONDARY_SERVER_MEM 4096
setprop ro.BACKUP_APP_MEM 4096
setprop ro.HOME_APP_MEM 4096
setprop ro.HIDDEN_APP_MEM 5120
setprop ro.CONTENT_PROVIDER_MEM 5632
setprop ro.EMPTY_APP_MEM 6144
# Write value must be consistent with the above properties.
# Note that the driver only supports 6 slots, so we have HOME_APP at the
# same memory level as services.
write /sys/module/lowmemorykiller/parameters/adj 0,1,2,7,14,15
write /proc/sys/vm/overcommit_memory 1
write /proc/sys/vm/min_free_order_shift 4
write /sys/module/lowmemorykiller/parameters/minfree 1536,2048,4096,5120,5632,6144
# Set init its forked children's oom_adj.
write /proc/1/oom_adj -16
# Tweak background writeout
write /proc/sys/vm/dirty_expire_centisecs 200
write /proc/sys/vm/dirty_background_ratio 5
# Permissions for System Server and daemons.
chown radio system /sys/android_power/state
chown radio system /sys/android_power/request_state
chown radio system /sys/android_power/acquire_full_wake_lock
chown radio system /sys/android_power/acquire_partial_wake_lock
chown radio system /sys/android_power/release_wake_lock
chown radio system /sys/power/state
chown radio system /sys/power/wake_lock
chown radio system /sys/power/wake_unlock
chmod 0660 /sys/power/state
chmod 0660 /sys/power/wake_lock
chmod 0660 /sys/power/wake_unlock
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/class/leds/keyboard-backlight/brightness
chown system system /sys/class/leds/lcd-backlight/brightness
chown system system /sys/class/leds/button-backlight/brightness
chown system system /sys/class/leds/jogball-backlight/brightness
chown system system /sys/class/leds/red/brightness
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/brightness
chown system system /sys/class/leds/red/device/grpfreq
chown system system /sys/class/leds/red/device/grppwm
chown system system /sys/class/leds/red/device/blink
chown system system /sys/class/leds/red/brightness
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/brightness
chown system system /sys/class/leds/red/device/grpfreq
chown system system /sys/class/leds/red/device/grppwm
chown system system /sys/class/leds/red/device/blink
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/module/sco/parameters/disable_esco
chown system system /sys/kernel/ipv4/tcp_wmem_min
chown system system /sys/kernel/ipv4/tcp_wmem_def
chown system system /sys/kernel/ipv4/tcp_wmem_max
chown system system /sys/kernel/ipv4/tcp_rmem_min
chown system system /sys/kernel/ipv4/tcp_rmem_def
chown system system /sys/kernel/ipv4/tcp_rmem_max
chown root radio /proc/cmdline
# bluetooth permissions
chmod 0660 /dev/ttyHS2
chown bluetooth bluetooth /dev/ttyHS2
chmod 0660 /sys/class/rfkill/rfkill0/state
chmod 0660 /sys/class/rfkill/rfkill0/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
write /sys/class/rfkill/rfkill0/state 1
# Define TCP buffer sizes for various networks
# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
setprop net.tcp.buffersize.default 4096,87380,110208,4096,16384,110208
setprop net.tcp.buffersize.wifi 4095,87380,110208,4096,16384,110208
setprop net.tcp.buffersize.umts 4094,87380,110208,4096,16384,110208
setprop net.tcp.buffersize.edge 4093,26280,35040,4096,16384,35040
setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680
class_start default
## Daemon processes to be run by init.
##
service console /system/bin/sh
console
# adbd is controlled by the persist.service.adb.enable system property
service adbd /sbin/adbd
disabled
# adbd on at boot in emulator
on property:ro.kernel.qemu=1
start adbd
on property:persist.service.adb.enable_NV_DISABLED=1
start adbd
on property:persist.service.adb.enable=0
stop adbd
service servicemanager /system/bin/servicemanager
user system
critical
onrestart restart zygote
onrestart restart media
service vold /system/bin/vold
socket vold stream 0660 root mount
ioprio be 2
service netd /system/bin/netd
socket netd stream 0660 root system
service debuggerd /system/bin/debuggerd
service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server
socket zygote stream 666
onrestart write /sys/android_power/request_state wake
onrestart write /sys/power/state on
onrestart restart media
service media /system/bin/mediaserver
user media
group system audio camera graphics inet net_bt net_bt_admin net_raw
ioprio rt 4
service bootsound /system/bin/playmp3
user media
group audio
oneshot
service bootanim /system/bin/bootanimation
user graphics
group graphics
disabled
oneshot
service dbus /system/bin/dbus-daemon --system --nofork
socket dbus stream 666 bluetooth bluetooth
user bluetooth
group bluetooth net_bt_admin
service installd /system/bin/installd
socket installd stream 600 system system
service flash_recovery /system/etc/install-recovery.sh
oneshot
service racoon /system/bin/racoon
socket racoon stream 600 system system
# racoon will setuid to vpn after getting necessary resources.
group net_admin
disabled
oneshot
service mtpd /system/bin/mtpd
socket mtpd stream 600 system system
user vpn
group vpn net_admin net_raw
disabled
oneshot
service keystore /system/bin/keystore /data/misc/keystore
user keystore
group keystore
socket keystore stream 666
service chmoddata /system/bin/logwrapper /system/bin/chmod.sh
user root
group root
oneshot
service dumpstate /system/bin/dumpstate -s
socket dumpstate stream 0660 shell log
disabled
oneshot
on boot
# nvrm permissions
chmod 666 /dev/nvrm
# knvrm permissions
chmod 660 /dev/knvrm
chown root system /dev/knvrm
# nvrpc permissions
chmod 666 /dev/nvrpc
# nvmap permissions
chmod 666 /dev/nvmap
# nvos permissions
chmod 666 /dev/nvos
# nvhost permissions
chmod 666 /dev/nvhost-ctrl
chmod 666 /dev/nvhost-display
chmod 666 /dev/nvhost-gr3d
chmod 666 /dev/nvhost-gr2d
chmod 666 /dev/nvhost-dsi
chmod 666 /dev/nvhost-isp
chmod 666 /dev/nvhost-mpe
chmod 666 /dev/nvhost-vi
# wlan permissions
mkdir /data/misc/wifi 0771 wifi wifi
mkdir /data/misc/wifi/sockets 0771 wifi wifi
chmod 0771 /data/misc/wifi
mkdir /data/misc/dhcp 0771 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
mkdir /data/misc/dhcpcd 0771 dhcp dhcp
chown dhcp dhcp /data/misc/dhcpcd
setprop wifi.interface wlan0
setprop wifi.supplicant_scan_interval 45
# NvLogger settings for NvMM
setprop persist.tegra.nvlog.level 4
# setprop persist.tegra.nvlog.14.level 5
service nvrm_daemon /system/bin/nvrm_daemon
user root
onrestart restart servicemanager
service wpa_supplicant /system/bin/wpa_supplicant -D wext -i wlan0 -c/data/misc/wifi/wpa_supplicant.conf
socket wpa_wlan0 dgram 660 root wifi
user root
group wifi
oneshot
disabled
service dhcpcd /system/bin/dhcpcd -ABKL wlan0
user root
group dhcp inet
oneshot
disabled
on property:init.svc.wpa_supplicant=stopped
stop dhcpcd
on property:persist.service.adb.enable=1
insmod /system/lib/hw/g_android.ko
start adbd
service install_flash /system/bin/sh /system/etc/install_flash.sh
# oneshot
service install_apk /system/bin/sh /system/etc/install_apk.sh
# oneshot
service synergy /system/bin/busybox /system/bin/sh /system/etc/init.synergy.sh
user root
oneshot
service synergy_fts_init /system/bin/busybox /system/bin/sh /system/etc/synergy_fts.sh
user root
group root
oneshot
service hidloopback /system/bin/busybox /system/bin/sh /system/etc/insert-hiddrv.sh
user root
group root
oneshot
service usbotg /system/bin/busybox /system/bin/sh /system/etc/usbotg.sh
user root
oneshot
service first /system/bin/sh /system/etc/first.sh
oneshot#first
service backlight /system/bin/busybox /system/bin/sh /system/etc/backlight.sh
user root
oneshot
unfortunately, I have no idea what any of that menas.
So where's the new stuff in this post?
all is already available throughout websites and google..
the init's of the rom is the same as those on all other tegra2 and can be downloaded from Nvidia's support site..
Dexter_nlb said:
So where's the new stuff in this post?
all is already available throughout websites and google..
the init's of the rom is the same as those on all other tegra2 and can be downloaded from Nvidia's support site..
Click to expand...
Click to collapse
Who said there was anything new? Why do we need a forum if we're not going to post things that can be discovered elsewhere?
I found it interesting and I thought others may too. Others that may not have the files in front of them.
Why don't you work on pulling the stick out of your ass?
Billy
JeepFreak said:
Who said there was anything new? Why don't you work on pulling the stick out of your ass?
Billy
Click to expand...
Click to collapse
Wow JeepFreak... you have some anger issues... Dexter was not slamming your post or calling you names, just making an observation.
Your language helps no one, least of all yourself
argie said:
Dexter was not slamming your post or calling you names, just making an observation.
Click to expand...
Click to collapse
You can't be serious
Billy

Star A2000 wifi problem

Hi there,
Once I've installed Odin on my Star A2000 phone and messed things up. My wifi is gone now.Can someone help me out to fix this?
Here is how my file init.rc looks like:
on init
sysclktz 0
loglevel 3
# setup the global environment
export PATH /sbin:/system/sbin:/system/bin:/system/xbin
export LD_LIBRARY_PATH /system/lib
export ANDROID_BOOTLOGO 1
export ANDROID_ROOT /system
export ANDROID_ASSETS /system/app
export ANDROID_DATA /data
export EXTERNAL_STORAGE /mnt/sdcard
export ASEC_MOUNTPOINT /mnt/asec
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar
# Backward compatibility
symlink /system/etc /etc
symlink /sys/kernel/debug /d
# create mountpoints
mkdir /mnt 0775 root system
mkdir /mnt/sdcard 0000 system system
# Create cgroup mount point for cpu accounting
mkdir /acct
mount cgroup none /acct cpuacct
mkdir /acct/uid
# Backwards Compat - XXX: Going away in G*
symlink /mnt/sdcard /sdcard
mkdir /system
mkdir /data 0771 system system
mkdir /cache 0770 system cache
mkdir /config 0500 root root
# Directory for putting things only root should see.
mkdir /mnt/secure 0700 root root
# Directory for staging bindmounts
mkdir /mnt/secure/staging 0700 root root
# Directory-target for where the secure container
# imagefile directory will be bind-mounted
mkdir /mnt/secure/asec 0700 root root
# Secure container public mount points.
mkdir /mnt/asec 0700 root system
mount tmpfs tmpfs /mnt/asec mode=0755,gid=1000
mkdir /data/nvram 0600 system system
mount rootfs rootfs / ro remount
write /proc/sys/kernel/panic_on_oops 1
write /proc/sys/kernel/hung_task_timeout_secs 0
write /proc/cpu/alignment 4
write /proc/sys/kernel/sched_latency_ns 10000000
write /proc/sys/kernel/sched_wakeup_granularity_ns 2000000
write /proc/sys/kernel/sched_compat_yield 1
write /proc/sys/kernel/sched_child_runs_first 0
# Create cgroup mount points for process groups
mkdir /dev/cpuctl
mount cgroup none /dev/cpuctl cpu
chown system system /dev/cpuctl
chown system system /dev/cpuctl/tasks
chmod 0777 /dev/cpuctl/tasks
write /dev/cpuctl/cpu.shares 1024
mkdir /dev/cpuctl/fg_boost
chown system system /dev/cpuctl/fg_boost/tasks
chmod 0777 /dev/cpuctl/fg_boost/tasks
write /dev/cpuctl/fg_boost/cpu.shares 1024
mkdir /dev/cpuctl/bg_non_interactive
chown system system /dev/cpuctl/bg_non_interactive/tasks
chmod 0777 /dev/cpuctl/bg_non_interactive/tasks
# 5.0 %
write /dev/cpuctl/bg_non_interactive/cpu.shares 52
# mount mtd partitions
# Mount /system rw first to give the filesystem a chance to save a checkpoint
mount yaffs2 [email protected] /system nandboot
mkdir /system/secro 0600 system system
# RIL need to do this before the folder /system changed to read only
chown radio system /system/etc/ril
chmod 0770 /system/etc/ril
chmod 0444 /system/etc/ril/oper.lis
chmod 0700 /system/etc/xlog.sh
chmod 0777 /system/etc/piggy_bank.sh
mount yaffs2 [email protected] /system ro remount nandboot
# We chown/chmod /data again so because mount is run as root + defaults
mount yaffs2 [email protected] /data nosuid nodev nandboot
chown system system /data
chmod 0771 /data
# Same reason as /data above
mount yaffs2 [email protected] /cache nosuid nodev nandboot
chown system cache /cache
chmod 0770 /cache
mkdir /cache/recovery 0770 system system
# mount yaffs2 [email protected] /nvram nandboot
mount yaffs2 [email protected] /system/secro nandboot
mount yaffs2 [email protected] /system/secro ro remount nandboot
# This may have been created by the recovery system with odd permissions
chown system cache /cache/recovery
chmod 0770 /cache/recovery
#change permissions on vmallocinfo so we can grab it from bugreports
chown root log /proc/vmallocinfo
chmod 0440 /proc/vmallocinfo
#change permissions on kmsg & sysrq-trigger so bugreports can grab kthread stacks
chown root system /proc/kmsg
chmod 0440 /proc/kmsg
chown root system /proc/sysrq-trigger
chmod 0220 /proc/sysrq-trigger
# create basic filesystem structure
mkdir /data/misc 01771 system misc
#migrate from 2.1 example CH Yeh 01089
#mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth
#mkdir /data/misc/hcid 0770 bluetooth bluetooth
mkdir /data/misc/keystore 0700 keystore keystore
mkdir /data/misc/vpn 0770 system system
mkdir /data/misc/systemkeys 0700 system system
mkdir /data/misc/vpn/profiles 0770 system system
# give system access to wpa_supplicant.conf for backup and restore
mkdir /data/misc/wifi 0770 wifi wifi
chmod 0770 /data/misc/wifi
chmod 0660 /data/misc/wifi/wpa_supplicant.conf
mkdir /data/local 0771 shell shell
mkdir /data/local/tmp 0771 shell shell
mkdir /data/data 0771 system system
mkdir /data/app-private 0771 system system
mkdir /data/app 0771 system system
mkdir /data/property 0700 root root
# create dalvik-cache and double-check the perms
mkdir /data/dalvik-cache 0771 system system
chown system system /data/dalvik-cache
chmod 0771 /data/dalvik-cache
# create the lost+found directories, so as to enforce our permissions
mkdir /data/lost+found 0770
mkdir /cache/lost+found 0770
# double check the perms, in case lost+found already exists, and set owner
chown root root /data/lost+found
chmod 0770 /data/lost+found
chown root root /cache/lost+found
chmod 0770 /cache/lost+found
# H264 Decoder
chmod 777 /dev/MT6516_H264_DEC
# Internal SRAM Driver
chmod 777 /dev/MT6516_Int_SRAM
# MATV Driver
chmod 777 /dev/MT6516_MATV
# MM QUEUE Driver
chmod 777 /dev/MT6516_MM_QUEUE
# MPEG4 Decoder
chmod 777 /dev/MT6516_MP4_DEC
# MPEG4 Encoder
chmod 777 /dev/MT6516_MP4_ENC
# OpenCORE proxy config
chmod 0666 /data/http-proxy-cfg
# OpenCORE player config
chmod 0666 /etc/player.cfg
# load driver base driver
insmod /system/lib/modules/mtk_drvb.ko
mknod /dev/drvb c 176 0
chmod 0666 /dev/drvb
# load LCA Core
insmod /system/lib/modules/lca_core.ko
# WiFi
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/wpa_supplicant 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
chmod 0660 /sys/class/rfkill/rfkill1/state
chown wifi system /sys/class/rfkill/rfkill1/state
#load wifi driver
insmod /system/lib/modules/mt_sd_clnt.ko
insmod /system/lib/modules/wlan.ko
# Wimax
chmod 0660 /sys/class/rfkill/rfkill2/state
chown system system /sys/class/rfkill/rfkill2/state
# BT
chmod 0666 /dev/ttyMT2
chown bluetooth bluetooth /dev/ttyMT2
chmod 0664 /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
write sys/class/rfkill/rfkill0/state 0
#BT Wlan Em
chmod 0666 /dev/btwlan_em
# Touch Panel
chown root diag /sys/module/tpd_setting/parameters/tpd_calmat
chmod 0777 /dev/pmem_multimedia
chmod 0777 /dev/mt6516-isp
chmod 0777 /dev/mt6516-IDP
chmod 0777 /dev/mt9p012
chmod 0777 /dev/mt6516_jpeg
chmod 0777 /dev/FM50AF
# GPS
chmod 0666 /dev/gps
# RTC
mkdir /data/misc/rtc 0777 system system
# Modem related device nodes
mkdir /data/nvram/md 0700 root root
insmod /system/lib/modules/ccci.ko
insmod /system/lib/modules/ccci_md.ko
insmod /system/lib/modules/ccci_tty.ko
insmod /system/lib/modules/ccci_fs.ko
insmod /system/lib/modules/ccci_pmic.ko
insmod /system/lib/modules/ccmni.ko
mknod /dev/ccci c 180 0
mknod /dev/ccci_fs c 178 0
mknod /dev/ccci_sys_rx c 180 2
mknod /dev/ccci_sys_tx c 180 3
mknod /dev/ccci_pcm_rx c 180 4
mknod /dev/ccci_pcm_tx c 180 5
mknod /dev/ccci_uart1_rx c 180 6
mknod /dev/ccci_uart1_rx_ack c 180 7
mknod /dev/ccci_fs_util c 179 0
chmod 0666 /dev/ccci
chmod 0660 /dev/ccci_fs
chmod 0666 /dev/ccci_pcm_rx
chmod 0666 /dev/ccci_pcm_tx
chmod 0600 /dev/ccci_sys_rx
chmod 0600 /dev/ccci_sys_tx
chmod 0600 /dev/ccci_uart1_rx
chmod 0600 /dev/ccci_uart1_rx_ack
chmod 0660 /dev/ttyC0
chmod 0666 /dev/ccci_fs_util
# FM Radio device, FIXME: this is not a proper way to set permissions
chmod 0666 /dev/fm
# Sensor
chmod 0666 /dev/hwmsensor
chmod 0666 /dev/msensor
chmod 0666 /dev/gsensor
chmod 0666 /dev/alsps
mkdir /data/amit/
# GPIO
chmod 0666 /dev/mtgpio
# for wimax local socket
mkdir /tmp
mkdir /data/misc/wimax
chmod 0777 /data/misc/wimax
chmod 0666 /data/misc/wimax/wsrv_config.xml
chmod 0666 /data/misc/wimax/driver.config
mkdir /data/misc/wimax/Profiles
chmod 0777 /data/misc/wimax/Profiles
chmod 0666 /data/misc/wimax/Profiles/*.pf
# for ppp options file
mkdir /data/misc/ppp
chmod 0777 /data/misc/ppp
# watch dog kicker
write /proc/wdk "0 20 30"
# G2D
chmod 0666 /dev/MTK_G2D
# Android SEC related device nodes
#insmod /system/lib/modules/mt6516_sec.ko
#mknod /dev/SEC c 182 0
#chmod 0666 /dev/SEC
# Update the second boot logo
service bootlogoupdater /system/bin/boot_logo_updater
oneshot
service piggybank /system/etc/piggy_bank.sh
user system
oneshot
on boot
# basic network init
ifup lo
hostname localhost
domainname localdomain
# set RLIMIT_NICE to allow priorities from 19 to -20
setrlimit 13 40 40
# Set timeout value for rmnet stats.
write /sys/devices/virtual/net/rmnet0/timeout_suspend 5000000
# Define the oom_adj values for the classes of processes that can be
# killed by the kernel. These are used in ActivityManagerService.
setprop ro.FOREGROUND_APP_ADJ 0
setprop ro.VISIBLE_APP_ADJ 1
setprop ro.SECONDARY_SERVER_ADJ 2
setprop ro.BACKUP_APP_ADJ 2
setprop ro.HOME_APP_ADJ 4
setprop ro.HIDDEN_APP_MIN_ADJ 7
setprop ro.CONTENT_PROVIDER_ADJ 14
setprop ro.EMPTY_APP_ADJ 15
# Define the memory thresholds at which the above process classes will
# be killed. These numbers are in pages (4k).
setprop ro.FOREGROUND_APP_MEM 1536
setprop ro.VISIBLE_APP_MEM 2048
setprop ro.SECONDARY_SERVER_MEM 2560
setprop ro.BACKUP_APP_MEM 2560
setprop ro.HOME_APP_MEM 3072
setprop ro.HIDDEN_APP_MEM 5120
setprop ro.CONTENT_PROVIDER_MEM 7168
setprop ro.EMPTY_APP_MEM 7168
# Define the Wi-Fi options for user, it could be wifi, wapi, or wifi-wapi
setprop persist.sys.wlan wifi-wapi
# Write value must be consistent with the above properties.
# Note that the driver only supports 6 slots, so we have HOME_APP at the
# same memory level as services.
write /sys/module/lowmemorykiller/parameters/adj 0,1,2,3,7,14
write /proc/sys/vm/overcommit_memory 1
write /proc/sys/vm/min_free_order_shift 4
write /sys/module/lowmemorykiller/parameters/minfree 1536,2048,2560,3072,5120,7168
# Set init its forked children's oom_adj.
write /proc/1/oom_adj -16
# Permissions for System Server and daemons.
chown radio system /sys/android_power/state
chown radio system /sys/android_power/request_state
chown radio system /sys/android_power/acquire_full_wake_lock
chown radio system /sys/android_power/acquire_partial_wake_lock
chown radio system /sys/android_power/release_wake_lock
chown radio system /sys/power/state
chown radio system /sys/power/wake_lock
chown radio system /sys/power/wake_unlock
chmod 0660 /sys/power/state
chmod 0660 /sys/power/wake_lock
chmod 0660 /sys/power/wake_unlock
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/class/leds/keyboard-backlight/brightness
chown system system /sys/class/leds/lcd-backlight/brightness
chown system system /sys/class/leds/button-backlight/brightness
chown system system /sys/class/leds/jogball-backlight/brightness
chown system system /sys/class/leds/red/brightness
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/brightness
chown system system /sys/class/leds/red/device/grpfreq
chown system system /sys/class/leds/red/device/grppwm
chown system system /sys/class/leds/red/device/blink
chown system system /sys/class/leds/red/brightness
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/brightness
chown system system /sys/class/leds/red/device/grpfreq
chown system system /sys/class/leds/red/device/grppwm
chown system system /sys/class/leds/red/device/blink
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/module/sco/parameters/disable_esco
chown system system /sys/kernel/ipv4/tcp_wmem_min
chown system system /sys/kernel/ipv4/tcp_wmem_def
chown system system /sys/kernel/ipv4/tcp_wmem_max
chown system system /sys/kernel/ipv4/tcp_rmem_min
chown system system /sys/kernel/ipv4/tcp_rmem_def
chown system system /sys/kernel/ipv4/tcp_rmem_max
chown root radio /proc/cmdline
chmod 0777 /dev/MT6516-M3D
chmod 0777 /dev/mem_dummy
chmod 0755 /system/usr/keychars/qwerty2.kcm.bin
chmod 0755 /system/usr/keychars/qwerty.kcm.bin
chmod 0755 /system/usr/keychars/tuttle2.kcm.bin
# RIL Relative setting
setprop rild.nw.operlist /system/etc/ril/oper.lis
# chown radio system /system/etc/ril
# chmod 0770 /system/etc/ril
# chmod 0444 /system/etc/ril/oper.lis
# AGPS
chmod 0777 /system/bin/mtk_agpsd
# Define TCP buffer sizes for various networks
# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
setprop net.tcp.buffersize.default 4096,87380,110208,4096,16384,110208
setprop net.tcp.buffersize.wifi 4095,87380,110208,4096,16384,110208
setprop net.tcp.buffersize.umts 4094,87380,110208,4096,16384,110208
setprop net.tcp.buffersize.edge 4093,26280,35040,4096,16384,35040
setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680
class_start default
## Daemon processes to be run by init.
##
service console /system/bin/sh
console
# adbd is controlled by the persist.service.adb.enable system property
service adbd /sbin/adbd
disabled
# adbd on at boot in emulator
on property:ro.kernel.qemu=1
start adbd
on propertyersist.service.adb.enable=1
start adbd
on propertyersist.service.adb.enable=0
stop adbd
service servicemanager /system/bin/servicemanager
user system
critical
onrestart restart zygote
onrestart restart media
service vold /system/bin/vold
socket vold stream 0660 root mount
ioprio be 2
service netd /system/bin/netd
socket netd stream 0660 root system
service debuggerd /system/bin/debuggerd
service nvram_daemon /system/bin/nvram_daemon
user root
oneshot
service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server
socket zygote stream 666
onrestart write /sys/android_power/request_state wake
onrestart write /sys/power/state on
service media /system/bin/mediaserver
#user media
user root
#oneshot
group system audio camera graphics inet net_bt net_bt_admin net_raw
ioprio rt 4
service bootanim /system/bin/bootanimation
user graphics
group graphics
disabled
oneshot
#service dbus /system/bin/dbus-daemon --system --nofork
#socket dbus stream 660 bluetooth bluetooth
#user bluetooth
#group bluetooth net_bt_admin
#migrate from Android 2.1 example CH Yeh(01089)
#service bluetoothd /system/bin/bluetoothd -n
#service hcid /system/bin/hcid -s -n -f /etc/bluez/hcid.conf
#socket bluetooth stream 660 bluetooth bluetooth
#socket dbus_bluetooth stream 660 bluetooth bluetooth
# init.rc does not yet support applying capabilities, so run as root and
# let hcid drop uid to bluetooth with the right linux capabilities
#group bluetooth net_bt_admin misc
#disabled
#
# Modem related services (Begin)
#
service ccci_fsd /system/bin/ccci_fsd
user root
oneshot
service ccci_mdinit /system/bin/ccci_mdinit
user root
oneshot
service pppd_gprs /system/etc/init.gprs-pppd file /etc/ppp/ppp_options
user root
group radio cache inet misc
disabled
oneshot
#Add by T.Zh for ppp daemon
service pppd /system/bin/pppd file /data/misc/ppp/ppp_options
user root
disabled
oneshot
service gsm0710muxd /system/bin/gsm0710muxd -s /dev/ttyC0 -f 512 -n 8 -m basic
user root
group radio cache inet misc
disabled
# Add by mtk01411 for CCMNI IT
service muxtestapp /system/bin/muxtestapp
user root
group radio cache inet misc
disabled
oneshot
# Add by mtk01411 for CCMNI IT
service sockcli /system/bin/sockcli
user root
group radio cache inet misc
disabled
oneshot
# Add by mtk01411 for CCMNI IT
service socksrv /system/bin/socksrv
user root
group radio cache inet misc
disabled
oneshot
service muxreport-daemon /system/bin/muxreport
user root
group radio cache inet misc
disabled
oneshot
service ril-daemon /system/bin/rild
socket rild stream 660 root radio
socket rild2 stream 660 root radio
socket rild-debug stream 660 radio system
socket rild-mtk-ut stream 660 radio net_bt
socket rild-mtk-ut-2 stream 660 radio net_bt
socket rild-mtk-modem stream 660 radio system
user root
group radio cache inet misc
disabled
#
# Modem related services (End)
#
#mask by LCH for MTK stack
#service hfag /system/bin/sdptool add --channel=10 HFAG
# user bluetooth
# group bluetooth net_bt_admin
# disabled
# oneshot
#service hsag /system/bin/sdptool add --channel=11 HSAG
# user bluetooth
# group bluetooth net_bt_admin
# disabled
# oneshot
#service opush /system/bin/sdptool add --channel=12 OPUSH
# user bluetooth
# group bluetooth net_bt_admin
# disabled
# oneshot
#service pbap /system/bin/sdptool add --channel=19 PBAP
# user bluetooth
# group bluetooth net_bt_admin
# disabled
# oneshot
#Add by mtk80143 for BT/WIFI co-existence
service bwcsd /system/bin/logwrapper /system/xbin/bwcs hci0 wlan0
oneshot
service installd /system/bin/installd
socket installd stream 600 system system
service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant -Dwext -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf
group wifi
disabled
oneshot
service wlaninit /system/xbin/iwconfig wlan0 mode managed essid aaa
disabled
oneshot
service dhcpcd /system/bin/logwrapper /system/bin/dhcpcd -A -dd wlan0
disabled
oneshot
service dhcpcd_wmx0 /system/bin/logwrapper /system/bin/dhcpcd -f /system/etc/dhcpcd/dhcpcd_wmx0.conf wmx0
disabled
oneshot
service flash_recovery /system/etc/install-recovery.sh
oneshot
#service android_sec /system/secro/android-sec
# oneshot
service racoon /system/bin/racoon
socket racoon stream 600 system system
# racoon will setuid to vpn after getting necessary resources.
group net_admin
disabled
oneshot
service mtpd /system/bin/mtpd
socket mtpd stream 600 system system
user vpn
group vpn net_admin net_raw
disabled
oneshot
service keystore /system/bin/keystore /data/misc/keystore
user keystore
group keystore
socket keystore stream 666
service mnld /system/xbin/mnld
socket mnld stream 666 system system
disabled
service agpsd /system/bin/mtk_agpsd
socket agpsd stream 666 system system
service gsm0710muxd_qemu /system/bin/gsm0710muxd -s /dev/socket/qemud -f 512 -n 8 -m basic
user root
group radio cache inet misc
disabled
on property:ro.kernel.qemu=1
start gsm0710muxd_qemu
service wimaxd /system/bin/logwrapper /system/xbin/wimaxd
group system
disabled
oneshot
service ami304d /system/bin/logwrapper /system/bin/ami304d
disabled
oneshot
Thanks in advance,
giuliusmua:crying:

How could I set executable flag on a file which is placed on sdcard?

Code:
[email protected]:/sdcard/.bin # chmod +x apps.sh
Bad mode
Code:
mount|grep data
/dev/block/dm-0 /data ext4 rw,seclabel,relatime,noauto_da_alloc,data=ordered 0 0
130|[email protected]:/sdcard/.bin # chmod 0755 apps.sh
[email protected]:/sdcard/.bin # ls -al
-rw-rw-r-- root sdcard_rw 44 2013-07-30 16:37 apps.sh
yes, /data is ext4 but the "sdcard" is a fuse mounted emulated partition -- not ext4. no execute.
ziddey said:
yes, /data is ext4 but the "sdcard" is a fuse mounted emulated partition -- not ext4. no execute.
Click to expand...
Click to collapse
Isn't possible to turn on exec?

I need help with the init.rc

So after hours and hours trying to unpack my boot.img I managed to do so. I've been trying to had Init.d support to the kernel and so far it is unsuccessful.
Here's my init.rc:
Code:
# Copyright (C) 2012 The Android Open Source Project
#
# IMPORTANT: Do not create world writable files or directories.
# This is a common source of Android security bugs.
#
import /init.environ.rc
import /init.usb.rc
import /init.${ro.hardware}.rc
import /init.${ro.zygote}.rc
import /init.trace.rc
import /init.rilcommon.rc
import /init.container.rc
on early-init
# Set init and its forked children's oom_adj.
write /proc/1/oom_score_adj -1000
# Apply strict SELinux checking of PROT_EXEC on mmap/mprotect calls.
write /sys/fs/selinux/checkreqprot 0
# Set the security context for the init process.
# This should occur before anything else (e.g. ueventd) is started.
setcon u:r:init:s0
# Set the security context of /adb_keys if present.
restorecon /adb_keys
start ueventd
# create mountpoints
mkdir /mnt 0775 root system
on init
sysclktz 0
loglevel 3
# SEC_SELINUX
# for audit message
chown system system /proc/avc_msg
chmod 0660 /proc/avc_msg
# Backward compatibility
symlink /system/etc /etc
symlink /sys/kernel/debug /d
# Right now vendor lives on the same filesystem as system,
# but someday that may change.
symlink /system/vendor /vendor
# Create cgroup mount point for cpu accounting
mkdir /acct
mount cgroup none /acct cpuacct
mkdir /acct/uid
# Create cgroup mount point for memory
mount tmpfs none /sys/fs/cgroup mode=0750,uid=0,gid=1000
mkdir /sys/fs/cgroup/memory 0750 root system
mount cgroup none /sys/fs/cgroup/memory memory
write /sys/fs/cgroup/memory/memory.move_charge_at_immigrate 1
chown root system /sys/fs/cgroup/memory/tasks
chmod 0660 /sys/fs/cgroup/memory/tasks
mkdir /sys/fs/cgroup/memory/sw 0750 root system
write /sys/fs/cgroup/memory/sw/memory.swappiness 100
write /sys/fs/cgroup/memory/sw/memory.move_charge_at_immigrate 1
chown root system /sys/fs/cgroup/memory/sw/tasks
chmod 0660 /sys/fs/cgroup/memory/sw/tasks
mkdir /system
mkdir /data 0771 system system
mkdir /cache 0770 system cache
mkdir /config 0500 root root
# See storage config details at http://source.android.com/tech/storage/
mkdir /mnt/shell 0750 shell shell
mkdir /mnt/media_rw 0700 media_rw media_rw
mkdir /storage 0751 root sdcard_r
# Directory for putting things only root should see.
mkdir /mnt/secure 0700 root root
## Samsung ODE >>>
# Create private mountpoint so we can MS_MOVE from staging
mount tmpfs tmpfs /mnt/secure mode=0700,uid=0,gid=0
## Samsung ODE <<<
# Directory for staging bindmounts
mkdir /mnt/secure/staging 0700 root root
restorecon_recursive /mnt/secure/staging
# Directory-target for where the secure container
# imagefile directory will be bind-mounted
mkdir /mnt/secure/asec 0700 root root
restorecon_recursive /mnt/secure/asec
# Secure container public mount points.
mkdir /mnt/asec 0700 root system
mount tmpfs tmpfs /mnt/asec mode=0755,gid=1000
restorecon_recursive /mnt/asec
# Filesystem image public mount points.
mkdir /mnt/obb 0700 root system
mount tmpfs tmpfs /mnt/obb mode=0755,gid=1000
restorecon_recursive /mnt/obb
# memory control cgroup
mkdir /dev/memcg 0700 root system
mount cgroup none /dev/memcg memory
write /proc/sys/kernel/panic_on_oops 1
write /proc/sys/kernel/hung_task_timeout_secs 0
write /proc/cpu/alignment 4
write /proc/sys/kernel/sched_latency_ns 10000000
write /proc/sys/kernel/sched_wakeup_granularity_ns 2000000
write /proc/sys/kernel/sched_compat_yield 1
write /proc/sys/kernel/sched_child_runs_first 0
write /proc/sys/kernel/randomize_va_space 2
write /proc/sys/kernel/kptr_restrict 2
write /proc/sys/vm/mmap_min_addr 32768
write /proc/sys/net/ipv4/ping_group_range "0 2147483647"
write /proc/sys/net/unix/max_dgram_qlen 300
write /proc/sys/kernel/sched_rt_runtime_us 950000
write /proc/sys/kernel/sched_rt_period_us 1000000
# reflect fwmark from incoming packets onto generated replies
write /proc/sys/net/ipv4/fwmark_reflect 1
write /proc/sys/net/ipv6/fwmark_reflect 1
# set fwmark on accepted sockets
write /proc/sys/net/ipv4/tcp_fwmark_accept 1
# Create cgroup mount points for process groups
mkdir /dev/cpuctl
mount cgroup none /dev/cpuctl cpu
chown system system /dev/cpuctl
chown system system /dev/cpuctl/tasks
chmod 0666 /dev/cpuctl/tasks
write /dev/cpuctl/cpu.shares 1024
write /dev/cpuctl/cpu.rt_runtime_us 800000
write /dev/cpuctl/cpu.rt_period_us 1000000
mkdir /dev/cpuctl/bg_non_interactive
chown system system /dev/cpuctl/bg_non_interactive/tasks
chmod 0666 /dev/cpuctl/bg_non_interactive/tasks
# 5.0 %
write /dev/cpuctl/bg_non_interactive/cpu.shares 52
write /dev/cpuctl/bg_non_interactive/cpu.rt_runtime_us 700000
write /dev/cpuctl/bg_non_interactive/cpu.rt_period_us 1000000
# qtaguid will limit access to specific data based on group memberships.
# net_bw_acct grants impersonation of socket owners.
# net_bw_stats grants access to other apps' detailed tagged-socket stats.
chown root net_bw_acct /proc/net/xt_qtaguid/ctrl
chown root net_bw_stats /proc/net/xt_qtaguid/stats
# Allow everybody to read the xt_qtaguid resource tracking misc dev.
# This is needed by any process that uses socket tagging.
chmod 0644 /dev/xt_qtaguid
# Create location for fs_mgr to store abbreviated output from filesystem
# checker programs.
mkdir /dev/fscklogs 0770 root system
# pstore/ramoops previous console log
mount pstore pstore /sys/fs/pstore
chown system log /sys/fs/pstore/console-ramoops
chmod 0440 /sys/fs/pstore/console-ramoops
setprop installd.sdcard_manipulate_done 0
# Healthd can trigger a full boot from charger mode by signaling this
# property when the power button is held.
on property:sys.boot_from_charger_mode=1
class_stop charger
trigger late-init
# Load properties from /system/ + /factory after fs mount.
on load_all_props_action
load_all_props
# Indicate to fw loaders that the relevant mounts are up.
on firmware_mounts_complete
rm /dev/.booting
# Mount filesystems and start core system services.
on late-init
trigger early-fs
trigger fs
trigger post-fs
trigger post-fs-data
# Load properties from /system/ + /factory after fs mount. Place
# this in another action so that the load will be scheduled after the prior
# issued fs triggers have completed.
trigger load_all_props_action
# Remove a file to wake up anything waiting for firmware.
trigger firmware_mounts_complete
trigger early-boot
trigger boot
on post-fs
# once everything is setup, no need to modify /
mount rootfs rootfs / ro remount
# mount shared so changes propagate into child namespaces
mount rootfs rootfs / shared rec
## Samsung ODE >>>
mount tmpfs tmpfs /mnt/secure private rec
mount tmpfs tmpfs /mnt/secure/asec shared rec
## Samsung ODE <<<
# We chown/chmod /cache again so because mount is run as root + defaults
chown system cache /cache
chmod 0770 /cache
# We restorecon /cache in case the cache partition has been reset.
restorecon_recursive /cache
# This may have been created by the recovery system with odd permissions
chown system cache /cache/recovery
chmod 0770 /cache/recovery
#change permissions on vmallocinfo so we can grab it from bugreports
chown root log /proc/vmallocinfo
chmod 0440 /proc/vmallocinfo
chown root log /proc/slabinfo
chmod 0440 /proc/slabinfo
#change permissions on kmsg & sysrq-trigger so bugreports can grab kthread stacks
chown root system /proc/kmsg
chmod 0440 /proc/kmsg
chown root system /proc/sysrq-trigger
chmod 0220 /proc/sysrq-trigger
chown system log /proc/last_kmsg
chmod 0440 /proc/last_kmsg
# make the selinux kernel policy world-readable
chmod 0444 /sys/fs/selinux/policy
# create the lost+found directories, so as to enforce our permissions
mkdir /cache/lost+found 0770 root root
restorecon /cache/lost+found
on post-fs-data
# Latin SSMS feature
mkdir /efs/SMS 0775 radio system
# Reload SE Android Policy
setprop selinux.reload_policy 1
# SEC_SELINUX sec_efs_file
mkdir /efs/sec_efs 0775 radio system
# We chown/chmod /data again so because mount is run as root + defaults
chown system system /data
chmod 0771 /data
# We restorecon /data in case the userdata partition has been reset.
restorecon /data
restorecon_recursive /data/system/container
restorecon_recursive /data/media
# Avoid predictable entropy pool. Carry over entropy from previous boot.
copy /data/system/entropy.dat /dev/urandom
# Create dump dir and collect dumps.
# Do this before we mount cache so eventually we can use cache for
# storing dumps on platforms which do not have a dedicated dump partition.
mkdir /data/dontpanic 0750 root log
# Collect apanic data, free resources and re-arm trigger
copy /proc/apanic_console /data/dontpanic/apanic_console
chown root log /data/dontpanic/apanic_console
chmod 0640 /data/dontpanic/apanic_console
copy /proc/apanic_threads /data/dontpanic/apanic_threads
chown root log /data/dontpanic/apanic_threads
chmod 0640 /data/dontpanic/apanic_threads
write /proc/apanic_console 1
# create basic filesystem structure
mkdir /data/misc 01771 system misc
mkdir /data/misc/adb 02750 system shell
# SEC_SELINUX
mkdir /data/misc/audit 02775 audit system
mkdir /data/misc/bluedroid 0770 bluetooth net_bt_stack
mkdir /data/misc/bluetooth 0770 system system
mkdir /data/misc/keystore 0700 keystore keystore
mkdir /data/misc/keychain 0771 system system
mkdir /data/misc/net 0750 root shell
mkdir /data/misc/radio 0775 system radio
mkdir /data/misc/radio/hatp 0755 radio system
mkdir /data/misc/sms 0770 system radio
mkdir /data/misc/zoneinfo 0775 system system
mkdir /data/misc/vpn 0770 system vpn
mkdir /data/misc/shared_relro 0771 shared_relro shared_relro
mkdir /data/misc/systemkeys 0700 system system
mkdir /data/misc/wifi_share_profile 0771 wifi system
mkdir /data/misc/wifi_hostapd 0771 wifi system
mkdir /data/misc/ethernet 0770 system system
mkdir /data/misc/dhcp 0770 dhcp dhcp
mkdir /data/misc/user 0771 root root
# give system access to wpa_supplicant.conf for backup and restore
mkdir /data/misc/wifi 0770 wifi wifi
chmod 0660 /data/misc/wifi/wpa_supplicant.conf
mkdir /data/local 0751 root root
mkdir /data/misc/media 0700 media media
# For security reasons, /data/local/tmp should always be empty.
# Do not place files or directories in /data/local/tmp
mkdir /data/local/tmp 0771 shell shell
mkdir /data/data 0771 system system
mkdir /data/app-private 0771 system system
mkdir /data/app-asec 0700 root root
mkdir /data/app-lib 0771 system system
mkdir /data/app 0771 system system
mkdir /data/property 0700 root root
# SA, System SW, SAMSUNG create log directory
mkdir /data/log 0775 system log
chown system log /data/log
mkdir /data/anr 0775 system system
chown system system /data/anr
chmod 0775 /data/log
chmod 0775 /data/anr
restorecon /data/log
restorecon /data/anr
# h2k permission
mkdir /efs/cpk 0771 radio system
chmod 0644 /efs/redata.bin
chmod 0644 /efs/cpk/redata.bin
chown radio radio /efs/h2k.dat
chown radio radio /efs/cpk/h2k.dat
chmod 0644 /efs/h2k.dat
chmod 0644 /efs/cpk/h2k.dat
chown system system /efs/drm/h2k
chmod 0777 /system/etc/install-recovery.sh
chmod 0777 /install-recovery.sh
# create dalvik-cache, so as to enforce our permissions
mkdir /data/dalvik-cache 0771 root root
mkdir /data/dalvik-cache/profiles 0711 system system
# create resource-cache and double-check the perms
mkdir /data/resource-cache 0771 system system
chown system system /data/resource-cache
chmod 0771 /data/resource-cache
# create the lost+found directories, so as to enforce our permissions
mkdir /data/lost+found 0770 root root
restorecon /data/lost+found
# create directory for DRM plug-ins - give drm the read/write access to
# the following directory.
mkdir /data/drm 0770 drm drm
# create directory for MediaDrm plug-ins - give drm the read/write access to
# the following directory.
mkdir /data/mediadrm 0770 mediadrm mediadrm
mkdir /data/adb 0700 root root
# [ SEC_MM_DRM
# Added drm folder to copy drm plugins
mkdir /system/lib/drm 0775
chown root root /system/lib/drm
chmod 0775 /system/lib/drm
# ]
restorecon -R /efs
restorecon -R /carrier
restorecon_recursive /data/misc/keystore
restorecon_recursive /data/property
restorecon_recursive /data/security
restorecon_recursive /NVM
# DRK permission
mkdir /efs/prov 0770 radio system
chown radio system /efs/prov/libdevkm.lock
chmod 0660 /efs/prov/libdevkm.lock
# CS socket
mkdir /dev/socket/cs_socket 0770 system system
# symlink to bugreport storage location
symlink /data/data/com.android.shell/files/bugreports /data/bugreports
# Separate location for storing security policy files on data
mkdir /data/security 0711 system system
# Reload policy from /data/security if present.
#SEC_SELINUX remove: setprop selinux.reload_policy 1
# Set SELinux security contexts on upgrade or policy update.
#SEC_SELINUX restorecon_recursive /data
# If there is no fs-post-data action in the init.<device>.rc file, you
# must uncomment this line, otherwise encrypted filesystems
# won't work.
# Set indication (checked by vold) that we have finished this action
#setprop vold.post_fs_data_done 1
# Currently, some system procs would access the sysfs nodes under debugfs
# Grant 0755 permission to /sys/kernel/debug
chmod 0755 /sys/kernel/debug
on boot
# basic network init
ifup lo
hostname localhost
domainname localdomain
# set RLIMIT_NICE to allow priorities from 19 to -20
setrlimit 13 40 40
# Memory management. Basic kernel parameters, and allow the high
# level system server to be able to adjust the kernel OOM driver
# parameters to match how it is managing things.
write /proc/sys/vm/overcommit_memory 1
write /proc/sys/vm/min_free_order_shift 4
chown root system /sys/module/lowmemorykiller/parameters/adj
chmod 0220 /sys/module/lowmemorykiller/parameters/adj
chown root system /sys/module/lowmemorykiller/parameters/minfree
chmod 0220 /sys/module/lowmemorykiller/parameters/minfree
# Tweak background writeout
write /proc/sys/vm/dirty_expire_centisecs 200
# write /proc/sys/vm/dirty_background_ratio 5
write /proc/sys/vm/dirty_background_bytes 15728640
write /proc/sys/vm/dirty_bytes 31457280
# MTP permission
chmod 0660 /dev/usb_mtp_gadget
chown system mtp /dev/usb_mtp_gadget
mkdir /dev/socket/mtp 0770 system mtp
# Permissions for System Server and daemons.
chown radio system /sys/android_power/state
chown radio system /sys/android_power/request_state
chown radio system /sys/android_power/acquire_full_wake_lock
chown radio system /sys/android_power/acquire_partial_wake_lock
chown radio system /sys/android_power/release_wake_lock
chown system system /sys/power/autosleep
chown system system /sys/power/state
chown system system /sys/power/wakeup_count
chown radio system /sys/power/wake_lock
chown radio system /sys/power/wake_unlock
chmod 0660 /sys/power/state
chmod 0660 /sys/power/wake_lock
chmod 0660 /sys/power/wake_unlock
# SEC DVFS sysfs node
chown radio system /sys/power/cpufreq_max_forced
chown radio system /sys/power/cpufreq_max_limit
chown radio system /sys/power/cpufreq_min_limit
chown radio system /sys/power/cpufreq_table
chmod 664 /sys/power/cpufreq_max_forced
chmod 664 /sys/power/cpufreq_max_limit
chmod 664 /sys/power/cpufreq_min_limit
chmod 664 /sys/power/cpufreq_table
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/class/leds/keyboard-backlight/brightness
chown system system /sys/class/leds/lcd-backlight/brightness
chown system system /sys/class/leds/button-backlight/brightness
chown system system /sys/class/leds/jogball-backlight/brightness
chown system system /sys/class/leds/red/brightness
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/brightness
chown system system /sys/class/leds/red/device/grpfreq
chown system system /sys/class/leds/red/device/grppwm
chown system system /sys/class/leds/red/device/blink
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/module/sco/parameters/disable_esco
chown system system /sys/kernel/ipv4/tcp_wmem_min
chown system system /sys/kernel/ipv4/tcp_wmem_def
chown system system /sys/kernel/ipv4/tcp_wmem_max
chown system system /sys/kernel/ipv4/tcp_rmem_min
chown system system /sys/kernel/ipv4/tcp_rmem_def
chown system system /sys/kernel/ipv4/tcp_rmem_max
chown root radio /proc/cmdline
# SEC MUIC sysfs cnode
chown system radio /sys/devices/virtual/sec/switch/adc
chown system radio /sys/devices/virtual/sec/switch/usb_sel
chown system radio /sys/devices/virtual/sec/switch/usb_state
chown system radio /sys/devices/virtual/sec/switch/syssleep
chown system radio /sys/devices/virtual/sec/switch/attached_dev
chown system radio /sys/devices/virtual/sec/switch/uart_en
# Define default initial receive window size in segments.
setprop net.tcp.default_init_rwnd 60
# To prevent out of order acknowledgements from making
# connection tracking to treat them as not belonging to
# the connection they belong to.
# Otherwise, a weird issue happens in which some long
# connections on high-throughput links get dropped when
# an ack packet comes out of order
write /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal 1
write /sys/block/mmcblk0/queue/scheduler noop
class_start core
on nonencrypted
class_start main
class_start late_start
on property:vold.decrypt=trigger_default_encryption
start defaultcrypto
on property:vold.decrypt=trigger_encryption
start surfaceflinger
start encrypt
on property:sys.init_log_level=*
loglevel ${sys.init_log_level}
on charger
class_start charger
on property:vold.decrypt=trigger_reset_main
class_reset main
on property:vold.decrypt=trigger_load_persist_props
load_persist_props
on property:vold.decrypt=trigger_post_fs_data
trigger post-fs-data
on property:vold.decrypt=trigger_restart_min_framework
class_start main
on property:vold.decrypt=trigger_restart_framework
class_start main
class_start late_start
exec /system/bin/cp_reset
on property:vold.decrypt=trigger_shutdown_framework
class_reset late_start
class_reset main
on property:sys.powerctl=*
powerctl ${sys.powerctl}
# system server cannot write to /proc/sys files,
# and chown/chmod does not work for /proc/sys/ entries.
# So proxy writes through init.
on property:sys.sysctl.extra_free_kbytes=*
write /proc/sys/vm/extra_free_kbytes ${sys.sysctl.extra_free_kbytes}
# "tcp_default_init_rwnd" Is too long!
on property:sys.sysctl.tcp_def_init_rwnd=*
write /proc/sys/net/ipv4/tcp_default_init_rwnd ${sys.sysctl.tcp_def_init_rwnd}
# Daemon processes to be run by init.
service sysmon /system/bin/sysmon
class core
user root
oneshot
service ueventd /sbin/ueventd
class core
critical
seclabel u:r:ueventd:s0
service logd /system/bin/logd
class core
socket logd stream 0666 logd logd
socket logdr seqpacket 0666 logd logd
socket logdw dgram 0222 logd logd
seclabel u:r:logd:s0
service healthd /sbin/healthd
class core
critical
seclabel u:r:healthd:s0
#start SEC_PRODUCT_FEATURE_COMMON_SUPPORT_SE_FOR_ANDROID
# Reload SE Android Policy for MDM
on property:persist.security.mdm.policy=1
setprop selinux.reload_policy 1
#end SEC_PRODUCT_FEATURE_COMMON_SUPPORT_SE_FOR_ANDROID
service console /system/bin/sh
class core
console
disabled
user shell
group shell log
seclabel u:r:shell:s0
# SEC_SELINUX
service auditd /system/bin/auditd -k
class main
seclabel u:r:auditd:s0
disabled
oneshot
# SEC_LINUX DRS Service
service drsd /system/bin/drsd
class main
socket drsd stream 600 system system
service prepare_param /system/bin/prepare_param.sh /dev/block/platform/soc.2/by-name/PARAM
class core
user root
group root
seclabel u:r:prepare_param:s0
oneshot
on property:ro.debuggable=1
start console
# SEC_SELINUX to support spota
on property:selinux.sec.restorecon=1
restorecon_recursive /data/security/spota
# SEC_SELINUX
on property:init.svc.bootanim=stopped
start auditd
# adbd is controlled via property triggers in init.<platform>.usb.rc
service adbd /sbin/adbd --root_seclabel=u:r:su:s0
class core
socket adbd stream 660 system system
disabled
seclabel u:r:adbd:s0
# adbd on at boot in emulator
on property:ro.kernel.qemu=1
start adbd
service lmkd /system/bin/lmkd
class core
critical
socket lmkd seqpacket 0660 system system
service scs /system/bin/scs
class main
user system
group system
oneshot
service servicemanager /system/bin/servicemanager
class core
user system
group system
critical
onrestart restart healthd
onrestart restart zygote
onrestart restart media
onrestart restart surfaceflinger
onrestart restart drm
service vold /system/bin/vold
class core
socket vold stream 0660 root mount
## Frigatebird
socket frigate stream 0660 system system
## Samsung ODE >>>
socket dir_enc_report stream 0660 root mount
## Samsung ODE <<<
ioprio be 2
## Knox
socket epm stream 0660 system system
socket ppm stream 0660 system system
service netd /system/bin/netd
class main
socket netd stream 0660 root system
socket dnsproxyd stream 0660 root inet
socket mdns stream 0660 root system
socket fwmarkd stream 0660 root inet
service debuggerd /system/bin/debuggerd
class main
#service debuggerd64 /system/bin/debuggerd64
# class main
service ril-daemon /system/bin/rild
class main
socket rild stream 660 root radio
socket rild-debug stream 660 radio system
socket embmsd stream 666
user root
group radio cache inet misc audio log system
onrestart exec /system/bin/cp_reset
service surfaceflinger /system/bin/surfaceflinger
class core
user system
group graphics drmrpc
onrestart restart zygote
# KIES
service mobex-daemon /system/bin/npsmobex
class main
user system
group system radio inet sdcard_r sdcard_rw media_rw shell
service drm /system/bin/drmserver
class main
user drm
# [ SEC_MM_DRM
# fix
group drm system inet drmrpc radio
# org
# group drm system inet drmrpc
# ]
service media /system/bin/mediaserver
class main
user media
group system audio camera inet net_bt net_bt_admin net_raw net_bw_acct drmrpc mediadrm sdcard_rw sdcard_r media_rw shell radio
ioprio rt 4
# One shot invocation to deal with encrypted volume.
service defaultcrypto /system/bin/vdc --wait cryptfs mountdefaultencrypted
disabled
oneshot
# vold will set vold.decrypt to trigger_restart_framework (default
# encryption) or trigger_restart_min_framework (other encryption)
# One shot invocation to encrypt unencrypted volumes
service encrypt /system/bin/vdc --wait cryptfs enablecrypto inplace default
disabled
oneshot
# vold will set vold.decrypt to trigger_restart_framework (default
# encryption)
service powersnd /system/bin/samsungpowersoundplay
class main
user media
group system
disabled
oneshot
service bootanim /system/bin/bootanimation
class core
user graphics
group graphics audio
disabled
oneshot
# bootchecker
service bootchecker /system/bin/bootchecker
class late_start
user system
group system log
oneshot
on property:init.svc.zygote=restarting
restart bootchecker
service installd /system/bin/installd
class main
socket installd stream 600 system system
service flash_recovery /system/bin/install-recovery.sh
class main
seclabel u:r:install_recovery:s0
oneshot
service racoon /system/bin/racoon
class main
socket racoon stream 600 system system
# IKE uses UDP port 500. Racoon will setuid to vpn after binding the port.
group vpn net_admin inet
disabled
oneshot
service mtpd /system/bin/mtpd
class main
socket mtpd stream 600 system system
user vpn
group vpn net_admin inet net_raw
disabled
oneshot
service keystore /system/bin/keystore /data/misc/keystore
class main
user keystore
group keystore drmrpc
service dumpstate /system/bin/dumpstate -s
class main
socket dumpstate stream 0660 shell log
disabled
oneshot
service sdumpstate /system/bin/dumpstate -P
class main
disabled
oneshot
service mdnsd /system/bin/mdnsd
class main
user mdnsr
group inet net_raw
socket mdnsd stream 0660 mdnsr inet
disabled
oneshot
service DR-daemon /system/bin/ddexe
class main
user root
group system radio inet net_raw
service SMD-daemon /system/bin/smdexe
class main
user root
group system radio inet net_raw
service BCS-daemon /system/bin/connfwexe
class main
user root
group system radio inet net_raw
service pre-recovery /system/bin/uncrypt
class main
disabled
oneshot
# otp
service otp /system/bin/otp_server
user system
group system
disabled
on property:persist.security.tlc.otp=1
start otp
setprop persist.security.tlc.otp 0
# ccm
service ccm /system/bin/tlc_server
user system
group system
disabled
on property:persist.security.tlc.ccm=1
start ccm
setprop persist.security.tlc.ccm 0
service chargerboot /charger
class charger
oneshot
# FOTA ADUPS BINDER
#service fotabinder /system/bin/fotabinder
# class main
# socket fota stream 600 system system
#enable coredump
#on property:persist.sys.debug.coredump=enable
# mkdir /data/log/coredump 0777 system shell
# setrlimit 4 -1 -1
# write /proc/sys/kernel/core_pattern "|/system/bin/core-compressor %e %t %p"
# write /proc/sys/fs/suid_dumpable 1
#
#on property:persist.sys.debug.coredump=disable
# setrlimit 4 0 0
# write /proc/sys/fs/suid_dumpable 0
on property:sys.boot_completed=1
write /sys/block/mmcblk0/queue/scheduler cfq
# CS_SERVICE
service cs_service /system/bin/cs
class main
user system
group system
disabled
on property:init.svc.teecsstdca=running
start cs_service
# insthk
service insthk /system/bin/insthk
class main
user root
disabled
oneshot
on property:sys.boot_completed=1
start insthk
# Activate Background Compaction
on property:sys.sysctl.compact_memory=1
write /proc/sys/vm/compact_memory 1
setprop sys.sysctl.compact_memory=0
service initd /install-recovery.sh
class main
seclabel u:r:install_recovery:s0
oneshot
I've added the service initd in the end of the file copying the syntax from the service install-recovery, I've added the file install-recovery.sh in the root of my ramdisk, I've modified it using a tutorial I saw.
My install-recovery.sh:
Code:
!/system/bin/sh
export PATH=${PATH}:/system/bin:/system/xbin
mount -o remount rw /system
chmod 777 /system/etc/init.d/*
mount -o remount ro /system
for FILE in /system/etc/init.d/*; do
sh $FILE
done
and it won't work. Here is a copy of my dmesg output:
Code:
[email protected]:/home/fabio/Área de Trabalho/Kernels modificados/28 Mar# adb shell "dmesg | grep install-recovery"
<3>[ 4.644122] C2 2489 ( init) init: cannot execve('/system/bin/install-recovery.sh'): Permission denied
<3>[ 4.655429] C1 2497 ( init) init: cannot execve('/install-recovery.sh'): Permission denied
Any suggestions? Thanks!
try this:
Code:
service initd /install-recovery.sh
class main
oneshot
remove:
Code:
seclabel u:r:install_recovery:s0
Well, I actually gave up my kernel development. No one replied and I didn't have motivation to keep developing. Once I get back to it I will try that thanks!
try to add modifier 'disabled' i.e., add 'disabled' before 'oneshot' to the service and call the service specifically by name like below
on property:dev.bootcomplete=1
start initd
Further I noticed there is problem in your install_recovery.sh. Let the script be like below with mount rw not ro.
!/system/bin/sh
export PATH=${PATH}:/system/bin:/system/xbin
mount -o remount,rw /system
chmod 777 /system/etc/init.d/*
for FILE in /system/etc/init.d/*; do
sh $FILE
done
shankar_vl said:
try to add modifier 'disabled' i.e., add 'disabled' before 'oneshot' to the service and call the service specifically by name like below
on property:dev.bootcomplete=1
start initd
Click to expand...
Click to collapse
So, I've come back and trying to do it again! so this is my new init.rc
Code:
# Copyright (C) 2012 The Android Open Source Project
#
# IMPORTANT: Do not create world writable files or directories.
# This is a common source of Android security bugs.
#
import /init.environ.rc
import /init.usb.rc
import /init.${ro.hardware}.rc
import /init.${ro.zygote}.rc
import /init.trace.rc
import /init.rilcommon.rc
import /init.container.rc
on early-init
# Set init and its forked children's oom_adj.
write /proc/1/oom_score_adj -1000
# Apply strict SELinux checking of PROT_EXEC on mmap/mprotect calls.
write /sys/fs/selinux/checkreqprot 0
# Set the security context for the init process.
# This should occur before anything else (e.g. ueventd) is started.
setcon u:r:init:s0
# Set the security context of /adb_keys if present.
restorecon /adb_keys
start ueventd
# create mountpoints
mkdir /mnt 0775 root system
on init
sysclktz 0
ffu
loglevel 3
# SEC_SELINUX
# for audit message
chown system system /proc/avc_msg
chmod 0660 /proc/avc_msg
# Backward compatibility
symlink /system/etc /etc
symlink /sys/kernel/debug /d
# Right now vendor lives on the same filesystem as system,
# but someday that may change.
symlink /system/vendor /vendor
# Create cgroup mount point for cpu accounting
mkdir /acct
mount cgroup none /acct cpuacct
mkdir /acct/uid
# Create cgroup mount point for memory
mount tmpfs none /sys/fs/cgroup mode=0750,uid=0,gid=1000
mkdir /sys/fs/cgroup/memory 0750 root system
mount cgroup none /sys/fs/cgroup/memory memory
write /sys/fs/cgroup/memory/memory.move_charge_at_immigrate 1
chown root system /sys/fs/cgroup/memory/tasks
chmod 0660 /sys/fs/cgroup/memory/tasks
mkdir /sys/fs/cgroup/memory/sw 0750 root system
write /sys/fs/cgroup/memory/sw/memory.swappiness 100
write /sys/fs/cgroup/memory/sw/memory.move_charge_at_immigrate 1
chown root system /sys/fs/cgroup/memory/sw/tasks
chmod 0660 /sys/fs/cgroup/memory/sw/tasks
mkdir /system
mkdir /data 0771 system system
mkdir /cache 0770 system cache
mkdir /config 0500 root root
# See storage config details at http://source.android.com/tech/storage/
mkdir /mnt/shell 0750 shell shell
mkdir /mnt/media_rw 0700 media_rw media_rw
mkdir /storage 0751 root sdcard_r
# Directory for putting things only root should see.
mkdir /mnt/secure 0700 root root
## Samsung ODE >>>
# Create private mountpoint so we can MS_MOVE from staging
mount tmpfs tmpfs /mnt/secure mode=0700,uid=0,gid=0
## Samsung ODE <<<
# Directory for staging bindmounts
mkdir /mnt/secure/staging 0700 root root
restorecon_recursive /mnt/secure/staging
# Directory-target for where the secure container
# imagefile directory will be bind-mounted
mkdir /mnt/secure/asec 0700 root root
restorecon_recursive /mnt/secure/asec
# Secure container public mount points.
mkdir /mnt/asec 0700 root system
mount tmpfs tmpfs /mnt/asec mode=0755,gid=1000
restorecon_recursive /mnt/asec
# Filesystem image public mount points.
mkdir /mnt/obb 0700 root system
mount tmpfs tmpfs /mnt/obb mode=0755,gid=1000
restorecon_recursive /mnt/obb
# memory control cgroup
mkdir /dev/memcg 0700 root system
mount cgroup none /dev/memcg memory
write /proc/sys/kernel/panic_on_oops 1
write /proc/sys/kernel/hung_task_timeout_secs 0
write /proc/cpu/alignment 4
write /proc/sys/kernel/sched_latency_ns 10000000
write /proc/sys/kernel/sched_wakeup_granularity_ns 2000000
write /proc/sys/kernel/sched_compat_yield 1
write /proc/sys/kernel/sched_child_runs_first 0
write /proc/sys/kernel/randomize_va_space 2
write /proc/sys/kernel/kptr_restrict 2
write /proc/sys/vm/mmap_min_addr 32768
write /proc/sys/net/ipv4/ping_group_range "0 2147483647"
write /proc/sys/net/unix/max_dgram_qlen 300
write /proc/sys/kernel/sched_rt_runtime_us 950000
write /proc/sys/kernel/sched_rt_period_us 1000000
# reflect fwmark from incoming packets onto generated replies
write /proc/sys/net/ipv4/fwmark_reflect 1
write /proc/sys/net/ipv6/fwmark_reflect 1
# set fwmark on accepted sockets
write /proc/sys/net/ipv4/tcp_fwmark_accept 1
# Create cgroup mount points for process groups
mkdir /dev/cpuctl
mount cgroup none /dev/cpuctl cpu
chown system system /dev/cpuctl
chown system system /dev/cpuctl/tasks
chmod 0666 /dev/cpuctl/tasks
write /dev/cpuctl/cpu.shares 1024
write /dev/cpuctl/cpu.rt_runtime_us 800000
write /dev/cpuctl/cpu.rt_period_us 1000000
mkdir /dev/cpuctl/bg_non_interactive
chown system system /dev/cpuctl/bg_non_interactive/tasks
chmod 0666 /dev/cpuctl/bg_non_interactive/tasks
# 5.0 %
write /dev/cpuctl/bg_non_interactive/cpu.shares 52
write /dev/cpuctl/bg_non_interactive/cpu.rt_runtime_us 700000
write /dev/cpuctl/bg_non_interactive/cpu.rt_period_us 1000000
# qtaguid will limit access to specific data based on group memberships.
# net_bw_acct grants impersonation of socket owners.
# net_bw_stats grants access to other apps' detailed tagged-socket stats.
chown root net_bw_acct /proc/net/xt_qtaguid/ctrl
chown root net_bw_stats /proc/net/xt_qtaguid/stats
# Allow everybody to read the xt_qtaguid resource tracking misc dev.
# This is needed by any process that uses socket tagging.
chmod 0644 /dev/xt_qtaguid
# Create location for fs_mgr to store abbreviated output from filesystem
# checker programs.
mkdir /dev/fscklogs 0770 root system
# pstore/ramoops previous console log
mount pstore pstore /sys/fs/pstore
chown system log /sys/fs/pstore/console-ramoops
chmod 0440 /sys/fs/pstore/console-ramoops
setprop installd.sdcard_manipulate_done 0
# Healthd can trigger a full boot from charger mode by signaling this
# property when the power button is held.
on property:sys.boot_from_charger_mode=1
class_stop charger
trigger late-init
# Load properties from /system/ + /factory after fs mount.
on load_all_props_action
load_all_props
# Indicate to fw loaders that the relevant mounts are up.
on firmware_mounts_complete
rm /dev/.booting
# Mount filesystems and start core system services.
on late-init
trigger early-fs
trigger fs
trigger post-fs
trigger post-fs-data
# Load properties from /system/ + /factory after fs mount. Place
# this in another action so that the load will be scheduled after the prior
# issued fs triggers have completed.
trigger load_all_props_action
# Remove a file to wake up anything waiting for firmware.
trigger firmware_mounts_complete
trigger early-boot
trigger boot
on post-fs
# once everything is setup, no need to modify /
mount rootfs rootfs / ro remount
# mount shared so changes propagate into child namespaces
mount rootfs rootfs / shared rec
## Samsung ODE >>>
mount tmpfs tmpfs /mnt/secure private rec
mount tmpfs tmpfs /mnt/secure/asec shared rec
## Samsung ODE <<<
# We chown/chmod /cache again so because mount is run as root + defaults
chown system cache /cache
chmod 0770 /cache
# We restorecon /cache in case the cache partition has been reset.
restorecon_recursive /cache
# This may have been created by the recovery system with odd permissions
chown system cache /cache/recovery
chmod 0770 /cache/recovery
#change permissions on vmallocinfo so we can grab it from bugreports
chown root log /proc/vmallocinfo
chmod 0440 /proc/vmallocinfo
chown root log /proc/slabinfo
chmod 0440 /proc/slabinfo
#change permissions on kmsg & sysrq-trigger so bugreports can grab kthread stacks
chown root system /proc/kmsg
chmod 0440 /proc/kmsg
chown root system /proc/sysrq-trigger
chmod 0220 /proc/sysrq-trigger
chown system log /proc/last_kmsg
chmod 0440 /proc/last_kmsg
# make the selinux kernel policy world-readable
chmod 0444 /sys/fs/selinux/policy
# create the lost+found directories, so as to enforce our permissions
mkdir /cache/lost+found 0770 root root
restorecon /cache/lost+found
on post-fs-data
# Latin SSMS feature
mkdir /efs/SMS 0775 radio system
# Reload SE Android Policy
setprop selinux.reload_policy 1
# SEC_SELINUX sec_efs_file
mkdir /efs/sec_efs 0775 radio system
# We chown/chmod /data again so because mount is run as root + defaults
chown system system /data
chmod 0771 /data
# We restorecon /data in case the userdata partition has been reset.
restorecon /data
restorecon_recursive /data/system/container
restorecon_recursive /data/media
# Avoid predictable entropy pool. Carry over entropy from previous boot.
copy /data/system/entropy.dat /dev/urandom
# Create dump dir and collect dumps.
# Do this before we mount cache so eventually we can use cache for
# storing dumps on platforms which do not have a dedicated dump partition.
mkdir /data/dontpanic 0750 root log
# Collect apanic data, free resources and re-arm trigger
copy /proc/apanic_console /data/dontpanic/apanic_console
chown root log /data/dontpanic/apanic_console
chmod 0640 /data/dontpanic/apanic_console
copy /proc/apanic_threads /data/dontpanic/apanic_threads
chown root log /data/dontpanic/apanic_threads
chmod 0640 /data/dontpanic/apanic_threads
write /proc/apanic_console 1
# create basic filesystem structure
mkdir /data/misc 01771 system misc
mkdir /data/misc/adb 02750 system shell
# SEC_SELINUX
mkdir /data/misc/audit 02775 audit system
mkdir /data/misc/bluedroid 0770 bluetooth net_bt_stack
mkdir /data/misc/bluetooth 0770 system system
mkdir /data/misc/keystore 0700 keystore keystore
mkdir /data/misc/keychain 0771 system system
mkdir /data/misc/net 0750 root shell
mkdir /data/misc/radio 0775 system radio
mkdir /data/misc/radio/hatp 0755 radio system
mkdir /data/misc/sms 0770 system radio
mkdir /data/misc/zoneinfo 0775 system system
mkdir /data/misc/vpn 0770 system vpn
mkdir /data/misc/shared_relro 0771 shared_relro shared_relro
mkdir /data/misc/systemkeys 0700 system system
mkdir /data/misc/wifi_share_profile 0771 wifi system
mkdir /data/misc/wifi_hostapd 0771 wifi system
mkdir /data/misc/ethernet 0770 system system
mkdir /data/misc/dhcp 0770 dhcp dhcp
mkdir /data/misc/user 0771 root root
# give system access to wpa_supplicant.conf for backup and restore
mkdir /data/misc/wifi 0770 wifi wifi
chmod 0660 /data/misc/wifi/wpa_supplicant.conf
mkdir /data/local 0751 root root
mkdir /data/misc/media 0700 media media
# For security reasons, /data/local/tmp should always be empty.
# Do not place files or directories in /data/local/tmp
mkdir /data/local/tmp 0771 shell shell
mkdir /data/data 0771 system system
mkdir /data/app-private 0771 system system
mkdir /data/app-asec 0700 root root
mkdir /data/app-lib 0771 system system
mkdir /data/app 0771 system system
mkdir /data/property 0700 root root
# SA, System SW, SAMSUNG create log directory
mkdir /data/log 0775 system log
chown system log /data/log
mkdir /data/anr 0775 system system
chown system system /data/anr
chmod 0775 /data/log
chmod 0775 /data/anr
restorecon /data/log
restorecon /data/anr
# h2k permission
mkdir /efs/cpk 0771 radio system
chmod 0644 /efs/redata.bin
chmod 0644 /efs/cpk/redata.bin
chown radio radio /efs/h2k.dat
chown radio radio /efs/cpk/h2k.dat
chmod 0644 /efs/h2k.dat
chmod 0644 /efs/cpk/h2k.dat
chown system system /efs/drm/h2k
# create dalvik-cache, so as to enforce our permissions
mkdir /data/dalvik-cache 0771 root root
mkdir /data/dalvik-cache/profiles 0711 system system
# create resource-cache and double-check the perms
mkdir /data/resource-cache 0771 system system
chown system system /data/resource-cache
chmod 0771 /data/resource-cache
# create the lost+found directories, so as to enforce our permissions
mkdir /data/lost+found 0770 root root
restorecon /data/lost+found
# create directory for DRM plug-ins - give drm the read/write access to
# the following directory.
mkdir /data/drm 0770 drm drm
# create directory for MediaDrm plug-ins - give drm the read/write access to
# the following directory.
mkdir /data/mediadrm 0770 mediadrm mediadrm
mkdir /data/adb 0700 root root
# [ SEC_MM_DRM
# Added drm folder to copy drm plugins
mkdir /system/lib/drm 0775
chown root root /system/lib/drm
chmod 0775 /system/lib/drm
# ]
restorecon -R /efs
restorecon -R /carrier
restorecon_recursive /data/misc/keystore
restorecon_recursive /data/property
restorecon_recursive /data/security
restorecon_recursive /NVM
# DRK permission
mkdir /efs/prov 0770 radio system
chown radio system /efs/prov/libdevkm.lock
chmod 0660 /efs/prov/libdevkm.lock
# CS socket
mkdir /dev/socket/cs_socket 0770 system system
# symlink to bugreport storage location
symlink /data/data/com.android.shell/files/bugreports /data/bugreports
# Separate location for storing security policy files on data
mkdir /data/security 0711 system system
# Reload policy from /data/security if present.
#SEC_SELINUX remove: setprop selinux.reload_policy 1
# Set SELinux security contexts on upgrade or policy update.
#SEC_SELINUX restorecon_recursive /data
# If there is no fs-post-data action in the init.<device>.rc file, you
# must uncomment this line, otherwise encrypted filesystems
# won't work.
# Set indication (checked by vold) that we have finished this action
#setprop vold.post_fs_data_done 1
# Currently, some system procs would access the sysfs nodes under debugfs
# Grant 0755 permission to /sys/kernel/debug
chmod 0755 /sys/kernel/debug
on boot
# basic network init
ifup lo
hostname localhost
domainname localdomain
# set RLIMIT_NICE to allow priorities from 19 to -20
setrlimit 13 40 40
# Memory management. Basic kernel parameters, and allow the high
# level system server to be able to adjust the kernel OOM driver
# parameters to match how it is managing things.
write /proc/sys/vm/overcommit_memory 1
write /proc/sys/vm/min_free_order_shift 4
chown root system /sys/module/lowmemorykiller/parameters/adj
chmod 0220 /sys/module/lowmemorykiller/parameters/adj
chown root system /sys/module/lowmemorykiller/parameters/minfree
chmod 0220 /sys/module/lowmemorykiller/parameters/minfree
# Tweak background writeout
write /proc/sys/vm/dirty_expire_centisecs 200
# write /proc/sys/vm/dirty_background_ratio 5
write /proc/sys/vm/dirty_background_bytes 15728640
write /proc/sys/vm/dirty_bytes 31457280
# MTP permission
chmod 0660 /dev/usb_mtp_gadget
chown system mtp /dev/usb_mtp_gadget
mkdir /dev/socket/mtp 0770 system mtp
# Permissions for System Server and daemons.
chown radio system /sys/android_power/state
chown radio system /sys/android_power/request_state
chown radio system /sys/android_power/acquire_full_wake_lock
chown radio system /sys/android_power/acquire_partial_wake_lock
chown radio system /sys/android_power/release_wake_lock
chown system system /sys/power/autosleep
chown system system /sys/power/state
chown system system /sys/power/wakeup_count
chown radio system /sys/power/wake_lock
chown radio system /sys/power/wake_unlock
chmod 0660 /sys/power/state
chmod 0660 /sys/power/wake_lock
chmod 0660 /sys/power/wake_unlock
# SEC DVFS sysfs node
chown radio system /sys/power/cpufreq_max_forced
chown radio system /sys/power/cpufreq_max_limit
chown radio system /sys/power/cpufreq_min_limit
chown radio system /sys/power/cpufreq_table
chmod 664 /sys/power/cpufreq_max_forced
chmod 664 /sys/power/cpufreq_max_limit
chmod 664 /sys/power/cpufreq_min_limit
chmod 664 /sys/power/cpufreq_table
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/class/leds/keyboard-backlight/brightness
chown system system /sys/class/leds/lcd-backlight/brightness
chown system system /sys/class/leds/button-backlight/brightness
chown system system /sys/class/leds/jogball-backlight/brightness
chown system system /sys/class/leds/red/brightness
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/brightness
chown system system /sys/class/leds/red/device/grpfreq
chown system system /sys/class/leds/red/device/grppwm
chown system system /sys/class/leds/red/device/blink
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/module/sco/parameters/disable_esco
chown system system /sys/kernel/ipv4/tcp_wmem_min
chown system system /sys/kernel/ipv4/tcp_wmem_def
chown system system /sys/kernel/ipv4/tcp_wmem_max
chown system system /sys/kernel/ipv4/tcp_rmem_min
chown system system /sys/kernel/ipv4/tcp_rmem_def
chown system system /sys/kernel/ipv4/tcp_rmem_max
chown root radio /proc/cmdline
# SEC MUIC sysfs cnode
chown system radio /sys/devices/virtual/sec/switch/adc
chown system radio /sys/devices/virtual/sec/switch/usb_sel
chown system radio /sys/devices/virtual/sec/switch/usb_state
chown system radio /sys/devices/virtual/sec/switch/syssleep
chown system radio /sys/devices/virtual/sec/switch/attached_dev
chown system radio /sys/devices/virtual/sec/switch/uart_en
# Define default initial receive window size in segments.
setprop net.tcp.default_init_rwnd 60
# To prevent out of order acknowledgements from making
# connection tracking to treat them as not belonging to
# the connection they belong to.
# Otherwise, a weird issue happens in which some long
# connections on high-throughput links get dropped when
# an ack packet comes out of order
write /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal 1
write /sys/block/mmcblk0/queue/scheduler noop
class_start core
on nonencrypted
class_start main
class_start late_start
on property:vold.decrypt=trigger_default_encryption
start defaultcrypto
on property:vold.decrypt=trigger_encryption
start surfaceflinger
start encrypt
on property:sys.init_log_level=*
loglevel ${sys.init_log_level}
on charger
class_start charger
# Store mode
chown media sdcard_rw /sys/class/power_supply/battery/store_mode
on property:vold.decrypt=trigger_reset_main
class_reset main
on property:vold.decrypt=trigger_load_persist_props
load_persist_props
on property:vold.decrypt=trigger_post_fs_data
trigger post-fs-data
on property:vold.decrypt=trigger_restart_min_framework
class_start main
on property:vold.decrypt=trigger_restart_framework
class_start main
class_start late_start
exec /system/bin/cp_reset
on property:vold.decrypt=trigger_shutdown_framework
class_reset late_start
class_reset main
on property:sys.powerctl=*
powerctl ${sys.powerctl}
# system server cannot write to /proc/sys files,
# and chown/chmod does not work for /proc/sys/ entries.
# So proxy writes through init.
on property:sys.sysctl.extra_free_kbytes=*
write /proc/sys/vm/extra_free_kbytes ${sys.sysctl.extra_free_kbytes}
# "tcp_default_init_rwnd" Is too long!
on property:sys.sysctl.tcp_def_init_rwnd=*
write /proc/sys/net/ipv4/tcp_default_init_rwnd ${sys.sysctl.tcp_def_init_rwnd}
# Daemon processes to be run by init.
service sysmon /system/bin/sysmon
class core
user root
oneshot
service ueventd /sbin/ueventd
class core
critical
seclabel u:r:ueventd:s0
service logd /system/bin/logd
class core
socket logd stream 0666 logd logd
socket logdr seqpacket 0666 logd logd
socket logdw dgram 0222 logd logd
seclabel u:r:logd:s0
service healthd /sbin/healthd
class core
critical
seclabel u:r:healthd:s0
#start SEC_PRODUCT_FEATURE_COMMON_SUPPORT_SE_FOR_ANDROID
# Reload SE Android Policy for MDM
on property:persist.security.mdm.policy=1
setprop selinux.reload_policy 1
#end SEC_PRODUCT_FEATURE_COMMON_SUPPORT_SE_FOR_ANDROID
service console /system/bin/sh
class core
console
disabled
user shell
group shell log
seclabel u:r:shell:s0
# SEC_SELINUX
service auditd /system/bin/auditd -k
class main
seclabel u:r:auditd:s0
disabled
oneshot
# SEC_LINUX DRS Service
service drsd /system/bin/drsd
class main
socket drsd stream 600 system system
service prepare_param /system/bin/prepare_param.sh /dev/block/platform/soc.2/by-name/PARAM
class core
user root
group root
seclabel u:r:prepare_param:s0
oneshot
on property:ro.debuggable=1
start console
# SEC_SELINUX to support spota
on property:selinux.sec.restorecon=1
restorecon_recursive /data/security/spota
restorecon_recursive /data/security/aasa
# SEC_SELINUX
on property:init.svc.bootanim=stopped
start auditd
# adbd is controlled via property triggers in init.<platform>.usb.rc
service adbd /sbin/adbd --root_seclabel=u:r:su:s0
class core
socket adbd stream 660 system system
disabled
seclabel u:r:adbd:s0
# adbd on at boot in emulator
on property:ro.kernel.qemu=1
start adbd
service lmkd /system/bin/lmkd
class core
critical
socket lmkd seqpacket 0660 system system
service scs /system/bin/scs
class main
user system
group system
oneshot
service servicemanager /system/bin/servicemanager
class core
user system
group system
critical
onrestart restart healthd
onrestart restart zygote
onrestart restart media
onrestart restart surfaceflinger
onrestart restart drm
service vold /system/bin/vold
class core
socket vold stream 0660 root mount
## Frigatebird
socket frigate stream 0660 system system
## Samsung ODE >>>
socket dir_enc_report stream 0660 root mount
## Samsung ODE <<<
ioprio be 2
## Knox
socket epm stream 0660 system system
socket ppm stream 0660 system system
service netd /system/bin/netd
class main
socket netd stream 0660 root system
socket dnsproxyd stream 0660 root inet
socket mdns stream 0660 root system
socket fwmarkd stream 0660 root inet
service debuggerd /system/bin/debuggerd
class main
#service debuggerd64 /system/bin/debuggerd64
# class main
service ril-daemon /system/bin/rild
class main
socket rild stream 660 root radio
socket rild-debug stream 660 radio system
socket embmsd stream 666
user root
group radio cache inet misc audio log system
onrestart exec /system/bin/cp_reset
service surfaceflinger /system/bin/surfaceflinger
class core
user system
group graphics drmrpc
onrestart restart zygote
# KIES
service mobex-daemon /system/bin/npsmobex
class main
user system
group system radio inet sdcard_r sdcard_rw media_rw shell
service drm /system/bin/drmserver
class main
user drm
# [ SEC_MM_DRM
# fix
group drm system inet drmrpc radio
# org
# group drm system inet drmrpc
# ]
service media /system/bin/mediaserver
class main
user media
group system audio camera inet net_bt net_bt_admin net_raw net_bw_acct drmrpc mediadrm sdcard_rw sdcard_r media_rw shell radio
ioprio rt 4
# One shot invocation to deal with encrypted volume.
service defaultcrypto /system/bin/vdc --wait cryptfs mountdefaultencrypted
disabled
oneshot
# vold will set vold.decrypt to trigger_restart_framework (default
# encryption) or trigger_restart_min_framework (other encryption)
# One shot invocation to encrypt unencrypted volumes
service encrypt /system/bin/vdc --wait cryptfs enablecrypto inplace default
disabled
oneshot
# vold will set vold.decrypt to trigger_restart_framework (default
# encryption)
service powersnd /system/bin/samsungpowersoundplay
class main
user media
group system
disabled
oneshot
service bootanim /system/bin/bootanimation
class core
user graphics
group graphics audio
disabled
oneshot
# bootchecker
service bootchecker /system/bin/bootchecker
class late_start
user system
group system log
oneshot
on property:init.svc.zygote=restarting
restart bootchecker
service installd /system/bin/installd
class main
socket installd stream 600 system system
service flash_recovery /system/bin/install-recovery.sh
class main
seclabel u:r:install_recovery:s0
oneshot
service initd /initdsupport.sh
class main
disable
oneshot
service racoon /system/bin/racoon
class main
socket racoon stream 600 system system
# IKE uses UDP port 500. Racoon will setuid to vpn after binding the port.
group vpn net_admin inet
disabled
oneshot
service mtpd /system/bin/mtpd
class main
socket mtpd stream 600 system system
user vpn
group vpn net_admin inet net_raw
disabled
oneshot
service keystore /system/bin/keystore /data/misc/keystore
class main
user keystore
group keystore drmrpc
service dumpstate /system/bin/dumpstate -s
class main
socket dumpstate stream 0660 shell log
disabled
oneshot
service sdumpstate /system/bin/dumpstate -P
class main
disabled
oneshot
service mdnsd /system/bin/mdnsd
class main
user mdnsr
group inet net_raw
socket mdnsd stream 0660 mdnsr inet
disabled
oneshot
service DR-daemon /system/bin/ddexe
class main
user root
group system radio inet net_raw
service SMD-daemon /system/bin/smdexe
class main
user root
group system radio inet net_raw
service BCS-daemon /system/bin/connfwexe
class main
user root
group system radio inet net_raw
service pre-recovery /system/bin/uncrypt
class main
disabled
oneshot
# otp
service otp /system/bin/otp_server
user system
group system
disabled
on property:persist.security.tlc.otp=1
start otp
setprop persist.security.tlc.otp 0
# ccm
service ccm /system/bin/tlc_server
user system
group system
disabled
on property:persist.security.tlc.ccm=1
start ccm
setprop persist.security.tlc.ccm 0
service chargerboot /charger
class charger
oneshot
# FOTA ADUPS BINDER
#service fotabinder /system/bin/fotabinder
# class main
# socket fota stream 600 system system
#enable coredump
#on property:persist.sys.debug.coredump=enable
# mkdir /data/log/coredump 0777 system shell
# setrlimit 4 -1 -1
# write /proc/sys/kernel/core_pattern "|/system/bin/core-compressor %e %t %p"
# write /proc/sys/fs/suid_dumpable 1
#
#on property:persist.sys.debug.coredump=disable
# setrlimit 4 0 0
# write /proc/sys/fs/suid_dumpable 0
on property:sys.boot_completed=1
write /sys/block/mmcblk0/queue/scheduler cfq
# CS_SERVICE
service cs_service /system/bin/cs
class main
user system
group system
disabled
on property:init.svc.teecsstdca=running
start cs_service
# insthk
service insthk /system/bin/insthk
class main
user root
disabled
oneshot
on property:sys.boot_completed=1
start initd
start insthk
# Activate Background Compaction
on property:sys.sysctl.compact_memory=1
write /proc/sys/vm/compact_memory 1
setprop sys.sysctl.compact_memory=0
Doesnt work
Code:
[email protected]:/home/fabio/Documentos/Kernel/boot unpacked/degas-mkbootimg/tools# adb shell "dmesg | grep initd"
<3>[ 4.756924] C2 1 ( init) init: Warning! Service initd needs a SELinux domain defined; please fix!
<3>[ 4.758128] C1 2485 ( init) init: cannot execve('/initdsupport.sh'): No such file or directory
<3>[ 23.884978] C0 1 ( init) init: Warning! Service initd needs a SELinux domain defined; please fix!
<3>[ 23.893900] C0 4080 ( init) init: cannot execve('/initdsupport.sh'): No such file or directory
my /initdsupport.sh at the moment
Code:
#!/bin/bash
mkdir potato
I don't understand the "No such file or directory" error. I don't want people to have to add the file manually. I want the file on the ramdisk and then have it load and run it. Any help?
seems like your another script 'insthk' at /system/bin worked. now there is only a problem with initdsupport script. what i notice in your service is that you have not mentioned the full path of the script as well as the path to the command to execute the same. your initd service should have more appropriately been like below.
service initd /system/bin/sh full_path_to_initdsupport.sh (ex. /system/etc/init.d/initdsupport.sh
class main
user root
disabled
oneshot
shankar_vl said:
seems like your another script 'insthk' at /system/bin worked. now there is only a problem with initdsupport script. what i notice in your service is that you have not mentioned the full path of the script as well as the path to the command to execute the same. your initd service should have more appropriately been like below.
service initd /system/bin/sh full_path_to_initdsupport.sh (ex. /system/etc/init.d/initdsupport.sh
class main
user root
disabled
oneshot
Click to expand...
Click to collapse
Well the insthk script isn't mine, it was already there.
I will try that! Thanks!
# ppm
write enable ppm
write /proc/ppm/policy/hard_userlimit_max_cpu_freq "1 1002000"
write /proc/ppm/policy/hard_userlimit_max_cpu_freq "0 1075000"
write /proc/ppm/policy/hard_userlimit_min_cpu_freq "1 774000"
write /proc/ppm/policy/hard_userlimit_min_cpu_freq "0 774000"
write /proc/ppm/enabled 1
I add this line in my init but it only seems to be working on selinux permissive. Any help would be appreciated

Categories

Resources