Simplifying ADB installation - Nook Color Q&A, Help & Troubleshooting

There's a lot of angst around getting ADB to work, particularly over USB, and it leaves a lot of folks frustrated. Some of the stuff I have seen is outdated for one and USB itself is problematic.
But, if you use Manual Nooter (for 1.2), GabrialDestruir baked in ADB Wireless, so it should be super easy to go from zero to ADB connected in nothing flat now. Here's some quick instructions that won't change.
1. Make sure you have Java installed (I'm sure you do). You *do not* need the JDK to do this!
2. Go to the android site and grab the Android SDK zip file (the windows executable *requires* the JDK so grab the zip file)
3. Unzip it to the root of your drive (it has the 'android-sdk-windows' folder in it)
4. Now go in the android-sdk-windows folder and launch sdk manager
5. Cancel out of the window that pops up with a list of a bunch of stuff
6. Click on available packages
7. Now expand 'Android Repository' and check 'Android SDK Platform-tools'
8. Now click 'install selected' and then 'install' on the next screen
9. After it finishes it will ask if you want to restart ADB, go ahead and select yes
10. Now do the standard path edit and add these two paths to your environment path: c:\android-sdk-windows\platform-tools and c:\android-sdk-windows\tools
11. On your nook, start up adb wireless and note the command it tells you
12. open a command window on your pc and type the command adb wireless gave you
Voila! You are using ADB to access your Nook Color! No special drivers or ini files, etc. I know there is an easy ADB USB thread, but I actually eventually had issues with that and went back to grab the original "official" kit to get things working. I just did the above on a fresh machine with nothing else and it worked flawlessly.
Anyway, I figured this might help a few people out there.

Related

Install non-market apps without File Manager: Possible?

Simply put is there a way to get an app onto my phone without the market or file manager?
I ask because I want to use Haykuro's G build but I cant download any apps. I do however have all the ones I use regularly backed up onto my SD card but I cant access them without a File Manager (which I cant download to use). Is there a way?
|Spike|
There's always the option of using AppsInstaller/APKInstaller and putting APK's onto your SD Card. Though, to install AppsInstaller, you have to install it through ADB.
Unicornasaurus said:
There's always the option of using AppsInstaller/APKInstaller and putting APK's onto your SD Card. Though, to install AppsInstaller, you have to install it through ADB.
Click to expand...
Click to collapse
How do I install thru ADB?
|Spike|
Get the android usb drivers, adb.exe and adbwinapi.dll from an Android SDK. Plug the Dream in via USB and point to the location of the drivers when it is installed. Then open your command line, navigate to whatever folder adb.exe is in and type adb install <full path to the apk>. If you run Linux hopefully you can figure it out on your own based on the steps above.
Alternately, upload all the apks you want to the internet somewhere. Check the box to enable installation from Non-market sources in the system settings, then type the full URL of the apk into the browser. The package installer will take over from there.
Here's how you do it. Assuming your G1 is rooted
1. Download the attched files, and copy them into your \system32 folder (Start > Run > %systemroot%\system32)
2. Sure your G1 is enabled for USB Debugging (Settings > Applications > Development > USB debugging) and that your G1 has the appropriate drivers installed. If not, download the USB drivers from HERE
3. Plug your G1 into your computer (Make sure you have USB 2.0 - Click here to find out how to check). When your G1 says "USB Connected" DO NOT click "Mount"..don't do anything
4a. Vista users - Follow these steps. For XP Users, skip to step 5
4b. On your computer, browse to the directory where the APK for your file is located
4c. Once located, hold SHIFT and right click on a blank area of the folder
4d. Click on "Open Command Window Here"
4e. Type "adb install nameofyourapkhere.apk" - without the quotes.
4f. It might say something like "daemon service not started" or something, but it will start it and continue. It'll then say something like 626k/1293k bla bla bla
4g. If it was successful, it will just say "Success". You can close the command window and SHAZAM! Your program will now be installed on your G1, and you can access it like any other program on your phone
5. XP Users - Follow these directions:
a) You can either go Start > Run > type CMD and press enter
OR
Windows Key + R > type CMD and press enter
Navigate to your APK file via the command prompt. For easy usage, put your APK file on your desktop. That way all you have to do is type "CD Desktop" into the command prompt
b)Type "adb install nameofyourapkhere.apk"
c)You may get a couple of messages like in the steps for Vista users
d)If all goes well, you too will get the success message
e)Enjoy your application!
Any confusions, let me know. Hope it helps, and Good Luck!
I've been using a local web server and the android browser.
untermensch:
Thats a possibility, but oddly enough, that requires a http-server
AGx-07_162:
With unicornasaurus's method above, you can install all the apk's you want... you can install apkinstaller and use that through that method, but you can just aswell install your apk's directly through it
I ran into the same problem. Here is the easiest ways to get the appinstaller on your G1. Download this file from your g1 browser or Gmail yourself this file, and download.
http://www.mediafire.com/?egy0mop2qqx

EASIEST sdk adb guide tutorial instructions

I have learned alot from this site so i figured i'd give something back. these are the the two easiest methods i have found for setting up the android debug bridge. one for windows and one for linux... these instructions should work for any version of windows.
first make sure you download the latest sdk by going to android.com and clicking on developers.
windows:
after you have download the sdk, unzip it to your desktop. rename it to sdk. cut the UNzipped folder on the desktop that you just renamed by right clicking and hitting "cut" then go to start>my computer>c: and paste the folder here. now go into the new "sdk" folder and right click on the "tools" folder and click "send to" then choose "desktop (as shortcut)" you should now have a shortcut on the desktop called "tools-shortcut"
now for the easy part: hold shift and right click on tools-shorcut, holding shift adds the option "open command window here" to the context menu that comes up so click on that. now just make sure your phone is connected to the computer and on ur phone debugging is enabled (menu>applications>development>debugging). on ur command window that came up you should see a black box with white text and the cmd should be c:\sdk\tools> just type "adb devices" and you should see your phone under "list of devices attached" if you do see it you should be able to start running adb commands
adb pull "/location to file or folder on phone" -(the pulled folder or file will be in the tools folder we created earlier which you can still access by clicking on the tools-shortcut on your desktop)
adb push "name of file or folder to be placed on the phone sdcard" -(make sure the file or folder you wish to place on the phone has been placed in the "tools" folder on the computer, again its the same folder the "tools-shortcut" opens up)
hint and examples: i have found a good way to back up and reinstall all ur apps using just adb push and pull. just experimenting and playing around with it i have found you can accomplish installing with just knowing these commands above... if you plan to data wipe and flash a new rom but you don't want to go through the tedious task of reinstalling and you have a rooted android phone then you may use this method to backup/reinstall ALL of your apps. plus this will give you good practice using adb.
backup example:
adb pull /data/app .... let it finish
adb pull /data/app-private ...let it finish
now you should have ALL of ur apps in ur tools folder on ur computer! in the tools folder, create a new folder and name it what u want, i named mine APPS4EVO because i have an evo and and epic and some apps don't work for both so i keep them seperate. cut and paste all of ur apps and put them into your newly made folder. now back to the adb window
restore example:
adb push /APPS4EVO /data/app/
this will push all of your apps in your backed up folder you made earlier to the folder where apps go when they are installed and if you wait 1-10 minutes depending on how many apps you have you should be able to see them on ur phone as if you had installed them one by one. also notice the space between /APPS4EVO and /data/app/ the space seperates the folder from inside ur tools folder you wish to install and the location you wish to put them on ur phone. please be aware that you do not need to type c:\sdk\tools\APPS4EVO because the command window is already being ran in the tools folder, so the location would just be /APPS4EVO in my case.
adb shell -opens up the terminal shell to run commands specifically for the phone, while in the shell you cannot run other "adb xxxxx" commands, you will have to exit the shell by typing "exit"
OPTIONAL: i marked this as optional bc with the above it is not necessary... i have never done this and my adb works great but i have seen it often in other tutorials around the web.... i believe its only necessary on windows 7 and maybe vista. go to start then right click on "my computer" and click on "properties" then in the left pane click on "advanced system settings" then in the window that pops up click on "environment varables" button, in the next window that pops up, under "system variables" scroll down to the "path" variable and double click it. in the "variable value" box do NOT erase anything but add ";c:\sdk\tools" (without quotations). then click ok on all the windows cuz ur done.
thats all for windows.
linux (ubuntu)
extract the sdk to your home/name/ folder and rename it to sdk. now right click on the folder and go to permissions and make sure (run as executable) is checked, now go into the folder and do the same permission change to the tools directory.
now you should be able to run adb commands in the terminal when your phone is connected. same as in windows except your commands will be preceded by your tools folder location....
FOR EXAMPLE:
/home/jay/sdk/tools/adb devices
/home/jay/sdk/tools/adb push xxxx xxx
/home/jay/sdk/tools/adb pull xxxx
EXTRA:
if your having troubles connecting ur phone to ur computer over usb, even after installing drivers, like i sometimes have with my epic, you can download "wireless adb" from the market which i found to be surprisingly easy to use, just like if u were connected by usb, except under adb devices you will show up as your gateway address not ur device name but trust it still works the same.
good luck everyone, i hope this post isn't redundant and i really hope i help someone out there just starting! adb is confusing at first.

DX noob here. Anybody wanna help me out?

I ordered my DX earlier today and should have it tomorrow afternoon. (yay!)
I'm coming from the LG Ally, which I played around with quite a bit as far as root/roms go. I ended up bricking it when the Froyo update came out trying to get from 2.1 to one of the new 2.2.1 roms.
I've seen a lot of stuff about the DX and it looks like a lot of progress has been made (yay, again!). I love the look of Gingerbread, so I'd probably look into flashing one of the roms that supports a GB theme (Liberty looks cool!), but I don't want to run into trouble when the official GB release comes out.
So, how hard is this on the DX? What are the general steps? What in the world is a SBF?
Any sort of basic noob-friendly introduction would be greatly appreciated!
Thanks!
Here is a bunch of stuff I have put together for various people that should get you started:
Ok, here are the steps for setting up the sdk, getting rooted, and all that good stuff... have a feeling I will be making this into a new thread...perhaps....
SDK:
First off... you will want to go to the following site to download the sdk:
http://developer.android.com/sdk/index.html
Grab the following download: android-sdk_r08-windows.zip
I saved it to C:\sdk (i created a folder called SDK right at the root of C: drive). When it finishes, unzip this using 7zip (or any other unzip program you like) to the sdk folder. When it is finished unzipping, you should have a folder called "android-sdk_r08-windows". If you open up that folder, you will find a folder called "android-sdk-windows". Open this folder up and double click on the "SDK Manager.exe". This will open up a window, and bring up additional windows, one of which will ask you to "choose packages to install". You can download any or all of them. I recommend downloading the following:
• Android SDK Platform-tools, revision 1 (the top-most download)
• SDK Platform Android 2.3, API 9, revision 1
• SDK Platform Android 2.2, API 8, revision 2
• USB drivers (I don't think this shows up in the latest version of the sdk's first download window. I believe it is found if you go to the available packages section the "Android SDK and AVD Manager and expand the 3rd party section....but if you happen to see it in there...grab it)
This should be sufficient for now. All packages are accepted by default. If you do not wish to download all of them, simply highlight each one (one at a time) and then click the reject button towards the bottom middle of the window. When you have selected the packages you wish to download, click the install button.
After this has installed, you now have the Android SDK installed on your machine. You can close all windows related to the SDK, as we don't actually need to do anything with it, it simply has tools within it that we will need later. (This is where the adb command originates from. There is an adb.exe tool in the "tools" folder of the sdk install, but we will get to this later).
Now you will want to go to your desktop (or anywhere you have a shortcut or icon for My Computer), right click on My Computer, and select properties. Under the "advanced" tab of the window that opens, you should see a button at the bottom that says "environment variables". Click on this, and then find the "Path" variable under System Variables NOT user variables. Click Edit and go to the end of the "Variable Value" field. You will want to make sure there is a semicolon ( at the end of this before typing any additional info. You will want to add the full path of your android SDK install. For example, if you followed my example for download/saving/extracting/installing above, you would type the following information into the end of the "Variable Value" section:
C:\sdk\android-sdk_r08-windows\android-sdk-windows\tools
If you installed to another location, be sure to type the correct path to the "tools" folder within your installation of the Android SDK. Then click the OK button, and close any windows that were opened from adding to the "path variable".
Droid X Drivers
This section is a little more difficult to explain, as there are so many variables depending on what operating system you are running (windows XP, Windows Vista, Windows 7, etc). and whether or not you are running a 32-bit or 64-bit instance of your chosen Operating system.
Here is one link for Droid X drivers:
http://www.verizon-phones.org/verizon-motorola-droid-x-usb-drivers-pc-charging-drivers-download.html
I simply googled Droid X drivers, I'm sure this isn't the best link, but just for example I'm throwing it out there. If you google Droid X USB drivers <your operating system> you should be able to find the drivers you need, as well as help and instructions on how to get everything working.
Once you get the usb drivers installed, you will want to connect your Droid X to your computer. If it is recognized, you will get a notification in your drop down bar on your phone. On your phone, press on the USB connection in the drop down menu, and select "charge only". Next, open up a command prompt on your computer. Type the following in and hit enter:
adb devices
You should see something simiilar to the following come up if everything is configured correctly:
C:\>adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
015A882315005010 device
If you see something similar to what I have above... then ADB is working correctly, and we can continue! Now we will move on to getting your device rooted! You will want to grab the z4root.apk that I have attached earlier in this thread and download it onto your computer. We will now test out if adb is indeed working! Save the z4root.1.3.0.apk and put it in the "tools" folder of the sdk we downloaded earlier. Now open up a new command prompt (or use the one we opened earlier if you haven't already closed it!) Change directories to the "tools" folder of the sdk:
If you installed the SDK where I used in my example.... type the following:
cd C:\sdk\android-sdk_r08-windows\android-sdk-windows\tools (press enter)
type the following: adb install z4root.1.3.0.apk (press enter)
You should now see the following:
C:\android-sdk-windows\tools>adb install z4root.1.3.0.apk
1833 KB/s (978414 bytes in 0.521s)
pkg: /data/local/tmp/z4root.1.3.0.apk
Success
z4root and ROOTING
If you get all of this, you have now installed a package using adb and we know the interface works. If you don't want to have to mess with this method of installing, you could also download "Astro File Manager" from the android market. You would then need to save z4root.apk to your sdcard of your Droid X. Then open the Astro program and browse to your SDcard and file the z4root.1.3.0.apk. Press on the .apk file and it should come up with a box that says something similar to "open with app installer" or "app manager"... don't recall exactly what it says, but should be something similar to package management or install of some sort. After pressing on that, you should see an install button. Press on that to install z4root.
Now that z4root is installed, you will want to go to your application list on your phone and press on the z4root to open the application. Press on the permanent root button and wait! This process may take a while, and your phone will reboot, but when it does, you are now rooted.
Removing BOOTSTRAP COMPLETELY
If you would like to completely remove Droid X bootstrap from your phone, here is what you need to do:
1) connect your phone to ur pc in charge only mode. Make sure it is recognized by adb
A) open command prompt and type "adb devices" (hit enter, your phone should show up)
2) in the command prompt, type "adb shell" (press enter)
3) type "su" (press enter)
4) type "mount -o rw, remount /dev/block/mtdblock4 /system" (press enter)
5) type "cp /system/bin/logwrapper.bin /system/bin/logwrapper"(press enter)
6) type "adb reboot" (press enter)
Your phone will reboot after typing adb reboot, and may take a little bit longer to boot the first time after bootstrap is removed (it may not, I just haven't gone through this process in a while).
Bootstrap should now be completely removed.
Note: all text in quotes is just what you should type...do not include the quotation marks when entering commands.
Disclaimer: I take no responsibility if you mess up your phone. Typing these commands incorrectly CAN mess up your phone. By following these directions, you do so at your own risk.
Installing Droid X Bootstrap
You can grab this .apk file from this thread as well, as I have it posted in one of my previous posts. You will then install this .apk file the same way that you installed z4root. Obviously if you are using the adb command prompt method, you will want to replace z4root.apk with the full name of the droid X bootstrap apk; if you are using a file manager or installer, just follow the same instructions as before as well.
With the bootstrap installed, you are now able to take backups and restore them as well in the event your phone has problems.
Thanks for the reply, but it's actually pretty confusing...
To install z4root, do I NEED to do any of those adb steps or can I just sideload it? I'm not sure if you're telling me to do both of those steps or just either/or. Sideloading is much easier, if it's an option.
And as far as the bootstrap goes - am I removing the original bootstrap and then installing the apk you attached to replace it with a custom bootstrap? Is this different than a custom recovery?
Also, what are SBFs and how do they fit into all of this?
Thanks!
lextex said:
Thanks for the reply, but it's actually pretty confusing...
To install z4root, do I NEED to do any of those adb steps or can I just sideload it? I'm not sure if you're telling me to do both of those steps or just either/or. Sideloading is much easier, if it's an option.
And as far as the bootstrap goes - am I removing the original bootstrap and then installing the apk you attached to replace it with a custom bootstrap? Is this different than a custom recovery?
Also, what are SBFs and how do they fit into all of this?
Thanks!
Click to expand...
Click to collapse
No, you do not have to do it this way. I just used this as an example for something I was doing for someone else, especially since they needed the sdk anyways... Just was practice.
(PS, not sure what you mean by sideloading... sorry just not familiar with the term...) Nonetheless...
You can just download the file, and then use file manager to install the file or any app installer you may normally use. Just make sure that under Settings-->Applications-->Unknown sources, that the check box is marked. Then you should be good to go.
As for bootstrap... You are basically replacing a logwrapper file that tells the phone to boot to Motorola's built in recovery. Koush's bootstrap hijacks this and writes its own logwrapper and allows for the recovery process to be interrupted so backing up/restorying, etc. You can load that apk the same way you do Z4root.
As for SBF files, I'm can't recall what it actually stands for, but it is basically a file from Motorola that allowed their employees to flash a phone back to "out of the box" state in the event that a customer ruined their phone or had issues with it... this goes way back to even the Motorola Razor days I believe... In any event, it is used alongside a program called RSDlite. This program allows you to connect your phone to your computer and flash the sbf files that have been released, and as a result allows you to restore your phone back to a "clean" state in the event that you mess up the /system partition and for other uses as well.
I will be adding more to a basic guide for all things Droid X later this weekend. If you have more questions, feel free to post back. And check out my other post here:
http://forum.xda-developers.com/showthread.php?t=940986
This includes the same info as I posted here already, but should have some more updates this weekend.
Good luck!
new here also.
i thought droid x could not be rooted.
i bought mine in october 2010; it's running 2.2.1
thanks in advance

Trying to root but can't get ADB working

I've finally decided to try to root my G2 but can't get past the ADB setup. I downloaded the SDK, but when I open the manager and try to install platform tools it goes through the motions and then tells me nothing was installed. When I open a command prompt and type "ADB devices" it doesn't recognize anything. What am I doing wrong??
EDIT: specifically, when I try to install platform-tools it tells me it couldn't create a directory and nothing was installed.
66 people have read this and nobody has any suggestions to help?
i think you miss the 1st procedure....
you must have the unknown resources and the usb debbuging enabled.....
then you can proceed to your super one click rooting.....
I have a problem after rebooting my PC: <Java not found...> Reinstalling doesn't help, adding environment variables too. Any idea?
Just root using the rage/visionary method. No adb needed and very easy to do. Here is the linkhttp://forum.xda-developers.com/showthread.php?t=834228
Sent from my SilverBullet 'HTCDesireZ running CM7'
juvanni said:
i think you miss the 1st procedure....
you must have the unknown resources and the usb debbuging enabled.....
then you can proceed to your super one click rooting.....
Click to expand...
Click to collapse
I don't understand? I'm trying to root following the recommended wiki instructions, and I haven't been able to get adb to work so I haven't gotten past that step.
Are you running windows x64? Cause the android installer has issues detecting java on x64 systems.
When it says 'Can't find java' or whatever the error is, click back, then next again, it should find it the second time around. Well thats what happened for me anyway.
-Nipqer
If you're on froyo just use the app z4 root or universal androot
You can also use superoneclick root 2.11
Its very easy and it only take about 3 minutes
Stewie just said that!
I appreciate the help so far, but my problem is I have gingerbread and everything I've read requires froyo for root, and the only way I've read to downgrade uses ADB, so any non-ADB rooting method still won't work for me. I've followed the "ADB for dummies" thread and the other instruction thread and everything seems fine, but when I type in the first command for the downgrading it says adb isn't a recognized command. Am I in the wrong command prompt? I feel like its probably something really dumb I'm doing or not doing but for the life of me I can't figure it out.
Navigate to the folder adb is in.
Hold shift, right click in the folder (make sure nothing is selected)
select 'Open command window here' (or something along those lines)
Adb should work.
-Nipqer
OK, so I'm definitely in the right folder, I read and followed ADB for Dummies thread. Trying to follow this direction:
"Run the following command to verify the exploit has access to what it needs. (Only the first line is the command. The second line should be the result returned if all goes well.)
Code:
$ adb shell cat /dev/msm_rotator
/dev/msm_rotator: invalid length"
When I type that in, should there be spaces between the "adb" and "shell"? Should there be a space after the command prompt and before "adb"? I've tried several variations of it and it keeps telling me "adb is not recognized as an internal or external operable program or batch file."
ok you need to run the command from the folder with adb.exe in it, type it as adb<space>shell<space>cat<space>/dev/msm_rotator
If you are getting an error search for adb.exe and once found try the command again from this folder,if as you say you are in the right folder then I think you will have to reinstall adb as I just ran the command in the form above and it works so if you still get an error then something has gone wrong with the install
P.S Another way to make sure that adb is working and recognises your phone is to type adb devices, if your phone is attached and recognised then it will return a number
Thank you! I had to uninstall and reinstall the package, I don't know what was wrong but it seems to be working now. Also, I knew I was probably doing something stupid, and I was. I wasn't in the platform-tools directory for my command prompt, I was in the TOOLs directory. Just so I'm clear, every command I type into the terminal should be in the Platform-tools directory, correct?
Now, assuming I can follow all the other directions with no problems, once I get to the downgrade pushing steps, I will lose all my current settings, right? It will be a fresh froyo 2.2 like it came to me originally? Other than using Appbrain to back up my current apps, how else should I make a backup?
Final question, do I need to follow the temp root directions and push the downgrade all at one time? Or can I do the temp root and come back at a later time to push the downgrade?
First problem solved then!
Yes but follow this Step 4
Now we need to update your Path variable. This lets you run adb on your PC from a command window no matter which directory you are in (which makes things a lot easier). If you don't setup your Path, then every time you want to run adb, you will either have to type the whole long pathname where you put adb, or cd to where you've put adb and run it from there (which could be inconvenient if you are transferring files to/from your phone).
On your PC, right-click on "My Computer" and select "Properties". (on Vista, click on "Change Settings"). Go to the "Advanced" tab, then select "Environment Variables". Find the "Path" variable in the list of variables that it shows (you might need to scroll), and then double-click on that entry to edit it. Add the full path of the "tools" and "platform-tools" folders of the SDK to your path. e.g. if the SDK has been installed in "c:\Program Files\android-sdk-windows", then add to your Path "c:\Program Files\android-sdk-windows\tools;c:\Program Files\android-sdk-windows\platform-tools" (Please Note - don't put any spaces between the semi-colon and pathname, otherwise it won't work !)if you want to.
Once done you can use ADB from the command prompt in ANY folder,very handy IMO.
If I was you I would set aside enough time and see it through,no point to temp rooting alone.
Get Titanium backup from the market an absolute essential app with this you can backup,upload to dropbox(Another essential app) uninstall apps and a host of other useful tools.
Read the guide first as well,good luck.

Portable Android Development

Hello everyone
Have you ever been bored in a borrowed pc and wanting to try out a new library/idea on your android but dont have admin privileges to install all the needed android tools? I was in this exact same situation, so i decided to engineer a solution (After all, i AM an engineering student ) to this boring problem. This solution works almost entirely like a standard Android SDK install (Only downside: Eclipse won't run your application) and has only been tested on Ubuntu Linux so you are on your own on other platforms, but the principle is the same, it might work after all.
Whenever prompted for a platform choose x86 , x64 needs ia32-libs which you cant install due to not having admin privileges
1. Create a directory for all the files and folders (I'll name mine "Development")
2. Download the JDK tar.bz file from http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1637583.html (You'd better search for an updated link when you read this tho) and extract it into Development
3. Download eclipse from http://eclipse.org/downloads/ (I used the Eclipse IDE for Java Developers) and extract it into the Development folder
4. Download the Android SDK from http://developer.android.com/sdk/index.html (If you are on windows, choose the zip!. Again, i've only tested on Linux so you are on your own) and extract it into the Development folder
5. Open the tools/android (It's a shell script) file with gedit/any other editor and edit the line containing java_cmd=".." to read java_cmd="/home/xxx/Development/jdk1.7.0_06/bin/java" (This is my case, make sure this line actually points to the place where you extracted the jdk zip, else this will fail)
6. Open a terminal, cd to the location where you extracted the android sdk, then type "./tools/android" and press enter (Without the quotation marks) to start the sdk manager, install the platform-tools package, the Jellybean (4.1) SDK, and any other SDK you may want, then close the SDK manager.
7. cd to the Development folder and run this "./eclipse/eclipse -vm jdk1.7.0_06/bin" (Assuming you kept the stock folder names from the zips) to run eclipse, then install the ADT as described here http://developer.android.com/sdk/installing/installing-adt.html.
8. When eclipse restarts, it will ask you for the android sdk, just point it to the location where you extracted it.
That's it, your eclipse installation is ready for you to write code.
Now, to debug you'll need to do so manually as eclipse won't somehow recognize this workaround to the usb priviliges (Linux won't allow adb to communicate with the phone unless it's ran as root [Which you can't, that's why you are here] or a configuration file [Again, written as root] is present) system so you need to do this to make adb work:
1. Disconnect your phone from 3G (Optional)
2. Connect your phone to your pc via usb
3. Enable usb tethering on your phone
4. Enable ADB over Network on Application settings
5. On the terminal emulator, run "ip addr show" and look for the usb section
6. On your computer, open a terminal and cd to the tools directory fo the android sdk, then type "./adb connect xxx.xxx.xxx.xxx" (Replace the x's with the IP of your phone, as it appears on the output of the previous command. Remember to use the one on the USB section)
7. Verify adb picked up your device by runing "./adb devices", if it lists an IP as a device, you are ready
Each time you want to test your app, export a signed apk from your project (I may write a small guide for that later, google will help you if you dont know how to do it) and run "./adb install xxx.apk" (Obviously, replace xxx with the path to your exported apk). The icon(s) for your main activity(ies) will promptly appear on your launcher. Again, Eclipse won't run nor debug your app using this method. (Maybe it's an SDK bug?)
I know it's not exactly streamlined but it's something for when you are on the go.
Hope you find this guide useful someday. Until next time.

Categories

Resources