Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not working without root #125

Closed
pokegamer5547 opened this issue Aug 28, 2022 · 5 comments
Closed

not working without root #125

pokegamer5547 opened this issue Aug 28, 2022 · 5 comments
Assignees
Labels
question Question about BCR

Comments

@pokegamer5547
Copy link

Hello. I tried to install BCR without root using recommended steps here in github.
I'm using crdroid 8.8 (Lineage os fork on android 12.1)
I copied all files under system directory in zip file and pasted it in /system/ partition after mounting it.
But the app isnt showing and when i install through apk it only installs it as user app, not as system app. Where am i going wrong?

@chenxiaolong
Copy link
Owner

Hmm, I wonder if it's a permission or selinux issue. Can you run this command in a terminal (or adb shell) and paste the output here?

ls -lZR /system/etc/permissions/ /system/priv-app/com.chiller3.bcr/

@pokegamer5547
Copy link
Author

Sorry for late reply! I was bit busy. Here you go.
`
/system/etc/permissions:
total 132
-rw-r--r-- 1 root root u:object_r:system_file:s0 846 2009-01-01 05:30 android.hardware.biometrics.face.xml
-rw-r--r-- 1 root root u:object_r:system_file:s0 1050 2009-01-01 05:30 android.software.live_wallpaper.xml
-rw-r--r-- 1 root root u:object_r:system_file:s0 748 2009-01-01 05:30 android.software.webview.xml
-rw-r--r-- 1 root root u:object_r:system_file:s0 777 2009-01-01 05:30 android.test.base.xml
-rw-r--r-- 1 root root u:object_r:system_file:s0 777 2009-01-01 05:30 android.test.mock.xml
-rw-r--r-- 1 root root u:object_r:system_file:s0 781 2009-01-01 05:30 android.test.runner.xml
-rw-r--r-- 1 root root u:object_r:system_file:s0 1306 2009-01-01 05:30 com.android.documentsui.xml
-rw-r--r-- 1 root root u:object_r:system_file:s0 807 2009-01-01 05:30 com.android.future.usb.accessory.xml
-rw-r--r-- 1 root root u:object_r:system_file:s0 801 2009-01-01 05:30 com.android.location.provider.xml
-rw-r--r-- 1 root root u:object_r:system_file:s0 805 2009-01-01 05:30 com.android.media.remotedisplay.xml
-rw-r--r-- 1 root root u:object_r:system_file:s0 797 2009-01-01 05:30 com.android.mediadrm.signer.xml
-rw-r--r-- 1 root root u:object_r:system_file:s0 1277 2009-01-01 05:30 com.android.networkstack.tethering.xml
-rw-r--r-- 1 root root u:object_r:system_file:s0 2003 2009-01-01 05:30 com.android.networkstack.xml
-rw-r--r-- 1 root root u:object_r:system_file:s0 763 2009-01-01 05:30 javax.obex.xml
-rw-r--r-- 1 root root u:object_r:system_file:s0 787 2009-01-01 05:30 org.apache.http.legacy.xml
-rw-r--r-- 1 root root u:object_r:system_file:s0 14960 2009-01-01 05:30 platform.xml
-rw-r----- 1 root root u:object_r:system_file:s0 292 2022-08-28 16:45 privapp-permissions-com.chiller3.bcr.xml
-rw-r--r-- 1 root root u:object_r:system_file:s0 287 2009-01-01 05:30 privapp-permissions-com.crdroid.faceunlock.xml
-rw-r--r-- 1 root root u:object_r:system_file:s0 34087 2009-01-01 05:30 privapp-permissions-platform.xml
-rw-r--r-- 1 root root u:object_r:system_file:s0 5002 2009-01-01 05:30 privapp-permissions-qti.xml
-rw-r--r-- 1 root root u:object_r:system_file:s0 158 2009-01-01 05:30 qcom.fmradio.xml

/system/priv-app/com.chiller3.bcr:
total 2988
-rw-r----- 1 root root u:object_r:system_file:s0 3055649 2022-08-28 16:45 app-release.apk
`

@chenxiaolong
Copy link
Owner

Thanks for that. I think the permissions on the copied files are not correct, causing the files to only be readable by root. This should fix the problem:

chmod 644 /system/etc/permissions/privapp-permissions-com.chiller3.bcr.xml
chmod 755 /system/priv-app/com.chiller3.bcr
chmod 644 /system/priv-app/com.chiller3.bcr/app-release.apk

(you'll need to mount the system partition as writable like you did when you first set it up)

@pokegamer5547
Copy link
Author

pokegamer5547 commented Sep 2, 2022

Thanks! That fixed my issue :)
I think since android's internal storage doesnt allow some permissions to file without root, it was unable to get those permissions like executable/search permission when i first extracted and caused this issue. Maybe it should be better mentioned in readme.md too to avoid confusion.

@chenxiaolong chenxiaolong self-assigned this Sep 2, 2022
@chenxiaolong chenxiaolong added the question Question about BCR label Sep 2, 2022
@chenxiaolong
Copy link
Owner

No problem! I've added a mention of the permissions in the README. Also, starting from version 1.19, it is now possible to directly flash the BCR zip from recovery to install it on unrooted ROMs (#128, #130).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question about BCR
Projects
None yet
Development

No branches or pull requests

2 participants