Related
I have some questions about some settings within the kernel of the HD2 device. Because the fact that I'm a Windows user I hope someone can explain this to me.
Let's take a look into the initrd.gz and take a look at the init.rc:
Code:
chmod 666 /dev/uinput
chmod 666 /etc/bluez/audio.conf
chmod 666 /etc/bluez/hcid.conf
chmod 666 /etc/bluez/input.conf
EVERY (!) Device is working with this settings. Wether within the ROM nor somewhere else is a link to this files. Here is also a file named "hcid.conf" which was the old name because now its named main.conf. The hcid.conf is responsible for i.e. the bluetooth pin.
2. Go ahead within the init.rc file and you will see this:
Code:
service hciattach /system/bin/brcm_patchram_plus --enable_hci --enable_lpm \
--baudrate 3000000 --patchram /etc/firmware/bcm4329.hcd /dev/ttyHS0
user bluetooth
group bluetooth net_bt_admin
disabled
If you take again a look at /etc/firmware you will NOT see any bcm4329.hcd. This file never exists. Also the "brcm_patchram_plus" is not within the /bin direcotry. I only have found the source code for this.
Within a ripped ROM file I found this information within the init.rc:
Code:
# Make sure we startup btld before hcid
# Set target address to emulator host loopback IF
# Limit baudrate to 460800 to ensure reliable uart operation
service btld /system/bin/logwrapper /system/bin/btld -hwtun 10.0.2.2 -hb 460800 3000000 -lpm 1
#service btld /system/bin/logwrapper /system/bin/btld -lpm 1 -hb 3000000
user root
group bluetooth net_bt_admin
disabled
oneshot
Question:
Could all this be a problem which is related to the "non displaying MAC Address" of the bluetooth within the HD2?
Thanks!
Walked in B&N today to upgrade to a NST to root knowing that I wouldn't be tempted by the Glowlight versions out May 7th but the B&N Nook guy said, "hey we already have them and a couple of people cancelled their pre-orders, do you want one?"
I couldn't resist and brought it home.
so far I have found no one trying to root a NST-GL yet so here are my observations (but not a review) about the new 1.1.5 firmware on it and the Glowlight hardware after a couple of hours.
the basic menu now has a Glowlight item on the basic "n" press menu which brings up the brightness slider. there is also a little lightbulb always there in the top taskbar next to the wifi icon which shows on/off. I am hoping these are only additional programs and updated menu that wouldn't be affected by root.
press and hold for 2 seconds and toggle the light on/off as reviews have said. it really seems like a hardware function as it works even with the screen locked (but not asleep). I am not ready to try Nooter on it because of this special "n" function and wonder if it would work with the current version of NookColor Tools to get to the adw launcher.
also, just letting everybody know these are in stores already if someone wants to be first to root.
Just attempted to touchnooter the NST Glow. No luck. Here is what happened...
Downloaded Touchnooter-2-1-31
Used WinImage to create the microSD boot "disc"
Powered off Nook and inserted microSD card
Powered Nook on, showed Touchnooter instructions on boot (black flash, remove, reboot, etc.)
Removed microSD and rebooted
Came up to normal "Nook - Read Forever" initial boot screen
Displayed "Nook" boot screen (the one with 5 dots)
Counted through the dots a few times, sorry I didn't get the exact count
Glow light comes on and stays on
Screen will flash black and it will count 3 dots, then flash again and repeat
I let the unit stay on this "stuck loop" for several minutes (at least 10) and nothing changed.
I ended up doing the 8 failed boots restore and the unit is functional again, and "unrooted", so I didn't brick it. But it looks like there is a little work that needs to be done to root the NST Glow.
Thanks for the update David... I'm anxiously awaiting a new nooter
All those "Super Nooters" bash jars.
Jars are version dependent.
The Nook Glow is using 1.1.5 not 1.1.2
Try plain Noogie.
Noogie will most likely work just fine, I don't actually have a nook with Glow Light so I can't do any development toward rooting it, I can't imagine a lot has changed, so you can probably replace the correct jar files mentioned above with modified ones and it'd work. I'll see if I can get my hands on one of the new devices in the next few weeks.
thanks for charging forward on this...
I'm curious about this as well. I have a rooted Nook Color that, since getting a TouchPad, I only use as an eReader for stuff from B&N and Amazon. I'm considering selling it and getting a Simple Touch Glowlight for my eReader duties but would like to be able to use Kindle Reader on it as well as the Nook app. I'll be watching this thread to see if/when folks get it rooted.
NSTG 1.1.5
I also am interested in rooting the Glowlight, my wife got one for her birthday and wants to load a couple of apps on it. I'm tempted to try Noogie, but I can't risk bricking her device. Is there a reliable path for restoring a NST if rooting via Noogie fails?
Praeluceo said:
... but I can't risk bricking her device. Is there a reliable path for restoring a NST if rooting via Noogie fails?
Click to expand...
Click to collapse
If you apply Noogie and made a backup of your Nook - then you have a copy and you didn't touch or modify anything on your nook. Once having a backup, you should be fine. Read the thread related to this (backup) and WATCH out for the size of your backup image !!!
I think, that I would go or the MinimalTouch rooting method (once I place my hands on this new one )
B&N v1.1.5 uRamdisk
Renate NST said:
The Nook Glow is using 1.1.5 not 1.1.2
Try plain Noogie.
Click to expand...
Click to collapse
When I used Noogie to root my Nook Touches, the accompanying thread (which I will find in a few moments) said to just replace the default boot uRamdisk with one of two possibilities: one for USB ADB access, and one for WiFi access. That worked fine on my Nook Touches !!
Using the same uRamdisk for my Nook Glow disabled the GlowLight, but allowed the extraction of "factory.zip":
http://www.mailpen.com/download/bnFirmware/touch/factory-v1.1.5.zip (108MB)
Hopefully it can be "patched" to provide uRamdisks for USB and WiFi access (I prefer the latter).
DeanGibson said:
When I used Noogie to root my Nook Touches, the accompanying thread (which I will find in a few moments) said to just replace the default boot uRamdisk with one of two possibilities: one for USB ADB access, and one for WiFi access. That worked fine on my Nook Touches !!
However, I'm a bit reluctant to use the same uRamdisk for my Nook Glow, especially since as you note, it is a different B&N release (despite the sizes being almost identical). So, for those that know what was done, but don't have a Nook Glow, the link below provides the one I extracted from my Nook Glow (via Noogie).
http://www.mailpen.com/download/uRamdisk-1_1_5.zip
Hopefully it can be "patched" to provide uRamdisks for USB and WiFi access (I prefer the latter).
Click to expand...
Click to collapse
A copy of the factory.zip would be even more helpful.
GabrialDestruir said:
A copy of the factory.zip would be even more helpful.
Click to expand...
Click to collapse
I agree !!! The "Noogie" that I booted only gave me USB file access to the BOOT partition, and I can get you other stuff in that partition, if that helps.
Is there a bootable SD card image that would give me ADB root command-line access, so that I could mount arbitrary partitions on the device and extract factory.zip and anything else you and/or I desired?
Edit: See my response in the related thread. Now that I know that it is safe to use the modified 1.1.0 uRamdisk to at least get root access, I can extract factory.zip and post a link to it, probably (assuming nothing goes wrong, goes wrong, goes wrong, ...) in about an hour.
Here we go, uRamdisk for NTG is attached.
Should enable ADB permanently without affecting anything else.
A good swap !!!
GabrialDestruir said:
Here we go, uRamdisk for NTG is attached.
Should enable ADB permanently without affecting anything else.
Click to expand...
Click to collapse
Just what I wanted !!!
And here we go w/ factory.zip (renamed for download):
http://www.mailpen.com/download/bnFirmware/touch/factory-v1.1.5.zip (108MB)
DeanGibson said:
Just what I wanted !!!
And here we go w/ factory.zip (renamed for download):
http://www.mailpen.com/download/factory-1_1_5.zip
Click to expand...
Click to collapse
This will help people who modify .jar files for TouchNooter and MinimalNooter meaning once they get this downloaded they should be able to modify all the right files and the NTG will get fully rooted.
I spoke too soon ...
GabrialDestruir, your uRamdisk in uRamdisk.zip:
When copied to the boot partition, booted fine, and the GlowLight works.
However, I do not have root ADB access (like I did with the uRamdisk for the Touch 1.1.0 on both the Touch and the Glow).
DeanGibson said:
GabrialDestruir, your uRamdisk in uRamdisk.zip:
When copied to the boot partition, booted fine, and the GlowLight works.
However, I do not have ADB access (like I did with the uRamdisk for the Touch 1.1.0 on both the Touch and the Glow).
Did you enable ADB over USB or over WiFi? I tried to connect using both connection methods. If you provided a WiFi version, I can ping it, but "adb connect ..." doesn't connect. Note that the uRamdisk (for WiFI) for the original Touch allows connections just fine (but alas, no GlowLight).
Click to expand...
Click to collapse
It should be USB enabled from the changes I made.
New version with default.prop modified uploaded below.
Also posted the changed files.
Modified init.rc in this version:
Code:
on init
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 /sdcard
export INTERNAL_STORAGE /media
export BN_PURCHASED_CONTENT /data/media
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar
export DSP_PATH /system/lib/dsp
export DEFAULT_BASEIMAGE /system/lib/dsp/baseimage.dof
export QOSDYN_FILE /system/lib/dsp/qosdyn_3430.dll64P
export PM_TBLFILE /system/etc/policytable.tbl
# setup TSLIB environment
export TSLIB_CONSOLEDEVICE none
export TSLIB_FBDEVICE /dev/graphics/fb0
export TSLIB_TSDEVICE /dev/input/event2
export TSLIB_CALIBFILE /etc/pointercal
export TSLIB_CONFFILE /etc/ts.conf
export TSLIB_PLUGINDIR /system/lib/ts/plugins
# Location of BT firmware files
export BT_FW_PATH /system/lib/firmware
# Backward compatibility
symlink /system/etc /etc
# create mountpoints and mount tmpfs on sqlite_stmt_journals
mkdir /system
mkdir /tmp 0777
mkdir /data 0771 system system
mkdir /cache 0770 system cache
mkdir /media 0777 system system
mkdir /sdcard 0777 system system
mkdir /sqlite_stmt_journals 01777 root root
mkdir /rom 0770 root root
mount tmpfs tmpfs /sqlite_stmt_journals size=4m
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
# mount MMC partitions
mount vfat /dev/block/mmcblk0p2 /rom sync noatime nodiratime uid=1000,gid=1000,fmask=117,dmask=007
# Mount /system rw first to give the filesystem a chance to save a checkpoint
mount ext2 /dev/block/mmcblk0p5 /system
mount ext2 /dev/block/mmcblk0p5 /system ro remount
# We chown/chmod /data again so because mount is run as root + defaults
mount ext3 /dev/block/mmcblk0p8 /data nosuid nodev noatime nodiratime
chown system system /data
chmod 0771 /data
# Same reason as /data above
mount ext3 /dev/block/mmcblk0p7 /cache nosuid nodev noatime nodiratime
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
# create basic filesystem structure
mkdir /data/misc 01771 system misc
mkdir /data/misc/hcid 0770 bluetooth bluetooth
mkdir /data/misc/keystore 0700 keystore keystore
mkdir /data/misc/wifi 0771 wifi wifi
mkdir /data/misc/wifi/sockets 0771 wifi wifi
mkdir /data/misc/dhcp 0777 wifi wifi
mkdir /data/misc/udhcpd 0777 wifi wifi
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
# BN PurchasedContent
mkdir /data/media 0777 media system
mkdir /data/media/B\&N\ Downloads 0777 media system
mkdir /data/media/B\&N\ Downloads/Books 0777 media system
mkdir /data/media/B\&N\ Downloads/Magazines 0777 media system
mkdir /data/media/B\&N\ Downloads/Newspapers 0777 media system
mkdir /data/media/B\&N\ Downloads/Extras 0777 media system
# make sure folder has correct owner and access if the folder exists
chown media system /data/media
chown media system /data/media/B\&N\ Downloads
chown media system /data/media/B\&N\ Downloads/Books
chown media system /data/media/B\&N\ Downloads/Magazines
chown media system /data/media/B\&N\ Downloads/Newspapers
chown media system /data/media/B\&N\ Downloads/Extras
chmod 0777 /data/media
chmod 0777 /data/media/B\&N\ Downloads
chmod 0777 /data/media/B\&N\ Downloads/Books
chmod 0777 /data/media/B\&N\ Downloads/Magazines
chmod 0777 /data/media/B\&N\ Downloads/Newspapers
chmod 0777 /data/media/B\&N\ Downloads/Extras
# 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
# change permissions for alsa nodes
symlink /dev/snd/pcmC0D0c /dev/pcmC0D0c
symlink /dev/snd/pcmC0D0p /dev/pcmC0D0p
symlink /dev/snd/controlC0 /dev/controlC0
symlink /dev/snd/timer /dev/timer
chmod 0777 /dev/pcmC0D0c
chmod 0777 /dev/pcmC0D0p
chmod 0777 /dev/controlC0
chmod 0777 /dev/timer
# change permissions for modem
chmod 0660 /dev/ttyS0
chown radio radio /dev/ttyS0
# change permissions for bridge. Symlink search directory
chmod 0777 /dev/DspBridge
# change permissions for Camera
chmod 0777 /dev/video5
chmod 0777 /dev/video0
# change permissions for Overlay
chmod 0777 /dev/video1
chmod 0777 /dev/video2
# change permissions for overlay managers and display devices
chmod 0777 /sys/devices/platform/omapdss/manager0/name
chmod 0777 /sys/devices/platform/omapdss/manager1/name
chmod 0777 /sys/devices/platform/omapdss/display0/name
chmod 0777 /sys/devices/platform/omapdss/display1/name
chmod 0777 /sys/devices/platform/omapdss/display0/enabled
chmod 0777 /sys/devices/platform/omapdss/display1/enabled
chmod 0777 /sys/devices/platform/omapdss/display1/timings
chmod 0777 /sys/devices/platform/omapdss/display0/timings
chmod 0777 /sys/devices/platform/omapdss/overlay0/manager
chmod 0777 /sys/devices/platform/omapdss/overlay1/manager
chmod 0777 /sys/devices/platform/omapdss/overlay2/manager
chmod 0777 /sys/devices/platform/omapdss/overlay0/enabled
chmod 0777 /sys/devices/platform/omapdss/overlay1/enabled
chmod 0777 /sys/devices/platform/omapdss/overlay2/enabled
# change permissions for calibration
chmod 0666 /sys/devices/platform/i2c_omap.2/i2c-adapter/i2c-2/2-0050/forcecal
# change permissions for display jni ioct
chmod 0666 /dev/graphics/fb0
# change permissions for Previewer and Resizer
chmod 0777 /dev/omap-previewer
chmod 0777 /dev/omap-resizer
# double check the perms, in case lost+found already exists, and set owner
chown root root /lost+found
chmod 0770 /lost+found
# chown root root /data/lost+found
# chmod 0770 /data/lost+found
# chown root root /cache/lost+found
# chmod 0770 /cache/lost+found
#Owners, Modes for Bluetooth
chmod 0660 /dev/ttyS1
chown bluetooth bluetooth /dev/ttyS1
chmod 0660 sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
write sys/class/rfkill/rfkill0/state 0
# Needed when building with DDK
chown system system /data/data
chown system system /data/system
chown system system /data/app
chown system system /data
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 service.adb.tcp.port 5555
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
# Enable auto-mounting of USB mass storage
setprop persist.service.mount.umsauto 1
# 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
# Copying hostapd.conf (WLAN soft AP)
copy /system/etc/wifi/softap/hostapd.conf /data/misc/wifi/hostapd.conf
chown wifi wifi /data/misc/wifi
# Enabling Power Management features
# Enabling sleep in idle path
write /sys/power/sleep_while_idle 1
# Enabling OFF mode
write /sys/power/enable_off_mode 1
# Enabling Voltage OFF in idle path
write /sys/power/voltage_off_while_idle 1
# Enablig DVFS with conservative governor
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor conservative
# Enabling SmartReflex for Zoom3 OMAP3630
write /sys/power/sr_vdd1_autocomp 0
write /sys/power/sr_vdd2_autocomp 0
# Permissions for System Server and daemons.
chmod 0444 /system/usr/keychars/omap_twl4030keypad.kcm.bin
chmod 0444 /system/usr/keychars/TWL4030_Keypad.kcm.bin
chmod 0444 /system/usr/keychars/gpio-keys.kcm.bin
chmod 0444 /system/usr/keychars/qwerty.kcm.bin
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/lcd-backlight/dim_brightness
chown system system /sys/class/leds/lcd-backlight2/dim_brightness
chown system system /sys/devices/platform/i2c_omap.2/i2c-adapter/i2c-2/2-0040/dim_start
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
# Set default dim speed to 500ms
write /sys/devices/platform/i2c_omap.2/i2c-adapter/i2c-2/2-0040/dim_time 500
# 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
# Define modem related settings
setprop ro.radio.use-ppp yes
setprop keyguard.no_require_sim 1
setprop ro.config.nocheckin yes
# Set EPD Flushing Update percentage for AUTO Mode.
write /sys/class/graphics/fb0/epd_percent 85
# Set EPD Flush elimination window (ms) for AUTO Mode.
write /sys/class/graphics/fb0/epd_delay 100
class_start default
start omap-edpd
# start console
## Daemon processes to be run by init.
##
service console /system/bin/sh
console
# load DSP firmware
service baseimage /system/bin/cexec.out /system/lib/dsp/baseimage.dof
user root
group audio
oneshot
# Responsable of DSP recovery
service bridged /system/bin/bridged
user root
group system
oneshot
service omx_pm /system/bin/OMXPolicyManager
oneshot
service omx_rm /system/bin/OMXResourceManager
oneshot
# adbd is permanent
service adbd /sbin/adbd
service bootanim /system/bin/bootanimation
user graphics
group graphics
disabled
oneshot
#service mux /system/bin/gsm0710muxd -s /dev/ttyS1 -n 3 -m basic
#service mux /system/bin/gsm0710muxd -v -s /dev/ttyS0 -b 460800 -n 3 -m advanced
# user radio
# group radio cache inet misc
# oneshot
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
#service mountd /system/bin/mountd
# socket mountd stream 0660 root mount
service debuggerd /system/bin/debuggerd
# Start of SGX driver
service pvrsrv /system/bin/sh /system/bin/sgx/rc.pvr start
user root
oneshot
#service ril-daemon /system/bin/rild -l /system/lib/libidcc6071-ril.so -- -d /dev/pts/0
#service ril-daemon /system/bin/rild -l /system/lib/libenforaedg308-ril.so -- -d /dev/pts/0
# socket rild stream 660 root radio
# socket rild-debug stream 660 radio system
# user root
# group radio cache inet misc
#service pppd_gprs /etc/init.gprs-pppd /dev/pts/1
# user root
# group radio cache inet misc
# disabled
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
service media /system/bin/mediaserver
user media
group system audio camera graphics inet net_bt net_bt_admin
#service fw3a /system/bin/fw3a_core
# user root
# group root
#service bootsound /system/bin/playmp3
# user media
# group audio
# oneshot
service dbus /system/bin/dbus-daemon --system --nofork
socket dbus stream 660 bluetooth bluetooth
user bluetooth
group bluetooth net_bt_admin
#service bluetoothd /system/bin/bluetoothd -d -n
# 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
# oneshot
#service uim /system/xbin/uim /dev/ttyS1 3000000 1 /sys/uim/pid 19
# user root
# group media bluetooth
# oneshot
#service hciattach /system/bin/hciattach -l
# user root
## changing user to root from bluetooth is a potential security issue
## service hciattach_legacy is used instead of hciattach because, we dont
## have nodes named ttyHS0
# group bluetooth net_bt_admin misc
# disabled
# oneshot
#service hciattach_legacy /system/bin/hciattach -n /dev/ttyS1 texas 3000000
# user root
## changing user to root from bluetooth is a potential security issue
# group bluetooth net_bt_admin misc
# disabled
# oneshot
#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
service installd /system/bin/installd
socket installd stream 600 system system
service flash_recovery /system/bin/flash_image recovery /system/recovery.img
oneshot
service wlan_loader /system/bin/tiwlan_loader \
-f /system/etc/wifi/firmware.bin \
-i /system/etc/wifi/tiwlan.ini \
-e /rom/devconf/WiFiBackupCalibration
disabled
oneshot
service ifcfg_ti /system/bin/ifconfig tiwlan0 up
disabled
oneshot
service wpa_supplicant /system/bin/wpa_supplicant -Dtiwlan0 -itiwlan0 -c/data/misc/wifi/wpa_supplicant.conf -dd
socket wpa_tiwlan0 dgram 660 wifi wifi
disabled
oneshot
service dhcpcd /system/bin/dhcpcd -ABKL -d tiwlan0
disabled
oneshot
# TI WLAN Soft AP related services and configuration
service wlan_ap_loader /system/bin/tiap_loader \
-f /system/etc/wifi/softap/firmware_ap.bin \
-i /system/etc/wifi/softap/tiwlan_ap.ini
disabled
oneshot
service udhcpd /system/bin/udhcpd /system/etc/udhcpd/udhcpdWlan.conf
disabled
oneshot
service hostapd /system/bin/hostapd -dd /data/misc/wifi/hostapd.conf
disabled
oneshot
service keystore /system/bin/keystore /data/misc/keystore
user keystore
group keystore
socket keystore stream 666
# TODO: load waveform file from ROM token /rom/devconf/EpdWaveform instead
service omap-edpd /system/bin/omap-edpd.elf -n --timeout=2 -pV220 --fbdev=/dev/graphics/fb0 -s /system/lib/dsp/subframeip_snode_dsp.dll64P -w /rom/devconf/EpdWaveform,/system/etc/default_waveform.bin
oneshot
disabled
on property:dev.bootcomplete=1
start bootcnt
service bootcnt /system/bin/clrbootcount.sh
disabled
oneshot
service debuglog /system/bin/debuglog.sh
user root
Modified default.prop in this version:
Code:
#
# ADDITIONAL_DEFAULT_PROPERTIES
#
ro.secure=0
ro.allow.mock.location=0
ro.debuggable=0
persist.service.adb.enable=1
Works with root access now
GabrialDestruir said:
It should be USB enabled from the changes I made.
New version with default.prop modified uploaded below.
Click to expand...
Click to collapse
GlowLight works, but still unable to access via USB as does root ADB access. However, I really need a WiFi version.
Edit: I forgot the "Delete the standard 'USB Composite Device', then update the driver for the displayed 'Nook Simple Touch' to be 'Android Composite ADB Interface." Now works as per above edit.
Many, many thanks to Gabrial for his hard and continuing work!
I copied in his second uRamdisk and am now rooted w/ADB support over wifi.
Copy in adb wireless to your /data/apps folder, and a launcher (both while booted from noogie, with a linux host mounting up the filesystems.) Set up /system properly for su, again just copying in from your stock ST. Enable ADB over wireless using that tool - persistent would be cool, but being able to turn it on at all is great.
I have an alternate launcher, adb over wifi, su installed.
Repartiitioning is done, symlinks are done. I didn't get the partitions exactly how I wanted them, but I have 880
mb of internal storage for myself, the unit is registered and is downloading to /media so I can fish the files I want
back out.
Win, except that the illumination is pretty uneven on my unit.
Does that improve over time?
I haven't tried getting the G market running, but I did just set up the Amazon market and it is running with no trouble at all.
I see with interest that the glowworm has a browser built into it still, exposed once you install a launcher and Button Savior.
Thanks roustabout. I might give that a try tonight.
I tried using the adb usb uRamdisk, but can never seem to get it working on my Linux box.
I am sure as others update their rooting packages a permanent adb wifi uRamdisk will emerge. It only a matter of time.
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:
Hello, everyone!
I used NST (BNRV300) for a few years and everything was fine. But then I got battery problems - it started switching off randomly when charge goes down for more than 50%. I ordered a new battery in hope to replace it. Unfortunately, it was a fake battery, and even worse, it had a fitting connector with + and - pins switched. When I connected it, it burned my charge controller.
Now, the reader loads and works as usually, but discharges waaaay too fast - in a hour or two. Even when it's not working. Even when switched off. And it discharges the battery completely - to less than 1 volt. Of course it also doesn't charge it at all. Replacement of the controller is a huge pain - I cannot solder/unsolder it, because I don't own a hot air soldering gun and I cannot find exactly the same part for replacement. Repair guys ask about $30 for replacing the controller, and I think it's just too much for an old gadget.
I thought about buying a whole motherboard, and "powerbookmedic" place even has it for cheap, but they don't deliver in my country (Russia).
I thought about using an external charge controller, like those cheap TP4056-based boards from aliexpress. It would allow me to charge the battery and prevent it from full discharge, but what to do with the fast discharging? Maybe there is some way to exclude the onboard controller from work at all and use external one?
The problem with the quick discharge could either be that the battery is junk or that the blown charge controller is leaking a lot.
With the NST in suspend mode the leakage current should be around 1 mA.
Sure, you could throw on a separate LiPo charger.
Renate NST said:
The problem with the quick discharge could either be that the battery is junk or that the blown charge controller is leaking a lot.
With the NST in suspend mode the leakage current should be around 1 mA.
Sure, you could throw on a separate LiPo charger.
Click to expand...
Click to collapse
Thank you very much! I measured current in suspended and power off modes, and both gave me whopping 0.1 A! I identified the controller - it's TI BQ24072.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
So, I decided to mutilate the mainboard for a bit and get rid of the faulty controller. That's what I got:
But it didn't work. Current remained to be 100 mA. Then I touched components of the PCB and found out, that the nearest IC gets really hot even when the reader switched off. I identified it as TI bq27520-G1 fuel gauge. Unfortunately, it's not just some dumb IC that I can get rid off, but a micro controller that monitors battery health and communicates with the CPU by i2c protocol... Even worse, it has LDO functions, but I'm not sure it's actually used. But, I think maybe the system actually able to run without it? Anyway, this controller sniffs when the battery is connected and signals outside (by putting one of its pins to active low level) if the battery can be used. The pin itself is unaccessible, because it's under the component. But I bet one of these testing pads on PCB connected to it. Don't you know, for any chance, which one could it be?
The NST takes about a peak of 300 mA on boot up.
See: http://forum.xda-developers.com/showthread.php?p=46801874#post46801874
(Read further and there is a reference to the battery connector.)
Battery health gets checked in two places (if I remember correctly).
uboot checks it and refuses to proceed if there is no battery at all.
The charger daemon will power down the NST if the battery is unhealthy.
You can try disabling the charger daemon by commenting out the line in init.rc or else deleting the file.
I'm not sure if you can get things to work like that.
Obviously, you can not do this to the internal flash on a device that won't boot.
You can either write a bootable SD (we still have that luxury on the NST)
or else use OmapLink to feed a boot image over USB.
When doing low-level stuff like this, there are two ways of getting feedback.
You can watch the current consumption with it's characteristic startup signature.
You can use the UART console to watch the boot up messages.
The standard UART out on the NST is at 1.8V levels, so you may need to hack a buffer.
(There is also a 3.3V UART, but you'd have to configure it and the buffer is not even enabled until much later.)
I'll try disabling the charger daemon on my NST later and see if it still works.
Well, the device boots and works, and I guess I can disable the deamon, as you said, but I don't think it will resolve anything for now.
If it was possible to switch off battery check for uboot, that would be promising. But I have no idea how to do anything about it.
I still think, that if I could put low level on BAT_GOOD pin of fuel gauge IC, that maybe would make the uboot to allow system to start normally.
Not sure what use I can make from UART feed, but may be cool to take a look on it. I found that thread about making 3.3 UART working during boot. Maybe it would work.
Since you're dealing with low-level problems and since the uboot and the kernel are separately configured and already configured for the 1.8V UART, I'd stick with that.
Okay, I didn't build the level shifter to use uart yet, but I found out that the Fuel Gauge needs to be powered only certain moments. If the device loaded, I can power it directly, excluding the gauge from circuit. So, I installed a switch to power it temporary and then it resolved current leakage problem. Unfortunately, after a long sleep it also uses the gauge, and I guess the charger daemon does it.
Here is my init.rc:
Code:
on init
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 /sdcard
export INTERNAL_STORAGE /media
export BN_PURCHASED_CONTENT /data/media
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar
export DSP_PATH /system/lib/dsp
export DEFAULT_BASEIMAGE /system/lib/dsp/baseimage.dof
export QOSDYN_FILE /system/lib/dsp/qosdyn_3430.dll64P
export PM_TBLFILE /system/etc/policytable.tbl
# setup TSLIB environment
export TSLIB_CONSOLEDEVICE none
export TSLIB_FBDEVICE /dev/graphics/fb0
export TSLIB_TSDEVICE /dev/input/event2
export TSLIB_CALIBFILE /etc/pointercal
export TSLIB_CONFFILE /etc/ts.conf
export TSLIB_PLUGINDIR /system/lib/ts/plugins
# Location of BT firmware files
export BT_FW_PATH /system/lib/firmware
# Backward compatibility
symlink /system/etc /etc
# create mountpoints and mount tmpfs on sqlite_stmt_journals
mkdir /system
mkdir /tmp 0777
mkdir /data 0771 system system
mkdir /cache 0770 system cache
mkdir /media 0777 system system
mkdir /sdcard 0777 system system
mkdir /sqlite_stmt_journals 01777 root root
mkdir /rom 0770 root root
mount tmpfs tmpfs /sqlite_stmt_journals size=4m
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
# mount MMC partitions
mount vfat /dev/block/mmcblk0p2 /rom sync noatime nodiratime uid=1000,gid=1000,fmask=117,dmask=007
# Mount /system rw first to give the filesystem a chance to save a checkpoint
mount ext2 /dev/block/mmcblk0p5 /system
mount ext2 /dev/block/mmcblk0p5 /system ro remount
# We chown/chmod /data again so because mount is run as root + defaults
mount ext3 /dev/block/mmcblk0p8 /data nosuid nodev noatime nodiratime
chown system system /data
chmod 0771 /data
# Same reason as /data above
mount ext3 /dev/block/mmcblk0p7 /cache nosuid nodev noatime nodiratime
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
# create basic filesystem structure
mkdir /data/misc 01771 system misc
mkdir /data/misc/hcid 0770 bluetooth bluetooth
mkdir /data/misc/keystore 0700 keystore keystore
mkdir /data/misc/wifi 0771 wifi wifi
mkdir /data/misc/wifi/sockets 0771 wifi wifi
mkdir /data/misc/dhcp 0777 wifi wifi
mkdir /data/misc/udhcpd 0777 wifi wifi
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
# BN PurchasedContent
mkdir /data/media 0777 media system
mkdir /data/media/B\&N\ Downloads 0777 media system
mkdir /data/media/B\&N\ Downloads/Books 0777 media system
mkdir /data/media/B\&N\ Downloads/Magazines 0777 media system
mkdir /data/media/B\&N\ Downloads/Newspapers 0777 media system
mkdir /data/media/B\&N\ Downloads/Extras 0777 media system
# make sure folder has correct owner and access if the folder exists
chown media system /data/media
chown media system /data/media/B\&N\ Downloads
chown media system /data/media/B\&N\ Downloads/Books
chown media system /data/media/B\&N\ Downloads/Magazines
chown media system /data/media/B\&N\ Downloads/Newspapers
chown media system /data/media/B\&N\ Downloads/Extras
chmod 0777 /data/media
chmod 0777 /data/media/B\&N\ Downloads
chmod 0777 /data/media/B\&N\ Downloads/Books
chmod 0777 /data/media/B\&N\ Downloads/Magazines
chmod 0777 /data/media/B\&N\ Downloads/Newspapers
chmod 0777 /data/media/B\&N\ Downloads/Extras
# 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
# change permissions for alsa nodes
symlink /dev/snd/pcmC0D0c /dev/pcmC0D0c
symlink /dev/snd/pcmC0D0p /dev/pcmC0D0p
symlink /dev/snd/controlC0 /dev/controlC0
symlink /dev/snd/timer /dev/timer
chmod 0777 /dev/pcmC0D0c
chmod 0777 /dev/pcmC0D0p
chmod 0777 /dev/controlC0
chmod 0777 /dev/timer
# change permissions for modem
chmod 0660 /dev/ttyS0
chown radio radio /dev/ttyS0
# change permissions for bridge. Symlink search directory
chmod 0777 /dev/DspBridge
# change permissions for Camera
chmod 0777 /dev/video5
chmod 0777 /dev/video0
# change permissions for Overlay
chmod 0777 /dev/video1
chmod 0777 /dev/video2
# change permissions for overlay managers and display devices
chmod 0777 /sys/devices/platform/omapdss/manager0/name
chmod 0777 /sys/devices/platform/omapdss/manager1/name
chmod 0777 /sys/devices/platform/omapdss/display0/name
chmod 0777 /sys/devices/platform/omapdss/display1/name
chmod 0777 /sys/devices/platform/omapdss/display0/enabled
chmod 0777 /sys/devices/platform/omapdss/display1/enabled
chmod 0777 /sys/devices/platform/omapdss/display1/timings
chmod 0777 /sys/devices/platform/omapdss/display0/timings
chmod 0777 /sys/devices/platform/omapdss/overlay0/manager
chmod 0777 /sys/devices/platform/omapdss/overlay1/manager
chmod 0777 /sys/devices/platform/omapdss/overlay2/manager
chmod 0777 /sys/devices/platform/omapdss/overlay0/enabled
chmod 0777 /sys/devices/platform/omapdss/overlay1/enabled
chmod 0777 /sys/devices/platform/omapdss/overlay2/enabled
# change permissions for calibration
chmod 0666 /sys/devices/platform/i2c_omap.2/i2c-adapter/i2c-2/2-0050/forcecal
# change permissions for display jni ioct
chmod 0666 /dev/graphics/fb0
# change permissions for Previewer and Resizer
chmod 0777 /dev/omap-previewer
chmod 0777 /dev/omap-resizer
# double check the perms, in case lost+found already exists, and set owner
chown root root /lost+found
chmod 0770 /lost+found
# chown root root /data/lost+found
# chmod 0770 /data/lost+found
# chown root root /cache/lost+found
# chmod 0770 /cache/lost+found
#Owners, Modes for Bluetooth
chmod 0660 /dev/ttyS1
chown bluetooth bluetooth /dev/ttyS1
chmod 0660 sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
write sys/class/rfkill/rfkill0/state 0
# Needed when building with DDK
chown system system /data/data
chown system system /data/system
chown system system /data/app
chown system system /data
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 service.adb.tcp.port 5555
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
# Enable auto-mounting of USB mass storage
setprop persist.service.mount.umsauto 1
# 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
# Copying hostapd.conf (WLAN soft AP)
copy /system/etc/wifi/softap/hostapd.conf /data/misc/wifi/hostapd.conf
chown wifi wifi /data/misc/wifi
# Enabling Power Management features
# Enabling sleep in idle path
write /sys/power/sleep_while_idle 1
# Enabling OFF mode
write /sys/power/enable_off_mode 1
# Enabling Voltage OFF in idle path
write /sys/power/voltage_off_while_idle 1
# Enablig DVFS with conservative governor
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor conservative
# Enabling SmartReflex for Zoom3 OMAP3630
write /sys/power/sr_vdd1_autocomp 0
write /sys/power/sr_vdd2_autocomp 0
# Permissions for System Server and daemons.
chmod 0444 /system/usr/keychars/omap_twl4030keypad.kcm.bin
chmod 0444 /system/usr/keychars/TWL4030_Keypad.kcm.bin
chmod 0444 /system/usr/keychars/gpio-keys.kcm.bin
chmod 0444 /system/usr/keychars/qwerty.kcm.bin
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/lcd-backlight/dim_brightness
chown system system /sys/class/leds/lcd-backlight2/dim_brightness
chown system system /sys/devices/platform/i2c_omap.2/i2c-adapter/i2c-2/2-0040/dim_start
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
# Set default dim speed to 500ms
write /sys/devices/platform/i2c_omap.2/i2c-adapter/i2c-2/2-0040/dim_time 500
# 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
# Define modem related settings
setprop ro.radio.use-ppp yes
setprop keyguard.no_require_sim 1
setprop ro.config.nocheckin yes
# Set EPD Flushing Update percentage for AUTO Mode.
write /sys/class/graphics/fb0/epd_percent 85
# Set EPD Flush elimination window (ms) for AUTO Mode.
write /sys/class/graphics/fb0/epd_delay 100
class_start default
start omap-edpd
# start console
## Daemon processes to be run by init.
##
service console /system/bin/sh
console
# load DSP firmware
service baseimage /system/bin/cexec.out /system/lib/dsp/baseimage.dof
user root
group audio
oneshot
# Responsable of DSP recovery
service bridged /system/bin/bridged
user root
group system
oneshot
service omx_pm /system/bin/OMXPolicyManager
oneshot
service omx_rm /system/bin/OMXResourceManager
oneshot
# adbd is permanent
service adbd /sbin/adbd
service bootanim /system/bin/bootanimation
user graphics
group graphics
disabled
oneshot
#service mux /system/bin/gsm0710muxd -s /dev/ttyS1 -n 3 -m basic
#service mux /system/bin/gsm0710muxd -v -s /dev/ttyS0 -b 460800 -n 3 -m advanced
# user radio
# group radio cache inet misc
# oneshot
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
#service mountd /system/bin/mountd
# socket mountd stream 0660 root mount
service debuggerd /system/bin/debuggerd
# Start of SGX driver
service pvrsrv /system/bin/sh /system/bin/sgx/rc.pvr start
user root
oneshot
#service ril-daemon /system/bin/rild -l /system/lib/libidcc6071-ril.so -- -d /dev/pts/0
#service ril-daemon /system/bin/rild -l /system/lib/libenforaedg308-ril.so -- -d /dev/pts/0
# socket rild stream 660 root radio
# socket rild-debug stream 660 radio system
# user root
# group radio cache inet misc
#service pppd_gprs /etc/init.gprs-pppd /dev/pts/1
# user root
# group radio cache inet misc
# disabled
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
service media /system/bin/mediaserver
user media
group system audio camera graphics inet net_bt net_bt_admin
#service fw3a /system/bin/fw3a_core
# user root
# group root
#service bootsound /system/bin/playmp3
# user media
# group audio
# oneshot
service dbus /system/bin/dbus-daemon --system --nofork
socket dbus stream 660 bluetooth bluetooth
user bluetooth
group bluetooth net_bt_admin
#service bluetoothd /system/bin/bluetoothd -d -n
# 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
# oneshot
#service uim /system/xbin/uim /dev/ttyS1 3000000 1 /sys/uim/pid 19
# user root
# group media bluetooth
# oneshot
#service hciattach /system/bin/hciattach -l
# user root
## changing user to root from bluetooth is a potential security issue
## service hciattach_legacy is used instead of hciattach because, we dont
## have nodes named ttyHS0
# group bluetooth net_bt_admin misc
# disabled
# oneshot
#service hciattach_legacy /system/bin/hciattach -n /dev/ttyS1 texas 3000000
# user root
## changing user to root from bluetooth is a potential security issue
# group bluetooth net_bt_admin misc
# disabled
# oneshot
#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
service installd /system/bin/installd
socket installd stream 600 system system
service flash_recovery /system/bin/flash_image recovery /system/recovery.img
oneshot
service wlan_loader /system/bin/tiwlan_loader \
-f /system/etc/wifi/firmware.bin \
-i /system/etc/wifi/tiwlan.ini \
-e /rom/devconf/WiFiBackupCalibration
disabled
oneshot
service ifcfg_ti /system/bin/ifconfig tiwlan0 up
disabled
oneshot
service wpa_supplicant /system/bin/wpa_supplicant -Dtiwlan0 -itiwlan0 -c/data/misc/wifi/wpa_supplicant.conf -dd
socket wpa_tiwlan0 dgram 660 wifi wifi
disabled
oneshot
service dhcpcd /system/bin/dhcpcd -ABKL -d tiwlan0
disabled
oneshot
# TI WLAN Soft AP related services and configuration
service wlan_ap_loader /system/bin/tiap_loader \
-f /system/etc/wifi/softap/firmware_ap.bin \
-i /system/etc/wifi/softap/tiwlan_ap.ini
disabled
oneshot
service udhcpd /system/bin/udhcpd /system/etc/udhcpd/udhcpdWlan.conf
disabled
oneshot
service hostapd /system/bin/hostapd -dd /data/misc/wifi/hostapd.conf
disabled
oneshot
service keystore /system/bin/keystore /data/misc/keystore
user keystore
group keystore
socket keystore stream 666
# TODO: load waveform file from ROM token /rom/devconf/EpdWaveform instead
service omap-edpd /system/bin/omap-edpd.elf -n --timeout=2 -pV220 --fbdev=/dev/graphics/fb0 -s /system/lib/dsp/subframeip_snode_dsp.dll64P -w /rom/devconf/EpdWaveform,/system/etc/default_waveform.bin
oneshot
disabled
on property:dev.bootcomplete=1
start bootcnt
service bootcnt /system/bin/clrbootcount.sh
disabled
oneshot
service debuglog /system/bin/debuglog.sh
user root
Can you please tell me where is the charger daemon? Because no service possibly looks like it to me.
Hmm, it's been a while, but I don't see anything there.
On later stuff it's either chargerd or healthd.
It may be built right into the kernel.
Hey guys I just picked up this device a few days ago, and I'm an experience kernel developer for anroid, although I haven't worked on a project in quite some time and I really didn't intend to pick up a project phone, but seeing where the development took off with heads high in the air, and kinda left everyone high and dry with all this DISCONTINUED status of dev work, it makes me just want to try something. I by no means have a PC right now that is anywhere near fast enough or has enough ram to do in depth android development, so I really don't 'want' to get into this. But looking at the issues with 7.x rom's and the R1 HD, it appears to me a simple problem that could be fixed once the original kernel sources were obtained.
I see a lot of fiasco about the 64bit / 32 bit support which isn't of importance to me since this device isn't trying to allocate more than 4GB of usable memory anyway. As far as performance with less than 2GB ram on this device the matter about the kernel / rom being 32/64 doesn't really mean much.
From what I do see it looks as though everything that is bootable using a non-stock rom still uses the stock kernel / boot.img right?
Does any developers here have any logcat output of a non-stock kernel they've tried to boot using a nougat 7.x rom?
Has anyone tried pulling the Kernel config for the device from /proc/config.gz? Or is the proc config not compiled in support for this kernel (OEM's for some reason don't like to include this option) which makes life on a dev that doesn't have original kernel sources available a little bit easier as we can look and see what we need =Y and =M to relatively quickly and then see what non-mainline kernel patches we need to include to get a non-stock working kernel built for 7.x
My thoughts of the matter are a cross-compiler toolchain incompatiblity in the userland of android 7.x vs the stock kernel, OR VERMAGIC of a proprietary kernel module not matching properly.
It seems the only things that appears to be a struggle with the development of this device have all been kernel related. I really wish a dev that had a proper arm toolchain could work with me a bit in some spare time to get things like the Camera working properly. Recompiling all of Android N isn't really necessary as this is most likely a kernel specific bug or ABI mismatch with the newer Nougat libs. Our 3.x kernel is quite obsolete when compared to the newer things implemented into Android 7, and most usually one would expect to have a lot more breakage than just the camera. So if we could get this camera working and any other hardware that might not be working, then it would be a big success. The kernel version has no meaning, and being 32bit/64bit has no meaning really either.
Some direct links to github sources or any other sources of what you guys have woking right now would be really helpful. Logcat output of whats working. Logcat output of custom kernels that fail to boot. Any direct links to a device tree overlay for our board would be real nice too. With all these pages of information on the device its hard for me to make heads or tails of where the actual development stands and what the major holdback is.
To be clear though the working Lineage rom that has everything working EXCEPT camera, is using the stock kernel boot.img but basically just a 32bit ported /system /lib /etc in a flashable .zip? I could decipher the .zip's update-script / binary to see what is really going on but I'd a lot rather speak to an experienced dev about all this, in hopes of a collaborative effort to patch the camera issue and any other issues that may not be so noticeable to the standard users. I seen some mention of the hotspot feature being broken in some of the threads I've looked through. Whats the status on the hotpsot? Thats one thing I do have to have working for it to be a daily driver and is of much more importance to me than the camera actually.
Sorry for a long post guys, I really hope to hear from someone who has done a bit more than pieced together some /system files from another device.
P.S. ignore my signature in this post pertaining to devices, I don't post on XDA very often unless I'm working on a project I've not updated my signature in a couple years
Most of this is TLDR;
I don't like to reply to myself, but for reference this .config file on lines 186 and 187 contains:
CONFIG_CUSTOM_KERNEL_IMGSENSOR="ov13850_mipi_raw hi842_mipi_raw imx258_mipi_raw_liteon imx258_mipi_raw_sunny s5k4h8_mipi_raw ov5670_mipi_raw_sunwin ov5670_mipi_raw_cmk"
CONFIG_CUSTOM_KERNEL_CAM_CAL_DRV="hi842_otp imx258_eeprom"
I'd suspect the camera not to work since the original source code is specifying binary blobs for the camera or it appears that way, and if those drivers aren't included precompiled with the 7.x ROMS in a common location such as /lib/modules then the camera can't work, if the kernel modules with the right vermagick from our working kernel is used then it will work. If we have working 64bit ROM all except the camera then we need these .ko's:
hi842_otp imx258_eeprom ov13850_mipi_raw hi842_mipi_raw imx258_mipi_raw_liteon imx258_mipi_raw_sunny s5k4h8_mipi_raw ov5670_mipi_raw_sunwin ov5670_mipi_raw_cmk
I need a little clarification on all this 32bit vs 64bit stuff I've been seeing on here. Developing for this phone will really be hard on me as I DO use it for a hotspot, and I don't have it in my hands to perform basic grep/cat commands to pull up some simple things I could just easily get from another developer (if we have one available). My only internet at home is through this phone, and I can't easily test things without losing internet connection.
Anyways - I have dug up some info on my own and from the looks of it we need the same arch (32bit / 64bit arm) ROM from another device of MT6735 that has working 7.x (from what i read we have just that in the 'discontinued lineage rom' right?)
If so, Then we need to keep our original Stock working kernel for now and add the missing blobs of the precompiled kernel modules /proprietary drivers, stick them in the familiar location for them to be insmod during init.
After that a device node should be populated for the camera that is attached to the board and there should be no more Unknown Device 'Camera0" <<example
But if our stock kernel and rom is only 32bit, and the ROM being ported is 64bit it will not work.. There is no need to mix 32/64 bit sources anyway. I'm almost certain that the kernel sources I took that config snippet from is the proper kernel source for the R1 HD, and that config file I linked to should be the actual configuration file used by BLU. Compiling it for 64 bit at compile time would simply solve all those issues. (Unless we only have a 32bit camera kernel module available and it depends on 32bit libraries to function for some reason in which are also dependencies of other things on the phone - in that case it would be a worse DepHell than redhat ever dreamed of having, if thats the case BLU took the easy way out and just recompiled the sucker entirely as 32bit to resolve the entire issue. That would be a sad development move from the company standpoint, but in reality it doesn't effect us much as there isn't any hardware this phone has that is limited by only using a 32bit OS)
Truly the cleanest way to do this would to build both the rom and kernel from source and forget about 'porting' any of it. So if someone can build that kernel using the config here: https://github.com/anpage/android_k.../blob/master/arch/arm/configs/p6601_defconfig the source is in the parent dirs. After the zImage and modules are created if you can create the boot.img and flash only the boot.img to the appropriate partition using custom recovery, if it boots and works then you will know we have the right source. That will mean everything else will be straightfrom there... I understand what I"m asking is a bit much for the average joe on here, but I really am not in a situation where I can easily do those things and lose my internet while using adb on the device. So really I need an experienced dev here that knows how to write a simple update-script to flash boot.img. I need someone that knows how to compile a kernel with arm-eabi toolchain plus compile the modules and then create a custom boot.img from those. If someone here can do those things and provide details we'll move from there.
Unfortunately I can't currently afford to buy a spare R1 HD to tinker with and figure all this out on my own, but I can tell you right now this device is capable of running much newer releases of android than what it officially supports, and it greatly saddens me that such a device's 3rd party development ends because of a kernel related issue. I just can't come to accept that!
Thank You
I don't understand everything that you are talking about, as I am fairly new to XDA and Android modding. I just wanted to say thank you for at least researching and trying to figure out the answer. The camera is our only major problem, and I do believe that everything can be fixed. Hopefully you can get someone who understands this stuff to help you achieve every Blu R1 HD owner's dream: a stable, fast, custom ROM.
@linuxsociety, thanks for giving us a new hope.
Unscedeo said:
I don't understand everything that you are talking about, as I am fairly new to XDA and Android modding. I just wanted to say thank you for at least researching and trying to figure out the answer. The camera is our only major problem, and I do believe that everything can be fixed. Hopefully you can get someone who understands this stuff to help you achieve every Blu R1 HD owner's dream: a stable, fast, custom ROM.
@linuxsociety, thanks for giving us a new hope.
Click to expand...
Click to collapse
In lamons terms it boils down to nobody has really tried to provide a custom compiled kernel based off the original BLU config, or they haven't documented their work on xda / github right. The links I provided are for the original kernel source. If the problem is an ABI mismatch it would only require the same toolchain to compile the kernel as used on the CM/Lineage rom working. I highly doubt thats the issue. I'm guessing that the BLOBs that are needed to load the camera firmware arent in place on the ported roms we need. The files will be exact or real close matches to the ones I mentioned in the previous post. Really looks like someone attempted to port the rom from a similar device, and all they got that didn't work was the camera. Thats some luck if thats the case, and is a relatively simple fix that shouldn't take over a couple hours or no more than a days worth of work.
Found CM13 project for p6601 / BLU R1 HD on github, and the init files needed for setting permissions on the device nodes of the camera: This info will be useful on the Nougat 7.x rom that works all except the camera: https://github.com/anpage/android_d...a68445d35fb172082/rootdir/etc/init.project.rc If someone can check out the 7.x rom and see if the device nodes/files exist that are referenced on lines 25 -48 of that init file I just pasted. a command such as
Code:
grep IMX258_CAM_CAL_DRV /etc/*init*
and/or
Code:
ls /dev/*IMX258*
and see if you get any output from either command. I need to really dig further into the actual kernel modules since the camera in the stock kernel is configured as a custom config option, I'd expect the drivers to be binary drivers that get loaded somewhere else during init. I really wish I could just get a full output of the full filesystem contents of the 7.x rom that has broken camera. Most importantly I need the contents of /lib /etc /system/etc /system/lib.
If the 7.x rom that everyone is using has been simply ported from a different mediatek device that has the same SoC and a similar boardconfig, then it would explain the whole deal about the camera not working as the camera is probably one of the only things that differs in these budget mediatek devices. Does GPS work good? Most usually you'll have another piece of embedded hardware that will fail to work too. I've seen mostly mentioning of the Camera, if thats the only piece of hardware that isn't working then we got real lucky there, but I'd like to confirm things like GPS, accelerometer, etc work properly too.
linuxsociety said:
Found CM13 project for p6601 / BLU R1 HD on github, and the init files needed for setting permissions on the device nodes of the camera: This info will be useful on the Nougat 7.x rom that works all except the camera: https://github.com/anpage/android_d...a68445d35fb172082/rootdir/etc/init.project.rc If someone can check out the 7.x rom and see if the device nodes/files exist that are referenced on lines 25 -48 of that init file I just pasted. a command such as
Code:
grep IMX258_CAM_CAL_DRV /etc/*init*
and/or
Code:
ls /dev/*IMX258*
and see if you get any output from either command. I need to really dig further into the actual kernel modules since the camera in the stock kernel is configured as a custom config option, I'd expect the drivers to be binary drivers that get loaded somewhere else during init. I really wish I could just get a full output of the full filesystem contents of the 7.x rom that has broken camera. Most importantly I need the contents of /lib /etc /system/etc /system/lib.
If the 7.x rom that everyone is using has been simply ported from a different mediatek device that has the same SoC and a similar boardconfig, then it would explain the whole deal about the camera not working as the camera is probably one of the only things that differs in these budget mediatek devices. Does GPS work good? Most usually you'll have another piece of embedded hardware that will fail to work too. I've seen mostly mentioning of the Camera, if thats the only piece of hardware that isn't working then we got real lucky there, but I'd like to confirm things like GPS, accelerometer, etc work properly too.
Click to expand...
Click to collapse
The same sources you are referring to have been tried and used. They appear to be incomplete. But I am not a build expert. So you decide.
There are two 7.0 roms in the thread. One is built and other is the built one with attempted changes (port style)
I believe @vampirefo 's build tree is a better start for you. That tree has a succsesfull build at least.
https://forum.xda-developers.com/r1-hd/development/lineage-os-r1hd-t3530751
mrmazak said:
The same sources you are referring to have been tried and used. They appear to be incomplete. But I am not a build expert. So you decide.
There are two 7.0 roms in the thread. One is built and other is the built one with attempted changes (port style)
I believe @vampirefo 's build tree is a better start for you. That tree has a succsesfull build at least.
https://forum.xda-developers.com/r1-hd/development/lineage-os-r1hd-t3530751
Click to expand...
Click to collapse
If it builds successfully but fails to boot it may be a further regression than just taking what is actually booting and working all except the camera. I normally wouldn't recommend a port at all and would prefer things be built from scratch, but if we already have a working nougat rom where cam is the only thing that's broken, it would be a lot easier to just try to resolve the broken lib / module issue.. Honestly by the time we put enough time and effort into getting a fully working kernel, device tree / overlay sources, it won't be too ideal to try to continue development to support releases beyond Android O. It would be possible, but just not typical. If we can get a fully working Android N I'd say thats a big progress. If the stock kernel supplied is compatible with the HAL layer used in the nougat rom for the camera, then there won't really be any benefits by reworking the kernel and source tree. We could add some cool things like cpu governors / gpu governors, etc, but thats just optional features. really. If we can verify the stock kernel works, then chances are the stock device tree overlay will plug right into the 7.x AOSP/CM/Lineage sources and be patched for the small broken things such as the camera. Once we really figure out what the exact problem with the camera is we can determine from there what the best solution is.
linuxsociety said:
Found CM13 project for p6601 / BLU R1 HD on github, and the init files needed for setting permissions on the device nodes of the camera: This info will be useful on the Nougat 7.x rom that works all except the camera: https://github.com/anpage/android_d...a68445d35fb172082/rootdir/etc/init.project.rc If someone can check out the 7.x rom and see if the device nodes/files exist that are referenced on lines 25 -48 of that init file I just pasted. a command such as
Code:
grep IMX258_CAM_CAL_DRV /etc/*init*
and/or
Code:
ls /dev/*IMX258*
and see if you get any output from either command. I need to really dig further into the actual kernel modules since the camera in the stock kernel is configured as a custom config option, I'd expect the drivers to be binary drivers that get loaded somewhere else during init. I really wish I could just get a full output of the full filesystem contents of the 7.x rom that has broken camera. Most importantly I need the contents of /lib /etc /system/etc /system/lib.
If the 7.x rom that everyone is using has been simply ported from a different mediatek device that has the same SoC and a similar boardconfig, then it would explain the whole deal about the camera not working as the camera is probably one of the only things that differs in these budget mediatek devices. Does GPS work good? Most usually you'll have another piece of embedded hardware that will fail to work too. I've seen mostly mentioning of the Camera, if thats the only piece of hardware that isn't working then we got real lucky there, but I'd like to confirm things like GPS, accelerometer, etc work properly too.
Click to expand...
Click to collapse
Hey @linuxsociety, again, great work. I remember that there were some issues with the GPS before (look here: https://forum.xda-developers.com/r1-hd/development/cm14-1-r1hd-t3518202/post70553905#post70553905). I do believe that they were fixed, but make sure to review the thread. With @KazuDante ZenUI ROM, there were some auto-rotation bugs, and those were patched. I wish I could help you with running those commands, could you tell me or point me somewhere I could learn how to do this stuff? I'm happy to help!
https://github.com/vampirefo/androi...260ad3582807fb162a0d4/rootdir/init.project.rc
init.project.rc
#camrea section does not fit the bill for the stock kernel's parameters:
Stock Cam section follows:
Code:
#Camera
chmod 0660 /dev/MAINAF
chown system camera /dev/MAINAF
chmod 0660 /dev/MAINAF2
chown system camera /dev/MAINAF2
chmod 0660 /dev/SUBAF
chown system camera /dev/SUBAF
chmod 0660 /dev/GAF001AF
chown system camera /dev/GAF001AF
chmod 0660 /dev/DW9714AF
chown system camera /dev/DW9714AF
chmod 0660 /dev/AD5820AF
chown system camera /dev/AD5820AF
chmod 0660 /dev/BU64745GWZAF
chown system camera /dev/BU64745GWZAF
chmod 0660 /dev/IMX258_CAM_CAL_DRV
chown system camera /dev/IMX258_CAM_CAL_DRV
VampireEFO Lineage 14.1 rom file follows:
Code:
#Camera
chmod 0660 /dev/GAF001AF
chown system camera /dev/GAF001AF
chmod 0660 /dev/DW9714AF
chown system camera /dev/DW9714AF
chmod 0660 /dev/LC898212AF
chown system camera /dev/LC898212AF
chmod 0660 /dev/BU64745GWZAF
chown system camera /dev/BU64745GWZAF
Nobody has enough commit history on any of the p6601 sources I can find to really tell what changes have been made and why. It's real hard to try to debug this stuff, but from what I see the init scripts are missing some permission settings on device nodes, about as I suspected. I'd hate to think someone hasn't already tried to fix that init script to make the proper permission changes on the correct camera device nodes.
Can anyone provide a pastebin for:
Code:
ls -l /dev/
on the 14.1 lineage rom? Thanks
linuxsociety said:
Hey guys I just picked up this device a few days ago, and I'm an experience kernel developer...
Click to expand...
Click to collapse
Thanks a lot for what you're doing, it'll help a lot of fellow R1 HD users out there, including myself. I tried to pick up the project a while back but a bunch of personal stuff happened and I wasn't able to. I've got a lot of school stuff going on right now but I'd love to help as much as I can. I'm not too shabby in coding, developing, meming, etc. so if you need any help with such things I'd be glad to do anything I can.
However, my Blu R1 HD runs stock because I need the camera, it's one of the main purposes of the phone lol. If you need any screwing around on PCs or on the stock kernel I can help there.
Thanks again for everything ?
Unscedeo said:
Hey @linuxsociety, again, great work. I remember that there were some issues with the GPS before (look here: https://forum.xda-developers.com/r1-hd/development/cm14-1-r1hd-t3518202/post70553905#post70553905). I do believe that they were fixed, but make sure to review the thread. With @KazuDante ZenUI ROM, there were some auto-rotation bugs, and those were patched. I wish I could help you with running those commands, could you tell me or point me somewhere I could learn how to do this stuff? I'm happy to help!
Click to expand...
Click to collapse
Most everything I ask people to run will need to be ran from an adb shell prompt, or you can install a terminal emulator app on your phone, adb is a lot more comfortable to use for me, but it requires you have adb installed on your computer and the working usb drivers. I only use linux, so I can't really point you to simple adb solutions for windows, but they are available, just the drivers require more effort on windows. You don't need the full android SDK toolkit either. A lot of references will tell you to install that, and its unnecessary, you will probably need something like a universal adb driver and the adb.exe and any dll files it requires on windows.
I have a few R1 HD .zip files on here that pertained to the dirtycow exploit that had both linux and windows ADB tools, so you may already have it too. You don't need to do any modifcation or anything to paste output I request, but if anyone really wants to put some effort with root - read/write access to / and /system it would greatly help in trying to test a few things.
I really don't think we are going to need to recompile anything to get the camera working, it seems we are just missing a few file permissions and have a few mixed libraries that need to be corrected, most of which can be fixed without even needing to reboot the phone.
I really wish I didn't depend on my hotspot on the R1 so much because I can't really afford to install a broken rom and have the downtime as its the only means of internet access we have in our home (we live in the sticks )
If someone on the 14.1 rom that could please run this in a shell prompt and paste the output to compare the permissions and files in the dev nodes owned by the camera group it would help to start;
Code:
for i in `find /dev/ -group camera`;do ls -l $i;done
The output of the Stock Rom looks like:
[email protected]_HD:/dev # for i in `find /dev/ -group camera`;do ls -l $i;done
crw-rw---- system camera 235, 0 2017-04-20 17:10 IMX258_CAM_CAL_DRV
crw-rw---- system camera 241, 0 2017-04-20 17:10 kd_camera_hw_bus2
crw-rw---- system camera 239, 0 2017-04-20 17:10 MAINAF
crw-rw---- system camera 240, 0 2017-04-20 17:10 S5K4H8_CAM_CAL_DRV
crw-rw---- system camera 242, 0 2017-04-20 17:10 kd_camera_hw
crw-rw---- system camera 244, 0 2017-04-20 17:10 camera-isp
crw-rw---- system camera 236, 0 2017-04-20 17:10 CAM_CAL_DRV
crw-rw---- system camera 243, 0 2017-04-20 17:10 camera-fdvt
crw-rw---- system camera 238, 0 2017-04-20 17:10 kd_camera_flashlight
Click to expand...
Click to collapse
I expect some differences on the 14.1 lineage and expect this to be the start of fixing the issues.
SoulDJ673 said:
Thanks a lot for what you're doing, it'll help a lot of fellow R1 HD users out there, including myself. I tried to pick up the project a while back but a bunch of personal stuff happened and I wasn't able to. I've got a lot of school stuff going on right now but I'd love to help as much as I can. I'm not too shabby in coding, developing, meming, etc. so if you need any help with such things I'd be glad to do anything I can.
However, my Blu R1 HD runs stock because I need the camera, it's one of the main purposes of the phone lol. If you need any screwing around on PCs or on the stock kernel I can help there.
Thanks again for everything
Click to expand...
Click to collapse
I appreciate you offering your help, right now I'm on the stock rom too and I can pretty much check everything on this end myself, but stick around because its very possible I can overlook something that you may think of yourself. I personally know how all these projects are and if its a one man team they usually end up going dead because nobody really has the time to put into this kind of thing just for fun all by themselves. I can contribute as much time as I can, but I will need some people willing to get their hands dirty on the 14.1 rom. I can't do anything at this point but check the sources and kinda guess what the actual ROM is doing on 14.1 and compare it to the original sources and what our stock roms actually does.
linuxsociety said:
If someone on the 14.1 rom that could please run this in a shell prompt and paste the output to compare the permissions and files in the dev nodes owned by the camera group it would help to start;
The output of the Stock Rom looks like:
I expect some differences on the 14.1 lineage and expect this to be the start of fixing the issues.
Click to expand...
Click to collapse
I have an r1 hd running one of the cm 14.1 roms and have the same nodes in dev but the permissions on 235, 240, and 239 are root.root 0600 instead of system.camera.
EZJohnson said:
I have an r1 hd running one of the cm 14.1 roms and have the same nodes in dev but the permissions on 235, 240, and 239 are root.root 0600 instead of system.camera.
Click to expand...
Click to collapse
I think a comparison to the Zen rom, which is a port, but the camera does work will confirm if this is a move in correct direction.
.
I also will go back through my notes. There was a second ported rom that I remember worked 100% , but can't find a thread for it. Will update when I find it.
This is the other rom says working all, including camera
https://forum.xda-developers.com/r1-hd/development/wiko-feel-port-6-0-mra58k-mt6735-x32bit-t3518836
I may have some time in next few days to load my tester phone with these two roms and pull the requested permissions. Hope you are onto something.
mrmazak said:
I think a comparison to the Zen rom, which is a port, but the camera does work will confirm if this is a move in correct direction.
.
I also will go back through my notes. There was a second ported rom that I remember worked 100% , but can't find a thread for it. Will update when I find it.
This is the other rom says working all, including camera
https://forum.xda-developers.com/r1-hd/development/wiko-feel-port-6-0-mra58k-mt6735-x32bit-t3518836
Click to expand...
Click to collapse
It is important those nodes have RW permission by the system user and also the camera group, otherwise nothing can work unless it is the root user trying to access them. A simple modification to the init scripts will fix that issue, but you don't even need to change the init scripts to modify the permissions and test, however during the next boot they will return to the root root 0600 permissions unless the init script is changed to execute on each boot.
from adb shell you could to execute the following commands one line at a time (you must grant root access to the adb shell):
Code:
su
chmod 0660 /dev/MAINAF
chown system camera /dev/MAINAF
chmod 0660 /dev/MAINAF2
chown system camera /dev/MAINAF2
chmod 0660 /dev/SUBAF
chown system camera /dev/SUBAF
chmod 0660 /dev/GAF001AF
chown system camera /dev/GAF001AF
chmod 0660 /dev/DW9714AF
chown system camera /dev/DW9714AF
chmod 0660 /dev/AD5820AF
chown system camera /dev/AD5820AF
chmod 0660 /dev/BU64745GWZAF
chown system camera /dev/BU64745GWZAF
chmod 0660 /dev/IMX258_CAM_CAL_DRV
chown system camera /dev/IMX258_CAM_CAL_DRV
Executing those commands manually will set the appropriate permissions on the nodes. You can try to open the camera (i'd stop any previous running instance) These may need to be set in init, in that case modifying the init file to contain the missing dev node permissions will be necessary.
File is /init.project.rc
linuxsociety said:
It is important those nodes have RW permission by the system user and also the camera group, otherwise nothing can work unless it is the root user trying to access them. A simple modification to the init scripts will fix that issue, but you don't even need to change the init scripts to modify the permissions and test, however during the next boot they will return to the root root 0600 permissions unless the init script is changed to execute on each boot.
from adb shell you could to execute the following commands one line at a time (you must grant root access to the adb shell):
Code:
su
chmod 0660 /dev/MAINAF
chown system camera /dev/MAINAF
chmod 0660 /dev/MAINAF2
chown system camera /dev/MAINAF2
chmod 0660 /dev/SUBAF
chown system camera /dev/SUBAF
chmod 0660 /dev/GAF001AF
chown system camera /dev/GAF001AF
chmod 0660 /dev/DW9714AF
chown system camera /dev/DW9714AF
chmod 0660 /dev/AD5820AF
chown system camera /dev/AD5820AF
chmod 0660 /dev/BU64745GWZAF
chown system camera /dev/BU64745GWZAF
chmod 0660 /dev/IMX258_CAM_CAL_DRV
chown system camera /dev/IMX258_CAM_CAL_DRV
Executing those commands manually will set the appropriate permissions on the nodes. You can try to open the camera (i'd stop any previous running instance) These may need to be set in init, in that case modifying the init file to contain the missing dev node permissions will be necessary.
File is /init.project.rc
Click to expand...
Click to collapse
the lineage os 14 that i have is supposed to be the stock boot.img, but i unpacked it and compaired the /init.project.rc and those last two lines in the camera section are missing. ¿ ?
there are couple other changes too. but one at a time. Will try to see if adding it will make a difference. also before I do that i need to check the boot.img foe the other two roms that camera works, to see if there is a common occurrence of those lines.
UPDATE:
I checked the boot.img used on the lineage beta 4 (camera not working) and it has all the lines in the init, but there is a "tab" in front of every line. maybe the indent is causing trouble ¿ ?
The "zen" rom that has a working camera has Identical init.project.rc to the stock V12 version
The download link to the "wiko -u fell" port is broken so cannot check that one.
so next thing for me to do is try it on live system. will update when done testing.
mrmazak said:
the lineage os 14 that i have is supposed to be the stock boot.img, but i unpacked it and compaired the /init.project.rc and those last two lines in the camera section are missing. ¿ ?
there are couple other changes too. but one at a time. Will try to see if adding it will make a difference. also before I do that i need to check the boot.img foe the other two roms that camera works, to see if there is a common occurrence of those lines.
UPDATE:
I checked the boot.img used on the lineage beta 4 (camera not working) and it has all the lines in the init, but there is a "tab" in front of every line. maybe the indent is causing trouble ¿ ?
Click to expand...
Click to collapse
The tab in front of the lines will not impact anything, but the two missing lines definitely will.
PS do you care to pastebin all the contents of the init files from the lineage boot.img? Has nobody tested flashing the stock boot.img on top of lineage 14.1 to see the results?
linuxsociety said:
The tab in front of the lines will not impact anything, but the two missing lines definitely will.
PS do you care to pastebin all the contents of the init files from the lineage boot.img? Has nobody tested flashing the stock boot.img on top of lineage 14.1 to see the results?
Click to expand...
Click to collapse
i dont know about paste bin. i mean i have heard the name but never used it. here is the contents in code boxes.
LineageOS boot init.project.rc
Code:
# MTK project .rc configure
import init.mt6735.usb.rc
on init
mkdir /mnt/media_rw/usbotg 0700 media_rw media_rw
mkdir /storage/usbotg 0700 root root
on post-fs-data
#
# Connectivity related device nodes & configuration (begin)
#
#/dev/ttyMT2 for Connectivity BT/FM/GPS usage
chmod 0660 /dev/ttyMT2
chown system system /dev/ttyMT2
# STP, WMT, GPS, FM and BT Driver
# insmod /system/lib/modules/mtk_hif_sdio.ko
# insmod /system/lib/modules/mtk_stp_wmt.ko
# insmod /system/lib/modules/mtk_stp_uart.ko
# insmod /system/lib/modules/mtk_stp_gps.ko
# insmod /system/lib/modules/mtk_stp_bt.ko
# insmod /system/lib/modules/mtk_fm_drv.ko
# insmod /system/lib/modules/mtk_wmt_wifi.ko
# Create char device file for WMT, GPS, BT, FM, WIFI
# mknod /dev/stpwmt c 190 0;
# mknod /dev/stpgps c 191 0;
# mknod /dev/stpbt c 192 0;
# chmod 0660 /dev/stpwmt
# chown system system /dev/stpwmt
# chmod 0660 /dev/wmtdetect
# chown system system /dev/wmtdetect
mknod /dev/wmtWifi c 153 0
chmod 0660 /dev/wmtWifi
chown system system /dev/wmtWifi
#Camera
chmod 0660 /dev/MAINAF
chown system camera /dev/MAINAF
chmod 0660 /dev/MAINAF2
chown system camera /dev/MAINAF2
chmod 0660 /dev/SUBAF
chown system camera /dev/SUBAF
chmod 0660 /dev/GAF001AF
chown system camera /dev/GAF001AF
chmod 0660 /dev/DW9714AF
chown system camera /dev/DW9714AF
chmod 0660 /dev/AD5820AF
chown system camera /dev/AD5820AF
chmod 0660 /dev/BU64745GWZAF
chown system camera /dev/BU64745GWZAF
#SMB
chown system system /proc/smb/ScreenComm
chmod 0660 /proc/smb/ScreenComm
# BT
# chmod 0660 /dev/stpbt
# chown bluetooth radio /dev/stpbt
# GPS
# chown gps gps /dev/stpgps
chown gps gps /sys/class/gpsdrv/gps/pwrctl
chown gps gps /sys/class/gpsdrv/gps/suspend
chown gps gps /sys/class/gpsdrv/gps/state
chown gps gps /sys/class/gpsdrv/gps/pwrsave
chown gps gps /sys/class/gpsdrv/gps/status
# chmod 0660 /dev/stpgps
# WiFi
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/wpa_supplicant 0770 wifi wifi
chown wifi wifi /data/misc/wifi
#Define device for ATCID
chmod 660 /dev/ttyGS0
chown system /dev/ttyGS0
chmod 660 /dev/ttyGS1
chown system /dev/ttyGS1
#Disable for one Single loader
# Load WiFi Driver
# insmod /system/lib/modules/wlan_mt.ko
# Char device for BT 3.0 HS
mknod /dev/ampc0 c 151 0
chown bluetooth bluetooth /dev/ampc0
chmod 0660 /dev/ampc0
# for gesture
chown system system /sys/devices/mx_tsp/gesture_control
chown system system /sys/devices/mx_tsp/gesture_data
# for notification light
chown system system /sys/devices/mx_leds/leds_mode
#FLYME_EDIT:[email protected] Permissions add for power saving mode {@
#Permissions for power saving mode
chown system system /sys/power/power_mode
chmod 0660 /sys/power/power_mode
#@}
#
# Connectivity related device nodes & configuration (end)
#
# Encrypt phone function
setprop vold.post_fs_data_done 1
#
# Connectivity related services (Begin)
#
service atci_service /system/bin/atci_service
socket atci-service stream 660 radio system
socket atci-serv-fw stream 660 radio system
user root
disabled
group radio system
service atcid-daemon-u /system/bin/atcid
user system
group radio system media
disabled
oneshot
service atcid-daemon-e /system/bin/atcid
user root
group radio system
disabled
oneshot
on early_property:ro.build.type=eng
start atci_service
start atcid-daemon-e
service audio-daemon /system/bin/audiocmdservice_atci
class main
socket atci-audio stream 660 media system
user media
group nvram media system sdcard_rw
disabled
oneshot
service wmtLoader /system/bin/wmt_loader
user root
group root
class core
oneshot
service conn_launcher /system/bin/6620_launcher -p /system/etc/firmware/
user system
group system
class core
#
# Connectivity related services (End)
#
zen rom working camera init.project.rc 100% match to stock version
Code:
# MTK project .rc configure
import init.mt6735.usb.rc
on init
mkdir /mnt/media_rw/usbotg 0700 media_rw media_rw
mkdir /storage/usbotg 0700 root root
on post-fs-data
#
# Connectivity related device nodes & configuration (begin)
#
#/dev/ttyMT2 for Connectivity BT/FM/GPS usage
chmod 0660 /dev/ttyMT2
chown system system /dev/ttyMT2
# STP, WMT, GPS, FM and BT Driver
# insmod /system/lib/modules/mtk_hif_sdio.ko
# insmod /system/lib/modules/mtk_stp_wmt.ko
# insmod /system/lib/modules/mtk_stp_uart.ko
# insmod /system/lib/modules/mtk_stp_gps.ko
# insmod /system/lib/modules/mtk_stp_bt.ko
# insmod /system/lib/modules/mtk_fm_drv.ko
# insmod /system/lib/modules/mtk_wmt_wifi.ko
# Create char device file for WMT, GPS, BT, FM, WIFI
# mknod /dev/stpwmt c 190 0;
# mknod /dev/stpgps c 191 0;
# mknod /dev/stpbt c 192 0;
# chmod 0660 /dev/stpwmt
# chown system system /dev/stpwmt
# chmod 0660 /dev/wmtdetect
# chown system system /dev/wmtdetect
mknod /dev/wmtWifi c 153 0
chmod 0660 /dev/wmtWifi
chown system system /dev/wmtWifi
#Camera
chmod 0660 /dev/MAINAF
chown system camera /dev/MAINAF
chmod 0660 /dev/MAINAF2
chown system camera /dev/MAINAF2
chmod 0660 /dev/SUBAF
chown system camera /dev/SUBAF
chmod 0660 /dev/GAF001AF
chown system camera /dev/GAF001AF
chmod 0660 /dev/DW9714AF
chown system camera /dev/DW9714AF
chmod 0660 /dev/AD5820AF
chown system camera /dev/AD5820AF
chmod 0660 /dev/BU64745GWZAF
chown system camera /dev/BU64745GWZAF
chmod 0660 /dev/IMX258_CAM_CAL_DRV
chown system camera /dev/IMX258_CAM_CAL_DRV
#SMB
chown system system /proc/smb/ScreenComm
chmod 0660 /proc/smb/ScreenComm
# BT
# chmod 0660 /dev/stpbt
# chown bluetooth radio /dev/stpbt
# GPS
# chown gps gps /dev/stpgps
chown gps gps /sys/class/gpsdrv/gps/pwrctl
chown gps gps /sys/class/gpsdrv/gps/suspend
chown gps gps /sys/class/gpsdrv/gps/state
chown gps gps /sys/class/gpsdrv/gps/pwrsave
chown gps gps /sys/class/gpsdrv/gps/status
# chmod 0660 /dev/stpgps
# WiFi
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/wpa_supplicant 0770 wifi wifi
chown wifi wifi /data/misc/wifi
#Define device for ATCID
chmod 660 /dev/ttyGS0
chown system /dev/ttyGS0
chmod 660 /dev/ttyGS1
chown system /dev/ttyGS1
#Disable for one Single loader
# Load WiFi Driver
# insmod /system/lib/modules/wlan_mt.ko
# Char device for BT 3.0 HS
mknod /dev/ampc0 c 151 0
chown bluetooth bluetooth /dev/ampc0
chmod 0660 /dev/ampc0
chmod 0666 /dev/sensors_state
#
# Connectivity related device nodes & configuration (end)
#
chmod 0666 /dev/exm0
on init
# Refer to http://source.android.com/devices/tech/storage/index.html
# It said, "Starting in Android 4.4, multiple external storage devices are surfaced to developers through
# Context.getExternalFilesDirs(), Context.getExternalCacheDirs(), and Context.getObbDirs().
# External storage devices surfaced through these APIs must be a semi-permanent part of the device (such as an SD card slot in a battery compartment).
# Developers expect data stored in these locations to be available over long periods of time."
# Therefore, if the target doesn't support sd hot-plugging (Ex: the SD card slot in a battery compartment), we need to export SECONDARY_STORAGE in 'boot' section
#
# export SECONDARY_STORAGE /storage/sdcard1
service fuse_usbotg /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/usbotg /storage/usbotg
class late_start
disabled
#service fingerprintd /system/bin/fingerprintd
# class late_start
# user system
#service gx_fpd /system/bin/gx_fpd
# class late_start
# user root
# group root system
#
# Connectivity related services (Begin)
#
service atci_service /system/bin/atci_service
socket atci-service stream 660 radio system
socket atci-serv-fw stream 660 radio system
user root
disabled
group radio system
service atcid-daemon-u /system/bin/atcid
user system
group radio system media
disabled
oneshot
service atcid-daemon-e /system/bin/atcid
user root
group radio system
disabled
oneshot
on early_property:ro.build.type=eng
start atci_service
start atcid-daemon-e
service audio-daemon /system/bin/audiocmdservice_atci
class main
socket atci-audio stream 660 media system
user media
group nvram media system sdcard_rw
disabled
oneshot
service wmtLoader /system/bin/wmt_loader
user root
group root
class core
oneshot
service conn_launcher /system/bin/6620_launcher -p /system/etc/firmware/
user system
group system
class core
#
# Connectivity related services (End)
#
#
# vtservice
#
service vtservice /system/bin/vtservice
class main
socket soc_vt_tcv dgram 660 radio system
socket soc_vt_stk dgram 660 radio system
socket soc_vt_svc dgram 660 radio system
user system
group system camera graphics inet net_admin net_raw media sdcard_rw radio sdcard_r media_rw
ioprio rt 4
mrmazak said:
i dont know about paste bin. i mean i have heard the name but never used it. here is the contents in code boxes.
LineageOS boot init.project.rc
Code:
# MTK project .rc configure
import init.mt6735.usb.rc
on init
mkdir /mnt/media_rw/usbotg 0700 media_rw media_rw
mkdir /storage/usbotg 0700 root root
on post-fs-data
#
# Connectivity related device nodes & configuration (begin)
#
#/dev/ttyMT2 for Connectivity BT/FM/GPS usage
chmod 0660 /dev/ttyMT2
chown system system /dev/ttyMT2
# STP, WMT, GPS, FM and BT Driver
# insmod /system/lib/modules/mtk_hif_sdio.ko
# insmod /system/lib/modules/mtk_stp_wmt.ko
# insmod /system/lib/modules/mtk_stp_uart.ko
# insmod /system/lib/modules/mtk_stp_gps.ko
# insmod /system/lib/modules/mtk_stp_bt.ko
# insmod /system/lib/modules/mtk_fm_drv.ko
# insmod /system/lib/modules/mtk_wmt_wifi.ko
# Create char device file for WMT, GPS, BT, FM, WIFI
# mknod /dev/stpwmt c 190 0;
# mknod /dev/stpgps c 191 0;
# mknod /dev/stpbt c 192 0;
# chmod 0660 /dev/stpwmt
# chown system system /dev/stpwmt
# chmod 0660 /dev/wmtdetect
# chown system system /dev/wmtdetect
mknod /dev/wmtWifi c 153 0
chmod 0660 /dev/wmtWifi
chown system system /dev/wmtWifi
#Camera
chmod 0660 /dev/MAINAF
chown system camera /dev/MAINAF
chmod 0660 /dev/MAINAF2
chown system camera /dev/MAINAF2
chmod 0660 /dev/SUBAF
chown system camera /dev/SUBAF
chmod 0660 /dev/GAF001AF
chown system camera /dev/GAF001AF
chmod 0660 /dev/DW9714AF
chown system camera /dev/DW9714AF
chmod 0660 /dev/AD5820AF
chown system camera /dev/AD5820AF
chmod 0660 /dev/BU64745GWZAF
chown system camera /dev/BU64745GWZAF
#SMB
chown system system /proc/smb/ScreenComm
chmod 0660 /proc/smb/ScreenComm
# BT
# chmod 0660 /dev/stpbt
# chown bluetooth radio /dev/stpbt
# GPS
# chown gps gps /dev/stpgps
chown gps gps /sys/class/gpsdrv/gps/pwrctl
chown gps gps /sys/class/gpsdrv/gps/suspend
chown gps gps /sys/class/gpsdrv/gps/state
chown gps gps /sys/class/gpsdrv/gps/pwrsave
chown gps gps /sys/class/gpsdrv/gps/status
# chmod 0660 /dev/stpgps
# WiFi
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/wpa_supplicant 0770 wifi wifi
chown wifi wifi /data/misc/wifi
#Define device for ATCID
chmod 660 /dev/ttyGS0
chown system /dev/ttyGS0
chmod 660 /dev/ttyGS1
chown system /dev/ttyGS1
#Disable for one Single loader
# Load WiFi Driver
# insmod /system/lib/modules/wlan_mt.ko
# Char device for BT 3.0 HS
mknod /dev/ampc0 c 151 0
chown bluetooth bluetooth /dev/ampc0
chmod 0660 /dev/ampc0
# for gesture
chown system system /sys/devices/mx_tsp/gesture_control
chown system system /sys/devices/mx_tsp/gesture_data
# for notification light
chown system system /sys/devices/mx_leds/leds_mode
#FLYME_EDIT:[email protected] Permissions add for power saving mode {@
#Permissions for power saving mode
chown system system /sys/power/power_mode
chmod 0660 /sys/power/power_mode
#@}
#
# Connectivity related device nodes & configuration (end)
#
# Encrypt phone function
setprop vold.post_fs_data_done 1
#
# Connectivity related services (Begin)
#
service atci_service /system/bin/atci_service
socket atci-service stream 660 radio system
socket atci-serv-fw stream 660 radio system
user root
disabled
group radio system
service atcid-daemon-u /system/bin/atcid
user system
group radio system media
disabled
oneshot
service atcid-daemon-e /system/bin/atcid
user root
group radio system
disabled
oneshot
on early_property:ro.build.type=eng
start atci_service
start atcid-daemon-e
service audio-daemon /system/bin/audiocmdservice_atci
class main
socket atci-audio stream 660 media system
user media
group nvram media system sdcard_rw
disabled
oneshot
service wmtLoader /system/bin/wmt_loader
user root
group root
class core
oneshot
service conn_launcher /system/bin/6620_launcher -p /system/etc/firmware/
user system
group system
class core
#
# Connectivity related services (End)
#
zen rom working camera init.project.rc 100% match to stock version
Code:
# MTK project .rc configure
import init.mt6735.usb.rc
on init
mkdir /mnt/media_rw/usbotg 0700 media_rw media_rw
mkdir /storage/usbotg 0700 root root
on post-fs-data
#
# Connectivity related device nodes & configuration (begin)
#
#/dev/ttyMT2 for Connectivity BT/FM/GPS usage
chmod 0660 /dev/ttyMT2
chown system system /dev/ttyMT2
# STP, WMT, GPS, FM and BT Driver
# insmod /system/lib/modules/mtk_hif_sdio.ko
# insmod /system/lib/modules/mtk_stp_wmt.ko
# insmod /system/lib/modules/mtk_stp_uart.ko
# insmod /system/lib/modules/mtk_stp_gps.ko
# insmod /system/lib/modules/mtk_stp_bt.ko
# insmod /system/lib/modules/mtk_fm_drv.ko
# insmod /system/lib/modules/mtk_wmt_wifi.ko
# Create char device file for WMT, GPS, BT, FM, WIFI
# mknod /dev/stpwmt c 190 0;
# mknod /dev/stpgps c 191 0;
# mknod /dev/stpbt c 192 0;
# chmod 0660 /dev/stpwmt
# chown system system /dev/stpwmt
# chmod 0660 /dev/wmtdetect
# chown system system /dev/wmtdetect
mknod /dev/wmtWifi c 153 0
chmod 0660 /dev/wmtWifi
chown system system /dev/wmtWifi
#Camera
chmod 0660 /dev/MAINAF
chown system camera /dev/MAINAF
chmod 0660 /dev/MAINAF2
chown system camera /dev/MAINAF2
chmod 0660 /dev/SUBAF
chown system camera /dev/SUBAF
chmod 0660 /dev/GAF001AF
chown system camera /dev/GAF001AF
chmod 0660 /dev/DW9714AF
chown system camera /dev/DW9714AF
chmod 0660 /dev/AD5820AF
chown system camera /dev/AD5820AF
chmod 0660 /dev/BU64745GWZAF
chown system camera /dev/BU64745GWZAF
chmod 0660 /dev/IMX258_CAM_CAL_DRV
chown system camera /dev/IMX258_CAM_CAL_DRV
#SMB
chown system system /proc/smb/ScreenComm
chmod 0660 /proc/smb/ScreenComm
# BT
# chmod 0660 /dev/stpbt
# chown bluetooth radio /dev/stpbt
# GPS
# chown gps gps /dev/stpgps
chown gps gps /sys/class/gpsdrv/gps/pwrctl
chown gps gps /sys/class/gpsdrv/gps/suspend
chown gps gps /sys/class/gpsdrv/gps/state
chown gps gps /sys/class/gpsdrv/gps/pwrsave
chown gps gps /sys/class/gpsdrv/gps/status
# chmod 0660 /dev/stpgps
# WiFi
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/wpa_supplicant 0770 wifi wifi
chown wifi wifi /data/misc/wifi
#Define device for ATCID
chmod 660 /dev/ttyGS0
chown system /dev/ttyGS0
chmod 660 /dev/ttyGS1
chown system /dev/ttyGS1
#Disable for one Single loader
# Load WiFi Driver
# insmod /system/lib/modules/wlan_mt.ko
# Char device for BT 3.0 HS
mknod /dev/ampc0 c 151 0
chown bluetooth bluetooth /dev/ampc0
chmod 0660 /dev/ampc0
chmod 0666 /dev/sensors_state
#
# Connectivity related device nodes & configuration (end)
#
chmod 0666 /dev/exm0
on init
# Refer to http://source.android.com/devices/tech/storage/index.html
# It said, "Starting in Android 4.4, multiple external storage devices are surfaced to developers through
# Context.getExternalFilesDirs(), Context.getExternalCacheDirs(), and Context.getObbDirs().
# External storage devices surfaced through these APIs must be a semi-permanent part of the device (such as an SD card slot in a battery compartment).
# Developers expect data stored in these locations to be available over long periods of time."
# Therefore, if the target doesn't support sd hot-plugging (Ex: the SD card slot in a battery compartment), we need to export SECONDARY_STORAGE in 'boot' section
#
# export SECONDARY_STORAGE /storage/sdcard1
service fuse_usbotg /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/usbotg /storage/usbotg
class late_start
disabled
#service fingerprintd /system/bin/fingerprintd
# class late_start
# user system
#service gx_fpd /system/bin/gx_fpd
# class late_start
# user root
# group root system
#
# Connectivity related services (Begin)
#
service atci_service /system/bin/atci_service
socket atci-service stream 660 radio system
socket atci-serv-fw stream 660 radio system
user root
disabled
group radio system
service atcid-daemon-u /system/bin/atcid
user system
group radio system media
disabled
oneshot
service atcid-daemon-e /system/bin/atcid
user root
group radio system
disabled
oneshot
on early_property:ro.build.type=eng
start atci_service
start atcid-daemon-e
service audio-daemon /system/bin/audiocmdservice_atci
class main
socket atci-audio stream 660 media system
user media
group nvram media system sdcard_rw
disabled
oneshot
service wmtLoader /system/bin/wmt_loader
user root
group root
class core
oneshot
service conn_launcher /system/bin/6620_launcher -p /system/etc/firmware/
user system
group system
class core
#
# Connectivity related services (End)
#
#
# vtservice
#
service vtservice /system/bin/vtservice
class main
socket soc_vt_tcv dgram 660 radio system
socket soc_vt_stk dgram 660 radio system
socket soc_vt_svc dgram 660 radio system
user system
group system camera graphics inet net_admin net_raw media sdcard_rw radio sdcard_r media_rw
ioprio rt 4
Click to expand...
Click to collapse
Fair enough, I have a diff applied here:
Code:
$ diff -uN0 lineage.init.project.rc stock.init.project.rc
--- lineage.init.project.rc 2017-04-21 21:10:34.569610971 -0500
+++ stock.init.project.rc 2017-04-21 21:11:49.373610258 -0500
@@ -65,0 +66,2 @@
+ chmod 0660 /dev/IMX258_CAM_CAL_DRV
+ chown system camera /dev/IMX258_CAM_CAL_DRV
@@ -104,14 +106 @@
-
-# for gesture
- chown system system /sys/devices/mx_tsp/gesture_control
- chown system system /sys/devices/mx_tsp/gesture_data
-
-# for notification light
- chown system system /sys/devices/mx_leds/leds_mode
-
-#FLYME_EDIT:[email protected] Permissions add for
-power saving mode {@
-#Permissions for power saving mode
- chown system system /sys/power/power_mode
- chmod 0660 /sys/power/power_mode
-#@}
+ chmod 0666 /dev/sensors_state
@@ -123,2 +112,33 @@
-# Encrypt phone function
- setprop vold.post_fs_data_done 1
+
+ chmod 0666 /dev/exm0
+
+on init
+ # Refer to http://source.android.com/devices/tech/storage/index.html
+ # It said, "Starting in Android 4.4, multiple external storage
+devices are surfaced to developers through
+ # Context.getExternalFilesDirs(),
+Context.getExternalCacheDirs(), and Context.getObbDirs().
+ # External storage devices surfaced through these APIs
+must be a semi-permanent part of the device (such as an SD card slot in
+a battery compartment).
+ # Developers expect data stored in these locations to be
+available over long periods of time."
+ # Therefore, if the target doesn't support sd hot-plugging (Ex: the
+SD card slot in a battery compartment), we need to export
+SECONDARY_STORAGE in 'boot' section
+ #
+ # export SECONDARY_STORAGE /storage/sdcard1
+
+service fuse_usbotg /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d
+/mnt/media_rw/usbotg /storage/usbotg
+ class late_start
+ disabled
+
+
+#service fingerprintd /system/bin/fingerprintd
+# class late_start
+# user system
+#service gx_fpd /system/bin/gx_fpd
+# class late_start
+# user root
+# group root system
@@ -173,0 +194,13 @@
+
+#
+# vtservice
+#
+service vtservice /system/bin/vtservice
+ class main
+ socket soc_vt_tcv dgram 660 radio system
+ socket soc_vt_stk dgram 660 radio system
+ socket soc_vt_svc dgram 660 radio system
+ user system
+ group system camera graphics inet net_admin net_raw media
+sdcard_rw radio sdcard_r media_rw
+ ioprio rt 4
Can you see the difference in that patch of the lineage vs stock? The two lines you mentioned are of the most importance, the other lines didn't come out exactly right due to some word wrapping or something going on in the "code" box used on xda. Needless to say those IMX permissions need set, we also need to verify proper permissions are set in the other init files for other camera nodes and files.
I've created a diff patch of the entire differences of the contexts of the ramdisk, and they are in no way the same. The diff patch contains 5,000+ lines so there are quite a few files differet. Im almost certain that the camera issue resides in these differences. I'm just wondering where the 14.1/lineage ramdisk mods have came from and why. The why part of that is where commits on github really come in handy. Anyway here is the file of the entire differences (minus any binary files that differ, when the binaries differ the patch specifies it)
https://gist.github.com/godmachine81/3e5bffa14b4b06d41d5db470961d54ea
Search the gist for the term 'camera' and you'll see some interesting results especially the + (stock) lines.
This command:
Code:
$ grep -i camera /tmp/lineage-vs-stock.diff |wc -l
27
shows there are 27 lines containing the term camera (ignoring case sensitivity) from the entire stock vs lineage ramdisk contents all of which are DIFFERENCES (thats ommitting the common occurances)