Android OS Forum banner
1 - 20 of 66 Posts

·
Developer
Joined
·
194 Posts
Mod Type:: Script

Difficulty:: Easy

Mod Status:: Stable

Apply In:: Other (See Description)

Carrier:: N/A

Requires Root:: No

Source::
ANDADB 2.1 FOR GALAXY NEXUS

I've redesigned my script specifically for the Galaxy Nexus with more features for Ubuntu and Nautilus. This new version has a few different features that you can choose to install or just do a normal installation of my script like you would have before to get adb working on your system. The feature list of my script as it stands in version 2.1 is as follows:
  • Install the latest version of Android SDK (/usr/local/android-sdk)
  • Install the latest version of Android NDK (/usr/local/android-ndk
  • Automatically install and symlink adb and fastboot.
  • Nautilus right-click to adb push support with multiple push at once (up to 100 files at a time, more than 100 will error out the counter but should still push).
    • adb install APKs
    • adb push to ... (prompts for location)
    • Azure Rectangle Font Screenshot Parallel
    • adb push to Download
    • adb push to Movies
    • adb push to Music
    • adb push to Pictures
    • adb push to SDCard
  • MTP Support
    • Use android-connect in terminal to connect the device to /home/username/GalaxyNexus
      • BUG: If folder already exists, you may have to delete it first or run android-disconnect
    • Use android-disconnect in terminal to remove the device and delete /home/username/GalaxyNexus folder
  • Install apktool and aapt and create a symlink for both of them.
  • Install git-repo (/usr/local/bin/repo)
    • NOTE: This requires Python2 and will not work with Python 3.
INSTALLATION INSTRUCTIONS
Download my script from either Github (click download at the top) or Dropbox.

Github Installation Instructions
Open terminal and navigate to the folder that you saved it in and then type the following:
Code:
<br />
tar -zxvf gistfilename.tar.gz<br />
cd gistfilename<br />
chmod +x andadb.sh<br />
./andadb.sh<br />
Dropbox Installation Instructions
Open terminal and navigate to the folder that you downloaded the script from and type:
Code:
<br />
chmod +x andadb.sh<br />
./andadb.sh<br />
Computer Personal computer Font Screenshot Software


At this point, you will be brought to a menu that lets you choose what you will want to install. I suggest that you run them in order. If you don't want nautilus right-click to push, MTP support, apktools, or git-repo then you can ignore them. You can also come back and install any of them at another point in time. One word of warning; when you're resolving your dependencies (#1) it can take about 30 minutes to do depending on how fast of a connection you have to the Ubuntu repository.

A picture of the GUI options:
Font Electronic device Display device Software Rectangle


Nautilus being run from terminal so that you can see a mass adb push working:
Computer Personal computer Output device Font Screenshot
 

Attachments

·
Kitten Punter
Joined
·
2,808 Posts
Script works great. I used it the other day when I setup Ubuntu
 

·
Developer
Joined
·
194 Posts
Discussion Starter · #5 ·
Can't thank from my phone, but will add it when I get on my desktop. Hopefully this works with Mint 12! Thanks!

Sent from my Galaxy Nexus using RootzWiki
It *should* work on Mint 12, since Ubuntu and Mint share repositories. Aside from #1 and #5 being an issue, the rest are completely distribution independent and can be run on any Linux distro that meet the package requirements since they use wget to fetch the files.
 

·
News Team
Joined
·
208 Posts
For what it's worth I've been testing this a bunch in Ubuntu and it's been working great. ADB push is so much faster than MTP. Despite mainly using ArchLinux I've been using Ubuntu for a lot of mass file transfers because of this since it makes it so easy.

Sent from my Galaxy Nexus using Tapatalk 2 Beta-2
 

·
Developer
Joined
·
194 Posts
Discussion Starter · #9 ·
Fantastic work!! Love the nautilus right-click push... the MTP thing would have been useful, but in Ubuntu 12.04, MTP works out-of-box...
I'll probably still leave legacy MTP support in for people that use the older LTS versions, but I'm glad that they are finally working that support in by default. I don't actually follow Ubuntu news since I do all my programming in Arch Linux (and had no idea 12.04 was coming out so soon until you mentioned it actually).
 

·
Premium Member
Joined
·
847 Posts
Why wouldn't you just add the appropriate directories to $PATH for the SDK over just symlinking a few of the commands? Then, if people need something that is included with the SDK and it isn't symlinked, they are sitting there wondering why it isn't working when your script has the sdk "installed" for them.
 

·
Developer
Joined
·
194 Posts
Why wouldn't you just add the appropriate directories to $PATH for the SDK over just symlinking a few of the commands? Then, if people need something that is included with the SDK and it isn't symlinked, they are sitting there wondering why it isn't working when your script has the sdk "installed" for them.
I originally was having problems with checking if something was in the path (root vs user) so I chose to just symlink to the files instead. It made it easier to update them if anything changed in the program since I can delete a symlink in my own program as opposed to deleting someone's entire path with my script to change their path if I needed to change something.

edit: I have considered reworking it to just add the path for the various SDK and NDK tools, but my tests when I initially tried this always produced very weird results (often duplicate and triplicate paths). I think a better option might be to symlink more of the tools.
 

·
Developer
Joined
·
194 Posts
Discussion Starter · #16 ·
Can someone make version for Fedora? I'll be very thankful.
I've been meaning to make a Fedora version at some point, it's not exactly a hard conversion -- I just don't know off hand every package name that is installed and have to convert it in my script from apt-get to force yum install applications and any minor package name differences there may be. I also need to figure out any parsing differences that there may be in checking if a package exists on the system (dpkg-query for Ubuntu, pacman -Qs for arch linux, et cetera). It's not an immediate project for me though but if someone wants to take it up though they're welcome.
 

·
Developer
Joined
·
1,618 Posts
Ok so maybe I will take a look at your script and try to make it for Fedora.
Wow thanks a lot man. Maybe I can start working on Linux mint 10again. For the life of me I could get galaxy nexus to show up in ddms. Did the same setup I have for Linux mint 12. Much appreciated man!

Sent from my Galaxy Nexus using Tapatalk
 

·
Developer
Joined
·
194 Posts
Discussion Starter · #20 ·
My install keeps freezing on step 3

"StompaTalk" from Pals GNeX
Freezing or does it appear to be doing nothing? When you run it, it doesn't appear to do anything but bring you back to the menu and it just quickly runs some command line things without actually downloading anything so it happens quickly. It is likely this step is actually completed unless something bad has happened (I should probably add a pause and wait for the user to hit enter after completing each of the steps to make this more clear).
 
1 - 20 of 66 Posts
Top