Wednesday, 30 November 2022

Removing Unwanted Xiaomi Apps

This guide will show you how to remove pre-installed Xiaomi apps on your Android device using ADB commands.

Identifying Package Names

First, connect your device to your computer and enable USB debugging. Open a terminal window and execute the following commands.

$ adb shell

$ pm list packages | grep ‘xiaomi’
$ pm list packages | grep ‘miui'

These commands will list all installed packages and filter for those containing "xiaomi" or "miui" in their names.

Note down the package names of the apps you want to remove.

Uninstalling Apps

Use the following command to uninstall an app, replacing `<PackageName>` with the actual package name:

$ pm uninstall -k —user 0 <PackageName>


The `-k` flag preserves the app's data, allowing you to reinstall it later. The `--user 0` flag specifies the primary user.

Restoring Apps

$ cmd package install-existing <PackageName>


Removed:

com.xiaomi.micloud.sdk # sdk for developer

com.google.android.projection.gearhead #android auto

com.android.egg # eastern egg

com.miui.yellowpage

com.aura.oobe.bouygues

com.orange.update

com.orange.aura.oobe

com.sfr.android.sfrjeux



Strange list of unwanted apps:

com.altice.android.myapps
com.android.camera
com.android.cameraextensions
com.android.musicfx
com.android.wallpaperbackup
com.android.wallpapercropper
com.android.wallpaper.livepicker

com.google.android.apps.turbo
com.google.android.apps.wellbeing
com.android.egg
com.android.hotwordenrollment.okgoogle
com.android.hotwordenrollment.xgoogle

com.bsp.catchlog
com.fido.asm
com.google.android.apps.googleassistant
com.google.android.marvin.talkback
com.google.mainline.adservices
com.google.mainline.telemetry
com.ironsource.appcloud.oobe.hutchison
com.lbe.security.miui

com.tencent.soter.soterserver
com.wdstechnology.android.kryten

com.miuix.editor
com.miui.miwallpaper
com.miui.miwallpaper.overlay
com.miui.miwallpaper.overlay.customize
com.miui.miwallpaper.wallpaperoverlay.config.overlay
com.miui.player
com.miui.videoplayer
com.miui.wallpaper.overlay
com.miui.wallpaper.overlay.customize
com.aura.oobe.vodafone
de.telekom.tsc

com.sfr.android.sfrjeux
com.orange.aura.oobe
com.orange.update
com.aura.oobe.bouygues
com.miui.yellowpage

Saturday, 12 November 2022

debian + NetworkManager generate resolve.conf at every reboot

Sadly the NetworkManager overwrite my resolv.conf. To fix I found followings:

$ vim /etc/NetworkManager/conf.d/90-dns-none.conf

[main]

dns=none

$ systemctl reload NetworkManager

Above section disable update NetworkManager overwrite your custom dns resolver.

Now you can add you favorite dns provider like me with Cloudflare:

$ sudo tee /etc/resolv.conf << END
nameserver 2606:4700:4700::1111
nameserver 1.1.1.1
nameserver 1.0.0.1
nameserver 2606:4700:4700::1001
END

Have nice day...

Thursday, 10 November 2022

Set up tc_malloc to default on the whole system on Linux

You can use a faster memory allocator for multi-core CPU if you use Google's tcmalloc (https://github.com/google/tcmalloc).

At first install tcmalloc from your repository:

$ apt install libtcmalloc-minimal4

 Now ready for testing with Firefox:

$ LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so.4 firefox

If you like it, now you're ready to apply system wide:

$ cat /etc/ld.so.preload
/usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so.4


This is tested on Debian Bookworm and Linux Mint.

Do at your own risk! On this site I give the quick step without detailed description, benchmark and other things.

 

Have a nice day!

Tuesday, 17 May 2022

Mounting nfs

Mount NFS share on Fedora with Asustor. At first check official description here:

https://www.asustor.com/en/knowledge/detail/?id=&group_id=508


After you do the share on your Linux you can add to /etc/fstab:


192.168.1.66:/volume1/Z /media/Z nfs defaults 0 0

192.168.1.66:/volume2/X /media/X nfs defaults 0 0

 

Of course you can try mount manually:

$ mount -t nfs 192.168.1.66:/volume1/X  /media/X


Longer sudo

Debian based:
$ sudo update-alternatives --config editor
Fedora based: 
$ export EDITOR=vim 

$ sudo visudo /etc/sudoers

Add timestamp_timeout after env_reset:

Defaults        env_reset,timestamp_timeout=40
Now bash will remember for 40 minutes.
0 means always ask passwd, disable passwd forever set to -1.
 

Saturday, 15 January 2022

DualBoot headphone bluetooth connection issue

So my XM3 unable to connect when I change OS at boot (Win10 vs Debian11).

Short version (all in superuser, su or sudo):

$ bluetoothctl
$ devices (this will print macaddresses)
$ remove xx:11:22....
$ service bluetooth restart
 
Description:
Some bluetooth device don't like pairing associated by same MAC address. Remove and repair bluetooth.


Debian Sony XM3 bluetooth connection issue

I installed Debian 11 but sometimes got connection error. Now I provide a simple solution to fix it in case the following:

sap-server: Operation not permitted (1)


At first the SAP stands for SIM Access Profile.


With vim edit "/etc/systemd/system/bluetooth.target.wants/bluetooth.service"

At line ExecStart=/usr/lib/bluetooth/bluetoothd add the following:
--noplugin=sap


Like this:
ExecStart=/usr/lib/bluetooth/bluetoothd --noplugin=sap


Now restart:

$ sudo systemctl daemon-reload
$ sudo service bluetooth restart
$ sudo service bluetooth status



You're becoming a happy user who able to connect to your Sony headphone.


Just a minor update:

For fresh Linux installment you can grab deb or rpm broadcom drivers:

https://github.com/winterheart/broadcom-bt-firmware