Unable to debug via eclipse on phone with Jelly Bean - android

I have a nexus S for sprint that I am using as a developer phone rooted to be running android 4.1. Eclipse recognizes the phone, drivers, etc. I can run "adb devices" and the phone id is displayed. However, if I try to debug my app or any other imported project I get the following error:
Unable to open zip '/data/local/tmp/com.myapp.apk': Permission denied
(I would post the image but haven't posted here before)
If I manually transfer the .apk and install via Astro, everything runs perfectly. I am considerably lost and any help would be appreciated.

For anyone looking at this with a more recent version of the siyah kernal, if you don't wish to switch your kernel, you can use the "ExTweaks" app to change a settings under "MISC" called "ADB Binary Mode". I set this to "Development ADB"(was "Normal ADB") and can now successfully debug with eclipse! :D

I have a custom ROM installed in my Galaxy S2. Searching by google i came to this post: http://forum.xda-developers.com/showpost.php?p=29454043&postcount=203
The problem in my case was the kernel too (Siyah 3.5.2).
I installed another kernel for JB (http://developer.clockworkmod.com/downloads/51/3354/kernel-cm-10-20120801-i9100-signed.zip) and the problem was solved.

Basically
/data/local
doesn't have the right permissions, so a simple:
adb shell
cd /data
chmod 777 local
should work. (Not sure if the new permissions are overbroad, but I'm not too worried)

As per ekim's answer, I had the same issue, again, a Galaxy S2, etc. The latest version of Siyah fixes this problem and I can get back to running/debugging from Eclipse.

I updated SGS3 (I9300) to stock 4.1.1 ROM and I got the same problem.
After I unsuccessfully tried everything here and elsewhere suggested:
clean all projects
install via adb chmod 777 for /data/local/tmp (and direct subfolders)
dancing the chicken dance (dunno who suggested that, but at least it
produced some laughs ;)
etc.
I installed SiyahKernel S3-v1.6.8 and the problem was gone.
After inspecting my UMASK, I saw it's now 0000 (and it was 0077 on stock kernel), so I concluded that the wrong UMASK was the root cause of the error.
Still, as can be seen from numerous other threads on this issue out there, it's very wrong for the stock kernel to cause that problem.

Here's a quick way to see if it's a permission issue:
adb install -s Your.apk
this will install on the SDcard rather than /data/local

Related

How to root Genymotion Android Emulator?

I have downloaded Genymotion Android Emulator for personal use. I searched over internet to root this device, forums says that via adb shell its already rooted -"agreed".
Sumits-MacBook-Pro:sdk eSumit$ adb -s 192.168.57.102:5555 shell
root#vbox86p:/ #
root#vbox86p:/ # whoami
root
Found Genymotion configure apk, it will help to root access, if checkbox get clicked - "always allow su access", I did that as well, and then it get stuck like here. (see below)
If I restart by myself, it shows that no root access ?
May I know what I am missing here ?
Here are the pictures sequence :
I have also followed various tutorials e.g. Youtube - how to root genymotion emulator Android 7.0 but no solution yet
Apparently, there is some problem with the su binary. You can re-install it by downloading SuperSU zip archive and dropping it onto the device window. Restart will be needed.
Please note that the current version (2.79) does not seem to work due to missing /etc/fstab file on Genymotion systems. It works fine with 2.46.
Source: https://www.youtube.com/watch?v=YC9Bz5xVHCU
Make sure you have already installed Genymotion ARM Translation.If already,
Drag UPDATE-SuperSU-v2.46.zip to Genymotion Emulator(not sure other versions of SuperSU zips), and drop on it.It will confirm to flash zip file to emulator, click OK .After waiting for a while, you will get successfully message.Then, restart your emulator and check it with any Root Check App.Here is Tools file if you haven't it.I tested it on Google Nexus 5,Android 6.0 Emulator.I hope this will help for you.
Maybe it uses Iso file mounting system like Bluestacks that's why I guess it can't be rooted and also if it says its rooted then you can use UltraISO to modify root files only if it uses ISO file system.

Fail to install random APKs on Android

I'm running AICP on my Nexus 5, with android 5.1.1. I've been trying to install a few APKs I've found online, and I always get the same error which is Failure [INSTALL_FAILED_CONTAINER_ERROR].
I see other people online who have been able to install them, so I'm unsure why mine is failing. Although it only seems to happen with some APK files and not others. Is there anyway I can figure out more on why it would fail to install on my device?
If it helps I've tried running the APK files on phone and through ADB and same problem.
I've tried running my own APK files (signed) and they work perfect.
Unknown sources is definitely allowed. Also free space is about 6GB at the moment, so don't think thats the issue.
This usually happens when android:installLocation is set to "preferExternal" and your AVD has a too small SD card. You have to increase the size of the SD card or change installLocation to auto in AndroidManifest.xml as below, but I think you can't that.
android:installLocation="preferExternal"
to
android:installLocation="auto"
Also please have a look at this
I finally found a work around for the installation problem! Due to the help from varunkr, it does seem to be a storage problem from what I can tell. I was able to get it working though by changing the default install location of my device. Basically I had to do the following:
Connect my device to my computer with adb, rooted etc
I started root by typing adb root
Changed the default install location to internal by going adb shell pm set-install-location 1 in console.
Typed adb install applicationName.apk and everything work perfectly!!
I'm not sure if you want to place the default application installation back afterwards by placing it back to auto as follows: adb shell pm set-install-location 0
But by doing this I was able to get the application to install, and am happy I can get around it now.

Installing AOSP on nexus 7 (Wifi)

I am stuck flashing android to my nexus 7.
Steps to build image:
branch: refs/tags/android-4.4.2_r1
lunch : aosp_flo-userdebug
What i´ve done so far after building the image:
Like descibed in docs:
http://source.android.com/source/building-running.html
sudo fastboot flashall -w -p /home/stefan/bin/out/target/product/flo/
Gives me the following error:
could not load android-info.txt: No such file or directory.
So no luck with that, tried searching google but didnt find anything.
Downloaded an official rom 4.4.2 (KOT49H) from the nexus driver page:
https://developers.google.com/android/nexus/drivers
Deleted everything in the update package (zip) and putted my files in.
Then did sudo sh flash-all.sh
This method do flash the rom onto the device, but it also wont boot.
It hangs on the google splash screen.....
Is there anybody who can tell me how to properly flash my AOSP rom to device?
Your number 2 definitely will not work, and you shouldn't bother going down that route.
So the first issue you might have is you may be trying to build the wrong image, there are two Nexus 7s. Grouper is the designation for the first generation Nexus 7 and Flo is the designation of the 2013 Nexus 7, so make sure you have those right.
The second issue you may be having is the build may be failing. Are you sure that your make completed successfully? Your final message should say something similiar to
Install system fs image: out/target/blah/blah/blah/system.img
If you didn't see a line like that your build failed in which case you should diagnose that.
The third issue is you may be pointing at the wrong file. The line you are giving expects a full package, and you may not have created one. Try doing this instead:
sudo su
. build/envsetup.sh
lunch aosp_flo-userdebug
fastboot flashall -w
This will look for the generated files from the build automatically without you having to point at them, so long as you have selected the proper lunch option. Another issue you may be having is you may be confusing your shell with sudo, I am guessing you haven't bothered setting up the proper USB Permissions (see configuring USB access on the AOSP Build Guide. If you don't want to bother setting up USB permissions, then just initialize your environment as the super user after you have built when you need to flash (not before, or all your files will belong to root!)

Android 4.3 ADB push/pull

Today i bought the Samsung Galaxy Note 3 which came with Android 4.3. Since it's so new, i couldn't find a way to root my device, so instead i tried with the adb connection ... i failed.
So, i used this
D:\android\adt-bundle-windows-x86-20130219\sdk\platform-tools>adb push g:\save15.dat /data/data/com.creativemobile/dragracing/files/
but i got this
failed to copy 'g:\save15.dat' to '/data/data/com.creativemobile/dragracing/files/': No such file or directory
so, is there a way to copy my file to my device?
It should be
adb push g:\save15.dat /data/data/com.creativemobile.dragracing/files/
If you're allowed to push files/data there it will work.
you can use the
adb restore command for android 4.x.x
but you need to have an adb backup before.
but i think adb shell backup command does not work for android 2.x.x
maybe this will work for you
http://dragracingforum.net/viewtopic.php?f=262&t=13477
if not then you can ask the the post author i think he knows how to.
There's a bug in 4.3 that prevents this from working on a real, non-rooted device. https://code.google.com/p/android/issues/detail?id=58373
Yes, the following works on my limited edition nuclearsx-sp5
type these commands
adb reboot
adb remount
adb root
This is tested to work only on "improperly" (YES! I mean it) rooted devices which are known to have production builds. But it works on my samsung galaxy wonder (non-rooted)flawlessly.
Good luck!

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.

Categories

Resources