yashsingh1/xdaforums huggingface dataset:
[Huawei Ascend XT Questions & Answers] madvane20:
This backup is b130 stock, once i get update to work i will post stock b140 and b150

The backup contians system,recovery and boot data is empty like a factory restore. I made a debloated backup with root in my other thread its also b130 https://xdaforums.com/android/development/-t3546850

Here is the stock backup you will find guide below which will tell you how to restore it.. You need to download the backup first to proceed :)https://drive.google.com/file/d/0Bx88t3CJrNjoSkYwZUlHTmEzMW8/view?usp=sharing b1.30

if you do not want to mess with cust skip to step 5

how to backup and restore cust partition

1.load twrp recovery on you phone. then goto your adb folder and hold shift then right click, there will be an option says open command window here click on that, once you have the command window open type adb shell and press enter, then type su

once u have root or aka su, copy and paste this command unless u wanna type it:)dd if=/dev/block/mmcblk0p23 of=/sdcard/cust.img

2. once the first steps are done now u can pull the cust partition to ur phone by using command adb pull /sdcard/cust.img it will send the backup to ur adb directory.

3. you can verify that it pulled the backup image by going to adb directory where u launched command window from.

4.to restore a stock cust partition links and guide down below flashable in twrp.

5.after the file is downloaded and you have extracted files proceed to next step.

6. goto TWRP\BACKUPS\serial\ replace with your serial number then proceed.

7. once you have done that u can copy to sdcard use usb cord to copy the files over, or wireless what ever method u choose

8. if you are not in twrp recovery yet, boot to twrp now so u can flash the backup. if you did everything right when u goto restore the backup should be listed.

9. now you can restore the back

ps im not responsible if u mess things up or brick you phone do at your own risk.

be nice if someone fixes twrp and ads the ability to backup and restore cust and other partitions.

Im going to try port twrp 6 i think it is first time so may be awhile. if someone else releases a fixed version then were good to go

This is Complete stock cust none modified for b130, if you modified you cust partition by deleting files. k heres flashable twrp with mirror clsA https://www.androidfilehost.com/?fid=745425885120705728and heres a mirror if first link dont work

https://drive.google.com/open?id=0Bx88t3CJrNjoaFNqTE5rbEZuc1E

1. open twrp recovery make sure the flashable zip is on sdcard.

2. click install select the file you put on sdcard swipe let it finish and you are done:)

Please feel free to ask question if u need help also hit the thanks button if this guide was helpful thank you.

md5 A522D2F7274E4FF0FCCB6CACA8DD4827 use http://onlinemd5.com/ to check the stock.rar

another stock backup hopefully the super su folder is gone https://drive.google.com/open?id=0Bx88t3CJrNjoSVU4SkhlY0x1aVk
[Huawei Ascend XT Questions & Answers] dabadguycr:
I'm sure this will help out some people, you are a good person!
[Huawei Ascend XT Questions & Answers] madvane20:
ty
[Huawei Ascend XT Questions & Answers] aedelman24:
please reupload file, i need the backup
[Huawei Ascend XT Questions & Answers] madvane20:
also post if it works for ya and hit that thanks button
[Huawei Ascend XT Questions & Answers] jilebi:
Great job, [MENTION=7934375]madvane20[/MENTION]! Just a suggestion to put the version number in the file name e.g. B130, B140, etc. to help keep it organized, as new versions are released.

Does this stock have all stock partitions including modem, etc?

---------- Post added at 04:42 AM ---------- Previous post was at 04:33 AM ----------

FYI, the rar file has any error when opening it. Can you verify/test it for CRC/checksum and then repost? Thanks!
[Huawei Ascend XT Questions & Answers] dabadguycr:
Does your stock recovery have Cust?
[Huawei Ascend XT Questions & Answers] madvane20:
should be all stock recovery and all was my original stock backup only thing different is the formated data partition but that just makes it stock as if u did a factory recovery. it has all stock bloat apps if thats what ur asking bout cust[MENTION=4395586]jilebi[/MENTION] if it has errors u might of got corrupt download. someone else posted it fixed their device. for those it worked for please post to let people know that it worked how long it might of took etc. and if u took any extra steps i didnt mention. might of misread or not understood what u were saying bout the crc . thought u were saying it had crc errors when extracting. i will see about get a crc value
[Huawei Ascend XT Questions & Answers] divineBliss:
If it's a TWRP recovery made using the one and only XT TWRP version we have, it doesn't have the cust partition backup because TWRP doesn't have the option to backup that partition :( .
[Huawei Ascend XT Questions & Answers] madvane20:
hmm well i dunno if i modded mine or not but i can dump the partiton as a img that can flashed with fastboot while i learn to compile the twrp for out phone or add support for that cust folder. we need someone who only has twrp and rooted to dump there cust partition in adb shell at least for now im not sure if i removed stuff from mine or not i thought it was restored with the system. does it not restore the files deleted in cust partition with my backup if not well yea til we can get someone to dump that partition or do a complete os dump with all partitions i guess it wont be 100% stock but as close as we can get. i didnt think of dumping all partitions til one person who asked for system etc cause i thought twrp was gonna get them all in the backup
[Huawei Ascend XT Questions & Answers] divineBliss:
madvane20,

How could a backup without the cust partition restore anything to that partition? It's just not possible :) .
[Huawei Ascend XT Questions & Answers] madvane20:
if it was in system partition bout mounted virtually as a partition something to that aspect
[Huawei Ascend XT Questions & Answers] divineBliss:
Nope, cust is a real physical partition.
[Huawei Ascend XT Questions & Answers] madvane20:
i was stating in general im gonna see if i cant add the ability to allow backup of cust in twrp and have someone who hasnt modified it to dump it for us
[Huawei Ascend XT Questions & Answers] jilebi:
Good idea, [MENTION=7934375]madvane20[/MENTION]! Do you have access to the source code of TWRP for Acend XT, for you to change it to take backup of cust and other partitions?
[Huawei Ascend XT Questions & Answers] madvane20:
no however im gonna see if i cant compile twrp 6 if i can
[Huawei Ascend XT Questions & Answers] dabadguycr:
I'm sorry about my post. It said in the OP that it's only system, recovery, and boot. I need to stop posting before I got to sleep lol
[Huawei Ascend XT Questions & Answers] madvane20:
its ok ill dump my cust partition for those who wanna fastboot flash it i dunno if i modified it or not
[Huawei Ascend XT Questions & Answers] divineBliss:
And quote what you are replying to ...... otherwise you see what happens :) .
[Huawei Ascend XT Questions & Answers] madvane20:
k to who ever need info to backup their cust partition and as well how to test.i have also uploaded my cust partition. dunno if i modified it but my phone works great

[MENTION=6822212]dabadguycr[/MENTION] [MENTION=6065620]divineBliss[/MENTION]
[Huawei Ascend XT Questions & Answers] dabadguycr:
I'm going to see what happens without it first. I'm just testing some things out. I'm going to restore my Rooted with SuperU back up including system to see what happens.
[Huawei Ascend XT Questions & Answers] divineBliss:
madvane20,

I would recommend that you rename all your shared backups to include B130, 140, 150 etc in the filename and avoid using spaces in filenames, please.
[Huawei Ascend XT Questions & Answers] madvane20:
just a question not being rude in anyway how come u always have to post after i edit or post something? just asking seems to be the case yes i will fix it all with time im working on my phone atm so i will fix it up soon had issues trying to flash the cust so im extracting it then just gonna copy all the files over into the cust partition im also still sick atm just trying to be helpful and not focus on being sick
[Huawei Ascend XT Questions & Answers] divineBliss:
Strange question? Is there something wrong with posting a response when I want to? Some delay protocol I'm not aware of? Should you not read my response until an hour after I post it ;) ?
[Huawei Ascend XT Questions & Answers] madvane20:
i dont have time to discuss Symantecs i didnt say you were not aloud, i didnt say it was against the rules, it was a just a simple question. i was curious to why you did is all. wasnt anything wrong with the question and i find your answer to be antagonistic. so i will just ignore any posts if they are not helpful for now on.
[Huawei Ascend XT Questions & Answers] divineBliss:
Could someone translate this to plain English for me ;) ?
[Huawei Ascend XT Questions & Answers] madvane20:
to all it may concern please only posts questions or helpful posts thank you
[Huawei Ascend XT Questions & Answers] clsA:
LOL I think he's saying get off my a** I'm having a bad day

fastboot flash cust doesn't work

you have to boot TWRP and adb shell flash the cust.img

D:\fastboot>adb shell
~ # ←[6n[COLOR="Red"]dd if=/external_sd/custPartition.img of=/dev/block/mmcblk0p23[/COLOR]
dd if=/external_sd/custPartition.img of=/dev/block/mmcblk0p23
1048576+0 records in
1048576+0 records out
536870912 bytes (512.0MB) copied, 89.883786 seconds, 5.7MB/s
~ # ←[6n
[Huawei Ascend XT Questions & Answers] clsA:
[MENTION=7934375]madvane20[/MENTION]

Here you go man I made a TWRP flashable copy of the "Stock" /cust directory

https://www.androidfilehost.com/?fid=745425885120705728
[Huawei Ascend XT Questions & Answers] madvane20:
oh i have complete stock i dumped it off someones phone then i debloated thier phone with teamviewer but i will compare images im gonna add that part to my guide is that ok
[Huawei Ascend XT Questions & Answers] madvane20:
eh im sick and they were making me have a worse day
[Huawei Ascend XT Questions & Answers] divineBliss:
Don't post when you are sick :) . You"ll spread it.
[Huawei Ascend XT Questions & Answers] madvane20:
why not share "sharing is caring" lol :) i added a guide . as well it has both stock cust images his and my backup
[Huawei Ascend XT Questions & Answers] madvane20:
does guide for it all look good to you or should i add images?
[Huawei Ascend XT Questions & Answers] clsA:
your flashable zip and cust folder are identical to mine

no need to post both it's just confusing

what you could do is build an actual Rom that restores everything (Stock system / boot / recovery / and cust) all in one go
[Huawei Ascend XT Questions & Answers] madvane20:
k lol well then they are both stock then well i can say mirror here?
[Huawei Ascend XT Questions & Answers] madvane20:
ok modified it we should make a flashable zip that will backup the cust partition
[Huawei Ascend XT Questions & Answers] clsA:
your Stock.rar is corrupt and will not open
[Huawei Ascend XT Questions & Answers] divineBliss:
[MENTION=2895182]clsA[/MENTION],

How much do you pay the site where you host your files? I like that they do checksums to flag you on download errors for people who pay attention to that stuff.
[Huawei Ascend XT Questions & Answers] clsA:
it's a Free service for Developers

I have donated a couple of times but nothing is required
[Huawei Ascend XT Questions & Answers] madvane20:
wasnt corrupt before cause aedelman24 restored their phone with it i will download the file i uploaded and see what it says. it opened fine in winrar now im going to try restore it. u must of got a corrupt download extracted fine for me and restored fine i re downloaded to make sure
[Huawei Ascend XT Questions & Answers] clsA:
OK Something is going on

I have downloaded it 3 times and everytime the same results

Figured it out .. Had to reinstall a new version of Winrar
[Huawei Ascend XT Questions & Answers] madvane20:
lol how old of a version did u have? i used rar5 for compression and used 1gb of ram to compress. i added that md5 for reference and the site to check the downloaded file to make sure its not corrupt.
[Huawei Ascend XT Questions & Answers] clsA:
Even better your stock backup boots

No idea what happened to mine but

I need to delete them. They don't boot.

Looked for updates about 10 times and found nothing. (Changed the date)
[Huawei Ascend XT Questions & Answers] madvane20:
least my stock backup helped ya
[Huawei Ascend XT Questions & Answers] dabadguycr:
I think I see a problem. After I used your stock recovery I notice a file called superuser inside the file manager inside TWRP. Do you think that file being there is causing these problems?

I tried to pull the files to my SD card but it failed. It just created the names of the files.
[Huawei Ascend XT Questions & Answers] clsA:
yes I believe so ..but for some reason my SWAP is still reading 0

I tried to update but it doesn't find anything.

I also posted a method to flash the update.app but it's not a "true Update" the files in system and cust don't get patched if you force the update.app install. Also TWRP will not flash the update.zip :(
[Huawei Ascend XT Questions & Answers] dabadguycr:
I had to change the date 3 times to find the update to download it.

I was going to trying flashing the update zip but read up on it and it said TWRP or clockwork won't flash updates.
[Huawei Ascend XT Questions & Answers] madvane20:
yea atm only stock recovery will do updates even though my phone was completely stock cust etc the update just kept failing for me.
[Huawei Ascend XT Questions & Answers] divineBliss:
Did your phone get as far as downloading the update, then failed to install it or what?

Thinking out loud... Has anyone here restored to stock, then been able to OTA update from AT&T servers to a newer version?
[Huawei Ascend XT Questions & Answers] dabadguycr:
Do you still have TWRP? Or do you have the stock recovery?

Also how was you able to boot with stock unrooted? I tried and tried and I could never pass the device is unlocked screen.
[Huawei Ascend XT Questions & Answers] madvane20:
update would download reboot verifying then goes to installing install failed reboots i tried everything i could think of except locking bootloader. [MENTION=6822212]dabadguycr[/MENTION] it was full stock, stock recovery stock system,stock cust. anyone else have anyluck
[Huawei Ascend XT Questions & Answers] divineBliss:
Okay, I just went back through my notes and I unlocked my bootloader while I had B130 stock, then I was able to OTA to B140 only after I put in an active SIM from an AT&T MVNO.

I rooted while on B140 and have not yet tried to restore to B140 stock in order to try to update to B150 OTA. :)

Summary: it was possible for me to update from B130 stock to B140 while bootloader was unlocked, but I had not ever rooted my XT at that time.

If anyone was able to unroot, then do an OTA update, please let us know.
[Huawei Ascend XT Questions & Answers] dabadguycr:
I tried as well with the same results as mud with his stock b130 back up. The update won't work after being rooted and safety net still won't pass. I wonder if something is left over from the root?

I was snooping around last night after unrooting and found out su folder doesn't show up in TWRP but a folder called superuser does. That folder does not show up in ES file Manager.

I rooted deleted SU folder fully but superuser folder still showed up in TWRP. Reflashed with the stock B130 backup (system, data, boot) and SU folder appeared again.

I'm thinking it's something to do with this folder why we can't get full stock.
[Huawei Ascend XT Questions & Answers] divineBliss:
What is the full path of this folder you found and can't get rid of? Did you try deleting that folder from the TWRP file manager?

So wait a minute, if you are still rooted, then you will see folders that get created because of being rooted and get created each reboot based on rooting stuff in boot.img. So yes, some things you delete related to SU and Magjisk will come back when you reboot if you are rooted.

You need to be unrooted when hunting for what's causing the issue of not being able to get OTA. So that means stock boot, system , and cust to be fully unrooted. I you restore a debloated cust, that may cause problems depending on what go debloated.
[Huawei Ascend XT Questions & Answers] madvane20:
oh i was complete stock no mods of boot loader system cust etc and no root but update still failed it was all stock even recovery i might try locking my boot loader then doing it til i get backup of each update then reunlock it but will do that sometime later
[Huawei Ascend XT Questions & Answers] divineBliss:
I did my B130 to B140 with bootloader unlocked according to my notes, so I don't think that matters. But yes, do let us know what you find out when you try it. This is really perplexing. Maybe throw in a factory reset too when you try it.
[Huawei Ascend XT Questions & Answers] jg1210:
I'm willing to try to lock my bootloader, but first I need instructions on how to lock it lol. I already tried earlier with some I found, but it would always fail.
[Huawei Ascend XT Questions & Answers] divineBliss:
from bootloader mode:

fastboot oem lock

is what I would expect would do it. Caution, it may do a factory reset on your phone when you lock like it does when you unlock, so make sure you backup everything first.
[Huawei Ascend XT Questions & Answers] jg1210:
Thanks, I tried that one already and it didn't work. I also tried:

Fastboot oem relock

Fastboot flash lock

Fastboot oem lock with unlock code

Fastboot oem relock with unlock code

None of them worked.
[Huawei Ascend XT Questions & Answers] dabadguycr:
I used [MENTION=7934375]madvane20[/MENTION] stock backup and flashed cust with the stock one. I no longer had root. The /SU folder remained and inside TWRP /superuser. I tried to delete it but it didn't work. I really think this folder outside the system is what's causing the issue. It seemed like everything else was stock.
[Huawei Ascend XT Questions & Answers] divineBliss:
If you are seeing those /su (in normal mode) and /supersu (in recovery) folders, that almost seems like the boot and/or system images you are restoring are not stock? Do you have your own stock TWRP recovery?

If I understand things correctly, those two folders get created as a result of the rooted boot and/or system images, so those folder should not be there if restored back to stock :confused: .

---------- Post added at 02:31 PM ---------- Previous post was at 02:29 PM ----------

I'm out of ideas on this, but since before we had TWRP, I had unlocked the bootloader, then updated from B130 to B140 after that, so I don't think the unlock bootloader involved in OTA not working.
[Huawei Ascend XT Questions & Answers] dabadguycr:
My backup stock recovery won't boot. We compared MD5 codes and they matched I have no clue why they will not work with my phone.
[Huawei Ascend XT Questions & Answers] divineBliss:
What did you restore from it besides boot and system? Maybe if you restored the your data partition out if it, that's why it didn't boot?

Make sure you wipe your dalvik and cache for every TWRP restore before rebooting.

Maybe only restore your stock TWRP system and boot partitions, and just leave the data partition along the way you currently have it (assuming your phone is working - ie. the data partition is known good).

Then reboot back into TWRP and make sure there is no /su or /supersu .......... does that sound worth doing to you?
[Huawei Ascend XT Questions & Answers] dabadguycr:
/SU never shows up in recovery.

/Superuser shows up in recovery but not normal mode.

I rarely flash data I rather get a clear start everytime so I normally whip everything besides External SD Card. Even after whipping /Superuser shows in File Manager.
[Huawei Ascend XT Questions & Answers] divineBliss:
Yes, that's what "If you are seeing those /su (in normal mode) and /supersu (in recovery) folders" meant.

And case matters in Linux, so try to get used to posting with the correct case. It's /supersu not /Supersu ;) .

So when you restored from madvane20's TWRP stock backup, you only restored System and Boot and wiped Data and it booted up fine with no /su and no /supersu ?

---------- Post added at 03:26 PM ---------- Previous post was at 02:52 PM ----------

http://www.howtogeek.com/249162/what-is-systemless-root-on-android-and-why-is-it-better/

"And if you want to unroot without performing a factory reset, you can just flash a clean boot image for your device. One command prompt command and you’re done."

So restoring just the boot partition should make root go away. We are restoring System and Cust also because we may have made changes to those.

I forgot if I mentioned this or not, but dabadguycr, maybe you could kill the /supersu folder with TWRP file manager when you are in TWRP and rooted, before restoring the unrooted image, if you ever go down that path again. :)
[Huawei Ascend XT Questions & Answers] dabadguycr:
I just tried this. I was able to delete it but once I rebooted it was back. I've tried mutliple boots and nothing works.

I even tested the stock boot before I flashed TWRP. It wouldn't boot and the file came back like it was never deleted.
[Huawei Ascend XT Questions & Answers] divineBliss:
Maybe this is the axe that will do it:

https://xdaforums.com/showpost.php?p=63615067

Flash the UNsu zip. :)

---------- Post added at 03:53 PM ---------- Previous post was at 03:46 PM ----------

UNsu is going to make that /su and /supersu go away - I just know it. Lemme know after you try please :) .
[Huawei Ascend XT Questions & Answers] madvane20:
can u backup ur b140 for me?
[Huawei Ascend XT Questions & Answers] clsA:
Well I put my AT&T sim in the phone and got the update to start

failed pretty quickly

downloaded the UNsu.zip and flashed it but the folder is still their before rebooting
[Huawei Ascend XT Questions & Answers] divineBliss:
How about after rebooting?
[Huawei Ascend XT Questions & Answers] madvane20:
im gonna see what i can do even if i have to make a flashable zip to work with twrp will let you know my progress
[Huawei Ascend XT Questions & Answers] divineBliss:
I will try and upload my stock B140 System and Boot TWRP files tonight if I get a chance - otherwise tomorrow AM. They are untested by me, so I don't know if the will work, but you guys can try restore and see.
[Huawei Ascend XT Questions & Answers] madvane20:
ok ty is it ok if i add it to my list of stock images? also im working on linage now gonna make sure all firmware files are present and symlinked so os knows where they are maybe i will get it working and wont have to worry bout stock lol
[Huawei Ascend XT Questions & Answers] clsA:
yeah it's still their
[Huawei Ascend XT Questions & Answers] madvane20:
i didnt see it on my stock when i restored but i can check if there delete it and make a a new backup but atm working on linage
[Huawei Ascend XT Questions & Answers] clsA:
Files are also patched in cust so that would help too

I can show you how to flash the update.app from the b130-b140.zip

Extract update.app from the B130_B140.zip to a folder named
dload in your Ext_SD card. Turn off and plug the phone into PC USB and press
and hold power, Vol up, and Vol down until a reboot. Let go of power
after reboot but keep other two pressed for five, six sec more.
Or use the phones Dialer and use the *#*#2846579#*#*
dialer code and choose Software Update and it will reboot and flash.

but we need the files that get patched from the system and cust directories

here's a screenshot of whats in the Update.app that you can flash pretty easily

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

that picture is from your files that I restored

I haven't done anything else but try the update today

Rebooted to TWRP and tried to delete the /supersu folder and it gives an error 1 and quits
[Huawei Ascend XT Questions & Answers] madvane20:
let me finish linage then i will look into it
[Huawei Ascend XT Questions & Answers] powerserge1:
How is that going madvane? Thanks for working on it.