Problem installing an app on a device - NO PERMISSIONS - android

I'm trying to install my test app on my device, but I does not go there.
I've also prepared my phones as described here: here
1 - In eclipse I see the device with '??????????' as ID.
2 - with adb device, I get:
List of devices attached
???????????? no permissions
I edited the /etc/udev/rules.d/51-android.rules....not sure what else to do?
3 - I copies the app to my SD card and tried to installed it from there ... but at a point the installation stopped and the message was 'Application not installed'
Also! The app gets intalled on my friends phone via eclipse?
Can anybody give me a hand with this???
Thanks!

Ensure your machine is connected to the Phone device correctly..
If the error persists, you can try restarting the adb server, using following commands:
adb kill-server
adb start-server
adb devices
If the error still persists, try restarting both your development machine and phone device.

I've seen that before when the user you are running as did not have permissions. If you're using Ubuntu try running adb via sudo:
sudo adb devices
If you're using another distro either try as root, or use sudo, accordingly. (Assuming you're using Linux, and probably Ubuntu, if you're in that part of the instructions on the page you linked -- but that info in the question would help too.)
Also make sure you're using the correct vendor ID for the device you're trying to use. The instructions show 0bb4 as an example only (that will only work for certain HTC devices). You can use the lsusb command to check to make sure you're device is detected by the OS, and get the correct ID.
lsusb
Bus 002 Device 100: ID 18d1:4e12 Google Inc. Nexus One Phone (Debug)

absolutely beyond my comprehension - the device got found (recognized) after deselecting the Settings > Applications > Development > USB debugging....
:) I signed with relief ...
Thank you very much for the enthusiasm and help!

Related

No USB devices or running emulators detected, despite ADB detecting the phone successfully

I know this question was asked a lot, but going through dozens of answers none have been helpful.
I'm attempting to run a simple hello world on my Huawei Mate 9 using Android Studio 2.3.1 (The APP is 4.X Jellybean API) running on Debian (Jesse).
-I have enabled debugging options on the phone (I can see developer options)
-Installed the SDK and ADB through the Android Studio.
-Device is being detected successfully on ADB devices.*
-I have tried MTP and PTP (currently it's on PTP)
Despite all different combinations I don't see my phone ready for uploading my program.
*With android studio closed:
when I check adb it usually never finds the phone the first time (adb devices) but after i do kill-server and start-server, i get the unique phone ID the second time I run adb devices. Needless to say, should I run studio after the second time around when it detects it, the phone still does not appear.
Thanks
Try this two solutions :
1) Go to setting and than in security and enable " Unknown source " to allow installation of apps from unknown source. If its still not working try second solution.
2) This problem can be due to unsupported adb driver of you mobile model. For this Download PdaNet+ a universal adb driver downloader for all devices. It will ask to remove current driver and go for it. It will fix all the adb driver related issue.
Link : http://pdanet.co/a/
So after rigorous search, I've found the reason for incapability of finding the phone in the android select deployment target menu is due to an option within a hash code menu.
You need to dial ##2846579## (works on Huawei 7 and onwards phones) in order to find a hidden window, for me it says ProjectMenu as the activity title name, then you must pick Background Settings->Background Debug->Open then restart your phone, should you have avd,android running well on your pc and debugging options activated on your phone this is all that's needed in order to deploy your app successfully.

How to "remove" root access from Android Emulator and get normal shell prompt in adb?

I am using adb(Android Debug Bridge) and working with shell in the Genymotion Emulator(I have mentioned every configurations at the end of this question).
I execute "adb shell" and get the shell successfully but the problem is that I get the root access on the emulator. I don't want root shell, I want the normal one as we get when we execute 'adb shell' on the actual device connected via USB. How to achieve it ?
Any help would be highly appreciated.
*Configuration :
Ubuntu 13.10, 32-bit.
Eclipse 4.2 with ADT.
Genymotion Emulator(To be specific, I was using Android 4.3 here).
adb shell setprop service.adb.root 0
adb shell setprop ctl.restart adbd
or
adb unroot
for short.
It has been long since I posted this question but still want to answer it as it might help someone in need.
Main purpose of mine was to get a non-root shell on emulator for some testing purposes but failed to do so after many attempts.
Sometimes back, by fluke, I was fiddling around playstore app inside emulator and indirectly came across solution to above question.
I noticed while creating an emulator, if I used "Google Play" as the image, I got an emulator which was not root.
Follow below steps to get an Android emulator without root:
Create a new virtual device and select the one where "playstore" column has playstore icon (small triangle) visible, as seen in screenshot below.
In next step, download appropriate files needed for creating the device. Make sure to select the target/ABI as "Google Play" and not "Google API". It will make all the difference. In below image you can see I have 2 AVDs (Android Virtual Devices), first (andy_7) with target as "Google API" and another (nexus_5) with target as "Google Play".
Start the avd with target Google Play, nexus_5 in our case and we will get the desired result.

Android adb (OSX Lion) does not recognize Galaxy Nexus, Jelly Bean

I've been developing my first android apps on Eclipse installed on OSX Lion. I would like to use my Jelly Beans Galaxy Nexus for debugging, but the Android Device Bridge (adb) can't find the device:
./adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
The phone is in debugging mode.
The phone is recognizable as a camera (PTP), but not as a media device (MTP). ADB does not work regardless of PTP\MTP setting.
I have restarted noth the phone and the mac
Following this advice, I've installed Android File Transfer. The ATF recognizes the device, but no luck with the ADB.
Any ideas?
Addendum: I have reported a bug for this. Workarounds are still most welcome!
Sep 5 13:28 UTC - Workaround #1: Dropbox: I've moved the OSX Eclipse workspace to Dropbox and installed Dropbox on the device. The APK is written to bin/, and I re-install it from the Dropbox app after each successful build.
I'm answering this because my boss just had the exact same issue with his Galaxy Nexus, and we finally fixed it yesterday. He had an application, "EasyTether" that was snagging his connection to ADB and it couldn't be used anywhere else. Is it possible that you've setup this application, or a similar one that might be using ADB for you? If "Android File Transfer" works (it was working in parallel with EasyTether for my boss), then your connection is active, so as long as "USB Debugging" is enabled in your settings, you should be seeing a connection. Here's a quick how-to in the event that you do have "easytether"
BEFORE you plug your phone in run the following in terminal
sudo kextunload /System/Library/Extensions/EasyTetherUSBEthernet.kext
If that fixes the issue, and you want to remove easytether altogether, you can us the rm command with the -rf flags to keep it from happening again...
sudo kextunload /System/Library/Extensions/EasyTetherUSBEthernet.kext
sudo rm -rf /System/Library/Extensions/EasyTetherUSBEthernet.kext
You can use adb over wifi.
See this post to do it yourself.
or there are quite a lot of apps on google play. But these need root access
Try taking the usb stick out of the phone and put it back
Try taking it out of the mac and put it back
Try to put the stick in another port
Try to wriggle the stick so you are sure it is connected.
There is a long discussion with possible solutions here: Can't find android device using "adb devices" command
Have you tried a different cable? I ordered a bunch of cheap cables off of eBay, and the first one I used would not work for adb. It did work for charging and file transfers however.

Can't connect Nexus S to my Mac OS x Lion 10.7 for USB Debugging

I tried to connect my Nexus S (Android version 2.3.5) to my macbook pro 10.7 (OSX Lion). However, the notification on android phone was just ON and OFF alternative. I tried this command on my terminal.
adb usb
>>error: device not found
adb devices
>>List of devices attached
>>[ nothing here ]
Please help me with this issue. Thank you!
Make sure you don't have a power-only USB cable. If the phone charges but Mac doesn't think it's there, it's a sure sign.
Also, if that does not work, check to see if the device shows up under USB in the System Profiler (included in OS X). If it is showing up there, but not in ADB, try adding the USB Vendor ID of the phone to ~/.android/adb_usb.ini
This file can be created if it does not already exist. The Vendor ID of the Nexus S is 0x18d1. Please make sure the last line of the file is a Vendor ID, do not leave a blank line at the end.
It seams that there are some problems with debugging an Android device on OS X (most describe this problem after updating to Lion).
There are some threads/discussions which offer a few possible workarounds, see if one of them works for you:
OS X 10.6.6 and "adb devices" fails to list android devices
The Issue on the Google Bug-Tracker
Although, this seams to be a problem on Google / Apples site so you can only check if you can work it around.
I had same problem with my N-06C which is made by NEC and solve by writing code less kext.
http://8kpxen.blogspot.com/2011/08/how-to-adb-to-your-android-device-on.html
Please read this blog and download kext.
Since this kext file is configured for N-06C, please modify for your environment.
This happened to me, checked ADB in Eclipse, and was able to select and push file to device. Pushed APK and installed.
I know, horrible solution but Lion has been a nightmare for most developers. Hopefully the updates keep comin!
I have a similar issue. I can issue commands via ./adb shell like ls, but not push and pull, and when i do ./adb devices, it shows my device id, but when i start an interactive shell, adb devices shows nothing. i can still list files in the interactive shell, but still no push or pull.

How can I debug my android app on NexusOne

I have rooted my NexusOne. I can get 'adb shell and su'.
But when I deploy and run my android app on NexusOne and start my application. Under DDMS (connected to the phone of course), I DO NOT see my application. I see some apps but not mine.
How can I make my application visible under DDMS so that I can debug my application using eclipse on a rooted NexusOne?
Thank you.
Since you can see some apps but not yours, I assume you have adb working and your phone configured properly.
The next thing you'd need to check is to make sure that the "debuggable" flag is set in your application manifest. In AndroidManifest.xml, add android:debuggable="true" to the element.
See the official docs for more. You do not need a rooted device to debug apps.
On ubuntu I have to run the following commands for adb to properly recognise my devices:
cd <android sdk root >/tools/ (or platform-tools/ for newer SDK's)
sudo ./adb kill-server
sudo ./adb devices
This then gives adb the right permissions to access the devices.
Then in Eclipse looking in the DDMS perspective, you select the device you want to debug (on the left) and then look in logcat (not the terminal) to see the log.
Not a solution but useful to know, Log Collector is a free app on the market which sends logs to any e-mail address and is often useful for debugging.

Categories

Resources