Author Topic: YDPG18(A)/YDPG16: How to enable gamepad at boot without running Game Manager  (Read 6739 times)

furan (OP)

  • Posts: 100
Yinlips' IOC driver waits for a specific IOCtl before enabling the gamepad. Game Manager sends it while a game is running, and sends another to disable it. To enable gamepad at boot just add the following to your /init.sun4i.rc file after "insmod /drv/ioc.ko":

 wait /dev/ioc
 exec /system/bin/ioctl -d /dev/ioc 0x0 0x1

 Note: the 0x bit is important, this will not work otherwise.

Ashen

  • Posts: 118
Works! Amazing job man, once again. ;)

furan (OP)

  • Posts: 100
Works! Amazing job man, once again. ;)
Thanks!

Pballwiz

  • Posts: 20
Doesn't seem to work for me. Wonder what I'm doing wrong. I copied and pasted "  wait /dev/ioc
 exec /system/bin/ioctl -d /dev/ioc 0x0 0x1 " as you directed. I did this in windows text editor and then copied it back to the device.
Any ideas?

furan (OP)

  • Posts: 100
Can you post your whole .rc file?

Pballwiz

  • Posts: 20
OK, Here it is:


on fs
mount ext4 /dev/block/nandc /system wait noatime nodev barrier=0

# try to mount /data
wait /dev/block/nandd
mount ext4 /dev/block/nandd /data wait noatime nosuid nodev barrier=0
setupfs /dev/block/nandd   
umount /data
exec /system/bin/logwrapper /system/bin/e2fsck -y /dev/block/nandd
exec /system/bin/busybox mount -t ext4 -o noatime,nosuid,nodev,noauto_da_alloc,barrier=0 /dev/block/nandd /data

# try to mount /cache
mount ext4 /dev/block/nandg /cache wait noatime nosuid nodev barrier=0
setupfs /dev/block/nandg
mount ext4 /dev/block/nandg /cache wait noatime nosuid nodev barrier=0
format_userdata MID-Flash

on boot
chown root root /system/xbin/su
chmod 6755 /system/xbin/su

chown system system /drv
chmod 0777 /drv   

#insmod key & tp driver
insmod /drv/ft5x_ts.ko
#   insmod /drv/goodix_touch.ko
#   insmod /drv/sun4i-ts.ko
#   insmod /drv/sun4i-keyboard.ko
#insmod key & tp driver
insmod /drv/sun4i-ts.ko
#   insmod /drv/sun4i-keyboard.ko
# insmod /drv/sun4i-ir.ko
insmod /drv/ioc.ko
wait /dev/ioc
exec /system/bin/ioc 0x0 0x1

# touch key
# insmod /drv/hv2605.ko

# insmod mali driver
insmod /drv/ump.ko
insmod /drv/mali.ko

# insmod vibrator   
#insmod /drv/sun4i-vibrator.ko
#chmod 777 /sys/class/timed_output/sun4i-vibrator/enable


# nano wifi module and firmware
chmod 0777 /drv/x_mac.axf




#csi module
insmod /drv/videobuf-core.ko
insmod /drv/videobuf-dma-contig.ko
insmod /drv/gc0308.ko
insmod /drv/gt2005.ko
insmod /drv/sun4i_csi1.ko
insmod /drv/sun4i_csi0.ko

#usb net module   
insmod /drv/usbnet.ko
insmod /drv/asix.ko
insmod /drv/rtl8150.ko
insmod /drv/qf9700.ko
insmod /drv/mcs7830.ko

# insmod gsensor driver
#   insmod /drv/bma250.ko
#insmod gsensor driver
insmod /drv/mecs.ko
insmod /drv/mxc622x.ko
mkdir /data/misc/sensors 0777 system system
mkdir /data/data/com.emulator.fpse/shared_prefs 0777 system system
# setprop ro.sf.hwrotation 0
service memsicd /system/bin/logwrapper /system/bin/memsicd
# oneshot
#init ethernet for adb debug
#service ipconfig /system/bin/sh /sbin/ipconfig.sh
#   oneshot

furan (OP)

  • Posts: 100
That is it exactly. Are you running Game Manager? Because Game Manager can still turn it off. Also is this on a YDPG18[A] or YDPG16? I didn't test on the 16.

furan (OP)

  • Posts: 100
Actually you got this line wrong:

exec /system/bin/ioc 0x0 0x1
should be:
exec /system/bin/ioctl -d /dev/ioc 0x0 0x1

Pballwiz

  • Posts: 20
Thanks furan!
That worked perfectly!

XtremeLM

  • Posts: 2
Furan, could you cook a custom rom for 18A?   ;D

 

Post a new topic