Sideloading apps via the terminal using Ubuntu Maverick

This looks like a great solution. Now if I can only get by the permissions problem ...

error: insufficient permissions for device

I tried running it as root but that didn't help (obviously, I wasn't root on the phone)
 
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-sdk_r08-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>
Hi,

I have no problems using SWM on Windows, at work. On my home Ubuntu 64, I'm having issues. Can you please shed some light on what's going on. I don't have the SDK, just SWM for linux. Here's the log:

===================================================================
Sideload Wonder Machine for Linux. Version 0.9.0
===================================================================

General Options:

1. Push app to phone. (/data/app)
2. List apps on phone. (/data/app)
*3. Download an app to push. (NOT AVALIBLE NOW - COMING SOON!)
---------------------------------------------------------------------
Root Options: (You MUST be root to use these options)

21. Push app to /system/app (Can't be uninstalled with a factory reset)
*22. Create 'update.zip' (NOT AVALIBLE NOW - COMING SOON)
*23. Remove system apps from phone. (NOT AVALIBLE NOW - COMING SOON)
---------------------------------------------------------------------
99. Check for Updates
0. Exit

Please enter option number: 1



Ensure you have copied your app to the 'Place-App-Here' directory & that there is only 1 app in that folder.

This will only work on Android phones. If you have an iPhone, you are still controlled by Stevey J'. Sorry :P

Press enter to continue...


Found dolphinhdlicense2.0.0.apk

Press enter to continue...


Pushing to phone...

failed to copy '2-Place-App-Here/dolphinhdlicense2.0.0.apk' to 'data/app/dolphinhdlicense2.0.0.apk': Permission denied
Pushed! You may need to reboot your phone to see the change.

Thanks,
Dan
 
I've figured it out.

1) You must be root or use sudo when you run ./menu.sh
2) sudo ./adb push 2-Place-App-Here/$apptopush data/app does not work for me. Phone is not rooted.
Instead I manually typed sudo ./adb install <path/file.apk) and it worked perfectly. Why do you use push instead of install? I guess I'll just have to edit the scripts. Thanks for your help!

Dan

I guess I'll just have to edit the scripts.

Thanks for
 

Trending Posts

Members online

Forum statistics

Threads
956,907
Messages
6,970,556
Members
3,163,648
Latest member
crayzeefoo