-
-
Save samchoi69/75d9bd164597338ff116b5a441e41a83 to your computer and use it in GitHub Desktop.
| # Windows | |
| 1. Open Windows Command Prompt | |
| 2. Run command | |
| "C:\Program Files (x86)\BlueStacks\HD-Adb.exe" shell | |
| # Within BlueStacks shell | |
| /system/xbin/bstk/su | |
| pm disable-user com.bluestacks.s2p | |
| # macOS | |
| 1. Open Terminal | |
| 2. Run command: | |
| /Applications/BlueStacks.app/Contents/MacOS/adb shell | |
| # Within BlueStacks shell | |
| /system/xbin/bstk/su | |
| pm disable-user com.bluestacks.s2p | |
| # Error: device not found | |
| # Kill the server with ADB | |
| # Make sure BlueStacks is running before you try to start ADB and disable the user | |
| # Windows | |
| "C:\Program Files (x86)\Bluestacks\HD-Adb.exe" kill-server | |
| #macOS | |
| /Applications/BlueStacks.app/Contents/MacOS/adb kill-server |
This is the new method that I used First, you need to install WSL or Linux VM. I used WSL.
Open WSL in C:\ProgramData\BlueStacks_nxt\Engine\Pie64:
cd /mnt/c/ProgramData/BlueStacks_nxt/Engine/Pie64sudo modprobe nbd sudo qemu-nbd -c /dev/nbd0 Root.vhd sudo debugfs -w /dev/nbd0p1( If you dont't have qemu-nbd and debugfs, try to install it via apt. )
Now we see, we can edit Root.vhd : type
ls:In debugfs prompt:
cd android dump ./system/etc/hosts /tmp/hostsIt will dump ./system/etc/hosts of Root.vhd to /tmp/hosts of your Linux machine.
Edit /tmp/hosts:
127.0.0.1 localhost ::1 ip6-localhost 127.0.0.1 coinhive.com 127.0.0.1 adservice.google.com 127.0.0.1 pagead2.googlesyndication.com 127.0.0.1 googleads.g.doubleclick.net 0.0.0.0 cloud.bluestacks.com 0.0.0.0 cloud-api-cdn.bluestacks.com 0.0.0.0 cdn-icon.bluestacks.com 0.0.0.0 cdn-bgp.bluestacks.com 0.0.0.0 bluestacks.com 0.0.0.0 www.bluestacks.comIn debugfs prompt:
unlink ./system/etc/hosts write /tmp/hosts ./system/etc/hosts qUse:
sudo qemu-nbd -d /dev/nbd0to detach the disk file.
Now we see the ads is removed.
Update:
You can disable its own laucher by running:
pm disable-user com.uncube.launcher3But before doing it, remember to install alternative laucher ( like Nova ).
I recommend this.
Notice
Why I know those hosts:
I used
Http Toolkitto hook https requests of Bluestack launcher app:
This is not working. When I try to start BlueStacks, a warning appears stating that Android has been tampered with and the application will shut down.



https://gist.github.com/lazuee/2ce5da5670a7bffdd5e89765a3f51846