I will share a simple way to bypass carrier restrictions on Android devices by tweaking the Device Setup app settings. The method has been tested on Pixel 9, 8, and 5. I tried it on the Pixel 7a, but it should work on other models as well.
- This method does not unlock the bootloader (OEM unlock).
- You must redo the process after a factory reset.
- eSIM may not work with this method, but physical SIMs have been tested successfully.
- This process may be overridden by Google at any time.
- Remove the SIM card from the device.
- Factory reset your phone.
- Set up the phone in offline mode
- Do not insert the SIM card yet.
- Do not connect to any Wi-Fi networks.
- Go to Settings > Apps > See all apps.
- Tap the three dots in the top-right corner and enable "Show system".
- Find "Device Setup" and open it.
- Navigate to one of the following options:
- Mobile data & Wi-Fi
- Wi-Fi data usage
- Mobile data usage
- Disable "Background data".
- (Optional) If available, go to "App battery usage" and set it to "Restricted".
-
Enable Developer options and USB debugging.
-
Connect your phone to a PC and run the following commands:
adb shell cmd appops set com.google.android.apps.work.oobconfig WAKE_LOCK deny adb shell cmd appops set com.google.android.apps.work.oobconfig RUN_IN_BACKGROUND deny adb shell cmd appops set com.google.android.apps.work.oobconfig RUN_ANY_IN_BACKGROUND deny adb shell cmd appops set com.google.android.apps.work.oobconfig START_FOREGROUND deny adb shell cmd appops set com.google.android.apps.work.oobconfig ACCESS_RESTRICTED_SETTINGS deny
-
Insert the SIM card and enjoy your unlocked device.
- Download the update.
- Before rebooting, enable Airplane mode.
- Reboot the device.
- After reboot, clear the cache of the Device Setup app.
- Disable background data usage for the Device Setup app.
- Turn off Airplane mode.
- Google can reverse this at any time.
- The Device Setup app has the permission to reset its own restrictions.
- You can use Shizuku or Dhizuku to gain admin control.
- To persist the bypass, make the device owner app an inherited DPM app using
Owndroid. - The OEM Unlock switch may be toggled if both eSIM and physical SIM bypasses are successful.
This project is licensed under the MIT License. See the LICENSE file for details.
I made two helper scripts for this method
Automates the download and expand zip of the latest ADB tools, which are saved to C:\Users\YourUserName\platform-tools.
Automates the Apply ADB Commands, executing the required ADB commands.
This method is based on research and findings from the following source
Additional insights were provided by the community member in Issue #1