Help, missing permissions in packages.xml for android.media - ONE Android Development

Hi,
I'm having a problem were I get this message in logcat:
AndroidRuntime: java.lang.SecurityException: External path: /storage/emulated/0/DCIM/.thumbnails/1469972850687.jpg: Neither user 10009 nor current process has android.permission.WRITE_EXTERNAL_STORAGE.
Code:
07-31 15:47:30.706 15664 15696 E AndroidRuntime: FATAL EXCEPTION: thumbs thread
07-31 15:47:30.706 15664 15696 E AndroidRuntime: Process: android.process.media, PID: 15664
07-31 15:47:30.706 15664 15696 E AndroidRuntime: Theme: themes:{default=, iconPack:system}
07-31 15:47:30.706 15664 15696 E AndroidRuntime: java.lang.SecurityException: External path: /storage/emulated/0/DCIM/.thumbnails/1469972850687.jpg: Neither user 10009 nor current process has android.permission.WRITE_EXTERNAL_STORAGE.
07-31 15:47:30.706 15664 15696 E AndroidRuntime: at android.app.ContextImpl.enforce(ContextImpl.java:1448)
07-31 15:47:30.706 15664 15696 E AndroidRuntime: at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:1480)
07-31 15:47:30.706 15664 15696 E AndroidRuntime: at android.content.ContextWrapper.enforceCallingOrSelfPermission(ContextWrapper.java:681)
07-31 15:47:30.706 15664 15696 E AndroidRuntime: at com.android.providers.media.MediaProvider.enforceCallingOrSelfPermissionAndAppOps(MediaProvider.java:5776)
07-31 15:47:30.706 15664 15696 E AndroidRuntime: at com.android.providers.media.MediaProvider.checkAccess(MediaProvider.java:4753)
07-31 15:47:30.706 15664 15696 E AndroidRuntime: at com.android.providers.media.MediaProvider.openFileAndEnforcePathPermissionsHelper(MediaProvider.java:4707)
07-31 15:47:30.706 15664 15696 E AndroidRuntime: at com.android.providers.media.MediaProvider.openFile(MediaProvider.java:4624)
07-31 15:47:30.706 15664 15696 E AndroidRuntime: at android.content.ContentProvider.openAssetFile(ContentProvider.java:1374)
07-31 15:47:30.706 15664 15696 E AndroidRuntime: at android.content.ContentProvider.openAssetFile(ContentProvider.java:1437)
07-31 15:47:30.706 15664 15696 E AndroidRuntime: at android.content.ContentProvider$Transport.openAssetFile(ContentProvider.java:386)
07-31 15:47:30.706 15664 15696 E AndroidRuntime: at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:962)
07-31 15:47:30.706 15664 15696 E AndroidRuntime: at android.content.ContentResolver.openOutputStream(ContentResolver.java:704)
07-31 15:47:30.706 15664 15696 E AndroidRuntime: at android.content.ContentResolver.openOutputStream(ContentResolver.java:680)
07-31 15:47:30.706 15664 15696 E AndroidRuntime: at com.android.providers.media.MediaThumbRequest.execute(MediaThumbRequest.java:192)
07-31 15:47:30.706 15664 15696 E AndroidRuntime: at com.android.providers.media.MediaProvider$4.handleMessage(MediaProvider.java:637)
07-31 15:47:30.706 15664 15696 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
07-31 15:47:30.706 15664 15696 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
07-31 15:47:30.706 15664 15696 E AndroidRuntime: at android.os.HandlerThread.run(HandlerThread.java:61)
07-31 15:47:30.711 17051 17116 E MediaStore: couldn't open thumbnail content://media/external/images/thumbnails/14; java.io.FileNotFoundException: No such file or directory
07-31 15:47:30.711 17051 17116 V MediaStore: Create the thumbnail in memory: origId=22999, kind=1, isVideo=false
07-31 15:47:30.785 32597 17122 D OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
07-31 15:47:30.805 32597 32618 W HardwareRenderer: Could not acquire gfx stats buffer
07-31 15:47:30.805 32597 32618 W HardwareRenderer: android.os.RemoteException: Invalid package name
07-31 15:47:30.805 32597 32618 W HardwareRenderer: at com.android.server.GraphicsStatsService.requestBufferForProcess(GraphicsStatsService.java:97)
07-31 15:47:30.805 32597 32618 W HardwareRenderer: at android.view.ThreadedRenderer$ProcessInitializer.initGraphicsStats(ThreadedRenderer.java:459)
07-31 15:47:30.805 32597 32618 W HardwareRenderer: at android.view.ThreadedRenderer$ProcessInitializer.init(ThreadedRenderer.java:447)
07-31 15:47:30.805 32597 32618 W HardwareRenderer: at android.view.ThreadedRenderer.<init>(ThreadedRenderer.java:126)
07-31 15:47:30.805 32597 32618 W HardwareRenderer: at android.view.HardwareRenderer.create(HardwareRenderer.java:436)
07-31 15:47:30.805 32597 32618 W HardwareRenderer: at android.view.ViewRootImpl.enableHardwareAcceleration(ViewRootImpl.java:759)
07-31 15:47:30.805 32597 32618 W HardwareRenderer: at android.view.ViewRootImpl.setView(ViewRootImpl.java:492)
07-31 15:47:30.805 32597 32618 W HardwareRenderer: at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:310)
07-31 15:47:30.805 32597 32618 W HardwareRenderer: at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:86)
07-31 15:47:30.805 32597 32618 W HardwareRenderer: at android.app.Dialog.show(Dialog.java:319)
07-31 15:47:30.805 32597 32618 W HardwareRenderer: at com.android.server.am.ActivityManagerService$UiHandler.handleMessage(ActivityManagerService.java:1489)
07-31 15:47:30.805 32597 32618 W HardwareRenderer: at android.os.Handler.dispatchMessage(Handler.java:102)
07-31 15:47:30.805 32597 32618 W HardwareRenderer: at android.os.Looper.loop(Looper.java:148)
07-31 15:47:30.805 32597 32618 W HardwareRenderer: at android.os.HandlerThread.run(HandlerThread.java:61)
07-31 15:47:30.805 32597 32618 W HardwareRenderer: at com.android.server.ServiceThread.run(ServiceThread.java:46)
07-31 15:47:30.811 17051 17101 D GalleryBuilderService: start building gallery service com.flayvr.doctor.actions.ACTION_ANDROID_CONTENT_CHANGED
07-31 15:47:30.823 32255 16890 D QCameraParameters: update current cct value. old:3600, now:3564
07-31 15:47:30.838 32597 17122 I OpenGLRenderer: Initialized EGL, version 1.4
Corresponding process in question is android.process.media:
[email protected]:/ $ ps | grep 15664
u0_a9 15664 32252 948844 55676 sys_epoll_ 00000000 S android.process.media
So, I wonder, can anyone that runs a CM13 rom or derivated from CM13 rom tell me what permission do they have in /data/system/packages.xml for shared user android.media, and for package which name="com.android.providers.media" ?
(I don't need the whole file, I'm only interested in the permission section corresponding from that package and that shared user).
It would look like:
Code:
<package name="com.android.providers.media" codePath="/system/priv-app/MediaProvider" nativeLibraryPath="/system/priv-app/MediaProvider/lib" publicFlags="944291397" privateFlags="8" ft="11e9134c000" it="11e9134c000" ut="11e9134c000" version="800" sharedUserId="10009">
<perms>
<item name="android.permission.ACCESS_CACHE_FILESYSTEM" granted="true" flags="0" />
[...]
<item name="android.permission.READ_EXTERNAL_STORAGE" granted="true" flags="0" />
</perms>
and
Code:
<shared-user name="android.media" userId="10009">
<sigs count="1">
<cert index="14" />
</sigs>
<perms>
<item name="android.permission.ACCESS_CACHE_FILESYSTEM" granted="true" flags="0" />
flags="0" />
[...]
<item name="android.permission.UPDATE_APP_OPS_STATS" granted="true" flags="0" />
</perms>
</shared-user>
I'd like to see what is missing from my file (from some logcat I have found some missing permissions already and adding them manually to the file would fix the FC, but I'd liek to see all the missing permissions at once.
Also, if anyone has any idea about why the packages.xml file would miss some permissions entry, I have no idea why and I'd like to understand what happened here...
Thanks in advance,
Alex

this thread should be in the help section please...
Sent from my A0001 using Tapatalk

cleansafi said:
this thread should be in the help section please...
Sent from my A0001 using Tapatalk
Click to expand...
Click to collapse
That's arguable. And that's not the kind of thing a user would likely understand or know to respond.
I ask this in the dev section because it's a dev problem, that happens in a deving context and I'm targeting a dev audience, which are the only one likely who would like be able to help me.
So, no.

Here ya go
Code:
<package name="com.android.providers.media" codePath="/system/priv-app/MediaProvider" nativeLibraryPath="/system/priv-app/MediaProvider/lib" publicFlags="944291397" privateFlags="8" ft="11e908ff480" it="11e908ff480" ut="11e908ff480" version="800" sharedUserId="10010">
<sigs count="1">
<cert index="4" key="308204a830820390a003020102020900f2b98e6123572c4e300d06092a864886f70d0101040500308194310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e20566965773110300e060355040a1307416e64726f69643110300e060355040b1307416e64726f69643110300e06035504031307416e64726f69643122302006092a864886f70d0109011613616e64726f696440616e64726f69642e636f6d301e170d3038303431353233343035375a170d3335303930313233343035375a308194310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e20566965773110300e060355040a1307416e64726f69643110300e060355040b1307416e64726f69643110300e06035504031307416e64726f69643122302006092a864886f70d0109011613616e64726f696440616e64726f69642e636f6d30820120300d06092a864886f70d01010105000382010d00308201080282010100ae250c5a16ef97fc2869ac651b3217cc36ba0e86964168d58a049f40ce85867123a3ffb4f6d949c33cf2da3a05c23eacaa57d803889b1759bcf59e7c6f21890ae25085b7ed56aa626c0989ef9ccd36362ca0e8d1b9603fd4d8328767926ccc090c68b775ae7ff30934cc369ef2855a2667df0c667fd0c7cf5d8eba655806737303bb624726eabaedfb72f07ed7a76ab3cb9a381c4b7dcd809b140d891f00213be401f58d6a06a61eadc3a9c2f1c6567285b09ae09342a66fa421eaf93adf7573a028c331d70601ab3af7cc84033ece7c772a3a5b86b0dbe9d777c3a48aa9801edcee2781589f44d9e4113979600576a99410ba81091259dad98c6c68ff784b8f020103a381fc3081f9301d0603551d0e04160414ca293caa8bc0ed3e542eef4205a2bff2b57e4d753081c90603551d230481c13081be8014ca293caa8bc0ed3e542eef4205a2bff2b57e4d75a1819aa48197308194310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e20566965773110300e060355040a1307416e64726f69643110300e060355040b1307416e64726f69643110300e06035504031307416e64726f69643122302006092a864886f70d0109011613616e64726f696440616e64726f69642e636f6d820900f2b98e6123572c4e300c0603551d13040530030101ff300d06092a864886f70d0101040500038201010084de9516d5e4a87217a73da8487048f53373a5f733f390d61bdf3cc9e5251625bfcaa7c3159cae275d172a9ae1e876d5458127ac542f68290dd510c0029d8f51e0ee156b7b7b5acdb394241b8ec78b74e5c42c5cafae156caf5bd199a23a27524da072debbe378464a533630b0e4d0ffb7e08ecb701fadb6379c74467f6e00c6ed888595380792038756007872c8e3007af423a57a2cab3a282869b64c4b7bd5fc187d0a7e2415965d5aae4e07a6df751b4a75e9793c918a612b81cd0b628aee0168dc44e47b10d3593260849d6adf6d727dc24444c221d3f9ecc368cad07999f2b8105bc1f20d38d41066cc1411c257a96ea4349f5746565507e4e8020a1a81" />
</sigs>
<perms>
<item name="android.permission.ACCESS_CACHE_FILESYSTEM" granted="true" flags="0" />
<item name="android.permission.WRITE_SETTINGS" granted="true" flags="0" />
<item name="android.permission.SEND_DOWNLOAD_COMPLETED_INTENTS" granted="true" flags="0" />
<item name="android.permission.RECEIVE_BOOT_COMPLETED" granted="true" flags="0" />
<item name="android.permission.WRITE_MEDIA_STORAGE" granted="true" flags="0" />
<item name="android.permission.INTERNET" granted="true" flags="0" />
<item name="android.permission.UPDATE_DEVICE_STATS" granted="true" flags="0" />
<item name="android.permission.ACCESS_ALL_DOWNLOADS" granted="true" flags="0" />
<item name="android.permission.ACCESS_DOWNLOAD_MANAGER" granted="true" flags="0" />
<item name="android.permission.MANAGE_USERS" granted="true" flags="0" />
<item name="android.permission.ACCESS_NETWORK_STATE" granted="true" flags="0" />
<item name="android.permission.ACCESS_MTP" granted="true" flags="0" />
<item name="android.permission.INTERACT_ACROSS_USERS" granted="true" flags="0" />
<item name="android.permission.CLEAR_APP_CACHE" granted="true" flags="0" />
<item name="android.permission.CONNECTIVITY_INTERNAL" granted="true" flags="0" />
<item name="android.permission.MODIFY_NETWORK_ACCOUNTING" granted="true" flags="0" />
<item name="android.permission.WAKE_LOCK" granted="true" flags="0" />
<item name="android.permission.UPDATE_APP_OPS_STATS" granted="true" flags="0" />
</perms>
<shared-user name="android.media" userId="10010">
<sigs count="1">
<cert index="4" />
</sigs>
<perms>
<item name="android.permission.ACCESS_CACHE_FILESYSTEM" granted="true" flags="0" />
<item name="android.permission.WRITE_SETTINGS" granted="true" flags="0" />
<item name="android.permission.SEND_DOWNLOAD_COMPLETED_INTENTS" granted="true" flags="0" />
<item name="android.permission.RECEIVE_BOOT_COMPLETED" granted="true" flags="0" />
<item name="android.permission.WRITE_MEDIA_STORAGE" granted="true" flags="0" />
<item name="android.permission.INTERNET" granted="true" flags="0" />
<item name="android.permission.UPDATE_DEVICE_STATS" granted="true" flags="0" />
<item name="android.permission.ACCESS_ALL_DOWNLOADS" granted="true" flags="0" />
<item name="android.permission.ACCESS_DOWNLOAD_MANAGER" granted="true" flags="0" />
<item name="android.permission.MANAGE_USERS" granted="true" flags="0" />
<item name="android.permission.ACCESS_NETWORK_STATE" granted="true" flags="0" />
<item name="android.permission.ACCESS_MTP" granted="true" flags="0" />
<item name="android.permission.INTERACT_ACROSS_USERS" granted="true" flags="0" />
<item name="android.permission.CLEAR_APP_CACHE" granted="true" flags="0" />
<item name="android.permission.CONNECTIVITY_INTERNAL" granted="true" flags="0" />
<item name="android.permission.MODIFY_NETWORK_ACCOUNTING" granted="true" flags="0" />
<item name="android.permission.WAKE_LOCK" granted="true" flags="0" />
<item name="android.permission.UPDATE_APP_OPS_STATS" granted="true" flags="0" />
</perms>
</shared-user>

Related

[Q] Decompile framework-res

Hello,
I'm trying to edit an XML file.
I decompile Framework-res.apk then edit the stat_sys_battery.xml add some lines, and finally I have this code:
Code:
<?xml version="1.0" encoding="utf-8"?>
<level-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/stat_sys_battery_0" android:maxLevel="0" />
<item android:drawable="@drawable/stat_sys_battery_1" android:maxLevel="1" />
<item android:drawable="@drawable/stat_sys_battery_2" android:maxLevel="2" />
<item android:drawable="@drawable/stat_sys_battery_3" android:maxLevel="3" />
<item android:drawable="@drawable/stat_sys_battery_4" android:maxLevel="4" />
<item android:drawable="@drawable/stat_sys_battery_5" android:maxLevel="5" />
<item android:drawable="@drawable/stat_sys_battery_6" android:maxLevel="6" />
<item android:drawable="@drawable/stat_sys_battery_7" android:maxLevel="7" />
<item android:drawable="@drawable/stat_sys_battery_8" android:maxLevel="8" />
<item android:drawable="@drawable/stat_sys_battery_9" android:maxLevel="9" />
<item android:drawable="@drawable/stat_sys_battery_10" android:maxLevel="10" />
<item android:drawable="@drawable/stat_sys_battery_11" android:maxLevel="11" />
<item android:drawable="@drawable/stat_sys_battery_12" android:maxLevel="12" />
<item android:drawable="@drawable/stat_sys_battery_13" android:maxLevel="13" />
<item android:drawable="@drawable/stat_sys_battery_14" android:maxLevel="14" />
<item android:drawable="@drawable/stat_sys_battery_15" android:maxLevel="15" />
<item android:drawable="@drawable/stat_sys_battery_16" android:maxLevel="16" />
<item android:drawable="@drawable/stat_sys_battery_17" android:maxLevel="17" />
<item android:drawable="@drawable/stat_sys_battery_18" android:maxLevel="18" />
<item android:drawable="@drawable/stat_sys_battery_19" android:maxLevel="19" />
<item android:drawable="@drawable/stat_sys_battery_20" android:maxLevel="20" />
<item android:drawable="@drawable/stat_sys_battery_21" android:maxLevel="21" />
<item android:drawable="@drawable/stat_sys_battery_22" android:maxLevel="22" />
<item android:drawable="@drawable/stat_sys_battery_23" android:maxLevel="23" />
<item android:drawable="@drawable/stat_sys_battery_24" android:maxLevel="24" />
<item android:drawable="@drawable/stat_sys_battery_25" android:maxLevel="25" />
<item android:drawable="@drawable/stat_sys_battery_26" android:maxLevel="26" />
<item android:drawable="@drawable/stat_sys_battery_27" android:maxLevel="27" />
<item android:drawable="@drawable/stat_sys_battery_28" android:maxLevel="28" />
<item android:drawable="@drawable/stat_sys_battery_29" android:maxLevel="29" />
<item android:drawable="@drawable/stat_sys_battery_30" android:maxLevel="30" />
<item android:drawable="@drawable/stat_sys_battery_31" android:maxLevel="31" />
<item android:drawable="@drawable/stat_sys_battery_32" android:maxLevel="32" />
<item android:drawable="@drawable/stat_sys_battery_33" android:maxLevel="33" />
<item android:drawable="@drawable/stat_sys_battery_34" android:maxLevel="34" />
<item android:drawable="@drawable/stat_sys_battery_35" android:maxLevel="35" />
<item android:drawable="@drawable/stat_sys_battery_36" android:maxLevel="36" />
<item android:drawable="@drawable/stat_sys_battery_37" android:maxLevel="37" />
<item android:drawable="@drawable/stat_sys_battery_38" android:maxLevel="38" />
<item android:drawable="@drawable/stat_sys_battery_39" android:maxLevel="39" />
<item android:drawable="@drawable/stat_sys_battery_40" android:maxLevel="40" />
<item android:drawable="@drawable/stat_sys_battery_41" android:maxLevel="41" />
<item android:drawable="@drawable/stat_sys_battery_42" android:maxLevel="42" />
<item android:drawable="@drawable/stat_sys_battery_43" android:maxLevel="43" />
<item android:drawable="@drawable/stat_sys_battery_44" android:maxLevel="44" />
<item android:drawable="@drawable/stat_sys_battery_45" android:maxLevel="45" />
<item android:drawable="@drawable/stat_sys_battery_46" android:maxLevel="46" />
<item android:drawable="@drawable/stat_sys_battery_47" android:maxLevel="47" />
<item android:drawable="@drawable/stat_sys_battery_48" android:maxLevel="48" />
<item android:drawable="@drawable/stat_sys_battery_49" android:maxLevel="49" />
<item android:drawable="@drawable/stat_sys_battery_50" android:maxLevel="50" />
<item android:drawable="@drawable/stat_sys_battery_51" android:maxLevel="51" />
<item android:drawable="@drawable/stat_sys_battery_52" android:maxLevel="52" />
<item android:drawable="@drawable/stat_sys_battery_53" android:maxLevel="53" />
<item android:drawable="@drawable/stat_sys_battery_54" android:maxLevel="54" />
<item android:drawable="@drawable/stat_sys_battery_55" android:maxLevel="55" />
<item android:drawable="@drawable/stat_sys_battery_56" android:maxLevel="56" />
<item android:drawable="@drawable/stat_sys_battery_57" android:maxLevel="57" />
<item android:drawable="@drawable/stat_sys_battery_58" android:maxLevel="58" />
<item android:drawable="@drawable/stat_sys_battery_59" android:maxLevel="59" />
<item android:drawable="@drawable/stat_sys_battery_60" android:maxLevel="60" />
<item android:drawable="@drawable/stat_sys_battery_61" android:maxLevel="61" />
<item android:drawable="@drawable/stat_sys_battery_62" android:maxLevel="62" />
<item android:drawable="@drawable/stat_sys_battery_63" android:maxLevel="63" />
<item android:drawable="@drawable/stat_sys_battery_64" android:maxLevel="64" />
<item android:drawable="@drawable/stat_sys_battery_65" android:maxLevel="65" />
<item android:drawable="@drawable/stat_sys_battery_66" android:maxLevel="66" />
<item android:drawable="@drawable/stat_sys_battery_67" android:maxLevel="67" />
<item android:drawable="@drawable/stat_sys_battery_68" android:maxLevel="68" />
<item android:drawable="@drawable/stat_sys_battery_69" android:maxLevel="69" />
<item android:drawable="@drawable/stat_sys_battery_70" android:maxLevel="70" />
<item android:drawable="@drawable/stat_sys_battery_71" android:maxLevel="71" />
<item android:drawable="@drawable/stat_sys_battery_72" android:maxLevel="72" />
<item android:drawable="@drawable/stat_sys_battery_73" android:maxLevel="73" />
<item android:drawable="@drawable/stat_sys_battery_74" android:maxLevel="74" />
<item android:drawable="@drawable/stat_sys_battery_75" android:maxLevel="75" />
<item android:drawable="@drawable/stat_sys_battery_76" android:maxLevel="76" />
<item android:drawable="@drawable/stat_sys_battery_77" android:maxLevel="77" />
<item android:drawable="@drawable/stat_sys_battery_78" android:maxLevel="78" />
<item android:drawable="@drawable/stat_sys_battery_79" android:maxLevel="79" />
<item android:drawable="@drawable/stat_sys_battery_80" android:maxLevel="80" />
<item android:drawable="@drawable/stat_sys_battery_81" android:maxLevel="81" />
<item android:drawable="@drawable/stat_sys_battery_82" android:maxLevel="82" />
<item android:drawable="@drawable/stat_sys_battery_83" android:maxLevel="83" />
<item android:drawable="@drawable/stat_sys_battery_84" android:maxLevel="84" />
<item android:drawable="@drawable/stat_sys_battery_85" android:maxLevel="85" />
<item android:drawable="@drawable/stat_sys_battery_86" android:maxLevel="86" />
<item android:drawable="@drawable/stat_sys_battery_87" android:maxLevel="87" />
<item android:drawable="@drawable/stat_sys_battery_88" android:maxLevel="88" />
<item android:drawable="@drawable/stat_sys_battery_89" android:maxLevel="89" />
<item android:drawable="@drawable/stat_sys_battery_90" android:maxLevel="90" />
<item android:drawable="@drawable/stat_sys_battery_91" android:maxLevel="91" />
<item android:drawable="@drawable/stat_sys_battery_92" android:maxLevel="92" />
<item android:drawable="@drawable/stat_sys_battery_93" android:maxLevel="93" />
<item android:drawable="@drawable/stat_sys_battery_94" android:maxLevel="94" />
<item android:drawable="@drawable/stat_sys_battery_95" android:maxLevel="95" />
<item android:drawable="@drawable/stat_sys_battery_96" android:maxLevel="96" />
<item android:drawable="@drawable/stat_sys_battery_97" android:maxLevel="97" />
<item android:drawable="@drawable/stat_sys_battery_98" android:maxLevel="98" />
<item android:drawable="@drawable/stat_sys_battery_99" android:maxLevel="99" />
<item android:drawable="@drawable/stat_sys_battery_100" android:maxLevel="100" />
</level-list>
Then I re-compile it, open the re-compiled .apk file and grab the stat_sys_battery.xml and copy it to my original framework-res.apk, (and then copy it over the framework-res.apk in /system/framework/)
however, I don't the wanted result, because after a reboot, it displays the stat_sys_battery_unknown image.
(BTW: I use Root Explorer to copy the modified framework-res.apk to the /system/framework/ folder but I don't think that's the problem, but I'm not sure)
EDIT: Placing the re-compiled framework-res.apk results in a bootloop..
Thanks in advance!

[req] battery mod for ics

Can some tell ne how to get it at 1% at a time. i had decompiled and recompiled and edited the stat_sys_battery.xml and flashed and now the battery icon does not show up at all, i have all the icons correctly named and all, i don't know what i am doing wrong
here is what i have as my xml file
<?xml version="1.0" encoding="utf-8"?>
<level-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/stat_sys_battery_0" android:maxLevel="0" />
<item android:drawable="@drawable/stat_sys_battery_1" android:maxLevel="1" />
<item android:drawable="@drawable/stat_sys_battery_2" android:maxLevel="2" />
<item android:drawable="@drawable/stat_sys_battery_3" android:maxLevel="3" />
<item android:drawable="@drawable/stat_sys_battery_4" android:maxLevel="4" />
<item android:drawable="@drawable/stat_sys_battery_5" android:maxLevel="5" />
<item android:drawable="@drawable/stat_sys_battery_6" android:maxLevel="6" />
<item android:drawable="@drawable/stat_sys_battery_7" android:maxLevel="7" />
<item android:drawable="@drawable/stat_sys_battery_8" android:maxLevel="8" />
<item android:drawable="@drawable/stat_sys_battery_9" android:maxLevel="9" />
<item android:drawable="@drawable/stat_sys_battery_10" android:maxLevel="10" />
<item android:drawable="@drawable/stat_sys_battery_11" android:maxLevel="11" />
<item android:drawable="@drawable/stat_sys_battery_12" android:maxLevel="12" />
<item android:drawable="@drawable/stat_sys_battery_13" android:maxLevel="13" />
<item android:drawable="@drawable/stat_sys_battery_14" android:maxLevel="14" />
<item android:drawable="@drawable/stat_sys_battery_15" android:maxLevel="15" />
<item android:drawable="@drawable/stat_sys_battery_16" android:maxLevel="16" />
<item android:drawable="@drawable/stat_sys_battery_17" android:maxLevel="17" />
<item android:drawable="@drawable/stat_sys_battery_18" android:maxLevel="18" />
<item android:drawable="@drawable/stat_sys_battery_19" android:maxLevel="19" />
<item android:drawable="@drawable/stat_sys_battery_20" android:maxLevel="20" />
<item android:drawable="@drawable/stat_sys_battery_21" android:maxLevel="21" />
<item android:drawable="@drawable/stat_sys_battery_22" android:maxLevel="22" />
<item android:drawable="@drawable/stat_sys_battery_23" android:maxLevel="23" />
<item android:drawable="@drawable/stat_sys_battery_24" android:maxLevel="24" />
<item android:drawable="@drawable/stat_sys_battery_25" android:maxLevel="25" />
<item android:drawable="@drawable/stat_sys_battery_26" android:maxLevel="26" />
<item android:drawable="@drawable/stat_sys_battery_27" android:maxLevel="27" />
<item android:drawable="@drawable/stat_sys_battery_28" android:maxLevel="28" />
<item android:drawable="@drawable/stat_sys_battery_29" android:maxLevel="29" />
<item android:drawable="@drawable/stat_sys_battery_30" android:maxLevel="30" />
<item android:drawable="@drawable/stat_sys_battery_31" android:maxLevel="31" />
<item android:drawable="@drawable/stat_sys_battery_32" android:maxLevel="32" />
<item android:drawable="@drawable/stat_sys_battery_33" android:maxLevel="33" />
<item android:drawable="@drawable/stat_sys_battery_34" android:maxLevel="34" />
<item android:drawable="@drawable/stat_sys_battery_35" android:maxLevel="35" />
<item android:drawable="@drawable/stat_sys_battery_36" android:maxLevel="36" />
<item android:drawable="@drawable/stat_sys_battery_37" android:maxLevel="37" />
<item android:drawable="@drawable/stat_sys_battery_38" android:maxLevel="38" />
<item android:drawable="@drawable/stat_sys_battery_39" android:maxLevel="39" />
<item android:drawable="@drawable/stat_sys_battery_40" android:maxLevel="40" />
<item android:drawable="@drawable/stat_sys_battery_41" android:maxLevel="41" />
<item android:drawable="@drawable/stat_sys_battery_42" android:maxLevel="42" />
<item android:drawable="@drawable/stat_sys_battery_43" android:maxLevel="43" />
<item android:drawable="@drawable/stat_sys_battery_44" android:maxLevel="44" />
<item android:drawable="@drawable/stat_sys_battery_45" android:maxLevel="45" />
<item android:drawable="@drawable/stat_sys_battery_46" android:maxLevel="46" />
<item android:drawable="@drawable/stat_sys_battery_47" android:maxLevel="47" />
<item android:drawable="@drawable/stat_sys_battery_48" android:maxLevel="48" />
<item android:drawable="@drawable/stat_sys_battery_49" android:maxLevel="49" />
<item android:drawable="@drawable/stat_sys_battery_50" android:maxLevel="50" />
<item android:drawable="@drawable/stat_sys_battery_51" android:maxLevel="51" />
<item android:drawable="@drawable/stat_sys_battery_52" android:maxLevel="52" />
<item android:drawable="@drawable/stat_sys_battery_53" android:maxLevel="53" />
<item android:drawable="@drawable/stat_sys_battery_54" android:maxLevel="54" />
<item android:drawable="@drawable/stat_sys_battery_55" android:maxLevel="55" />
<item android:drawable="@drawable/stat_sys_battery_56" android:maxLevel="56" />
<item android:drawable="@drawable/stat_sys_battery_57" android:maxLevel="57" />
<item android:drawable="@drawable/stat_sys_battery_58" android:maxLevel="58" />
<item android:drawable="@drawable/stat_sys_battery_59" android:maxLevel="59" />
<item android:drawable="@drawable/stat_sys_battery_60" android:maxLevel="60" />
<item android:drawable="@drawable/stat_sys_battery_61" android:maxLevel="61" />
<item android:drawable="@drawable/stat_sys_battery_62" android:maxLevel="62" />
<item android:drawable="@drawable/stat_sys_battery_63" android:maxLevel="63" />
<item android:drawable="@drawable/stat_sys_battery_64" android:maxLevel="64" />
<item android:drawable="@drawable/stat_sys_battery_65" android:maxLevel="65" />
<item android:drawable="@drawable/stat_sys_battery_66" android:maxLevel="66" />
<item android:drawable="@drawable/stat_sys_battery_67" android:maxLevel="67" />
<item android:drawable="@drawable/stat_sys_battery_68" android:maxLevel="68" />
<item android:drawable="@drawable/stat_sys_battery_69" android:maxLevel="69" />
<item android:drawable="@drawable/stat_sys_battery_70" android:maxLevel="70" />
<item android:drawable="@drawable/stat_sys_battery_71" android:maxLevel="71" />
<item android:drawable="@drawable/stat_sys_battery_72" android:maxLevel="72" />
<item android:drawable="@drawable/stat_sys_battery_73" android:maxLevel="73" />
<item android:drawable="@drawable/stat_sys_battery_74" android:maxLevel="74" />
<item android:drawable="@drawable/stat_sys_battery_75" android:maxLevel="75" />
<item android:drawable="@drawable/stat_sys_battery_76" android:maxLevel="76" />
<item android:drawable="@drawable/stat_sys_battery_77" android:maxLevel="77" />
<item android:drawable="@drawable/stat_sys_battery_78" android:maxLevel="78" />
<item android:drawable="@drawable/stat_sys_battery_79" android:maxLevel="79" />
<item android:drawable="@drawable/stat_sys_battery_80" android:maxLevel="80" />
<item android:drawable="@drawable/stat_sys_battery_81" android:maxLevel="81" />
<item android:drawable="@drawable/stat_sys_battery_82" android:maxLevel="82" />
<item android:drawable="@drawable/stat_sys_battery_83" android:maxLevel="83" />
<item android:drawable="@drawable/stat_sys_battery_84" android:maxLevel="84" />
<item android:drawable="@drawable/stat_sys_battery_85" android:maxLevel="85" />
<item android:drawable="@drawable/stat_sys_battery_86" android:maxLevel="86" />
<item android:drawable="@drawable/stat_sys_battery_87" android:maxLevel="87" />
<item android:drawable="@drawable/stat_sys_battery_88" android:maxLevel="88" />
<item android:drawable="@drawable/stat_sys_battery_89" android:maxLevel="89" />
<item android:drawable="@drawable/stat_sys_battery_90" android:maxLevel="90" />
<item android:drawable="@drawable/stat_sys_battery_91" android:maxLevel="91" />
<item android:drawable="@drawable/stat_sys_battery_92" android:maxLevel="92" />
<item android:drawable="@drawable/stat_sys_battery_93" android:maxLevel="93" />
<item android:drawable="@drawable/stat_sys_battery_94" android:maxLevel="94" />
<item android:drawable="@drawable/stat_sys_battery_95" android:maxLevel="95" />
<item android:drawable="@drawable/stat_sys_battery_96" android:maxLevel="96" />
<item android:drawable="@drawable/stat_sys_battery_97" android:maxLevel="97" />
<item android:drawable="@drawable/stat_sys_battery_98" android:maxLevel="98" />
<item android:drawable="@drawable/stat_sys_battery_99" android:maxLevel="99" />
<item android:drawable="@drawable/stat_sys_battery_100" android:maxLevel="100" />
</level-list>
am i missing anything?

[Q] Help with Xposed Mod Replacing Battery Icons

Can someone help me, I've tried everything I can think of. I'm trying to build an xposed mod to replace the battery charging icons on my s4 (custom stock rooted touchwiz rom).
So far I was able to get @rovo89 Red Clock tutorial to work, and i've even decompiled a few xposed battery tweak mods but i can't seem to replace the charging icons on my s4.
Here is my latest attempt
Code:
package com.elproduc3r.android.xposed.mods.redclock;
import com.elproduc3r.android.xposed.modules.redclock.R;
import android.content.res.XModuleResources;
import android.content.res.XResources;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.widget.TextView;
import de.robv.android.xposed.IXposedHookInitPackageResources;
import de.robv.android.xposed.IXposedHookLoadPackage;
import de.robv.android.xposed.IXposedHookZygoteInit;
import de.robv.android.xposed.XposedBridge;
import de.robv.android.xposed.callbacks.XC_InitPackageResources.InitPackageResourcesParam;
import de.robv.android.xposed.IXposedHookLoadPackage;
import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam;
import static de.robv.android.xposed.XposedHelpers.findAndHookMethod;
public class redclock implements IXposedHookZygoteInit, IXposedHookInitPackageResources, IXposedHookLoadPackage {
private static String MODULE_PATH = null;
@Override
public void initZygote(StartupParam startupParam) throws Throwable {
// TODO Auto-generated method stub
MODULE_PATH = startupParam.modulePath;
// XModuleResources modRes = XModuleResources.createInstance(MODULE_PATH, null);
// XResources.setSystemWideReplacement("android", "drawable","stat_sys_battery_charge", modRes.fwd(R.drawable.stat_sys_battery_charge));
}
@Override
public void handleInitPackageResources(InitPackageResourcesParam resparam) throws Throwable {
if (!resparam.packageName.equals("com.android.systemui"))
return;
XModuleResources modRes = XModuleResources.createInstance(MODULE_PATH, resparam.res);
resparam.res.setReplacement("com.android.systemui", "drawable", "stat_sys_battery_charge", modRes.fwd(R.drawable.stat_sys_battery_charge));
}
//change clock text color
public void handleLoadPackage(final LoadPackageParam lpparam)throws Throwable {
if (!lpparam.packageName.equals("com.android.systemui")){
return;
}
findAndHookMethod("com.android.systemui.statusbar.policy.Clock", lpparam.classLoader, "updateClock", new XC_MethodHook() {
@Override
protected void afterHookedMethod(MethodHookParam param) throws Throwable {
TextView tv = (TextView) param.thisObject;
tv.setTextColor(Color.parseColor("#33B5E5"));
}
});
}
}
Here is my stat_sys_battery_charge.xml in drawable folder
Code:
<?xml version="1.0" encoding="utf-8"?>
<level-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:maxLevel="15">
<animation-list android:oneshot="false" xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim15" />
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim29" />
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim43" />
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim57" />
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim71" />
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim85" />
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim100" />
</animation-list>
</item>
<item android:maxLevel="29">
<animation-list android:oneshot="false" xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim29" />
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim43" />
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim57" />
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim71" />
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim85" />
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim100" />
</animation-list>
</item>
<item android:maxLevel="43">
<animation-list android:oneshot="false" xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim43" />
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim57" />
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim71" />
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim85" />
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim100" />
</animation-list>
</item>
<item android:maxLevel="57">
<animation-list android:oneshot="false" xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim57" />
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim71" />
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim85" />
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim100" />
</animation-list>
</item>
<item android:maxLevel="71">
<animation-list android:oneshot="false" xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim71" />
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim85" />
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim100" />
</animation-list>
</item>
<item android:maxLevel="85">
<animation-list android:oneshot="false" xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim85" />
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim100" />
</animation-list>
</item>
<item android:maxLevel="100">
<animation-list android:oneshot="false"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:duration="2000" android:drawable="@drawable/stat_sys_battery_charge_anim100" />
</animation-list>
</item>
<item android:drawable="@drawable/stat_sys_battery_charge_anim100" android:maxLevel="101" />
</level-list>
All of my anim.png files are present, but seems like the xml file is not found since this is the error in xposed.log
Code:
Loading Xposed v42 (for Zygote)...
Loading modules from /data/app/com.elproduc3r.android.xposed.modules.redclock-1.apk
Loading class com.elproduc3r.android.xposed.mods.redclock.redclock
android.content.res.Resources$NotFoundException: com.android.systemui:drawable/stat_sys_battery_charge
at android.content.res.XResources.setReplacement(XResources.java:261)
at com.elproduc3r.android.xposed.mods.redclock.redclock.handleInitPackageResources(redclock.java:40)
at de.robv.android.xposed.IXposedHookInitPackageResources$Wrapper.handleInitPackageResources(IXposedHookInitPackageResources.java:20)
at de.robv.android.xposed.callbacks.XC_InitPackageResources.call(XC_InitPackageResources.java:28)
at de.robv.android.xposed.callbacks.XCallback.callAll(XCallback.java:70)
at de.robv.android.xposed.XposedBridge$1.afterHookedMethod(XposedBridge.java:668)
at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:561)
at android.app.ActivityThread.getTopLevelResources(Native Method)
at android.app.ActivityThread.getTopLevelResources(ActivityThread.java:1846)
at android.app.LoadedApk.getResources(LoadedApk.java:481)
at android.app.ContextImpl.init(ContextImpl.java:2343)
at android.app.ContextImpl.init(ContextImpl.java:2336)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4506)
at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)
at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:547)
at android.app.ActivityThread.handleBindApplication(Native Method)
at android.app.ActivityThread.access$1400(ActivityThread.java:159)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1376)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5419)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1187)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:126)
at dalvik.system.NativeStart.main(Native Method)
Can someone please show me what i'm doing wrong?
Here is my androidmanifest.xml. i added a bunch of permissions hoping one of these would fix this for me. Any help is much appreciated.
Code:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.elproduc3r.android.xposed.modules.redclock"
android:versionCode="1"
android:versionName="1.0"
>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.INJECT_EVENTS" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.STATUS_BAR_SERVICE" />
<uses-permission android:name="android.permission.STATUS_BAR" />
<uses-permission android:name="android.permission.EXPAND_STATUS_BAR" />
<uses-permission android:name="android.permission.REMOTE_AUDIO_PLAYBACK" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.MANAGE_NETWORK_POLICY" />
<uses-permission android:name="android.permission.MANAGE_USB" />
<uses-permission android:name="android.permission.DEVICE_POWER" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.UPDATE_DEVICE_STATS" />
<uses-permission android:name="android.permission.MASTER_CLEAR" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.GET_DETAILED_TASKS" />
<uses-permission android:name="android.permission.REORDER_TASKS" />
<uses-permission android:name="android.permission.REMOVE_TASKS" />
<uses-permission android:name="android.permission.STOP_APP_SWITCHES" />
<uses-permission android:name="android.permission.SET_SCREEN_COMPATIBILITY" />
<uses-permission android:name="android.permission.START_ANY_ACTIVITY" />
<uses-permission android:name="android.permission.INTERNAL_SYSTEM_WINDOW" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.READ_FRAME_BUFFER" />
<uses-permission android:name="android.permission.MANAGE_APP_TOKENS" />
<uses-permission android:name="android.permission.SET_ORIENTATION" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
<uses-sdk
android:minSdkVersion="18"
android:targetSdkVersion="19" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<meta-data android:value="true" android:name="xposedmodule"/>
<meta-data android:value="2.4.1" android:name="xposedminversion"/>
<meta-data android:value="Demonstration of the Xposed framework.\nMakes the status bar clock red." android:name="xposeddescription"/>
</application>
</manifest>

App permissions

Can someone help and check if these permissions are okay? Some look a bit too much for a system alarm clock, but I'm no expert and it's better to ask than start messing around with things.
Code:
<package name="com.android.deskclock" codePath="/system/app/DeskClock" nativeLibraryPath="/system/app/DeskClock/lib" primaryCpuAbi="arm64-v8a" publicFlags="1011465797" privateFlags="0" pkgFlagsEx="0" ft="11e8dc5d800" it="11e8dc5d800" ut="11e8dc5d800" version="450" sharedUserId="1000">
<sigs count="1">
<cert index="0" />
</sigs>
<perms>
<item name="android.permission.REAL_GET_TASKS" granted="true" flags="0" />
<item name="android.permission.BIND_INCALL_SERVICE" granted="true" flags="0" />
<item name="android.permission.WRITE_SETTINGS" granted="true" flags="0" />
<item name="android.permission.CONFIGURE_WIFI_DISPLAY" granted="true" flags="0" />
<item name="android.permission.ACCESS_WIMAX_STATE" granted="true" flags="0" />
<item name="android.permission.RESTART_PACKAGES" granted="true" flags="0" />
<item name="android.permission.STORAGE_INTERNAL" granted="true" flags="0" />
<item name="android.permission.USE_CREDENTIALS" granted="true" flags="0" />
<item name="android.permission.MODIFY_AUDIO_SETTINGS" granted="true" flags="0" />
<item name="android.permission.ACCESS_CHECKIN_PROPERTIES" granted="true" flags="0" />
<item name="android.permission.ACCESS_MOCK_LOCATION" granted="true" flags="0" />
<item name="android.permission.INSTALL_LOCATION_PROVIDER" granted="true" flags="0" />
<item name="android.permission.SYSTEM_ALERT_WINDOW" granted="true" flags="0" />
<item name="android.permission.BROADCAST_PHONE_ACCOUNT_REGISTRATION" granted="true" flags="0" />
<item name="android.permission.CLEAR_APP_USER_DATA" granted="true" flags="0" />
<item name="android.permission.BROADCAST_CALLLOG_INFO" granted="true" flags="0" />
<item name="android.permission.INSTALL_PACKAGES" granted="true" flags="0" />
<item name="android.permission.SHUTDOWN" granted="true" flags="0" />
<item name="android.permission.NFC" granted="true" flags="0" />
<item name="android.permission.CALL_PRIVILEGED" granted="true" flags="0" />
<item name="android.permission.CHANGE_NETWORK_STATE" granted="true" flags="0" />
<item name="android.permission.MASTER_CLEAR" granted="true" flags="0" />
<item name="android.permission.WRITE_SYNC_SETTINGS" granted="true" flags="0" />
<item name="android.permission.RECEIVE_BOOT_COMPLETED" granted="true" flags="0" />
<item name="com.google.android.googleapps.permission.GOOGLE_AUTH" granted="true" flags="0" />
<item name="android.permission.PEERS_MAC_ADDRESS" granted="true" flags="0" />
<item name="android.permission.DEVICE_POWER" granted="true" flags="0" />
<item name="android.permission.MANAGE_PROFILE_AND_DEVICE_OWNERS" granted="true" flags="0" />
<item name="android.permission.READ_PROFILE" granted="true" flags="0" />
<item name="android.permission.BLUETOOTH" granted="true" flags="0" />
<item name="com.android.alarm.permission.SET_ALARM" granted="true" flags="0" />
<item name="android.permission.WRITE_MEDIA_STORAGE" granted="true" flags="0" />
<item name="android.permission.WRITE_BLOCKED_NUMBERS" granted="true" flags="0" />
<item name="android.permission.GET_TASKS" granted="true" flags="0" />
<item name="android.permission.INTERNET" granted="true" flags="0" />
<item name="android.permission.TRANSMIT_IR" granted="true" flags="0" />
<item name="android.permission.BLUETOOTH_ADMIN" granted="true" flags="0" />
<item name="android.permission.CONTROL_VPN" granted="true" flags="0" />
<item name="android.permission.UPDATE_DEVICE_STATS" granted="true" flags="0" />
<item name="android.permission.READ_PRECISE_PHONE_STATE" granted="true" flags="0" />
<item name="android.permission.MANAGE_FINGERPRINT" granted="true" flags="0" />
<item name="android.permission.NET_ADMIN" granted="true" flags="0" />
<item name="android.permission.BIND_CONNECTION_SERVICE" granted="true" flags="0" />
<item name="android.permission.GET_PACKAGE_SIZE" granted="true" flags="0" />
<item name="android.permission.MANAGE_USB" granted="true" flags="0" />
<item name="android.permission.INTERACT_ACROSS_USERS_FULL" granted="true" flags="0" />
<item name="android.permission.STOP_APP_SWITCHES" granted="true" flags="0" />
<item name="android.permission.BATTERY_STATS" granted="true" flags="0" />
<item name="android.permission.PACKAGE_USAGE_STATS" granted="true" flags="0" />
<item name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" granted="true" flags="0" />
<item name="android.permission.TETHER_PRIVILEGED" granted="true" flags="0" />
<item name="android.permission.WRITE_SECURE_SETTINGS" granted="true" flags="0" />
<item name="android.permission.MOVE_PACKAGE" granted="true" flags="0" />
<item name="android.permission.READ_BLOCKED_NUMBERS" granted="true" flags="0" />
<item name="android.permission.READ_SEARCH_INDEXABLES" granted="true" flags="0" />
<item name="android.permission.DIAGNOSTIC" granted="true" flags="0" />
<item name="android.permission.READ_PRIVILEGED_PHONE_STATE" granted="true" flags="0" />
<item name="android.permission.ACCESS_DOWNLOAD_MANAGER" granted="true" flags="0" />
<item name="android.permission.BLUETOOTH_PRIVILEGED" granted="true" flags="0" />
<item name="android.permission.HARDWARE_TEST" granted="true" flags="0" />
<item name="android.intent.category.MASTER_CLEAR.permission.C2D_MESSAGE" granted="true" flags="0" />
<item name="android.permission.BIND_JOB_SERVICE" granted="true" flags="0" />
<item name="android.permission.CONFIRM_FULL_BACKUP" granted="true" flags="0" />
<item name="android.permission.SET_TIME" granted="true" flags="0" />
<item name="android.permission.WRITE_APN_SETTINGS" granted="true" flags="0" />
<item name="android.permission.CHANGE_WIFI_STATE" granted="true" flags="0" />
<item name="android.permission.ACCESS_BLUETOOTH_SHARE" granted="true" flags="0" />
<item name="android.permission.MANAGE_USERS" granted="true" flags="0" />
<item name="android.permission.ACCESS_NETWORK_STATE" granted="true" flags="0" />
<item name="android.permission.DISABLE_KEYGUARD" granted="true" flags="0" />
<item name="android.permission.BACKUP" granted="true" flags="0" />
<item name="android.permission.CHANGE_CONFIGURATION" granted="true" flags="0" />
<item name="android.permission.USER_ACTIVITY" granted="true" flags="0" />
<item name="android.permission.READ_LOGS" granted="true" flags="0" />
<item name="android.permission.COPY_PROTECTED_DATA" granted="true" flags="0" />
<item name="android.permission.INTERACT_ACROSS_USERS" granted="true" flags="0" />
<item name="android.permission.SET_KEYBOARD_LAYOUT" granted="true" flags="0" />
<item name="android.permission.READ_NETWORK_USAGE_HISTORY" granted="true" flags="0" />
<item name="android.permission.KILL_BACKGROUND_PROCESSES" granted="true" flags="0" />
<item name="android.permission.USE_FINGERPRINT" granted="true" flags="0" />
<item name="android.permission.WRITE_USER_DICTIONARY" granted="true" flags="0" />
<item name="android.permission.READ_SYNC_STATS" granted="true" flags="0" />
<item name="android.permission.REBOOT" granted="true" flags="0" />
<item name="android.permission.OEM_UNLOCK_STATE" granted="true" flags="0" />
<item name="android.permission.MANAGE_DEVICE_ADMINS" granted="true" flags="0" />
<item name="android.permission.CLEAR_APP_CACHE" granted="true" flags="0" />
<item name="android.permission.CHANGE_APP_IDLE_STATE" granted="true" flags="0" />
<item name="android.permission.MANAGE_NETWORK_POLICY" granted="true" flags="0" />
<item name="android.permission.SET_POINTER_SPEED" granted="true" flags="0" />
<item name="android.permission.MANAGE_NOTIFICATIONS" granted="true" flags="0" />
<item name="android.permission.CONNECTIVITY_INTERNAL" granted="true" flags="0" />
<item name="android.permission.READ_SYNC_SETTINGS" granted="true" flags="0" />
<item name="android.permission.OVERRIDE_WIFI_CONFIG" granted="true" flags="0" />
<item name="android.permission.FORCE_STOP_PACKAGES" granted="true" flags="0" />
<item name="android.permission.ACCESS_NOTIFICATIONS" granted="true" flags="0" />
<item name="android.permission.VIBRATE" granted="true" flags="0" />
<item name="com.android.certinstaller.INSTALL_AS_USER" granted="true" flags="0" />
<item name="android.permission.READ_USER_DICTIONARY" granted="true" flags="0" />
<item name="android.permission.CRYPT_KEEPER" granted="true" flags="0" />
<item name="android.permission.ACCESS_WIFI_STATE" granted="true" flags="0" />
<item name="android.permission.CHANGE_WIMAX_STATE" granted="true" flags="0" />
<item name="android.permission.MODIFY_PHONE_STATE" granted="true" flags="0" />
<item name="com.android.launcher.permission.INSTALL_SHORTCUT" granted="true" flags="0" />
<item name="android.permission.STATUS_BAR" granted="true" flags="0" />
<item name="android.permission.LOCATION_HARDWARE" granted="true" flags="0" />
<item name="android.permission.WAKE_LOCK" granted="true" flags="0" />
<item name="android.permission.INJECT_EVENTS" granted="true" flags="0" />
<item name="android.permission.DELETE_PACKAGES" granted="true" flags="0" />
</perms>
<proper-signing-keyset identifier="1" />
</package>

Want to add activity in Settings.apk file

I want to add activity in Settings.apk, for that I have created Activity in below path
/home/amit/android/lineage/packages/apps/Settings/src/com/android/settings/network
I have declared AirplaneModePreference activity in AndroidManifest.xml like below
Code:
<activity android:name="com.android.settings.network.AirplaneModePreference"
android:taskAffinity="com.android.settings"
android:configChanges="orientation|keyboardHidden|screenSize"
android:parentActivityName="Settings"
android:label="Advance Airplane Mode">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
But still, when I start the AirplaneModePreference activity, I am getting following error
Code:
Process: com.android.settings, PID: 24946
android.content.ActivityNotFoundException: Unable to find explicit activity class {com.android.settings.network/com.android.settings.network.AirplaneModePreference}; have you declared this activity in your AndroidManifest.xml (which is in Settings/AndroidManifest.xml) ?
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2005)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1673)
at android.app.Activity.startActivityForResult(Activity.java:4587)
at android.app.Activity.startActivityForResult(Activity.java:4545)
at android.app.Activity.startActivity(Activity.java:4906)
at android.app.Activity.startActivity(Activity.java:4874)
at android.content.ContextWrapper.startActivity(ContextWrapper.java:379)
at android.support.v7.preference.Preference.performClick(Preference.java:1139)
at com.android.settingslib.RestrictedPreference.performClick(RestrictedPreference.java:78)
at android.support.v7.preference.Preference.performClick(Preference.java:1107)
at android.support.v7.preference.Preference$1.onClick(Preference.java:172)
at android.view.View.performClick(View.java:6597)
at android.view.View.performClickInternal(View.java:6574)
at android.view.View.access$3100(View.java:778)
at android.view.View$PerformClick.run(View.java:25906)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6729)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Do you have any idea, then please let me know, thanks a lot in advance

Categories

Resources