Tag Archives: apk

The ADB command installs APK, and the installation problem is solved by daemon not running. Starting it now on port 5037

Programmer algorithm practice must read, common Java API skills to share>>>

To test the client application on the mobile phone through the mobile phone, it is generally necessary to install the tested application APK into the mobile phone first. The installation steps are as follows:

[preset conditions]

1. Through “start” of PC, enter CMD in the running box and press enter to open the edit interface of CMD

2. If the mobile phone is connected to the PC, the PC can recognize the mobile phone. Enter ADB devices in the CMD editing interface and press enter to check whether the current mobile phone is connected. If the device information is displayed, the identification is connected, as follows:

C:\Users\posuo> adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
TWG0115A27000150 device

[installation command]

ADB install – R xxxx (APK local storage path)

Success will be prompted if the installation is successful

Where: – R: indicates that the installation can be covered

Possible problems: the computer does not recognize the mobile phone, the solution:

1. After the mobile phone is connected to the computer, make sure that the driver of the mobile phone has been installed on the computer

2. In the mobile phone “Settings” – “developer options”, open “USB debugging”

(if you can’t see “developer options” in mobile phone settings, enter “Settings” – about mobile phone, and click the version number column many times – this method is common for Huawei mobile phones.)

3. Enter ADB devices in the CMD editing interface. If the following error is reported, it is caused by the occupation of port 5037. Find out the application occupied by the port and kill the application process

C:\Users\posuo> adb devices
* daemon not running. starting it now on port 5037 *
ADB server didn’t ACK
* failed to start daemon *
error: cannot connect to daemon

Methods:

First of all, find out the application (process) whose port 5037 is occupied, and input in the CMD interface:

C:\Users\posuo> netstat -ano | findstr “5037”
TCP 127.0.0.1:5037 0.0.0.0:0 LISTENING 12476

Note: 12476 is the process number of 5037

Then, kill the process and enter:

C:\Users\posuo> Taskkill – F – PID 12476
success: the process with PID 12476 has been terminated

This is the end

You can input ADB devices in the CMD interface to check whether the mobile device is recognized by the computer. If not, the connected mobile device information will be displayed

If the above method is still unable to identify the mobile phone, delete the application similar to pea pod in the computer and mobile phone, and then carry out the above problem solving steps

[Solved] An error occurred when installing the apk, Failure [INSTALL_FAILED_DEXOPT]

After compiling the apk in the android4.0 source code, when installing with adb install (or adb install -r reinstall), an error [INSTALL_FAILED_DEXOPT] is reported.

xu@xu-PC :~$ adb install workspace/out/target/product/generic/system/app/xxx.apk
2820 KB/s (225970 bytes in 0.078s)
pkg: /data/local/tmp/xxx.apk
Failure [INSTALL_FAILED_DEXOPT]

or

xu@xu-PC :~$ adb install -r workspace/out/target/product/generic/system/app/xxx.apk
2768 KB/s (225970 bytes in 0.079s)
pkg: /data/local/tmp/xxx.apk
Failure [INSTALL_FAILED_DEXOPT]

This is because the apk under system\app is optimized, and the dex file will not be packaged into the apk. The dex file will be optimized to generate an odex file .

The following are the two files .odex and .apk generated under workspace/out/target/product/generic/system/app/ after the program is compiled

Install: out/target/product/generic/system/app/xxx.odex
Install: out/target/product/generic/system/app/xxx.apk

When installing the apk in this way, the dex file will be missing, resulting in an error [INSTALL_FAILED_DEXOPT].

–>Solution:

Find the unoptimized apk, that is , find the corresponding APP under out/target/product/generic/obj/APPS/ :

xu@xu-PC:~$ adb install workspace/out/target/product/generic/obj/APPS/xxx_intermediates/package.apk.unaligned
2400 KB/s (331697 bytes in 0.134s)
pkg: /data/local/tmp/package.apk.unaligned
Success
xu@xu-PC:~$

If you have already installed the program, you can reinstall it:

xu@xu-PC:~$ adb install -r workspace/out/target/product/generic/obj/APPS/xxx_intermediates/package.apk.unaligned
2873 KB/s (331689 bytes in 0.112s)
pkg: /data/local/tmp/package.apk.unaligned
Success

 

This installs ok!

Download the APK installation file of the free app directly from the Google play store

Why are there a series of technical challenges behind “OMG buy it”>>>

Some time ago, I found a website made by foreign netizens http://apps.evozi.com/apk-downloader/ , which is really helpful for mainland users using Android phones. Its function is to download APK files of free applications from Google play. As everyone knows, Chinese mainland Android mobile phones have various difficulties in accessing Google Play Store. Besides being unable to purchase paid applications, they can not download and install many excellent free applications at home and abroad. The threshold of using paid applications is slightly higher. We can ignore them temporarily, but many free applications restrict Chinese mainland users to download and use mobile phone. I won’t agree to that. Although the reason given by Google play store is that it is not compatible with my mobile phone or tablet device, I know it is just an excuse, so I must find a proper way to download it and install it successfully

The purpose of the above website is to download and install the APK file of free app directly from Google play store. Next, let’s see how to operate the website after it is opened. The following is a screenshot of the website:

You can see from the figure that the page is very simple, with only one text box and one button. The way to use it is to copy and paste the URL address of the free app on Google play store, and then click [generate download link] to generate a new download link. Through the latter, we can easily download to the app’s APK file. Here I use the Google play store link of Yahoo Mail mobile client( https://play.google.com/store/apps/details?id=com.yahoo.mobile.client.android.mail )As an example, after entering the URL address and clicking the [generate download link] blue button, the interface is as follows:

At this point, it means that the new download address has been generated. Click the green button of [click here to download…] to download the APK file. The operation is very simple and convenient

However, it should be noted that the URL must be the Google play store address containing the full package name of the application, just like the address of Yahoo Mail above. The package name following the ID is com.yahoo.mobile.client.android.mail instead of other names. Only with this ID can the package be downloaded successfully. Another point is that this website can only download free application installation packages. For paid applications, due to the strict restrictions of foreign copyright laws, it can do nothing

In addition, when I use this website, I find that the owner of the website seems to be constantly updating the website. Now the content of the page is more and more. Previously, there was only a search and download interface, but now it has developed a Chrome extension. At the bottom of the page, there are also user guides, user donations and comments. So far, there are 1160 comments, It seems that there are quite a lot of users. Those who are interested can go and have a look by themselves

Post this address again: http://apps.evozi.com/apk-downloader/

Error: install_ FAILED_ UPDATE_ INCOMPATIBLE

Why can’t you stop buying 618?From the technical dimension to explore>>>

record a delete_ FAILED_ INTERNAL_ Error error while installing apk

I met this problem before

Option 1

Delete the directory of the package name of the application under the data/data/directory, such as: ADB shell RM – RF data/data/com.demo.helloworld/

Then restart the phone

Or just turn off instant run

When the new version of Android studio runs APK, delete appears_ FAILED_ INTERNAL_ Error, error while installing apks
there is a way: open settings and find build > Instant run, remove the tick on the right and try to install again

Option 2:

Step 1: delete the existing APK with the same package name, such as ADB shell RM system/APP/outdoormeter/outdoormeter.apk

Step 2: delete the directory of the package name of the application under the data/data/directory, such as: ADB shell RM – RF data/data/com. Runbo. Outdoormeter/

Step 3: restart the Android mobile ADB reboot

Step 4: re install the APK

Reference address

http://blog.csdn.net/ouyang_ peng/article/details/50419276

https://stackoverflow.com/questions/38892270/delete-failed-internal-error-error-while-installing-apk

Android: installation error: install_ FAILED_ UPDATE_ Incompatible solution

Why can’t you stop buying 618?From the technical dimension to explore>>>

record a delete_ FAILED_ INTERNAL_ Error error while installing apk

I met this problem before

Option 1

Delete the directory of the package name of the application under the data/data/directory, such as: ADB shell RM – RF data/data/com.demo.helloworld/

Then restart the phone

Or just turn off instant run

When the new version of Android studio runs APK, delete appears_ FAILED_ INTERNAL_ Error, error while installing apks
there is a way: open settings and find build > Instant run, remove the tick on the right and try to install again

Option 2:

Step 1: delete the existing APK with the same package name, such as ADB shell RM system/APP/outdoormeter/outdoormeter.apk

Step 2: delete the directory of the package name of the application under the data/data/directory, such as: ADB shell RM – RF data/data/com. Runbo. Outdoormeter/

Step 3: restart the Android mobile ADB reboot

Step 4: re install the APK

Reference address

http://blog.csdn.net/ouyang_ peng/article/details/50419276

https://stackoverflow.com/questions/38892270/delete-failed-internal-error-error-while-installing-apk

Failed to install APK, error code: install_ FAILED_ INVALID_ Apk solution

Development environment: Android studio

After copying a project, the package name and application ID are modified. After further development of the program, it is found that it cannot be installed on the mobile phone. The error code is: installation failed with message failed to finalize session:INSTALL_ FAILED_ INVALID_ Apk, as shown in the figure below:

It’s a big headache. There will be no error when copying the project (for copying and modifying the project in Android studio, please refer to: http://blog.csdn.net/Lone1yCode/article/details/79087495 )

Crazy Baidu found a very effective way, as shown in the following figure:

As shown in the figure above, on Android studio, click file, settings, build, execution, deployment, debugger and instant run, cancel the check and try to install again. It’s successful!!

The function of instant run is to speed up the construction and reconstruction. When running the program for the first time, the speed is the same as the normal speed. However, after making many modifications to the program, if you run the program again, Android studio will quickly complete the construction, which is much faster than running the program for the first time. You can learn more about Baidu by yourself.

In addition, I can only copy the project, and the running program will give this error prompt. If the edited project is not copied, it is recommended to start instant run.

Android Studio Error: Failed to delete some children. This might happen because a process has files open

   the error in build APK (s) is as follows:

Unable to delete directory 'F:\AndriodStudioProjects\EDM\app\build\outputs\apk\debug'
  Failed to delete some children. This might happen because a process has files open or has its working directory set in the target directory.
  - F:\AndriodStudioProjects\EDM\app\build\outputs\apk\debug\app-debug.apk

solution: close the folder of \… \ app/build/outputs/APK/debug