Dingoonity.org

General Gaming => Android Devices => Topic started by: furan on July 15, 2012, 12:27:44 pm

Title: YDPG18(A)/YDPG16: How to enable gamepad at boot without running Game Manager
Post by: furan on July 15, 2012, 12:27:44 pm
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.
Title: Re: YDPG18(A)/YDPG16: How to enable gamepad at boot without running Game Manager
Post by: Ashen on July 15, 2012, 04:28:46 pm
Works! Amazing job man, once again. ;)
Title: Re: YDPG18(A)/YDPG16: How to enable gamepad at boot without running Game Manager
Post by: furan on July 15, 2012, 07:37:54 pm
Works! Amazing job man, once again. ;)
Thanks!
Title: YDPG18(A)/YDPG16: How to enable gamepad at boot without running Game Manager
Post by: Pballwiz on July 18, 2012, 06:04:29 pm
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?
Title: Re: YDPG18(A)/YDPG16: How to enable gamepad at boot without running Game Manager
Post by: furan on July 18, 2012, 09:13:13 pm
Can you post your whole .rc file?
Title: YDPG18(A)/YDPG16: How to enable gamepad at boot without running Game Manager
Post by: Pballwiz on July 19, 2012, 05:14:06 am
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
Title: Re: YDPG18(A)/YDPG16: How to enable gamepad at boot without running Game Manager
Post by: furan on July 19, 2012, 06:14:20 am
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.
Title: Re: YDPG18(A)/YDPG16: How to enable gamepad at boot without running Game Manager
Post by: furan on July 19, 2012, 06:15:27 am
Actually you got this line wrong:

exec /system/bin/ioc 0x0 0x1
should be:
exec /system/bin/ioctl -d /dev/ioc 0x0 0x1
Title: YDPG18(A)/YDPG16: How to enable gamepad at boot without running Game Manager
Post by: Pballwiz on July 19, 2012, 01:59:11 pm
Thanks furan!
That worked perfectly!
Title: Re: YDPG18(A)/YDPG16: How to enable gamepad at boot without running Game Manager
Post by: XtremeLM on August 26, 2012, 06:59:46 am
Furan, could you cook a custom rom for 18A?   ;D