Tag: ADB

  • How to Permanently Remove Glance Lock Screen Ads on Motorola Phones (Motorola Edge 2024)

    How to Permanently Remove Glance Lock Screen Ads on Motorola Phones (Motorola Edge 2024)

    If you recently bought or updated a Motorola smartphone—such as the Motorola Edge (2024)—you might have noticed full-screen sponsored stories, headlines, and ads taking over your lock screen. This “feature” is powered by a pre-installed platform called Glance.

    Many users find that even after toggling it off in settings, Glance inevitably reactivates itself after system updates or background carrier syncs. Because it is baked into the operating system as a system application, Motorola does not provide a standard “Uninstall” button.

    Here is a complete, step-by-step guide on how to permanently remove Glance for your profile without rooting your device, followed by a technical breakdown of how and why this works.


    Part 1: Step-by-Step Guide (Layman’s Guide)

    No technical background is required. You will only need your phone, a USB-C cable, and a PC (Windows, Mac, or Linux).

    Step 1: Enable Developer Options on Your Phone

    Before your computer can talk directly to your phone’s software, you need to unlock developer access:

    1. Open your phone’s Settings app.
    2. Scroll to the bottom and select About phone.
    3. Scroll down until you see Build number.
    4. Tap Build number 7 times in rapid succession. You will see a small message pop up: “You are now a developer!” (You may need to enter your phone PIN or pattern.)

    Step 2: Turn on USB Debugging

    1. Go back to the main Settings menu.
    2. Tap System > Developer options.
    3. Scroll down to the Debugging section and toggle on USB debugging.
    4. Tap OK on the confirmation warning.

    Step 3: Connect to Your Computer

    1. Plug your phone into your PC using a USB-C data cable.
    2. Unlock your phone screen. A prompt will appear saying: “Allow USB debugging?”
    3. Check the box that says “Always allow from this computer” and tap Allow.

    Step 4: Download the Official Android Tools (ADB)

    You don’t need heavy developer software (like Android Studio). You only need Google’s official, lightweight Platform-Tools:

    Step 5: Run the Removal Command

    1. Open the extracted platform-tools folder.
    2. In the folder address bar at the top, type cmd or powershell and press Enter. A terminal window will open. (On macOS or Linux, open Terminal in the extracted folder and use ./adb instead of .\adb.)
    3. Test that your phone is communicating properly:
      .\adb devices
      (You should see your device’s serial number followed by the word device.)
    4. Run the removal command:
      .\adb shell pm uninstall -k --user 0 com.glance.lockscreenM
    5. You will see the terminal print:
      Success

    Step 6: Wrap Up

    Glance is now completely uninstalled from your phone profile.

    1. Unplug your phone.
    2. (Optional security best practice) Go back to Settings > System > Developer options and toggle USB debugging back to Off.

    Enjoy a clean, ad-free lock screen!


    Part 2: Technical Deep-Dive & Root-Cause Analysis

    For system administrators, technicians, and repair specialists, here is what is actually taking place under the hood.

    Why Glance Re-Enables Itself

    Glance is integrated by OEMs (such as Motorola/Lenovo) and telecom carriers under Carrier/OEM partner agreements. On Motorola devices, it is distributed under the package identifier:

    com.glance.lockscreenM

    Motorola couples this with overlay hooks and setup components, such as:

    com.motorola.setup.overlay.skipglance.manaus

    When users disable Glance via the Lock Screen Display Settings GUI:

    1. The setting merely alters a user-space preference flag in Settings.Secure or the app’s local shared preferences (SharedPreferences).
    2. The package itself remains registered with com.android.systemui lock screen extension listeners.
    3. Upon receiving standard system broadcast intents—such as BOOT_COMPLETED, network state changes, or carrier provisioning syncs (carrier_config_changed)—the persistent service awakens and re-prompts or re-registers itself, bypassing the user’s prior GUI preference.

    The Mechanism of pm uninstall -k --user 0

    Android employs a multi-user framework rooted in Linux user IDs (UIDs). Even on single-user smartphones, the primary user account is designated as User 0 (USER_OWNER / primary system user).

    System applications reside in read-only partitions (/system/app, /system/priv-app, or /product/priv-app). Without unlocked bootloaders and root access (su), modifying or mounting these partitions as read-write (rw) is prevented by Android Verified Boot (AVB) and dm-verity.

    However, the Android Package Manager (pm) allows profile-level package lifecycle management:

    adb shell pm uninstall -k --user 0 com.glance.lockscreenM

    Flag Breakdown

    • pm uninstall: Instructs the Package Manager service to dismantle the application bundle.
    • -k (--keep-data): Retains the cache and application data directories in case the package is ever restored, preventing fatal dependency errors on poorly written system apps that reference shared UID structures.
    • --user 0: Explicitly uninstalls the package only for the primary user.

    What This Accomplishes Internally

    1. Deregistration from System Server: The Package Manager unbinds the app’s services, removes registered intent filters from the IntentResolver, and terminates active background daemons.
    2. Elimination of Run State: Because the app is marked uninstalled for User 0, Android will not launch its APK on boot or route system broadcast events to it.
    3. Immutability Against Updates: System-level broadcast receivers and background services can no longer invoke the component because it no longer exists inside the User 0 runtime registry.
    4. Safety & OTA Preservation: The original read-only APK stays intact inside the underlying system image. This ensures that SafetyNet / Play Integrity API checks pass without issue and Official Over-The-Air (OTA) updates install cleanly without failing cryptographic checksum verification.

    Verification Commands

    To inspect active versus dormant states via ADB (on Windows CMD or PowerShell, wrap the remote pipe in quotes such as adb shell "pm list packages | grep glance" or replace grep with findstr):

    • Check if running or active for user:
      adb shell pm list packages | grep glance
      (Returns empty if successfully removed.)
    • Check presence in base system image:
      adb shell pm list packages -u | grep glance
      (Returns package:com.glance.lockscreenM, confirming the dormant file is present in the underlying image without affecting the user.)
    • Restoration (if ever needed in the future): If a user ever desires to restore the pre-installed system package:
      adb shell cmd package install-existing com.glance.lockscreenM

    Need Hands-On Help Removing Bloatware or Adware?

    If you are uncomfortable connecting your phone to a command prompt—or if unwanted ads keep popping up across your smartphone, tablet, or computer—OC Computer Fix is happy to take care of it safely and cleanly for you.