Android Enthusiasts
Q&A for enthusiasts and power users of the Android operating system
Latest Questions
1
votes
3
answers
5149
views
Customising a custom ROM
I want to know is it possible to edit a custom ROM from zip and then zipping it again (flashable) to a device. Will it brick the device? Thanx
I want to know is it possible to edit a custom ROM from zip and then zipping it again (flashable) to a device. Will it brick the device?
Thanx
ghost_83
(51 rep)
Mar 23, 2019, 07:40 AM
• Last activity: Jan 12, 2025, 09:04 AM
0
votes
0
answers
117
views
What is "root" and why does it keep contacting different servers?
I have blocked this "root" [app/service/user] from accessing the network. However, I can find no specific answers as to what it is and why it attempts to contact only random servers. I use NetGuard to better control the network on my phone, that is where the screenshot came from. [![][1th]][1] I hav...
I have blocked this "root" [app/service/user] from accessing the network. However, I can find no specific answers as to what it is and why it attempts to contact only random servers. I use NetGuard to better control the network on my phone, that is where the screenshot came from.
I have searched for days for an answer to my question, but there are literally millions of instances across the network and boolean searches only narrow it to tens of thousands.
Should I be worried about malicious intent or just keep it locked down?

Nuclrengnr
(1 rep)
Jan 29, 2024, 12:56 PM
• Last activity: Jan 29, 2024, 02:30 PM
3
votes
1
answers
808
views
How does SuperSU check if a phone is rooted?
I have a rooted custom device (Android 8.0), I can use `adb` and run `su` and do whatever I want in the shell. But SuperSU or any other app cannot find root. I have made a symlink from `/system/xbin/su` to `/system/bin/su` but it still does not work.
I have a rooted custom device (Android 8.0), I can use
adb
and run su
and do whatever I want in the shell. But SuperSU or any other app cannot find root. I have made a symlink from /system/xbin/su
to /system/bin/su
but it still does not work.
miduja
(43 rep)
Aug 2, 2019, 09:59 AM
• Last activity: Nov 7, 2022, 11:49 AM
0
votes
0
answers
949
views
ADB root shell always waits for background job before exit
I want to run a process in background and close the terminal, so the process remains active. I need to run the process as root. Since `adb root` doesn't work for me, I use `adb shell; $ su` to gain root privileges. I expect this to work: `command &; exit` or `nohup command &; exit`. It actually runs...
I want to run a process in background and close the terminal, so the process remains active.
I need to run the process as root. Since
adb root
doesn't work for me, I use adb shell; $ su
to gain root privileges.
I expect this to work: command &; exit
or nohup command &; exit
. It actually runs the process, but exit
just waits for the process to terminate. I also tried to run sleep 10 &; exit
, and exactly, the shell exits after 10 seconds (when all jobs are done).
This happens only when su
shell is used. It means that when I run adb shell; $ sleep 50 &; exit
it exits immediately as expected. The problem also happens when I use su
from termux (android package terminal). And also on my other device as well.
I can just kill the terminal, it does the job (process remains active as I wanted), but what is the proper way to exit the root shell when there are active jobs?
Thank you in advance!
g00dds
(111 rep)
Sep 27, 2022, 07:55 AM
5
votes
3
answers
20482
views
How to use Dirty COW exploit?
I got Sony Xperia M4 Aqua with a locked bootloader, Android 6.01, and July 1, 2016 security patch, but no DM verity. I would like to freeze a few factory apps via ADB's `pm disable` command (or any other way possible). I've tried to run `su pm disable package.name` but the `su` command is not recogn...
I got Sony Xperia M4 Aqua with a locked bootloader, Android 6.01, and July 1, 2016 security patch, but no DM verity. I would like to freeze a few factory apps via ADB's
pm disable
command (or any other way possible). I've tried to run su pm disable package.name
but the su
command is not recognized for some reason.
I am a Linux noob but I got Android Studio with SDK and NDK installed on a lubuntu machine (got it also on Windows 7 machine).
Can someone explain to me the steps to take in order to gain root shell access with the Dirty COW exploit (or any other way) to be able to freeze apps?
Markonioninioni
(153 rep)
Jan 17, 2017, 06:04 PM
• Last activity: Aug 16, 2022, 10:16 AM
1
votes
1
answers
9259
views
Make mounted cifs/smb share visible for normal user in Android-x86
With ES Explorer not to be trusted any more, I needed another solution for easy access to my SMB/CIFS network shares. Mounting a SMB/CIFS network share in Android-x86 (version 9 R2) turned out to be a lot easier than any of the solutions I found on StackExchange. I did not need to install any softwa...
With ES Explorer not to be trusted any more, I needed another solution for easy access to my SMB/CIFS network shares. Mounting a SMB/CIFS network share in Android-x86 (version 9 R2) turned out to be a lot easier than any of the solutions I found on StackExchange. I did not need to install any software or app,
mount -t cifs
works just out of the box.
The problem is that I cannot make this mount visible for normal user. Only root or superuser, whatever it is called in Android, sees and can use the mounted file system, whereas the normal user keeps seeing the mountpoint as a directory of Android's own filesystem.
To clarify, have a look at this terminal session. In this example, Android is running in a Virtual Box VM, the IP address is that of the host itself. I make a subdirectory in /sdcard/Download/ to mount on, with the intent of easily moving files from Download to the share mounted on that subdirectory. I mount the share as superuser, with appropriate options, and then, both as normal and as super user, list the subdirectory contents and stat the subdirectory :
$ cd "/$EXTERNAL_STORAGE"/Download/ # i.e. /sdcard/Download/
$ mkdir SERVER_SHARE
$ touch SERVER_SHARE/"NOT THE MOUNTED SHARE" # a marker for the base directory
$ su -c "mount -v -o username=guest,rw,noperm,iocharset=utf8 -t cifs //192.168.1.10/SHARE $PWD/SERVER_SHARE"
$ ls SERVER_SHARE/
'NOT THE MOUNTED SHARE'
$ su -c "ls SERVER_SHARE"
... lists all the files on the share ...
$ stat SERVER_SHARE
Size: 4096 Blocks: 0 IO Block: 512 directory
Device: 1dh/29d Inode: 409629 Links: 2
Access: (0770/drwxrwx---) Uid: ( 0/ root) Gid: ( 9997/everybody)
...
$ su -c "stat SERVER_SHARE"
Size: 0 Blocks: 0 IO Block: 512 directory
Device: 1eh/30d Inode: 217 Links: 2
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
...
You see the difference between normal and super user: ls
shows different directory contents because stat
says they see the subdirectory on a different Device. A possible explanation could be that the normal user has the file descriptor for the directory open, and keeps using that file descriptor and the contents it points to, even after some other file system is mounted over it. But that would probably not explain why exactly the same thing happens if I put the mkdir
inside the su command for the mount
.
For the time being, I can only access the mounted samba share of the VM host from the terminal, as super user, to copy files between the share and the Download folder. I have put the mkdir
and mount
commands in a script, and added the touch
command to mount the directory under the mountpoint as 'not the network share'.
**My question is this**: how do I make the mounted share visible to the normal user, so that I can use the Android apps like "Files" and other file managers to access it in a GUI.
db-inf
(131 rep)
Feb 13, 2022, 01:39 PM
• Last activity: Apr 27, 2022, 01:52 PM
0
votes
1
answers
1512
views
Moto g 2nd gen, lollipop bootloader unlock issue
I have just bought Moto G 2nd generation smart phone with 16 gb internal memory. To root device, I tried to unlock bootloader. But it didn't go smooth. When I hit command ``fastboot oem unlock ``, I got success message with status ``Device unlocked. Status 3``. But what the heck this ``status 3``?....
I have just bought Moto G 2nd generation smart phone with 16 gb internal memory. To root device, I tried to unlock bootloader. But it didn't go smooth. When I hit command `
fastboot oem unlock
, I got success message with status
Device unlocked. Status 3
`.
But what the heck this `status 3
`?. I am not getting any info about this.
Google search is showing that, at time of unlocking bootloader, few messages are shown like `unlocked
then
restarted
and device restarts. But this didn't happen with me. So I manually restarted my device for custom recovery. And flashed rom using
TWRP2.7.1.1-titan-motog-2014
. This command also showed me success message. Before this I copied
UPDATE-SuperSU-v2.02.zip
` in device.
But after restarting and hitting recovery, device is not showing any thing and just black screen and then turning off.
Apart from this device is working fine, with normal boot.
P.S. `RootChecker
is showing that
Root access is not properly installed on this device
`.
So what is the way out to root the device again properly?
Thanks in advance.
zoo zope
(101 rep)
Feb 7, 2015, 07:52 AM
• Last activity: Mar 7, 2022, 06:02 AM
0
votes
3
answers
1538
views
Rooting failed, superSU remains
I tried to root my Galaxy Core 2 Duos using Kingo root, which installed SuperSU. Unfortunately rooting failed all of a sudden, but still SuperSU remains. How can I remove SuperSU from my device?
I tried to root my Galaxy Core 2 Duos using Kingo root, which installed SuperSU. Unfortunately rooting failed all of a sudden, but still SuperSU remains.
How can I remove SuperSU from my device?
Maaiz
(1 rep)
Mar 15, 2015, 09:58 AM
• Last activity: Feb 26, 2022, 01:03 PM
2
votes
2
answers
1564
views
Error in Galaxy tab a: 'Unable to restart your device. Verification failed' after supersu
I own a Galaxy tab a 10.1 with s pen (2016). I flashed via odin, twrp 3.1.1.0 and the system booted fine. Then I flashed the last version of SuperSU and since then the system doesn't turn on and I get the famous `Verification failed. Unable to restart your device. The integrity verification has fail...
I own a Galaxy tab a 10.1 with s pen (2016). I flashed via odin, twrp 3.1.1.0 and the system booted fine. Then I flashed the last version of SuperSU and since then the system doesn't turn on and I get the famous
Verification failed. Unable to restart your device. The integrity verification has failed. You need to restart your device to factory default settings. This will erase your data.
As I can't access my data in twrp, I tried to flash no-verity-opt-encrypt (6.0) but it doesn't help and I still can't access my data on the internal storage from twrp. Before I do a factory reset, I'd like to backup my data. Do you know if it's possible or how can I fix this error?
Will flashing the stock firmware help?
Delph
(21 rep)
Nov 22, 2018, 07:00 AM
• Last activity: Dec 14, 2021, 03:04 AM
0
votes
1
answers
1232
views
SuperSu doesnt show up on TWRP
I installed TWRP successfully. On my phone i downloaded the SuperSu Zip. When i click install on TWRP it doesnt show up. Can Anyone tell me what to do to make it show up. Info: -Phone = J7 (2016) j700T -NETWORK T-Mobile
I installed TWRP successfully. On my phone i downloaded the SuperSu Zip. When i click install on TWRP it doesnt show up. Can Anyone tell me what to do to make it show up.
Info:
-Phone = J7 (2016) j700T
-NETWORK T-Mobile
LeafyIsQeer
(1 rep)
Oct 24, 2016, 11:50 PM
• Last activity: Dec 12, 2021, 12:01 PM
0
votes
0
answers
476
views
How to add user for busybox su
I have successfully been able to copy busybox into system/bin/. I have also set busybox ``` chmod +g busybox chmod +s busybox chmod 4777 busybox ``` When I run busybox su it says user root not found. How do I add the user in android?. Maybe I will need to write some files in system/etc maybe?
I have successfully been able to copy busybox into system/bin/. I have also set busybox
chmod +g busybox
chmod +s busybox
chmod 4777 busybox
When I run busybox su it says user root not found. How do I add the user in android?. Maybe I will need to write some files in system/etc maybe?
Bret Joseph
(1 rep)
Oct 28, 2021, 08:20 AM
1
votes
1
answers
890
views
Pervasive Kingroot app avoids uninstall
I managed to root my Verizon Samsung Galaxy Note 10.1 tablet with Kingroot, but I'd like to remove it and switch to using SuperSU (because of KingRoot's aggressive practices and somewhat shady reputation). Even after uninstalling it and deleting everything labelled kingroot or superuser in /system,...
I managed to root my Verizon Samsung Galaxy Note 10.1 tablet with Kingroot, but I'd like to remove it and switch to using SuperSU (because of KingRoot's aggressive practices and somewhat shady reputation). Even after uninstalling it and deleting everything labelled kingroot or superuser in /system, I still get
Binary Occupied
from the SuperSU app.
I believe there is a hidden process somewhere monitoring attempts to delete it and replacing the binary. For example, in system/usr
there is a directory called iku
(kinguser?) which replaces itself immediately after being deleted. Similarly, in system/xbin
there is ku.sud
and start_kusud.sh
, which I can delete but instantly reappear.
This may be a quirk of the Samsung system, or some kind of hidden or inaccessible process. I've followed numerous online tutorials, and tried to run the Replace_Kingroot_With_SuperSU.zip
method, but to no avail. Anybody know of a workaround?
Edit: here is part of the stdout form a script I ran. Note where it says **operation not permitted**:
rm failed for /system/xbin/ku.sud, Operation not permitted
rm failed for /data/data/com.kingroot.RushRoot, No such file or directory
rm failed for /data/data-lib/com.kingroot.RushRoot, No such file or directory
rm failed for /data/data/com.kingroot.kinguser, Directory not empty
rm failed for /data/data/com.kingroot.master, No such file or directory
rm failed for /system/bin/.usr/.ku, Operation not permitted
rm failed for /system/bin/rt.sh, No such file or directory
rm failed for /system/bin/ddexe, Operation not permitted
Josh Friedlander
(137 rep)
Nov 18, 2018, 10:11 AM
• Last activity: Sep 30, 2021, 04:30 AM
2
votes
1
answers
2323
views
SuperSu update binary error
I have a **lg optimus g pro f240** running on android os version ***4.4.2***. I recently rooted the phone using the software in [This thread][1] I have installed [SuperSu][2] though each time I try and open it, it tells me *The SU binary needs to be updated. Continue ?* It prompts me to use CWM, whi...
I have a **lg optimus g pro f240** running on android os version ***4.4.2***. I recently rooted the phone using the software in This thread
I have installed SuperSu though each time I try and open it, it tells me *The SU binary needs to be updated. Continue ?*
It prompts me to use CWM, which I have installed, though each time I try and use it SuperSu does nothing and just opens the app.
Each time I click continue, after 30 seconds I get the error message:
*Installation failed!*
*Please reboot and try again.*
I have tried rebooting, though nothing solves the problem.
If the rooting software linked above did not work, how can I test and see if that is true?
Is there any way to update the binary manually(I have tried sideloading SuperSu but an error in tmp/Update happens)
What options are there that could fix this problem?
tristo
(121 rep)
Feb 16, 2016, 12:12 AM
• Last activity: Jul 4, 2021, 06:01 PM
0
votes
0
answers
132
views
Unlocking bootloader for samsung A10 only
Is there any possible way to unlock bootloader on samsung A10..I've tried fastboot I've tried everything..LXDE?..I'm dying here..
Is there any possible way to unlock bootloader on samsung A10..I've tried fastboot I've tried everything..LXDE?..I'm dying here..
Jeremy Green
(1 rep)
May 10, 2021, 08:08 PM
1
votes
0
answers
229
views
Using Here Documents in Termux
I'm trying to run commands in a script that needs to be run as superuser. I tried doing this with here documents but wasn't successful. ( I used to be able to use it with `tsu` in Termux). Does anyone know a reason why it shouldn't work or a way to get it to work. Here is the code that used to work...
I'm trying to run commands in a script that needs to be run as superuser. I tried doing this with here documents but wasn't successful. ( I used to be able to use it with
tsu
in Termux).
Does anyone know a reason why it shouldn't work or a way to get it to work.
Here is the code that used to work but doesn't work anymore.
#!/data/data/com.termux/files/usr/bin/bash
... begining of script Just some regular commands
sudo touch s
tsu s
exit
EOF
echo after here doc
The results currently from this script is
echo "Test" > s
exit
after here doc
The 2 first lines should not appear at all and they should be in the file s. But the file s is empty.
I have also tried the following code but with the same results.
sudo touch s
sudo -s s
exit
EOF
echo after here doc
I have also googled this and haven't found anything to help me. All suggestion work in regular linux but not in Termux. Here is one example of what I have tried.
Any suggestion or help will be appreciated.
Sruly
(1028 rep)
Oct 22, 2020, 05:19 PM
-1
votes
1
answers
10562
views
Download files of devices that connected into my WiFi Hotspot
Is it possible to download or watch the directories of the devices that connected into my WiFi hotspot ? or Is there any way to collect personal data from the connected devices ? . Please **NOTE THAT I'VE A ROOTED ANDROID DEVICE WITH VERSION 4.1.2**. I am just curious about the possibilities. Just t...
Is it possible to download or watch the directories of the devices that connected into my WiFi hotspot ? or Is there any way to collect personal data from the connected devices ? . Please **NOTE THAT I'VE A ROOTED ANDROID DEVICE WITH VERSION 4.1.2**. I am just curious about the possibilities. Just to know.
theapache64
(101 rep)
Nov 11, 2015, 03:30 PM
• Last activity: Apr 4, 2020, 12:37 PM
2
votes
2
answers
8811
views
root cannot list files in /data
1|shell@maguro:/ # ls -l /system/xbin/ -rwxr-xr-x root shell 59816 2013-07-11 02:12 dexdump -rwsr-sr-x root root 67008 2013-10-08 17:24 su shell@maguro:/ # ls /data opendir failed, Permission denied The permissions on `su` are correct right? I get the hash prompt, but I can't list the files in /data...
1|shell@maguro:/ # ls -l /system/xbin/
-rwxr-xr-x root shell 59816 2013-07-11 02:12 dexdump
-rwsr-sr-x root root 67008 2013-10-08 17:24 su
shell@maguro:/ # ls /data
opendir failed, Permission denied
The permissions on
su
are correct right? I get the hash prompt, but I can't list the files in /data (or do anything that requires superuser permissions). I don't have Superuser.apk installed, I don't want to install it because of that grant/deny access dialogue that pops up if you wipe the device. What does Superuser.apk do that I can't do when I unpack the *.img files?
MishaP
(380 rep)
Oct 8, 2013, 07:58 PM
• Last activity: Jan 24, 2020, 06:01 AM
9
votes
1
answers
4831
views
How does SuperSu provide root privilege?
Has a write-up ever been released on exactly how SuperSu works? After searching around for a while I found mostly guides on how to use the app, not the implementation details. I did, however, find [this](https://su.chainfire.eu/#introduction) resource that is mostly directed at explaining how to use...
Has a write-up ever been released on exactly how SuperSu works? After searching around for a while I found mostly guides on how to use the app, not the implementation details.
I did, however, find [this](https://su.chainfire.eu/#introduction) resource that is mostly directed at explaining how to use the root privileges programmatically, but explained things fairly well. The article gives information about SELinux, but not so much how its enforcement is circumvented.
There appears to be a lot of context switching to allow execution of certain events (from the point of view of those *using* SuperSu) otherwise denied under SELinux, but how did SuperSu get to the point at which it was able to "*legally*", as far as SELinux is concerned, patch SELpolicies?
It seems that the objective is to force the init process to spawn a new shell that runs the su daemon, but there does not appear to be any patching of the *init* process, but from the article linked:
> On firmwares that use SELinux, su is generally implemented as a proxy to a daemon started from init
and
> You might wonder why - if we're already running as the init context, as the root user ..
-------------------------------------------
**tl;dr**; How does SuperSu execute in the context of the init process?
Given as:
u:r:init:s0 - Highest init context
u:r:init_shell:s0 - Shell started from init
sherrellbc
(235 rep)
Jan 5, 2016, 04:15 PM
• Last activity: Oct 13, 2019, 01:40 PM
3
votes
1
answers
7294
views
How to grant an app root access without GUI interaction?
I'm trying to update my APN settings using: adb shell "su -c 'content update --uri content://telephony/carriers --bind name:s:\""SDR"\" --bind apn:s:"SDR-internet"'" The first time I run this command I receive a superuser request from the package: `com.android.shell`. I can grant this manually but I...
I'm trying to update my APN settings using:
adb shell "su -c 'content update --uri content://telephony/carriers --bind name:s:\""SDR"\" --bind apn:s:"SDR-internet"'"
The first time I run this command I receive a superuser request from the package:
com.android.shell
. I can grant this manually but I'm hoping to automate the process for practice and knowledge.
I've tried to use the following to list all permissions, but can't find superuser:
adb shell pm dump package com.android.shell
I attempted the following:
adb shell pm grant com.android.shell android.permission.SUPERUSER
adb shell pm grant com.android.shell android.permission.REQUEST_SUPERUSER
adb shell pm grant com.android.shell android.permission.ACCESS_SUPERUSER
But receive an error:
Exception occurred while executing:
java.lang.IllegalArgumentException: Unknown permission: android.permission.REQUEST_SUPERUSER
at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:1398)
at com.android.server.pm.permission.PermissionManagerService.access$900(PermissionManagerService.java:89)
at com.android.server.pm.permission.PermissionManagerService$PermissionManagerInternalImpl.grantRuntimePermission(PermissionManagerService.java:2093)
at com.android.server.pm.PackageManagerService.grantRuntimePermission(PackageManagerService.java:5411)
at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:1730)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:217)
at android.os.ShellCommand.exec(ShellCommand.java:103)
at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:21330)
at android.os.Binder.shellCommand(Binder.java:634)
at android.os.Binder.onTransact(Binder.java:532)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2821)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:3856)
at android.os.Binder.execTransact(Binder.java:731)
**Edit:**
I tried:
adb shell su cat /data/adb/magisk.db
Which gave:
SQLite format 3@
� .�
� �-�d
N�tablehidelisthidelist
CREATE TABLE hidelist (process TEXT, PRIMARY KEY(process))/ Cindexsqlite_autoindex_hidelist_1hidelist
X�tablestringsstringCREATE TABLE strings (key TEXT, value TEXT, PRIMARY KEY(key))-Aindexsqlite_autoindex_strings_1stringsZ�tablesettingssettingsCREATE TABLE settings (key TEXT, value INT, PRIMARY tablelogslogsCREATE TABLE logs (from_uid INT, package_name TEXT, app_name TEXT, from_pid INT, to_uid INT, action INT, time INT, command TEXT)��tablepoliciespoliciesCREATE TABLE policies (uid INT, package_name TEXT, policy INT, until INT, logging INT, notification INT, PRIMARY KEY(uid))/Cindexsqlite_autoind��/ies_1pol�com.android.shell
���7�/ )�com.android.shellShell�l��uR/system/bin/sh7 / )�com.an!�id.shmagiskhidel��?5/system/bin/sh
��!magiskhide
��6ucom.google.android.gms/.droidguard.DroidGuardService
That's pretty ugly, so I tried using sqlite3
but it provides no tables? I was expecting a list of something at the very least.
sqlite> .mode line
sqlite> .headers on
sqlite> .tables
sqlite>
I'm using Magisk Manager v18.
gng3
(31 rep)
Sep 4, 2019, 12:45 PM
• Last activity: Sep 6, 2019, 12:56 PM
1
votes
1
answers
1238
views
How to edit the list of reserved ports (under 1024) on Android?
Is it possible to edit list of reserved ports on Android (0 - 1023) to move lower port (under 1024) to higher port (equal or above 1024). My mobile phone is rooted and I want to use lower port. One option can be to reboot device so that to kill the process using some specific lower port. Does Androi...
Is it possible to edit list of reserved ports on Android (0 - 1023) to move lower port (under 1024) to higher port (equal or above 1024).
My mobile phone is rooted and I want to use lower port.
One option can be to reboot device so that to kill the process using some specific lower port.
Does Android provide any file in system files with table of reserved ports for edit?
Sec Cam
(11 rep)
Oct 25, 2018, 12:12 PM
• Last activity: Jul 8, 2019, 10:55 AM
Showing page 1 of 20 total questions