I have to scan the apk version before installing it using adb.
Is there an adb command which allow to know the version of an apk stored on my hard disk before installing it ?
I tried to see different adb command and i saw adb shell pm list packages
But it worked with a device not on the apk stored on my hard disk.
Yes you can do it using cmd.
SDK> build-tools>select any directory(use latest version)> open cmd here and type following line and hit enter
D:\SDK\build-tools\28.0.3> aapt dump badging apkname.apk
above command will gives you package name, VersionCode,VersionName and may more information
i have copied my apk in same location i.e in 28.0.3
Related
Trying to use iFuse to access iPhone files on Windows but not getting anyway. Would appreciate if people can share instructions/steps on how to get this to work?
iFuse to access iPhone files on Ubuntu works well; therefore, I am confident the issue is on Windows.
Using https://github.com/hooby3dfx/ifuse/releases/tag/win-dokany-0.1
Unzip test.zip in the above link
make sure iTune is installed
Install the specified Dokan version; doesn't seem to work with the latest Dokan version
Open a command window in Admin mode to run the command (e.g. ifuse tmnt --container bundle ID)
While the command is still running in the Admin window, open another command window to list the mounted directory
I'm trying to install an apk via adb on a mac. It's not my mac, but they have adb and it sees the rooted phone correctly (verified using adb devices, so I know adb works, too).
However, when I try to install the app:
adb install [app_name].apk
I get the following message:
Performing Streamed Install
adb: failed to install [app_name].apk: Error: must either specify a package size or an APK file
I know the file is an apk, it is a good version (I've installed it successfully on other phones using other computers), it downloaded completely, and I am in the same directory as the file. It is also spelled correctly (I even tab-completed to be sure).
I can't seem to fine any real google results on this error, however. Does anyone know what might be causing it? How to fix it? Thanks in advance!
So the issue here appears to have been a file-format error. In this case, the apk didn't download all the way to the computer, even though it looked normal. Therefore, it wasn't registering as a true apk. By deleting the file and redownloading it to the computer, I was able to successfully install the app using adb.
I am trying to setup android development environment without Android Studio on Windows system. I will be developing an application using nativescript so I followed their tutorial and was able to setup things as mentioned on their page(link). And tns doctor gives "No issues were detected".
Note: I haven't used Chocolatey to manage the installation. I have manually installed the packages that were mentioned on the page.
I created avd using:
avdmanager create avd -n nvDev -k "system-images;android-25;google_apis;x86" -b google_apis/x86
which is also listed by(emulator is under 'tools' folder)
emulator -list-avds
--------------------------
nvDev
Now when I try to start emulator it is giving me error:
emulator.exe -avd nvDev
--------------------------
[3708]:ERROR:./android/qt/qt_setup.cpp:28:Qt library not found at ..\emulator\lib64\qt\lib
Could not launch '..\emulator/qemu/windows-x86_64/qemu-system-i386.exe': No such file or directory
As emulator folder was not found I tried to install emulator using the sdkmanager but it gives me a warning:(sdkmanager is under tools/bin)
sdkmanager "emulator"
Warning: File C:\Users\CES_Arion\.android\repositories.cfg could not be loaded.
Warning: Failed to read or create install properties file.
There was no "done" message. And even the emulator folder was not created alongside tools.
Wow, I feel so foolish now. The problem was I did not run the command prompt as an Admin so the files could not be created.
This is what I need to do...
Run your app from the command line
Build the project from the command line. The output APK for the app module is located in app/build/outputs/apk/.
Make sure the Android SDK platform-tools/ directory is included in your PATH environment variable.
Execute this command:
adb install app/build/outputs/MyFirstApp-debug.apk
On the emulator, locate MyFirstApp and open it.
I don't know where to find it, in order to do it?
Help...
I already have a release unsigned version apk and I am trying to sign it on my mac. On the last step it suggests to zipalign the signed apk but mac doesn't have zipalign.
I did 'brew search ' still can't find it. I searched online and can't find standalone zipalign script. I even downloaded around 90M Android sdk tool from http://developer.android.com/sdk/index.html#Other but still found no zipalign inside.
So my question is, given you an "apk" file to sign on mac, how to get through the last "zipalign" step?
Thanks the info from RC.
I finally got through this. I did in following steps:
Download 250M+ android studio ide dmg from official site. Drag it into Application folder
Open it, and it automatically downloads a lot of additional stuff
I even created a empty new project.
Then in certain step(I am not sure which step) it created zipalign here:
~/Library/Android/sdk/build-tools/22.0.1/zipalign
If you only need "zipalign", you don't need to redo those steps, which takes time and disk space. I extracted it into the github(Can't believe no one has extracted it -_- ):
https://github.com/catccaatt/zipalign
From your Mac terminal:
Add adb to command line path:
echo 'export ANDROID_HOME=/Users/$USER/Library/Android/sdk' >> ~/.bash_profile
Add build tools to command line path:
echo 'export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/build-tools/28.0.2' >> ~/.bash_profile
Refresh command line with:
source ~/.bash_profile
Then you can run it with:
zipalign -v -p 4 my-app-unsigned.apk my-app-unsigned-aligned.apk