Your Phone is Locked Because the Payment Service was Uninstalled

Chamelleon

Senior Member
May 16, 2010
772
354
93
Kraków, Poland
If you ever lock Your Samsung because of disabling Samsung Payments or by debloating and You have TWRP installed here is a fix.

Boot to TWRP and using File Manager copy data/system/users/0/package-restrictions.xml to SD and then copy this file to PC to and open in notepad or any text editor.
Remove <pkg name="com.samsung.android.kgclient" ceDataInode="-4294836077" enabled="3" enabledCaller="0/" /> line from the file. It can have different values but package name must be the same. Remove whole line, save file and place it back to data/system/users/0/. I suggest to delete old package-restrictions.xml and package-restrictions.xml.bak before placing back edited file.
That's it, phone should be unlocked now.
 

TiTiB

Senior Member
Jun 19, 2015
768
486
93
WA
Thank you @Chamelleon! I was about to get in to a full reflash stock, reroot, reinstall situation. Damn, I love xda!

BTW, the thing I did differently was to remove the three lines inclusive of
<disabled-components>
<item name="com.samsung.android.kgclient.receiver.KGAgentReceiver" />
</disabled-components>

...and changed enabled="3" to enabled="1" in this line
<pkg name="com.samsung.android.kgclient" ceDataInode="2643" enabled="1"

Probably not required, but thought I'd mention it.

Galaxy Tab S6
Android 9
Stock-Rooted
 
Last edited:
  • Like
Reactions: tremalnaik

Shooting Star Max

Senior Member
Feb 17, 2013
406
182
43
Santiago
I tried attempted to debloat an S8 (running Pie), but I started receiving this message afterwards. There's no “com.samsung.android.kgclient” in the package-restrictions.xml file. Is there any other place this restriction could be enforced?
 

harismuntazir

New member
Feb 11, 2018
1
0
0
Found Another Way 2

in my case i copied the file package restrictions but did not found the line or the package in it.
What I Did
1. download the Samsung payment services apk from apkmirror.com
2. installed this app as a system app using lucky patcher.
Note: i guess we can use the adb tool too to install apps as system apps.

3. Nothing just restart and done.

Also this can be overcome in every restart without installing the above app. As you may have noticed device waits some time after the restart before pushing the notification and locking the device. What i found is that if we restart the SystemUI it disables the lock and does not show it up until next restart.

Enjoy and Keep Sharing.
 

Arhhhghhh

Member
Apr 20, 2020
6
1
0
I went in and deleted package-restrictions.xml and the bak file, I can reboot now and get in with the message, I initially uninstalled payment services, I tried flashing a zip of payment services apk couldn't get that going, now I'm getting android set up pop ups and my twrp won't boot to the recovery loader from within the app, and super su has lost all the settings for applications!?¿ :confused: rlly don't want to do a clean flash and re root ... bloody system packages arggghf help
 

Sparta0909

New member
Aug 19, 2020
1
0
0
in my case i copied the file package restrictions but did not found the line or the package in it.
What I Did
1. download the Samsung payment services apk from apkmirror.com
2. installed this app as a system app using lucky patcher.
Note: i guess we can use the adb tool too to install apps as system apps.

3. Nothing just restart and done.

Also this can be overcome in every restart without installing the above app. As you may have noticed device waits some time after the restart before pushing the notification and locking the device. What i found is that if we restart the SystemUI it disables the lock and does not show it up until next restart.

Enjoy and Keep Sharing.
Hi..how to restart system ui within so limited time
 

jafferkhan

Senior Member
Jun 15, 2010
792
89
28
If you ever lock Your Samsung because of disabling Samsung Payments or by debloating and You have TWRP installed here is a fix.

Boot to TWRP and using File Manager copy data/system/users/0/package-restrictions.xml to SD and then copy this file to PC to and open in notepad or any text editor.
Remove <pkg name="com.samsung.android.kgclient" ceDataInode="-4294836077" enabled="3" enabledCaller="0/" /> line from the file. It can have different values but package name must be the same. Remove whole line, save file and place it back to data/system/users/0/. I suggest to delete old package-restrictions.xml and package-restrictions.xml.bak before placing back edited file.
That's it, phone should be unlocked now.
i cant find this xml anywhere, please help