Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for binary update with TWRP #217

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

x3rAx
Copy link

@x3rAx x3rAx commented Dec 10, 2013

When trying to update the su binary with a TeamWin Recovery installed, the phone rebooted into recovery but the binary was not updatet.
This fixes issue #216. The su binary is now also updated via TWRP.

@koush
Copy link
Owner

koush commented Dec 10, 2013

/cache/recovery/command is AOSP's update mechanism, and is also what CM uses. TWRP doesn't support this?

@x3rAx
Copy link
Author

x3rAx commented Dec 11, 2013

Well, seems like TWRP wants to have /cache/recovery/openrecoveryscript as described here: http://www.teamw.in/OpenRecoveryScript

@x3rAx
Copy link
Author

x3rAx commented Dec 11, 2013

I wondered why TWRP doesn't support /cache/recovery/command when it's AOSP standard and after a quick search I found this line inside the TWRP repository. As I see this, I'd assume this should work but it does not for me.

The command file is read here but only if argc contains elements.. But I don't know if it is somehow possible to start recovery with arguments..

Or am I missing something?

@koush
Copy link
Owner

koush commented Dec 11, 2013

That's just the regular AOSP code and it should work. Not sure why it is not working. Can you pull a log of recovery after it reboots?

@x3rAx
Copy link
Author

x3rAx commented Dec 11, 2013

I found something interesting in the log:

[...]
I:Got arguments from /cache/recovery/command
E:Cannot load volume /misc!
Startup Commands:  '--update_package=CACHE:superuser.zip'ro.qc.sdk.audio.
[...]

and later

[...]
I:Inserting 'install CACHE:superuser.zip'
I:Copying file /cache/recovery/log to /cache/recovery/last_log
I:Attempt to load settings from settings file...
I:Loading settings from '/data/media/0/TWRP/.twrps'.
I:Backup folder set to '/data/media/0/TWRP/BACKUPS/SH35EW901904'
I:Copying file /etc/recovery.fstab to /cache/recovery/recovery.fstab
I:Version number saved to '/cache/recovery/.version'
I:Mount: Unable to find partition for path '/external_sd'
__bionic_open_tzdata: couldn't find any tzdata when looking for NFT-1DFT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
I:Switching packages (TWRP)
I:Set page: 'action_page'
Processing AOSP recovery commands...
I:command is: 'install' and I:value is: 'CACHE:superuser.zip'
I:Unable to mount '/usb-otg'
I:Actual block device: '', current file system: 'vfat'
I:Unable to mount '/usb-otg'
I:Actual block device: '', current file system: 'vfat'
I:Full zip path: '/data/media/0/CACHE:superuser.zip'
I:Zip file not found on external storage, trying internal...
I:Backup folder set to '/data/media/0/TWRP/BACKUPS/SH35EW901904'
I:Full zip path: '/data/media/0/CACHE:superuser.zip'
Unable to locate zip file '/data/media/0/CACHE:superuser.zip'.
E:Error installing zip file '/data/media/0/CACHE:superuser.zip'
Done processing script file
[...]

Obviously CACHE:superuser.zip is not translated to /cache/superuser.zip...

What's the purpose of using CACHE: instead of /cache?

@rvdaa92
Copy link

rvdaa92 commented Jan 16, 2014

Any progress on this? I want to update, but i just cant.. (also using htc one with twrp)

@ceilfors
Copy link

ceilfors commented Mar 8, 2014

@rvdaa92 I manually flashed the zip for the update. Details can be found here

@x3rAx
Copy link
Author

x3rAx commented Mar 8, 2014

Workaround:

As a workaround you could also try updating it through the app and after your phone rebooted to recovery without flashing the new version, you could manually flash '/cache/superuser.zip'

@zaaraameera2014
Copy link

Mmmmmmm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants