I just let FDroid install itself as a privileged system app, Android 5.1. It incorrectly installed itself to /system/priv-app/FDroid/FDroid.apk with 0655 permissions(?). The system froze, but I was in adb and corrected the installation to /system/priv-app/FDroid.apk with 0644 permissions. I rebooted the phone, and all is working fine.
Designs
An error occurred while loading designs. Please try again.
Child items
0
Show closed items
GraphQL error: The resource that you are attempting to access does not exist or you don't have permission to perform this action
No child items are currently open.
Linked items
0
Link issues together to show that they're related.
Learn more.
Yeah, I have a Galaxy Nexus with Android 4.3.1. I just let FDroid install itself as a privileged app, and it installed to /system/appFDroid.apk with permissions root:root 0655. The /system/priv-app folder was added to Android in 4.4. Before that there was just /system/app, so it should've installed to /system/app/FDroid.apk with root:root 0644 permissions.
Edit: Moved it to /system/app/FDroid.apk and all is working fine.
@bible-maker not sure if I understand your comment. So you are on 4.3.1 and F-Droid installed itself to "/system/app/FDroid.apk" ? or do you really mean "/system/appFDroid.apk"?
@bible-maker Sry, I re-read your original issue now. Can you point to a forum post or something that proves that apps should not directly moved into a subfolder? I thought I had tested this enough with my device :/
I just checked and FDroid also works when put into a folder. I reinstalled it to /system/priv-app/FDroid/FDroid.apk, root:root 0644. The folder is root:root 0755, so I think you're right. I've just installed other apps in the past without a folder, since I only saw system apps using folders that were odex'd. I guess the /data apps use folders now too, and they aren't odex'd. Sorry I'm still a little new to 5.1.
@bible-maker No problem, often it's trial and error when using root access...
Do you have other ideas what could have caused the freeze you mentioned in the issue?
I'm guessing it might have had to do with 0655 permissions on the apk. On 4.3 with my Galaxy Nexus, the app just ran fine with 0655 permissions once I moved it to /system/app since only read permissions are needed to open the apk zip file. Android 5.1's security is a bit tighter, but I wouldn't expect the system to just freeze because the apk was executable. I might try reinstalling it with 0655 permissions and run "adb logcat *:F" to see if it happens again.
Ok, I went ahead and reinstalled FDroid as a /data app, so I could let it install itself to /system again. I didn't get a freeze, but I figured out why it didn't show up under apps, even after a reboot. The folder permissions for /system/priv-app/FDroid were root:root 0700. They should be root:root 0755, so the system can see the app.
@dschuermann done, and also made the mkdir have -p to not error if the directory already exists. As a preparation for #363 (closed), since /system/app and /system/priv-app would make mkdir error in my face.