yashsingh1/xdaforums huggingface dataset:
[Huawei Ascend XT Questions & Answers] scrungydoolittle:
So the twrp works well enough to backup and restore partitions, flash zips, and provide a su shell, and run a terminal?

everyone says that it is not a working twrp, but you are the first to specifcally state what isn't working.

My boss tells me a story whenever he thinks I'm spending to much time chasing code. There is an engineer and a physicist sitting at a bar. There is a really

attractive girl a bit further down the bar. The engineer asks the physicist, if you cut the distance to the girl in half, and kept doing that, when would you reach the girl. The physicist says "Never", and the engineer says "7 times is enough for all practical purposes." So if TWRP is working well enough to backup and restore partitions, give a super user shell, run a terminal and flash files, and root the phone, it seems to me that would fill my needs...

Now as to blobs, I'd bet that if the erecovery could be extracted to a set of disk files, a bit of hunting with a text editor would turn up enough strings to give a good clue....

I really hate the fact that the jtag ports aren't defined or identified anywhere on these phones. I could attach a jtag debugger, and hook running processes with it.

So we do have an erecovery image. I wish I knew how to unpack it into a hard disk directory.

---------- Post added at 05:51 PM ---------- Previous post was at 05:20 PM ----------

Just to add a comment, according to the partitions list posted,

keymaster /dev/block/mmcblk0p14 256 blocks

keymasterbak /dev/block/mmcblk0p18 256 blocks

and keystore /dev/block/mmcblk0p40 512 blocks

would references to these be in the encrypt/decrypt blobs?

You can almost be certain that these are involved with data decryption....
[Huawei Ascend XT Questions & Answers] enigma2446:
Thus might help:

https://play.google.com/store/apps/details?id=ma.wanam.partitions
[Huawei Ascend XT Questions & Answers] aslezak:
I would expect the key to decrypting /data lies in init.recovery.huawei.rc (in the erecovery.img). You can extract this from the ramdisk folder using Android Image Kitchen.

on property:vold.status=start
exec /system/bin/vdc --wait cryptfs enablefilecrypto
init_user0
unlock_user0_key
setprop vold.status end

I can boot yuweng's TWRP, replacing with stock init and stock /system. /system/bin/vdc isn't in there. It is likely that with careful disection of the init* files one could figure out how to get /data encryption working...
[Huawei Ascend XT Questions & Answers] faxanidu:
Hey guys been working then got sick, then ice storm lol. I'm back now
[Huawei Ascend XT Questions & Answers] crashburn833:
welcome back
[Huawei Ascend XT Questions & Answers] scrungydoolittle:
That dump is nice. I'm betting that one could disable data encryption all together, by removing certain items in the .rc file?
[Huawei Ascend XT Questions & Answers] aslezak:
I believe [MENTION=3586289]faxanidu[/MENTION] may be working on that.

Update: I've been able to compile a working TWRP (entirely from source), thanks to help from [MENTION=4478781]yuweng[/MENTION]

I am going to mess with the ramdisk contents & see if I can get the encryption working.
[Huawei Ascend XT Questions & Answers] scrungydoolittle:
BRAVO.
[Huawei Ascend XT Questions & Answers] scrungydoolittle:
I sent you a p.m.
[Huawei Ascend XT Questions & Answers] aslezak:
Guide to porting TWRP to Ascend XT2

Attached is a guide for porting TWRP to our device. This is the exact procedure I followed to get a bootable TWRP.

Props to [MENTION=4478781]yuweng[/MENTION] for his help on this.

I've also attached a new TWRP device tree for our Huawei Ascend XT2 device. I need to get with deestroy to get our device added officially into TWRP!

Sidenote: no luck getting encryption working... may need to beg for help from [MENTION=4960686]OldDroid[/MENTION] or [MENTION=220328]paulobrien[/MENTION] :fingers-crossed:
[Huawei Ascend XT Questions & Answers] scrungydoolittle:
o.k. Where is the downloadable TWRP?

---------- Post added at 03:04 PM ---------- Previous post was at 03:02 PM ----------

Any chance of getting the full source tree?

O.k. I went to tingichen git hub, however there are 6 recoveries listed. Which one applies?

https://github.com/TingyiChen

android_device_xiaomi_santoni-twrp

android_kernel_xiaomi_msm8937

android_kernel_lenovo_wt86528

device_xiaomi_vince

android_device_xiaomi_markw-twrp

android_device_lenovo_wt86528

When I go to the hwawei page, the screen goes into a loop. Jumping up and down. Totally can't access it....either in Chrome or Firefox. Weirdest thing I've ever seen.

In explorer the screen is sort of stable, but the text keeps jumping between different fonts, with no search results, and no ability to enter anything in the search window, and the little circle is just madly spinning?
[Huawei Ascend XT Questions & Answers] crashburn833:
well I got the pixel 2 Xl guess I am done with this phone I will be in that forum guys peace☮️?
[Huawei Ascend XT Questions & Answers] aslezak:
Thanks [MENTION=2958278]crashburn833[/MENTION]

I also bought a Moto Z2 Force and a G5 Plus so am about to check out as well.

Re: Tingychen TWRP recovery.img, you want the santoni one..
[Huawei Ascend XT Questions & Answers] ChrisJP23:
Before this thread dies....

I've been following this thread for a while now, but would like to clear things up before all main actors disappears from the scene:

#1: Is it possible to root the phone even if the bootloader is locked (I have the Elate/Cricket version)?

There's a post here but it look quite old...

https://xdaforums.com/huawei-ascend-xt/help/huawei-ascend-xt2-h1711-t3689411/post75115521#post75115521

#2: Can we unlock the bootloader?

Thanks for direction...and for all the effort
[Huawei Ascend XT Questions & Answers] scrungydoolittle:
The boot loader can be unlocked. Huawei has an unlock page.

https://hwid5.vmall.com/CAS/portal/...ndex&loginChannel=22000000&reqClientType=2023

Basically, you create an account, click on unlock the bootloader, enter the information and it will give you an unlock key. Fast and easy.
[Huawei Ascend XT Questions & Answers] ChrisJP23:
Well, I got an unlock code (alphanumeric) but the keyboard on the phone screen only allow me to enter numerical value..

Try to toggle keyboard and keyboard page but no access to alphabet...

Obviously, I'm doing something wrong...and it's probably very lame...

Help appreciated :o
[Huawei Ascend XT Questions & Answers] scrungydoolittle:
[/COLOR]

The bootloader unlock unlocks the boot loader.

You have to enable bootloader unlock in the settings menu (you first need to get developer mode)

to do that , go to settimgs, about phone, then find the build number tap on it 7 times, and it will enable developer settings in the settings window. go back to settings and near the bottom of the settings menu, will be a new entry developer options.

In this menu, you should see enable OEM unlock. Make sure that is turned on. Then scroll down and turn usb debugging on.

Then you have to connect the phone to a computer with a usb cable and run fastboot. Here is a good tutorial

https://www.howtogeek.com/239798/how-to-unlock-your-android-phones-bootloader-the-official-way/

There are many others. But once you have the bootloader unlock, you have to run fastboot and do the following:

NOTE:XXXX... means enter the unlock code. NOTE: this WILL wipe the phone, so if you have any data like pictures, etc, be sure and copy them to an external

flash if the phone supports that, or use abd and pull the data onto a PC. Again, google the use of adb and adb pull and adb push.

once you have fastboot running, then:

fastboot oem unlock XXXX...

So for example,

fastboot oem unlock 2ML26HV937ZY**** [NOTE: i replaced the last 4 characters of the actual unlock code with *'s. You enter the ENTIRE unlock code that you

got off the Hauwei unlock page. This unlocks the bootloader on my H1711. When you do that, the data partition is wiped out. I found that out the hard way.....

---------- Post added 30th January 2018 at 12:12 AM ---------- Previous post was 29th January 2018 at 11:49 PM ----------

Is it possible to run a gui file manager from the TWRP terminal, that can be used to modify files in the rom?

Not good with command line editors. Would love to be able to run total commander from the TWRP terminal and have it function.

Is there a way to do that?

yes, it is a noobie question, even though I have been here for a while.
[Huawei Ascend XT Questions & Answers] freedomwarrior:
Thank you so much for this. It worked perfectly! The only issue I got is AdAway wont recognize it as rooted but other apps such as titanium backup, rom toolbox and root checker work just fine.

I just sent a thank you your way. Cheers!

---------- Post added at 07:55 PM ---------- Previous post was at 07:49 PM ----------

I have a question for anybody that knows... After I rooted my phone, should I relock the bootloader? or do I need to keep it unlocked in order to keep root and the TWRP recovery??
[Huawei Ascend XT Questions & Answers] ChrisJP23:
Thanks for the tuto, I was able to complete the process.

And now, I understand that unlocking bootloader doesn't mean SIM free
[Huawei Ascend XT Questions & Answers] scrungydoolittle:
correct. For that you will have to be on ATT or Cricket for 6 months, and then ask them to unlock it, or else pays someone to unlock it.

That being said, I think the magisk root has some issues. I cannot remount partitions, even though I get a root prompt.

mount -o rw,remount /system says system is not in /proc/mounts. same thing when I attempt to remount mmcblk0p61

I'm probably doing something wrong, and really need to get the system mounted rw and preferably the rootfs mounted rw.

can anyone tell me how to do this?
[Huawei Ascend XT Questions & Answers] aslezak:
Make sure in your terminal you type "su" first and approve the Allow root prompt from Magisk.

type 'id' to make sure you have actually become the root user

If your mount command still doesn't work, you can try this:

mount -o remount,rw /dev/block/bootdevice/by-name/system /system

Or, you can do whatever you need from the TWRP / Advanced / Terminal.
[Huawei Ascend XT Questions & Answers] scrungydoolittle:
id returns uid=0(root) gid=0(root) group=0(root) context=u:r:su:s0

When I do

mount -o remount,rw /dev/block/bootdevice/by-name/system /system

I get mount: 'mount -o remount,rw /dev/block/bootdevice/by-name/system /system'->'/system': device or resource busy

In addition, now , the settings menu does not work.

Enigma says that he has narrowed the proc/mount error downn to an improper device tree for the TWRP.

So now. I have a boot.img that should be the stock firmware, right? and a patched boot.img that has magisk installed.

at this point, I think I want to revert to stock, then install phh super user. Can someone walk me through that?

I think that even from within TWRP, it is not possible to make changes to the system and have it stick through reboot.

Meanwhile, I need to get my settings back...

---------- Post added at 05:56 PM ---------- Previous post was at 05:51 PM ----------

I tried

18

down vote

accepted

am start -a android.settings.SETTINGS

from the terminal super user shell, using jacterm and it just flashes up the white screen and comes back.

starting: Intent {act=android.settings.SETTINGS }

after that.
[Huawei Ascend XT Questions & Answers] aslezak:
I am not sure if you can modify /system on a booted phone. I don't think there's any issues with the device tree because TWRP.fstab is using bootdevice/by-name and not the actual block device names. The only issue is encrypted data which works from a booted phone but not inside TWRP. The reason a flashed zip update (sometimes) works inside TWRP is because it unmounts /data before flashing, and it copies the files unencrypted.

To restore stock boot you just fastboot flash boot boot.img (I provided on the system Download folder and also posted in my Root! post).

Hope this helps.
[Huawei Ascend XT Questions & Answers] scrungydoolittle:
If I go into adb, then shell then su

and enter mount -o remount,rw /dev/block/bootdevice/by-name/system /system

I get mount:'/system' not in /proc/mounts

went to proc

cat mounts and see

rootfs / rootfs ro,seclabel,size... etc.

Try

mount -o remount,rw /dev/block/bootdevice/by-name/rootfs /rootfs and get the same message

I see

/dev/block/bootdevice/by-name/system /system ext4 ro,seclabel,relatime,discard,data=ordered 0 0

so it should have recognized the first item.

This is in the adb shell....

Clearly there is some issue here. I certainly would like to get it worked out.
[Huawei Ascend XT Questions & Answers] kyva1929:
I've remounted partitions for a different phone as root, but the effect is only visible to root session itself i.e. other apps running as a different user do not see the changed mounts. This was because of a feature called namespace isolation - processes inherit mount namespace when they are first created but if their parent process mounts gets updated the change is not propagated. There are command line utils on a proper full linux distro to propagate the changes but its not available for android so you would need to build it yourself.

---------- Post added at 12:14 AM ---------- Previous post was at 12:13 AM ----------

I've remounted partitions for a different phone as root, but the effect is only visible to root session itself i.e. other apps running as a different user do not see the changed mounts. This was because of a feature called namespace isolation - processes inherit mount namespace when they are first created but if their parent process mounts gets updated the change is not propagated. There are command line utils on a proper full linux distro to propagate the changes but its not available for android so you would need to build it yourself.
[Huawei Ascend XT Questions & Answers] scrungydoolittle:
Well it won't even do it in a root shell prompt.

For example, I am in an adb root shell at the moment, and I do:

mount -o remount,rw /dev/block/bootdevice/by-name/system /system

I get mount: '/dev/block/bootdevice/by-name/system'->' /system': deivice or resource busy

And in in jackpal terminal, do a su, and get a root prompt. and do exactly the same thing, (this is magisk root)

I get mount: '/system' not in /proc/mounts. If I go look at that, it clearly is not. But there are other folders that are, so I try this with a folder

that I know is in /proc/mounts and it gives me the same error.

I don't know what it will do in a twrp terminal, I shall have to try that, but when you are in twrp system is basically empty. Just one file, so I know it is not looking at the main system roms.
[Huawei Ascend XT Questions & Answers] aslezak:
In a twrp terminal, you just have to mount /system then make whatever changes you want, then remount it ro once completed.

You'll probably have to mkdir /mnt/system; mount /dev/block/bootdevice/by-name/system /mnt/system
[Huawei Ascend XT Questions & Answers] scrungydoolittle:
Why

so I booted into TWRP, went to terminal and did mkdir /mnt/sysem that worked, but this

mount /dev/block/bootdevice/by-name/system /mnt/system as typed in, just gave me the help screen for mount....

mount -o remount,rw /system /mnt/system gave mount: mounting /system on /mnt/system failed: invalid argument

went into twrp file manager an attempted to move /system/priv-app/facebook_installer/facebook_installer.apk to external_sd.Android >>> process ended with ERROR 1. Does that mean that system is still ro, and how can I determine that.

Tried moving facebookinstaller directory, with the same result. I was able to chmod it, and rename ot. but move does not work.

yet when I exit out of all of that, and go to external_sd/androic, it shows facebook_installer.apk to be there.

and in the second try, looking external_sd/Android/facebook_installer i see the renamed apk and oat. So it looks like it

COPIED it, but could not delete it from system.

I need a step by step tut on how to move facebook_installer OUT of system, and onto the external sd card, so if I want to, I can move it back to system....

There are a number of applications I want off of the phone to free up rom space, but be able to keep them so they can be re-installed....
[Huawei Ascend XT Questions & Answers] aslezak:
In twrp, it's definitely in root mode. Not sure if you mistyped, but you can't change the mount point in a remount command.

What I would do is this:

copy all the .apk files you intend to delete to the external sd card

use pm (package manager) to remove the packages. Even though this link says "without root," root is still required for certain cases. Instructions still apply...

Doing this via rm is dangerous! Don't do it.
[Huawei Ascend XT Questions & Answers] divineBliss:
[MENTION=8314364]scrungydoolittle[/MENTION],

How much space will removing apks from /system save and how do you plan to use any free space created in /system ?
[Huawei Ascend XT Questions & Answers] Harrison85:
Does anyone have the boot.img for the elate?
[Huawei Ascend XT Questions & Answers] scrungydoolittle:
should be the wame as the

h1711
[Huawei Ascend XT Questions & Answers] Harrison85:
It is most definitely different, the firmware is different with so many options etc in settings most never seen before and my old ones from cricket version is gone.
[Huawei Ascend XT Questions & Answers] ChrisJP23:
I have an Elate but I have since then unlocked the bootloader and root it according to this post

https://xdaforums.com/huawei-ascend-xt/help/huawei-ascend-xt2-h1711-t3689411/post75115521#post75115521.

If you think I can still help you, let me know how.
[Huawei Ascend XT Questions & Answers] Harrison85:
If you don't mind Post a screen shot of settings - more. And see if it looks like this.
[Huawei Ascend XT Questions & Answers] ChrisJP23:
Here it is...

I haven't been able to activate the phone since I'm not in US

https://imgur.com/a/neoMR
[Huawei Ascend XT Questions & Answers] Harrison85:
Wow mine is so much different. I think somewhere I got different firmware installed. But I have tried everything including the boot.img on these posts and it stays the same.
[Huawei Ascend XT Questions & Answers] ChrisJP23:
You might have additional feature because yours is actually activated on Cricket Communications?

I cannot activate mine
[Huawei Ascend XT Questions & Answers] scrungydoolittle:
Not sure how much space it will save, but there are a lot of useless things there, and I want to be able to MODIFY init files and shell

scripts that run automatically.

As to what I would do with the extra space? Install some aps there,

---------- Post added at 12:28 PM ---------- Previous post was at 12:25 PM ----------

So what happens if /system is already mounted in /mnt? And I don't want it remounted ro. I want it PERMATENTLY mounted RW, even through complete power down and reboot.

I got an error when I tried that....
[Huawei Ascend XT Questions & Answers] Harrison85:
I wish that was it, but it was activated since the day it came out , only changed when I rooted, the firmware is completely different. Do you know how to pull your boot.img or did you do a twrp backup you could upload so I could try?
[Huawei Ascend XT Questions & Answers] scrungydoolittle:
When I try pm from an adb shell while twrp is runing, it says

CANNOT LINK EXECUTABLE "app-process": "/sbin/libcutils.so" is 64 bit instead of 32 bit Aborted.
[Huawei Ascend XT Questions & Answers] ChrisJP23:
Sorry, no specific knowledge of adb or twrp.

I can do if you provide me with instruction...
[Huawei Ascend XT Questions & Answers] divineBliss:
If you are really interested in adb and don't already have it installed:

https://www.xda-developers.com/install-adb-windows-macos-linux/

---------- Post added at 05:09 PM ---------- Previous post was at 05:06 PM ----------

Will be interested to hear if you have success with saving any significant space in /system . I've never tried as it doesn't seem worth the hassle and risk, but possibly I'll learn something from your experience :) .
[Huawei Ascend XT Questions & Answers] ChrisJP23:
Thanks but I'm not into modding phone so no real interest to master adb.

My intention is only to help [MENTION=2736759]Harrison85[/MENTION] to get the Elate boot.img he is looking for, so I proposed to extract and upload it as long as he (or someone else) provide the instructions using either adb or twrp.

I have adb installed as it was necessary to unlock the bootloader.
[Huawei Ascend XT Questions & Answers] divineBliss:
That's quite understandable - not wanting to mod your phone.

I don't think you can get the boot.img without root or flashing TWRP. If I'm wrong, someone will chime in.

Okay, now I remember why you wanted to unlock your bootloader.
[Huawei Ascend XT Questions & Answers] ChrisJP23:
All I've done is unlock the bootloader and root the phone according to this thread:

https://xdaforums.com/huawei-ascend...-xt2-h1711-t3689411/post75115521#post75115521

So I have flashed twrp as well.

I'd like to extract my phone (Elate) boot.img for Harrison85, but then could it that the boot.img is now exactly the same as the patched_boot.zip from the thread above?

If so no need for me to extract it...
[Huawei Ascend XT Questions & Answers] divineBliss:
Sounds correct to me.
[Huawei Ascend XT Questions & Answers] Harrison85:
Problem is with the patched is that is what I used. And yet my firmware is completely different?
[Huawei Ascend XT Questions & Answers] Harrison85:
ok think i figured it out as to why its so different, i bricked it at one point, and used [MENTION=2958278]crashburn833[/MENTION] fix brick method, maybe thats why the firmware to me (being not the cricket version) is so different, wondering if infact it is booting using the system.img of the XT2 variant not the elate.

---------- Post added at 06:45 PM ---------- Previous post was at 06:25 PM ----------

so if someone could please give directions to [MENTION=8898971]ChrisJP23[/MENTION] to be able to extract is system.img.bz2 that would be awesome. or the update.app file where i can extract the system.img myself
[Huawei Ascend XT Questions & Answers] scrungydoolittle:
Where is the link for crashburn833 unbrick method?

I still can't get pm to work, because of the 32bit vs 64 bit problem.

That being said, can someone give me the directions for actually mounting the rootfs as rw?

i.e. '/' that is what I want to accomplish at the moment.
[Huawei Ascend XT Questions & Answers] Harrison85:
https://xdaforums.com/huawei-ascend-xt/help/huawei-ascend-xt2-stock-image-fix-brick-t3736925

this is the only thing i did different, and that was to use this to unbrick, so now if im right i need the Elate cricket version system.img to be able to get back to Crickets version, not ATT XT2 version.
[Huawei Ascend XT Questions & Answers] scrungydoolittle:
yes, you have the AT&T version.

Interestingly enough, there are two cricket files embedded in it.

in system/priv-app there is a folder labled myCricket, and in there, is a myCricket.apk, there is also a CricketWiFiManager

/vendor/bin is also an interesting folder.
[Huawei Ascend XT Questions & Answers] Harrison85:
Yeah because once it boots it asks for the permissions for those apps. but the firmware itself isnt the original cricket one, its the xt2. so i am trying to find a guide on how to pull system.img.bz2 or the update.app (which i think contains the system.img) from [MENTION=8898971]ChrisJP23[/MENTION] elate version which is still running the original firmware just rooted etc. upon unbricking mine it overwrote the cricket version to be able to unbrick.
[Huawei Ascend XT Questions & Answers] aslezak:
To create the system.img.bz2 backup:

make sure you have an external SD card in the phone

boot into TWRP (adb reboot recovery or the vol+ + Power while USB unplugged to power on)

Advanced / Terminal

dd if=/dev/block/bootdevice/by-name/system | bzip2 -9f > /external_sd/system.img.bz2

To restore the system.img.bz2 backup:

bzip2 -dc /external_sd/system.img.bz2 | dd of=/dev/block/bootdevice/by-name/system
[Huawei Ascend XT Questions & Answers] Harrison85:
[MENTION=8898971]ChrisJP23[/MENTION]