• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[INFO][TWRP for Ascend P7 - WIP ]

Search This thread

surdu_petru

Recognized Contributor
Feb 3, 2010
6,943
22,857
Paris
Hello everybody !


TWRP 2.7.1.0 for ascend P7

*** Working In Progress ***


Open this new thread in the hope that you can help me in achieving TWRP for your P7 .

First of all, I have not this device currently - so, your help is welcome :good:

I will post here ( soon ) a list of the required - to be able to start building TWRP .


This stuff are required from your P7 device :
  • your international model : ( example Ascend P6 -> P6-U06 ) :
  • if your device can be unlocked ? ( bootloader unlocked )
  • build.prop ;
  • stock boot.img
  • stock recovery.img
  • screenshoots with CPU-Z !
  • more stuff will be added later ;


Please keep this thread clean, and on topic - in this way, it will be much easier to find the information needed !

Thank you very much for your cooperation !


Best regards !
 
Last edited:

surdu_petru

Recognized Contributor
Feb 3, 2010
6,943
22,857
Paris
How extract stock boot.img and recovery.img :

- root your device ;

> adb shell
$ su
# dd if =/dev/block/mmcblk0pX1 of=/storage/sdcard0/boot.img ( extract boot.img on internal storage )
# dd if=/dev/block/mmcblk0px2 of=/storage/sdcard0/recovery.img ( extract recovery.img on internal storage )
# exit
$ exit
> adb pull /storage/sdcard0/boot.img ( extract boot.img from your device on your PC )
> adb pull /storage/sdcard0/recovery.img ( extract recovery.img from your device on your PC )


How you can determainate partition mmcblk0pX1 for boot :

> navigate in your device : /dev/block/platform/xxx.1 or xxx.2/by-name/ here you will be able to see :

Example :
boot
07 Jul 14 06:01:00 rwxrwxrwx -> mmcblk0p42

So , mmcblk0pX1 will be in this case -> mmcblk0p42 !

Please follow the same way for determinate partition mmcblk0pX2 for recovery !
 
Last edited:

Max4000

Senior Member
Aug 17, 2011
126
43
Hannover
your international model : ( example Ascend P6 -> P6-U06 ) :
sgMq3uY.jpg

jYvh0aS.jpg


if your device can be unlocked ? ( bootloader unlocked )
Q9t70TO.png


build.prop


stock boot.img
Code:
dd if=/dev/block/mmcblk0p17 of=/storage/sdcard0/boot.img
32768+0 records in
32768+0 records out
16777216 bytes transferred in 2.305 secs (7278618 bytes/sec)
https://drive.google.com/file/d/0B1KQ4_n2Fu3AeHY4a3NvTDZLRTQ/edit?usp=sharing


stock recovery.img
Code:
dd if=/dev/block/mmcblk0p18 of=/storage/sdcard0/recovery.img
32768+0 records in
32768+0 records out
16777216 bytes transferred in 2.378 secs (7055179 bytes/sec)
https://drive.google.com/file/d/0B1KQ4_n2Fu3AdDA4Rk5Yc2s3ekU/edit?usp=sharing


screenshoots with CPU-Z !
zBJhknI.jpg

6Y4GoQI.jpg

I hope this is helpfull.
 
  • Like
Reactions: surdu_petru

surdu_petru

Recognized Contributor
Feb 3, 2010
6,943
22,857
Paris
Thank you very much ... tomorrow I'll try to build the first twrp .

I'll let you to know if I'll need more info from your device .
 
  • Like
Reactions: Max4000

surdu_petru

Recognized Contributor
Feb 3, 2010
6,943
22,857
Paris
If you have already CWM for your device, even in Chinese, please upload here - I don't understand this language currently :D

Also some question :

Do you have in your device :

/dev/block/platform/hi_mci.0/by-name/system ?

or

/dev/block/platform/hi_mci.0/by-name/newsys ?

or both ....

Also do you have : /dev/block/platform/hi_mci.0/by-name/sdcard ?


Please, can you take a screenshot with "mount" on your device :

> adb shell
$ su
# mount


Thank you very much !
 

XQC

Senior Member
Jul 24, 2010
106
45
Again, P7-L10

Do you have in your device :

/dev/block/platform/hi_mci.0/by-name/system ?
Yes.

/dev/block/platform/hi_mci.0/by-name/newsys ?
No.

Also do you have : /dev/block/platform/hi_mci.0/by-name/sdcard ?
No.

Mount:
Code:
[email protected]:/ # mount
rootfs / rootfs ro,relatime 0 0
/dev/block/mmcblk0p11 /mnvm1:0 ext4 rw,seclabel,nosuid,nodev,noatime,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p12 /mnvm2:0 ext4 rw,seclabel,nosuid,nodev,noatime,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p16 /mnvm3:0 ext4 rw,seclabel,nosuid,nodev,noatime,user_xattr,acl,barrier=1,data=ordered 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
none /dev/frz cgroup rw,relatime,freezer 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,mode=750,gid=1000 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/secure tmpfs rw,seclabel,relatime,mode=700 0 0
tmpfs /mnt/asec tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
tmpfs /fs_emmc_log tmpfs rw,seclabel,nosuid,nodev,relatime,mode=664 0 0
/dev/block/platform/hi_mci.0/by-name/system /system ext4 ro,seclabel,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/block/platform/hi_mci.0/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,noatime,user_xattr,acl,barrier=1,data=ordered,noauto_da_alloc,discard 0 0
/dev/block/platform/hi_mci.0/by-name/userdata /data ext4 rw,seclabel,nosuid,nodev,noatime,errors=panic,user_xattr,acl,barrier=1,data=ordered,noauto_da_alloc,discard 0 0
/dev/block/platform/hi_mci.0/by-name/cust /cust ext4 ro,seclabel,nosuid,nodev,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/block/platform/hi_mci.0/by-name/splash2 /splash2 ext4 rw,seclabel,nosuid,nodev,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/block/platform/hi_mci.0/by-name/3rdmodem /3rdmodem ext4 rw,seclabel,nosuid,nodev,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/block/platform/hi_mci.0/by-name/3rdmodemnvm /3rdmodemnvm ext4 rw,seclabel,nosuid,nodev,noatime,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/block/platform/hi_mci.0/by-name/3rdmodemnvmbkp /3rdmodemnvmbkp ext4 rw,seclabel,nosuid,nodev,noatime,user_xattr,acl,barrier=1,data=ordered 0 0
/data/share /mnt/shell/emulated sdcardfs rw,nosuid,nodev,relatime,uid=1023,gid=1023 0 0
tmpfs /storage/emulated tmpfs rw,seclabel,nosuid,nodev,relatime,mode=050,gid=1028 0 0
/dev/block/vold/179:97 /mnt/media_rw/sdcard1 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/fuse /storage/sdcard1 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/data/share /storage/emulated/0 sdcardfs rw,nosuid,nodev,relatime,uid=1023,gid=1023 0 0
/data/share /storage/emulated/0/Android/obb sdcardfs rw,nosuid,nodev,relatime,uid=1023,gid=1023 0 0
/data/share /storage/emulated/0 sdcardfs rw,nosuid,nodev,relatime,uid=1023,gid=1023 0 0
/data/share /storage/emulated/0/Android/obb sdcardfs rw,nosuid,nodev,relatime,uid=1023,gid=1023 0 0
 
  • Like
Reactions: surdu_petru

bibiloi

New member
Nov 9, 2013
4
8
Chinese recovery

This one according with Chinese sites is for model P7-00. This is the model I own.
I have seen CWM also for 05 and 07. Not sure if are the same.
I am in CH and I can give you all they have posted for this phone.
Sanatate.... ;)
 

Attachments

  • recovery_cn.zip
    11.1 MB · Views: 371

surdu_petru

Recognized Contributor
Feb 3, 2010
6,943
22,857
Paris
Hello again !

For enable some stuff in TWRP recovery ( like mount external storage, battery indicator and auto light display ) I need also to know some PATH from your device !

Here you will see P6 PATH :

Brightness Path = /sys/devices/platform/k3_fb.1/leds/lcd_backlight0/brightness

Mass Storage Path = /sys/class/android_usb/android0/f_mass_storage/lun/file

Battery Path = /sys/devices/platform/bq_bci_battery.1/power_supply/Battery


1° I need some proper path from your device for Brightness, Mass Storage and Battery !


2° Need a screenshots with this commands :

> adb shell
$ su
# cat /proc/partitions

> adb shell
$ su
# cat /proc/app_info

3° Also I need some stock : libraries , /system/lib/egl/egl.cfg and also /system/bin/linker !

( /system/lib/libc.so; /system/lib/libdl.so ; /system/lib/liblog.so ; /system/lib/libm.so ; /system/lib/libstdc++.so ; /system/lib/libz.so )



Also I can see you have a new service /sbin/set_immutable ... if someone can clarify me what could be ?

In your boot.img after mount /system you have this command :

exec /sbin/set_immutable 1

Maybe someone can set to 0 ( # exec /sbin/set_immutable 0 ) to see what is happend ....

Thank you very much for your collaboration , and I'll await your response :highfive:

Edit :

Please , I need also to know your system and userdata partitions :

boot -> /dev/block/mmcblk0p17

recovery -> /dev/block/mmcblk0p18

system -> /dev/block/mmcblk0p??

userdata -> /dev/block/mmcblk0p??
 
Last edited:

olegusss

Senior Member
Nov 22, 2005
54
18
Moscow
P7-L00

Brightness Path =/sys/devices/platform/k3_fb.1/leds/lcd_backlight0/brightness

Yes

Mass Storage Path = /sys/class/android_usb/android0/f_mass_storage/lun/file

Yes

Battery Path = /sys/devices/platform/bq_bci_battery.1/power_supply/Battery

Yes
 

Attachments

  • cat-proc-partitions.jpg
    cat-proc-partitions.jpg
    73.7 KB · Views: 203
  • libs.zip
    349.7 KB · Views: 28
  • led.jpg
    led.jpg
    144.8 KB · Views: 200
  • battery.jpg
    battery.jpg
    147.4 KB · Views: 173
Last edited:
  • Like
Reactions: surdu_petru

surdu_petru

Recognized Contributor
Feb 3, 2010
6,943
22,857
Paris
Brightness Path =/sys/devices/platform/k3_fb.1/leds/lcd_backlight0/brightness

Yes

Mass Storage Path = /sys/class/android_usb/android0/f_mass_storage/lun/file

Yes

Battery Path = /sys/devices/platform/bq_bci_battery.1/power_supply/Battery

Yes


Thank you very, very much ! :good:

Edit :

Please, can you take a look into : /dev/block/platform/hi_mci.0/by-name... and tell me the right partition for system and userdata ?

/dev/block/platform/hi_mci.0/by-name/system -> mmcblk0p??

/dev/block/platform/hi_mci.0/by-name/userdata -> mmcblk0p??

I already know boot and recovery :

/dev/block/platform/hi_mci.0/by-name/boot -> mmcblk0p17

/dev/block/platform/hi_mci.0/by-name/recovery -> mmcblk0p18

Thanks again !

Re-Edit :

I think you will have :

/dev/block/platform/hi_mci.0/by-name/system -> mmcblk0p28

/dev/block/platform/hi_mci.0/by-name/userdata -> mmcblk0p30

/dev/block/platform/hi_mci.0/by-name/cust -> mmcblk0p29

But I need confirmation if this value is true !
 
Last edited:

XQC

Senior Member
Jul 24, 2010
106
45
I think you will have :

/dev/block/platform/hi_mci.0/by-name/system -> mmcblk0p28

/dev/block/platform/hi_mci.0/by-name/userdata -> mmcblk0p30

/dev/block/platform/hi_mci.0/by-name/cust -> mmcblk0p29

But I need confirmation if this value is true !

Confirmed (P7-L10)
 
Last edited:
  • Like
Reactions: surdu_petru

XQC

Senior Member
Jul 24, 2010
106
45
Also I can see you have a new service /sbin/set_immutable ... if someone can clarify me what could be ?

In your boot.img after mount /system you have this command :

exec /sbin/set_immutable 1

Maybe someone can set to 0 ( # exec /sbin/set_immutable 0 ) to see what is happend ....
In the /system folder there's a file called set_immutable.list - even if you rooted the device, it still prevents writing to system folders. E.g. you can't install Xposed.

Only if you delete / rename set_immutable.list on top of root you gain full writing access:
http://forum.xda-developers.com/showpost.php?p=53291974&postcount=200
 
Last edited:

surdu_petru

Recognized Contributor
Feb 3, 2010
6,943
22,857
Paris
In the /system folder there's a file called set_immutable.list - even if you rooted the device, it still prevents writing to system folders. E.g. you can't install Xposed.

Only if you delete / rename set_immutable.list on top of root you gain full writing access:
http://forum.xda-developers.com/showpost.php?p=53291974&postcount=200

OK, now I anderstand .... But why you not remove set_immutable binary from /sbin into boot.img - I think in this way there will no be any set_immutable.list in your /system - so you'll have no restrictions to mount /system ro/rw .

If you want to testin this way , let me to know and I'll make this change for you to test. Also I can enable /init.d into kernel.

Awaiting your request ....


Also thank you very much for all info about your device ... Today later I'll provide a test TWRP for P7.

Edit :

If you set set_immutable 0 , than you will be able to write into /system !

Code:
> adb shell
$ su
# exec /sbin/set_immutable 0
# exit
$ exit
 
Last edited:
  • Like
Reactions: olegusss

olegusss

Senior Member
Nov 22, 2005
54
18
Moscow
Please, can you take a look into : /dev/block/platform/hi_mci.0/by-name... and tell me the right partition for system and userdata ?
/dev/block/platform/hi_mci.0/by-name/system -> mmcblk0p??
/dev/block/platform/hi_mci.0/by-name/userdata -> mmcblk0p??
Can is not so actual. There simply was not time to get to the phone.




I think you will have :
/dev/block/platform/hi_mci.0/by-name/system -> mmcblk0p28
/dev/block/platform/hi_mci.0/by-name/userdata -> mmcblk0p30
/dev/block/platform/hi_mci.0/by-name/cust -> mmcblk0p29
But I need confirmation if this value is true !


Yes, You as always right ;)
 

Attachments

  • cust.jpg
    cust.jpg
    164.6 KB · Views: 99

surdu_petru

Recognized Contributor
Feb 3, 2010
6,943
22,857
Paris
Test TWRP !

Hello !

Test TWRP 2.7.1.0 for Huawei Ascend P7 .

At this time is recommended for P7-L10 .

Downloads :

Because is a beta test, please do not install :
  • if you are not accustomed to installing (flash) a custom kernel / recovery ;
  • if you don't know to put your device in bootloader mode by pressing hardware keys ( this require to put your device in bootloader mode
    in case your device will not boot after install this custom recovery - and to be able to flash stock recovery ) !
  • you are totally responsible, for your actions on your device - that's why I'm not respond in any way if something goes wrong ! -

Installations :
  • your bootloader device must be unlocked ;
  • put your device in bootloader mode -> ( adb reboot bootloader )
  • flash recovery.img -> ( fastboot flash recovery openrecovery-twrp.img )
  • reboot your device from bootloader mode -> ( fastboot reboot )


Revert to stock recovery :

  • download stock recovery.img for P7-L10 !
  • install stock recovery -> ( fastboot flash recovery recovery.img )


You can go in TWRP recovery in the same way like into stock recovery or ( > adb reboot recovery ) !


First, please report if your device boot in TWRP recovery , and than the rest of issues !



Best regards !
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    Test TWRP !

    Hello !

    Test TWRP 2.7.1.0 for Huawei Ascend P7 .

    At this time is recommended for P7-L10 .

    Downloads :

    Because is a beta test, please do not install :
    • if you are not accustomed to installing (flash) a custom kernel / recovery ;
    • if you don't know to put your device in bootloader mode by pressing hardware keys ( this require to put your device in bootloader mode
      in case your device will not boot after install this custom recovery - and to be able to flash stock recovery ) !
    • you are totally responsible, for your actions on your device - that's why I'm not respond in any way if something goes wrong ! -

    Installations :
    • your bootloader device must be unlocked ;
    • put your device in bootloader mode -> ( adb reboot bootloader )
    • flash recovery.img -> ( fastboot flash recovery openrecovery-twrp.img )
    • reboot your device from bootloader mode -> ( fastboot reboot )


    Revert to stock recovery :

    • download stock recovery.img for P7-L10 !
    • install stock recovery -> ( fastboot flash recovery recovery.img )


    You can go in TWRP recovery in the same way like into stock recovery or ( > adb reboot recovery ) !


    First, please report if your device boot in TWRP recovery , and than the rest of issues !



    Best regards !
    6
    Hello everybody !


    TWRP 2.7.1.0 for ascend P7

    *** Working In Progress ***


    Open this new thread in the hope that you can help me in achieving TWRP for your P7 .

    First of all, I have not this device currently - so, your help is welcome :good:

    I will post here ( soon ) a list of the required - to be able to start building TWRP .


    This stuff are required from your P7 device :
    • your international model : ( example Ascend P6 -> P6-U06 ) :
    • if your device can be unlocked ? ( bootloader unlocked )
    • build.prop ;
    • stock boot.img
    • stock recovery.img
    • screenshoots with CPU-Z !
    • more stuff will be added later ;


    Please keep this thread clean, and on topic - in this way, it will be much easier to find the information needed !

    Thank you very much for your cooperation !


    Best regards !
    3
    How extract stock boot.img and recovery.img :

    - root your device ;

    > adb shell
    $ su
    # dd if =/dev/block/mmcblk0pX1 of=/storage/sdcard0/boot.img ( extract boot.img on internal storage )
    # dd if=/dev/block/mmcblk0px2 of=/storage/sdcard0/recovery.img ( extract recovery.img on internal storage )
    # exit
    $ exit
    > adb pull /storage/sdcard0/boot.img ( extract boot.img from your device on your PC )
    > adb pull /storage/sdcard0/recovery.img ( extract recovery.img from your device on your PC )


    How you can determainate partition mmcblk0pX1 for boot :

    > navigate in your device : /dev/block/platform/xxx.1 or xxx.2/by-name/ here you will be able to see :

    Example :
    boot
    07 Jul 14 06:01:00 rwxrwxrwx -> mmcblk0p42

    So , mmcblk0pX1 will be in this case -> mmcblk0p42 !

    Please follow the same way for determinate partition mmcblk0pX2 for recovery !
    3
    Hi,
    I hope that I can help you.

    My model is P7-L10, bought in Germany

    I extracted boot.img, recovery.img and recovery2.img (in case if it's of any use) from mmcblk0p17, 18 and 19. Also included is the /system/build.prop:
    https://mega.co.nz/#!P8IGWBpL!7YVCaAoc8AYFbbXGVVjGtjnL0B9jBih9h35qqX4lIpg

    Here are screenshot of CPU-Z:

    UeLQ0KR.jpg


    22kt02H.jpg
    2
    Chinese recovery

    This one according with Chinese sites is for model P7-00. This is the model I own.
    I have seen CWM also for 05 and 07. Not sure if are the same.
    I am in CH and I can give you all they have posted for this phone.
    Sanatate.... ;)