Usage of empty namespaces in AndroidManifest.xml
Information
-
Apktool Version (
apktool -version) - 2.4.1 - Operating System (Mac, Linux, Windows) - Mac
- APK From? (Playstore, ROM, Other) - Playstore
Steps to Reproduce
apktool d com.xoom.android.app.apk
APK
https://drive.google.com/file/d/1N9p7Jdt153UIrWJvsG_Knwr0-FIdJS45/view?usp=sharing
Questions to ask before submission
- Have you tried
apktool d,apktool bwithout changing anything? + - If you are trying to install a modified apk, did you resign it? +
- Are you using the latest apktool version? +
The whole AndroidManifest.xml looks like so
<manifest xmlns:android="http://schemas.android.com/apk/res/android" compileSdkVersion="29" compileSdkVersionCodename="10" package="com.xoom.android.app" platformBuildVersionCode="29" platformBuildVersionName="10" versionName="8.0.1">
<uses-permission name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission name="android.permission.INTERNET"/>
<uses-permission name="android.permission.VIBRATE"/>
<uses-permission name="android.permission.WAKE_LOCK"/>
<uses-permission name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission name="android.permission.CAMERA"/>
<uses-feature name="android.hardware.camera" required="false"/>
<uses-feature name="android.hardware.camera.autofocus" required="false"/>
<uses-feature name="android.hardware.camera.flash" required="false"/>
<permission name="com.xoom.android.app.permission.C2D_MESSAGE" protectionLevel="signature"/>
So all attributes don't contain android namespace
Not sure what you are reporting here. Just looks like a bunch of permissions to me.
Hey @iBotPeaches
Almost all of the attributes should be declared in android: namespace like so
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:compileSdkVersion="29" android:compileSdkVersionCodename="10" package="com.xoom.android.app" platformBuildVersionCode="29" platformBuildVersionName="10" android:versionName="8.0.1">
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
Did this change recently? Since apktool normally doesn't kill/forget about namespaces on properties. Or is it expected going forward with newer Android's that android properties are always namespaced.
@iBotPeaches Nope, it's a kind of obfuscation that truncates namespace values
I replicate. Adding Bug.
@iBotPeaches This APK can be installed and used on a device (originally this is an apks file, so you should install it directly from Google Play or use split APK install apps), how it can be incorrect?
I didn't post that. I don't agree with @pashamcr - this looks like a bug to me.
This was fixed today in this PR: https://github.com/iBotPeaches/Apktool/commit/cd275ff48baed0fd84220e72ea62c98d1eeaac72
<?xml version="1.0" encoding="utf-8" standalone="no"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" android:compileSdkVersion="29" android:compileSdkVersionCodename="10" package="com.xoom.android.app" platformBuildVersionCode="29" platformBuildVersionName="10">
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.CAMERA"/>
I see namespaces now. You are still far from assembly due to undecoded values being in a raw format that aapt2 cannot understand. I'm still debating that resolution in this ticket: https://github.com/iBotPeaches/Apktool/issues/1407
Where we either remove them or figure out some nomenclature of unknown values that aapt can understand.