[Android Q&A, Help & Troubleshooting] rodrigo286:
Using MTK Client i get complete dump of the Sunmi P2 carrier custom rom with some user locks.

After some work, successfully installed the TWRP recovery.

After that, and some cleaning, manually copying i can get any app run on the device, by manually copying it to the app/app-priv directory of the /system or /userdata partitions and I can use the device normally.

View attachment 6114578

But I still have some problems:

I can't activate developer options;

I can't enable installation from unknown sources;

Some shortcuts on the screen, such as wifi configuration, bluetooth, open apps, etc. do not work;

Rooting needs to be done manually and still can't get the binary to work properly.

The biggest issue with unknown sources, the option is "disabled".

View attachment 6114583

I believed that removing the restrictions from userlist.xml and package-restrictions.xml would solve, and even enable the extra options on the settings screen, but I got no results.

USERLIST.XML

<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<users nextSerialNumber="10" version="6">
<guestRestrictions>
<restrictions no_sms="true" no_install_unknown_sources="false" no_config_wifi="false" no_outgoing_calls="true" />
</guestRestrictions>
<globalRestrictionOwnerUserId id="-10000" />
<user id="0" />
</users>

PACKAGE-RESTRICTIONS.XML

...
<pkg name="com.android.settings" ceDataInode="115029">
<enabled-components>
<item name="com.android.settings.Settings$InputMethodAndLanguageSettingsActivity" />
<item name="com.android.settings.Settings$PowerUsageSummaryActivity" />
<item name="com.android.settings.Settings$SimSettingsActivity" />
<item name="com.android.settings.Settings$PrintSettingsActivity" />
<item name="com.android.settings.Settings$EthernetSettingsActivity" />
<item name="com.android.settings.Settings$DateTimeSettingsActivity" />
<item name="com.android.settings.Settings$BluetoothSettingsActivity" />
<item name="com.android.settings.Settings$LocationSettingsActivity" />
<item name="com.android.settings.Settings$WifiSettingsActivity" />
<item name="com.android.settings.Settings$NotificationAppListActivity" />
<item name="com.android.settings.WebViewImplementation" />
<item name="com.android.settings.Settings$WirelessSettingsActivity" />
<item name="com.android.settings.Settings$DataUsageSummaryActivity" />
<item name="com.android.settings.Settings$SecuritySettingsActivity" />
<item name="com.android.settings.dashboard.conditional.DndCondition$Receiver" />
<item name="com.android.settings.Settings$LabSettingsActivity" />
<item name="com.android.settings.Settings$DevelopmentSettingsActivity" />
<item name="com.android.settings.CryptKeeper" />
<item name="com.android.settings.Settings$PaymentSettingsActivity" />
<item name="com.android.settings.Settings$HotKnotSettingsActivity" />
<item name="com.android.settings.Settings$PrivacySettingsActivity" />
<item name="com.android.settings.Settings$AccountSettingsActivity" />
<item name="com.android.settings.Settings$UserCenterActivity" />
<item name="com.android.settings.Settings$UserSettingsActivity" />
<item name="com.android.settings.BackupSettingsActivity" />
</enabled-components>
</pkg>
...

I edited it with notepad++, even removing the restriction blocks, and sending it to the /userdata partition in the /data/system/users directory.

I imagined it was some persistence rule like chattr, but the file is being saved correctly, I don't know if it is overwritten during some process, looking in the /boot, /recovery, /userdata and /system partitions, but nothing was found.

Is there any other known way for the original rom to be blocking these permissions within the already loaded system?

Android OS version : 7.1.1

Device : P2-B

Model : P2-B

ROM Name : B1691_BC1BOM_P2_V1.0.2_CKD_20220722

TWRP : 3.44

Proc : MT6739

I need to fix these problems, to release a work unlock rom.

Thanks.