Android OS Forum banner
1 - 18 of 18 Posts

·
Developer
Joined
·
194 Posts
** I would really like to hear your results on if the script was successful or not and if you have any errors so that I can try and work out the bugs that the script may have. I am new to Arch Linux and working from a fairly barebones system. I believe I will have most of the dependencies resolved in the script, but 64-bit Linux systems *may* need to have the Multilib repository for this to function properly.

I wanted to bring my Auto-Installer over to Arch Linux while I am playing with it. It uses the Pacman manager, so as long as you are using that I believe you'll experience no problems installing this.

Some changes from this one, compared to the Mint/Ubuntu version: The script cannot be executed with SUDO. Don't edit the code and remove the fail safe for this, to try because it'll just cause the script to fail at the end. Just enter the password requests.

Download Links
Github, Download link is at the top. Use the command: tar xvfz <filename.tar.gz> to extract this one.

git clone git://gist.github.com/1254981.git gist-1254981

Dropbox Script Link

For safety reasons, I'd suggest taking one of the first two just incase dropbox corrupts the script for some reason.

Installation Instructions

This script assumes you know very basic knowledge of the terminal (or GUI equivalent). Download the file you want from above and navigate to the directory that it is and type the following commands (dropbox users substitute andadb.sh with andadbarch.sh:

Code:
$ chmod +x andadbarch.sh<br />
$ ./andadbarch.sh<br />
<br />
[COLOR="#FF0000"]This part takes a long time depending on your internet connection.[/COLOR]<br />
Install the "Android SDK Platform-tools" to gain access to ADB.  <br />
Also install any other API that you would like at this time.
You can now test your phone by typing "adb" in terminal while plugged in with USB debugging mode turned on.

What's Been Done to my System?

  • Eclipse has been installed.
  • Android SDK is installed in /usr/local/android-sdk
  • Android NDK is installed in /usr/local/android-ndk
  • Symlink created for Dalvik Debug Monitor, start it from terminal with "ddms" -- If you run two monitors or it gives you an error the first time you run it type it again and the program will start.
  • Symlink created for Android Debug Monitor. Type "adb" from terminal to see command list.
  • 99-android.rules created automatically and placed into /etc/udev/rules.d directory.

Version 1.0.4 99-android.rules:

Code:
#Acer<br />
SUBSYSTEM==usb, SYSFS{idVendor}==0502, MODE=0666<br />
#ASUS<br />
SUBSYSTEM==usb, SYSFS{idVendor}==0b05, MODE=0666<br />
#Dell<br />
SUBSYSTEM==usb, SYSFS{idVendor}==413c, MODE=0666<br />
#Foxconn<br />
SUBSYSTEM==usb, SYSFS{idVendor}==0489, MODE=0666<br />
#Garmin-Asus<br />
SUBSYSTEM==usb, SYSFS{idVendor}==091E, MODE=0666<br />
#Google<br />
SUBSYSTEM==usb, SYSFS{idVendor}==18d1, MODE=0666<br />
#HTC<br />
SUBSYSTEM==usb, SYSFS{idVendor}==0bb4, MODE=0666<br />
#Huawei<br />
SUBSYSTEM==usb, SYSFS{idVendor}==12d1, MODE=0666<br />
#K-Touch<br />
SUBSYSTEM==usb, SYSFS{idVendor}==24e3, MODE=0666<br />
#KT Tech<br />
SUBSYSTEM==usb, SYSFS{idVendor}==2116, MODE=0666<br />
#Kyocera<br />
SUBSYSTEM==usb, SYSFS{idVendor}==0482, MODE=0666<br />
#Lenevo<br />
SUBSYSTEM==usb, SYSFS{idVendor}==17EF, MODE=0666<br />
#LG<br />
SUBSYSTEM==usb, SYSFS{idVendor}==1004, MODE=0666<br />
#Motorola<br />
SUBSYSTEM==usb, SYSFS{idVendor}==22b8, MODE=0666<br />
#NEC<br />
SUBSYSTEM==usb, SYSFS{idVendor}==0409, MODE=0666<br />
#Nook<br />
SUBSYSTEM==usb, SYSFS{idVendor}==2080, MODE=0666<br />
#Nvidia<br />
SUBSYSTEM==usb, SYSFS{idVendor}==0955, MODE=0666<br />
#OTGV<br />
SUBSYSTEM==usb, SYSFS{idVendor}==2257, MODE=0666<br />
#Pantech<br />
SUBSYSTEM==usb, SYSFS{idVendor}==10A9, MODE=0666<br />
#Philips<br />
SUBSYSTEM==usb, SYSFS{idVendor}==0471, MODE=0666<br />
#PMC-Sierra<br />
SUBSYSTEM==usb, SYSFS{idVendor}==04da, MODE=0666<br />
#Qualcomm<br />
SUBSYSTEM==usb, SYSFS{idVendor}==05c6, MODE=0666<br />
#SK Telesys<br />
SUBSYSTEM==usb, SYSFS{idVendor}==1f53, MODE=0666<br />
#Samsung<br />
SUBSYSTEM==usb, SYSFS{idVendor}==04e8, MODE=0666<br />
#Sharp<br />
SUBSYSTEM==usb, SYSFS{idVendor}==04dd, MODE=0666<br />
#Sony Ericsson<br />
SUBSYSTEM==usb, SYSFS{idVendor}==0fce, MODE=0666<br />
#Toshiba<br />
SUBSYSTEM==usb, SYSFS{idVendor}==0930, MODE=0666<br />
#ZTE<br />
SUBSYSTEM==usb, SYSFS{idVendor}==19D2, MODE=0666
 

·
Android Beginner
Joined
·
9 Posts
Your script works perfectly under my Arch Linux x64 installation (with Multilib) :D

But I'm wondering why you don't use the android packages in the AUR? Specifically:

https://aur.archlinux.org/packages.php?ID=27656
https://aur.archlinux.org/packages.php?ID=13751
https://aur.archlinux.org/packages.php?ID=45904
https://aur.archlinux.org/packages.php?ID=14544
https://aur.archlinux.org/packages.php?ID=51476

As far as I can tell, those packages install the same thing as your script. Great work though! Your udev rules contain a few more new devices than the android-udev AUR package, like the Lenovo Tablet :p
 

·
Developer
Joined
·
194 Posts
Discussion Starter · #3 ·
chenxiaolong said:
Your script works perfectly under my Arch Linux x64 installation (with Multilib) :D

But I'm wondering why you don't use the android packages in the AUR? Specifically:

https://aur.archlinux.org/packages.php?ID=27656
https://aur.archlinux.org/packages.php?ID=13751
https://aur.archlinux.org/packages.php?ID=45904
https://aur.archlinux.org/packages.php?ID=14544
https://aur.archlinux.org/packages.php?ID=51476

As far as I can tell, those packages install the same thing as your script. Great work though! Your udev rules contain a few more new devices than the android-udev AUR package, like the Lenovo Tablet :p
I hadn't explored the AUR as a possibility, honestly. This was an almost direct conversion of my Linux Mint/Ubuntu installer and I am still not very fluid with the concept of the AUR (I've been using Arch Linux for 4 days now) and only installed a few packages through it. The problem I have with AUR though is that I noticed some of the packages go out of date and are no longer maintained, while my script will parse for the latest version of the Android SDK and NDK off of the Google website and then install it directly.

Ideally though, I think it would be good to at some point revise this with AUR and have it wget everything. Glad to hear a success story btw, at some point I plan on going for an all-in-one installer if I ever get around to playing with Fedora and possibly Gentoo (and maybe some other flavors).
 

·
Android Beginner
Joined
·
9 Posts
That's a good point. For AUR packages, you really have to trust the maintainer behind the package.

Later today, I'll try creating a package for your script similar to your DEB package. That way, to update, all the user has to do is install the package again.
 

·
Developer
Joined
·
194 Posts
Discussion Starter · #5 ·
chenxiaolong said:
That's a good point. For AUR packages, you really have to trust the maintainer behind the package.

Later today, I'll try creating a package for your script similar to your DEB package. That way, to update, all the user has to do is install the package again.
I have actually modified it to install all of the dependencies listed in the AUR as well (if you would like to download and run it again, it will check if you have the dependencies listed). I was only missing one of the dependencies at the time of running through it. So if you want to make the package from it, I'd suggest you redownload it and package it from the newer one.
 

·
Android Beginner
Joined
·
9 Posts
Tahl said:
I have actually modified it to install all of the dependencies listed in the AUR as well (if you would like to download and run it again, it will check if you have the dependencies listed). I was only missing one of the dependencies at the time of running through it. So if you want to make the package from it, I'd suggest you redownload it and package it from the newer one.
Could you post a new link for the git repository (or a link to the github page)? I get a permission denied error and the dropbox link still has the old version.
 

·
Developer
Joined
·
194 Posts
https://gist.github.com/1254981 *should* work for the Github link.

The dropbox link is updated also (I just left the version number the same, despite the minor changes to keep it in line with the Ubuntu/Mint version)
 

·
Android Beginner
Joined
·
9 Posts
Tahl said:
https://gist.github.com/cdd87141391439a668a4 *should* work for the Github link.

The dropbox link is updated also (I just left the version number the same, despite the minor changes to keep it in line with the Ubuntu/Mint version)
Ah, okay. I'll post a link to the package once it's finished :)

EDIT: The private clone URL on the top of the github page still gives a permission denied error. I just copied and pasted the script instead.
 

·
Developer
Joined
·
194 Posts
Discussion Starter · #9 ·
I figured out the error, I have a private duplicate of the github that I use to test errors and I linked that one on accident. I changed the link to the public one up top for both of them.
 

·
Android Beginner
Joined
·
9 Posts
It works now :)

Here's the source package for your script. It works a little differently than the DEB package in that all the files created by your script are contained in the package (rather than running the script after installation). Here is the source package: http://ubuntuone.com/6zTrE0xxXT9NshGORyit69

In Arch Linux, a source package can be easily compiled by running:

Code:
makepkg #Compile<br />
pacman -U package-1.0.pkg.tar #Install
in the extracted directory.

Here's a copy of the main build file on pastie for easy readability: http://pastie.org/2619228

If you like the way the package works, I can upload it to the AUR. Or I can make it act exactly like the DEB package if you want.

EDIT: The package creates /etc/profile.d/andadb.sh, which updates the PATH variable so the SDK binaries can be ran without using symlinks.
 

·
Android Beginner
Joined
·
9 Posts
Hmm... I don't have that problem. I have 32 and 64 bit versions of the dependencies installed.

Does chromium output an error when you run it in the terminal?

Also, /var/log/pacman.log shows everything that's been installed and removed, along the a time stamp. Maybe that can help you find out what's causing the problem?
 

·
Developer
Joined
·
194 Posts
Discussion Starter · #13 ·
[13399:13407:155477797144:ERROR:nss_util.cc(419)] Error initializing NSS with a persistent database (sql:/home/doug/.pki/nssdb): NSS error code: -8187
[13399:13399:155477851857:ERROR:native_backend_kwallet_x.cc(594)] Failed to complete KWallet call: The name org.kde.kwalletd was not provided by any .service files
[13399:13399:155477997776:ERROR:native_backend_kwallet_x.cc(594)] Failed to complete KWallet call: Message did not receive a reply (timeout by message bus)
[13399:13441:155478013584:ERROR:syncapi.cc(1953)] Could not open share for:
Segmentation fault
 

·
Android Beginner
Joined
·
9 Posts
I've seen that before when I accidentally tried installing a 32 bit version of Chrome on a 64 bit installation, but since you install Chromium from the repos, it should work fine.

Try removing the following files in your home directory:

.kde4/share/apps/kwallet
.kde4/share/config/kwalletrc

Your KWallet settings will be erased.
 

·
Developer
Joined
·
194 Posts
Discussion Starter · #15 ·
I think I may have installed some 32-bit libraries or something on accident. The problems came from when I had it download the dependencies listed on the AURs, so I think I'll remove them from the script real fast (if you want to rebuild it and list eclipse as the only depends)

I've updated the Dropbox and Github links to reflect the file changes.
 

·
Android Beginner
Joined
·
9 Posts
Tahl said:
I think I may have installed some 32-bit libraries or something on accident. The problems came from when I had it download the dependencies listed on the AURs, so I think I'll remove them from the script real fast (if you want to rebuild it and list eclipse as the only depends)

I've updated the Dropbox and Github links to reflect the file changes.
Hmm...with the following dependencies everything works fine (I just tested in a virtual machine)

for 32 bit installation, use: eclipse alsa-lib java-runtime openal libstdc+=5 libxv ncurses sdl swt zlib libmtp
for 64 bit: eclipse lib32-alsa-lib java-runtime lib32-opena lib32-libstdc++5 lib32-libxv lib32-ncurses lib32-sdl lib32-zlib swt zlib libmtp

It's weird how it crashes Chromium for you. They don't share any dependencies, except for alsa-lib...

I'll do more testing tomorrow and report back.
 

·
Developer
Joined
·
194 Posts
Discussion Starter · #17 ·
Figured out the problem, it was actually a very simple solution because I'm not fluent with Arch Linux it involves Pacman storing the packages locally for such a long time and used the default suggested formatting options for Arch Linux on my SSD (giving myself 7GB for the root) my root would fill up quickly and just happened to do so after doing this script. The solution to the problem was just running the following command:

sudo pacman -Scc

/facepalm
 

·
Android Beginner
Joined
·
9 Posts
Nice! :p

Your script is really convenient. I'm using it on all my Arch Linux computers and a Fedora computer (the script works just as well :D).
 
1 - 18 of 18 Posts
Top