Hey all I am trying to figure out why the following command does not produce the needed output:
aapt dump badging c:/adb/apks/ftp/ftp.apk " | sed -r s/package: name='([a-z0-9.]*)'.*/\1/"
This just produces a lot of text:
package: name='com.medhaapps.wififtpserver' versionCode='74' versionName='1.9.5' compileSdkVersion='28' compileSdkVersionCodename='9'
sdkVersion:'16'
targetSdkVersion:'28'
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.ACCESS_NETWORK_STATE'
uses-permission: name='android.permission.ACCESS_WIFI_STATE'
uses-permission: name='android.permission.WRITE_EXTERNAL_STORAGE'
uses-permission: name='android.permission.WAKE_LOCK'
uses-permission: name='android.permission.FOREGROUND_SERVICE'
uses-permission-sdk-23: name='android.permission.ACCESS_COARSE_LOCATION'
application-label:'WiFi FTP Server'
......ETC ETC.....
Shouldn't this just produce:
package: name='com.medhaapps.wififtpserver'
The command you were trying to use has two problems:
The original working command without quotes is
It combines the two programs
aaptfrom Android SDK and the standard Linux tool Stream EDitorsed. As you are on Windows this command is not available by default.The easiest way to get a Windows version of
sedis install the version tool GIT CSM (the official open source version). It provides several Windows versions of standard Linux programs likesed. On a standard installation you will sind ansed.exeinC:\Program Files\Git\usr\bin. So just append that directory to yourPATHand you will have a workingsedversion ready for the command.