Sample Header Ad - 728x90

Android Enthusiasts

Q&A for enthusiasts and power users of the Android operating system

Latest Questions

19 votes
4 answers
173146 views
Why can't I get root access from shell?
> adb shell sh-4.1$ su Permission denied I have rooted my phone successfully. I know this because I'm able to install apps on SD card and I have a program called [SD Maid][1] that is able to operate with root permissions. [1]: https://play.google.com/store/apps/details?id=eu.thedarken.sdm&hl=en
> adb shell sh-4.1$ su Permission denied I have rooted my phone successfully. I know this because I'm able to install apps on SD card and I have a program called SD Maid that is able to operate with root permissions.
Kshitiz Sharma (489 rep)
Feb 21, 2013, 10:16 AM • Last activity: Jul 29, 2025, 09:37 AM
0 votes
1 answers
8617 views
"INSTALL_FAILED_ABORTED: User rejected permissions" when installing APK from storage on Android 12
There is [a .xapk file in APKPure][2] and [here is the corresponding app on Play Store][3]. I can install it using Play Store. But other approaches of installing this app fail (SAI_v4.5 and other installers), and about 20MB (the size of the .xapk file) is lost after installation failure. I got the e...
There is a .xapk file in APKPure and here is the corresponding app on Play Store . I can install it using Play Store. But other approaches of installing this app fail (SAI_v4.5 and other installers), and about 20MB (the size of the .xapk file) is lost after installation failure. I got the error > INSTALL_FAILED_ABORTED: User rejected permissions when installing split APKs (.xapk) on my Oppo Reno4 SE 5G running Android 12. Device spec from # example commands to install split apks pm install-create pm install-write 18911812 base.apk /data/local/tmp/base.apk pm install-write 18911812 split_1.apk /data/local/tmp/split_1.apk pm install-write 18911812 split_1.apk /data/local/tmp/split_1.apk pm install-commit I tried to install it using ADB, and although pm install-commit returns with a Success message, the app is not fully installed. When using ADB, "Verify app over USB" is turned off. I noticed this error when installing split APKs using a custom app installer from storage. But now I found this error also occurs when installing a normal .apk file (I didn't notice this because I am using Android's default package installer). However, .apk could be installed successfully (at least it seems like it). How to solve this?
Amias (9 rep)
Jul 5, 2023, 06:22 AM • Last activity: Jul 28, 2025, 12:00 AM
0 votes
0 answers
10 views
How to correctly build runtime resource overlay package including .bp and .xml files
On Github, I've found a work where someone creates different Overlays for Android phones. [Github Overlay Folder](https://github.com/LineageOS/android_frameworks_base/tree/389031749dcf106c1e35950b36df2d8fb2222759/packages/overlays) When I go to the first subfolder [Subfolder](https://github.com/Line...
On Github, I've found a work where someone creates different Overlays for Android phones. [Github Overlay Folder](https://github.com/LineageOS/android_frameworks_base/tree/389031749dcf106c1e35950b36df2d8fb2222759/packages/overlays) When I go to the first subfolder [Subfolder](https://github.com/LineageOS/android_frameworks_base/tree/389031749dcf106c1e35950b36df2d8fb2222759/packages/overlays/AvoidAppsInCutoutOverlay) the AndroidManifest.xml for example looks like: and the Android.bp package { default_applicable_licenses: ["frameworks_base_license"], } runtime_resource_overlay { name: "AvoidAppsInCutoutOverlay", theme: "DisplayCutoutAvoidAppsInCutout", product_specific: true, } Furthermore, there is a res folder with multiple sub-folders, strings.xml and config.xml files. It is said that a RRO package has to be created and moved to /vendor/overlay/ using e.g. Magisk. Now how can this package including those files be created? And do I have to create an .apk containing every subfolder, or just the files and folders located in a subfolder? Beside all subfolders, there are also "Android.bp", "CleanSpec.mk" and "OWNERS" files in the upper "Overlays" folder
Chestal (1 rep)
Jul 24, 2025, 10:57 PM • Last activity: Jul 24, 2025, 11:30 PM
0 votes
0 answers
17 views
Is there an OSS that will frp bypass an Outlast 5g?
I have tried to access the voice command on the Talkback menu. I have tried to use adb/fastboot. All o no avail Outlast 5g
I have tried to access the voice command on the Talkback menu. I have tried to use adb/fastboot. All o no avail Outlast 5g
Cr66vt (1 rep)
Jul 20, 2025, 03:04 AM
0 votes
0 answers
20 views
Unacceptably low call volume over bluetooth, ao2s
Looking for an ADB copypasta to jack my bluetooth call audio all the way up to maximum on my Galaxy ao2s. Android 12. When my media audio is high enough to cave in my head, I can barely hear my calls. All the settings are stock and all the way up, recent factory data reset. Samsung techsupport, of c...
Looking for an ADB copypasta to jack my bluetooth call audio all the way up to maximum on my Galaxy ao2s. Android 12. When my media audio is high enough to cave in my head, I can barely hear my calls. All the settings are stock and all the way up, recent factory data reset. Samsung techsupport, of course, had "limited success" is helping me. I've gone through every setting in the UI and the developer options to no avail. The odd thing is that the call volume is perfectly adequate over speaker or without a headset, but plug in a BT headset - ANY BT headset - and the problem resurfaces. Crystal clear media, straining to hear my son who can help lost ships find their way to shore.
Steve (1 rep)
Jul 19, 2025, 07:45 PM
1 votes
1 answers
457 views
Is there a way to enable Google Location Accuracy via ADB or via some other command on Android 13?
Within location services on Android 13 devices, there are several services such as Google Location Accuracy. [![settings page](https://i.sstatic.net/mURlQ.png)](https://i.sstatic.net/mURlQ.png) I have taken a snapshot of secure, global and system settings before and after enabling this setting, but...
Within location services on Android 13 devices, there are several services such as Google Location Accuracy. [![settings page](https://i.sstatic.net/mURlQ.png)](https://i.sstatic.net/mURlQ.png) I have taken a snapshot of secure, global and system settings before and after enabling this setting, but there is no change, which leads me to believe that we can't change it via settings. I have tried the solutions mentioned here https://android.stackexchange.com/questions/40147/enable-location-services-via-adb-or-shell But these just seem to affect the location setting and not Google Location Accuracy. Is there a way from ADB to enable/disable this?
James O'Neill (19 rep)
Jan 27, 2023, 02:59 PM • Last activity: Jul 14, 2025, 04:53 PM
1 votes
1 answers
4810 views
Some app is causing bootloop
It happened when Google Play was automatically updating apps. I guess, something went wrong and the phone suddenly restarted and was not able to turn on again. It always gets stuck on "Starting apps" screen and then restarts again (bootloop). I figured out, that if I can delete the app causing bootl...
It happened when Google Play was automatically updating apps. I guess, something went wrong and the phone suddenly restarted and was not able to turn on again. It always gets stuck on "Starting apps" screen and then restarts again (bootloop). I figured out, that if I can delete the app causing bootloop it should be just fine. However, I don't know how I could do it.

My phone is nexus 4 running Android Marshmallow. Also, I have a custom recovery (cwm 6.0.4.7). So, I tried to connect through adb to the phone in recovery mode and delete the app, however, I can't use any adb command, because "device unauthorized". I assume, as soon as I can get access through adb, I can delete the app.

After surfing many forums for the past several hours I couldn't able to find any solution which preserves data the phone has. Any ideas how I can delete/fix the app without loosing any data? (nexus 4 doesn't have SD card slot). Thanks. P.S. wipe cache partition didn't help.
Rustam (111 rep)
Nov 3, 2017, 04:56 AM • Last activity: Jul 7, 2025, 04:50 AM
2 votes
2 answers
927 views
How to access the app battery optimization settings on Android 12 and above?
The menu appears to have been hidden on the more recent Android releases — currently on Android 14 the only per-app toggle the users are given is 'allow background usage' (app info → app battery usage). On my [Oneplus 8T][1] device the OS is actively stopping some apps designed to be running on the...
The menu appears to have been hidden on the more recent Android releases — currently on Android 14 the only per-app toggle the users are given is 'allow background usage' (app info → app battery usage). On my Oneplus 8T device the OS is actively stopping some apps designed to be running on the background at all times, such as Shizuku . On AOSP-based ROMs three settings used to be available for each app, the most permissive being 'unrestricted'. SystemUI Tuner didn't expose the menu. --- Using ADB is an acceptable answer as well.
user598527 (798 rep)
Oct 26, 2024, 12:11 PM • Last activity: Jul 3, 2025, 11:03 AM
2 votes
1 answers
828 views
ADB content query - Browser
I am having some slight issue using the query ``` adb shell content query --uri content://browser/bookmarks" & "adb shell content query --uri content://browser/searches ``` I have played around with the browser and added some bookmarks, but I am receiving nothing in return. Does anyone have encounte...
I am having some slight issue using the query
adb shell content query
 --uri content://browser/bookmarks" & "adb shell content query
 --uri content://browser/searches
I have played around with the browser and added some bookmarks, but I am receiving nothing in return. Does anyone have encounter any issue using the queries?
Dennis (21 rep)
Oct 23, 2020, 12:41 PM • Last activity: Jul 3, 2025, 05:41 AM
0 votes
1 answers
1491 views
How can I restore /system/bin/toolbox?
I accidentally removed `/system/bin/toolbox` on my Android 5.1.1 tablet. Right now I have temporarily replaced it by a `busybox` binary I had at hand, so the system is somewhat usable but not completely functional (e.g. no network connection). I have tried to pull the `toolbox` binary from other dev...
I accidentally removed /system/bin/toolbox on my Android 5.1.1 tablet. Right now I have temporarily replaced it by a busybox binary I had at hand, so the system is somewhat usable but not completely functional (e.g. no network connection). I have tried to pull the toolbox binary from other devices I have, but those are either Android 4 or Android 6, so it didn't work due to unresolved linker symbols. Is there a place where I can get a binary for a specific Android version? Or is there a place on my device where a backup is kept?
Dmitry Grigoryev (686 rep)
Jul 30, 2017, 03:48 PM • Last activity: Jul 2, 2025, 04:55 PM
9 votes
1 answers
12579 views
How can I tell whether I am booted into the A or B partition?
Android can install to an A or a B partition. This seems to be a default these days. How can I tell which one I am booted into using `adb`? I am using LineageOS 17.1.
Android can install to an A or a B partition. This seems to be a default these days. How can I tell which one I am booted into using adb? I am using LineageOS 17.1.
Evan Carroll (4661 rep)
Nov 15, 2020, 06:09 AM • Last activity: Jun 29, 2025, 10:16 AM
1 votes
0 answers
43 views
Can't Connect to WayDroid Containers in LXD Using ADB
I'm trying to use ADB (Android Debug Bridge) with WayDroid running inside LXD containers, but it's not working. My setup: I have WayDroid running inside LXD containers. Android seems to boot properly and the system runs. However, I can't get ADB to connect to the WayDroid instance. ADB just doesn't...
I'm trying to use ADB (Android Debug Bridge) with WayDroid running inside LXD containers, but it's not working. My setup: I have WayDroid running inside LXD containers. Android seems to boot properly and the system runs. However, I can't get ADB to connect to the WayDroid instance. ADB just doesn't detect the device. What I've tried: Running adb devices from both the host and inside the container — nothing shows up. Tried using adb tcpip and adb connect, but no success. Enabled security.nesting=true and security.privileged=true for the container. Experimented with different network modes (bridged, NAT, etc.). My questions: How do I get ADB to connect to a WayDroid instance inside an LXD container? Do I need to expose a specific port or use a special network setup? Would using a microVM instead of a container solve this issue? Any help or example configs would be really appreciated. Thanks
Raoul Pinel (11 rep)
Jun 27, 2025, 07:24 AM • Last activity: Jun 27, 2025, 03:48 PM
0 votes
0 answers
15 views
How do I solve an "undefined symbol" error with adb (trying to run scrcpy)
I'm running scrcpy for the first time. I have android-tools and scrcpy installed. When I try to launch scrcpy from the terminal, I get this error: ```scrcpy 3.3.1 Authorization required, but no authorization protocol specified XDG_RUNTIME_DIR (/run/user/0) is not owned by us (uid 1000), but by uid 0...
I'm running scrcpy for the first time. I have android-tools and scrcpy installed. When I try to launch scrcpy from the terminal, I get this error:
3.3.1 
Authorization required, but no authorization protocol specified

XDG_RUNTIME_DIR (/run/user/0) is not owned by us (uid 1000), but by uid 0! (This could e.g. happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
adb: symbol lookup error: adb: undefined symbol: libusb_get_ssplus_usb_device_capability_descriptor
ERROR: "adb start-server" returned with value 127
ERROR: Could not start adb server
ERROR: Server connection failed
I have tried uninstalling and reinstalling scrcpy and adb, rebooting. I haven't found anyone talking about the same issue. Any ideas? System Info Hardware Information: Hardware Model: Lenovo ThinkPad X1 Carbon 5th Memory: 16.0 GiB Processor: Intel® Core™ i7-7600U × 4 Graphics: Intel® HD Graphics 620 (KBL GT2) Disk Capacity: (null) Software Information: Firmware Version: N1MET57W (1.42 ) OS Name: Fedora Linux 41 (Workstation Edition) OS Build: (null) OS Type: 64-bit GNOME Version: 47 Windowing System: Wayland Kernel Version: Linux 6.12.9-200.fc41.x86_64
Oliver Cox (1 rep)
Jun 27, 2025, 12:17 AM
4 votes
2 answers
17496 views
How to change network interface used by Android?
When I boot up my Android Device and go to WiFi settings, the status of WiFi remains "Turning Wi-Fi on" forever. I looked it up in logcat logs, and below is the error that I see. E/wpa_supplicant( 1713): nl80211: Could not set interface 'wlan0' UP E/wpa_supplicant( 1713): wlan0: Failed to initialize...
When I boot up my Android Device and go to WiFi settings, the status of WiFi remains "Turning Wi-Fi on" forever. I looked it up in logcat logs, and below is the error that I see. E/wpa_supplicant( 1713): nl80211: Could not set interface 'wlan0' UP E/wpa_supplicant( 1713): wlan0: Failed to initialize driver interface E/wpa_supplicant( 1713): Could not read interface wlan0 flags: No such device Below is some useful information. root@android:/ # netcfg netcfg lo UP 127.0.0.1/8 0x00000049 00:00:00:00:00:00 gannet0 DOWN 0.0.0.0/0 0x00001082 1e:e9:6e:bf:45:f7 dummy0 DOWN 0.0.0.0/0 0x00000082 ba:ad:f6:ae:6a:09 rmnet0 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00 rmnet1 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00 rmnet2 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00 rmnet3 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00 rmnet4 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00 rmnet5 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00 rmnet6 DOWN 0.0.0.0/0 0x00000000 00:00:00:00:00:00 rmnet7 DOWN 0.0.0.0/0 0x00000001 00:00:00:00:00:00 sit0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00 ip6tnl0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00 Contents of /system/etc/wifi/wpa_supplicant.conf: update_config=1 ctrl_interface=wlan0 eapol_version=1 ap_scan=1 fast_reauth=1 **Question**: How can I enable Android to use some other interface other than wlan0? Things tried: 1) I tried to edit ctrl_interface parameter in /system/etc/wifi/wpa_supplicant.conf using adb pull and adb push to other interfaces shown by netcfg, but Android still tries to use wlan0. 2) I also tried to start wpa_supplicant daemon using the below command. /system/bin/wpa_supplicant -Dnl80211 -idummy0 -c/system/etc/wifi/wpa_supplicant.conf but this gives an error. E/wpa_supplicant( 5390): dummy0: Failed to initialize driver interface
g4ur4v (141 rep)
Feb 1, 2014, 02:51 PM • Last activity: Jun 26, 2025, 01:07 PM
1 votes
0 answers
38 views
ADB shell netstat showing "radio" user listening on quite a few ports - is this ok?
The question says it all. I am learning my way around all the network connections my phone wants to establish. System is official /e/os on a Fairphone 5. Running adb shell netstat -eltup I get Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State User Ino...
The question says it all. I am learning my way around all the network connections my phone wants to establish. System is official /e/os on a Fairphone 5. Running adb shell netstat -eltup I get Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program Name tcp 0 16 0.0.0.0:50057 0.0.0.0:* UNKNOWN radio 29453 1393/netmgrd tcp 0 16 0.0.0.0:50026 0.0.0.0:* UNKNOWN radio 30870 1393/netmgrd tcp 0 16 0.0.0.0:50058 0.0.0.0:* UNKNOWN radio 29468 1393/netmgrd tcp 0 16 0.0.0.0:50027 0.0.0.0:* UNKNOWN radio 30871 1393/netmgrd tcp 0 16 0.0.0.0:50059 0.0.0.0:* UNKNOWN radio 29469 1393/netmgrd tcp 0 16 0.0.0.0:50028 0.0.0.0:* UNKNOWN radio 30832 1393/netmgrd [...] udp 0 0 0.0.0.0:50043 0.0.0.0:* ESTABLISHED radio 29431 1393/netmgrd udp 0 0 0.0.0.0:50050 0.0.0.0:* ESTABLISHED radio 30838 1393/netmgrd udp 0 0 0.0.0.0:50051 0.0.0.0:* ESTABLISHED radio 30839 1393/netmgrd udp 0 0 0.0.0.0:50054 0.0.0.0:* ESTABLISHED radio 29454 1393/netmgrd udp 0 0 0.0.0.0:50055 0.0.0.0:* ESTABLISHED radio 29455 1393/netmgrd udp 0 0 0.0.0.0:50058 0.0.0.0:* ESTABLISHED radio 30880 1393/netmgrd udp 0 0 0.0.0.0:50059 0.0.0.0:* ESTABLISHED radio 30881 1393/netmgr` I just included a selection, the complete list is longer. Is this expected behavior?
Mark Watney (111 rep)
Jun 24, 2025, 09:51 AM
1 votes
1 answers
4399 views
'adb backup -apk -shared -all -f "D:\backup.ab' initiates backup, completes, but produces a file that is only 1kb
I'm attempting to backup my old Android device, a Samsung Galaxy S3, so that I can lend it to my friend while his is away at repairs, then restore it when he's done with it. I have the Samsung USB drivers installed, and the device is recognised. C:\Users\...\AppData\Local\Android\sdk\platform-tools>...
I'm attempting to backup my old Android device, a Samsung Galaxy S3, so that I can lend it to my friend while his is away at repairs, then restore it when he's done with it. I have the Samsung USB drivers installed, and the device is recognised. C:\Users\...\AppData\Local\Android\sdk\platform-tools>adb devices List of devices attached 4df7f9574edecf7f device I set a developer password, as per this post , which caused the "Backup starting..." to last about 3 seconds longer than before. It completes successfully, then produces a file that is 1kb. C:\Users\...\AppData\Local\Android\sdk\platform-tools>adb backup -all -f D:\backup.ab Now unlock your device and confirm the backup operation. C:\Users\...\AppData\Local\Android\sdk\platform-tools> enter image description here Does anybody know what's going on? Thanks in advance.
Jack (111 rep)
Oct 22, 2015, 04:48 PM • Last activity: Jun 21, 2025, 02:03 AM
3 votes
2 answers
4768 views
How can I get the last dialed number and call duration via adb?
I'm creating a computer system for telemarketing. I'm using adb commands to dial numbers [Link][1] Is it possible to get last dialed number and call duration via adb? If it is, how? [1]: https://stackoverflow.com/a/4927028/1016772
I'm creating a computer system for telemarketing. I'm using adb commands to dial numbers Link Is it possible to get last dialed number and call duration via adb? If it is, how?
Lord_JABA (391 rep)
Jan 14, 2014, 11:41 AM • Last activity: Jun 20, 2025, 05:19 PM
2 votes
0 answers
5798 views
Bootloader is unlocked, fastboot returns ''FAILED (Remote: Verify state locked)
I am trying to root my Vivo V11 with Android 10. The bootloader is unlocked. It says so in the dev settings, and I have to go through the warning prompt every time I reboot my device. When I run the fastboot command to flash the patched_boot.img file, it returns: ``` C:\Program Files\Minimal ADB and...
I am trying to root my Vivo V11 with Android 10. The bootloader is unlocked. It says so in the dev settings, and I have to go through the warning prompt every time I reboot my device. When I run the fastboot command to flash the patched_boot.img file, it returns:
C:\Program Files\Minimal ADB and Fastboot>fastboot getvar unlocked
unlocked: yes
finished. total time: 0.002s

C:\Program Files\Minimal ADB and Fastboot>fastboot flash boot patched_boot.img
target reported max download size of 134217728 bytes
sending 'boot' (38579 KB)...
OKAY [  1.269s]
writing 'boot'...
FAILED (remote: Verify state locked)
finished. total time: 1.276s
error Things I've tried to troubleshoot: Running cmd as Administrator (im using win10) Confirmed OEM unlocking is turned on in the dev settings (it is, it says "bootloader is already unlocked" Confirmed USB debugging is on Disabled "Verify apps over USB" and "Verify bytecode of debuggable apps" in the dev settings. Confirmed file transfer is enabled from my PC and my Phone (it is, I can transfer files back and forth between them) Tried a different USB cable [EDIT]
PS C:\Users\Himanshus\Downloads\platform-tools_r30.0.5-windows\platform-tools> .\adb devices
List of devices attached
ZDIBLVIRY5DIJBEI        device

PS C:\Users\Himanshus\Downloads\platform-tools_r30.0.5-windows\platform-tools> .\adb reboot-bootloader
PS C:\Users\Himanshus\Downloads\platform-tools_r30.0.5-windows\platform-tools> .\fastboot devices
ZDIBLVIRY5DIJBEI        fastboot
PS C:\Users\Himanshus\Downloads\platform-tools_r30.0.5-windows\platform-tools> .\fastboot flash boot patched_boot.img
Sending 'boot' (38579 KB)                          OKAY [  1.272s]
Writing 'boot'                                     FAILED (remote: 'Verify state locked')
fastboot: error: Command failed
PS C:\Users\Himanshus\Downloads\platform-tools_r30.0.5-windows\platform-tools> .\fastboot flash vbmeta vbmeta.img
Sending 'vbmeta' (4 KB)                            OKAY [  0.009s]
Writing 'vbmeta'                                   FAILED (remote: 'Verify state locked')
fastboot: error: Command failed
PS C:\Users\Himanshus\Downloads\platform-tools_r30.0.5-windows\platform-tools> .\fastboot --disable-verity flash vbmeta vbmeta.img
Rewriting vbmeta struct at offset: 0
Sending 'vbmeta' (4 KB)                            OKAY [  0.010s]
Writing 'vbmeta'                                   FAILED (remote: 'Verify state locked')
fastboot: error: Command failed
PS C:\Users\Himanshus\Downloads\platform-tools_r30.0.5-windows\platform-tools> .\fastboot --disable-verification flash vbmeta vbmeta.i
mg
Rewriting vbmeta struct at offset: 0
Sending 'vbmeta' (4 KB)                            OKAY [  0.009s]
Writing 'vbmeta'                                   FAILED (remote: 'Verify state locked')
fastboot: error: Command failed
PS C:\Users\Himanshus\Downloads\platform-tools_r30.0.5-windows\platform-tools>
Ayush Jhinkwan (21 rep)
Jan 15, 2021, 08:19 AM • Last activity: Jun 19, 2025, 12:21 PM
0 votes
0 answers
54 views
How to invoke an application in "Freeform Mode" via ADB?
##### Question If I enable `adb shell settings put global enable_freeform_support 1`, how can I launch an activity in Freeform Mode (presumably, with `am`), like I can from `com.android.quickstep.RecentsActivity`? [![Screenshot][1]][1] ##### Context I know that it's possible, because when diagnosing...
##### Question If I enable adb shell settings put global enable_freeform_support 1, how can I launch an activity in Freeform Mode (presumably, with am), like I can from com.android.quickstep.RecentsActivity? Screenshot ##### Context I know that it's possible, because when diagnosing issuetracker.google.com/issues/423197817 , I noticed that if I closed cmd activity start --user 0 -a android.intent.action.VIEW -n com.android.wallpaper/com.android.customization.picker.CustomizationPickerActivity -f 0 com.android.wallpaper whilst it was in Freeform Mode, when I launched it from com.android.settings's GUI (as cmd activity start --user 0 -a android.intent.action.VIEW -n com.android.settings/com.android.settings.wallpaper.StyleSuggestionActivity -f 0 com.android.settings ), it re-launched in that mode.
RokeJulianLockhart (556 rep)
Jun 18, 2025, 06:17 PM
3 votes
1 answers
11996 views
How to run a script in background from adb shell?
I have a problem with USB tethering on my rooted Nougat phone (LineageOS). After some time phone stops USB tethering. To fix that I run the following script like this: adb shell su nohup sh tether.sh & exit exit tether.sh #!/system/bin/sh service list while true; do if ! pidof -s dnsmasq > /dev/null...
I have a problem with USB tethering on my rooted Nougat phone (LineageOS). After some time phone stops USB tethering. To fix that I run the following script like this: adb shell su nohup sh tether.sh & exit exit tether.sh #!/system/bin/sh service list while true; do if ! pidof -s dnsmasq > /dev/null then echo -n "Connectivity lost at " date -u +%FT%TZ echo "Waiting 3 seconds..." sleep 3 echo "Calling ConnectivityManager.setUsbTethering(false)" service call connectivity 33 i32 0 2>&1 sleep 3 echo "Calling ConnectivityManager.setUsbTethering(true)" service call connectivity 33 i32 1 2>&1 echo "Waiting 3 seconds..." fi sleep 3 done Problem: If I use nohup my call to service call connectivity fails with service not found. And I put service list on top of the script which returns Found 0 services:. However the same commands work when ran directly from adb shell; su. Why service call doesn't work inside this background script? Does it need the same tty to work?
Nazar554 (188 rep)
Aug 27, 2019, 08:33 PM • Last activity: Jun 17, 2025, 06:35 PM
Showing page 1 of 20 total questions