M7350v1_en_gpl

This commit is contained in:
T
2024-09-09 08:52:07 +00:00
commit f9cc65cfda
65988 changed files with 26357421 additions and 0 deletions

View File

@ -0,0 +1,52 @@
#!/bin/sh
#
# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: DIAG + NMEA + MODEM (Android)
echo "Switching to composition number 0x9002"
if [ "$1" = "y" ]; then
num="1"
else
num="0"
fi
run_9x15() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9002 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo tty,smd > /sys/class/android_usb/android0/f_serial/transports
echo diag,serial > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
* )
run_9x15 &
;;
esac

View File

@ -0,0 +1,53 @@
#!/bin/sh
#
# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: DIAG + Audio [Android]
echo "Switching to composition number 0x901C"
if [ "$1" = "y" ]; then
num="1"
mode="hsic"
else
num="0"
mode="hsusb"
fi
run_9x15() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x901c > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo diag,audio > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
* )
run_9x15 &
;;
esac

View File

@ -0,0 +1,69 @@
#!/bin/sh
#
# Copyright (c) 2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: DIAG + ADB [Android]
echo "Switching to composition number 0x901D"
if [ "$1" = "y" ]; then
num="1"
else
num="0"
fi
run_9x15() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x901D > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo diag,adb > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android0/f_rndis_qc/wceis
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x901D > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo diag,adb > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android0/f_rndis/wceis
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
*9x15* )
run_9x15 &
;;
*9x25* )
run_9x25 &
;;
* )
run_9x15 &
;;
esac

View File

@ -0,0 +1,90 @@
#!/bin/sh
#
# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: DIAG + QMI_RMNET (Android)
echo "Switching to composition number 0x9021"
if [ "$1" = "y" ]; then
num="1"
else
num="0"
fi
run_9x15() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9021 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo smd,bam2bam > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,rmnet > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9021 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo smd,bam2bam_ipa > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,rmnet > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25_v2() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9021 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo qti,bam2bam_ipa > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,rmnet > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
*9x15* )
run_9x15 &
;;
*9x25* )
case `cat /sys/devices/soc0/revision` in
*1.0* )
run_9x25 &
;;
*2.* )
run_9x25_v2 &
;;
* )
run_9x25 &
;;
esac
;;
* )
run_9x15 &
;;
esac

View File

@ -0,0 +1,90 @@
#!/bin/sh
#
# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: DIAG + ADB + QMI_RMNET (Android)
echo "Switching to composition number 0x9022"
if [ "$1" = "y" ]; then
num="1"
else
num="0"
fi
run_9x15() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9022 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo SMD,BAM2BAM > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,adb,rmnet > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9022 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo SMD,BAM2BAM_IPA > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,adb,rmnet > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25_v2() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9022 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo QTI,BAM2BAM_IPA > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,adb,rmnet > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
*9x15* )
run_9x15 &
;;
*9x25* )
case `cat /sys/devices/soc0/revision` in
*1.0* )
run_9x25 &
;;
*2.* )
run_9x25_v2 &
;;
* )
run_9x25 &
;;
esac
;;
* )
run_9x15 &
;;
esac

View File

@ -0,0 +1,67 @@
#!/bin/sh
#
# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: RNDIS + ADB [Android]
echo "Switching to composition number 0x9024"
if [ "$1" = "y" ]; then
num="1"
else
num="0"
fi
run_9x15() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9024 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo rndis_qc,adb > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android0/f_rndis_qc/wceis
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9024 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo rndis,adb > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android0/f_rndis/wceis
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
*9x15* )
run_9x15 &
;;
*9x25* )
run_9x25 &
;;
* )
run_9x15 &
;;
esac

View File

@ -0,0 +1,90 @@
#!/bin/sh
#
# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: DIAG + ADB + MODEM + NMEA + QMI_RMNET + Mass Storage (Android)
echo "Switching to composition number 0x9025"
if [ "$1" = "y" ]; then
num="1"
else
num="0"
fi
run_9x15() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9025 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo smd,tty > /sys/class/android_usb/android0/f_serial/transports
echo SMD,BAM2BAM > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,adb,serial,rmnet,mass_storage > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9025 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo smd,tty > /sys/class/android_usb/android0/f_serial/transports
echo SMD,BAM2BAM_IPA > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,adb,serial,rmnet,mass_storage > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25_v2() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9025 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo smd,tty > /sys/class/android_usb/android0/f_serial/transports
echo QTI,BAM2BAM_IPA > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,adb,serial,rmnet,mass_storage > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
*9x15* )
run_9x15 &
;;
*9x25* )
case `cat /sys/devices/soc0/revision` in
*1.0* )
run_9x25 &
;;
*2.* )
run_9x25_v2 &
;;
* )
run_9x25 &
;;
esac
;;
* )
run_9x15 &
;;
esac

View File

@ -0,0 +1,90 @@
#!/bin/sh
#
# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: DIAG + MODEM + NMEA + QMI_RMNET + Mass Storage (Android)
echo "Switching to composition number 0x9026"
if [ "$1" = "y" ]; then
num="1"
else
num="0"
fi
run_9x15() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9026 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo smd,tty > /sys/class/android_usb/android0/f_serial/transports
echo SMD,BAM2BAM > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,serial,rmnet,mass_storage > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9026 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo smd,tty > /sys/class/android_usb/android0/f_serial/transports
echo SMD,BAM2BAM_IPA > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,serial,rmnet,mass_storage > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25_v2() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9026 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo smd,tty > /sys/class/android_usb/android0/f_serial/transports
echo QTI,BAM2BAM_IPA > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,serial,rmnet,mass_storage > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
*9x15* )
run_9x15 &
;;
*9x25* )
case `cat /sys/devices/soc0/revision` in
*1.0* )
run_9x25 &
;;
*2.* )
run_9x25_v2 &
;;
* )
run_9x25 &
;;
esac
;;
* )
run_9x15 &
;;
esac

View File

@ -0,0 +1,68 @@
#!/bin/sh
#
# Copyright (c) 2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: RNDIS + Mass Storage
echo "Switching to composition number 0x902A"
if [ "$1" = "y" ]; then
num="1"
else
num="0"
fi
run_9x15() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x902A > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo rndis_qc,mass_storage > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android0/f_rndis_qc/wceis
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x902A > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo rndis,mass_storage > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android0/f_rndis/wceis
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
*9x15* )
run_9x15 &
;;
*9x25* )
run_9x25 &
;;
* )
run_9x15 &
;;
esac

View File

@ -0,0 +1,68 @@
#!/bin/sh
#
# Copyright (c) 2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: RNDIS + ADB + Mass Storage
echo "Switching to composition number 0x902B"
if [ "$1" = "y" ]; then
num="1"
else
num="0"
fi
run_9x15() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x902B > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo rndis_qc,adb,mass_storage > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android0/f_rndis_qc/wceis
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x902B > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo rndis,adb,mass_storage > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android0/f_rndis/wceis
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
*9x15* )
run_9x15 &
;;
*9x25* )
run_9x25 &
;;
* )
run_9x15 &
;;
esac

View File

@ -0,0 +1,69 @@
#!/bin/sh
#
# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: RNDIS + DIAG [Android]
echo "Switching to composition number 0x902C"
if [ "$1" = "y" ]; then
num="1"
else
num="0"
fi
run_9x15() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x902C > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo rndis_qc,diag > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android0/f_rndis_qc/wceis
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x902C > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo rndis,diag > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android0/f_rndis/wceis
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
*9x15* )
run_9x15 &
;;
*9x25* )
run_9x25 &
;;
* )
run_9x15 &
;;
esac

View File

@ -0,0 +1,69 @@
#!/bin/sh
#
# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: RNDIS + DIAG + ADB [Android]
echo "Switching to composition number 0x902D"
if [ "$1" = "y" ]; then
num="1"
else
num="0"
fi
run_9x15() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x902D > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo rndis_qc,diag,adb > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android0/f_rndis_qc/wceis
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x902D > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo rndis,diag,adb > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android0/f_rndis/wceis
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
*9x15* )
run_9x15 &
;;
*9x25* )
run_9x25 &
;;
* )
run_9x15 &
;;
esac

View File

@ -0,0 +1,96 @@
#!/bin/sh
#
# Copyright (c) 2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: RNDIS + DIAG + MODEM + NMEA + QMI_RMNET + Mass Storage
echo "Switching to composition number 0x902E"
if [ "$1" = "y" ]; then
num="1"
else
num="0"
fi
run_9x15() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x902E > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo smd,tty > /sys/class/android_usb/android0/f_serial/transports
echo SMD,BAM2BAM > /sys/class/android_usb/android0/f_rmnet/transports
echo rndis_qc,diag,serial,rmnet,mass_storage > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android0/f_rndis_qc/wceis
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x902E > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo smd,tty > /sys/class/android_usb/android0/f_serial/transports
echo SMD,BAM2BAM_IPA > /sys/class/android_usb/android0/f_rmnet/transports
echo rndis,diag,serial,rmnet,mass_storage > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android0/f_rndis/wceis
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25_v2() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x902E > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo smd,tty > /sys/class/android_usb/android0/f_serial/transports
echo QTI,BAM2BAM_IPA > /sys/class/android_usb/android0/f_rmnet/transports
echo rndis,diag,serial,rmnet,mass_storage > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android0/f_rndis/wceis
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
*9x15* )
run_9x15 &
;;
*9x25* )
case `cat /sys/devices/soc0/revision` in
*1.0* )
run_9x25 &
;;
*2.* )
run_9x25_v2 &
;;
* )
run_9x25 &
;;
esac
;;
* )
run_9x15 &
;;
esac

View File

@ -0,0 +1,77 @@
#!/bin/sh
#
# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: DIAG + NMEA + MDM + MBIM [AMSS]
echo "Switching to composition number 0x9043"
if [ "$1" = "y" ]; then
num="1"
else
num="0"
fi
run_9x15() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9043 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo 239 > /sys/class/android_usb/android$num/bDeviceClass
echo 2 > /sys/class/android_usb/android$num/bDeviceSubClass
echo 1 > /sys/class/android_usb/android$num/bDeviceProtocol
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo tty,smd > /sys/class/android_usb/android0/f_serial/transports
echo diag,serial,usb_mbim > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9043 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo 239 > /sys/class/android_usb/android$num/bDeviceClass
echo 2 > /sys/class/android_usb/android$num/bDeviceSubClass
echo 1 > /sys/class/android_usb/android$num/bDeviceProtocol
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo tty,smd > /sys/class/android_usb/android0/f_serial/transports
echo diag,serial,usb_mbim > /sys/class/android_usb/android$num/functions
echo BAM2BAM_IPA > /sys/class/android_usb/android$num/f_usb_mbim/mbim_transports
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
*9x15* )
run_9x15 &
;;
*9x25* )
run_9x25 &
;;
* )
run_9x15 &
;;
esac

View File

@ -0,0 +1,69 @@
#!/bin/sh
#
# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: DIAG + ADB + DUN + QMI_RMNET1 + QMI_RMNET2 + QMI_RMNET3 + Mass Storage [Android]
echo "Switching to composition number 0x9046"
if [ "$1" = "y" ]; then
num="1"
else
num="0"
fi
run_9x15() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9046 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo smd > /sys/class/android_usb/android0/f_serial/transports
echo SMD,BAM2BAM,SMD,BAM2BAM,SMD,BAM2BAM > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,adb,serial,rmnet,mass_storage > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9046 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo smd > /sys/class/android_usb/android0/f_serial/transports
echo QTI,BAM2BAM_IPA,QTI,BAM2BAM_IPA,QTI,BAM2BAM_IPA > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,adb,serial,rmnet,mass_storage > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
*9x15* )
run_9x15 &
;;
*9x25* )
run_9x25 &
;;
* )
run_9x15 &
;;
esac

View File

@ -0,0 +1,55 @@
#!/bin/sh
#
# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: DIAG + DUN + QMI_RMNET1 + QMI_RMNET2 + QMI_RMNET3 + Mass Storage [Android]
echo "Switching to composition number 0x9047"
if [ "$1" = "y" ]; then
num="1"
else
num="0"
fi
run_9x15() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9047 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo smd > /sys/class/android_usb/android0/f_serial/transports
echo SMD,BAM2BAM,SMD,BAM2BAM,SMD,BAM2BAM > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,serial,rmnet,mass_storage > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
*9x15* )
run_9x15 &
;;
* )
run_9x15 &
;;
esac

View File

@ -0,0 +1,90 @@
#!/bin/sh
#
# Copyright (c) 2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: DIAG + ADB + DUN + RMNET + Mass Storage + QDSS [Android]
echo "Switching to composition number 0x9049"
if [ "$1" = "y" ]; then
num="1"
else
num="0"
fi
run_9x15() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9049 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo smd > /sys/class/android_usb/android0/f_serial/transports
echo SMD,BAM2BAM > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,adb,serial,rmnet,mass_storage,qdss > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9049 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo smd > /sys/class/android_usb/android0/f_serial/transports
echo SMD,BAM2BAM_IPA > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,adb,serial,rmnet,mass_storage,qdss > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25_v2() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9049 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo smd > /sys/class/android_usb/android0/f_serial/transports
echo QTI,BAM2BAM_IPA > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,adb,serial,rmnet,mass_storage,qdss > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
*9x15* )
run_9x15 &
;;
*9x25* )
case `cat /sys/devices/soc0/revision` in
*1.0* )
run_9x25 &
;;
*2.* )
run_9x25_v2 &
;;
* )
run_9x25 &
;;
esac
;;
* )
run_9x15 &
;;
esac

View File

@ -0,0 +1,54 @@
#!/bin/sh
#
# Copyright (c) 2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: DIAG + QDSS [Android]
echo "Switching to composition number 0x904A"
if [ "$1" = "y" ]; then
num="1"
else
num="0"
fi
run_9x25() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x904A > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo diag,qdss > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
*9x25* )
run_9x25 &
;;
* )
run_9x25 &
;;
esac

View File

@ -0,0 +1,90 @@
#!/bin/sh
#
# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: DIAG + ADB + SERIAL + RMNET + Mass Storage + Audio [Android]
echo "Switching to composition number 0x9056"
if [ "$1" = "y" ]; then
num="1"
else
num="0"
fi
run_9x15() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9056 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo smd > /sys/class/android_usb/android0/f_serial/transports
echo SMD,BAM2BAM > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,adb,serial,rmnet,mass_storage,audio > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9056 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo smd > /sys/class/android_usb/android0/f_serial/transports
echo SMD,BAM2BAM_IPA > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,adb,serial,rmnet,mass_storage,audio > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25_v2() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9056 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo smd > /sys/class/android_usb/android0/f_serial/transports
echo QTI,BAM2BAM_IPA > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,adb,serial,rmnet,mass_storage,audio > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
*9x15* )
run_9x15 &
;;
*9x25* )
case `cat /sys/devices/soc0/revision` in
*1.0* )
run_9x25 &
;;
*2.* )
run_9x25_v2 &
;;
* )
run_9x25 &
;;
esac
;;
* )
run_9x15 &
;;
esac

View File

@ -0,0 +1,68 @@
#!/bin/sh
#
# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: RNDIS : ECM
echo "Switching to composition number 0x9057"
if [ "$1" = "y" ]; then
num="1"
else
num="0"
fi
run_9x15() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9057 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo rndis_qc:ecm_qc > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android0/f_rndis_qc/wceis
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9057 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo rndis:ecm_qc > /sys/class/android_usb/android$num/functions
echo BAM2BAM_IPA > /sys/class/android_usb/android$num/f_ecm_qc/ecm_transports
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android0/f_rndis/wceis
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
*9x15* )
run_9x15 &
;;
*9x25* )
run_9x25 &
;;
* )
run_9x15 &
;;
esac

View File

@ -0,0 +1,70 @@
#!/bin/sh
#
# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: RNDIS+DIAG+ADB : ECM
echo "Switching to composition number 0x9059"
if [ "$1" = "y" ]; then
num="1"
else
num="0"
fi
run_9x15() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9059 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo rndis_qc,diag,adb:ecm_qc > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android0/f_rndis_qc/wceis
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9059 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo rndis,diag,adb:ecm_qc > /sys/class/android_usb/android$num/functions
echo BAM2BAM_IPA > /sys/class/android_usb/android$num/f_ecm_qc/ecm_transports
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android0/f_rndis/wceis
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
*9x15* )
run_9x15 &
;;
*9x25* )
run_9x25 &
;;
* )
run_9x15 &
;;
esac

View File

@ -0,0 +1,75 @@
#!/bin/sh
#
# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: DIAG+ADB+MBIM : ECM
echo "Switching to composition number 0x905A"
if [ "$1" = "y" ]; then
num="1"
else
num="0"
fi
run_9x15() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x905A > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo 239 > /sys/class/android_usb/android$num/bDeviceClass
echo 2 > /sys/class/android_usb/android$num/bDeviceSubClass
echo 1 > /sys/class/android_usb/android$num/bDeviceProtocol
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo diag,adb,usb_mbim:ecm_qc > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x905A > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo 239 > /sys/class/android_usb/android$num/bDeviceClass
echo 2 > /sys/class/android_usb/android$num/bDeviceSubClass
echo 1 > /sys/class/android_usb/android$num/bDeviceProtocol
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo diag,adb,usb_mbim:ecm_qc > /sys/class/android_usb/android$num/functions
echo BAM2BAM_IPA > /sys/class/android_usb/android$num/f_ecm_qc/ecm_transports
echo BAM2BAM_IPA > /sys/class/android_usb/android$num/f_usb_mbim/mbim_transports
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
*9x15* )
run_9x15 &
;;
*9x25* )
run_9x25 &
;;
* )
run_9x15 &
;;
esac

View File

@ -0,0 +1,72 @@
#!/bin/sh
#
# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: MBIM
echo "Switching to composition number 0x905b"
if [ "$1" = "y" ]; then
num="1"
else
num="0"
fi
run_9x15() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x905b > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo 239 > /sys/class/android_usb/android$num/bDeviceClass
echo 2 > /sys/class/android_usb/android$num/bDeviceSubClass
echo 1 > /sys/class/android_usb/android$num/bDeviceProtocol
echo usb_mbim > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x905b > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo 239 > /sys/class/android_usb/android$num/bDeviceClass
echo 2 > /sys/class/android_usb/android$num/bDeviceSubClass
echo 1 > /sys/class/android_usb/android$num/bDeviceProtocol
echo usb_mbim > /sys/class/android_usb/android$num/functions
echo BAM2BAM_IPA > /sys/class/android_usb/android$num/f_usb_mbim/mbim_transports
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
*9x15* )
run_9x15 &
;;
*9x25* )
run_9x25 &
;;
* )
run_9x15 &
;;
esac

View File

@ -0,0 +1,54 @@
#!/bin/sh
#
# Copyright (c) 2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: DIAG + QDSS + ADB
echo "Switching to composition number 0x9060"
if [ "$1" = "y" ]; then
num="1"
else
num="0"
fi
run_9x25() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9060 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo diag,qdss,adb > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
*9x25* )
run_9x25 &
;;
* )
run_9x25 &
;;
esac

View File

@ -0,0 +1,75 @@
#!/bin/sh
#
# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: RNDIS : ECM : MBIM
echo "Switching to composition number 0x9063"
if [ "$1" = "y" ]; then
num="1"
else
num="0"
fi
run_9x15() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9063 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo 239 > /sys/class/android_usb/android$num/bDeviceClass
echo 2 > /sys/class/android_usb/android$num/bDeviceSubClass
echo 1 > /sys/class/android_usb/android$num/bDeviceProtocol
echo rndis_qc:ecm_qc:usb_mbim > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android0/f_rndis_qc/wceis
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9063 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo 239 > /sys/class/android_usb/android$num/bDeviceClass
echo 2 > /sys/class/android_usb/android$num/bDeviceSubClass
echo 1 > /sys/class/android_usb/android$num/bDeviceProtocol
echo rndis:ecm_qc:usb_mbim > /sys/class/android_usb/android$num/functions
echo BAM2BAM_IPA > /sys/class/android_usb/android$num/f_ecm_qc/ecm_transports
echo BAM2BAM_IPA > /sys/class/android_usb/android$num/f_usb_mbim/mbim_transports
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android0/f_rndis/wceis
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
*9x15* )
run_9x15 &
;;
*9x25* )
run_9x25 &
;;
* )
run_9x15 &
;;
esac

104
system/core/usb/compositions/9064 Executable file
View File

@ -0,0 +1,104 @@
#!/bin/sh
#
# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: DIAG + ADB + MODEM + QMI_RMNET : ECM : MBIM
echo "Switching to composition number 0x9064"
if [ "$1" = "y" ]; then
num="1"
else
num="0"
fi
run_9x15() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9064 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo 239 > /sys/class/android_usb/android$num/bDeviceClass
echo 2 > /sys/class/android_usb/android$num/bDeviceSubClass
echo 1 > /sys/class/android_usb/android$num/bDeviceProtocol
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo smd > /sys/class/android_usb/android0/f_serial/transports
echo smd,bam2bam > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,adb,serial,rmnet:ecm_qc:usb_mbim > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9064 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo 239 > /sys/class/android_usb/android$num/bDeviceClass
echo 2 > /sys/class/android_usb/android$num/bDeviceSubClass
echo 1 > /sys/class/android_usb/android$num/bDeviceProtocol
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo smd > /sys/class/android_usb/android0/f_serial/transports
echo smd,bam2bam_ipa > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,adb,serial,rmnet:ecm:usb_mbim > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25_v2() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9064 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo 239 > /sys/class/android_usb/android$num/bDeviceClass
echo 2 > /sys/class/android_usb/android$num/bDeviceSubClass
echo 1 > /sys/class/android_usb/android$num/bDeviceProtocol
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo smd > /sys/class/android_usb/android0/f_serial/transports
echo qti,bam2bam_ipa > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,adb,serial,rmnet:ecm_qc:usb_mbim > /sys/class/android_usb/android$num/functions
echo BAM2BAM_IPA > /sys/class/android_usb/android$num/f_ecm_qc/ecm_transports
echo BAM2BAM_IPA > /sys/class/android_usb/android$num/f_usb_mbim/mbim_transports
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
*9x15* )
run_9x15 &
;;
*9x25* )
case `cat /sys/devices/soc0/revision` in
*1.0* )
run_9x25 &
;;
*2.* )
run_9x25_v2 &
;;
* )
run_9x25 &
;;
esac
;;
* )
run_9x15 &
;;
esac

View File

@ -0,0 +1,98 @@
#!/bin/sh
#
# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: Mass storage + QMI_RMNET : Mass Storage + MBIM
echo "Switching to composition number 0x9067"
if [ "$1" = "y" ]; then
num="1"
else
num="0"
fi
run_9x15() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9067 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo 239 > /sys/class/android_usb/android$num/bDeviceClass
echo 2 > /sys/class/android_usb/android$num/bDeviceSubClass
echo 1 > /sys/class/android_usb/android$num/bDeviceProtocol
echo smd,bam2bam > /sys/class/android_usb/android0/f_rmnet/transports
echo mass_storage,rmnet:mass_storage,usb_mbim > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9067 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo 239 > /sys/class/android_usb/android$num/bDeviceClass
echo 2 > /sys/class/android_usb/android$num/bDeviceSubClass
echo 1 > /sys/class/android_usb/android$num/bDeviceProtocol
echo smd,bam2bam_ipa > /sys/class/android_usb/android0/f_rmnet/transports
echo mass_storage,rmnet:mass_storage,usb_mbim > /sys/class/android_usb/android$num/functions
echo BAM2BAM_IPA > /sys/class/android_usb/android$num/f_usb_mbim/mbim_transports
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25_v2() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9067 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo 239 > /sys/class/android_usb/android$num/bDeviceClass
echo 2 > /sys/class/android_usb/android$num/bDeviceSubClass
echo 1 > /sys/class/android_usb/android$num/bDeviceProtocol
echo qti,bam2bam_ipa > /sys/class/android_usb/android0/f_rmnet/transports
echo mass_storage,rmnet:mass_storage,usb_mbim > /sys/class/android_usb/android$num/functions
echo BAM2BAM_IPA > /sys/class/android_usb/android$num/f_usb_mbim/mbim_transports
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
*9x15* )
run_9x15 &
;;
*9x25* )
case `cat /sys/devices/soc0/revision` in
*1.0* )
run_9x25 &
;;
*2.* )
run_9x25_v2 &
;;
* )
run_9x25 &
;;
esac
;;
* )
run_9x15 &
;;
esac

View File

@ -0,0 +1,81 @@
#!/bin/sh
#
# Copyright (c) 2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: DIAG + QDSS + RMNET
echo "Switching to composition number 0x9083"
if [ "$1" = "y" ]; then
num="1"
else
num="0"
fi
run_9x25() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9083 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo smd,bam2bam_ipa > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,qdss,rmnet > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25_v2() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9083 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo qti,bam2bam_ipa > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,qdss,rmnet > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
*9x15* )
echo "This composition is not supported in 9x15"
;;
*9x25* )
case `cat /sys/devices/soc0/revision` in
*1.0* )
run_9x25 &
;;
*2.* )
run_9x25_v2 &
;;
* )
run_9x25 &
;;
esac
;;
* )
run_9x25 &
;;
esac

View File

@ -0,0 +1,81 @@
#!/bin/sh
#
# Copyright (c) 2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: DIAG + QDSS + ADB + RMNET
echo "Switching to composition number 0x9084"
if [ "$1" = "y" ]; then
num="1"
else
num="0"
fi
run_9x25() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9084 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo smd,bam2bam_ipa > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,qdss,adb,rmnet > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25_v2() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9084 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo qti,bam2bam_ipa > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,qdss,adb,rmnet > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
*9x15* )
echo "This composition is not supported in 9x15"
;;
*9x25* )
case `cat /sys/devices/soc0/revision` in
*1.0* )
run_9x25 &
;;
*2.* )
run_9x25_v2 &
;;
* )
run_9x25 &
;;
esac
;;
* )
run_9x25 &
;;
esac

View File

@ -0,0 +1,77 @@
#!/bin/sh
#
# Copyright (c) 2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO
# EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# DESCRIPTION: DIAG+ADB+MBIM+GNSS
echo "Switching to composition number 0x9085"
if [ "$1" = "y" ]; then
num="1"
mode="hsic"
else
num="0"
mode="hsusb"
fi
run_9x15() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9085 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo 239 > /sys/class/android_usb/android$num/bDeviceClass
echo 2 > /sys/class/android_usb/android$num/bDeviceSubClass
echo 1 > /sys/class/android_usb/android$num/bDeviceProtocol
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo diag,adb,usb_mbim,gps > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android$num/enable
}
run_9x25() {
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9085 > /sys/class/android_usb/android$num/idProduct
echo 0x05C6 > /sys/class/android_usb/android$num/idVendor
echo 239 > /sys/class/android_usb/android$num/bDeviceClass
echo 2 > /sys/class/android_usb/android$num/bDeviceSubClass
echo 1 > /sys/class/android_usb/android$num/bDeviceProtocol
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo diag,adb,usb_mbim,gps > /sys/class/android_usb/android$num/functions
echo BAM2BAM_IPA > /sys/class/android_usb/android0/f_usb_mbim/mbim_transports
echo 1 > /sys/class/android_usb/android$num/remote_wakeup
echo 1 > /sys/class/android_usb/android$num/enable
}
case `source /usr/bin/usb/target` in
*9x15* )
run_9x15 &
;;
*9x25* )
run_9x25 &
;;
* )
run_9x15 &
;;
esac

View File

@ -0,0 +1,3 @@
#!/bin/sh
# DESCRIPTION: it is used to allow either hsic or hsusb to have no composition at all(must reboot to take effect).

View File

@ -0,0 +1 @@
0

View File

@ -0,0 +1 @@
9025