[Android Q&A, Help & Troubleshooting] R.O.G.U.E:
ROOTING with INSTALLATION OF TWRP & MAGISK on Lenovo A2016a40

{ Guide- noobs }

[

RECOVERY USED: TWRP 3.1]

note: This is just a guide. Please don't make me responsible for any misadventures! :alien:

note: Back-up any valuable data to other device, since the phone wipes data during the process.

The Phone config used:

- Original ROM ( Android 6.0 )

- Fully Formatted ( just for the purpose )

- Fully charged.

Steps to be done on the :

Phone:

- Settings -> About Phone -> Press "Build number" multiple times (enable developer settings)

- Settings -> Developer Settings -> Allow USB debugging & OEM unlocking

PC :

- Install lenovo driver for A2016a40 : attached as a .zip file (unzip it and install the software).

- Install minimal ADB and Fastboot : attached here is the portable version (portable version - just unzip in desktop into a separate folder).

- Download and move these attached files -> magisk.apk; magisk.zip and recovery.img to the above mentioned ADB and fastboot folder. [ PLEASE CHECK MY SECOND POST ]

--------------------------------------------------------------------------------------------------------------------------------

CONNECT THE PHONE TO PC -> CHANGE THE PHONE'S CONNECTION FROM "CHARGING" TO "MEDIA TRANSFER"

-------------------------------------------------------------------------------------------------------------------------------

steps:

• Open the unzipped "minimal ADB and Fastboot" folder which was mentioned above.

• Double click the "cmd here" excecutable file. This opens a command prompt in that specific folder.

• Type in the command prompt: "adb devices". If this is the first time, then the command will be showing almost like: "Daemon not running; started running in port (port number)", then it will be listing your device below.

► Look at your phone. There might be a pop-up window asking whether to accept this computer's RSA fingerprint. Hit always accept. Now you are good to proceed.

• In PC, again type "adb devices"(just fun) in the command prompt; it will be detecting and listing your device again.

• Type "adb reboot bootloader" and hit enter. Phone reboots to Fastboot mode.

• Type "fastboot devices" and hit enter. It should detect and list your device.

• Type "fastboot getvar unlocked" and hit enter. It shows the bootlocker unlocked status ( YES/NO ). In our case, it should print " NO " or blank.

• TO UNLOCK BOOTLOCKER: type "fastboot oem unlock" and hit enter.

► In your phone, it will ask for confirmation to unlock. Accept it.

( After giving it, your phone may look like it is stuck. It might be erasing the data. Anyway, in PC, type "fastboot reboot" and hit enter.

-- ---

...

..........

wait...........till the phone formats itself and reboots normally. Then Unplug it. )

: CLOSE THE COMMAND PROMT, AND OPEN A FRESH ITERATION (SAME THING)

: SINCE THE PHONE IS FORMATTED, SET IT UP AS MENTIONED IN THE VERY BEGINNING.("OEM UNLOCKING" AND "USB DEBUGGING" ENABLED)

: PLUG IT TO PC.

-------------------------------------------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------------------------------------

1)

CHECK BOOTLOCKER STATUS

• JUST LIKE EARLIER, TYPE "adb devices" in the command prompt​

• ACCEPT THE PC'S RSA FINGERPRINT IN PHONE.​

• TYPE "adb reboot bootloader" and go to fastboot mode.​

• TYPE "fastboot devices" to make sure pc detects it.​

• TYPE "fastboot getvar unlocked". THIS TIME IT SHOULD DISPLAY:​

​

"Unlocked: yes"​

​

You have successfully unlocked bootloader.​

--------------------------------------------------------------------------------------------------------------------------------

2)

FLASHING TWRP (CUSTOM RECOVERY) ALONG WITH TAKING AN NANDROID BACKUP

• AS MENTIONED EARLIER, GET INTO FASTBOOT MODE​

​

[ WE'RE FLASHING/INSTALLING THE FILE NAMED "recovery.img", WHICH WAS MOVED AS MENTIONED EARLIER ]​

​

• IN THE COMMAND PROMPT, TYPE "fastboot flash recovery recovery.img". After getting an "OK" or finished result, type "fastboot reboot".​

​

• As soon as you enter the latter, press the key combination for getting into recovery. For lenovo A2016a40, simultaneously press the power button+volume up. Once it vibrates/start boot, remove the power button. You'll be soon getting into the first use screen of TWRP CUSTOM RECOVERY .​

​

• In the screen, you'll be greeted with the choice of "Read-only" and "Swipe to allow modifications". (Here, i chose Read-only. But flashing things in twrp will, in the end modify things.(i think so)).​

​

• FIRST THINGS FIRST : TAKE A BACKUP COPY OF THE OS (NANDROID BACKUP)​

GO TO BACKUP -> SELECT SYSTEM, BOOT, DATA -> SWIPE TO BACKUP TO INTERNAL OR EXTERNAL STORAGE AS YOU WISH.​

​

----------------------------------------------------------------------------------------------------------------------------​

Close the command promt. Don't unhook the phone now since we have magisk to flash. ----------------------------------------------------------------------------------------------------------------------------​

​

3)

FLASHING MAGISK WITH TWRP

​

• IN TWRP-> MOUNT -> SELECT STORAGE -> ENABLE MTP​

• The selected storage will be visible as a portable storage device in MY COMPUTER/THIS PC.​

• Copy/Move Magisk.apk and Magisk.zip to your preferred folder in the phone's storage.​

• IN TWRP -> DISABLE MTP, and unhook the device from pc.​

​

• IN TWRP -> INSTALL -> SELECT THE Magisk.zip -> swipe to flash​

[ DO NOT CLEAR/WIPE THE CACHE ON YOUR OWN ]​

• IN TWRP MAIN MENU -> REBOOT ( NORMAL )​

​

• AS PER THE NEWEST UPDATE IN MAGISK, YOU WON'T BE SEEING THE MAGISK APP AFTER THE ABOVE FLASHING. FOR THAT, FROM YOUR FILE EXPLORER, LOCATE Magisk.apk and install it as a normal app.​

​

• Upon launching Magisk, it might tell that flashing is not enough/ re-flashing through the app is necessary. Go with the recommended settings as marked in the app, and soon it will begin flashing on its own. After it is finished, reboot the phone.​

​

• Launch the Magisk app again, you can see all is good!​

----------------------------------------------------------------------------------------------------------------------------​

​

now you can flash whatever you like, i mean, supporting zips through TWRP without bricking, and SuperUser rights will be managed by Magisk. If there are any mistakes, feel free to point out so that others won't make the same.​

----------------------------------------------------------------------------------------------------------------------------​

​

​

NOTE: ON THE CONTRARY, IF ANY OTHER PROBLEMATIC SCENARIO OCCURS, GO TO TWRP :​

TWRP -> RESTORE -> SWIPE TO RESTORE THE LATEST BACKUP.​

---------------------​

Knowledge is Power ​

​