[Nexus 7 (2013) Original Android Development] solidxsnake13224:
flar2: I found Timur's USB-OTG driver implementation, and have ported it to your kernel. I've been using it for the past several weeks with great success. It is damn-near foolproof and stable on my in-dash Nexus7 install. Everything works as one would expect.

I've pushed the changes to my github @ https://github.com/solidxsnake/flo/tree/ElementalX-4.00

I don't imagine you'll need to change anything besides what I've added for later builds of the kernel, since the driver shouldn't change much of anything. You will, however, need to change the installer scripts/aroma config to reflect the new sysfs variables. My changes to those files are as follows:

-----------------------------boot/elementalx.sh-----------------------------
#this is changed from EX
#Set FASTCHARGE
if [ "`grep FC=1 $ELEX_CONF`" ]; then
echo 1 > /sys/kernel/usbhost/usbhost_fastcharge_in_host_mode
echo USB Fastcharge in Host Mode enabled >> $ELEX_LOGFILE;
else
echo 0 > /sys/kernel/usbhost/usbhost_fastcharge_in_host_mode
echo USB Fastcharge in Host Mode disabled >> $ELEX_LOGFILE;
fi

#this is added to EX, changed aroma config accordingly
#removed the OTG+Charge variables
#Set FIXED_INSTALL_MODE
if [ "`grep FI=1 $ELEX_CONF`" ]; then
echo 1 > /sys/kernel/usbhost/usbhost_fixed_install_mode
echo Fixed Installation Mode enabled >> $ELEX_LOGFILE;
else
echo 0 > /sys/kernel/usbhost/usbhost_fixed_install_mode
echo Fixed Installation Mode disabled >> $ELEX_LOGFILE;
fi

-----------------------------config/buildconfig.sh-----------------------------

#this is changed from EX
#USB Fastcharge
FC=`grep "item.0.1=" /tmp/aroma/mods.prop | cut -d '=' -f2`
echo -e "\n\n##### Fastcharge in Host Mode Settings ######\n# 1 to enable usb fastcharge\n# 0 to disable usb fastcharge\n" >> $CONFIGFILE
if [ $FC = 1 ]; then
echo "FC=1" >> $CONFIGFILE;
else
echo "FC=0" >> $CONFIGFILE;
fi

#this is added to EX, replaced the OTG+Charge variable
#Fixed Installation Mode
FI=`grep "item.0.3=" /tmp/aroma/mods.prop | cut -d '=' -f2`
echo -e "\n\n##### Fixed Installation Mode Settings ######\n# 1 to enable Fixed Installation Mode\n# 0 to disable Fixed Installation Mode\n" >> $CONFIGFILE
if [ $FI = 1 ]; then
echo "FI=1" >> $CONFIGFILE;
else
echo "FI=0" >> $CONFIGFILE;
fi

-----------------------------META-INF/com/google/android/aroma-config-----------------------------

#modified the fastcharge name, and replaced the OTG+charge setting with the Fixed Installation setting accordingly

"Other settings","<b>Select the mods you want to install</b>","@personalize","mods.prop",
"Enable USB Fastcharge in Host Mode","",0,
"Disable magnetic cover on/off","",0,
"Enable Fixed Installation mode","Allows charging in USB host mode (disables self-powered OTG)",0,

-----------------------------META-INF/com/google/android/updater-script-----------------------------

#changed the name for fastcharge, replaced OTG+charge with FI mode
if
file_getprop("/tmp/aroma/mods.prop","item.0.1") == "1"
then
ui_print("USB Fastcharge in Host Mode enabled");
endif;

if
file_getprop("/tmp/aroma/mods.prop","item.0.2") == "1"
then
ui_print("Magnetic on/off disabled");
endif;

if
file_getprop("/tmp/aroma/mods.prop","item.0.3") == "1"
then
ui_print("Fixed Installation mode enabled");
endif;

All of the variables should be able to be changed at run-time, no need to re-flash the kernel to change modes. I currently handle all the rest of the "features" Timur offers with Tasker scripts with no hiccups whatsoever. Hopefully this provides the car-install world a better alternative to Timur's ROM. For reference, I'm running SlimLP 5.1.1 with my modified branch of the EX kernel, and it's all running excellently :)