Failed to parse XML in ... Error (AndroidManifest.xlm) - General Questions and Answers

Hello Good day, I don't know why it happened while I was coding, but I started getting an error in the AndroidManifest.xlm partition. It has deteriorated by itself, what I did, I could not fix the error.
! I'm writing with Kotlin!
Warnings I got into the registry;
Code:
2021-03-09 22:18:33,208 [ 16686] INFO - ule.android.SdkModuleSetupStep - Set Android SDK 'Android API 30 Platform' (C:/SDK) to module 'app'
2021-03-09 22:18:33,229 [ 16707] WARN - .issues.SyncIssueUsageReporter - Unknown sync issue type: 0
2021-03-09 22:18:33,232 [ 16710] WARN - .issues.SyncIssueUsageReporter - Unknown sync issue type: 0
2021-03-09 22:18:33,337 [ 16815] INFO - pl.ProjectRootManagerComponent - project roots have changed
2021-03-09 22:18:33,339 [ 16817] INFO - testKnownPluginVersionProvider - 'gradle' plugin missing from the offline Maven repo, will use default 4.0.0
2021-03-09 22:18:33,340 [ 16818] INFO - .MemorySettingsPostSyncChecker - 64bits? : true, current: 1280, available RAM: 16333
2021-03-09 22:18:33,340 [ 16818] INFO - s.MemorySettingsRecommendation - recommendation based on machine: 3072, on project: 1280
2021-03-09 22:18:33,342 [ 16820] INFO - s.plugins.gradle.GradleManager - Instructing gradle to use java from C:/Program Files/Android/Android Studio/jre
2021-03-09 22:18:33,347 [ 16825] WARN - e.project.sync.GradleSyncState - Gradle sync failed: Sync issues found (9 s 305 ms)
2021-03-09 22:18:33,347 [ 16825] WARN - e.project.sync.GradleSyncState - Sync issues found
java.lang.RuntimeException: Sync issues found
AndroidManifest.xml
XML:
<<<<<<< Original
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.rs.mobilbanka">
<!--
The ACCESS_COARSE/FINE_LOCATION permissions are not required to use
Google Maps Android API v2, but you must specify either coarse or fine
location permissions for the "MyLocation" functionality.
-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.AppCompat.Light.NoActionBar">
<activity android:name=".profilemenu"></activity>
<!--
The API key for Google Maps-based APIs is defined as a string resource.
(See the file "res/values/google_maps_api.xml").
Note that the API key is linked to the encryption key used to sign the APK.
You need a different API key for each encryption key, including the release key that is used to
sign the APK for publishing.
You can define the keys for the debug and release targets in src/debug/ and src/release/.
-->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/google_maps_key" />
<activity
android:name=".subeveatm"
android:label="@string/title_activity_subeveatm" />
<activity
android:name=".anamenu"
android:label="@string/title_activity_anamenu" />
<activity
android:name=".MainActivity"
android:label="@string/title_activity_main2" />
<activity
android:name=".anamenu"
android:label="@string/title_activity_ana_menu" />
<activity
android:name=".anamenu"
android:label="@string/title_activity_ana_menu" />
<activity android:name=".login2" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
=======
<manifest xmlns:android ="http://schemas.android.com/apk/res/android">
<application>
<activity android:name ="com.rs.mobilbanka.Planlicalisma"
>
</activity>
</application>
</manifest>
>>>>>>> Added
Build gradle module section;
Code:
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.rs.mobilbanka"
minSdkVersion 16
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
Code:
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
implementation 'androidx.navigation:navigation-fragment:2.3.3'
implementation 'androidx.navigation:navigation-ui:2.3.3'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.3'
implementation 'androidx.navigation:navigation-ui-ktx:2.3.3'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}

Related

Ant build-app signing problem (Lulz hlep!)

Ok, I'm trying to build my app with admob .jar library. When I build it with the android eclipse plugin, it claims that the "install was unsuccessful" on my phone. I then tried using the following build.xml with ant. When I put the debug signed version on my phone it works fine. When I try to sign the unsigned .apk, it says:
Code:
java.util.zip.ZipException: invalid entry compressed size (expected 30432 but got 30419 bytes)
at java.util.zip.ZipOutputStream.closeEntry(Unknown Source)
at org.ragingcat.shared.util.jar.S_JarOutputStream.s_writeEntry(S_JarOutputStream.java:344)
at org.ragingcat.kst.util.jarsigner.KTLKprOpenSignAbs._s_writeJarEntry(KTLKprOpenSignAbs.java:184)
at org.ragingcat.kst.util.jarsigner.KTLKprOpenSignAbs._signJarFile(KTLKprOpenSignAbs.java:619)
at org.ragingcat.kst.util.jarsigner.KTLKprOpenSignAbs._doJob_(KTLKprOpenSignAbs.java:424)
at org.ragingcat.kst.util.jarsigner.KTLKprOpenSignKPAbs.doJob(KTLKprOpenSignKPAbs.java:312)
at org.ragingcat.kst.util.jarsigner.KTLKprOpenSignJks.doJob(KTLKprOpenSignJks.java:73)
at org.ragingcat.kst.swing.panel.PTabUICmdJsrSign.actionPerformed(PTabUICmdJsrSign.java:235)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
1 ? ERROR (instance ID: 1)
. location: org.ragingcat.share.util.jar.S_JarOutputStream.s_writeEntry(jos, jey, jfeInput, frmOwner, strTitleAppli)
. message: excIO caught
I'm running ant with:
dirs
resource-source
aidl
compile
dex
package-res-and-assets
release
Using latest version of jdk, android sdk, eclipse, and admob sdk
Is there a secret way to use the eclipse android plugin instead of ant? It just never captures the jar files when I use eclipse.
I am so confused and frustrated right now. It's probably some stupid small problem but I cant find it. HLEP!
Code:
<?xml version="1.0" ?>
<project name="blockedfree" default="debug">
<property name="sdk-folder" value="C:/Program Files/eclipse/AndroidSDK/" />
<property name="android-tools" value="C:/Program Files/eclipse/AndroidSDK/tools" />
<property name="application-package" value="com.nickkarstedt.blockedfree" />
<property name="android-framework" value="${android-tools}/lib/framework.aidl" />
<property name="resource-dir" value="res" />
<property name="asset-dir" value="assets" />
<property name="srcdir" value="src" />
<condition property="srcdir-ospath"
value="${basedir}\${srcdir}"
else="${basedir}/${srcdir}" >
<os family="windows"/>
</condition>
<property name="external-libs" value="libs" />
<condition property="external-libs-ospath"
value="${basedir}\${external-libs}"
else="${basedir}/${external-libs}" >
<os family="windows"/>
</condition>
<property name="outdir-classes" value="${outdir}/classes" />
<condition property="outdir-classes-ospath"
value="${basedir}\${outdir-classes}"
else="${basedir}/${outdir-classes}" >
<os family="windows"/>
</condition>
<property name="outdir-r" value="src" />
<!-- Intermediate files -->
<property name="dex-file" value="classes.dex" />
<property name="intermediate-dex" value="${outdir}/${dex-file}" />
<condition property="intermediate-dex-ospath"
value="${basedir}\${intermediate-dex}"
else="${basedir}/${intermediate-dex}" >
<os family="windows"/>
</condition>
<!-- The final package file to generate -->
<property name="resources-package" value="${outdir}/${ant.project.name}.ap_" />
<condition property="resources-package-ospath"
value="${basedir}\${resources-package}"
else="${basedir}/${resources-package}" >
<os family="windows"/>
</condition>
<property name="out-debug-package" value="${outdir}/${ant.project.name}-debug.apk" />
<condition property="out-debug-package-ospath"
value="${basedir}\${out-debug-package}"
else="${basedir}/${out-debug-package}" >
<os family="windows"/>
</condition>
<property name="out-unsigned-package" value="${outdir}/${ant.project.name}-unsigned.apk" />
<condition property="out-unsigned-package-ospath"
value="${basedir}\${out-unsigned-package}"
else="${basedir}/${out-unsigned-package}" >
<os family="windows"/>
</condition>
<!-- Tools -->
<condition property="aapt" value="${android-tools}/aapt.exe" else="${android-tools}/aapt" >
<os family="windows"/>
</condition>
<condition property="aidl" value="${android-tools}/aidl.exe" else="${android-tools}/aidl" >
<os family="windows"/>
</condition>
<condition property="adb" value="${android-tools}/adb.exe" else="${android-tools}/adb" >
<os family="windows"/>
</condition>
<condition property="dx" value="${android-tools}/dx.bat" else="${android-tools}/dx" >
<os family="windows"/>
</condition>
<condition property="apk-builder" value="${android-tools}/apkbuilder.bat" else="${android-tools}/apkbuilder" >
<os family="windows"/>
</condition>
<property name="android-jar" value="${sdk-folder}/android.jar" />
<!-- Rules -->
<!-- Create the output directories if they don't exist yet. -->
<target name="dirs">
<echo>Creating output directories if needed...</echo>
<mkdir dir="${outdir}" />
<mkdir dir="${outdir-classes}" />
</target>
<!-- Generate the R.java file for this project's resources. -->
<target name="resource-src" depends="dirs">
<echo>Generating R.java / Manifest.java from the resources...</echo>
<exec executable="${aapt}" failonerror="true">
<arg value="package" />
<arg value="-m" />
<arg value="-J" />
<arg value="${outdir-r}" />
<arg value="-M" />
<arg value="AndroidManifest.xml" />
<arg value="-S" />
<arg value="${resource-dir}" />
<arg value="-I" />
<arg value="${android-jar}" />
</exec>
</target>
<!-- Generate java classes from .aidl files. -->
<target name="aidl" depends="dirs">
<echo>Compiling aidl files into Java classes...</echo>
<apply executable="${aidl}" failonerror="true">
<arg value="-p${android-framework}" />
<arg value="-I${srcdir}" />
<fileset dir="${srcdir}">
<include name="**/*.aidl"/>
</fileset>
</apply>
</target>
<!-- Compile this project's .java files into .class files. -->
<target name="compile" depends="dirs, resource-src, aidl">
<javac encoding="ascii" target="1.5" debug="true" extdirs=""
srcdir="."
destdir="${outdir-classes}"
bootclasspath="${android-jar}">
<classpath>
<fileset dir="${external-libs}" includes="*.jar"/>
</classpath>
</javac>
</target>
<!-- Convert this project's .class files into .dex files. -->
<target name="dex" depends="compile">
<echo>Converting compiled files and external libraries into ${outdir}/${dex-file}...</echo>
<apply executable="${dx}" failonerror="true" parallel="true">
<arg value="--dex" />
<arg value="--output=${intermediate-dex-ospath}" />
<arg path="${outdir-classes-ospath}" />
<fileset dir="${external-libs}" includes="*.jar"/>
</apply>
</target>
<!-- Put the project's resources into the output package file. -->
<target name="package-res-and-assets">
<echo>Packaging resources and assets...</echo>
<exec executable="${aapt}" failonerror="true">
<arg value="package" />
<arg value="-f" />
<arg value="-M" />
<arg value="AndroidManifest.xml" />
<arg value="-S" />
<arg value="${resource-dir}" />
<arg value="-A" />
<arg value="${asset-dir}" />
<arg value="-I" />
<arg value="${android-jar}" />
<arg value="-F" />
<arg value="${resources-package}" />
</exec>
</target>
<!-- Same as package-res-and-assets, but without "-A ${asset-dir}" -->
<target name="package-res-no-assets">
<echo>Packaging resources...</echo>
<exec executable="${aapt}" failonerror="true">
<arg value="package" />
<arg value="-f" />
<arg value="-M" />
<arg value="AndroidManifest.xml" />
<arg value="-S" />
<arg value="${resource-dir}" />
<!-- No assets directory -->
<arg value="-I" />
<arg value="${android-jar}" />
<arg value="-F" />
<arg value="${resources-package}" />
</exec>
</target>
<!-- Invoke the proper target depending on whether or not
an assets directory is present. -->
<!-- TODO: find a nicer way to include the "-A ${asset-dir}" argument
only when the assets dir exists. -->
<target name="package-res">
<available file="${asset-dir}" type="dir"
property="res-target" value="and-assets" />
<property name="res-target" value="no-assets" />
<antcall target="package-res-${res-target}" />
</target>
<!-- Package the application and sign it with a debug key. -->
<target name="debug" depends="dex, package-res">
<echo>Packaging ${out-debug-package}, and signing it with a debug key...</echo>
<exec executable="${apk-builder}" failonerror="true">
<arg value="${out-debug-package-ospath}" />
<arg value="-z" />
<arg value="${resources-package-ospath}" />
<arg value="-f" />
<arg value="${intermediate-dex-ospath}" />
<arg value="-rf" />
<arg value="${srcdir-ospath}" />
<arg value="-rj" />
<arg value="${external-libs-ospath}" />
</exec>
</target>
<!-- Package the application without signing it. -->
<target name="release" depends="dex, package-res">
<echo>Packaging ${out-unsigned-package} for release...</echo>
<exec executable="${apk-builder}" failonerror="true">
<arg value="${out-unsigned-package-ospath}" />
<arg value="-u" />
<arg value="-z" />
<arg value="${resources-package-ospath}" />
<arg value="-f" />
<arg value="${intermediate-dex-ospath}" />
<arg value="-rf" />
<arg value="${srcdir-ospath}" />
<arg value="-rj" />
<arg value="${external-libs-ospath}" />
</exec>
<echo>It will need to be signed with jarsigner before being published.</echo>
</target>
<!-- Install the package on the default emulator -->
<target name="install" depends="debug">
<echo>Installing ${out-debug-package} onto default emulator...</echo>
<exec executable="${adb}" failonerror="true">
<arg value="install" />
<arg value="${out-debug-package}" />
</exec>
</target>
</project>
.... nevermind, I just figured it out. To anyone with similar problems, you DON'T need to use a build.xml if you're using Eclipse. Put the .jar in your libs folder, then Right click your project -> Build path -> configure build path. Click the Libraries tab, then click Add JARs... Then select the jar WITHIN your current project. I also selected the jar in order and export. Not sure if you have to, but it worked.

Broadcasted intent not being received by system app

Posted this on stackoverflow but got no response so I'm trying here.
I have a BroadcastReciever in a system app that I want to send an Intent to (for testing purposes as I'm modding that system app).
The AndroidManifest.xml of the system app looks like this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="15" android:versionName="4.0.4-I9300XXALF6" package="com.sec.android.contextaware"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BROADCAST_PACKAGE_REMOVED" />
<uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" />
<uses-permission android:name="android.permission.READ_LOGS" />
<uses-permission android:name="android.permission.DUMP" />
<application android:label="@string/app_name">
<receiver android:label="StateReceiver" android:name=".abstractor.StateReceiver" android:enabled="true" android:exported="true">
<intent-filter>
<action android:name="com.sec.android.contextaware.HEADSET_PLUG" />
<action android:name="android.intent.action.LOCALE_CHANGED" />
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.bluetooth.headset.profile.action.CONNECTION_STATE_CHANGED" />
<category android:name="android.intent.category.HOME" />
</intent-filter>
</receiver>
<provider android:name=".manager.LoggingDataProvider" android:authorities="com.sec.android.contextaware.manager.LoggingDataProvider" />
</application>
</manifest>
I use a test app and check if the target system app indeed can receive that intent with:
Code:
Intent intent = new Intent();
intent.setAction("com.sec.android.contextaware.HEADSET_PLUG");
PackageManager pm = getPackageManager();
for (ResolveInfo resolveInfo : pm.queryBroadcastReceivers(bt, 0)) {
Log.d("APP: ", resolveInfo.toString());
}
and get back a `ResolveInfo` with the system app's info, so it should be able to receive the intent. I then broadcast the intent with:
Code:
sendBroadcast(intent);
However nothing happens, the intent is not received. I have full control of the target system app's manifest file and code. Is it possible to somehow get the intent across?
Device is rooted.

AndroidManifest.xml issues

Alright I used this same AndroidManifest.xml code several times to create my app and it worked just fine now I'm getting 5 different errors and I can't figure out why.
Here's the xml code:
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="technologx.technologx"
android:installLocation="preferExternal"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="23" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<meta-data
android:name="com.google.android.backup.api_key"
android:value="AEdPqrEAAAAILe2cCZXNBhacXv2fkMpNM5F7FWTdWRUw-r1dFg" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="technologx.technologx.SplashScreen"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="technologx.technologx.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="technologx.technologx.MAINACTIVITY" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
Here's the errors I"m getting every time I try to create the apk:
Code:
Error:(27, 24) No resource found that matches the given name (at 'label' with value '@string/app_name').
Error:(28, 24) No resource found that matches the given name (at 'theme' with value '@style/AppTheme').
Error:(31, 28) No resource found that matches the given name (at 'label' with value '@string/app_name').
Error:(40, 28) No resource found that matches the given name (at 'label' with value '@string/app_name').
Error:Execution failed for task ':app:processReleaseResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/knye1991/Library/Android/sdk/build-tools/23.0.2/aapt'' finished with non-zero exit value 1
Could someone possibly help me fix my issue please?

Create Settings shortcut for Settings$RunningServices

Hi all,
i'm going to extend the existing Settings shortcut widget in Android Nougat with "Running services", which actually can be launched under Settings -> Developer options.
I found following two sections in packages/apps/Settings/AndroidManifext.xml:
Code:
<activity-alias android:name=".RunningServices"
android:label="@string/runningservices_settings_title"
android:exported="true"
android:targetActivity="Settings$ManageApplicationsActivity">
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.applications.ManageApplications" />
</activity-alias>
<activity android:name="Settings$RunningServicesActivity"
android:label="@string/runningservices_settings_title"
android:taskAffinity="com.android.settings"
android:parentActivityName="Settings">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.MONKEY" />
<category android:name="android.intent.category.VOICE_LAUNCH" />
</intent-filter>
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.applications.ManageApplications" />
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
android:value="true" />
</activity>
and deleted the activity-alias part and changed the activity part to this:
Code:
<activity android:name="Settings$RunningServicesActivity"
android:label="@string/runningservices_settings_title"
android:taskAffinity="">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="com.android.settings.SHORTCUT" />
</intent-filter>
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.applications.RunningServices" />
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
android:value="true" />
</activity>
I know that there will be a shortcut after building Android, but the last two times i tried it with other changes i ran into RuntimeException. Will this be the right part?
Kind regards
Pat
I know this thread is ancient but it appears on google search results so I thought I would post something I found that works:
Code:
am start -n com.android.settings/.SubSettings -e :settings:show_fragment com.android.settings.applications.RunningServices
This works for android 9 but needs to be run as root.
garbb said:
I know this thread is ancient but it appears on google search results so I thought I would post something I found that works:
Code:
am start -n com.android.settings/.SubSettings -e :settings:show_fragment com.android.settings.applications.RunningServices
This works for android 9 but needs to be run as root.
Click to expand...
Click to collapse
Thanks for posting. It's members like you that make xda great

migrate app to Android 12

i've an old Android app "com.example.package" that works fine until on Android 9, on Android 10 i've never tested, but on Android 11 & 12 no longer work
this app - on first launch after installation - needs to download additional data on "/storage/emulated/0/Android/data/com.example.package/files/", but on Android 11 & 12 - get this error while starting additional data download:
Download stopped
com.example.androidlib.j: Could not create the directory /storage/emulated/0/Android/data/com.example.package/files/
with last ApkTool v2.7.0 java version (.jar) (tested also with last APK Editor on Android) i've decompiled APK file, and this is stock AndroidManifest.xml:
XML:
<?xml version="1.0" encoding="utf-8" standalone="no"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="preferExternal" package="com.example.package" platformBuildVersionCode="9" platformBuildVersionName="2.3.1">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.android.vending.BILLING"/>
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:smallScreens="false" android:xlargeScreens="true"/>
<uses-configuration android:reqTouchScreen="finger"/>
<uses-feature android:name="android.hardware.sensor.accelerometer" android:required="true"/>
<uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="true"/>
<uses-feature android:name="android.hardware.wifi" android:required="false"/>
<application android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen">
<activity android:configChanges="keyboardHidden|orientation" android:label="@string/app_name" android:name=".packageActivity" android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:configChanges="keyboardHidden|orientation" android:name="com.example.androidlib.MainActivity" android:screenOrientation="landscape"/>
<activity android:configChanges="keyboardHidden|orientation" android:name="com.example.androidlib.LicenseActivity" android:screenOrientation="landscape"/>
<activity android:configChanges="keyboardHidden|orientation" android:name="com.example.androidlib.DownloadActivity" android:screenOrientation="landscape"/>
<activity android:configChanges="keyboardHidden|orientation" android:name="com.example.androidlib.GLExtensionActivity" android:screenOrientation="landscape"/>
</application>
</manifest>
i tried to fix permission & build version issues with this strings:
platformBuildVersionCode="31" platformBuildVersionName="12"
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>
and finally i've recompiled all with same last ApkTool v2.7.0 java version (.jar) (tested also with last APK Editor on Android)
but unfortunately, persist the error while starting additional data download
not work even if manually move additional data on right path/folder
how to solve?!?
To give users more control over their files and limit file clutter, Android 10 introduced a new storage paradigm for apps called scoped storage. Scoped storage changes the way apps store and access files on a device's external storage.
Therefore, for your app problems, in order to adapt to Android 10 and later, I recommend that you open the app project in Android Studio, make corresponding modifications of the source code, and rebuild and generate a new apk.

Categories

Resources