Related
First, let me apologize if solutions to this problem have already been posted on this forum and elsewhere. I developed this solution completely independently, and I am sharing it here in hopes that it may prove useful to someone else.
This pair of scripts will allow you to share your phone's Internet connection with a computer via a USB cable. It definitely works when the computer is running Linux (assuming you have RNDIS support in your kernel), and it should work as well when the computer is running Windows. However, it will not work with Mac, as OS X does not have an RNDIS driver.
First, upload these two scripts to your /sdcard:
/sdcard/usb_tether_start.sh:
Code:
#!/system/bin/sh
prevconfig=$(getprop sys.usb.config)
if [ "${prevconfig}" != "${prevconfig#rndis}" ] ; then
echo 'Is tethering already active?' >&2
exit 1
fi
echo "${prevconfig}" > /cache/usb_tether_prevconfig
setprop sys.usb.config 'rndis,adb'
until [ "$(getprop sys.usb.state)" = 'rndis,adb' ] ; do sleep 1 ; done
ip rule add from all lookup main
ip addr flush dev rndis0
ip addr add 192.168.2.1/24 dev rndis0
ip link set rndis0 up
iptables -t nat -I POSTROUTING 1 -o rmnet0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
dnsmasq --pid-file=/cache/usb_tether_dnsmasq.pid --interface=rndis0 --bind-interfaces --bogus-priv --filterwin2k --no-resolv --domain-needed --server=8.8.8.8 --server=8.8.4.4 --cache-size=1000 --dhcp-range=192.168.2.2,192.168.2.254,255.255.255.0,192.168.2.255 --dhcp-lease-max=253 --dhcp-authoritative --dhcp-leasefile=/cache/usb_tether_dnsmasq.leases < /dev/null
/sdcard/usb_tether_stop.sh:
Code:
#!/system/bin/sh
if [ ! -f /cache/usb_tether_prevconfig ] ; then
echo '/cache/usb_tether_prevconfig not found. Is tethering really active?' >&2
exit 1
fi
if [ -f /cache/usb_tether_dnsmasq.pid ] ; then
kill "$(cat /cache/usb_tether_dnsmasq.pid)"
rm /cache/usb_tether_dnsmasq.pid
fi
echo 0 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -D POSTROUTING 1
ip link set rndis0 down
ip addr flush dev rndis0
ip rule del from all lookup main
setprop sys.usb.config "$(cat /cache/usb_tether_prevconfig)"
rm /cache/usb_tether_prevconfig
while [ "$(getprop sys.usb.state)" = 'rndis,adb' ] ; do sleep 1 ; done
To start USB tethering:
Code:
adb shell "su -c 'sh /sdcard/usb_tether_start.sh'"
Grant the superuser request on the phone if one appears.
If you're on Linux, you'll see a new network interface appear (probably called "usb0"). Bring the link up on that interface (ip link set usb0 up), run a DHCP client, and you're all set!
If you're on Windows, it will probably Just Work™.
To stop USB tethering:
Code:
adb shell "su -c 'sh /sdcard/usb_tether_stop.sh'"
Again, grant the superuser request on the phone if one appears.
That's it!
OMG !!!!
You rock ! This solution is the FIRST one which works on my international i9300 device (not a 'Sprint' version) with cm10.1.
I can't understand why ... but i'll keep your script on my ext SDCard.
I'll prupose this script to french cm10.1 users.
Thank you!
OS X does not have an RNDIS driver? really?
...OS X does not have an RNDIS driver...
Click to expand...
Click to collapse
Please have a look at HoRNDIS: USB tethering driver for Mac OSX (it even supports modern/recent OSX versions!) @ hxxp://joshuawise.com/horndis (unable to embed inline URL link due to new user restriction)
whitslack said:
First, let me apologize if solutions to this problem have already been posted on this forum and elsewhere. I developed this solution completely independently, and I am sharing it here in hopes that it may prove useful to someone else.
This pair of scripts will allow you to share your phone's Internet connection with a computer via a USB cable. It definitely works when the computer is running Linux (assuming you have RNDIS support in your kernel), and it should work as well when the computer is running Windows. However, it will not work with Mac, as OS X does not have an RNDIS driver.
First, upload these two scripts to your /sdcard:
/sdcard/usb_tether_start.sh:
Code:
#!/system/bin/sh
prevconfig=$(getprop sys.usb.config)
if [ "${prevconfig}" != "${prevconfig#rndis}" ] ; then
echo 'Is tethering already active?' >&2
exit 1
fi
echo "${prevconfig}" > /cache/usb_tether_prevconfig
setprop sys.usb.config 'rndis,adb'
until [ "$(getprop sys.usb.state)" = 'rndis,adb' ] ; do sleep 1 ; done
ip rule add from all lookup main
ip addr flush dev rndis0
ip addr add 192.168.2.1/24 dev rndis0
ip link set rndis0 up
iptables -t nat -I POSTROUTING 1 -o rmnet0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
dnsmasq --pid-file=/cache/usb_tether_dnsmasq.pid --interface=rndis0 --bind-interfaces --bogus-priv --filterwin2k --no-resolv --domain-needed --server=8.8.8.8 --server=8.8.4.4 --cache-size=1000 --dhcp-range=192.168.2.2,192.168.2.254,255.255.255.0,192.168.2.255 --dhcp-lease-max=253 --dhcp-authoritative --dhcp-leasefile=/cache/usb_tether_dnsmasq.leases < /dev/null
/sdcard/usb_tether_stop.sh:
Code:
#!/system/bin/sh
if [ ! -f /cache/usb_tether_prevconfig ] ; then
echo '/cache/usb_tether_prevconfig not found. Is tethering really active?' >&2
exit 1
fi
if [ -f /cache/usb_tether_dnsmasq.pid ] ; then
kill "$(cat /cache/usb_tether_dnsmasq.pid)"
rm /cache/usb_tether_dnsmasq.pid
fi
echo 0 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -D POSTROUTING 1
ip link set rndis0 down
ip addr flush dev rndis0
ip rule del from all lookup main
setprop sys.usb.config "$(cat /cache/usb_tether_prevconfig)"
rm /cache/usb_tether_prevconfig
while [ "$(getprop sys.usb.state)" = 'rndis,adb' ] ; do sleep 1 ; done
To start USB tethering:
Code:
adb shell "su -c 'sh /sdcard/usb_tether_start.sh'"
Grant the superuser request on the phone if one appears.
If you're on Linux, you'll see a new network interface appear (probably called "usb0"). Bring the link up on that interface (ip link set usb0 up), run a DHCP client, and you're all set!
If you're on Windows, it will probably Just Work™.
To stop USB tethering:
Code:
adb shell "su -c 'sh /sdcard/usb_tether_stop.sh'"
Again, grant the superuser request on the phone if one appears.
That's it!
Click to expand...
Click to collapse
what is the difference between this and native tethering?
for rooted stock roms
http://forum.xda-developers.com/showthread.php?t=2224083
this is the by far the easiest..
hello,I am using tigra rom android 4.3...I can't change my dns with the usual method,both apps and manual in advanced setting ,,anyone can help me with this?
rulsfabre said:
hello,I am using tigra rom android 4.3...I can't change my dns with the usual method,both apps and manual in advanced setting ,,anyone can help me with this?
Click to expand...
Click to collapse
An article say, The Dns part of the 4.3 OS has been changed significantly, so the usual methode not working anynore
change Dns without root
ayahmayra said:
An article say, The Dns part of the 4.3 OS has been changed significantly, so the usual methode not working anynore
Click to expand...
Click to collapse
There is this app that without root change dns:
set google's dns
play.google.com/store/apps/details?id=com.dnset
pro user set dns:
play.google.com/store/apps/details?id=com.dnsetpro
adfadf89 said:
There is this app that without root change dns:
set google's dns
play.google.com/store/apps/details?id=com.dnset
pro user set dns:
play.google.com/store/apps/details?id=com.dnsetpro
Click to expand...
Click to collapse
thank bro!!!! it's working for me
Change your DNS servers in Android.
You can change the same thing on your rooted Android Device.
[email protected]:/ # ndc resolver flushif -- flushes old DNS servers
[email protected]:/ # ndc resolver flushdefaultif -- flush resolver
[email protected]:/ # ndc resolver setifdns <iface> <domains> <dns1> <dns2> ... -- Add the new servers
[email protected]:/ # ndc resolver setdefaultif -- Set as the default device
rulsfabre said:
hello,I am using tigra rom android 4.3...I can't change my dns with the usual method,both apps and manual in advanced setting ,,anyone can help me with this?
Click to expand...
Click to collapse
Change your DNS servers in Android.
You can change the same thing on your rooted Android Device.
With root privileges and a terminal app or (adb shell):
[email protected]:/ # ndc resolver flushif -- flushes old DNS servers
[email protected]:/ # ndc resolver flushdefaultif -- flush resolver
[email protected]:/ # ndc resolver setifdns <iface> <domains> <dns1> <dns2> ... -- Add the new servers
[email protected]:/ # ndc resolver setdefaultif -- Set as the default device
---
If you liked my post, then don't hesitate to hit the thanks button
I've been struggling with this issue in these days.
As you said, something is significantly changed in Android 4.3+
None of programs I tried so far worked.
This is my solution, not noob friendly!
adb shell
su
mount -o remount,rw /system
vi /etc/dhcpcd/dhcpcd-hooks/20-dns.conf
in vi editor you'll see set_dns_props() funtion which sets up dns servers when a wifi connection is established.
Code:
set_dns_props()
{
case "${new_domain_name_servers}" in
"") return 0;;
esac
count=1
for i in 1 2 3 4; do
setprop dhcp.${intf}.dns${i} ""
done
count=1
for dnsaddr in ${new_domain_name_servers}; do
setprop dhcp.${intf}.dns${count} ${dnsaddr}
count=$(($count + 1))
done
separator=" "
if [ -z "$new_domain_name" ]; then
separator=""
else
if [ -z "$new_domain_search" ]; then
separator=""
fi
fi
setprop dhcp.${interface}.domain "${new_domain_name}$separator${new_domain_search}"
}
as you see new_domain_name_servers contains dns servers array
add this line
Code:
new_domain_name_servers="8.8.4.4 8.8.8.8 $new_domain_name_servers"
function will be like below
Code:
set_dns_props()
{
new_domain_name_servers="8.8.4.4 8.8.8.8 $new_domain_name_servers"
case "${new_domain_name_servers}" in
"") return 0;;
esac
count=1
for i in 1 2 3 4; do
setprop dhcp.${intf}.dns${i} ""
done
count=1
for dnsaddr in ${new_domain_name_servers}; do
setprop dhcp.${intf}.dns${count} ${dnsaddr}
count=$(($count + 1))
done
separator=" "
if [ -z "$new_domain_name" ]; then
separator=""
else
if [ -z "$new_domain_search" ]; then
separator=""
fi
fi
setprop dhcp.${interface}.domain "${new_domain_name}$separator${new_domain_search}"
}
Edit: in vi editor
press i to edit mode. Make your changes then press esc. type :wq to write/exit
@ [email protected]:
Thank you very much, works in 4.4.2 on a LG G2, too.
(And if you use Root-Explorer, you don't need adb and vi, the File-Editor of Root-Explorer is easier IMHO.)
Needed that to use a home dnsmasq Server to access an internal owncloud Server with a router without NAT-Loopback.
PS:
A reboot is needed to make that work.
Override DNS for KitKat
bazon said:
@ [email protected]:
Thank you very much, works in 4.4.2 on a LG G2, too.
(And if you use Root-Explorer, you don't need adb and vi, the File-Editor of Root-Explorer is easier IMHO.)
Needed that to use a home dnsmasq Server to access an internal owncloud Server with a router without NAT-Loopback.
PS:
A reboot is needed to make that work.
Click to expand...
Click to collapse
Does it reliably work on 4.4.2? I'm surprised because I wrote an application which use the "ndc" command to override the DNS values.
I thought it was the only way...
P.S. My application is called "Override DNS for KitKat" and it's on the Play Store.
bazon said:
@ [email protected]:
Thank you very much, works in 4.4.2 on a LG G2, too.
(And if you use Root-Explorer, you don't need adb and vi, the File-Editor of Root-Explorer is easier IMHO.)
Needed that to use a home dnsmasq Server to access an internal owncloud Server with a router without NAT-Loopback.
PS:
A reboot is needed to make that work.
Click to expand...
Click to collapse
I am a terminal guy
Reboot is not required, just restart your wifi.
m.chinni said:
Does it reliably work on 4.4.2? I'm surprised because I wrote an application which use the "ndc" command to override the DNS values.
I thought it was the only way...
P.S. My application is called "Override DNS for KitKat" and it's on the Play Store.
Click to expand...
Click to collapse
Yes it does work on 4.4.2
Two additions:
1. IMPORTANT!
If you - as I proposed before - use Root Explorer to edit the 20-dns.conf file, Root Explorer will create a backup file called 20-dns.conf-bak. This file is parsed as well! So you have to delete that backup file if you don't want to have double definitions..
(I notices this, as my own DNSMASQ Server 192.168.2.222 was dns1 and dns2 as well...)
2. In order to avoid waiting for a timeout in another WLAN than my home WLAN, I wanted this custom DNS settings only to be applied in my own WLAN. So I wanted to include an if-condition that is only applied in my home-WLAN. As 20-dns.conf is some sort of bash file, I used the getprop function to find out how I could identify my own network. Unfortunately, there is no way to get the SSID, but something nearly as good: the Domain!
Type in a terminal on your android device:
Code:
$ getprop | grep domain
[dhcp.wlan0.domain]: [Speedport_W_921V_1_35_000]
(in my case.)
So I changed my /etc/dhcpcd/dhcpcd-hooks/20-dns.conf to only apply a custom DNS for that domain:
Code:
# Set net.<iface>.dnsN properties that contain the
# DNS server addresses given by the DHCP server.
if [[ $interface == p2p* ]]
then
intf=p2p
else
intf=$interface
fi
set_dns_props()
{
if [ "$new_domain_name" == "Speedport_W_921V_1_35_000" ]
then new_domain_name_servers="192.168.2.222 ${new_domain_name_servers}"
fi
case "${new_domain_name_servers}" in
"") return 0;;
esac
count=1
for i in 1 2 3 4; do
setprop dhcp.${intf}.dns${i} ""
done
count=1
for dnsaddr in ${new_domain_name_servers}; do
setprop dhcp.${intf}.dns${count} ${dnsaddr}
count=$(($count + 1))
done
separator=" "
if [ -z "$new_domain_name" ]; then
separator=""
else
if [ -z "$new_domain_search" ]; then
separator=""
fi
fi
setprop dhcp.${interface}.domain "${new_domain_name}$separator${new_domain_search}"
}
unset_dns_props()
{
for i in 1 2 3 4; do
setprop dhcp.${intf}.dns${i} ""
done
setprop dhcp.${interface}.domain ""
}
case "${reason}" in
BOUND|INFORM|REBIND|REBOOT|RENEW|TIMEOUT) set_dns_props;;
EXPIRE|FAIL|IPV4LL|RELEASE|STOP) unset_dns_props;;
esac
(you see the if-condition with the domain added...)
You can watch the settings with
Code:
$ getprop | grep dns
The settings are applied after a connection change, as [email protected] stated right.
PS: I don't use a Galaxy Note, but a LG G2, and not Android 4.3, but 4.4.
This seems to work in general, maybe the thread is better located in a general section than in a device-specific section?
Change DNS on kk 4.4.2 on 3G or 4G
Hello guys
i have been searching for a way to change my dns on kk 4.4.2 while on mobile date network but no luck is that anyone can help me to do that plz.
Thanks
Any methods that work for lollipop?
The script worked for my Samsung GS2 but my Moto XT1644 doesn't have a system/etc/dhcpcd directory. Is it OK to create the directory tree and copy a downloaded 20-dns.conf script into it? If so, would I need to set permissions for the modified script?
Hi, i have a SM-T211 (Tab3 7.0 3G) and I cant set any working firewall for 2G/3G. All these firewalls (Avast, Droidwall, Android Firewall) work perfectly with WLAN/Wifi but dont react on 3G/2G. All Rules in Iptables (and Ip6tables) are inserted correctly, but they seem not to work....
Has anyone a working firewall set (for 3G) with this Tablet? Could anyone with this tablet test if he has the same behaviour? Many thanks!
Interesting. I had been using Droidwall and was under the impression it was working. But I just unchecked Dolphin, and it turns out it isn't working.
I am also interested in this one. I would love to block Google Services Framework from detecting my internet connection.
I haven't tested on wi-fi.
thref23 said:
Interesting. I had been using Droidwall and was under the impression it was working. But I just unchecked Dolphin, and it turns out it isn't working.
I am also interested in this one. I would love to block Google Services Framework from detecting my internet connection.
I haven't tested on wi-fi.
Click to expand...
Click to collapse
I found out, that the interface-name of the common scripts does not match. So these Apps insert lines in "iptables" and "ip6tables", but they insert Lines with targets depending on interface-name. Seems our Interface-name (for 3G) is different, so no matching rule for 3G found. Same with Wifi works correctly.
So we have to find out Interface-name for 3g for iptables, after that our firewalls would be working...
OK found it, the interface-name is "ccinet0". This interface isnt used in scripts from Android Firewall or Avast or others.
Two Options so far:
1. You have to modify their scripts and add (u should find the right position for inserting) the following lines (xxx stands for your name of firewall):
iptables -A xxxwall -o ccinet+ -j xxxwall-3g
ip6tables -A xxxwall -o ccinet+ -j xxxwall-3g
2. You use an Script like the following (at the moment manually, may be automatic by a script-system):
#!/system/bin/sh
# Avast Rules extended
iptables -N cvtwall
iptables -D OUTPUT -j cvtwall
iptables -A OUTPUT -j cvtwall
iptables -N avastwall-3g
ip6tables -N cvtwall
ip6tables -D OUTPUT -j cvtwall
ip6tables -A OUTPUT -j cvtwall
ip6tables -N avastwall-3g
iptables -A cvtwall -o ccinet+ -j avastwall-3g
ip6tables -A cvtwall -o ccinet+ -j avastwall-3g
You will have to modify the names in Bold to your specific Firewall-Names...
You can also use it as init.d script, if u have a kernel with init.d Support...
If your like me, you use the Netflix profiles and you don't want to use and old version. Nor do you want to disable auto app updates.
I call this a workaround because you have to do it before you run Netflix... Every time. But maybe someone with more experience can make it permanent. Also I think it disables HD Video in Netflix.
Simply open /data/data/com.netflix.mediaclient/shared_prefs/nfxpref.xml as a text document and place "nflx_player_type" value="8" on the next line under <map>
If you want, you can place the following in a *.sh file and run it with script manager with super user selected.
if [ -f /data/data/com.netflix.mediaclient/shared_prefs/nfxpref.xml ]; then
grep -q nflx_player_type /data/data/com.netflix.mediaclient/shared_prefs/nfxpref.xml && exit 0
cp /data/data/com.netflix.mediaclient/shared_prefs/nfxpref.xml /data/data/com.netflix.mediaclient/shared_prefs/nfxpref.xml.orig && sed -e 's|</map>|<int name="nflx_player_type" value="8" />\n</map>|g' /data/data/com.netflix.mediaclient/shared_prefs/nfxpref.xml.orig > /data/data/com.netflix.mediaclient/shared_prefs/nfxpref.xml && rm /data/data/com.netflix.mediaclient/shared_prefs/nfxpref.xml.orig
fi
I found this workaround here: forum.odroid.com/viewtopic.php?f=14&t=63
Sent from my Optimus G Pro using Tapatalk
Netflix Black
ackliph said:
If your like me, you use the Netflix profiles and you don't want to use and old version. Nor do you want to disable auto app updates.
I call this a workaround because you have to do it before you run Netflix... Every time. But maybe someone with more experience can make it permanent. Also I think it disables HD Video in Netflix.
Simply open /data/data/com.netflix.mediaclient/shared_prefs/nfxpref.xml as a text document and place "nflx_player_type" value="8" on the next line under <map>
If you want, you can place the following in a *.sh file and run it with script manager with super user selected.
if [ -f /data/data/com.netflix.mediaclient/shared_prefs/nfxpref.xml ]; then
grep -q nflx_player_type /data/data/com.netflix.mediaclient/shared_prefs/nfxpref.xml && exit 0
cp /data/data/com.netflix.mediaclient/shared_prefs/nfxpref.xml /data/data/com.netflix.mediaclient/shared_prefs/nfxpref.xml.orig && sed -e 's|</map>|<int name="nflx_player_type" value="8" />\n</map>|g' /data/data/com.netflix.mediaclient/shared_prefs/nfxpref.xml.orig > /data/data/com.netflix.mediaclient/shared_prefs/nfxpref.xml && rm /data/data/com.netflix.mediaclient/shared_prefs/nfxpref.xml.orig
fi
I found this workaround here: forum.odroid.com/viewtopic.php?f=14&t=63
Sent from my Optimus G Pro using Tapatalk
Click to expand...
Click to collapse
I have an issue of a gray screen but audio on the netflix app using CM 11.
The above seems to be too much work. I found Netflix Black instead which works fine, but no chromecast support.
Download here: (I'll post a link to the dev when I can find it)
https://www.dropbox.com/s/qjza3ic2fyiea14/Netflix-Black-Rotation-V2.1.2.apk
Original Thread Here: http://forum.xda-developers.com/showthread.php?t=1178425
I can confirm that Netflix Black does work fine with CM11.
Netflix black working fine with latest PAC
2SHAYNEZ
ADB is an immensely powerful tool & it allows you to do a lot of things that would otherwise require root. Today I'm going to share some of the tweaks I use on my device and the best part is, none of these requires root access. This is a post for non-experienced android users. The tweaks / apps discussed here should work on all Android devices.
This post took a looong time to compile. It's a work-in-progress; I do have some more ADB tweaks in mind; but I have to test them myself before posting them here. I'll update this post with relevant screenshots soon. So stay tuned and hit the Thanks button if you think this post is useful.
For the content ahead, I’m going to assume you have ADB installed on your PC. Always use the latest version of ADB; some commands won't work with older ADB binaries. You can grab the latest version of platform-tools from HERE, directly from Google. If you want to learn how to setup & run adb on your PC, take a look at the first part of THIS article.
Contents
1. Debloat your device: Remove & disable unwanted system apps
2. Freeze Any App’s Background Processes
3. System-wide Ad-blocking without using any apps
4. Use Android 10’s native gesture navigation with any 3rd party launcher
5. Change the height of the navigation bar
6. Add Left/Right Keyboard Cursors to the Nav Bar during Text Input
7. App: Greenify
8. App: Quick Settings
9. Stop Vibrations from Any Android App on Your Phone
10. Advanced app permission management with Shizuku & AppOps
11. Control your phone from your PC
12. Advanced device stats & hardware monitoring: coming soon
13. Backup your apps+data with ADB: Needs testing, coming soon
1. Debloat your device: Remove & disable unwanted system apps
Source: This article on XDA, also THIS
Removing system apps with ADB is very easy & safe. It doesn’t modify your system partition, so OTA updates are not affected. There is a very easy to follow guide available on XDA about this, click here to read that post. I'll just mention the commands here:
Code:
adb shell
pm uninstall -k --user 0 <package_to_uninstall>
You just have to replace ‘<package_to_uninstall>’ with the actual package name of your target app. You can use a tiny app called App Inspector from the Google Play Store to find out the package name of your target app. You can also use the following adb command to list all the app packages on your device, including system apps:
Code:
adb shell
pm list packages
Warning: Do NOT disable/uninstall Quickstep, Android's built-in launcher. A10's stock gesture navigation is an integrated part of this launcher. If you disable/uninstall it, your phone will continue to function but stock gestures won't work anymore & the recent apps switcher button on your navbar will stop functioning. The good news is, it's possible to reinstall the launcher using the reinstall command given below.
To Re-Install an Uninstalled App, open a command prompt and enter the following command:
Code:
adb shell cmd package install-existing <name of package>
Here is a list of package names of all stock apps for MI A3, as requested by @pajos.gabros:
(it will be useful if you mistakenly uninstall an important system app & want to restore it)
Code:
com.factory.mmigroup
com.android.cts.priv.ctsshim
com.qualcomm.qti.qms.service.telemetry
com.google.android.youtube
com.android.internal.display.cutout.emulation.corner
com.google.android.ext.services
com.android.internal.display.cutout.emulation.double
com.android.providers.telephony
com.android.dynsystem
com.google.android.googlequicksearchbox
com.android.providers.calendar
com.android.providers.media
com.qti.service.colorservice
com.android.theme.icon.square
com.google.android.onetimeinitializer
com.google.android.ext.shared
com.android.internal.systemui.navbar.gestural_wide_back
com.android.wallpapercropper
com.bsp.catchlog
com.xiaomi.cameratools
com.android.theme.color.cinnamon
com.android.protips
com.android.theme.icon_pack.rounded.systemui
com.wt.secret_code_manager
com.android.externalstorage
com.qualcomm.uimremoteclient
com.android.htmlviewer
com.factory.cit
com.qualcomm.qti.uceShimService
com.android.companiondevicemanager
com.android.mms.service
com.qualcomm.qti.qms.service.connectionsecurity
com.android.providers.downloads
com.google.android.apps.messaging
com.android.networkstack.inprocess
com.android.theme.icon_pack.rounded.android
vendor.qti.hardware.cacert.server
com.qualcomm.qti.callenhancement
com.qualcomm.qti.telephonyservice
com.android.partnerbrowsercustomizations.tmobile
com.android.theme.icon_pack.circular.themepicker
com.google.android.overlay.gmsgsaconfig
vendor.qti.iwlan
com.google.android.configupdater
com.qualcomm.qti.optinoverlay
com.google.android.overlay.modules.permissioncontroller
com.qualcomm.uimremoteserver
com.qti.confuridialer
android.qvaoverlay.common
com.google.ar.core
com.google.ar.lens
android.autoinstalls.config.xiaomi.laurel_sprout
com.android.providers.downloads.ui
com.android.vending
com.android.pacprocessor
com.android.simappdialog
android.overlay.common
com.android.internal.display.cutout.emulation.tall
com.android.certinstaller
com.android.theme.color.black
com.android.carrierconfig
com.google.android.marvin.talkback
com.android.theme.color.green
com.android.theme.color.ocean
com.android.theme.color.space
com.android.internal.systemui.navbar.threebutton
com.google.android.apps.work.oobconfig
com.qti.qualcomm.datastatusnotification
com.qualcomm.qti.callfeaturessetting
com.qualcomm.wfd.service
com.android.theme.icon_pack.rounded.launcher
com.qti.qualcomm.deviceinfo
com.android.egg
com.android.mtp
com.android.nfc
com.android.ons
com.android.stk
com.android.launcher3
com.android.backupconfirm
com.google.android.deskclock
com.android.internal.systemui.navbar.twobutton
org.codeaurora.ims
com.android.statementservice
com.android.hotspot2
com.google.android.gm
android.overlay.target
com.google.android.apps.tachyon
com.qti.pasrservice
com.android.settings.intelligence
com.android.internal.systemui.navbar.gestural_extra_wide_back
com.google.android.permissioncontroller
com.wingtech.setupwizardext
com.qualcomm.qti.dynamicddsservice
com.google.android.setupwizard
com.qualcomm.qcrilmsgtunnel
com.android.providers.settings
com.android.sharedstoragebackup
com.google.android.music
com.android.printspooler
com.qualcomm.qti.services.systemhelper
com.android.theme.icon_pack.filled.settings
com.android.dreams.basic
com.google.android.overlay.modules.ext.services
com.miui.bugreport
com.android.se
com.android.inputdevices
com.google.android.apps.wellbeing
com.google.android.dialer
com.android.bips
com.qti.dpmserviceapp
com.google.android.apps.nbu.files
com.android.theme.icon_pack.circular.settings
com.wing.wtsarcontrol
com.android.importsafetyinfo
com.qti.xdivert
com.android.musicfx
com.google.android.overlay.gmsconfig
com.google.android.apps.docs
com.google.android.apps.maps
com.google.android.modulemetadata
com.android.cellbroadcastreceiver
com.google.android.webview
com.android.theme.icon.teardrop
com.qualcomm.qti.simsettings
com.google.android.contacts
com.android.server.telecom
com.google.android.syncadapters.contacts
com.android.keychain
com.android.camera
com.google.android.calculator
com.android.chrome
com.android.theme.icon_pack.filled.systemui
com.google.android.packageinstaller
com.google.android.gms
com.google.android.gsf
com.google.android.ims
com.google.android.tag
com.google.android.tts
com.google.android.gmsintegration
com.android.phone.overlay.common
com.qualcomm.qti.qtisystemservice
com.android.carrierconfig.overlay.common
com.android.calllogbackup
com.google.android.partnersetup
com.android.systemui.overlay.common
com.android.server.telecom.overlay.common
com.android.localtransport
com.google.android.videos
com.android.carrierdefaultapp
com.dsi.ant.server
com.qualcomm.qti.remoteSimlockAuth
com.android.theme.font.notoserifsource
com.mi.global.bbs------> Mi Community
com.android.theme.icon_pack.filled.android
com.android.proxyhandler
com.sensetime.faceunlock
com.android.theme.icon_pack.circular.systemui
com.miui.spock
com.google.android.overlay.modules.permissioncontroller.forframework
com.google.android.feedback
com.google.android.printservice.recommendation
com.google.android.apps.photos
com.google.android.calendar
com.android.managedprovisioning
com.google.android.documentsui
com.android.dreams.phototable
com.goodix.fingerprint.setting
com.android.providers.partnerbookmarks
com.android.smspush
com.android.wallpaper.livepicker
com.mi.AutoTest
com.android.theme.icon.squircle
com.android.batterywarning
com.android.storagemanager
com.android.bookmarkprovider
com.android.settings
com.qualcomm.qti.cne
com.qualcomm.qti.ims
com.qualcomm.qti.lpa
com.android.theme.icon_pack.filled.launcher
com.android.networkstack.permissionconfig
com.google.android.projection.gearhead
com.qualcomm.location
com.google.android.apps.turbo
com.android.cts.ctsshim
com.android.theme.icon_pack.circular.launcher
com.caf.fmradio
com.android.vpndialogs
com.qualcomm.location.XT
com.google.android.keep
com.android.music
com.android.phone
com.android.shell
com.android.theme.icon_pack.filled.themepicker
com.android.wallpaperbackup
com.android.providers.blockednumber
com.android.providers.userdictionary
com.android.emergency
com.qualcomm.qti.seccamservice
com.qualcomm.qti.qmmi
com.google.android.gms.location.history
com.android.internal.systemui.navbar.gestural
com.android.location.fused
com.android.theme.color.orchid
com.android.systemui
com.android.theme.color.purple
com.android.bluetoothmidiservice
com.qualcomm.qti.confdialer
com.qualcomm.qti.poweroffalarm
com.qti.ltebc
com.qualcomm.qti.networksetting
com.android.traceur
com.android.apppredictionservice
com.qualcomm.qti.qms.service.trustzoneaccess
com.google.android.apps.magazines
com.android.bluetooth
com.qualcomm.timeservice
com.qualcomm.atfwd
com.android.wallpaperpicker
com.qualcomm.embms
com.android.providers.contacts
com.android.captiveportallogin
com.android.theme.icon.roundedrect
com.android.internal.systemui.navbar.gestural_narrow_back
com.android.cellbroadcastreceiver.overlay.common
com.android.theme.icon_pack.rounded.settings
com.google.android.inputmethod.latin
com.android.bluetooth.overlay.common
com.android.theme.icon_pack.circular.android
com.google.android.apps.restore
com.google.android.overlay.searchlauncherconfig
I’ve uninstalled a lot of pre-installed apps using this method, so far so good. No issues whatsoever. However, your mileage may vary, backup your important stuff first. Don’t just start removing apps blindly; If anything goes wrong try to reinstall it with the given ADB command. If that fails, do a factory reset.
I can’t be held responsible for any sort of damage.
Here is a list of apps that I’ve uninstalled (I’ve included the full ADB command, just copy & paste):
Note: You might want to keep some of the apps marked with an asterisk (*)
Code:
adb shell
pm uninstall -k --user 0 com.google.android.calendar (*Stock Google Calendar)
pm uninstall -k --user 0 com.android.chrome (*Google Chrome)
pm uninstall -k --user 0 com.google.android.googlequicksearchbox (*Google App/Assistant)
pm uninstall -k --user 0 com.google.android.gm (*Gmail)
pm uninstall -k --user 0 com.google.android.apps.nbu.files (*Files by Google, install a 3rd party file manager before uninstalling it)
pm uninstall -k --user 0 com.google.android.youtube (*Youtube)
pm uninstall -k --user 0 com.google.ar.lens (*Google Lens, uninstalling Google app will make it unusable anyway)
pm uninstall -k --user 0 com.google.android.apps.photos (*Google Photos)
pm uninstall -k --user 0 com.android.stk (*Sim Toolkit, might be important. I've removed it tho)
pm uninstall -k --user 0 com.google.android.apps.docs (*Google Drive)
pm uninstall -k --user 0 com.google.android.marvin.talkback
pm uninstall -k --user 0 com.google.android.projection.gearhead
pm uninstall -k --user 0 com.android.bookmarkprovider
pm uninstall -k --user 0 com.google.android.apps.turbo
pm uninstall -k --user 0 com.google.android.apps.wellbeing
pm uninstall -k --user 0 com.google.android.tts
pm uninstall -k --user 0 com.google.android.tag
pm uninstall -k --user 0 com.miui.bugreport
pm uninstall -k --user 0 com.android.protips
pm uninstall -k --user 0 com.google.android.feedback
pm uninstall -k --user 0 com.google.android.apps.restore
pm uninstall -k --user 0 com.google.android.ext.shared
pm uninstall -k --user 0 com.google.android.setupwizard
pm uninstall -k --user 0 android.autoinstalls.config.xiaomi.laurel_sprout
pm uninstall -k --user 0 com.qualcomm.qti.qms.service.telemetry
pm uninstall -k --user 0 com.android.dreams.basic
pm uninstall -k --user 0 mi.global.bbs
pm uninstall -k --user 0 com.miui.spock
pm uninstall -k --user 0 com.google.android.apps.work.oobconfig
pm uninstall -k --user 0 com.android.providers.partnerbookmarks
pm uninstall -k --user 0 com.android.dreams.phototable
pm uninstall -k --user 0 com.android.dreams.basic
Note: You can also disable an app if you don’t want to uninstall it. Use the following command:
Code:
adb shell pm disable-user --user 0 <package_to_disable>
To enable an app:
Code:
adb shell pm enable <package_to_enable>
Here is a list of apps I’ve disabled with no side effects (again, your mileage may vary):
Code:
adb shell pm disable-user --user 0 com.android.partnerbrowsercustomizations.tmobile (*T-mobile users leave this alone)
adb shell pm disable-user --user 0 com.google.android.feedback
adb shell pm disable-user --user 0 com.android.bookmarkprovider
2. Freeze Any App’s Background Processes
There is an article on XDA on this subject, click here. From the article:
‘A simple trick you can do to manually prevent an application from ever running in the background – and it doesn’t require root or a third-party application. This is more powerful than what Greenify or apps like Brevent offer, as without root access those apps are fairly limited in what they can do. But with this trick, now you can block apps such as Facebook or Hangouts from ever running in the background – they will only work when they are actively being used!’
Okay, follow the article if you want to know more. I’m just sharing the commands here:
Code:
adb shell
cmd appops set <package_name> RUN_IN_BACKGROUND ignore
You just have to replace ‘<package_name>’ with the actual package name of your target app.
3. System-wide Ad-blocking without using any apps
Google introduced Private DNS mode with Android 9, making it very easy to use a custom DNS provider. You can block ads using a DNS provider that supports AdBlock. I use AdGuard. These days free apps are riddled with full-screen ads & I haven't seen a single ad on any app after switching to this service. Still, DNS based ad-blocking may not be 100% reliable all the time (It hasn't failed me yet), so for best results, use AdGuard DNS with a browser that also supports ad-blocking, such as Brave, Bromite, Firefox with uBlock Origin etc.
To setup AdGuard DNS, go to:
Settings → Network & internet → Advanced → Private DNS
Now, select the Private DNS provider hostname option & enter:
Code:
dns.adguard.com
To make sure your DNS is properly configured, visit this page, scroll down a little & it should say “You are using Default AdGuard configuration”
Note: Let me make this clear. AdGuard is a Russian service. That does NOT make it less trustworthy by default IMHO, but If you decide to use their service, you’re basically giving them a complete log of every site you visit on the internet. However, it’s the only mainstream DNS provider I could find that supports blocking ads. Make your choice.
4. Use Android 10’s native gesture navigation with any 3rd party launcher
Google has introduced native gesture-based navigation in Android 10. But as you probably have noticed, it doesn’t work with 3rd party launchers. Well, there is a simple ADB command that can activate A10 gestures on any 3rd party launcher (I use Nova Prime). The command is:
Code:
adb shell cmd overlay enable com.android.internal.systemui.navbar.gestural
However, there is a catch. The swipe up & hold gesture for recent apps menu doesn’t work with 3rd party launchers, it simply goes to your launcher’s home screen. As a workaround, I have configured Nova to launch recent apps menu with double tap on the home screen (alternatively, you can use Android Accessibility Suite’s recent app switcher). Another thing is, Android switches to its default nav bar after every reboot; so, basically you have to run this command every time you reboot your device.
A better approach would be to ditch Android 10’s half-baked gestures completely and using a better app like Fluid NG/ Edge Gestures. I don’t like using an extra app just for this purpose, so I’m sticking with the ADB method.
5. Change the height of the navigation bar
[Source]
Android’s default nav bar takes up too much space on your screen. You can adjust its height with a simple command. Fortunately, it is not affected by reboot. The command is:
Code:
adb shell wm overscan 0,0,0,-59
I’m using –59, but you can tune it to your liking. A positive value would push the navigation bar up, while negative value would push it down (partially/fully hiding it even, of course).
To reset the original height of the navigation bar:
Code:
adb shell wm overscan 0,0,0,0
6. Add Left/Right Keyboard Cursors to the Nav Bar during Text Input
This super handy tweak adds left/right keyboard cursors to the nav bar while the keyboard is showing, making it super easy to edit typos/scroll through words quickly. This article on XDA describes it in detail.
7. App: Greenify
Greenify is one of the few apps that can actually improve your device’s battery life. To utilize this amazing app to its full potential, you’re going to need root access and Xposed framework. But most of its features can be activated using ADB. And it’s all a one-time process, so that’s very convenient. You should disable battery optimization for Greenify & enable notification access, accessibility service & device admin option for Greenify to get the best results. These are the adb commands to activate Greenify without root: [Source: This article]
Note: [On some Chinese devices (MIUI, ColorOS etc), you need to enable "USB debugging (Security settings)" from developer settings before executing the adb commands given below. The source article didn't mention this]
Code:
adb -d shell pm grant com.oasisfeng.greenify android.permission.WRITE_SECURE_SETTINGS
adb -d shell pm grant com.oasisfeng.greenify android.permission.DUMP
adb -d shell pm grant com.oasisfeng.greenify android.permission.READ_LOGS
adb -d shell pm grant com.oasisfeng.greenify android.permission.GET_APP_OPS_STATS
Now force stop Greenify to let the granted permission take effect and then turn on the accessibility service manually. You can force stop the app using the following command:
Code:
adb -d shell am force-stop com.oasisfeng.greenify
Here is a list of apps I've greenified: Click this link too see the SS gallery
Naptime by Francisco Franco is another great app which works with ADB but I think Greenify alone is enough, for me at least.
8. App: Quick Settings
Download Link : HERE
This app is tiny but extremely powerful. It allows you to add some really useful buttons to your quick settings panel. You can activate immersive mode, so you can hide status bar / navigation bar (or both) with a single click; useful if you want to use a dedicated gesture navigation app.
I have enabled screenshot button, reverse portrait, screen off toggle, caffeine, power button, volume control and a bunch of other super useful toggles using this app. To use Quick Settings app without root access, just connect your device to ADB and type (one-time process):
Code:
adb shell pm grant it.simonesestito.ntiles android.permission.WRITE_SECURE_SETTINGS
And yes, make sure to follow the in-app YouTube video to learn how to activate the quick settings tiles and disable battery optimization for this app & turn the accessibility service on.
9. Stop Vibrations from Any Android App on Your Phone:
This one is taken from THIS xda article.
Some apps & malicious ads on the web tend to abuse the vibration permission. Don't you find it kinda funny when a random ad pops up (with intense vibrations ) telling you Microsoft technical support needs to be contacted immediately to remove the Windows virus from your Android device You can disable vibration with this simple tweak
10. Advanced app permission management with Shizuku & App Ops
Android has a native app permission management system. By default, there is no user accessible way of manipulating it without root access. That’s where these two apps come in handy. Shizuku is the framework & App Ops is the app that we can use to manipulate app permissions. First of all, download the apps:
Shizuku: CLICK HERE
App Ops: CLICK HERE
Setup: SOURCE
First of all, go to:
- Settings → Apps & notification → SEE ALL APPS → Shizuku
Click on ‘Permissions’ and you’ll see ‘Additional permissions’. Click on it, and allow it the permission called ‘Shizuku’
- Now repeat the previous steps for the 2nd app, App Ops
At this point, you have to start Shizuku server via ADB. Open a command prompt and enter the following command:
Code:
adb shell sh /data/user_de/0/moe.shizuku.privileged.api/start.sh
Note: You have to execute this command every time you reboot your device
Open Shizuku and the app should say “Shizuku is running Version 8, adb” & “Authorized 1 application” – that means Shizuku has been configured correctly; see the SS:
Now launch App Ops, choose ADB mode (the first option), finish the intro and you’re good to go. You’ll see a list of your apps. You can view an app’s permissions by clicking on it & enable / disable them.
Note: This step is not mandatory; but if Shizuku keeps closing in the background, you should read the paragraph called "5. Shizuku randomly stops?" on this page.
11. Scrcpy - Control your phone from your PC
This application makes it very easy to mirror you phone’s screen to your PC/laptop’s monitor. It’s a very useful tool in my opinion. Once you use this program, you will find new reasons to keep using it It even supports copy-pasting from your PC to android & vice versa. And it works over Wi-Fi too.
From the project’s GitHub readme:
This application provides display and control of Android devices connected on USB (or over TCP/IP). It does not require any root access. It works on GNU/Linux, Windows and macOS.
It focuses on:
- lightness (native, displays only the device screen)
- performance (30~60fps)
- quality (1920×1080 or above)
- low latency (35~70ms)
- low startup time (~1 second to display the first image)
- non-intrusiveness (nothing is left installed on the device)
Download: CLICK HERE to check & download the latest version OR, CLICK HERE to download v1.14 directly
How to use: Using this application is very easy. This program comes with adb binary, so just extract the zip file in a convenient location, connect your phone to your PC, and open a command prompt in that folder & type:
Code:
adb devices
scrcpy
You should see a window with your device’s screen. It’s that simple.
Okay, this application has a ton of options & keyboard shortcuts. Follow the project’s GitHub page to learn more. I’m just listing the most useful controls here:
- Left mouse click = selects items
- Middle Mouse click (clicking the scroll wheel) = sends the current app to background
- The scroll wheel scrolls thru content
- You can write using your PC’s keyboard
- Right mouse click = back button
- Ctrl+r = Rotates the screen
- Ctrl+p acts like power button. Pressing this combo once will lock your device & pressing it again will wake the device up and bring up the lock screen. You can unlock the device without touching it; just draw the pattern with your mouse / type in the PIN.
- By default, scrcpy keeps you device’s screen on. I find that annoying. Thankfully, the dev has thought of it. Pressing Ctrl+o will turn off the display, but Scrcpy will keep mirroring the screen.
You can also limit the frame rate, reduce the resolution and bit rate to improve mirroring performance. I’d suggest reducing the bit rate first if your device’s output seems laggy. It’s also possible to record the screen while mirroring. I won’t discuss these here; follow the project’s README.md on GitHub to learn more.
As mentioned earlier, this post is a work-in-progress. I'm trying new adb tweaks & I'll update this post as I find more working ones for Mi A3. If you have some useful ADB tweaks, please share them with us. Thanks and have a nice day
Thanks! Great compilation.
nice thread thanks!
Thanks a lot man
If i fix the gestures for third party launchers will i have problem with stock gestures ?
soa008 said:
If i fix the gestures for third party launchers will i have problem with stock gestures ?
Click to expand...
Click to collapse
No. The gestures will work fine if you switch to stock launcher. Restart your phone if you're having problems. Android will switch to its default nav bar after you reboot.
I used ADB command for navbar (adb shell cmd overlay enable com.android.internal.systemui.navbar.gestural), configured Nova launcher to launch recent apps with double tap on, but I cant open that.
Can I revert changes?
pajos.gabros said:
I used ADB command for navbar (adb shell cmd overlay enable com.android.internal.systemui.navbar.gestural), configured Nova launcher to launch recent apps with double tap on, but I cant open that.
Can I revert changes?
Click to expand...
Click to collapse
"adb shell cmd overlay disable com.android.internal.systemui.navbar.gestural" or reboot the phone.
pajos.gabros said:
I used ADB command for navbar (adb shell cmd overlay enable com.android.internal.systemui.navbar.gestural), configured Nova launcher to launch recent apps with double tap on, but I cant open that.
Can I revert changes?
Click to expand...
Click to collapse
That's because you probably didn't enable Nova's accessibility service / it got disabled somehow. Anyways, just restart your device & you should be back to the default nav bar.
evanB70 said:
That's because you probably didn't enable Nova's accessibility service / it got disabled somehow. Anyways, just restart your device & you should be back to the default nav bar.
Click to expand...
Click to collapse
Nova Launcher is enabled in Accessibility
Smartphone has been rebooted, "stock" navbar isnt back
pajos.gabros said:
Nova Launcher is enabled in Accessibility
Smartphone has been rebooted, "stock" navbar isnt back
Click to expand...
Click to collapse
That's strange. I've used this command so many times on my phone, never faced any issue. A reboot SHOULD always revert back to stock navbar, that's how this command works.
Anyhow, follow the command shared by @_mysiak_
adb shell cmd overlay disable com.android.internal.systemui.navbar.gestural
evanB70 said:
That's strange. I've used this command so many times on my phone, never faced any issue. A reboot SHOULD always revert back to stock navbar, that's how this command works.
Anyhow, follow the command shared by @_mysiak_
adb shell cmd overlay disable com.android.internal.systemui.navbar.gestural
Click to expand...
Click to collapse
output of CMD: inaccessible or not found
Yesterday i uninstalled stock launcher because using Nova Prime (quickstep? dont remember name of the package even name of the app) - It shouldn't affect, right?
pajos.gabros said:
output of CMD: inaccessible or not found
Yesterday i uninstalled stock launcher because using Nova Prime (quickstep? dont remember name of the package even name of the app) - It shouldn't affect, right?
Click to expand...
Click to collapse
Why?!! You shouldn't have uninstalled the stock launcher. Without it, the stock nav bar will NOT work properly! No wonder you're having problems with gestures.
evanB70 said:
Why?!! You shouldn't have uninstalled the stock launcher. Without it, the stock nav bar will NOT work properly! No wonder you're having problems with gestures.
Click to expand...
Click to collapse
damn
Could you give me the name of the package? I will try reinstall it
pajos.gabros said:
damn
Could you give me the name of the package? I will try reinstall it
Click to expand...
Click to collapse
Okay, just a minute. I'll find out the package name
pajos.gabros said:
damn
Could you give me the name of the package? I will try reinstall it
Click to expand...
Click to collapse
Package name is: com.android.launcher3
evanB70 said:
Package name is: com.android.launcher3
Click to expand...
Click to collapse
Succesfully reinstalled, gestures works for now
thank you
EDIT: @evanB70
could you make a list of stock apps (+package names) and insert that to the 1st post?
it could be useful
Excellent.
Looking forward for your backupt tweak.
---------- Post added at 01:43 AM ---------- Previous post was at 01:43 AM ----------
Excellent.
Looking forward for your backup tweak.
Can we permanently disable Bluetooth this way for my Redmi 9A ?
my weather widget not working! can fix it with ADB ?