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!
Related
I have a bash script running in work which automates the install of various APK samples (some malicious, some not - for testing purposes) to a HTC Desire Z handset running Sophos AV.
Runs well but every now and then an APK will try to install and the shell prompt will just hang at install. At the same time Sophos detects it as malicious but instead of displaying a box offering to uninstall it, it displays a box to delete it instead. Whether this is connected to the adb install issue I'm not sure but it's happened everytime.
It appears to install ok (2539 KB/s (634874 bytes in 0.244s)) .Package size is 640k.
I am running the command adb install -s /location/of/sample.apk
Any ideas?
Sorry for the lengthy post
Thanks
In case this helps others I had a different problem with similar symptoms. ADB install -r "apk path" would hang indefinitely.
I troubleshooted a myriad of things and identified that it was my USB cable length.
I have an USB extender cable as that I plug my devices into. The combined length of my device's cable and the USB extender cable caused this issue. Removing the extension cable fix the issue and eventually I replaced my USB extender cable with a shorter extension cable for the final solution.
try restarting adb server:
adb kill-server
adb start-server
Have you added udev rules file that contains a USB configuration for type of device you want to use.Incase you havn't that may be a reason for this issue. Execute 'lsusb -v' in Terminal. This will give information regarding Unique Vendor id of each connected device in a list.Find the Vendor id of your device.Once you identify the vendor id follow the instructions given in the link for Ubuntu environment. link:http://zoumpis.wordpress.com/2013/06/09/using-hardware-devices-while-developing-and-android-application/
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!
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.
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
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.