Android Forums at AndroidCentral.com >  Android Applications >  Android Sideload Wonder Machine > Sideloading apps via the terminal using Ubuntu Maverick

Sideloading apps via the terminal using Ubuntu Maverick

Reply
 
Thread Tools Search this Thread
    Thread Author   #1  
Old 01-18-2011, 06:50 PM
AC Cowboy
Device(s): Yes
ROM/Kernel: Homebrewed
My Next Device: Yes
 
Posts: 4,816
Location: Wild and Wonderful
Join Date: Oct 2009
Thanked 2,165 Times in 537 Posts
Likes Received: 308
Activity: 9/20
This is the easiest way to sideload apps on a blocked phone (AT&T) using Ubuntu Maverick. The commands given are specific to Ubuntu 10.10, but could be adapted to any Linux install.

Download and extract the Linux version of the Android SDK http://dl.google.com/android/android...8-linux_86.tgz Open it, and drag the folder into your home folder.

If you're using a 64 bit install of Maverick, you need some 32 bit libs and headers. From the terminal:
Code:
sudo apt-get install ia32-libs
Next, you need Sun Java. Again from the term:
Code:
sudo add-apt-repository ppa:sun-java-community-team/sun-java6
sudo apt-get update
sudo apt-get install sun-java6-jdk
open the sdk/tools folder, and start the sdk manager. From the term (I love the terminal)
Code:
cd ~/android-sdk-linux_86/tools/
./android
On the left, choose Available packages.
Check the box that says Android Repository, then choose to install selected.
Choose Accept all and Install

This will install everything needed, as well as what you would need if you ever decide to try some programming via Eclipse.


To sideload an app:
Note -- this is generic, and will work for any phone. If you're feeling froggy, you can set up udev so that adb can run as a normal user. this way has an extra step, but is less confusing

Place the .apk file in the ~/android-sdk-linux_86/platform-tools/ folder
Make sure USB debugging is enabled on your phone (menu>settings>applications>development>usb debugging)
Plug your phone into a high speed USB port, and not through a hub
Open the terminal and:
Code:
sudo su
password
cd /home/<your user name>/android-sdk-linux_86/platform-tools
./adb kill-server
./adb start-server
exit
cd /home/<your user name>/android-sdk-linux_86/platform-tools
./adb install <name of the .apk file>
once you've verified that it installs, delete the .apk file from the platform-tools folder so you're ready for the next one.

protip: to upgrade an apk that's already installed:
Place the .apk file in the ~/android-sdk-linux_86/platform-tools/ folder
Make sure USB debugging is enabled on your phone (menu>settings>applications>development>usb debugging)
Plug your phone into a high speed USB port, and not through a hub
Open the terminal and:
Code:
sudo su
password
cd /home/<your user name>/android-sdk-linux_86/platform-tools
./adb kill-server
./adb start-server
exit
cd /home/<your user name>/android-sdk-linux_86/platform-tools
./adb install -r <name of the .apk file>
    Thread Author   #2  
Old 01-18-2011, 07:10 PM
AC Cowboy
Device(s): Yes
ROM/Kernel: Homebrewed
My Next Device: Yes
 
Posts: 4,816
Location: Wild and Wonderful
Join Date: Oct 2009
Thanked 2,165 Times in 537 Posts
Likes Received: 308
Activity: 9/20
Login fail! lol

I'll be adding the method to take screenshots sometime soon. If you use Linux, you might as well get the SDK installed and use it for everything

Last edited by Jerry Hildenbrand; 01-19-2011 at 03:18 AM.
  #3  
Old 01-21-2011, 03:14 PM
 
Posts: 205
Join Date: Mar 2010
Thanked 19 Times in 19 Posts
Likes Received: 1
Activity: 0/20
I am going to try it now. I just installed ubuntu and the sdk on my cr48. do I need to do anything special to get the ADB working? if you need help doing this tutorials please let me know. I am noob on linux but I am trying to learn as much as possible.

thank you for the guide.
  #4  
Old 01-21-2011, 03:38 PM
 
Posts: 779
Join Date: Apr 2010
Thanked 62 Times in 54 Posts
Likes Received: 27
Activity: 16/20
Up and running on Lucid (In a virtual Vmware Workstation machine).
  #5  
Old 01-21-2011, 08:59 PM
Device(s): Supersonic
ROM/Kernel: Cyanogenmod 7
Theme: Sculpted
 
Posts: 522
Location: South Florida
Join Date: Aug 2010
Thanked 119 Times in 77 Posts
Likes Received: 2
Activity: 0/20
Hey Jerry,
Thanks again...this helped alot (brand new to Linux) and im ready to learn more
I was wondering if you could give some tips on setting up the eclipse on maverick or post some links to good guides?
Thanks!
  #6  
Old 01-21-2011, 09:39 PM
 
Posts: 205
Join Date: Mar 2010
Thanked 19 Times in 19 Posts
Likes Received: 1
Activity: 0/20
follow this link to installed eclipse,

[Only registered users can view links. ]

I just recently installed ubuntu on my netbook.
The next thing, I am looking for information is adb installation on ubunu.
Thanked by enzofall
  #7  
Old 01-21-2011, 09:49 PM
Device(s): Supersonic
ROM/Kernel: Cyanogenmod 7
Theme: Sculpted
 
Posts: 522
Location: South Florida
Join Date: Aug 2010
Thanked 119 Times in 77 Posts
Likes Received: 2
Activity: 0/20
Quote:
Originally Posted by Calma10 View Post
follow this link to installed eclipse,

[Only registered users can view links. ]

I just recently installed ubuntu on my netbook.
The next thing, I am looking for information is adb installation on ubunu.
I too have Ubuntu on my CR-48. lol its pretty cool. thanks again for the link...

Btw do you know which version of eclipse to download? and isnt this setting up adb^^^

Last edited by enzofall; 01-21-2011 at 09:56 PM.
    Thread Author   #8  
Old 01-21-2011, 10:05 PM
AC Cowboy
Device(s): Yes
ROM/Kernel: Homebrewed
My Next Device: Yes
 
Posts: 4,816
Location: Wild and Wonderful
Join Date: Oct 2009
Thanked 2,165 Times in 537 Posts
Likes Received: 308
Activity: 9/20
Quote:
Originally Posted by enzofall View Post
I too have Ubuntu on my CR-48. lol its pretty cool. thanks again for the link...

Btw do you know which version of eclipse to download? and isnt this setting up adb^^^
Is you have 10.10 installed:
Code:
sudo apt-get install eclipse
Gets you 3.5.2, which works well

And yes, the above gets up and adb running
Thanked by enzofall
  #9  
Old 01-21-2011, 10:28 PM
Device(s): Supersonic
ROM/Kernel: Cyanogenmod 7
Theme: Sculpted
 
Posts: 522
Location: South Florida
Join Date: Aug 2010
Thanked 119 Times in 77 Posts
Likes Received: 2
Activity: 0/20
Quote:
Originally Posted by gbhil View Post
Is you have 10.10 installed:
Code:
sudo apt-get install eclipse
Gets you 3.5.2, which works well

And yes, the above gets up and adb running
Thanks jerry i got it up and running. Just go to learn how to use it!
  #10  
Old 01-22-2011, 12:21 PM
 
Posts: 205
Join Date: Mar 2010
Thanked 19 Times in 19 Posts
Likes Received: 1
Activity: 0/20
@jerry
I wasn't sure about the adb, there is a lot of information and everything conflicts with each other. would it be possible to start a separete forum for linux relate things. That way people can post questions and tutorials. A trusted place so noobs like me can learn. I am sure a couple of more people would love to have a linux section on AC.

thanks