Automatically activate Shizuku in Android 14+ (non-root) #462
Replies: 19 comments 58 replies
-
Combined with Termux:Boot, this feels perfect! Thanks! |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot. I'm using it with Macrodroid Edit:
Oh wait, Shizuku itself could turn on Wireless Debugging, right? Perhaps with |
Beta Was this translation helpful? Give feedback.
-
.
في الخميس، ٨ أغسطس ٢٠٢٤, ١:٢٥ م MSHB ***@***.***> كتب:
… Thanks a lot. I'm using it with Macrodroid
Screenshot_20240808-155421.png (view on web)
<https://github.com/user-attachments/assets/4ef8f146-2554-4ce8-82bb-937a2ceaeb32>
—
Reply to this email directly, view it on GitHub
<#462 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BJJET6KJPOTSVC5GH2INJRDZQNBTNAVCNFSM6AAAAABFSLMR22VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMRXGQYDGOA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
@Knud3 do you happen to know check if Shizuku service is running already from shell? |
Beta Was this translation helpful? Give feedback.
-
so where is "rish_shizuku.dex"? |
Beta Was this translation helpful? Give feedback.
-
Thank you for this! It works for my non rooted Poco device Android 14. But it doesn't automatically start Shizuku on my device. After executing the "shizuku" command on Termux, I have to manually press the "Start" button on the Shizuku app for the service to start. Would you have any idea why this is happening? From the gif you posted, I can see from the terminal that the shizuku command would automatically start the service. Also, from the Termux terminal, when I issue "shizuku", there's an output that reads:
I don't know if that output is connected to my issue or not. Any suggestions? |
Beta Was this translation helpful? Give feedback.
-
@onoakino I just happened to have the same problem, I think the problem relies on that we're trying to connect to every open port and as a result when we use Well, what I did in order to solve it was to add this line: It worked for me, you can try and tell me if it works for you as well. Edit: So I added a line that sets target_device="localhost:${port}" and that target device will be used for the next adb commands: I also kept
|
Beta Was this translation helpful? Give feedback.
-
Solving the "adb: more than one device/emulator" Error in Shizuku
When running the Shizuku command with multiple paired devices, you're
encountering a common ADB limitation that prevents it from knowing which
device to target. This error occurs because ADB detects all four of your
paired devices and cannot automatically select one to work with.
Fortunately, there are several effective solutions to resolve this issue
without needing to unpair your regularly used devices.
Understanding the Problem
The error message "adb: more than one device/emulator" is triggered when
the ADB system (which Shizuku relies on) detects multiple connected devices
but doesn't have instructions on which one to use. This commonly happens
when:
1.
You have multiple devices paired via wireless debugging
2.
You're trying to use Shizuku on the current device but ADB sees all
paired connections
3.
The standard Shizuku script doesn't specify which device to target by
default
When you run the "shizuku" command, it attempts to establish a connection
with an ADB device, but since you have four paired devices, it cannot
determine which one should receive the commands.
Solution 1: Modify the Shizuku Command to Specify Device
The most direct solution is to modify the "shizuku" command to include the
specific device you want to target:
Using Device IP and Port
1.
Open your Termux app
2.
Check your currently connected devices with:
text
adb devices
3.
Identify your current device (usually shown as localhost:port)
4.
Modify your shizuku command to target this specific device:
text
shizuku -s localhost:PORT
(Replace PORT with your actual port number)
If the -s flag isn't directly supported by the shizuku command, you may
need to modify the underlying script.
Solution 2: Temporarily Disconnect Other Devices
Before running the "shizuku" command, you can disconnect other devices:
1.
List all connected devices:
text
adb devices
2.
Disconnect all devices:
text
adb disconnect
3.
Connect only to your current device:
text
adb connect localhost:PORT
(Get the PORT from Wireless debugging settings)
4.
Run the "shizuku" command normally
Solution 3: Modify the Shizuku Script
If you're comfortable with editing scripts, you can modify the Shizuku
script itself:
1.
Locate the shizuku script file in your Termux environment
2.
Edit the script to add the device selector to the underlying ADB commands
3.
Add the "-s localhost:PORT" parameter to any ADB command in the script
For example, if the script contains lines like:
text
adb shell command
Change them to:
text
adb -s localhost:PORT shell command
Solution 4: Use Shizuku's Built-in Terminal Support
Shizuku offers built-in terminal app support that might bypass this issue:
1.
Open the Shizuku app
2.
Go to "Use Shizuku in terminal apps"
3.
Export the required files to a location accessible by Termux (e.g.,
/storage/emulated/0/Shizuku)
4.
Follow the instructions to set up the "rish" command in Termux
5.
Use "rish" instead of direct ADB commands to avoid the multiple device
issue
Identifying the Correct Device
To ensure you're targeting the right device:
1.
Go to Developer Options > Wireless debugging
2.
Note the IP address and port shown under "IP address & port"
3.
This is the address you should use with the -s flag (typically in the
format localhost:PORT)
The port number changes each time wireless debugging is enabled, so you'll
need to check it whenever you restart the connection.
Conclusion
The "adb: more than one device/emulator" error occurs because ADB cannot
automatically select which of your four paired devices to use. By
explicitly specifying the target device with the -s flag or temporarily
disconnecting other devices, you can successfully run the "shizuku" command
without needing to permanently unpair your regularly used devices.
If you frequently switch between multiple devices, creating a custom script
that automatically detects and selects the local device might be the most
convenient long-term solution. This would allow you to maintain all your
device pairings while still using Shizuku seamlessly on your current device.
…On Sun, 6 Apr, 2025, 18:48 Docga1835, ***@***.***> wrote:
Everytime I run "shizuku", I get "adb: more than one device/emulator" so
it fails every single time. I tried adding the prior suggestion from
@juandvasquezp <https://github.com/juandvasquezp> "adb reconnect
offline", but I am still getting "adb: more than one device/emulator". I do
have 4 paired devices that I use on a regular basis. Any ideas to get
around this issue?
—
Reply to this email directly, view it on GitHub
<#462 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BQCAKNPOAWYLAIBEGNTOCKT2YFSHBAVCNFSM6AAAAABFSLMR22VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTENZUGI2TQNI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
To resolve the issue of "adb: more than one device/emulator" and disconnect
the offline device while keeping the active one, follow these steps:
Steps to Disconnect Offline Device
List Connected Devices:
Run:
bash
adb devices
Identify the offline device (e.g., localhost:XXXXX offline) and the active
device (localhost:XXXXX device).
Disconnect Offline Device:
Use the adb disconnect command with the IP and port of the offline device:
bash
adb disconnect localhost:XXXXX
Replace XXXXX with the port of the offline device.
Verify Active Device:
Run:
bash
adb devices
Ensure only your active device (localhost:XXXXX device) remains connected.
Run Shizuku:
Execute the Shizuku command targeting your active device:
bash
shizuku -s localhost:XXXXX
Replace XXXXX with the port of your active device.
Additional Tips
If the offline device persists after disconnecting, restart the ADB server:
bash
adb kill-server
adb start-server
Ensure USB debugging is enabled on your phone and confirm any RSA key
prompts
…On Mon, 7 Apr, 2025, 18:32 Docga1835, ***@***.***> wrote:
I have connected my phone to used debugging on my Galaxy watch and this
may be why. But I am still unsure what this other port is as even when I
have debugging turned on my watch it shows a different port number. Here is
my result. I ran adb devices before and after running shizuku to show you
what happens. Still no luck. Any other ideas?
Screenshot_20250407_132610_Termux.jpg (view on web)
<https://github.com/user-attachments/assets/781dd32c-55ad-495d-bd9a-4b57a0625c2a>
—
Reply to this email directly, view it on GitHub
<#462 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BQCAKNO4PMGGYDXS5M3AYSD2YKZBZAVCNFSM6AAAAABFSLMR22VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTENZVGQZDOOI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
To resolve your issue with Shizuku and multiple connected devices, follow
these steps:
Steps to Disconnect the Offline Device
Identify Devices:
Run:
bash
adb devices
Note the ports for both devices: the offline one (localhost:XXXXX offline)
and the active one (localhost:XXXXX device).
Disconnect Offline Device:
Use:
bash
adb disconnect localhost:XXXXX
Replace XXXXX with the port of the offline device.
Verify Active Device:
Run:
bash
adb devices
Confirm only your phone (localhost:XXXXX device) remains connected.
Start Shizuku:
Run Shizuku targeting your active device:
bash
shizuku -s localhost:XXXXX
Replace XXXXX with the port of your phone.
Additional Debugging Tips
If the offline device persists, restart ADB:
bash
adb kill-server
adb start-server
Ensure wireless debugging is enabled only on your phone during this process
…On Mon, 7 Apr, 2025, 18:32 Docga1835, ***@***.***> wrote:
I have connected my phone to used debugging on my Galaxy watch and this
may be why. But I am still unsure what this other port is as even when I
have debugging turned on my watch it shows a different port number. Here is
my result. I ran adb devices before and after running shizuku to show you
what happens. Still no luck. Any other ideas?
Screenshot_20250407_132610_Termux.jpg (view on web)
<https://github.com/user-attachments/assets/781dd32c-55ad-495d-bd9a-4b57a0625c2a>
—
Reply to this email directly, view it on GitHub
<#462 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BQCAKNO4PMGGYDXS5M3AYSD2YKZBZAVCNFSM6AAAAABFSLMR22VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTENZVGQZDOOI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
The issue is that Shizuku is still trying to use ADB in a way that
conflicts with the existing connections, even after you've disconnected the
offline device.
Steps to Correct the Issue
Kill ADB Server:
Run:
bash
adb kill-server
Start ADB Server:
Run:
bash
adb start-server
Verify Devices:
Run:
bash
adb devices
Ensure only your phone (localhost:42405 device) is listed. If the offline
device reappears, disconnect it again:
bash
adb disconnect localhost:35131
Repeat the adb devices command to verify.
Start Shizuku with Correct Port:
Run:
bash
shizuku -s localhost:42405
If the Issue Persists
Ensure Shizuku is Properly Set Up: Double-check that Shizuku is correctly
installed and configured in your environment.
Check for Conflicting ADB Instances: Ensure no other ADB instances are
running on your system that might be interfering with Termux.
The "Forget device" function in Wireless Debugging can be used to unpair
devices that are causing conflicts, such as the offline device in your
case. Here's how to use it:
Steps to Forget a Device
Access Wireless Debugging Settings:
Go to Settings > Developer options > Wireless debugging.
View Paired Devices:
Tap on Paired devices to see the list of devices paired for wireless
debugging.
Forget the Offline Device:
Locate the offline device (e.g., localhost:35131).
Tap on it and select Forget device.
Verify Remaining Devices:
Ensure only your active device (e.g., localhost:42405) remains paired.
Reconnect Shizuku:
Run Shizuku again:
bash
shizuku
This should now connect without issues since the conflicting offline device
is removed.
Notes
Forgetting the offline device will unpair it, so you will need to re-pair
it later if needed.
If the offline device reappears, it might be due to automatic reconnection
settings; disable wireless debugging on the other device temporarily.
Reinstall Shizuku: As a last resort, try reinstalling Shizuku in Termux to
ensure there are no corrupted files or configurations.
…On Mon, 7 Apr, 2025, 18:50 Docga1835, ***@***.***> wrote:
I'm really having a hard time getting this offline device to go away. I
don't even know what it is anymore as it doesn't match my watch. Debugging
is only on with my phone. Every time it comes back. Is there a way to parse
the results of adb devices and pick the online device?
Screenshot_20250407_134819_Termux.jpg (view on web)
<https://github.com/user-attachments/assets/74cb83b8-1b81-49bf-8d1c-2c3eb25529a3>
—
Reply to this email directly, view it on GitHub
<#462 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BQCAKNNOWHMA5BE3TZ3GRIL2YK3HZAVCNFSM6AAAAABFSLMR22VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTENZVGQ2DMMY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
To address the persistent issue of the offline device reappearing and to
ensure Shizuku connects only to the active device, you can parse the output
of adb devices and dynamically select the online device. Here's how you can
do it:
Parsing adb devices to Select Online Device
You can use a script to automate this process. Below is an example using a
shell script in Termux:
bash
#!/bin/bash
# Get the list of devices and filter for "device" (online) status
ONLINE_DEVICE=$(adb devices | grep "device$" | awk '{print $1}')
# Check if exactly one online device is found
if [ $(echo "$ONLINE_DEVICE" | wc -l) -eq 1 ]; then
echo "Connecting to device: $ONLINE_DEVICE"
shizuku -s $ONLINE_DEVICE
else
echo "Error: Multiple or no online devices found."
echo "Devices:"
adb devices
fi
How It Works:
List Devices: The script runs adb devices to get the list of connected
devices.
Filter Online Devices: It uses grep "device$" to find lines with the status
"device" (online).
Select the Device: If only one online device is found, it connects to that
device using shizuku -s.
Handle Errors: If multiple online devices or none are found, it displays an
error and lists all devices.
Steps to Use:
Save the script as connect_shizuku.sh in your Termux environment.
Make it executable:
bash
chmod +x connect_shizuku.sh
Run the script:
bash
./connect_shizuku.sh
Additional Tips:
Forget Offline Device: Use the "Forget device" option in Wireless Debugging
settings for persistent offline entries.
Kill ADB Cache: Restart ADB to clear cached connections:
bash
adb kill-server
adb start-server
Debugging Logs: Use adb logcat to check if any specific app or process is
causing the offline device to reconnect.
This script ensures Shizuku connects only to your phone (the active
device), bypassing issues caused by the offline entry.
…On Mon, 7 Apr, 2025, 18:54 VladiMiBeta, ***@***.***> wrote:
The issue is that Shizuku is still trying to use ADB in a way that
conflicts with the existing connections, even after you've disconnected the
offline device.
Steps to Correct the Issue
Kill ADB Server:
Run:
bash
adb kill-server
Start ADB Server:
Run:
bash
adb start-server
Verify Devices:
Run:
bash
adb devices
Ensure only your phone (localhost:42405 device) is listed. If the offline
device reappears, disconnect it again:
bash
adb disconnect localhost:35131
Repeat the adb devices command to verify.
Start Shizuku with Correct Port:
Run:
bash
shizuku -s localhost:42405
If the Issue Persists
Ensure Shizuku is Properly Set Up: Double-check that Shizuku is correctly
installed and configured in your environment.
Check for Conflicting ADB Instances: Ensure no other ADB instances are
running on your system that might be interfering with Termux.
The "Forget device" function in Wireless Debugging can be used to unpair
devices that are causing conflicts, such as the offline device in your
case. Here's how to use it:
Steps to Forget a Device
Access Wireless Debugging Settings:
Go to Settings > Developer options > Wireless debugging.
View Paired Devices:
Tap on Paired devices to see the list of devices paired for wireless
debugging.
Forget the Offline Device:
Locate the offline device (e.g., localhost:35131).
Tap on it and select Forget device.
Verify Remaining Devices:
Ensure only your active device (e.g., localhost:42405) remains paired.
Reconnect Shizuku:
Run Shizuku again:
bash
shizuku
This should now connect without issues since the conflicting offline
device is removed.
Notes
Forgetting the offline device will unpair it, so you will need to re-pair
it later if needed.
If the offline device reappears, it might be due to automatic reconnection
settings; disable wireless debugging on the other device temporarily.
Reinstall Shizuku: As a last resort, try reinstalling Shizuku in Termux to
ensure there are no corrupted files or configurations.
On Mon, 7 Apr, 2025, 18:50 Docga1835, ***@***.***> wrote:
> I'm really having a hard time getting this offline device to go away. I
> don't even know what it is anymore as it doesn't match my watch. Debugging
> is only on with my phone. Every time it comes back. Is there a way to parse
> the results of adb devices and pick the online device?
> Screenshot_20250407_134819_Termux.jpg (view on web)
> <https://github.com/user-attachments/assets/74cb83b8-1b81-49bf-8d1c-2c3eb25529a3>
>
> —
> Reply to this email directly, view it on GitHub
> <#462 (reply in thread)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/BQCAKNNOWHMA5BE3TZ3GRIL2YK3HZAVCNFSM6AAAAABFSLMR22VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTENZVGQ2DMMY>
> .
> You are receiving this because you are subscribed to this thread.Message
> ID: ***@***.***>
>
|
Beta Was this translation helpful? Give feedback.
-
The script you provided is a great solution to dynamically handle multiple
ADB devices and target the correct one for Shizuku. Here's an explanation
and refinement of the script to ensure it works seamlessly:
Key Features of the Script
Dynamic Port Scanning: The script uses nmap to scan for open ports in the
range 30000-50000 (commonly used by Wireless Debugging).
Target Device Selection: It loops through the detected ports, attempts to
connect via ADB, and sets the first successful connection as the target
device.
Error Handling: If no valid port is found, it notifies the user with an
error message.
Shizuku Start Command: Once a device is connected, it starts Shizuku using
the appropriate ADB commands.
Refined Script
Here’s an improved version of your script with minor adjustments for
clarity and robustness:
bash
#!/data/data/com.termux/files/usr/bin/bash
# Define paths
BASEDIR=$(dirname "${0}")
BIN=/data/data/com.termux/files/usr/bin
HOME=/data/data/com.termux/files/home
DEX="${BASEDIR}/rish_shizuku.dex"
# Exit if dex file is missing
if [ ! -f "${DEX}" ]; then
echo "Cannot find ${DEX}"
exit 1
fi
# Create Shizuku script
tee "${BIN}/shizuku" > /dev/null << 'EOF'
#!/data/data/com.termux/files/usr/bin/bash
# Scan for open ports in the Wireless Debugging range
ports=$(nmap -sT -p30000-50000 --open localhost | grep "open" | cut -f1 -d/)
# Loop through detected ports to find a valid target device
for port in ${ports}; do
# Attempt to connect via ADB
result=$(adb connect "localhost:${port}")
# Check if connection was successful
if [[ "$result" =~ "connected" || "$result" =~ "already connected" ]];
then
target_device="localhost:${port}"
echo "$result"
# Reconnect offline devices (error correction)
adb reconnect offline
# Start Shizuku service on the target device
adb -s "$target_device" shell sh
/storage/emulated/0/Android/data/moe.shizuku.privileged.api/start.sh
# Disable Wireless Debugging after starting Shizuku (optional)
adb -s "$target_device" shell settings put global adb_wifi_enabled 0
exit 0
fi
done
# Error message if no valid port is found
echo "ERROR: No valid device found! Is wireless debugging enabled?"
exit 1
EOF
# Create Rish script for Shizuku shell access
tee "${BIN}/rish" > /dev/null << EOF
#!/data/data/com.termux/files/usr/bin/bash
export RISH_APPLICATION_ID="com.termux"
/system/bin/app_process -Djava.class.path="${HOME}/rish_shizuku.dex"
/system/bin --nice-name=rish rikka.shizuku.shell.ShizukuShellLoader "\${@}"
EOF
# Set permissions and copy dex file to home directory
chmod +x "${BIN}/shizuku" "${BIN}/rish"
cp -f "${DEX}" "${HOME}/rish_shizuku.dex"
chmod -w "${HOME}/rish_shizuku.dex"
How to Use the Script:
Save the Script:
Save this script as setup_shizuku.sh in Termux.
Make It Executable:
Run:
bash
chmod +x setup_shizuku.sh
Execute the Setup:
Run:
bash
./setup_shizuku.sh
Run Shizuku:
After setup, you can start Shizuku by simply running:
bash
shizuku
Key Adjustments:
Error Handling: Added clear error messages when no valid devices are found.
Wireless Debugging Disablement: Optionally disables Wireless Debugging
after starting Shizuku to avoid conflicts.
Improved Port Scanning: Ensures only open ports are considered.
Troubleshooting:
If you still encounter issues:
Ensure nmap is installed in Termux:
bash
pkg install nmap
Restart ADB services before running Shizuku:
bash
adb kill-server && adb start-server
Verify Wireless Debugging is enabled on your phone and no other devices are
paired.
This script should dynamically handle multiple devices and ensure Shizuku
connects only to the correct one!
…On Mon, 7 Apr, 2025, 18:10 Juan David, ***@***.***> wrote:
Everytime I run "shizuku", I get adb: more than one device/emulator so it
fails every single time. I tried adding the prior suggestion from
@juandvasquezp <https://github.com/juandvasquezp> adb reconnect offline,
but I am still getting adb: more than one device/emulator. I do have 4
paired devices that I use on a regular basis. Any ideas to get around this
issue?
But this is a local script that you run in your phone, I find curious that
you use your phone to connect to adb to other phones.
Well, In that case I have a solution, I just came across a way to use an adb
parameter to direct commands
<https://developer.android.com/tools/adb#directingcommands> to a specific
device with their ip and port. The parameter is adb -s <device>
So I added a line that sets target_device="localhost:${port}" and that
target device will be used for the next adb commands.
Try again with this file:
#!/data/data/com.termux/files/usr/bin/bash
BASEDIR=$( dirname "${0}" )
BIN=/data/data/com.termux/files/usr/bin
HOME=/data/data/com.termux/files/home
DEX="${BASEDIR}/rish_shizuku.dex"
# Exit if dex is not in the same directory
if [ ! -f "${DEX}" ]; then
echo "Cannot find ${DEX}"
exit 1
fi
# Create a Shizuku script file
tee "${BIN}/shizuku" > /dev/null << 'EOF'
#!/data/data/com.termux/files/usr/bin/bash
# Make a list of open ports
ports=$( nmap -sT -p30000-50000 --open localhost | grep "open" | cut -f1 -d/ )
# Go through the list of ports
for port in ${ports}; do
# Try to connect to the port, and save the result
result=$( adb connect "localhost:${port}" )
# Check if the connection succeeded
if [[ "$result" =~ "connected" || "$result" =~ "already" ]]; then
# Set the target device
target_device="localhost:${port}"
# Show a message to a user
echo "$result"
# Add this to add reconnect to offline devices. Adds some error correction
adb reconnect offline
# Start Shizuku
adb -s "$target_device" shell sh /storage/emulated/0/Android/data/moe.shizuku.privileged.api/start.sh
# Disable wireless debugging, because it is not needed anymore
adb -s "$target_device" shell settings put global adb_wifi_enabled 0
exit 0
fi
done
# If no working ports are found, give an error message to a user
echo "ERROR: No port found! Is wireless debugging enabled?"
exit 1
EOF
# Set the dex location to a variable
dex="${HOME}/rish_shizuku.dex"
# Create a Rish script file
tee "${BIN}/rish" > /dev/null << EOF
#!/data/data/com.termux/files/usr/bin/bash
export RISH_APPLICATION_ID="com.termux"
/system/bin/app_process -Djava.class.path="${dex}" /system/bin --nice-name=rish rikka.shizuku.shell.ShizukuShellLoader "\${@}"
EOF
# Give execution permission to script files
chmod +x "${BIN}/shizuku" "${BIN}/rish"
# Copy dex to the home directory
cp -f "${DEX}" "${dex}"
# Remove dex write permission, because app_process cannot load writable dex
chmod -w "${dex}"
—
Reply to this email directly, view it on GitHub
<#462 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BQCAKNOAY5TGLLVQIBMX2AL2YKWQVAVCNFSM6AAAAABFSLMR22VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTENZVGQYDSMA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
What about devices that don't have split-screen support |
Beta Was this translation helpful? Give feedback.
-
I am very confused and require assistance. |
Beta Was this translation helpful? Give feedback.
-
@Knud3 did you take a look at the new way to start shizuku starting the new version? There might be some changes to be made to the script, because shizuku now starts with:
And this is just in my case, every case will be different. |
Beta Was this translation helpful? Give feedback.
-
@Knud3 I made this one, it worked: It's essentially the same I've been using but changing the previous start command from:
To:
And some added modifications to check if we're in Android 14+, verifications that are present in the exported Here's my code:
|
Beta Was this translation helpful? Give feedback.
-
@RikkaW pls add option to disable and enable start adb, because in 13.6.0 this always start wireless adb when WRITE_SECURE_SETTINGS is granted and wifi is on. Make this like on fork from @pixincreate |
Beta Was this translation helpful? Give feedback.
-
Suggestion: Use Downside here is that the adb termux ships doesn't have mdns :/ |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Just got Android 14 phone and tried to find a possibility to activate Shizuku automatically on the device boot, and every possible solution led to Tasker and MacroDroid. I want to believe that those both projects are legit, but I did not see it an option to install a closed-source app that has rights to "everything". I picked the second-best option and used Termux and shell scripts. Maybe you know better?
After some trial and error, I came to this. I hope I have everything essential here and have not missed any steps.
To activate Shizuku (TL;DR): Press
Wireless debugging
tile and runshizuku
command. Done!Initialize
All of this needs to be done just once, so do not worry about complexity.
Install Shizuku and Termux (eg. with
F-Droid
orDroid-ify
)Initialize Termux with commands:
Open the
Termux
andWireless debugging
settings page in the split screenPress
Pair device with pairing code
in theWireless debugging
settings pageGive ADB pairing command in Termux screen:
adb pair localhost:Port "WiFI pairing code"
(eg.adb pair localhost:37323 908693
)Pair and start Shizuku via wireless debugging
Use
Export files
inUse Shizuku in terminal apps
from Shizuku app (export files eg./storage/emulated/0/Shizuku
)Create a
copy.sh
file including the script below to the same directory (use eg. Squircle CE)Execute the script in Termux (eg.
bash ./storage/shared/Shizuku/copy.sh
)Usage
Commands:
shizuku
- Activate Shizukurish
- Open the ADB shell or run the ADB shell commandTo activate Shizuku you need to enable wireless debugging. The easiest way to do it is to use a quick setting tile. To add it, you need to enable it in
Quick settings developer tiles
inDeveloper options
. After that just writeshizuku
in Termux and press enter. Everything is set and done. Wireless debugging is automatically disabled because it does not need to be running in the background for Shizuku to work. This needs to be done once every reboot.When you need to open the ADB shell, just use the
rish
command in Termux. With therish -c 'command'
(eg.rish -c 'whoami'
) you can run it directly or use it in scripts. More info can be found here.You can also use Termux:Widget to make shortcut to home screen.
Please, also see the common problems.
Beta Was this translation helpful? Give feedback.
All reactions