I have a simple script that downloads database from phone to my PC
it uses 'run-as', it worked well, but now, run-as says 'package is unknown'
my application is installed on device, nothing changed, just Android was updated to 4.3
Do you have the same problems? how to bypass this or resolve ?
We ran into the missing run-as problem when the Galaxy S4 released without it. We were using run-as to start a gdbserver for app debugging.
We worked around the issue by starting gdbserver as an Android service. More details at run-as Package 'a.b.c' is unknown - Galaxy S4 Jellybean or Android 4.3
I changed a little my script, but it needs phone to be rooted
%adb% shell "su root cp /data/data/%PACKAGE%/databases/%DB% /sdcard/my/%DB%"
%adb% pull /sdcard/my/%DB% db
Just spent half a day faced the same problem on my Nexus 7 (800x1280).
The issue described here, as user408952 mentioned:
https://code.google.com/p/android/issues/detail?id=58373
Answer #32 from the link above worked for me: I've installed 4.3 factory image and everything works. No root needed!
Related
This question already has answers here:
adb server version doesn't match this client
(41 answers)
Closed 4 years ago.
Update (11/10/14): Genymotion has released 2.3.1 which fixes this issue. https://cloud.genymotion.com/page/changelog/#231
Update (10/21/14): Genymotion replied to my support email and indicated the solution recommended by #plackemacher below is the suggested fix at the moment. They are aware of the issue.
Since upgrading to Lollipop, I'm having adb issues when using a Genymotion emulator. Devices don't show up in Android Studio, and I've also gotten the following error when trying to run adb devices:
$ adb devices
adb server is out of date. killing...
cannot bind 'tcp:5037'
ADB server didn't ACK
* failed to start daemon *
error:
I'm not sure if it's because of the Lollipop upgrade or coincidence.
Edit/update:
Per Chris Satton's comment, I investigated if multiple adb processes were running (ps aux | grep adb), and it looks like it's a Genymotion conflict(?). It looks to include its own version of adb.
greg 72550 0.0 0.0 611164 1508 ?? S 4:14PM
0:00.02
/Applications/Genymotion.app/Contents/MacOS/player.app/Contents/MacOS/tools/adb
-s 192.168.56.102:5555 shell
greg 72523 0.0 0.0 635956 2296 ?? S 4:14PM 0:00.02 adb -P 5037 fork-server server
Try running this:
killall -9 adb
That should remove all running traces of the daemon
Edit: Best solution below
This issue may be adb incompatibility with the newest version of the platform SDK. The best solution for this issue with Genymotion is to set the Android SDK within Genymotion to your location. This can be found within the Settings page.
In my case the problem was that I have installed adb tools and fastboot using this command
sudo apt-get install android-tools-adb android-tools-fastboot
From repository, so in this case this executables goes to the /usr/bin/ directory in order that you can use it system-wide ($PATH variable).
In addition, I am running android studio with genymotion configured like in the answer above.
So when I was trying to acces adb (adb shell in my case) it was trying to start another copy of adb process (server) and bind to default port, so the problem was here.
I have just uninstalled the android-tools-adb android-tools-fastboot and added the path to my Android SDK to the $PATH variable
Using genymotion on ubuntu.
My solution was to actually use the binary instead of the PATH'd adb.
~/genymotion/tools/abd reboot
Also I have the custom SDK in genymotion.
What worked for me finally and what I think is hastle free is that you simply run the adb commands directly from platform-tools folder. For example, use ./adb devices to view the devices.
I also changed genymotion's SDK to android's default SDK but I'm not sure if it won't work without doing that.
I think ,if you want to use adb its better to use android studio emulator and test what you want, after you can use Genymotion
None of solutions helped for Ubuntu.
Just drag .apk file onto Genymotion device's screen and app will be installed.
Ubuntu 15.04, Genymotion 2.5.2
The accepted answer did not work for me, although the idea did, just with a different command:
pkill adb
I'm running ubuntu MATE 1.8.2 and Genymotion 2.6.
Add the Android SDK to the $PATH variable.
I just used ./adb reboot on Android/Sdk/platform-tools/
This question already has answers here:
adb server version doesn't match this client
(41 answers)
Closed 4 years ago.
Update (11/10/14): Genymotion has released 2.3.1 which fixes this issue. https://cloud.genymotion.com/page/changelog/#231
Update (10/21/14): Genymotion replied to my support email and indicated the solution recommended by #plackemacher below is the suggested fix at the moment. They are aware of the issue.
Since upgrading to Lollipop, I'm having adb issues when using a Genymotion emulator. Devices don't show up in Android Studio, and I've also gotten the following error when trying to run adb devices:
$ adb devices
adb server is out of date. killing...
cannot bind 'tcp:5037'
ADB server didn't ACK
* failed to start daemon *
error:
I'm not sure if it's because of the Lollipop upgrade or coincidence.
Edit/update:
Per Chris Satton's comment, I investigated if multiple adb processes were running (ps aux | grep adb), and it looks like it's a Genymotion conflict(?). It looks to include its own version of adb.
greg 72550 0.0 0.0 611164 1508 ?? S 4:14PM
0:00.02
/Applications/Genymotion.app/Contents/MacOS/player.app/Contents/MacOS/tools/adb
-s 192.168.56.102:5555 shell
greg 72523 0.0 0.0 635956 2296 ?? S 4:14PM 0:00.02 adb -P 5037 fork-server server
Try running this:
killall -9 adb
That should remove all running traces of the daemon
Edit: Best solution below
This issue may be adb incompatibility with the newest version of the platform SDK. The best solution for this issue with Genymotion is to set the Android SDK within Genymotion to your location. This can be found within the Settings page.
In my case the problem was that I have installed adb tools and fastboot using this command
sudo apt-get install android-tools-adb android-tools-fastboot
From repository, so in this case this executables goes to the /usr/bin/ directory in order that you can use it system-wide ($PATH variable).
In addition, I am running android studio with genymotion configured like in the answer above.
So when I was trying to acces adb (adb shell in my case) it was trying to start another copy of adb process (server) and bind to default port, so the problem was here.
I have just uninstalled the android-tools-adb android-tools-fastboot and added the path to my Android SDK to the $PATH variable
Using genymotion on ubuntu.
My solution was to actually use the binary instead of the PATH'd adb.
~/genymotion/tools/abd reboot
Also I have the custom SDK in genymotion.
What worked for me finally and what I think is hastle free is that you simply run the adb commands directly from platform-tools folder. For example, use ./adb devices to view the devices.
I also changed genymotion's SDK to android's default SDK but I'm not sure if it won't work without doing that.
I think ,if you want to use adb its better to use android studio emulator and test what you want, after you can use Genymotion
None of solutions helped for Ubuntu.
Just drag .apk file onto Genymotion device's screen and app will be installed.
Ubuntu 15.04, Genymotion 2.5.2
The accepted answer did not work for me, although the idea did, just with a different command:
pkill adb
I'm running ubuntu MATE 1.8.2 and Genymotion 2.6.
Add the Android SDK to the $PATH variable.
I just used ./adb reboot on Android/Sdk/platform-tools/
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!
I'm trying to get my android phone working to run apps from inside an IDE.
Got it working on windows no problem, currently working in fedora (18) a lot though so wanted to get it working with that.
Got IntelliJ and android sdk installed, problem is when I try to run the default hello world app it wont work it just says waiting for device..
Ran adb devices got
List of devices attached
???????????? no permissions
Leads me to believe the driver isn't installed? Phone I'm using is a HTC Sensation. Does anyone know what I can do to try and resolve it? The HTC web page doesn't offer me drivers to install.
Also noticed in /etc/udev/rules.d/..android.rules there is nothing about Sensation. Seems it recognises my nexus 7 though..
Edit: Tried my nexus.. got
List of devices attached
901839238298923 offline
So it doesn't even work with that.. confusing..
Any help would be appreciated.
Thanks,
B
For HTC try downloading HTC sync and give a try..
I also had this problem and i used eclipse IDE. I Re connected and try 2-3 times and after that i run adb devices I got it as online.
Also check out for the devices TAB in eclipse(if you are using that) .It also gives a list of attached devices.
Also try adding this android:debuggable="true" to application tag(<application>) in androidmanifest.xml
Hope it helps :)
As you are installing from the beginning, have you updated the SDK manager. I have had this issue before too, every time on a new computer it trips me up. If SDK manager isn't loading see here: Android SDK manager won't open
I get a similar problem when my user have no permissions, so I did a script to restart the adb on fedora as root:
Script Gist Link
the script basically runs it:
su -c ' \
ADB="/path/to/your/sdk/platform-tools" && \
$ADB/./adb kill-server && \
$ADB/./adb start-server \ '
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