Welcome! Log In Create A New Profile

Advanced

[WD] Obtain the build version of an Android .apk

Posted by Wilaroth 
[WD] Obtain the build version of an Android .apk
January 09, 2020 02:53PM
Hi,
Is there a way to retrieve the version of an Android app from a Windev application and without Android Studio installed on the machine?
I tried with ExeInfo(exeVersion,"MyApplication.apk") but it doesn't work.
Any help would be appreciated.
Re: [WD] Obtain the build version of an Android .apk
January 09, 2020 03:45PM
Hi. According to the help only the first parameter should be indicated, not the name of the application.


Rubén
Re: [WD] Obtain the build version of an Android .apk
January 09, 2020 04:12PM
Rename the APK to ZIP, and see what you get.

Within a xml file there is the version
Re: [WD] Obtain the build version of an Android .apk
January 10, 2020 02:21PM
Hi,
tried to rename the APK to ZIP, and extracted the AndroidManifest.xml.
Upon opening the xml (with various programs, such as notepad, notepad++, Internet Explorer, ...), the content is just gibberish, and the value i'm searching for is not there.
Am I doing something wrong?
Re: [WD] Obtain the build version of an Android .apk
January 10, 2020 09:05PM
// er is nu een Androidmanifest.xml aanwezig
IF fFileExist(XMLBestand) THEN
XMLBestandInhoud = fLoadText(XMLBestand,foAnsi)
IF XMLBestandInhoud <> "" THEN
//package: name='nl.jbgrip.android' versionCode='171' versionName='0.0.171.0'
sEersteregel = ExtractString(XMLBestandInhoud,1,CR)

sEersteregel = ExtractString(sEersteregel,2,"versionName=")
sEersteregel = ExtractString(sEersteregel,1," ")
sEersteregel = Replace(sEersteregel,"'","")
IF sEersteregel <> "" THEN
EDT_NieuweEXEVersiePlane91 = sEersteregel
ELSE
EDT_NieuweEXEVersiePlane91 = ""
END
ELSE
Info("Het bestand " + XMLBestand + " is leeg. Er kan dus geen versie bepaald worden.")
END
ELSE
Info("Het bestand " + XMLBestand + " is niet aangemaakt. Er kan dus geen versie bepaald worden.")
END
ELSE
Info("Batch bestand is niet aangemaakt. Er kan dus geen versie bepaald worden.")
END
Re: [WD] Obtain the build version of an Android .apk
January 11, 2020 09:52AM
Google for "aapt dump badging"
Re: [WD] Obtain the build version of an Android .apk
January 15, 2020 04:06PM
Hi Jan,
tried to read in a proper way the AndroidManifest.xml included in the .apk, but with no avail (the AndroidManifest.xml included seems to be cripted).

Googled for "aapt dump badging", and it seems that aapt is an useful tool to obtain what i'm trying to achieve.. If I have Android Studio installed on the machine.

I'm kinda lost on how to proceed...
Re: [WD] Obtain the build version of an Android .apk
January 16, 2020 06:23AM
Re: [WD] Obtain the build version of an Android .apk - SOLVED
January 16, 2020 08:26AM
jtadebruin@gmail.com Wrote:
-------------------------------------------------------
> [aaptdownload.com]


Thank you, that works perfectly.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: