[Updated] Root and TWRP and restore wrong IMEI's and rotating MAC for 7.1.1 Stock Rom

Search This thread

tombase

Member
Jul 19, 2008
17
6
I had some trouble to root the Elephone S7 7.1.1 Stock Rom. Therefore here is the short HowTo...

*** Root and TWRP for Elephone S7 4GB 7.1.1 Stock Rom http://bbs.elephone.hk/thread-12886-1-1.html

* SP_Flash_Tool download latest version e.g.: SP_Flash_Tool_v5.1720_Win.zip from http://spflashtools.com/category/windows
* SuperSU download latest version e.g.: SuperSU-v2.82-201705271822.zip from http://www.supersu.com/download
* Stock Rom download latest version e.g.: s7_4g_20170517133805_v2.3.zip from https://mega.nz/#!Z4AmRRTK!XLyd4O8HaS4B_XVNMdSn5OPX76rXDkOYXVekvn-9lMM
* TWRP 3.0.3 by Jemmini download latest version e.g.: recovery.img from https://www.dropbox.com/s/b7u3k1mgpppxlyx/recovery.img?dl=0

* create two folders, one for Stock Rom and one for TWRP
* unpack Stock Rom and copy MT6797_Android_scatter.txt into TWRP directory

optional:
* OpenGAps arm64 / 7.1 / stock download latest version e.g.: open_gapps-arm64-7.1-stock-20170629.zip http://opengapps.org/
* in OpenGAps zip delete from \GApps\ folder whatever you don't want

optional:
* AdAway v2.3 download latest apk from https://labs.xda-developers.com/store/app/org.adaway discussion https://forum.xda-developers.com/showthread.php?t=2190753
* AdAway systemless hosts download latest version e.g.: AdAway_systemless_hosts_v2.zip from https://www.androidfilehost.com/?fid=24438995911977059

optional:
* my_bootanimation.zip
* change your favorite boot animation in my_bootanimation.zip\system\media\
* add your own tweaks in my_bootanimation.zip\system\tweaks.prop


SP_Flash_Tool for Stock Rom:
* select Download-Agent: SP_Flash_Tool_v5.1720_Win\MTK_AllInOne_DA.bin
* select Scatter-Loading-File: Stock Rom\MT6797_Android_scatter.txt
* Firmware Upgrade

* switch phone off
* click Download and press "Power" to connect the phone
* after "Download OK" unplug USB and press "Power" to start phone

SP_Flash_Tool for TWRP:
* select Download-Agent: SP_Flash_Tool_v5.1720_Win\MTK_AllInOne_DA.bin
* select Scatter-Loading-File: TWRP\MT6797_Android_scatter.txt
* Download Only

* switch phone off
* click Download and press "Power" to connect the phone
* !!! after "Download OK" unplug USB and press "Home + Power" (about 10 seconds) until enter recovery !!!
* on phone select "recovery" with "Home" and "Vol -" for OK

* in TWRP select and install
SuperSu
optional Open Gaps
optional AdAway systemless hosts
optional my_bootanimation.zip
* reboot (may loop some times)

tip:
* "adb reboot recovery" doesn't work
* therefore switch phone off and press "Home + Power" (about 10 seconds) until enter recovery
* select "recovery" with "Home" and "Vol -" for OK to enter TWRP

*** restore wrong IMEI's after update to 7.1.1 Stock Rom http://bbs.elephone.hk/thread-13641-1-1.html

* Maui META download latest version e.g.: MauiMETA_exe_v9.1724.0.rar from https://www.needrom.com/download/maui-meta-3g-ver-7-1444-0-0/
* IMEI's from phone box

Maui META:
* switch phone off and unplug USB
* press and hold the "Vol- + Power" Button and connect USB, release the "Vol- + Power" Button and click "Reconnect" (wait until the ball turns yellow)
* !!! retry if it not works !!!
* in the selection box scroll to the IMEI download option and select (it will open a new window)
* copy !!! only the first 14 digits !!! of the 1st IMEI and paste in the IMEI field
* click the "Download To Flash" button and wait until message "Download IMEI to flash successfully"
* repeat this two steps for SIM_2
* close the window, click "Disconnect", unplug USB and restart phone
* check IMEI's in Settings > About Phone > Status

*** restore rotating MAC after update to 7.1.1 Stock Rom
https://androidrookies.com/how-to-change-wlan-mac-address-on-mtk/

* in Playstore install "Root Explorer"
* HxD Hex Editor for Windows download latest version https://mh-nexus.de/downloads/HxDSetup.zip

* in Root Explorer copy \nvdata\APCFG\APRDEB\WIFI to \sdcard
* now copy WIFI file to Windows and edit with HxD Hex Editor
* for Your last MAC e.g.: 00:08:22:a8:e3:fb write it in Offset (h) 04 to 09

00 01 02 03 04 05 06 07 08 09
06 01 00 00 00 08 22 A8 E3 FB

* copy WIFI back to \sdcard
* in Root Explorer copy \sdcard\WIFI to \nvdata\APCFG\APRDEB\ and set permission to 660 (rw-rw—)

Have Fun
 

Attachments

  • my_bootanimation.zip
    181.6 KB · Views: 240
Last edited:

nikolai7

Senior Member
Feb 16, 2016
77
6
I have problems, this is what I do, for twrp:
- Connect USB to phone
- Start Smart phone flash
- Select scatter file
- Click on download
- Press power in the phone

There, it doesnt download anything. The phone just boots up normally. It could be a driver problem since when it boots it says that the device couldnt not be recognized but where I can find the drivers?

Edit: finally i got it to work but not in a nice way. I tried to turn driver signature off, installing new VCOM drivers for S7 but nothing. So I just went to my other computer with Windows 7 64 bit and it worked all fine the first time. In this computer I have Windows 10 64 bit and always have problems with these things related to phones and flashing.
 
Last edited:

Ghostbird

New member
Mar 15, 2011
2
0
Thanks for the instructions.

Some comments:
  • You never mention that you should create a TWRP folder, so that confused me for a while.
  • You explicitly refer to Windows versions of files in your instructions, even though it's unnecessary. I did the process on Linux and it worked perfectly fine.
  • The recovery is not fixed for OTA updates. The first OTA update I got bricked my system and I had to reinstall everything. Is there a fixed version of the TWRP available for this phone? I know there's a fixed version for the Elephone P7000 here: bbs.elephone.hk/thread-5332-1-30.html
  • OpenGApps gave me many issues with crashing services and apps not starting. I decided to leave it out entirely, since the necessary apps are available in the Stock ROM. (I tried all GApps variants from pico to stock)
  • Even with a rooted system, I could not remove some OEM apps (such as the OTA app that will break the system). Is there a way to remove those anyway?
 
Last edited:

tombase

Member
Jul 19, 2008
17
6
Thanks for the instructions.

Some comments:
  • You never mention that you should create a TWRP folder, so that confused me for a while.
  • You explicitly refer to Windows versions of files in your instructions, even though it's unnecessary. I did the process on Linux and it worked perfectly fine.
  • The recovery is not fixed for OTA updates. The first OTA update I got bricked my system and I had to reinstall everything. Is there a fixed version of the TWRP available for this phone? I know there's a fixed version for the Elephone P7000 here: bbs.elephone.hk/thread-5332-1-30.html
  • OpenGApps gave me many issues with crashing services and apps not starting. I decided to leave it out entirely, since the necessary apps are available in the Stock ROM. (I tried all GApps variants from pico to stock)
  • Even with a rooted system, I could not remove some OEM apps (such as the OTA app that will break the system). Is there a way to remove those anyway?

Hi Ghostbird, thank You for Your support!
* I have added the TWRP folder in the HowTo.
* Do You have tested the HypoTurtle TWRP? Works OTA update now?
* OpenGApps working without any problems, but i never tried to remove OEM apps.
* I have installed Stock Rom, updated OTA and then installed TWRP. No problems since then.
below You find my GApps folder:
batteryusage-all.tar.lz
calculatorgoogle-all.tar.lz
calendargoogle-all.tar.lz
calsync-all.tar.lz
cameragoogle-arm64.tar.lz
cameragoogle-common.tar.lz
cameragooglelegacy-arm.tar.lz
cameragooglelegacy-common.tar.lz
chrome-arm64.tar.lz
clockgoogle-all.tar.lz
contactsgoogle-all.tar.lz
dialerframework-common.tar.lz
dialergoogle-all.tar.lz
exchangegoogle-all.tar.lz
gmail-all.tar.lz
hangouts-arm64.tar.lz
keyboardgoogle-arm64.tar.lz
messenger-arm64.tar.lz
newsstand-all.tar.lz
newswidget-all.tar.lz
pixelicons-all.tar.lz
pixellauncher-all.tar.lz
storagemanagergoogle-all.tar.lz
taggoogle-all.tar.lz
 
Last edited:

bluiis48

Senior Member
Oct 28, 2015
124
57
Kelowna
Ah, I am still on the July release, have been holding off on the August ROM waiting to see if anything showed up for September but it looks like that might be game over for updates. Thanks for letting me know, saves me some time. I find the July one not too bad. Roll back for root ?
 

Bradco

Senior Member
Sep 8, 2015
580
121
Limoges
Ah, I am still on the July release, have been holding off on the August ROM waiting to see if anything showed up for September but it looks like that might be game over for updates. Thanks for letting me know, saves me some time. I find the July one not too bad. Roll back for root ?

you're welcome :), for root it's all good with magisk.
you install the latest version of magisk manager, you get the file boot.img from your rom, you patch this file via magisk manager and you just flash the new boot.img via flashtool. After root is functional.

Y'll try this : https://forum.xda-developers.com/android/software/twrp-porter-maker-mediatek-mt67xx-32-t3681861
 

bluiis48

Senior Member
Oct 28, 2015
124
57
Kelowna
Thanks, I will give that a try when I finally decide to load the 0814 update (or newer if one becomes available). Can I ask why you were needing TWRP ? Also did you notice any improvement with the 0814 update? I have an S8 in transit and will be passing this S7 on to my wife but the S8 could be a while yet when Canada Post gets it. Magisk may work on that also, same X25 and ram.
 

Bradco

Senior Member
Sep 8, 2015
580
121
Limoges
Thanks, I will give that a try when I finally decide to load the 0814 update (or newer if one becomes available). Can I ask why you were needing TWRP ? Also did you notice any improvement with the 0814 update? I have an S8 in transit and will be passing this S7 on to my wife but the S8 could be a while yet when Canada Post gets it. Magisk may work on that also, same X25 and ram.

of course a custom recovery is always useful, nandroid backup and flash some .zip.
for it is the first version of android 7 that I test and I find it very stable without problems.

Ha yes I wonder the purchase of a s8 tell me if it great :)
 

bluiis48

Senior Member
Oct 28, 2015
124
57
Kelowna
Yes I will give you my opinion but it will be a while because our customs and mail is very slow. As I remember I had a hard time with TWRP when I loaded the 20170517 stock rom. I finally did a full format with SPflashtool and when it seemed stuck at the boot animation I left it alone for maybe half an hour and it finally came to life so that version of TWRP does work for 7.1.1 for me.
 
  • Like
Reactions: Bradco

Bradco

Senior Member
Sep 8, 2015
580
121
Limoges
Yes I will give you my opinion but it will be a while because our customs and mail is very slow. As I remember I had a hard time with TWRP when I loaded the 20170517 stock rom. I finally did a full format with SPflashtool and when it seemed stuck at the boot animation I left it alone for maybe half an hour and it finally came to life so that version of TWRP does work for 7.1.1 for me.

ok :) I understand, little question about SP flash tool to make a full format you used which option DOWNLOAD ONLY / FIRMWARE UPGRADE or the other so I no longer remember the name ?
 

bluiis48

Senior Member
Oct 28, 2015
124
57
Kelowna
ok :) I understand, little question about SP flash tool to make a full format you used which option DOWNLOAD ONLY / FIRMWARE UPGRADE or the other so I no longer remember the name ?
The other is format all + download and that may work for you. It was a while ago, when I went from Android 6 to 7 and I do not want to steer you in the wrong direction. From what I remember I used the format tab on SP Flashtool and pretty much formatted everything. Yesterday I tried for the 0814 OTA by using the clean option in Super SU (which basically uninstalls it ) and flashing the stock recovery for the existing ROM version using SP Flashtool. The OTA would not complete because of a sector mismatch so I flashed TWRP recovery again, which actually rebooted pretty fast then reinstalled the Super SU zip using TWRP. If you want TWRP recovery maybe try it again without formatting anything and give the boot more time. I am not going to bother flashing the complete 0814 ROM until I pass on the phone to my wife because I don't want to go through the app and user credential reloads and fixing the IMEI's and WIFI mac. The Google backup to Drive feature is not available in settings - same for many who are on 7.1.1 even the "name brand" phones.
 
  • Like
Reactions: Bradco

Bradco

Senior Member
Sep 8, 2015
580
121
Limoges
The other is format all + download and that may work for you. It was a while ago, when I went from Android 6 to 7 and I do not want to steer you in the wrong direction. From what I remember I used the format tab on SP Flashtool and pretty much formatted everything. Yesterday I tried for the 0814 OTA by using the clean option in Super SU (which basically uninstalls it ) and flashing the stock recovery for the existing ROM version using SP Flashtool. The OTA would not complete because of a sector mismatch so I flashed TWRP recovery again, which actually rebooted pretty fast then reinstalled the Super SU zip using TWRP. If you want TWRP recovery maybe try it again without formatting anything and give the boot more time. I am not going to bother flashing the complete 0814 ROM until I pass on the phone to my wife because I don't want to go through the app and user credential reloads and fixing the IMEI's and WIFI mac. The Google backup to Drive feature is not available in settings - same for many who are on 7.1.1 even the "name brand" phones.

With each new installation of rom, I start all (long but more stable).
For the problem of wifi and IMEI for having 5 elephone I have never encountered this problem even with version 0814. For the recovery custom it is weird that the start of the phone is long. this afternoon I tried to make a port of TWRP with base on TWRP 3.1 (compatible android 7 for p9000) with stock recovery, but I'm not sure it is functional. i'm not understand everything :).

I just saw that the thread be updated, even tuto with the rom s7_4g_20170517133805_v2.3.zip I'm not sure that it works.
 

bluiis48

Senior Member
Oct 28, 2015
124
57
Kelowna
I followed the tutorial on first page and it works for me but I am using the 0517 stock rom. I don't think you need to Port TWRP because it does work with the one I posted. If you have time try starting with the 0517 and follow steps on page one. If that works you can try the same with 0814.

IMPORTANT THOUGHT do you have OEM unlocking (allow the bootloader to be unlocked) enabled in developer options ? This is the first phone where I found that to be necessary.
 
Last edited:
  • Like
Reactions: Bradco

Bradco

Senior Member
Sep 8, 2015
580
121
Limoges
I followed the tutorial on first page and it works for me but I am using the 0517 stock rom. I don't think you need to Port TWRP because it does work with the one I posted. If you have time try starting with the 0517 and follow steps on page one. If that works you can try the same with 0814.

IMPORTANT THOUGHT do you have OEM unlocking (allow the bootloader to be unlocked) enabled in developer options ? This is the first phone where I found that to be necessary.

I just look into the options for developers and OEM unlocking is turned off. do you think I'll have to activate it ?
Ps : I never needed it

EDIT 1 :

at this stage :
SP_Flash_Tool for Stock Rom:
* select Download Agent: SP_Flash_Tool_v5.1720_Win \ MTK_AllInOne_DA.bin
* select Scatter-Loading-File: Stock Rom \ MT6797_Android_scatter.txt
* Firmware Upgrade

Before doing firmaware upgrade in what version of rom do I have to?
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    I had some trouble to root the Elephone S7 7.1.1 Stock Rom. Therefore here is the short HowTo...

    *** Root and TWRP for Elephone S7 4GB 7.1.1 Stock Rom http://bbs.elephone.hk/thread-12886-1-1.html

    * SP_Flash_Tool download latest version e.g.: SP_Flash_Tool_v5.1720_Win.zip from http://spflashtools.com/category/windows
    * SuperSU download latest version e.g.: SuperSU-v2.82-201705271822.zip from http://www.supersu.com/download
    * Stock Rom download latest version e.g.: s7_4g_20170517133805_v2.3.zip from https://mega.nz/#!Z4AmRRTK!XLyd4O8HaS4B_XVNMdSn5OPX76rXDkOYXVekvn-9lMM
    * TWRP 3.0.3 by Jemmini download latest version e.g.: recovery.img from https://www.dropbox.com/s/b7u3k1mgpppxlyx/recovery.img?dl=0

    * create two folders, one for Stock Rom and one for TWRP
    * unpack Stock Rom and copy MT6797_Android_scatter.txt into TWRP directory

    optional:
    * OpenGAps arm64 / 7.1 / stock download latest version e.g.: open_gapps-arm64-7.1-stock-20170629.zip http://opengapps.org/
    * in OpenGAps zip delete from \GApps\ folder whatever you don't want

    optional:
    * AdAway v2.3 download latest apk from https://labs.xda-developers.com/store/app/org.adaway discussion https://forum.xda-developers.com/showthread.php?t=2190753
    * AdAway systemless hosts download latest version e.g.: AdAway_systemless_hosts_v2.zip from https://www.androidfilehost.com/?fid=24438995911977059

    optional:
    * my_bootanimation.zip
    * change your favorite boot animation in my_bootanimation.zip\system\media\
    * add your own tweaks in my_bootanimation.zip\system\tweaks.prop


    SP_Flash_Tool for Stock Rom:
    * select Download-Agent: SP_Flash_Tool_v5.1720_Win\MTK_AllInOne_DA.bin
    * select Scatter-Loading-File: Stock Rom\MT6797_Android_scatter.txt
    * Firmware Upgrade

    * switch phone off
    * click Download and press "Power" to connect the phone
    * after "Download OK" unplug USB and press "Power" to start phone

    SP_Flash_Tool for TWRP:
    * select Download-Agent: SP_Flash_Tool_v5.1720_Win\MTK_AllInOne_DA.bin
    * select Scatter-Loading-File: TWRP\MT6797_Android_scatter.txt
    * Download Only

    * switch phone off
    * click Download and press "Power" to connect the phone
    * !!! after "Download OK" unplug USB and press "Home + Power" (about 10 seconds) until enter recovery !!!
    * on phone select "recovery" with "Home" and "Vol -" for OK

    * in TWRP select and install
    SuperSu
    optional Open Gaps
    optional AdAway systemless hosts
    optional my_bootanimation.zip
    * reboot (may loop some times)

    tip:
    * "adb reboot recovery" doesn't work
    * therefore switch phone off and press "Home + Power" (about 10 seconds) until enter recovery
    * select "recovery" with "Home" and "Vol -" for OK to enter TWRP

    *** restore wrong IMEI's after update to 7.1.1 Stock Rom http://bbs.elephone.hk/thread-13641-1-1.html

    * Maui META download latest version e.g.: MauiMETA_exe_v9.1724.0.rar from https://www.needrom.com/download/maui-meta-3g-ver-7-1444-0-0/
    * IMEI's from phone box

    Maui META:
    * switch phone off and unplug USB
    * press and hold the "Vol- + Power" Button and connect USB, release the "Vol- + Power" Button and click "Reconnect" (wait until the ball turns yellow)
    * !!! retry if it not works !!!
    * in the selection box scroll to the IMEI download option and select (it will open a new window)
    * copy !!! only the first 14 digits !!! of the 1st IMEI and paste in the IMEI field
    * click the "Download To Flash" button and wait until message "Download IMEI to flash successfully"
    * repeat this two steps for SIM_2
    * close the window, click "Disconnect", unplug USB and restart phone
    * check IMEI's in Settings > About Phone > Status

    *** restore rotating MAC after update to 7.1.1 Stock Rom
    https://androidrookies.com/how-to-change-wlan-mac-address-on-mtk/

    * in Playstore install "Root Explorer"
    * HxD Hex Editor for Windows download latest version https://mh-nexus.de/downloads/HxDSetup.zip

    * in Root Explorer copy \nvdata\APCFG\APRDEB\WIFI to \sdcard
    * now copy WIFI file to Windows and edit with HxD Hex Editor
    * for Your last MAC e.g.: 00:08:22:a8:e3:fb write it in Offset (h) 04 to 09

    00 01 02 03 04 05 06 07 08 09
    06 01 00 00 00 08 22 A8 E3 FB

    * copy WIFI back to \sdcard
    * in Root Explorer copy \sdcard\WIFI to \nvdata\APCFG\APRDEB\ and set permission to 660 (rw-rw—)

    Have Fun
    1
    Yes I will give you my opinion but it will be a while because our customs and mail is very slow. As I remember I had a hard time with TWRP when I loaded the 20170517 stock rom. I finally did a full format with SPflashtool and when it seemed stuck at the boot animation I left it alone for maybe half an hour and it finally came to life so that version of TWRP does work for 7.1.1 for me.
    1
    ok :) I understand, little question about SP flash tool to make a full format you used which option DOWNLOAD ONLY / FIRMWARE UPGRADE or the other so I no longer remember the name ?
    The other is format all + download and that may work for you. It was a while ago, when I went from Android 6 to 7 and I do not want to steer you in the wrong direction. From what I remember I used the format tab on SP Flashtool and pretty much formatted everything. Yesterday I tried for the 0814 OTA by using the clean option in Super SU (which basically uninstalls it ) and flashing the stock recovery for the existing ROM version using SP Flashtool. The OTA would not complete because of a sector mismatch so I flashed TWRP recovery again, which actually rebooted pretty fast then reinstalled the Super SU zip using TWRP. If you want TWRP recovery maybe try it again without formatting anything and give the boot more time. I am not going to bother flashing the complete 0814 ROM until I pass on the phone to my wife because I don't want to go through the app and user credential reloads and fixing the IMEI's and WIFI mac. The Google backup to Drive feature is not available in settings - same for many who are on 7.1.1 even the "name brand" phones.
    1
    I followed the tutorial on first page and it works for me but I am using the 0517 stock rom. I don't think you need to Port TWRP because it does work with the one I posted. If you have time try starting with the 0517 and follow steps on page one. If that works you can try the same with 0814.

    IMPORTANT THOUGHT do you have OEM unlocking (allow the bootloader to be unlocked) enabled in developer options ? This is the first phone where I found that to be necessary.
    1
    Can i root this phone with kingo root app ?

    I do not recommend it, I tried on a p8000.
    Use magisk : it's easy
    https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445

    Clean flash your rom with spflashtool
    copi on your phone the boot.img which is in the .zip of your rom
    Installe magisk manager and do this :

    Via Magisk Manager (Only support v14.0+):

    This method does not need root, and also does not require a custom recovery.
    However, you MUST have a stock boot image dump beforehand, and also be able to flash the patched boot image, either through fastboot/download mode or ODIN
    Install the latest Magisk Manager
    Press Install > Install > Patch Boot Image File, and select your stock boot image file
    Magisk Manager will now patch your boot image, and store it in [Internal Storage]/MagiskManager/patched_boot.img[.tar]
    Flash the patched image boot with spflash tool to your device and reboot.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone