Setting up an Android device under Linux for development, without root - android

Hello StackOverflowers,
I am eager to try out some Android programs on my tablet in the early phase. However, I do not have root access to the Linux machine I am using (OpenSUSE 12.1). Due to this, I am having trouble to let the system find my device.
This tutorial http://developer.android.com/tools/device.html, as well as almost every post I can find online, do not mention ways to walk around the 51-android.rules setting without root. Some post even mention that, to find the device, the adb command should be run with root.
Does this mean I have no hope of on-device debugging? Thanks in advance!

I dont think you need root access for adb. Though for the device to be detected, AFAIK you need to add device details in rules.d .
If you have device and the computer on the same network, you could use adb over wifi. But to put the device in tcp mode , you need root access on phone or another computer where device can be detected.

Your device doesn't have to be rooted. After you add your device in 51-android.rules, make sure you restart adb server by using these commands:
adb kill-server
adb start-server
And one more thing, make sure you turn On Debugging Mode

Related

Connect remotely to an Android device via adb

I'm just testing the adb and I'm wondering if this is possible.
I mean, let's say I have adb installed on a aws instance, whatever the Ip it may be.
Then from there, I want to connect to my Android device via adb I don't know if adb connect can do the trick having the external Ip of the device.
From what I've learned, seems like it is possible, but it's kind of confusing.
Also, I see it's possible to connect without having the device rooted.
But most tutorials or examples are based on wifi, I just want to know if there is a workaround or even a command which can make this possible remotely.
Any ideas?
Thanks in advance!
I would try looking into Vysor. The main purpose of this tool is to be able to control an Android device remotely, but it also provides an option to share the adb connection to the device without a root. Its a powerful tool, that as many applications.

ADB | Having troubles with device connection

I am working flashing a custom ROM on a new device. Through a bit of research, I've found that I am able to completely circumvent the need to port Clockworkmod by simply using UniFlash on my Windows based laptop. From there, I am left with needing to port the ROM I desire, Cyanogenmod 12, to my device.
I've come to learn that I do not need to build from source, rather I can tailor an existing recovery to fit my device. I am unsure if that is true, so that may need to be cleared up. I went ahead and installed ADB and found a porting guide on the Cyanogenmod Wiki. This is where I am running into problems. I do not seem to have ADB permissions for my device.
When attempting to grab my build.prop, I get this return:
user#mypc:~$ adb pull /system/build.prop
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
error: insufficient permissions for device
After realizing my computer may not see the device, I tried to see which were connected:
user#mypc:~$ adb devices
List of devices attached
???????????? no permissions
It seems I do not have any access to the device at all. USB Debugging is connected, it is a rooted device, and it is set show as a USB Storage. I'm sure if I can at least get this fixed, I should be able to find my way through the rest of the guide myself.
Thank you for any help I can receive!
EDIT 01-
So, I decided to do more digging, and I guess I needed to START the server as super user, and not just run commands in super user.
After running this command, I was able to use my others with permission:
user#mypc:~$ sudo adb start-server
Now, I am running into a problem in which my device is offline:
user#mypc:~$ adb pull /system/build.prop
error: device offline
After referring to this (set up device for development (?????? no permissions)) thread, I seem to get a new response:
user#mypc:~$ adb pull /system/build.prop
error: device not found
I feel it's safe to say I should remove 51-android.rules from my ~/rules.d/.
Edit 02:
It seems I have answered my own question with research. I guess I just needed to update to the newest version because Android 4.2+ requires bridge authorization to complete tasks, and my version did not know to do that! I was successfully able to pull my build.prop!
The reason is that when you connect the USB device it shows a popup asking if you want to allow your pc access the device. You have to accept that manually from the device.
Something like this
http://www.gihosoft.com/android-recovery/img/allow-usb-debugging.png

Is there any way to stop ADB from automatically trying to connect to ANY android device plugged in?

So here's the thing. I use MyPhoneExplorer in USB mode which uses ADB to communicate with the phone. Whenever my phone is connected (using MyPhoneExplorer) and try to test an app in eclipse on my EMULATOR, ADB crashes, rendering both MPE and the emulator useless.
My question is: Is there any way to prevent adb from accessing one phone from multiple sources? (In this case its trying to access the phone for both Eclipse and MPE).
Weird/Confusing question I know, but would really appreciate some help.
I haven't tested this, but how about directing ABD at a given device with this:
adb -s <serialNumber> <command>
http://developer.android.com/guide/developing/tools/adb.html#directingcommands
Use adb devices to find out the serial number of your emulator.
But from what you describe it might be that ADB's device detection that's breaking things.

Loading an application from Eclipse to a real Android device over wifi

I read many articles on how we can launch an Android emulator faster.
I found this SO post where user286101 said that he "can load the app over wifi onto the real device in a fraction of the time".
My question is : how can I load an application, from Eclipse, to my real device through wifi ?
Regards.
I believe you must connect adb to your device using the command line: adb connect <host>[:<port>]. Then Eclipse will adb your device over WiFi.
Check out the adb docs.
This is adb wireless : http://www.appbrain.com/app/siir.es.adbWireless
butt your phone has to be rooted
I do it all the time via dropbox.com takes just a matter of seconds.
Just move the .apk to your dropbox folder and then open it from your device. This will work for both wifi and 3G.
In addition to bytebender's suggestion, you can transfer your apk with kies air as well, and run it by locating it with your Android's file browser. It's not exactly launching from eclipse, but this is what I had to do because I didn't have an OEM usb connector and the 3rd party (cheap) ones I had weren't connecting to my PC. I couldn't get the adb method to work. My phone does not have ROOT access.

connect Android 2.3 phone and use PC internet (ubuntu)

I managed to conect my phone to the computer and I am able to debug with eclipse but I need internet conection but the phone I got has no sim card and wifi at work doesn't work well (not possible to use wifi) so I woul like to create a bridge like instructed here but it doesn't work.
The problem is I think is that the phone is not rooted. I am not allowed to do any modification to the device like the rooting instructions you can find on the net. Is there something else I can do? just a temporary "su" or sudo on the device? I have the terminal installed on the device and I tried typing su and it says "permission denied". Is there an apk to just activate the su temporary to make the conection and that's it?
The phone is a nexus one with Android 2.3.4.
EDIT: I know I need a linux pc. And at the top of the page it was written that you need a rooted phone but I decided to try it anyway but it doesn't work it seams the phone doesn't "allow it" I also tried what was written on the link suggested but it doesn't work for me either.
You don't need root for reverse usb tethering. You can follow the steps normally without having to type "su" on your device?
If you read the page, you need a linux computer if you want to use reverse tethering AND adb and the same time.
The trick is that you need to execute this I guess:
./adb shell netcfg usb0 dhcp
to get the usb-connection on your phone.

Categories

Resources