I have an MXQ-4k Box TV and I need to install an app by adb wifi connection since my pc doesn't recognize the USB connection. I can access the device via adb connect ip:5555, but when I try to run adb install , the output is:
Performing Streamed Install
adb: failed to install app.apk: Failure [INSTALL_FAILED_INTERNAL_ERROR]
There is some way of calling the adb install with the path of some application installer locally at the device, e. g. adb install 192.168.15.5:/storage/emulated/app.apk?
Try this:
If you have a sdcard, otherwise change the target path:
adb connect ip:5555
adb push your.apk \$SECONDARY_STORAGE
adb shell pm install -t -r "\$SECONDARY_STORAGE/your.apk"
adb shell "rm \$SECONDARY_STORAGE/your.apk"
You also can try adb install -t "your.apk" and see if it helps.
Related
I am running a headless emulator (Android api 25) on a Ubuntu linux 14 server and I see the below output for the command-
$./adb devices
List of devices attached
emulator-5556 device
However, If i try to run any other command I get error
$./adb shell dumpsys deviceidle get deep
Can't find service: deviceidle
$./adb shell 'pm list packages -f'
Error: Could not access the Package Manager. Is the system running?
How can i verify that my emulator is functional?
is adb devices -l not working? it should show you the status of the device as well
try adb push, for eg
adb push foo.txt /sdcard/foo.txt
or adb install for eg
adb -s emulator-5556 install apkname.apk
these commands will work with any running emulator/device
all these commands are available on the documentation
I've connected the smarthpone (rooted) to the PC (Linux) with ADB.
Eveything works fine excepts the fact that I can't unistall apps from shell. I've tried :
adb unistall com.mirsoft.passwordmemory
adb unistall -k com.mirsoft.passwordmemory
And I get the help message as return.
I've also tried:
adb shell pm unistall com.mirsoft.passwordmemory
adb shell pm unistall -k com.mirsoft.passwordmemory
Getting as return
Error: unknown command 'unistall'
followed by the help message.
Other commands works fine.
Am I doing something wrong?
uninstall has an n after the i. Use adb uninstall com.mirsoft.passwordmemory.
You can also try to uninstall with the rm command:
adb shell rm com.mirsoft.passwordmemory
Don't​ forget typically the su command to grant the super user permissions.
What's the difference between installing an app using the install command and using the package manager's pm install command? Do they do the exact same job? Does one command actually call the other in the back?
adb install -r APK_FILE
adb shell pm install APK_FILE
adb install is a command to run from a development host, which uploads a package somewhere temporary and then installs it.
pm install is a command to run locally on the device.
adb does indeed utilize the pm program on the device - see the source code at
https://android.googlesource.com/platform/system/core/+/kitkat-mr2.2-release/adb/commandline.c
my problem is about android and the adb commands. I'm working on a Nexus 5 and i want to install and apk with adb commands. So i start with adb devices, my mobile is detected by the computer so i go to the repertory where the apk is located and i launch adb install name.apk
It returns :
* daemon not running. starting it now on port 5038 *
* daemon started successfully *
error: device not found
- waiting for device -
The Nexus 5 is rooted, and usb debug is activated
adb devices give me some sort of serial number of the mobile
If adb devices gives you a list of devices, then you could try to take serial number of your device and call adb -s <serialNumber> install name.apk. Here is more options you could try.
If you are using Ubuntu try restarting the adb server by giving sudo permission.cd > adb location and do sudo ./adb kill-server and sudo ./adb start-server.
I need remote ADB shell..
I know that we have to issue "ADB tcpip ".. to change ADB server to TCP listening mode.
But, the problem is that my phone is not rooted, and I do not have USB cable.
I can't issue tcpip command since I do not have USB cable,,
I can't change default.prop file as the phone is not rooted.
Is there any other ways to change ADB server to TCP listening mode???
I found an articel that says you can execute setprop persist.adb.tcp.port 5555 to make tcpip mode autostart after reboot.
The problem is, you must run this command as root.
On my device unfortunally the command su doeas not exist.
Here is the orginal Permanent network debugging on android
EDIT: I discovered, that the su command is only available when your device is rooted.
So the solution only works when you have a rooted phone
The simple answer is: no, you can't.
As you said, you can't access the prop file and don't have a cable to change with ADB. The only way is you find the port via an Android terminal emulator (a.k.a Termux)
For anyone looking for a better answer:
YES, YOU CAN!!
When you try to execute "adb tcpip 5555" without an USB cable, it returns:
"error: no devices/emulators found"
Emulators?? After googling I found the way and made a batch file that connects my device directly through WIFI, no cables needed at all:
set /p ip= Device IP:
:CONNECT
if "%CD%"=="C:\" goto ROOT
cd ..
goto CONNECT
:ROOT
cd ...Android\Sdk\emulator
echo.
echo Starting emulator...
start /MIN emulator -avd Nexus_5X_API_29_x86 -no-window
(you can check other avaliable devices with "emulator -list-avds")
cd ..
cd platform-tools
adb wait-for-device
echo.
echo Emulator started.
echo Connecting with device...
adb tcpip 5555
adb connect %ip%
echo.
echo Closing emulator...
(you need it just to be able to execute "adb tcpip 5555")
adb -s emulator-5554 emu kill
(you can check the name with "adb devices")
To enable wireless debug need to configure the ADB command. (in mac os)
Step1:- First of all need to enable adb command. (check SDK tool and install command-line tools)
Step2:- connect the device with a USB cable after that run the below command.
command: adb devices
the above command will show a list of connected mobiles.
Step3:- after that, we need to configure TCPIP protocol:
e.g : adb tcpip 5556
Step4:- Run command to connect the device.
command: adb connect your_ip:port_address
eg:- adb connect 192.168.1.152:5556
If you are using the stock android os system, then you can enable remote debugging in Settting -> developer options.