Skip to content

Commit

Permalink
AK: Support Felica
Browse files Browse the repository at this point in the history
  • Loading branch information
lawnn committed Jun 16, 2017
1 parent ba5c22a commit 47dc9fd
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 1 deletion.
13 changes: 12 additions & 1 deletion anykernel_boeffla/anykernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,18 @@ chmod -R 755 $ramdisk/res/bc
chmod -R 755 $ramdisk/res/misc

# ramdisk changes
# ... none

# Felica
insert_line init.qcom.rc "import init.carrier.rc" after "import init.qcom.usb.rc" "import init.carrier.rc";
replace_line ueventd.qcom.rc "/dev/felica 0660 mfc system" "/dev/felica 0666 root system";
replace_line ueventd.qcom.rc "/dev/felica_pon 0660 mfc system" "/dev/felica_pon 0666 root system";
replace_line ueventd.qcom.rc "/dev/felica_cen 0660 mfc felicalock" "/dev/felica_cen 0666 root system";
replace_line ueventd.qcom.rc "/dev/felica_rfs 0440 mfc system" "/dev/felica_rfs 0444 root system";
replace_line ueventd.qcom.rc "/dev/felica_rws 0660 mfc system" "/dev/felica_rws 0666 root system";
replace_line ueventd.qcom.rc "/dev/felica_ant 0660 mfc system" "/dev/felica_ant 0666 root system";
replace_line ueventd.qcom.rc "/dev/felica_int_poll 0400 mfc system" "/dev/felica_int_poll 0400 root system";
replace_line ueventd.qcom.rc "/dev/felica_uid 0220 mfc system" "/dev/felica_uid 0222 root system";
replace_line ueventd.qcom.rc "/dev/felica_uicc 0660 mfc system" "/dev/felica_uicc 0666 root system";

############### Ramdisk customization end ###############

Expand Down
54 changes: 54 additions & 0 deletions anykernel_boeffla/ramdisk/init.carrier.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# 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.
#

# Tmm Add Start
on init
export EXTERNAL_STORAGE_DOCOMO /storage/extSdCard

on post-fs-data
# FeliCa
exec /system/bin/sh /init.felica.sh

mkdir /efs/FeliCaLock 0770 system system
chown system system /efs/FeliCaLock/01
chmod 0660 /efs/FeliCaLock/01
chown system system /efs/FeliCaLock/02
chmod 0660 /efs/FeliCaLock/02

# Japan Add NFC Type Setting(Osaifu.cfg)
mkdir /data/misc/osaifu 0755 system system
chmod 644 /data/misc/osaifu/osaifu.cfg
chown system system /data/misc/osaifu/osaifu.cfg

# Fingerprint
mkdir /dev/validity 0770 system system

service mfsc /system/bin/mfsc
class core
user root
group system felicalock nfc
oneshot

service mfdp /system/bin/mfdp
class core
user root
group system felicalock nfc
oneshot

# JPN: For MobileTV [ISDBT] \android\device\samsung\kltedcm\init.kltedcm.rc
mkdir /data/one-seg 0775 system system
chown system system /data/one-seg
chmod 0777 /data/one-seg

chown system system /dev/isdbt
chmod 0666 /dev/isdbt

# JPN: For MobileTV [ISDBT] \android\device\samsung\kltedcm\init.kltedcm.rc
service mobileTV /system/bin/broadcastProcessObserver
class main
user system
group system radio audio camera graphics inet net_bt net_bt_admin net_raw sdcard_rw sdcard_r shell

21 changes: 21 additions & 0 deletions anykernel_boeffla/ramdisk/init.felica.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/system/bin/sh

#/sbin/setpropex ro.warranty_bit 0
#/sbin/setpropex ro.emmc_checksum 0

KBC_DATA_PATH=/data/media/0/kbc

CMDLINE_FILE=$KBC_DATA_PATH/cmdline
if [ -f $CMDLINE_FILE ]; then
FELICA_CMDLINE=`cat $CMDLINE_FILE`
echo "$FELICA_CMDLINE" > /proc/cmdline
exit 0
fi

FELICA_KEY_FILE=$KBC_DATA_PATH/felica_key
if [ -f $FELICA_KEY_FILE ]; then
FELICA_KEY=`cat $FELICA_KEY_FILE`
BASE_CMDLINE=`cat /proc/cmdline`
echo "cordon=$FELICA_KEY $BASE_CMDLINE" > /proc/cmdline
exit 0
fi

0 comments on commit 47dc9fd

Please sign in to comment.