Xiaomi Redmi 3 and ADB - android

I've recenlty buyed the Xiaomi Redmi 3 for Android development but I have the following issue. The USB debugging is turned on, the ADB is connected. But when I try to install the APK file by typing the
adb install my.apk
I receive the following message:
/system/bin/pm[6]: app_process: not found
And nothing happens. When I try to install it from Android Studio it shows just like it running the app, but nothing is happening. Maybe someone have experience with dealing with that?

I fixed that by rooting the device. Don't know why it helps but I got it working.

Instead of rooting it, try this:
Go to Settings --> Additional Settings --> Privacy
Enable "Unknown Sources (Allow installation of apps from unknown sources)" option
Then try installing it. It should work.

Is the app listed as installed on your phone?
If it is, try uninstalling it and running install command again.

Related

Android Emulator keep showing allow USB debugging prompt

I just installed Android Studio Bumblebee (2021.1.1 Patch 2)
But when I try to run my emulator, I got allow USB debugging prompt that always showed up even after I press allow, check the always allow option, or even cancel it.
I already tried to restart my adb server and remove and create a new emulator, wipe the data and try to cold boot it, but the issue persists.
Does anyone know what is the root cause of this issue and how to solve it?
I can still develop using real device but I do want to know if this issue able to be resolved.
Emulator: Google Pixel 3 API 30
If the "Allow USB debugging" message is shown again and again then this is usually a problem of the host, not of the Android device.
You should reset the Android ADB authentication key by deleting it and then restarting ADB. A new authentication key (pair) will be generated which will hopefully work.
To do so delete the files adbkey and adbkey.pub in the folder ~/.android/.
Then execute adb kill-server and finally restart adb by executing adb start-server.
Note that this will reset USB ADB authorization of all devices you had connected to that PC/user account.
I had the same issue and and manage to fix it by turning off and back on usb debugging in emulator developer options. Still don't know what caused the issue in the first place.
I able to resolve this issue by creating new AVD with X86_64 system image.

com.android.ddmlib.InstallException: Failed to establish session react-native

I am trying to run react-native android app in my nexus5 emulator
adb devices
List of devices attached
emulator-5554 device
started packager react-native start
running app - react-native run-android
Installing APK 'app-debug.apk' on 'reactnative(AVD) - 6.0'
Unable to install examples/android/app/build/outputs/apk/app-debug.apk
com.android.ddmlib.InstallException: Failed to establish session
at com.android.ddmlib.Device.installPackages(Device.java:894)
at com.android.builder.testing.ConnectedDevice.installPackages(ConnectedDevice.java:113)
at com.android.builder.testing.ConnectedDevice$installPackages$0.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
at com.android.build.gradle.internal.tasks.InstallVariantTask.install(InstallVariantTask.groovy:119)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:226)
For Mi devices
for those who suffer from this, try what lironess mentions in a Github Comment
enable developer mode - In your phone, go to Settings, About phone and click on MIUI version 7 times. You’ll see a pop up which
says you are a developer now.
Go back to Settings, Additional settings, Developer options and enable USB Debugging.
Connect your phone to your PC/Mac and on the phone authorize your computer
go back to Developer options, scroll down to find Turn on MIUI optimization and disable it. Your phone will be rebooted
Try it now :)
Try : react-native run-android --deviceId YOUR_ID.
adb is known to be flaky. Try:
Restarting adb with $ adb kill-server
Restarting the emulator
Using Genymotion instead of stock Google emulator.
For your AVD emulator settings, try to make sure the "Use Host GPU" setting is checked, and relaunch the emulator and try again.
In my case, I have to run this command in
/sdklocation/platform-tools/
adb kill-server
then run again and watch for install request on the phone.
hope this help some one
For those like me having this issue in the emulator, one more tip: try to free up the available storage space in the emulator. That worked for me.
So many test apps and previous developed apps installed XD
If your device or emulator have an application having same name with the application you are building. Just remove the old one. It will resolve the issue.
If you had already installed app on device go delete it. It's work for me
Simply go to developer options and enable Install via USB below Debugging options.
Even i had the same problem,but restarting the genymotion and running the "react-native run-android" again worked for me.
Ensure genymotion is running before running the above command.
Probable Cause
I faced this issue recently , I had first developed an app called
'myApp' in CordovaJS where the app domain was com.myapp and had it
installed (this was months before I got into react ). Then when I
switched to react-native I did an app with a domain com.myapp and ran
into the same problem you are in.
So I figured out that there was conflicts when it came to domain and source .
Solution :
Uninstall the app that has a similar domain as the one that you are
installing eg com.example , then reboot your phone .
It worked for me , I hope it works for you too.
01 - Uninstall the app installed in device
03- then run
adb kill-server
02 -Then run again
react-native run-android
This issue happens to occur in Xiomi devices. In developers option, you don't have to disable MIUI optimization(disabling this won't sync your accounts) instead, enable 'USB debugging' option along with 'Install via USB' and 'USB debugging(Security settings)'.
This will solve the issue :)
Sometimes it may happened due to insufficient storage within emulator.Try something like below:
1. Stop emulator
2. Open AVD Manager -> Wipe Data
3. Start emulator and run your project.
step :1 run(kill all adb)
adb kill-server
step 2:list all connected devices(get your emulator id)
adb devices
step 3:(replace ID to listed id from step2)
react-native run-android --deviceId ID
Note: make sure your previous app uninstalled in your emulator or physical device
In MI Devices. I solve this problem by goto Developer options -> turn on Install via USB. I hope it useful!

Unable to debug via eclipse on phone with Jelly Bean

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

Problem installing an app on a device - NO PERMISSIONS

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!

Android: Logcat]device not found on running Google's sample Notepad app

I opened my NotepadCodeLab, NotepadAdv1 project, and got this as soon as I built and ran:
[2010-11-01 14:42:48 - DeviceMonitor]Sending jdwp tracking request failed!
[2010-11-01 14:42:48 - Logcat]device not found
com.android.ddmlib.AdbCommandRejectedException: device not found
at com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:736)
at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:373)
at com.android.ddmlib.Device.executeShellCommand(Device.java:285)
at com.android.ddmuilib.logcat.LogPanel$3.run(LogPanel.java:516)
What am I missing?
Emulator or physical device? If emulator, is it already running? If it's a device, is it connected via USB?
Assuming you have the SDK installed and on your path, if you type "adb devices" into the command prompt, your device should show up. If it doesn't, follow the SDK installation instructions here:
http://developer.android.com/sdk/installing.html
If you're using a real device, don't forget the USB driver. You also have to have installed into your SDK and AVD manager the correct version for your phone. If you were upgraded to v2.2, also install v2.1.
Bizarrely, when I came back the next day (after restarting Eclipse/my computer), it worked. Should have tried that first. Thanks though :)

Categories

Resources