Alexandre Savard | a4f33d7 | 2012-08-29 17:03:23 -0400 | [diff] [blame] | 1 | #!/sytem/bin/sh |
| 2 | # |
| 3 | # Copyright (C) 2004-2012 Savoir-Faire Linux Inc. |
| 4 | # |
| 5 | # Author: Alexandre Savard <alexandre.savard@savoirfairelinux.com> |
| 6 | # |
| 7 | # This program is free software; you can redistribute it and/or modify |
| 8 | # it under the terms of the GNU General Public License as published by |
| 9 | # the Free Software Foundation; either version 3 of the License, or |
| 10 | # (at your option) any later version. |
| 11 | # |
| 12 | # This program is distributed in the hope that it will be useful, |
| 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | # GNU General Public License for more details. |
| 16 | # |
| 17 | # You should have received a copy of the GNU General Public License |
| 18 | # along with this program; if not, write to the Free Software |
| 19 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 20 | # |
| 21 | # Additional permission under GNU GPL version 3 section 7: |
| 22 | # |
| 23 | # If you modify this program, or any covered work, by linking or |
| 24 | # combining it with the OpenSSL project's OpenSSL library (or a |
| 25 | # modified version of that library), containing parts covered by the |
| 26 | # terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc. |
| 27 | # grants you additional permission to convey the resulting work. |
| 28 | # Corresponding Source for a non-source form of such a combination |
| 29 | # shall include the source code for the parts of OpenSSL used as well |
| 30 | # as that of the covered work. |
| 31 | # |
| 32 | |
| 33 | # Meant to be run on the target platform using adb shell |
| 34 | |
| 35 | mkdir /data/data/ok |
| 36 | |
| 37 | /system/bin/dbus-daemon --fork --print-pid --print-address --session > /data/data/dbus.info |
| 38 | |
| 39 | DBUS_ADDRESS_COMPLETE="" |
| 40 | while read line; |
| 41 | do |
| 42 | DBUS_ADDRESS_COMPLETE="$line" |
| 43 | done < "/data/data/dbus.info" |
| 44 | |
| 45 | IFS="," |
| 46 | set -- $DBUS_ADDRESS_COMPLETE |
| 47 | |
| 48 | DBUS_ADDRESS=$1 |
| 49 | DBUS_EXPORT="DBUS_SESSION_BUS_ADDRESS=$DBUS_ADDRESS" |
| 50 | |
| 51 | export $DBUS_EXPORT |
| 52 | |
| 53 | /system/bin/sflphoned -d -c & |