[TOOLS] [LINUX, MAC, WINDOWS] Knives & Forks - v. 12.02.04

Search This thread

spleef

Senior Member
Jul 6, 2009
4,272
4,408
45
port arthur, texas
goo.im
am trying to install on ubuntu 11.10 inside virtual box in terminal it wont run the command for the linux script i get this

chmod:cannot access /home/username/knives-and-forks/Knives-and-Forks-Linux.sh no such file or directory
or it says
bash: /home/username/kaf/kafl.sh:permission denied (sorry abbreviated for time and space)
 

YarsRevenge78

Senior Member
Oct 23, 2006
226
250
45
Pittsburgh, PA
am trying to install on ubuntu 11.10 inside virtual box in terminal it wont run the command for the linux script...

I have updated the installation instructions. Please follow the updated instructions. If you are still having trouble, please reply and copy and paste the exact commands you typed, and the full output of the commands in a CODE block.

I think you may have a simple typo, but if I can see the exact command that you typed and the exact output, I can provide further assistance.

If you are using VirtualBox, make sure you install the Oracle VM VirtualBox Extension Pack (to enable support for USB 2.0), as well as the VirtualBox guest additions in your guest OS, and that you have your USB devices properly setup in the VM properties or you might have problems detecting your device.
 
Last edited:

Maximus_

New member
Jan 29, 2011
2
1
Not Working Mac OSX LION

Followed the instructions but besides the bumping app icon nothing happens.

Mac OSX version: 10.7.3
Knives and Forks version: 12.02.04
 
Last edited:

onlychevys

Senior Member
Jul 16, 2011
655
1,008
Azle Texas
Tested on OSX 10.6.3 and worked perfectly!!! And I'm super new to Mac and don't even like it. Selling this Mac Book soon.
 

Maximus_

New member
Jan 29, 2011
2
1
Not Working Mac OSX LION?

Been fiddling a little more, and it seems that app in Lion isn't linking properly or having some permission problems.

The good news tough: the script found in /knives-and-forks/script/mac/ (knives-and-Forks-Mac.scpt) is working and brings up the terminal. So with a little patchwork it should work for OSX Lion after all :)
 
  • Like
Reactions: theandrewbailey1

mDroidd

Senior Member
Aug 27, 2011
1,844
1,362
mappz-development.com
This is kinda useless for now..

For the ultra newbs it can be handy.

If you want to specify on linux, I will help

Sent from my Galaxy Nexus using Tapatalk 2 Beta-5
 

onlychevys

Senior Member
Jul 16, 2011
655
1,008
Azle Texas
This is kinda useless for now..

For the ultra newbs it can be handy.

If you want to specify on linux, I will help

Sent from my Galaxy Nexus using Tapatalk 2 Beta-5
Yes, not much use for this right now. But letting the op know what is working & what ain't is a good thing. Plus noob's can get up and going with adb etc. In my opinion Mac OSX really sucks! But thanks to diehappy it works on my Macbook. By the way, Macbook for sale LOL.
 

BLADESMAN1889

Senior Member
Jun 18, 2010
1,355
505
SHEFFIELD
Huawei Mate 20 X
** I am a complete noob ! :D **

So many thanx for the program/tutorial, I have been meaning to install adb for a long time now but never got past the downloading part due to the complex and many different guides. This was perfect for me as I can now get on and start learning.

Samsung Galaxy S [I9000] android 4.0.4
Windows 7 x64 [Sony Vaio]
Knives and Forks 04-02-12

Many Thanx again.
 
Last edited:

byakkotai

Member
Dec 20, 2009
18
2
64-bit Linux distros

Hi, for 64-bit Linux distros, users must install ia32libs in order to get this to work.

Hope this helps.
 

agat63

Inactive Recognized Developer
Sep 14, 2010
3,987
7,937
Las Vegas, NV
Was running perfect on 11.10 and after I updated to 12.04 still running flawlessly.
This is one "must have" tool IMHO.
 

ryancnap

Senior Member
Aug 3, 2012
231
25
Bloomsburg
ryancnap.net
Not working for me. Ubuntu 13.04, 64-bit. Device I'm attempting to connect is an m7att (AT&T HTC One). The adb reboot test does not reboot the device, and when running adb reboot the error returned is "device not found." There's another error received but it's not triggered during the script..it only shows up when my device has just been rebooted and plugged into the computer. It's an MTP error about not being able to mount the usb device. I've tried manually editing the android.rules file I created myself previously but no configuration works. Also tried installing an ubuntu package for MTP FUSE filesystem mounting, also does not help. If my device hasn't been freshly rebooted, nothing even shows up when I plug it in to the USB. Not using usb 3.0 either, and adb devices also returns an empty line under "List of attached devices." I hope this wasn't too much information, just wanted to let you know it didn't work but that it's most likely not due to your script. Anyways very nice tool, simplistic yet really handy.
 

unimatrix725

Senior Member
Apr 13, 2011
246
47
Big Stoned Gap, VA
Not working for me. Ubuntu 13.04, 64-bit. Device I'm attempting to connect is an m7att (AT&T HTC One). The adb reboot test does not reboot the device, and when running adb reboot the error returned is "device not found." There's another error received but it's not triggered during the script..it only shows up when my device has just been rebooted and plugged into the computer. It's an MTP error about not being able to mount the usb device. I've tried manually editing the android.rules file I created myself previously but no configuration works. Also tried installing an ubuntu package for MTP FUSE filesystem mounting, also does not help. If my device hasn't been freshly rebooted, nothing even shows up when I plug it in to the USB. Not using usb 3.0 either, and adb devices also returns an empty line under "List of attached devices." I hope this wasn't too much information, just wanted to let you know it didn't work but that it's most likely not due to your script. Anyways very nice tool, simplistic yet really handy.
Could you send me a copy of the script/tool? You can attach it or link it anywhere. I would be most grateful! I cannot get it from the main site. It seems the author has forgotten or moved on from the toolkit. I am running Linux Mint 16 "Petra x64". I will try it out when I get the kit and see what troubles I have and post back about that.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    Knives & Forks

    WHAT IS IT?
    Knives & Forks is a set of Android tools for everyone. Every operating system, every device.

    This cross-platform Android toolkit, written in Python, that is designed to work in Linux, Mac OS X or Windows. I wanted to create something that was unique, and offered a consistent and feature-filled set of tools for Android devs no matter what operating system they use, and for as many Android devices as possible.


    WHAT DOES IT DO?
    I just started work on this project, so it doesn't do very much yet. Right now we are just focusing on getting drivers and adb installed for as many devices as we can on all three platforms. Once we have adb working for everyone, the real fun can begin as we start to add more device tools that will make use of adb, such as rooting. Eventually ROM customization tools will be added, but we are focusing on device tools and cross-platform compatibility at this time.

    View the changelog to see a list of included drivers. The only device that I can confirm is compatible with this script in Linux, Mac OS X, and Windows is the Samsung Galaxy S II, Sprint Epic 4G Touch. This just so happens to be my personal phone, but as I gather feedback I will create an official list of supported devices.

    WHERE DO I GET IT?

    This project is now being hosted by the Android Creative Syndicate. An up to date link to the most current version of the script, installation instructions for Linux, Max OS , and Windows, and other information can be found HERE. Registration is not required at the ACS forum to download or view installation instructions. You are free to reply in the thread you are reading right now if you don't want to register for another forum.

    I HAVE IT INSTALLED, NOW WHAT?

    You should be able to open up your terminal application (or command prompt) and run some adb commands. In the future we will be automating adb commands for you, but for now you can try the following as a simple test:

    Code:
    adb reboot

    If everything worked, your Android device should reboot. For further reading on what you can do with adb you can read THIS PAGE.


    HOW TO SUPPORT THIS PROJECT

    • FEEDBACK

      Download my script, test it, let me know what happens. Let me know what other features/tools I should add.
    • THANKS

      Hit the thanks button if you like what I'm doing here.
    • DONATIONS - I don't currently have a link to send me money, but I could quickly set something up if somebody decides they want to help me feed my kid. I am recently unemployed, but I am not relying on my scripting skills to feed my family. Save your cash for a more worthy project, or tuck it away and wait until the project turns into something amazing.
    • INFORMATION

      TELL ME ABOUT YOUR ANDROID DEVICES!

      If my script isn't getting adb setup for your device, let me know where to download the correct Windows driver and/or what udev rules I need to add in Linux.

      The next phase of this project will be automating the rooting process. If you know the process for rooting your device, please share the details.

    HOW TO REPLY TO THIS THREAD

    Please do not reply by saying something like "This looks awesome, I'm going to download it now!".

    Just download it, test it out, and then tell me about it.

    If my script works for you, please don't post something like "It worked for me, this is the best thing since sliced bread!".

    At the moment all my script will do is install adb and drivers for your device. In order to test please uninstall any drivers you may have already installed, run my script, then reply with the following information:

    • Operating System (including version and 32-bit or 64-bit architecture)
    • Android Device
    • If you open up a terminal/command prompt window and enter the following command, does your device reboot? If not, do you receive any error messages (while running that command or at any phase of running the Kinves & Forks script)?

      Code:
      adb reboot
    2
    ATTENTION LINUX USERS:

    I am currently testing my Knives & Forks script in some virtual machines using VirtualBox, as well as my local Xubuntu installation.

    For distro specific things (installing 32-bit libs, udev changes, etc) in the next release I will be detecting the distro using the following code:

    Code:
    echo " -- DETECTING LINUX DISTRO --"
    
    if [ "`cat /etc/issue | grep Arch | wc -l`" == "1" ]; then
        DISTRO_NAME="Arch"
    elif [ "`cat /etc/issue | grep Cent | wc -l`" == "1" ]; then
        DISTRO_NAME="CentOS"
    elif [ "`cat /etc/issue | grep Debian | wc -l`" == "1" ]; then
        DISTRO_NAME="Debian"
    elif [ "`cat /etc/issue | grep Fedora | wc -l`" == "1" ]; then
        DISTRO_NAME="Fedora"
    elif [ "`cat /etc/issue | grep Ubuntu | wc -l`" == "1" ]; then
        # DETECTS UBUNTU, KUBUNTU, XUBUNTU, ETC
       DISTRO_NAME="Ubuntu"
    else
       DISTRO_NAME="UNKNOWN"
    fi
    
    echo " - $DISTRO_NAME"

    Please let me know what other distros your using and if you are able to find the name using the "/etc/issue" method I am using in the above if statements.

    I wrote a bash function to check if sudo is installed, and then to see if the current user has permissions to use sudo. If sudo is not installed, or if the current user does not have permission to use it, su will be used instead. This will be included in my next update, but I wanted to post it here first:

    Code:
    echo " -- CHECKING TO SEE IF 'SUDO' IS INSTALLED --"
    
    CURRENT_USER=$USER
    USE_SUDO="NO"
    
    if [ -f "/usr/bin/sudo" ]; then
         echo " - 'sudo' is installed."
         echo ""
         echo " -- CHECKING FOR PERMISSION TO USE 'SUDO' --"
         echo ""
         echo " If prompted, enter the password for the user '$CURRENT_USER'."
         echo ""
         if [ "$(sudo whoami)" != "root" ]; then
              echo ""
              echo " - Sorry, '$CURRENT_USER' does not have permission to use 'sudo'."
              echo " - 'su' will be uses instead of 'sudo'."
              echo ""
         else
              echo " - '$CURRENT_USER' has permission to use 'sudo'."
              USE_SUDO="YES"
              echo ""
         fi
    else
         echo " - 'sudo' is not installed."
         echo " - 'su' will be used instead of 'sudo'."
         echo ""
    fi
    
    DO_SU() 
    {
    echo ""
    if [ $USE_SUDO == "YES" ]; then
    #    echo " -- USING 'SUDO' TO RUN '$1' --"
        echo ""
        echo " If prompted, enter the password for the user '$CURRENT_USER'."
        echo ""
        sudo $1
    else
    #     echo " -- USING 'SU' TO RUN '$1' --"
         echo ""
         echo " If prompted, enter the password for the user 'root'."
         echo ""
         su -c "$1"
    fi
    echo ""
    }
    
    # EXAMPLE USAGE OF THE DO_SU() FUNCTION:
    # NOTE THAT THE COMMAND TO RUN WITH SU OR SUDO HAS TO BE IN QUOTES
    DO_SU "whoami"

    I also found out why debian users were being forced to use sudo or su in order to use adb. The next release will include this fix, but for those who might be interested in making this change manually:

    Open "/lib/udev/rules.d/91-permissions.rules" as root (su or sudo) in your favorite text editor and find this line

    Code:
    usbfs-like devices SUBSYSTEM==”usb”, ENV{DEVTYPE}==”usb_device”, \ MODE=”0664″

    Change MODE to "0666"

    Code:
    usbfs-like devices SUBSYSTEM==”usb”, ENV{DEVTYPE}==”usb_device”, \ [B]MODE=”0666“[/B]

    Instead of replacing or modifying your "/lib/udev/rules.d/91-permissions.rules" file, the next version of my script will actually create a "/lib/udev/rules.d/92-permissions.rules" for Debian users that contains only the following:

    Code:
    # usbfs-like devices
    SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", \
    				MODE="0666"

    This file will load right after the 91-permissions.rules and replace just the usbfs-like devices settings. I'm just doing this with my script so I don't accidently break anything on your system. If you are making the changes manually, editing the 91-permissions.rules file should be all you need to do.

    Save your changes and then restart udev as root (using sudo or su)

    Code:
    /etc/init.d/udev restart

    -- or --

    Code:
    service udev restart

    This assumes of course that you already have a working udev rule for your android device, and that adb is working only with su or sudo currently. Once this change is made you should be able to use adb without being forced to use su or sudo.
    1
    CHANGELOG

    Code:
    ------------------------------------------------------------------------------------
    Knives & Forks: Changelog
    ------------------------------------------------------------------------------------
    
    The most current version is available for download from: 
    http://knivesandforks.info/releases/knives-and-forks-current.php
    
    **** 12.02.04 ****
    
    http://knivesandforks.info/releases/knives-and-forks-12.02.04.php
    
    - LINUX CHANGES:
    
    	-- "python2" is now called by "Knives-and-Forks-Linux.sh" instead of "python" on Arch.
    	   - This prevents starting the script with Python 3, which results in errors.
    	-- Changes to "scripts/linux/install-adb-linux.sh":
    	   - "su" will be used if "sudo" is not installed, or user doesn't have permissions to use it.
    	   - Added 32-bit libs for more 64-bit distros:
    	     - Arch (new in this release)
    	     - CentOS (new in this release)
    	     - Debian
    	     - Fedora (new in this release)
    	     - Ubuntu, Kubuntu, Xubuntu
    	   - Added Debian version of '/etc/udev/rules.d/99-android.rules'
    	   - Added '/lib/udev/rules.d/92-permissions.rules' for Debian.
    	     This should fix permissions, allowing adb to run without sudo or su. 
    	     
    - WINDOWS CHANGES:
    
    	-- Fixed a couple of missing quotes which were breaking things under Windows XP
    	   - "%userprofile%" was coming back as "c:\documents" instead of "c:\documents and settings\username" in a couple of places
    	-- "c:\python27" is now the only directory where we look for python.exe
    	   - It is faster to download and install Python to "c:\Python27" than it is to search for it elsewhere.
    	   - This will also prevent issues where Python 3 was installed instead of Python 2, since the script currently gives errors under Python 3.
    	-- Updated amd64 and x86 versions of setx.exe for updating system PATH on XP/VISTA/7
         -- PATH is updated with adb.exe location after Python is installed.
         -- The computer will now reboot after updating the PATH, to make sure it will be updated before running the main program.
    
    **** 12.01.27 ****
    
    http://knivesandforks.info/releases/knives-and-forks-12.01.27.php
    
    - GENERAL CHANGES:
    
    	-- After adb is installed, adb will reset the android device by running "adb reboot" instead of displaying a list of attached devices with "adb devices".
    	   adb was occasionally reporting no devices were attached, when they infact were. When this happened "adb reboot" still worked, so it is a better test to see if adb is setup properly.
    	-- Friendlier messages during adb install and testing
    	-- Added a startup check to make sure the script is running from the correct directory
    	-- Removed empty Project directory, as it is not being used yet.
    
    - LINUX CHANGES:
    
    	-- Added support for "lxterminal" and "urxvt"  in "Knifes-and-Forks-Linux.sh"
    	-- Changed idVendors for Linux udev rules to lowercase instead of uppercase.
    
    - WINDOWS CHANGES:
    
    	-- Startup script searches for python in "C:\Program Files (x86)" then "C:\Program Files" and "c:\" last. 
    	-- Drivers should now install even if the language is not English
    	-- Added drivers for Casio C771 G'zOne Commando
    	-- Added LG drivers
    	-- Replaced setx.exe
    
    **** 12.01.25 ****
    
    http://knivesandforks.info/releases/knives-and-forks-12.01.25.php
    
    - Replaced "Knives-and-Forks-Mac.sh" with "Knives-and-Forks-Mac.app". 
      Starting the script on a Mac should now be as simple as double-clicking the new .app file.
    
    **** 12.01.24 ****
    
    http://knivesandforks.info/releases/knives-and-forks-12.01.24.php
    
    - Fixed a typo which caused the script to crash when viewing the credits screen.
    - Smarter python fix for Windows users.  
    	-- "C:\" and all sub-directories are searched for python.exe. 
    	-- If python is not not found, it will be downloaded from python.org and installed to c:\python27. 
    	-- If python is found (in "C:\python27", "c:\python", "c:\xyz123", "c:\program files\python27" or in any directory with any name anywhere on drive c:) the main menu script will launch.
    - Added changelog.txt to the release .zip file.
    
    **** 12.01.23 ****
    
    http://knivesandforks.info/releases/knives-and-forks-12.01.23.php
    
    - Minor update to fix Python installation for Windows users, which was causing the script not to launch.
    
    **** 12.01.22 ****
    
    (FIRST PUBLIC RELEASE)
    
    http://knivesandforks.info/releases/knives-and-forks-12.01.22.php
    
    - Added option to install adb & fastboot for Linux, Windows, Mac
    - Added Linux drivers for:
         -- ACER
         -- ASUS
         -- DELL
         -- FOXCONN
         -- GARMIN-ASUS
         -- Google
         -- Hisense
         -- HTC
         -- HUAWEI
         -- K-TOUCH
         -- KT Tech
         -- KYOCERA
         -- LENEVO
         -- LG
         -- MOTOROLA
         -- NEC
         -- NOOK
         -- NVIDIA
         -- OTGV
         -- PANTECH
         -- PEGATRON
         -- PHILIPS
         -- PMC-SIERRA
         -- QUALCOMM
         -- SK TELESYS
         -- SAMSUNG
         -- SHARP
         -- SONY ERICSSON
         -- TOSHIBA
         -- ZTE
    
    - Added Mac drivers for:
         -- Nothing. According to Google, "It just works." Let me know if they are right.
    
    - Added a custom Windows installer with drivers for:
         -- GOOGLE
         -- HTC
         -- HUAWEI
         -- SAMSUNG
    1
    ATTENTION PYTHON PROGRAMMERS:

    Any idea on what I can do to make the Python files work in Python 2 and Python 3? I have only tested in Python 2.7.2, but I have received reports that Python 3 gives errors. I'm not really doing anything all that fancy, so I'm not sure if something is just a matter or new syntax or something else needs to be imported or what. Any help would be appreciated.

    The next release will call "python2" for Arch Linux users since "python" will use python 3.
    1
    First post updated with latest release, version 12.02.04.

    Lots of changes for XP and various Linux distros. See changelog for more information, but things should work better in Arch, CentOS, Debian, Fedora, and Ubuntu (including Kubuntu, Xubuntu, etc).