Originally Posted by linuxthinker
If your changes resulted in edits to arrays.xml (rather than straight up deletes), make sure your XML is valid (no missing close tags, for instance). I think Android M started enforcing SELinux bits. I had this line of magic in my flashing script to ensure that the bits are correctly set:
set_metadata("/system/framework/framework-res.apk", "uid", 0, "gid", 0, "mode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
You can try running "stat /system/framework/framework-res.apk" or "ls --context /system/framework/framework-res.apk" and ensuring that Uid and Gid are both 0 (or root) and Context matches above. You can use chcon to restore the context.
I think I was doing everything fine. I actually just now did a test with your lollipop LMY47V patch. First, I flashed Lollipop LMY47V and copied the original Framework-res.apk to my computer. Then, I installed your patch for LMY47V and also copied it to my computer. I decompiled both framework-res. I then copied and replaced the original modified arrays.xml files with yours and didn't edit the xml files in any way at all. In short, I replaced the folders in the original framework-res with your modified folders. I recompiled the apk, signed it with Sign Apk and copied it back to the downloads location on my Nexus 7. I then copied it from dowloads to /system. There, I manually set the permissions to chmod 644. I then moved the framework res to system/framework and just replaced it and overwrote it. I got unfortunately super su has stopped, but there wasn't a bootloop right away. I then rebooted the tablet and it was back in the optimizing apps bootloop and it will just reboot and get into this same bootloop again never completely finishing boot. I even tried going into TWRP and going to file manager there and copying my framework-res.apk to system/framework manually and setting permissions to chmod 0644, but still the bootloop was the same. When I copied my original, unmodified framework-res.apk back, the tablet booted fine after optimizing apps.
I do know if I did everything wrong and just copied framework-res.apk to the system/framework location, I would get a bootloop immediately, but this wasn't the case. The tablet would still run after copying my framework-res.apk, so this is very weird. I think something about compiling the apk, signing it, or the permissions is wrong. Would you please tell me what I am doing wrong when I do this all manually? I am sorry, but I don't understanding programming like you do, so I can't efficiently bundle everything into a flashable zip like you can. Thanks for all of your help again!