opengapps-app-support icon indicating copy to clipboard operation
opengapps-app-support copied to clipboard

Check for recovery manager

Open Forage opened this issue 8 years ago • 6 comments
trafficstars

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.

Forage avatar Dec 09 '16 17:12 Forage

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 :)

beatbrot avatar Dec 09 '16 17:12 beatbrot

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.

janengelmohr avatar Dec 13 '16 21:12 janengelmohr

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

rorre avatar Jan 06 '17 14:01 rorre

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

beatbrot avatar Jan 06 '17 23:01 beatbrot

check for /cache/recovery/last_log

jumoog avatar Jan 15 '17 21:01 jumoog

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

Revan335 avatar Apr 14 '18 12:04 Revan335