WHAT IS IT?
Knives & Forks is a set of Android tools for everyone. Every operating system, every device.
This is a 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.
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
Last edited by DieHappy; 02-29-2012 at 01:28 AM.
HOW DO I INSTALL IT?
First, make sure you know the procedures to decompress .zip files, create/rename/delete directories (aka folders), and open up a terminal (aka command prompt) window in your operating system of choice.
I know some of you are trying to run my script as you adjust to a new operating system, so I may post some instructions on these basic tasks at a later date. For now, make sure your comfortable with doing the above listed tasks before downloading and installing my script.
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.
These simple tips could prevent endless hours of head scratching. Trust me, I'm bald.
DOWNLOAD CURRENT VERSION: 12.02.04
MAC OS X
This was tested on Mac OS X 10.7.2. Please report your success or any errors you have running this on other versions.
- Unzip to "/Users/INSERT-YOUR-USERNAME-HERE/knives-and-forks/"
NOTE: REPLACE "INSERT-YOUR-USERNAME-HERE" WITH YOUR COMPUTER USERNAME.
FOR EXAMPLE, I WOULD UNZIP THE FILE TO: "/Users/DieHappy/knives-and-forks/"
NOTE: MAKE SURE THE DIRECTORY NAME IS SIMPLY "knives-and-forks".
DO NOT INCLUDE THE VERSION NUMBER IN THE FILE NAME FOR THE .ZIP FILE YOU DOWNLOADED.
- Open Finder to "/Users/INSERT-YOUR-USERNAME-HERE/knives-and-forks/"
- Double-Click "/Users/INSERT-YOUR-USERNAME-HERE/knives-and-forks/Knives-and-Forks-Mac.app"
- You should see the Knives and Forks Main Menu in the Terminal window.
LINUX
This was tested on Ubuntu 11.10 and Xubuntu 11.10. Please report your success or any errors you have running this on other versions or Linux distros.
- Unzip to "/home/INSERT-YOUR-USERNAME-HERE/knives-and-forks/"
NOTE: REPLACE "INSERT-YOUR-USERNAME-HERE" WITH YOUR COMPUTER USERNAME.
FOR EXAMPLE, I WOULD UNZIP THE FILE TO: "/home/DieHappy/knives-and-forks/"
NOTE: MAKE SURE THE DIRECTORY NAME IS SIMPLY "knives-and-forks".
DO NOT INCLUDE THE VERSION NUMBER IN THE FILE NAME FOR THE .ZIP FILE YOU DOWNLOADED.
- Open Terminal
- Change the permissions to executable for "Knives-and-Forks-Linux.sh" by typing this into the Terminal window, then pressing [ENTER]:
NOTE: "~" is a shortcut so you don't have to type "/home/INSERT-YOUR-USERNAME-HERE/"Code:chmod +x ~/knives-and-forks/Knives-and-Forks-Linux.sh
- Change to the "knives-and-forks" dir by typing the following in the Terminal window, then pressing [ENTER]:
Code:cd ~/knives-and-forks- Run "Knives-and-Forks.sh" by typing the following in the Terminal window, then pressing [ENTER]:
NOTE: DON'T FORGET TO TYPE "./" BEFORE THE FILE NAME.Code:./Knives-and-Forks-Linux.sh
THIS TELLS LINUX TO RUN THE SCRIPT IN THE CURRENT DIRECTORY.
TYPING JUST THE FOLLOWING WOULD RESULT IN AN ERROR:
Code:Knives-and-Forks-Linux.sh- You should see the Knives and Forks Main Menu in a new Terminal window.
Windows
This was tested on Winows 7 Pro x64. Please report your success or any errors you have running this on other versions.
- Unzip to your user profile directory
-- Vista, 7, Server 2008, Server 2008 R2: "c:\Users\INSERT-YOUR-USERNAME-HERE\knives-and-forks\"
-- 2000, XP, Server 2003: "c:\Documents & Settings\INSERT-YOUR-USERNAME-HERE\knives-and-forks\"
NOTE: REPLACE "INSERT-YOUR-USERNAME-HERE" WITH YOUR COMPUTER USERNAME.
FOR EXAMPLE, IN WINDOWS 7 I WOULD UNZIP THE FILE TO: "c:\Users\DieHappy\knives-and-forks\"
NOTE: MAKE SURE THE DIRECTORY NAME IS SIMPLY "knives-and-forks".
DO NOT INCLUDE THE VERSION NUMBER IN THE FILE NAME FOR THE .ZIP FILE YOU DOWNLOADED.
- Run "c:\Users\INSERT-YOUR-USERNAME-HERE\knives-and-forks\Knives-and-Forks-Windows.cmd"
- Python will automatically be downloaded and installed for you.
- Once python is installed, you should see the Knives and Forks Main Menu in the command prompt window.
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 rebooting your device via adb by opening up a terminal (or command prompt) window, then typing the following, then pressing [ENTER]:
NOTE: AT THIS STAGE, YOU SHOULD ONLY NEED TO RUN THE KNIVES & FORKS SCRIPT ONCE TO INSTALL DRIVERS AND GET ADB WORKING. ONCE SETUP IS COMPLETE, YOU CAN RUN ADB COMMANDS AS SOON AS YOU OPEN UP YOUR TERMINAL/COMMAND PROMPT WINDOW.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.
Last edited by DieHappy; 02-29-2012 at 01:33 AM.
Code:**** 12.02.04 **** - 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 **** - 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 **** - 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 **** - 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 **** - Minor update to fix Python installation for Windows users, which was causing the script not to launch. **** 12.01.22 **** (FIRST PUBLIC RELEASE) - 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
Last edited by DieHappy; 02-28-2012 at 11:25 PM.
I installed this on Windows 7 Ultimate x86, all went smooth except it hung on updating system path. After a minute or so, I closed out and re-ran the cmd and got to the menu. I have tested out several commands and all run fine. Just a note in case someone else comes across the same issue.
Another note: To run adb commands and such, do not run the Knives-and-Forks-Windows.cmd that was in the zip, after everything is finished on the initial setup, go to the Start Menu and type "cmd" in the run box, then enter your adb commands. No need to change directories, just run the commands.
Last edited by LoneStar; 02-28-2012 at 10:20 PM.
If you open up a fresh command prompt window, can you run "adb" or does it give an error that it can't find the file?
If it runs, than the path was updated even though it hung, if it can't find it than setx must have crashed when it was trying to update the path. This may be the result of the version of setx I am including.
What I think I will do in the next release is check to see if the Windows version is 2K or XP, and use my included setx.exe. Vista and 7 have setx.exe by default, it isn't a secondary download anymore. I'll update the script to use the Vista or 7 exe if it is present instead of what I'm doing now, which is checking to see if the system is 32-bit or 64-bit and running the correct setx.exe that I included.
Last edited by DieHappy; 02-28-2012 at 11:21 PM.
For the time being, yes. All the script does currently is get your drivers installed and get adb in your path so you can simply open up a terminal or command prompt window and start using adb right away.
Eventually it will automate more stuff using adb, but for now all it will do it get you setup to use adb from your terminal/command prompt.
hello,
i'm trying to get the script working for my HTC incredible S (AKA vivo) on my Kubuntu (32 bit) but all I can get from the scritpt is:
┌───< MYUSERID >────| 10:53 |────< ~/knives-and-forks >
└───> ./Knives-and-Forks-Linux.sh
ERROR: UNKNOWN TERMINAL PROGRAM
thanks in advance
Thank you so much for this. The script works well except for one little issue:Code:urxvt: unable to parse '#575507b', using pink instead.
This has been tested on Linux Mint 13 Maya (Cinnamon) and works great. Thanks.
Worked fine for me on
Ubuntu-Studio 12.04 64-bit (with MATE-Desktop)
Wildfire S (Marvel * Unlocked Bootloader * Unofficial Cyanogenmod 7.something)
Thanks a lot!!!
Only the automated reboot test did not work. Obviously because it doesn't start the adb-server with sudo. In the terminal with sudo it worked fine.