[GUIDE][HOW-TO][ROOT][TWRP][MT6735M] ZTE Blade A110 - Blade General

This thread is going to be a guide on how to root the ZTE Blade A110 (a.k.a. Optus Zip, Coles Shout, Spark Lite, etc.) with KingRoot v4.60 and then replacing KingUser with SuperSU - via adb shell. Once rooted, a custom recovery may be possible. This will be explored.
Be aware that KingRoot requires internet access to function and that it may compromise your privacy (a VirusTotal scan reveals numerous Tencent QQ URLs). In anticipation of this, I chose to root before entering any personal information (including Google Play account details) or SIM card. I also set up a restricted guest network on my router for WiFi access.
REQUIREMENTS
PC
Android Debug Bridge (install adb)
microSD card (files are expected to be stored in /storage/sdcard1 )
KingRoot v4.60 (use a different version at your own peril)
Internet access (for KingRoot to function)
METHOD
Steps enclosed in parentheses ( ) may not be necessary, but I did them anyway.
Enable installation of apps from unknown sources
Connect to PC then enable developer options and USB debugging
(Enable OEM unlocking)
Sideload KingRoot
Get root with KingRoot
DO NOT RESTART PHONE
Open a Command Prompt and start an adb shell as root:
Code:
C:\Windows\system32>[B][COLOR="Blue"]adb shell[/COLOR][/B]
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
[email protected]_BLADE_A110:/ $ [B][COLOR="Blue"]su[/COLOR][/B]
su
[email protected]_BLADE_A110:/ #
Execute the following commands (which are from Mr.W0lf's script - with a bit of tweaking):
Mount system as writable
Code:
[B][COLOR="Blue"]mount[/COLOR][/B] [COLOR="Sienna"]-o[/COLOR] remount,rw /system
Uninstall KingUser (KingRoot Superuser management app)
Code:
[B][COLOR="Blue"]am[/COLOR][/B] kill com.kingroot.kinguser
[B][COLOR="Blue"]pm[/COLOR][/B] uninstall com.kingroot.kinguser
Install Busybox (to use chattr)
Code:
[B][COLOR="Blue"]cat[/COLOR][/B] /storage/sdcard1/busybox [B][COLOR="Sienna"]>[/COLOR][/B] /system/bin/busybox
[B][COLOR="Blue"]chown[/COLOR][/B] [COLOR="Red"]0.1000[/COLOR] /system/bin/busybox [B][COLOR="Sienna"]&&[/COLOR][/B] [B][COLOR="Blue"]chmod[/COLOR][/B] [COLOR="Red"]0755[/COLOR] /system/bin/busybox
Delete KingRoot system files
Code:
[B][COLOR="Blue"]busybox chattr[/COLOR][/B] [COLOR="Sienna"]-ia[/COLOR] /system/bin/.usr/.ku [B][COLOR="Sienna"]&&[/COLOR][/B] [B][COLOR="Blue"]rm[/COLOR][/B] [COLOR="Sienna"]-r[/COLOR] /system/bin/.usr
[B][COLOR="Blue"]busybox chattr[/COLOR][/B] [COLOR="Sienna"]-ia[/COLOR] /system/bin/debuggerd [B][COLOR="Sienna"]&&[/COLOR][/B] [B][COLOR="Blue"]rm[/COLOR][/B] /system/bin/debuggerd
[B][COLOR="Blue"]busybox chattr[/COLOR][/B] [COLOR="Sienna"]-ia[/COLOR] /system/bin/debuggerd64 [B][COLOR="Sienna"]&&[/COLOR][/B] [B][COLOR="Blue"]rm[/COLOR][/B] /system/bin/debuggerd64
[B][COLOR="Blue"]busybox chattr[/COLOR][/B] [COLOR="Sienna"]-ia[/COLOR] /system/bin/debuggerd_real
[B][COLOR="Blue"]cat[/COLOR][/B] /system/bin/debuggerd_real [B][COLOR="Sienna"]>[/COLOR][/B] /storage/sdcard1/debuggerd.bak.[B][COLOR="Sienna"]$(date +%s)[/COLOR][/B]
[B][COLOR="Blue"]rm[/COLOR][/B] /system/bin/debuggerd_real
[B][COLOR="Blue"]busybox chattr[/COLOR][/B] [COLOR="Sienna"]-ia[/COLOR] /system/bin/install-recovery.sh [B][COLOR="Sienna"]&&[/COLOR][/B] [B][COLOR="Blue"]rm[/COLOR][/B] /system/bin/install-recovery.sh
[B][COLOR="Blue"]busybox chattr[/COLOR][/B] [COLOR="Sienna"]-ia[/COLOR] /system/bin/rt.sh [B][COLOR="Sienna"]&&[/COLOR][/B] [B][COLOR="Blue"]rm[/COLOR][/B] /system/bin/rt.sh
[B][COLOR="Blue"]busybox chattr[/COLOR][/B] [COLOR="Sienna"]-ia[/COLOR] /system/bin/su [B][COLOR="Sienna"]&&[/COLOR][/B] [B][COLOR="Blue"]rm[/COLOR][/B] /system/bin/su
[B][COLOR="Blue"]busybox chattr[/COLOR][/B] [COLOR="Sienna"]-ia[/COLOR] /system/etc/install-recovery.sh [B][COLOR="Sienna"]&&[/COLOR][/B] [B][COLOR="Blue"]rm[/COLOR][/B] /system/etc/install-recovery.sh
[B][COLOR="Blue"]busybox chattr[/COLOR][/B] [COLOR="Sienna"]-ia[/COLOR] /system/etc/install-recovery.sh-ku.bak [B][COLOR="Sienna"]&&[/COLOR][/B] [B][COLOR="Blue"]rm[/COLOR][/B] /system/etc/install-recovery.sh-ku.bak
[B][COLOR="Blue"]busybox chattr[/COLOR][/B] [COLOR="Sienna"]-ia[/COLOR] /system/xbin/krdem [B][COLOR="Sienna"]&&[/COLOR][/B] [B][COLOR="Blue"]rm[/COLOR][/B] /system/xbin/krdem
[B][COLOR="Blue"]busybox chattr[/COLOR][/B] [COLOR="Sienna"]-ia[/COLOR] /system/xbin/ku.sud [B][COLOR="Sienna"]&&[/COLOR][/B] [B][COLOR="Blue"]rm[/COLOR][/B] /system/xbin/ku.sud
[B][COLOR="Blue"]busybox chattr[/COLOR][/B] [COLOR="Sienna"]-ia[/COLOR] /system/xbin/start_kusud.sh [B][COLOR="Sienna"]&&[/COLOR][/B] [B][COLOR="Blue"]rm[/COLOR][/B] /system/xbin/start_kusud.sh
[B][COLOR="Blue"]busybox chattr[/COLOR][/B] [COLOR="Sienna"]-ia[/COLOR] /system/xbin/su [B][COLOR="Sienna"]&&[/COLOR][/B] [B][COLOR="Blue"]rm[/COLOR][/B] /system/xbin/su
[B][COLOR="Blue"]busybox chattr[/COLOR][/B] [COLOR="Sienna"]-ia[/COLOR] /system/xbin/supolicy [B][COLOR="Sienna"]&&[/COLOR][/B] [B][COLOR="Blue"]rm[/COLOR][/B] /system/xbin/supolicy
Cleanup
Code:
[B][COLOR="Blue"]rm[/COLOR][/B] /system/usr/icu/icusuflag.conf
[B][COLOR="Blue"]rm[/COLOR][/B] [COLOR="Sienna"]-r[/COLOR] /data/data-lib/com.kingroot.RushRoot
[B][COLOR="Blue"]rm[/COLOR][/B] [COLOR="Sienna"]-r[/COLOR] /data/data-lib/com.kingroot.kinguser
[B][COLOR="Blue"]rm[/COLOR][/B] [COLOR="Sienna"]-r[/COLOR] /data/data-lib/kds
[B][COLOR="Blue"]rm[/COLOR][/B] [COLOR="Sienna"]-r[/COLOR] /data/data-lib/king
[B][COLOR="Blue"]rm[/COLOR][/B] [COLOR="Sienna"]-r[/COLOR] /dev/kingroot
[B][COLOR="Blue"]rm[/COLOR][/B] [COLOR="Sienna"]-r[/COLOR] /sdcard/KingMaster
[B][COLOR="Blue"]rm[/COLOR][/B] [COLOR="Sienna"]-r[/COLOR] /sdcard/Kingroot
[B][COLOR="Blue"]rm[/COLOR][/B] [COLOR="Sienna"]-r[/COLOR] /sdcard/Tencent
[B][COLOR="Blue"]rm[/COLOR][/B] [COLOR="Sienna"]-r[/COLOR] /sdcard/kinguserdown
[B][COLOR="Blue"]rm[/COLOR][/B] /sdcard/Download/kmPlugins.zip
[B][COLOR="Blue"]rm[/COLOR][/B] /sdcard/kr-stock-conf
More cleanup and uninstall Purify
Code:
[B][COLOR="Blue"]rm[/COLOR][/B] /data/dalvik-cache/arm64/[email protected]@[email protected]@tm.dex
[B][COLOR="Blue"]rm[/COLOR][/B] /data/dalvik-cache/arm64/[email protected][email protected]
[B][COLOR="Blue"]rm[/COLOR][/B] /data/dalvik-cache/arm64/[email protected]@[email protected]
[B][COLOR="Blue"]rm[/COLOR][/B] /data/dalvik-cache/arm64/[email protected]@[email protected]@classes.dex
[B][COLOR="Blue"]rm[/COLOR][/B] /data/local/tmp/K[B][COLOR="Red"]*[/COLOR][/B] [I][COLOR="Green"](I've forgotten the filename. Anybody?)[/COLOR][/I]
[B][COLOR="Blue"]rm[/COLOR][/B] /data/local/tmp/krperm.txt
[B][COLOR="Blue"]am[/COLOR][/B] kill com.kingstudio.purify
[B][COLOR="Blue"]pm[/COLOR][/B] uninstall com.kingstudio.purify
Copy files to system
Code:
[B][COLOR="Blue"]cat[/COLOR][/B] /storage/sdcard1/debuggerd [B][COLOR="Sienna"]>[/COLOR][/B] /system/bin/debuggerd
[B][COLOR="Blue"]cat[/COLOR][/B] /storage/sdcard1/debuggerd64 [B][COLOR="Sienna"]>[/COLOR][/B] /system/bin/debuggerd64
[B][COLOR="Blue"]cat[/COLOR][/B] /storage/sdcard1/su [B][COLOR="Sienna"]>[/COLOR][/B] /system/xbin/daemonsu
[B][COLOR="Blue"]cat[/COLOR][/B] /storage/sdcard1/su [B][COLOR="Sienna"]>[/COLOR][/B] /system/xbin/su
[B][COLOR="Blue"]cat[/COLOR][/B] /storage/sdcard1/su [B][COLOR="Sienna"]>[/COLOR][/B] /system/xbin/sugote
[B][COLOR="Blue"]cat[/COLOR][/B] /system/bin/sh [B][COLOR="Sienna"]>[/COLOR][/B] /system/xbin/sugote-mksh
Set permissions
Code:
[B][COLOR="Blue"]chown[/COLOR][/B] [COLOR="Red"]0.0[/COLOR] /system/xbin/daemonsu [B][COLOR="Sienna"]&&[/COLOR][/B] [B][COLOR="Blue"]chmod[/COLOR][/B] [COLOR="Red"]0755[/COLOR] /system/xbin/daemonsu
[B][COLOR="Blue"]chown[/COLOR][/B] [COLOR="Red"]0.0[/COLOR] /system/xbin/su [B][COLOR="Sienna"]&&[/COLOR][/B] [B][COLOR="Blue"]chmod[/COLOR][/B] [COLOR="Red"]6755[/COLOR] /system/xbin/su
[B][COLOR="Blue"]chown[/COLOR][/B] [COLOR="Red"]0.0[/COLOR] /system/xbin/sugote [B][COLOR="Sienna"]&&[/COLOR][/B] [B][COLOR="Blue"]chmod[/COLOR][/B] [COLOR="Red"]0755[/COLOR] /system/xbin/sugote
[B][COLOR="Blue"]chown[/COLOR][/B] [COLOR="Red"]0.0[/COLOR] /system/xbin/sugote-mksh [B][COLOR="Sienna"]&&[/COLOR][/B] [B][COLOR="Blue"]chmod[/COLOR][/B][COLOR="Red"] 0755[/COLOR] /system/xbin/sugote-mksh
[B][COLOR="Blue"]chown[/COLOR][/B] [COLOR="Red"]0.2000[/COLOR] /system/bin/debuggerd [B][COLOR="Sienna"]&&[/COLOR][/B] [B][COLOR="Blue"]chmod[/COLOR][/B] [COLOR="Red"]0755[/COLOR] /system/bin/debuggerd
[B][COLOR="Blue"]chown[/COLOR][/B] [COLOR="Red"]0.2000[/COLOR] /system/bin/debuggerd64 [B][COLOR="Sienna"]&&[/COLOR][/B] [B][COLOR="Blue"]chmod[/COLOR][/B] [COLOR="Red"]0755[/COLOR] /system/bin/debuggerd64
daemonsu -d
Install SuperSU
Code:
[B][COLOR="Blue"]pm[/COLOR][/B] install /storage/sdcard1/Superuser.apk
?️ Alternatively, use this script: View attachment dekingroot_script.zip​
Update SU binary
{
"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"
}
Reboot
*** CONGRATULATIONS! YOUR DEVICE IS NOW ROOTED ***
FILE MD5 CHECKSUMS
debuggerd.zip\debuggerd - F03F61C8A21597B6DFFD1C43E2E32B70
debuggerd64.zip\debuggerd64 - 32CAE0C03DEEEB0579A52820C7DFD33D
NewKingrootV4.60_C132_B232_xda_release_2015_11_13_105243.apk - 1D8AA4B22DFC15631AD5F3BD082EA05F
stock_kernel_dtac.co.th.zip\boot.img - DA2D4B79AD52C5D6570DA06B628951C1
stock_kernel_optus.com.au.zip\boot.img - 5C3283C61F074709B5AAC4731722B0D2
stock_kernel_tiphone.co.id.zip\boot.img - FCEDE303D2D14F71F28E53DBE42EBBA3
supersu_busybox.zip\busybox - 7C5CB8A20FF6781EC448F88958CE3FC4
supersu_busybox.zip\su - C2D5C3F94C41024EEDB4569779597CF6
supersu_busybox.zip\Superuser.apk - 15E9A509F2989CE409FB9761C78E7826
THANKS
Mr.W0lf
@Chainfire (SuperSU developer)

TWRP 3.0.2-0
SCREENSHOTS
​
PORTING RECOVERY
Unpack stock recovery.img with Carliv Image Kitchen for Android
Unpack and copy files from twrp_zte_a410.img (overwrite):
Code:
recovery.img-cmdline
ramdisk\init
ramdisk\sepolicy
ramdisk\fstab.goldfish
ramdisk\init.rc
ramdisk\init.recovery.usb.rc
ramdisk\ueventd.goldfish.rc
ramdisk\ueventd.mt6735.rc
ramdisk\etc\*
ramdisk\license\*
ramdisk\res\*
ramdisk\sbin\*
ramdisk\supersu\*
ramdisk\twres\*
The ZTE Blade A410 is a good choice to port from, since it has the same chipset (MediaTek MT6735M), the same OS (Android 5.1) and is from the same manufacturer.
Unpack and copy files from twrp-3.0.2-0-dende.img (overwrite):
Code:
ramdisk\supersu\install-supersu.sh
ramdisk\twres\* [COLOR="Green"]<resolution width="480" height="800"/>[/COLOR]
Modify recovery.fstab, default.prop, init.rc and init.recovery.usb.rc (see KEY FILES below for details)
Repack recovery image with Carliv Image Kitchen
KEY FILES
recovery.fstab
Code:
[COLOR="Green"]# mount point fstype device [device2] [length=] [flags][/COLOR]
[COLOR="Green"]# Modified by xdarthanonx 12-04-2018[/COLOR]
[COLOR="Green"]# <https://goo.gl/oR5fsX> ZTE Blade A110[/COLOR]
[COLOR="Green"]# <https://goo.gl/Zs8LW5> How to compile TWRP[/COLOR]
/boot emmc /dev/block/platform/mtk-msdc.0/by-name/boot flags=backup=1;display="Boot"
/cache ext4 /dev/block/platform/mtk-msdc.0/by-name/cache flags=backup=0;wipeingui;wipeduringfactoryreset;display="Cache"
/data ext4 /dev/block/platform/mtk-msdc.0/by-name/userdata flags=backup=1;wipeingui;wipeduringfactoryreset;display="Data";length=-16384
/nvdata ext4 /dev/block/platform/mtk-msdc.0/by-name/nvdata flags=backup=1;display="NVData"
/protect_f ext4 /dev/block/platform/mtk-msdc.0/by-name/protect1 flags=backup=1;display="Protect_f"
/protect_s ext4 /dev/block/platform/mtk-msdc.0/by-name/protect2 flags=backup=1;display="Protect_s"
/recovery emmc /dev/block/platform/mtk-msdc.0/by-name/recovery flags=backup=1;display="Recovery"
/system ext4 /dev/block/platform/mtk-msdc.0/by-name/system flags=backup=1;display="System"
[COLOR="Green"]# Removable storage[/COLOR]
/external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=backup=0;wipeingui;removable;storage;display="Micro SDcard"
/sd-ext auto /dev/block/mmcblk1p2 flags=backup=1;wipeingui;removable;display="SD-Ext"
/usb-otg vfat /dev/block/sda1 /dev/block/sda flags=backup=0;wipeingui;removable;storage;display="USB-OTG"
FURTHER READING: How to compile TWRP touch recovery
default.prop
Code:
[COLOR="Green"]#[/COLOR]
[COLOR="Green"]# ADDITIONAL_DEFAULT_PROPERTIES[/COLOR]
[COLOR="Green"]#[/COLOR]
[COLOR="Green"]# Modified by xdarthanonx 02-02-2017[/COLOR]
[COLOR="Green"]# https://goo.gl/oR5fsX[/COLOR]
[COLOR="Green"]# Run adbd as root[/COLOR]
[COLOR="Purple"][I]ro.secure=0[/I][/COLOR]
[COLOR="Purple"][I]ro.debuggable=1[/I][/COLOR]
[COLOR="Purple"][I]ro.adb.secure=0[/I][/COLOR]
[COLOR="Purple"][I]persist.sys.usb.config=mtp,adb[/I][/COLOR]
persist.service.acm.enable=0
[COLOR="Purple"][I]ro.oem_unlock_supported=1[/I][/COLOR]
[COLOR="Purple"][I]ro.allow.mock.location=1[/I][/COLOR]
ro.zygote=zygote64_32
ro.mount.fs=EXT4
camera.disable_zsl_mode=1
dalvik.vm.dex2oat-Xms=64m
dalvik.vm.dex2oat-Xmx=512m
dalvik.vm.image-dex2oat-Xms=64m
dalvik.vm.image-dex2oat-Xmx=64m
ro.dalvik.vm.native.bridge=0
[COLOR="Green"]# begin build properties[/COLOR]
[COLOR="Green"]# autogenerated by buildinfo.sh[/COLOR]
ro.build.id=LMY47D
ro.build.display.id=BLADE_A110_M01
ro.build.version.incremental=1461832295
ro.build.version.sdk=22
ro.build.version.codename=REL
ro.build.version.all_codenames=REL
ro.build.version.release=5.1
ro.build.version.security_patch=2016-01-06
[COLOR="Purple"][I]ro.build.version.base_os=ZTE/P635A60_AU_OPT/ZTE_BLADE_A110:5.1/LMY47D/20160428.163242:user/test-keys[/I][/COLOR]
ro.build.inner.version=OPS_AU_S_P635A60V1.0.0B11
[COLOR="Purple"][I]ro.build.date=Thu Apr 28 16:33:28 CST 2016[/I][/COLOR]
ro.build.date.utc=1461832408
[COLOR="Purple"][I]ro.build.type=userdebug[/I][/COLOR]
ro.build.user=diganyun
ro.build.host=build4-ThinkCentre-M4500k-N000
[COLOR="Purple"][I]ro.build.tags=test-keys[/I][/COLOR]
[COLOR="Purple"][I]ro.build.flavor=full_ztehz6735m_65u_l-userdebug[/I][/COLOR]
ro.product.model=ZTE BLADE A110
ro.product.brand=ZTE
ro.product.name=P635A60_AU_OPT
ro.product.device=ZTE_BLADE_A110
ro.product.manufacturer=ZTE
ro.product.version.base_os=Android5.1
ro.product.board=
[COLOR="Purple"][I]#drm.forwardlock.only=true[/I][/COLOR]
[COLOR="Green"]# ro.product.cpu.abi and ro.product.cpu.abi2 are obsolete,[/COLOR]
[COLOR="Green"]# use ro.product.cpu.abilist instead.[/COLOR]
ro.product.cpu.abi=arm64-v8a
ro.product.cpu.abilist=arm64-v8a,armeabi-v7a,armeabi
ro.product.cpu.abilist32=armeabi-v7a,armeabi
ro.product.cpu.abilist64=arm64-v8a
ro.product.manufacturer=alps
ro.product.locale.language=en
ro.product.locale.region=AU
ro.wifi.channels=
ro.board.platform=mt6735m
[COLOR="Green"]# ro.build.product is obsolete; use ro.product.device[/COLOR]
ro.build.product=ztehz6735m_65u_l
[COLOR="Green"]# Do not try to parse description, fingerprint, or thumbprint[/COLOR]
[COLOR="Purple"][I]ro.build.description=full_ztehz6735m_65u_l-user 5.1 LMY47D 1461832295 test-keys[/I][/COLOR]
[COLOR="Purple"][I]ro.build.fingerprint=ZTE/P635A60_AU_OPT/ZTE_BLADE_A110:5.1/LMY47D/20160428.163242:user/test-keys[/I][/COLOR]
ro.build.characteristics=default
[COLOR="Green"]# end build properties[/COLOR]
[COLOR="Green"]#[/COLOR]
[COLOR="Green"]# from device/ztehz/ztehz6735m_65u_l/system.prop[/COLOR]
[COLOR="Green"]#[/COLOR]
[COLOR="Green"]#[/COLOR]
[COLOR="Green"]# system.prop for generic sdk[/COLOR]
[COLOR="Green"]#[/COLOR]
rild.libpath=mtk-ril.so
rild.libargs=-d /dev/ttyC0
[COLOR="Green"]# MTK, Infinity, 20090720 {[/COLOR]
wifi.interface=wlan0
[COLOR="Green"]# MTK, Infinity, 20090720 }[/COLOR]
[COLOR="Green"]# MTK, mtk03034, 20101210 {[/COLOR]
ro.mediatek.wlan.wsc=1
[COLOR="Green"]# MTK, mtk03034 20101210}[/COLOR]
[COLOR="Green"]# MTK, mtk03034, 20110318 {[/COLOR]
ro.mediatek.wlan.p2p=1
[COLOR="Green"]# MTK, mtk03034 20110318}[/COLOR]
[COLOR="Green"]# MTK, mtk03034, 20101213 {[/COLOR]
mediatek.wlan.ctia=0
[COLOR="Green"]# MTK, mtk03034 20101213}[/COLOR]
[COLOR="Green"]#[/COLOR]
wifi.tethering.interface=ap0
[COLOR="Green"]#[/COLOR]
ro.opengles.version=196608
wifi.direct.interface=p2p0
dalvik.vm.heapgrowthlimit=128m
dalvik.vm.heapsize=256m
[COLOR="Green"]# USB MTP WHQL[/COLOR]
ro.sys.usb.mtp.whql.enable=0
[COLOR="Green"]# Power off opt in IPO[/COLOR]
sys.ipo.pwrdncap=2
ro.sys.usb.storage.type=mtp,mass_storage
[COLOR="Green"]# USB BICR function[/COLOR]
ro.sys.usb.bicr=yes
[COLOR="Green"]# USB Charge only function[/COLOR]
ro.sys.usb.charging.only=yes
[COLOR="Green"]# audio[/COLOR]
ro.camera.sound.forced=0
ro.audio.silent=0
ro.zygote.preload.enable=0
[COLOR="Green"]# temporary enables NAV bar (soft keys)[/COLOR]
qemu.hw.mainkeys=1
ro.kernel.zio=38,108,105,16
[COLOR="Green"]#ro.kernel.qemu=1[/COLOR]
[COLOR="Green"]#ro.kernel.qemu.gles=0[/COLOR]
[COLOR="Green"]#ro.boot.selinux=disable[/COLOR]
[COLOR="Green"]# Disable dirty region for Mali[/COLOR]
debug.hwui.render_dirty_regions=false
ro.sf.lcd_density=240
[COLOR="Green"]# performance[/COLOR]
ro.mtk_perf_simple_start_win=1
ro.mtk_perf_response_time=1
[COLOR="Green"]#[/COLOR]
[COLOR="Green"]# ADDITIONAL_BUILD_PROPERTIES[/COLOR]
[COLOR="Green"]#[/COLOR]
[COLOR="Purple"][I]ro.com.android.dateformat=dd-MM-yyyy[/I][/COLOR]
ro.config.ringtone=Beauty.ogg
ro.config.notification_sound=Glow.ogg
ro.carrier=unknown
ro.config.alarm_alert=Alarm_Classic.ogg
dalvik.vm.heapgrowthlimit=128m
dalvik.vm.heapsize=256m
ro.mediatek.chip_ver=S01
ro.mediatek.version.release=ZTE_BLADE_A110
ro.mediatek.platform=MT6735
ro.telephony.sim.count=2
persist.radio.default.sim=0
persist.radio.multisim.config=ss
persist.md.perm.checked=to_upgrade
persist.gemini.sim_num=1
ro.gemini.smart_sim_switch=false
ril.specific.sm_cause=0
bgw.current3gband=0
ril.external.md=0
ro.btstack=blueangel
ro.sf.hwrotation=0
ril.current.share_modem=1
curlockscreen=1
ro.mediatek.gemini_support=false
persist.radio.fd.counter=15
persist.radio.fd.off.counter=5
persist.radio.fd.r8.counter=15
persist.radio.fd.off.r8.counter=5
drm.service.enabled=true
fmradio.driver.enable=1
ril.first.md=1
ril.flightmode.poweroffMD=1
ril.telephony.mode=0
dalvik.vm.mtk-stack-trace-file=/data/anr/mtk_traces.txt
mediatek.wlan.chip=CONSYS_MT6735
mediatek.wlan.module.postfix=_consys_mt6735
ril.radiooff.poweroffMD=0
ro.frp.pst=/dev/block/platform/mtk-msdc.0/by-name/frp
persist.sys.timezone=Australia/Sydney
ro.mediatek.version.branch=L1.MP3.EE.WFC.DEV
ro.mediatek.version.sdk=4
ro.mtk_audio_profiles=1
ro.mtk_audenh_support=1
ro.mtk_lossless_bt_audio=1
ro.mtk_besloudness_support=1
ro.mtk_bessurround_support=1
ro.mtk_bt_support=1
ro.mtk_wappush_support=1
ro.mtk_agps_app=1
ro.mtk_voice_ui_support=1
ro.mtk_voice_unlock_support=1
ro.mtk_voice_contact_support=1
ro.mtk_wlan_support=1
ro.mtk_ipo_support=1
ro.mtk_gps_support=1
ro.mtk_omacp_support=1
ro.mtk_search_db_support=1
ro.mtk_dialer_search_support=1
ro.mtk_dhcpv6c_wifi=1
ro.have_aacencode_feature=1
ro.mtk_fd_support=1
ro.mtk_oma_drm_support=1
ro.mtk_cta_drm_support=1
ro.mtk_widevine_drm_l3_support=1
ro.mtk_eap_sim_aka=1
ro.mtk_fm_recording_support=1
ro.mtk_audio_ape_support=1
ro.mtk_flv_playback_support=1
ro.mtk_send_rr_support=1
ro.mtk_emmc_support=1
ro.mtk_tetheringipv6_support=1
ro.mtk_phone_number_geo=1
ro.mtk_shared_sdcard=1
ro.mtk_enable_md1=1
ro.mtk_flight_mode_power_off_md=1
ro.mtk_pq_support=2
ro.mtk_miravision_support=1
ro.mtk_miravision_image_dc=1
ro.mtk_wifi_mcc_support=1
ro.mtk_sim_hot_swap=1
ro.mtk_thumbnail_play_support=1
ro.mtk_bip_scws=1
ro.mtk_world_phone=1
ro.mtk_world_phone_policy=0
ro.mtk_perfservice_support=1
ro.mtk_cta_set=1
ro.mtk_mobile_management=1
ro.mtk_antibricking_level=2
ro.mtk_cam_mfb_support=0
ro.mtk_lte_support=1
ro.mtk_cam_mav_support=1
ro.sim_refresh_reset_by_modem=1
ro.mtk_live_photo_support=1
ro.mtk_motion_track_support=1
ro.mtk_privacy_protection_lock=1
ro.mtk_bg_power_saving_support=1
ro.mtk_bg_power_saving_ui=1
ro.have_aee_feature=1
ro.sim_me_lock_mode=0
ro.mtk_ims_support=1
ro.mtk_voice_extension_support=1
wfd.dummy.enable=1
ro.mediatek.project.path=device/ztehz/ztehz6735m_65u_l
persist.mtk.wcn.combo.chipid=-1
service.wcn.driver.ready=no
ro.com.android.mobiledata=false
persist.radio.mobile.data=0,0
persist.meta.dumpdata=0
ro.mtk_md_sbp_custom_value=0x0
ro.setupwizard.mode=OPTIONAL
ro.com.google.gmsversion=5.1_r2
ro.com.google.clientidbase=android-zte
ro.com.google.clientidbase.ms=android-optus-au
ro.com.google.clientidbase.am=android-optus-au
ro.com.google.clientidbase.gmm=android-zte
ro.com.google.clientidbase.yt=android-zte
persist.sys.dalvik.vm.lib.2=libart.so
dalvik.vm.isa.arm64.features=default
dalvik.vm.isa.arm.features=default
net.bt.name=Android
dalvik.vm.stack-trace-file=/data/anr/traces.txt
init.rc
Code:
[COLOR="Green"]# Modified by xdarthanonx 16-04-2018[/COLOR]
[COLOR="Green"]# https://goo.gl/oR5fsX[/COLOR]
[COLOR="Purple"][I]import /init.recovery.logd.rc[/I][/COLOR]
[COLOR="Purple"][I]import /init.recovery.usb.rc[/I][/COLOR]
import /init.recovery.${ro.hardware}.rc
on early-init
[COLOR="Green"]# Apply strict SELinux checking of PROT_EXEC on mmap/mprotect calls.[/COLOR]
write /sys/fs/selinux/checkreqprot 0
[COLOR="Green"]# Set the security context for the init process.[/COLOR]
[COLOR="Green"]# This should occur before anything else (e.g. ueventd) is started.[/COLOR]
setcon u:r:init:s0
start ueventd
start healthd
[COLOR="Purple"][I]service set_permissive /sbin/permissive.sh[/I][/COLOR]
[COLOR="Purple"][I]oneshot[/I][/COLOR]
[COLOR="Purple"][I]seclabel u:r:recovery:s0[/I][/COLOR]
on init
export PATH /sbin:/system/bin
[COLOR="Purple"][I]export LD_LIBRARY_PATH .:/sbin[/I][/COLOR]
export ANDROID_ROOT /system
export ANDROID_DATA /data
export EXTERNAL_STORAGE /sdcard
symlink /system/etc /etc
[COLOR="Purple"][I]mkdir /boot[/I][/COLOR]
[COLOR="Purple"][I]mkdir /recovery[/I][/COLOR]
mkdir /sdcard
mkdir /system
mkdir /data
mkdir /cache
[COLOR="Purple"][I]#insmod /sec.ko[/I][/COLOR]
[COLOR="Purple"][I]#mknod /dev/sec c 182 0[/I][/COLOR]
[COLOR="Purple"][I]#chmod 0660 /dev/sec[/I][/COLOR]
mkdir /sideload
mount tmpfs tmpfs /tmp
chown root shell /tmp
chmod 0775 /tmp
write /proc/sys/kernel/panic_on_oops 1
write /proc/sys/vm/max_map_count 1000000
on fs
[COLOR="Purple"][I]#write /proc/bootprof "start mobicore (on fs)"[/I][/COLOR]
[COLOR="Purple"][I]#chmod 0600 /dev/mobicore[/I][/COLOR]
[COLOR="Purple"][I]#chown system system /dev/mobicore[/I][/COLOR]
[COLOR="Purple"][I]#chmod 0666 /dev/mobicore-user[/I][/COLOR]
[COLOR="Purple"][I]#chown system system /dev/mobicore-user[/I][/COLOR]
[COLOR="Purple"][I]## MobiCore Daemon Paths[/I][/COLOR]
[COLOR="Purple"][I]#export MC_AUTH_TOKEN_PATH /efs[/I][/COLOR]
[COLOR="Purple"][I]#start mobicore[/I][/COLOR]
[COLOR="Purple"][I]#write /proc/bootprof "start mobicore end (on fs)"[/I][/COLOR]
[COLOR="Purple"][I]mount pstore pstore /sys/fs/pstore[/I][/COLOR]
mkdir /dev/usb-ffs 0770 shell shell
mkdir /dev/usb-ffs/adb 0770 shell shell
mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
[COLOR="Purple"][I]on post-fs[/I][/COLOR]
[COLOR="Purple"][I]# Explicitly define login script for BusyBox shell (necessary)[/I][/COLOR]
[COLOR="Purple"][I]# https://is.gd/tqbRdv[/I][/COLOR]
[COLOR="Purple"][I]# https://is.gd/IFkWfh[/I][/COLOR]
[COLOR="Purple"][I]# https://is.gd/fOHomp[/I][/COLOR]
[COLOR="Purple"][I]export ENV /etc/profile[/I][/COLOR]
on boot
ifup lo
hostname localhost
domainname localdomain
class_start default
[COLOR="Green"]# Load properties from /system/ + /factory after fs mount.[/COLOR]
on load_all_props_action
load_all_props
on firmware_mounts_complete
rm /dev/.booting
[COLOR="Green"]# Mount filesystems and start core system services.[/COLOR]
on late-init
trigger early-fs
trigger fs
trigger post-fs
trigger post-fs-data
[COLOR="Green"]# Load properties from /system/ + /factory after fs mount. Place[/COLOR]
[COLOR="Green"]# this in another action so that the load will be scheduled after the prior[/COLOR]
[COLOR="Green"]# issued fs triggers have completed.[/COLOR]
trigger load_all_props_action
[COLOR="Green"]# Remove a file to wake up anything waiting for firmware[/COLOR]
trigger firmware_mounts_complete
trigger early-boot
trigger boot
on property:sys.powerctl=*
powerctl ${sys.powerctl}
service ueventd /sbin/ueventd
critical
seclabel u:r:ueventd:s0
service healthd /sbin/healthd -r
critical
seclabel u:r:healthd:s0
service recovery /sbin/recovery
[COLOR="Purple"][I]#seclabel u:r:recovery:s0[/I][/COLOR]
service adbd /sbin/adbd --root_seclabel=u:r:su:s0 --device_banner=recovery
disabled
socket adbd stream 660 system system
seclabel u:r:adbd:s0
[COLOR="Green"]# Always start adbd on userdebug and eng builds[/COLOR]
on property:ro.debuggable=1
[COLOR="Purple"][I]#write /sys/class/android_usb/android0/enable 0[/I][/COLOR]
[COLOR="Purple"][I]#write /sys/class/android_usb/android0/idVendor 0E8D[/I][/COLOR]
[COLOR="Purple"][I]#write /sys/class/android_usb/android0/idProduct 201C[/I][/COLOR]
[COLOR="Purple"][I]#write /sys/class/android_usb/android0/f_ffs/aliases adb[/I][/COLOR]
[COLOR="Purple"][I]#write /sys/class/android_usb/android0/functions adb[/I][/COLOR]
[COLOR="Purple"][I]#write /sys/class/android_usb/android0/enable 1[/I][/COLOR]
[COLOR="Purple"][I]#start adbd[/I][/COLOR]
[COLOR="Purple"][I]setprop service.adb.root 1[/I][/COLOR]
[COLOR="Green"]# Restart adbd so it can run as root[/COLOR]
on property:service.adb.root=1
write /sys/class/android_usb/android0/enable 0
restart adbd
write /sys/class/android_usb/android0/enable 1
[COLOR="Purple"][I]## Start Daemon (Registry directories should already be present)[/I][/COLOR]
[COLOR="Purple"][I]#service mobicore /system/bin/mcDriverDaemon -r /system/app/mcRegistry/020f0000000000000000000000000000.drbin -r /system/app/mcRegistry/05120000000000000000000000000000.drbin -r /system/app/mcRegistry/070b0000000000000000000000000000.drbin[/I][/COLOR]
[COLOR="Purple"][I]#user system[/I][/COLOR]
[COLOR="Purple"][I]#group system[/I][/COLOR]
[COLOR="Purple"][I]#class core[/I][/COLOR]
[COLOR="Purple"][I]#oneshot[/I][/COLOR]
init.recovery.usb.rc
Code:
[COLOR="Green"]# Modified by xdarthanonx 01-02-2017[/COLOR]
[COLOR="Green"]# https://goo.gl/oR5fsX[/COLOR]
[COLOR="Green"]# idVendor 0E8D (MTK/MediaTek)[/COLOR]
[COLOR="Green"]# idVendor 18D1 (Google)[/COLOR]
[COLOR="Green"]# idVendor 19D2 (ZTE)[/COLOR]
on fs
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 19D2
write /sys/class/android_usb/android0/idProduct 0306
write /sys/class/android_usb/android0/f_ffs/aliases adb
write /sys/class/android_usb/android0/functions mtp,adb
write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
write /sys/class/android_usb/android0/iProduct ${ro.product.model}
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
[COLOR="Green"]# Used to disable USB when switching states[/COLOR]
on property:sys.usb.config=none
stop adbd
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/bDeviceClass 0
on property:sys.usb.config=adb
stop adbd
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 19D2
write /sys/class/android_usb/android0/idProduct 0260
write /sys/class/android_usb/android0/functions adb
write /sys/class/android_usb/android0/enable 1
start adbd
on property:sys.usb.config=mass_storage,adb
stop adbd
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 19D2
write /sys/class/android_usb/android0/idProduct 1351
write /sys/class/android_usb/android0/functions mass_storage,adb
write /sys/class/android_usb/android0/enable 1
start adbd
on property:sys.usb.config=mtp,adb
stop adbd
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 19D2
write /sys/class/android_usb/android0/idProduct 0306
write /sys/class/android_usb/android0/functions mtp,adb
write /sys/class/android_usb/android0/enable 1
start adbd
on property:sys.usb.config=mtp,mass_storage,adb
stop adbd
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 19D2
write /sys/class/android_usb/android0/idProduct 2017
write /sys/class/android_usb/android0/functions mtp,mass_storage,adb
write /sys/class/android_usb/android0/enable 1
start adbd
FLASHING RECOVERY
The easiest way to flash the recovery image is by using a dedicated app, such as Flashify or Rashr. These apps can also back up current boot and recovery images.
Another method is to use fastboot:
Code:
C:\Users\xdarthanonx\Downloads\twrp>dir /b
[HIGHLIGHT]twrp_zte_a110[/HIGHLIGHT].img
C:\Users\xdarthanonx\Downloads\twrp>[COLOR="Blue"]adb reboot bootloader[/COLOR]
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
C:\Users\xdarthanonx\Downloads\twrp>[COLOR="Blue"]fastboot flash recovery[/COLOR] [HIGHLIGHT]twrp_zte_a110[/HIGHLIGHT][COLOR="Blue"].img[/COLOR]
target reported max download size of 134217728 bytes
sending 'recovery' (11908 KB)...
OKAY [ 1.197s]
writing 'recovery'...
OKAY [ 0.431s]
finished. total time: 1.630s
C:\Users\xdarthanonx\Downloads\twrp>[COLOR="Blue"]fastboot reboot[/COLOR] && [COLOR="Blue"]adb wait-for-device reboot recovery[/COLOR]
rebooting...
finished. total time: 0.003s
FURTHER READING
How to Install TWRP
How to Flash the TWRP Recovery Environment to Your Android Phone
FILE MD5 CHECKSUMS
stock_recovery.zip\recovery.img - 33A64159025FAD30996C07E8DB34E80C
twrp_zte_a110-20170208-0200.zip\recovery.img - 2D95A5BEE9A4486C2FA9764A3511C046
twrp_zte_a110-20180421-0409.zip\recovery.img - 261989A4C3D6B26B2E493FAC57233E0B
THANKS
TeamWin
@bluefirebird (Carliv Image Kitchen for Android and CarlivScreenshot)
@albertwesker17 (TWRP for ZTE Blade A410)
Kra1o5
@makers_mark (Recovery Screenshot)
RELEVANT LINKS
Official ROM - Indonesia (PT Tiphone Mobile Indonesia)
Official ROM - Thailand (DTAC)
UPDATE 23-04-2018
Added tzdata2017c to avoid "__bionic_open_tzdata: couldn't find any tzdata" errors:
Code:
ramdisk\system\usr\share\zoneinfo\tzdata
Modified init.rc to define login script for BusyBox shell:
Code:
on post-fs
export ENV /etc/profile
Added login script for BusyBox shell:
ramdisk\etc\profile
Code:
[COLOR="Green"]# /etc/profile: executed by the command interpreter for login shells.[/COLOR]
[COLOR="Green"]# System-wide profile file[/COLOR]
[COLOR="Green"]# Modified by xdarthanonx 21-04-2018[/COLOR]
[COLOR="Green"]# https://goo.gl/oR5fsX[/COLOR]
PATH=/sbin:/system/bin:/system/xbin
PS1=[COLOR="Purple"]'[$(date +%H:%M:%S)] \[email protected]:\w \$ '[/COLOR]
[B][COLOR="Blue"]export[/COLOR][/B] PATH PS1
[COLOR="Green"]# ALIASES[/COLOR]
[COLOR="Green"]# Alias substitution can be overridden by prefixing with a backslash[/COLOR]
[COLOR="Green"]# (e.g., \rm overrides alias rm='rm -i'). <https://is.gd/7kXd2I>[/COLOR]
[COLOR="Green"]# Interactive operation[/COLOR]
[B][COLOR="Blue"]alias[/COLOR][/B] rm=[COLOR="Purple"]'rm -i'[/COLOR]
[B][COLOR="Blue"]alias[/COLOR][/B] cp=[COLOR="Purple"]'cp -i'[/COLOR]
[B][COLOR="Blue"]alias[/COLOR][/B] mv=[COLOR="Purple"]'mv -i'[/COLOR]
[COLOR="Green"]# Directory listings[/COLOR]
[B][COLOR="Blue"]alias[/COLOR][/B] ll=[COLOR="Purple"]'ls -l'[/COLOR]
[B][COLOR="Blue"]alias[/COLOR][/B] la=[COLOR="Purple"]'ls -A'[/COLOR]
[B][COLOR="Blue"]alias[/COLOR][/B] lo=[COLOR="Purple"]'ls -Al'[/COLOR]
[B][COLOR="Blue"]alias[/COLOR][/B] lc=[COLOR="Purple"]'ls -Al --color=auto'[/COLOR] [COLOR="Green"]# Cygwin/mintty[/COLOR]
[B][COLOR="Blue"]alias[/COLOR][/B] dir=[COLOR="Purple"]'ls -Al --color=auto'[/COLOR] [COLOR="Green"]# Cygwin/mintty[/COLOR]
[COLOR="Green"]# Human readable format (e.g., 1K 243M 2G)[/COLOR]
[B][COLOR="Blue"]alias[/COLOR][/B] df=[COLOR="Purple"]'df -h'[/COLOR]
[B][COLOR="Blue"]alias[/COLOR][/B] du=[COLOR="Purple"]'du -h'[/COLOR]
[COLOR="Green"]# Miscellaneous[/COLOR]
[B][COLOR="Blue"]alias[/COLOR][/B] hd=[COLOR="Purple"]'hexdump -C'[/COLOR]
[B][COLOR="Blue"]alias[/COLOR][/B] gettz=[COLOR="Purple"]'getprop persist.sys.timezone'[/COLOR] [COLOR="Green"]# Get/set time zone[/COLOR]
[B][COLOR="Blue"]alias[/COLOR][/B] settz=[COLOR="Purple"]'setprop persist.sys.timezone'[/COLOR] [COLOR="Green"]# https://goo.gl/QSKLkn[/COLOR]
[COLOR="Green"]# FUNCTIONS[/COLOR]
[COLOR="Green"]# NB: Ash does not use 'function' command[/COLOR]
[COLOR="Green"]# <https://is.gd/25RNSD> POSIX syntax[/COLOR]
[COLOR="Green"]# <https://is.gd/2PmIYH> ash(1) man page[/COLOR]
[COLOR="Green"]# List directory contents in screen-size chunks[/COLOR]
lm () {
[B][COLOR="Blue"]ls[/COLOR][/B] -Al [B][COLOR="DarkOrange"][email protected][/COLOR][/B] | [B][COLOR="Blue"]more[/COLOR][/B]
}
[COLOR="Green"]# List directories[/COLOR]
ld () {
[B][COLOR="Blue"]ls[/COLOR][/B] -Al [B][COLOR="DarkOrange"][email protected][/COLOR][/B] | [B][COLOR="Blue"]grep[/COLOR][/B] ^d
}
[COLOR="Green"]# Print battery info[/COLOR]
getbatt () {
[B][COLOR="Blue"]echo[/COLOR][/B] [COLOR="Purple"]"CURRENT BATTERY STATE"[/COLOR]
[B][COLOR="Blue"]cat[/COLOR][/B] /sys/devices/platform/battery/power_supply/battery/uevent |
[B][COLOR="Blue"]grep[/COLOR][/B] -e [COLOR="Purple"]'STATUS='[/COLOR] \
-e [COLOR="Purple"]'HEALTH='[/COLOR] \
-e [COLOR="Purple"]'TECHNOLOGY='[/COLOR] \
-e [COLOR="Purple"]'CAPACITY='[/COLOR] \
-e [COLOR="Purple"]'BATT_VOL='[/COLOR] \
-e [COLOR="Purple"]'BATT_TEMP='[/COLOR] \
-e [COLOR="Purple"]'BATTERYAVERAGECURRENT='[/COLOR] \
-e [COLOR="Purple"]'CHARGERVOLTAGE='[/COLOR] |
[B][COLOR="Blue"]sed[/COLOR][/B] -e [COLOR="Purple"]'s/POWER_SUPPLY_/ /'[/COLOR] \
-e [COLOR="Purple"]'s/STATUS/Status/'[/COLOR] \
-e [COLOR="Purple"]'s/HEALTH/Health/'[/COLOR] \
-e [COLOR="Purple"]'s/TECHNOLOGY/Technology/'[/COLOR] \
-e [COLOR="Purple"]'s/CAPACITY/Level/'[/COLOR] \
-e [COLOR="Purple"]'s/BATT_VOL/Voltage/'[/COLOR] \
-e [COLOR="Purple"]'s/BATT_TEMP/Temperature/'[/COLOR] \
-e [COLOR="Purple"]'s/BATTERYAVERAGECURRENT/Current/'[/COLOR] \
-e [COLOR="Purple"]'s/CHARGERVOLTAGE/Charger voltage/'[/COLOR] \
-e [COLOR="Purple"]'s/=/: /'[/COLOR]
}
[COLOR="Green"]# Check and repair file systems[/COLOR]
fixfs () {
[B][COLOR="Blue"]umount[/COLOR][/B] -a -t ext2,ext3,ext4,vfat
[B][COLOR="Blue"]fsck.fat[/COLOR][/B] -aV /dev/block/mmcblk1p1 [COLOR="Green"]# SDcard[/COLOR]
[B][COLOR="Blue"]e2fsck[/COLOR][/B] -fpDC0 /dev/block/mmcblk1p2 [COLOR="Green"]# Link2SD partition[/COLOR]
[B][COLOR="Blue"]e2fsck[/COLOR][/B] -fpDC0 /dev/block/platform/mtk-msdc.0/by-name/cache
[B][COLOR="Blue"]e2fsck[/COLOR][/B] -fpDC0 /dev/block/platform/mtk-msdc.0/by-name/userdata
[B][COLOR="Blue"]e2fsck[/COLOR][/B] -fpDC0 /dev/block/platform/mtk-msdc.0/by-name/system
}

FAQ
Q: Why does my TWRP backup have lots of duplicate filenames with file contents such as:
Code:
50 RHT.security.selinux=u:object_r:system_file:s0
A: These files contain the security contexts of their namesakes:
Code:
C:\Windows\system32>adb shell
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
[email protected]_BLADE_A110:/ $ [B][URL="http://linuxcommand.org/man_pages/ls1.html"]ls -Z[/URL][/B] /system
ls -Z /system
drwxr-xr-x root root u:object_r:system_file:s0 app
drwxr-xr-x root shell u:object_r:system_file:s0 bin
-rw-r--r-- root root u:object_r:system_file:s0 build.prop
drwxr-xr-x root root u:object_r:system_file:s0 data
drwxr-xr-x root root u:object_r:system_file:s0 etc
drwxr-xr-x root root u:object_r:system_file:s0 fonts
drwxr-xr-x root root u:object_r:system_file:s0 framework
drwxr-xr-x root root u:object_r:system_file:s0 lib
drwxr-xr-x root root u:object_r:system_file:s0 lib64
drwx------ root root u:object_r:system_file:s0 lost+found
drwxr-xr-x root root u:object_r:system_file:s0 media
drwxr-xr-x root root u:object_r:system_file:s0 plugin
drwxr-xr-x root root u:object_r:system_file:s0 priv-app
drwxr-xr-x root root u:object_r:system_file:s0 readme
-rw-r--r-- root root u:object_r:system_file:s0 recovery-from-boot.bak
drwxr-xr-x root root u:object_r:system_file:s0 res
drwxr-xr-x root root u:object_r:system_file:s0 tts
drwxr-xr-x root root u:object_r:system_file:s0 usr
drwxr-xr-x root shell u:object_r:system_file:s0 vendor
drwxr-xr-x root shell u:object_r:system_file:s0 xbin
This is necessary because the tar archiving utility does not retain SELinux contexts.

Hi, just wanted to know where you can find the USB drivers for the Blade A110? I cannot locate it anywhere and cannot get ADB to see the device properly. Thanks

bchliu said:
Hi, just wanted to know where you can find the USB drivers for the Blade A110? I cannot locate it anywhere and cannot get ADB to see the device properly. Thanks
Click to expand...
Click to collapse
Connect the phone as a CD-ROM and run Setup.exe.

xdarthanonx said:
Connect the phone as a CD-ROM and run Setup.exe.
Click to expand...
Click to collapse
Thank you very much!! Finally got ADB working.. I'll follow your guide to root it as I really need to add extra languages back into the device somehow.
---------- Post added at 10:50 AM ---------- Previous post was at 10:10 AM ----------
I've followed all the steps and the screen on Step 5 does not show. Am I suppose to run the script from Mr.W0lf or what? Looks like only the busybox got copied across from the SDCard but the other things did not (debuggerd, su etc).

bchliu said:
I've followed all the steps and the screen on Step 5 does not show.
Click to expand...
Click to collapse
No, that image is just a place holder I've changed it to make the meaning clearer.

Can someone tell me what type of stock rom this comes with? I see some versions have a stock Android rom and others seem to have some type of OEM skin?

jnvdh06 said:
Can someone tell me what type of stock rom this comes with?
Click to expand...
Click to collapse
I think it's pretty close to standard Lollipop 5.1. GravityBox and other AOSP-based apps work fine.
I see some versions have a stock Android rom and [highlight]others seem to have some type of OEM skin?[/highlight]
Click to expand...
Click to collapse
I don't understand this question.

Updated recovery to build 20180421T0409
Added tzdata
Added shell profile /etc/profile
See post #2 for details.

Hi there - this seems to be the only active thread about the Blade A110.
I got 2 ZTE Blade L110 (like A110 but without LTE) from the grandma and the disk is completely full by the factory ROM and can't even install any update from the playstore.
So im looking to replace the ROM with something smaller and started researching.
In fact the only ROM i found is mentioned here in this thread and you also say that "any" stock 5.1 ROMs will work.
Can you specifiy that or link me to some compatible ROMs?
kind regards,
Tom

na_oida_voda said:
I got 2 ZTE Blade L110 (like A110 but without LTE) from the grandma and the disk is completely full by the factory ROM and can't even install any update from the playstore.
Click to expand...
Click to collapse
Have you done a factory reset? Cleared out the internal storage? The L110 has less storage capacity than the A110, but there should still be enough to work with.

Is the twrp version from this thread working on Blade L110 too? I got it rooted and want to flash it with flashify, but i'm afraid to brick something.

g2zer0 said:
Is the twrp version from this thread working on Blade L110 too? I got it rooted and want to flash it with flashify, but i'm afraid to brick something.
Click to expand...
Click to collapse
I don't know, just make a backup of your original recovery before trying.

Tested it, doesn't work on L110.
Stuck on Splash Screen when booting recovery.

g2zer0 said:
Tested it, doesn't work on L110.
Stuck on Splash Screen when booting recovery.
Click to expand...
Click to collapse
Oh well, re-flash your backup.

Hey xdarthanonx
Just wanted to say thanks for uploading these files. By flashing your recovery image I was able to debloat my system partiton by removing the vendor software and old versions of the Google apps, remove the Optus branding and replace the boot animation, give apps permission to write to the SD card and re-partition the eMMC to provide an extra 650MB for user data.
All in all, I don't think they are a bad little device, for something basic that cost $30 at a supermarket. Still totally usable but yet just slow enough to break the attention-suck from apps like facebook and instagram.
Haha anyway, cheers mate. Props to you. Good little project

pudes ayudarme a rootear un zte blade a320

Related

There's some interesting stuff in here

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

Star A2000 wifi problem

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

JB system.img, root, bloatware, power saving

I have downloaded and installed JB and made a script to root system.img with SuperSu, remove some Bloatware and install BusyBox.
for app in AccuweatherWidget.apk AccuweatherWidget_Main.apk AccuweatherWidget_Main.odex AccuweatherWidget.odex AllshareMediaServer.apk AllshareMediaServer.odex AllshareService.apk AllshareService.odex AnalogClockSimple.apk AnalogClockSimple.odex AnalogClockUnique.apk AnalogClockUnique.odex ChatON_MARKET.apk DigitalClock.apk DigitalClock.odex DualClockAnalog.apk DualClockAnalog.odex DualClockDigital.apk DualClockDigital.odex FmRadio.apk FmRadio.odex FotaClient.apk FotaClient.odex GoogleSearchWidget.apk GoogleSearchWidget.odex Kies.apk Kies.odex kieswifi.apk kieswifi.odex MediaUploader.apk Microbes.apk Microbes.odex MobileTrackerEngineTwo.apk MobileTrackerEngineTwo.odex MusicFX.apk MusicFX.odex MusicPlayer.apk MusicPlayer.odex PanningTryActually.apk PanningTryActually.odex PickUpTutorial.apk PickUpTutorial.odex PlusOne.apk PolarisViewer.apk SamsungApps.apk SamsungAppsUNA3.apk Samsungservice.apk SamsungWidget_ProgramMonitor.apk SamsungWidget_ProgramMonitor.odex sCloudBackupApp.apk sCloudBackupProvider.apk sCloudDataRelay.apk sCloudDataSync.apk sCloudSyncBrowser.apk sCloudSyncCalendar.apk sCloudSyncContacts.apk SecCalculator2.apk SecCalculator2.odex SecDownloadProviderUi.apk SecDownloadProviderUi.odex SecEmail.apk SecEmail.odex SecExchange.apk SecExchange.odex SecFileShareClient.apk SecFileShareClient.odex SecFileShareServer.apk SecFileShareServer.odex SecHTMLViewer.apk SecHTMLViewer.odex SecMiniDiary_WVGA.apk SecNoteMyFiles.apk SecNoteMyFiles.odex SNS.apk SPPPushClient_Prod.apk Street.apk Swype.apk SyncmlDM.apk Talk.apk talkback.apk VoiceSearchStub.apk voice_talk_U1.apk YahoonewsWidget.apk YahoonewsWidget.odex YahoostockWidget.apk YahoostockWidget.odex ; do
if [ -e "system/app/$app" ] || [ -h "system/app/$app" ] ; then
rm "system/app/$app"
fi
done
Is there more Bloatware that can be safely removed?
install -m 6755 ../UPDATE-SuperSU-v1.00/system/xbin/su system/xbin/
install -m 755 busybox system/bin/
for app in '[' '[[' ash awk base64 basename blkid bunzip2 bzcat bzip2 cal cat chat chattr chgrp chmod chown chroot chrt cksum clear comm cp crond crontab cut date dd depmod devmem df diff dirname dmesg dnsd dnsdomainname dos2unix du echo egrep env ether-wake expand expr fakeidentd fdflush fdformat fdisk fgrep find fold free freeramdisk fsck fsync ftpd ftpget ftpput getopt grep groups gunzip gzip hd head hexdump hostid hostname httpd hwclock id ifconfig ifenslave inetd inotifyd insmod install ionice iostat ip ipaddr ipcalc iplink iproute iprule iptunnel kill killall killall5 less ln logname losetup ls lsattr lsmod lsof lsusb lzop lzopcat md5sum microcom mkdir mkdosfs mke2fs mkfifo mkfs.ext2 mkfs.vfat mknod mkswap modinfo modprobe more mount mountpoint mt mv nameif nanddump nandwrite nc netstat nice nmeter nslookup ntpd od patch pgrep pidof ping ping6 pkill pmap powertop printenv printf ps pscan pwd rdate rdev readahead realpath renice reset rev rfkill rm rmdir rmmod route run-parts script scriptreplay sed seq setkeycodes setlogcons setsid sha1sum sha256sum sha3sum sha512sum showkey sleep smemcap sort split stat strings stty sum swapoff swapon sync sysctl tac tail tar tee telnet telnetd test tftp tftpd time timeout top touch tr traceroute traceroute6 tty ttysize tunctl umount uname uncompress unexpand uniq unix2dos unlzop unzip uptime usleep uudecode uuencode vconfig vi watch wc wget which who whoami whois xargs zcat ; do
[ -e "system/bin/$app" ] || ln -s busybox "system/bin/$app"
done
echo -e 'nameserver 8.8.4.4\nnameserver 8.8.8.8' >system/etc/resolv.conf
chmod 644 system/etc/resolv.conf
Power consumption of JB was initially very high, I brought it down quite a bit by
echo "dalvik.vm.execution-mode=int:jit" >>/system/build.prop
and at every boot:
echo noop >/sys/block/mmcblk0/queue/scheduler
echo noop >/sys/block/mmcblk0boot0/queue/scheduler
echo noop >/sys/block/mmcblk0boot1/queue/scheduler
echo noop >/sys/block/mmcblk1/queue/scheduler
echo conservative >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 50 >/sys/devices/system/cpu/cpufreq/conservative/down_threshold
echo 20 >/sys/devices/system/cpu/cpufreq/conservative/freq_step
Is there some rc.local equivalent I can place these commands?
I would also like to replace some stock apps (GMS_Maps.apk Gmail.apk GmsCore.apk Phonesky.apk YouTube.apk) in system.img with updated versions, but this causes the device not to boot with some DRM errors to be seen in logcat. Integrating these with Titanium Backup into the running system works fine.
Tom
Help you this thread?
http://forum.xda-developers.com/showthread.php?t=2135528
About that power comsumption scripts.
After you implemented it, were you able to play games like " six-guns" ?
Was the device lag-free?
install -m 6755 ../UPDATE-SuperSU-v1.00/system/xbin/su system/xbin/
install -m 755 busybox system/bin/
for app in '[' '[[' ash awk base64 basename blkid bunzip2 bzcat bzip2 cal cat chat chattr chgrp chmod chown chroot chrt cksum clear comm cp crond crontab cut date dd depmod devmem df diff dirname dmesg dnsd dnsdomainname dos2unix du echo egrep env ether-wake expand expr fakeidentd fdflush fdformat fdisk fgrep find fold free freeramdisk fsck fsync ftpd ftpget ftpput getopt grep groups gunzip gzip hd head hexdump hostid hostname httpd hwclock id ifconfig ifenslave inetd inotifyd insmod install ionice iostat ip ipaddr ipcalc iplink iproute iprule iptunnel kill killall killall5 less ln logname losetup ls lsattr lsmod lsof lsusb lzop lzopcat md5sum microcom mkdir mkdosfs mke2fs mkfifo mkfs.ext2 mkfs.vfat mknod mkswap modinfo modprobe more mount mountpoint mt mv nameif nanddump nandwrite nc netstat nice nmeter nslookup ntpd od patch pgrep pidof ping ping6 pkill pmap powertop printenv printf ps pscan pwd rdate rdev readahead realpath renice reset rev rfkill rm rmdir rmmod route run-parts script scriptreplay sed seq setkeycodes setlogcons setsid sha1sum sha256sum sha3sum sha512sum showkey sleep smemcap sort split stat strings stty sum swapoff swapon sync sysctl tac tail tar tee telnet telnetd test tftp tftpd time timeout top touch tr traceroute traceroute6 tty ttysize tunctl umount uname uncompress unexpand uniq unix2dos unlzop unzip uptime usleep uudecode uuencode vconfig vi watch wc wget which who whoami whois xargs zcat ; do
[ -e "system/bin/$app" ] || ln -s busybox "system/bin/$app"
done
echo -e 'nameserver 8.8.4.4\nnameserver 8.8.8.8' >system/etc/resolv.conf
chmod 644 system/etc/resolv.conf
Click to expand...
Click to collapse
What exactly does this part do ??
n2851991m said:
What exactly does this part do ??
Click to expand...
Click to collapse
Install busybox and DNS address
Sent from my GT-I9070 using xda app-developers app
Lol My bad
frapeti said:
Install busybox and DNS address
Sent from my GT-I9070 using xda app-developers app
Click to expand...
Click to collapse
Noticed the first 2 lines now
Well i am gonna put the first part ( remove bloatware ) in a script and run.
Already have latest busybox so that's not needed I guess.
Off to nandroid for backup....

I need help with the init.rc

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

Using NST with burned charge controller.

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.

Categories

Resources