Git Product home page Git Product logo

Comments (17)

ecanja avatar ecanja commented on July 24, 2024 1

I updated adb, but the problem remains. I guess, it's an issue with the ROM. Seems as if I need to go with XPosed for signature spoofing.

Nevertheless, thanks a lot for your help!

from tingle.

ale5000-git avatar ale5000-git commented on July 24, 2024

It is possibly a bug in the ROM.

Can you please try what happen if you run these commands from terminal?
adb root
adb remount

from tingle.

ecanja avatar ecanja commented on July 24, 2024

It is possibly a bug in the ROM.

Definitely possible.

I'm still in the state of the hanging script and any adb commands don't do anything but hanging as well.

EDIT: Strg + C in the Terminal gives:

Traceback (most recent call last):
  File "main.py", line 531, in <module>
    enable_device_writing(chosen_one)
  File "main.py", line 219, in enable_device_writing
    remount_check = subprocess.check_output([DEPS_PATH["adb"], "-s", chosen_device, "remount", "/system"]).decode("utf-8")
  File "/usr/lib/python2.7/subprocess.py", line 567, in check_output
    output, unused_err = process.communicate()
  File "/usr/lib/python2.7/subprocess.py", line 791, in communicate
    stdout = _eintr_retry_call(self.stdout.read)
  File "/usr/lib/python2.7/subprocess.py", line 476, in _eintr_retry_call
    return func(*args)

And now, adb root (already ran as root) and adb remount (successful) go through without failure.

Don't know if that is of any help...

from tingle.

ale5000-git avatar ale5000-git commented on July 24, 2024

@ecanja: Please try to reboot the phone, run the 2 commands (without running Tingle) to see what happens and post the ouput.

from tingle.

ecanja avatar ecanja commented on July 24, 2024

Ok, did that:

$ adb logcat
# lot of output, worked as usual
$ adb shell
shell@golden:/ $ exit
~$ adb root
restarting adbd as root
~$ adb remount
^C
~$ adb logcat
^C
~$ adb shell
^C
~$

The first command adb root was ok, but adb remount hang up. Moreover, the usual adb commands adb logcat and adb shell were fine before this, but got stuck afterwards.

Does this mean that adb remount is not working on my phone and somehow crashes adb?

from tingle.

ale5000-git avatar ale5000-git commented on July 24, 2024

@ecanja: It is possible.

adb remount remount the system partition as read-write.

Try this:

  • Restart the phone.
  • Run mount -o remount,rw /system in Terminal (with root access) inside the phone.
  • After this, retry to use adb remount (in this case it shouldn't do anything since it is already read-write).

And see if it stuck.

from tingle.

ecanja avatar ecanja commented on July 24, 2024

I have no terminal installed, but I did this and it stuck:

$ adb shell
shell@golden:/ $ su
root@golden:/ # mount -o rw,remount,rw /system
root@golden:/ # exit
shell@golden:/ $ exit
$ adb root
restarting adbd as root
~$ adb remount
^C
~$

from tingle.

ale5000-git avatar ale5000-git commented on July 24, 2024

@ecanja: Try to update adb on your pc, just in case there is a problem in it, there should be version 1.0.36 if I'm not wrong.

from tingle.

ale5000-git avatar ale5000-git commented on July 24, 2024

@ecanja: Probably I cannot fix it in the script if it is a ROM issue, but just for patching you can also do it from recovery.
You just need to enter in recovery, mount the system partition, and then run Tingle on the pc.

from tingle.

georgedorn avatar georgedorn commented on July 24, 2024

Some ROMs / devices just don't let you remount /system in read-write mode via adb. I'm on a OnePlus X and no ROM I've put on it has allowed this to work.

Here is a workaround. Start in the tingle repo. You'll also need an su binary on your phone.

adb pull /system/framework/framework.jar ./input
python main.py  # (then select item 2 to work with a local file)
adb push ./output/framework.jar /data

Then, either via adb shell or in a terminal on the device:

su
mount -o remount,rw /system
cp /data/framework.jar /system/framework/framework.jar
reboot

from tingle.

ale5000-git avatar ale5000-git commented on July 24, 2024

@georgedorn: The main problem isn't remounting, but it is the fact that the adb remount command freeze adb indefinitely and never return.

So, the only thing would be probably kill adb and re-try with a workaround.
I will see what I can do.

from tingle.

ale5000-git avatar ale5000-git commented on July 24, 2024

@ecanja: Could you please post a bug report about adb remount to the ROM author and post a link of the bug report here?

from tingle.

ecanja avatar ecanja commented on July 24, 2024

Did so: NovaFusion/android_device_samsung_golden#83.

Unfortunately, the issue tracker doesn't look like being very actively maintained.

from tingle.

ale5000-git avatar ale5000-git commented on July 24, 2024

@ecanja @georgedorn

Could you please try the latest version of Tingle, tell me if there is any improvement and post the log?
When the command hang it should go on after 6 seconds, I would like to know if it works.

from tingle.

 avatar commented on July 24, 2024

I don't know if my issue is the same.. But for me it crashes after "Remounting /system..."

MENU

    1 - Patch file from a device (adb)
    2 - Patch file from the input folder

> 1

 *** OS: Linux 4.14.9-1-ARCH (linux)
 *** Python: 3.6.4 (64 bit)
 *** Mode: 1
 *** Working dir: /tmp/Tingle-x2vr8_to
 *** Selected device: 43f8c4790903
 *** Automounting /system...
      DEBUG: Already mounted
 *** Pulling framework from device...
 *** Device SDK: 25
 *** Decompressing framework...
      DEBUG: Decompressing framework.jar
 *** Disassembling classes...
      DEBUG: Disassembling framework/classes.dex
 *** Patching...
 *** Detected: Android 8.x / 7.x / 6.x (or LOS/CM 13-15)
 *** Patching succeeded.
 *** Reassembling classes...
      DEBUG: Assembling out/classes.dex
      WARNING: The reassembling has failed (probably we have exceeded the 64K methods limit)
               but do NOT worry, we will retry.
 *** Moving methods...
      WARNING: Experimental code.
      DEBUG: Disassembling framework/classes2.dex
 *** Reassembling classes...
      DEBUG: Assembling out/classes.dex
      DEBUG: Assembling out/classes2.dex
 *** Recompressing framework...
      DEBUG: Compressing framework.jar
 *** Copying the patched file to the output folder...
 *** Rooting adbd...
      DEBUG: adbd cannot run as root in production builds
 *** Unlocked ADB: False
 *** Remounting /system...

ERROR INFO
==========
Type: <class 'subprocess.CalledProcessError'>
Cmd: ['/usr/bin/adb', '-s', '43f8c4790903', 'shell', "su -c 'mount -o remount,rw /system /system && mount' | grep ' /system '"]
Return code: 1
Output: mount: '/system' not in /proc/mounts

Traceback (most recent call last):
  File "./main.py", line 720, in <module>
    enable_device_writing(SELECTED_DEVICE)
  File "./main.py", line 365, in enable_device_writing
    remount_check = safe_output_decode(safe_subprocess_run([DEPS_PATH["adb"], "-s", chosen_device, "shell", "su -c 'mount -o remount,rw /system /system && mount' | grep ' /system '"]))  # Untested
  File "./main.py", line 203, in safe_subprocess_run
    return subprocess.check_output(command, stderr=subprocess.STDOUT)
  File "/usr/lib/python3.6/subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.6/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/usr/bin/adb', '-s', '43f8c4790903', 'shell', "su -c 'mount -o remount,rw /system /system && mount' | grep ' /system '"]' returned non-zero exit status 1.
                                        

Any advice?

from tingle.

ale5000-git avatar ale5000-git commented on July 24, 2024

@ociramma: It isn't the same problem, could you please open a separate issue (to avoid confusion)?

from tingle.

 avatar commented on July 24, 2024

Ok, no problem.

from tingle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.