opengapps / opengapps-app-support

issuetracker and translations for the Open GApps App
http://opengapps.org/app
Creative Commons Attribution Share Alike 4.0 International
61 stars 57 forks source link

Check for recovery manager #46

Open Forage opened 7 years ago

Forage commented 7 years ago

If possible, it might be good to check if TWRP is actually installed as a boot manager. If not, the install button will do nothing but kick you to the recovery (stock, CM, etc).

If it's not TWRP that's installed, either refuse to install if it's not possible with the current recovery or tell people to do it manually. If TWRP is install, tell people the installation will be automagically started.

beatbrot commented 7 years ago

We thought of that, but unfortunately, never found a way how to check if TWRP is installed.

If you/anyone else knows a way, feel free to comment how it works :)

janengelmohr commented 7 years ago

Mhm, assuming a TWRP user has also root installed I would traverse /dev/block/platform/*/by-name and grep for "recovery" so we get the recovery partition path.

Then copy (dd) that partition to a temporary folder, unpack the image and examine the ramdisk. A good indicator is the "twres" folder which is only available in TWRP. This should be sufficient to determine it I think :)

Also you could just ask the user, lolz.

rorre commented 7 years ago

How about the recovery log? They seems to be output the last recovery used. And also the version.

beatbrot commented 7 years ago

@Rendyindo Thanks for your tip! Indeed, we already considered that :)

jumoog commented 7 years ago

check for /cache/recovery/last_log

Revan335 commented 6 years ago

Or check, is a .twrp config file on internal or external Storage in the TWRP folder available. TWRP is so mostly installed.