ale5000-git / tingle

Tingle - Android patcher
http://forum.xda-developers.com/showthread.php?t=3438764
GNU General Public License v3.0
160 stars 11 forks source link

Stalls if adbd is already rooted #15

Closed Shadow53 closed 7 years ago

Shadow53 commented 7 years ago

Running Tingle with an adbd server that already has root privileges causes the program to stall at the following stage:

*** Patching succeeded.
 *** Reassembling classes...
      DEBUG: Assembling out/classes.dex
 *** Recompressing framework...
      DEBUG: Compressing framework.jar
 *** Copying the patched file to the output folder...
 *** Rooting adbd...
      DEBUG: adbd is already running as root
### Stalls here

I was able to manually push the framework.jar file from the output folder back onto the phone, however, given that my phone basically requires me to have adbd running as root (or else I get "error: insufficient permissions for device"), and killing that server just to restart it and have it get elevated privileges is annoying - especially when Tingle keeps insisting that adbd still has root privileges (on subsequent runs).

ale5000-git commented 7 years ago

Please try to run manually on the command prompt adb devices and note the name of your device, then run: adb -s device_name root adb -s device_name wait-for-device (device_name must be replaced with the name of your device)

Then post the results.

Shadow53 commented 7 years ago
$ adb -s device_name root
adbd is already running as root
$ adb -s device_name wait-for-device
# Nothing, seems to wait indefinitely for the device

I tried unplugging the phone and plugging it back in, but still nothing. Also, I did substitute the device name, I just didn't include it in the output here.

ale5000-git commented 7 years ago

@Shadow53 This change actually avoid the problem by not wait for the device when it is already rooted (which isn't needed). If you have any problem feel free to create a new ticket.

However I think that the fact that it "wait indefinitely" is a bug on your ROM or on your adb; it never happened to me in any circumstance.

Shadow53 commented 7 years ago

I just pulled the latest and tried patching. It caught that it was already rooted and everything, so great work!

Bartvz commented 7 years ago

On an Asus ZE551ML (Z00AD) running an unofficial CM14.1 nightly I have the same problem as @Shadow53 had on the 21st of October: *** Decompressing framework... DEBUG: Decompressing framework.jar *** Disassembling classes... DEBUG: Disassembling framework/classes.dex *** Patching... *** Detected: Android 7.x / Android 6.0.x / CyanogenMod 13-14 *** Patching succeeded. *** Reassembling classes... DEBUG: Assembling out/classes.dex *** Recompressing framework... DEBUG: Compressing framework.jar *** Copying the patched file to the output folder... *** Rooting adbd...

Pressing ctrl+c prints the following lines: Traceback (most recent call last): File "main.py", line 522, in <module> enable_device_writing(chosen_one) File "main.py", line 214, in enable_device_writing File "main.py", line 210, in root_adbd subprocess.check_call([DEPS_PATH["adb"], "-s", chosen_device, "wait-for-device"]) File "C:\Users\Bart\AppData\Local\Programs\Python\Python35\lib\subprocess.py", line 581, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['C:\\Users\\Bart\\AppData\\Local\\Android\\android-sdk\\platform-tools\\adb.exe', '-s', 'F5AZFG159469', 'wait-for-device']' returned non-zero exit status 3221225786

What can I do to resolve this?

Edit: forgot to mention that I am trying this from TWRP 3.0.2-M1 Edit edit: trying this from the rom itself works so consider this post moot!

ale5000-git commented 7 years ago

The original problem was for a recovery that was in an already rooted state.

@Bartvz: Can you please open a different issue? This need some investigation.