yashsingh1/xdaforums huggingface dataset:
[BLU R1 HD Guides, News, & Discussion] AndroidBR:
Hey guys, could you please tell me:

On latest v8.7 what's the security patch implemented? Was it June 2017?

How many security updates have been made available on Android source since Blu's latest update for the R1 HD?

I've seen at least two major security vulnerabilities in recent times that probably won't be addressed by Blu in a long while.

I'm asking this because I have just called Amazon to complain about fire.apk, the com.data.acquisition app that had been illegally sending our personal usage from our phones back to China.

They've refunded me for the cost of the phone and told me to keep it.

Now I'm in the process of getting a new phone. I'll probably get a Moto G4 Plus because it has a great dev base, with plenty custom ROMs and kernel support from reputable devs / sources. And of course, it's a Snapdragon powered phone. I'll never buy another MTK powered device again that's for sure.
[BLU R1 HD Guides, News, & Discussion] choder:
I have tried installing 8.4, 8.5, and 8.7 and i get this error in TWRP.

"Updater process ended with error 7"

Here is a screen shot https://ibb.co/eDxQNw

Any help would be appreciated!
[BLU R1 HD Guides, News, & Discussion] armivzla:
Do not format the "system" partition.

These are updates and they need you to have a base installed and then proceed to update with twrp
[BLU R1 HD Guides, News, & Discussion] mrmazak:
No these are full ROMs, not updates. The updater also does format during install.
[BLU R1 HD Guides, News, & Discussion] mrmazak:
"Failed to mount device is busy"

Looks like /system is already mounted. Check the mount page and make sure take check mark off from system. And make sure it is not set to read only system too.
[BLU R1 HD Guides, News, & Discussion] choder:
This is what my mount page shows. System mount is unchecked and Not read only.

https://ibb.co/f1e9hw

---------- Post added at 07:37 AM ---------- Previous post was at 07:19 AM ----------

I did not do any wipe, and just dirty installed of 8.7 and it worked.
[BLU R1 HD Guides, News, & Discussion] choder:
Everything worked. I was able to install Magisk 14.5 beta as well as run the ad removal script.

Thanks.
[BLU R1 HD Guides, News, & Discussion] emc2cube:
[MENTION=5312578]mrmazak[/MENTION]

Seems something is wrong in the first line / or on my phone

assert(getprop("ro.product.device") == "Life_Max" || getprop("ro.build.product") == "R1_HD" || getprop("ro.product.device") == "Life_Max_blu" || getprop("ro.build.product") == "p6601" || getprop("ro.product.device") == "blu_Life_Max" || getprop("ro.build.product") == "blu_Life_Max" || getprop("ro.product.device") == "blu_Life_Max" || getprop("ro.build.product") == "blu_Life_Max" || getprop("ro.product.device") == "blu Max" || getprop("ro.build.product") == "blu Max" || abort("This package is for device: Life_Max,Life_Max_blu,blu_Life_Max,blu_Life_Max,blu Max; this device is " + getprop("ro.product.device") + "."););

Maybe I'm using a different TWRP, but mine come up as BLU_R1_HD. I guess I can just edit the line in my case but not sure if something else is different.
[BLU R1 HD Guides, News, & Discussion] mrmazak:
Mine was ok with either p6601 or R1_HD

So it is dependent on the recovery.

You can edit the line , or remove it
[BLU R1 HD Guides, News, & Discussion] emc2cube:
Yes that's what I figured out. Edited it and flashed without any problems.

I guess it's time to give up on V21, don't thing the non amazon ones will see any updates.
[BLU R1 HD Guides, News, & Discussion] mrmazak:
This one was mainly a security update. So maybe.

I should reload v21 and check for updates.
[BLU R1 HD Guides, News, & Discussion] Letitride:
No need to reload yours, I have 2 of the R1 HD, one running V8.7 and the spare one running v21 stock, as of today - no update (bootloader unlocked, not rooted)

Just d/l your full V9 rom, with the security updated to Nov. 2017 and flashed it over v21, TWRP running & put SU v2.82-SR1 on it, also flashed the debloat stock rom zip file. Everything is looking good - one of my SIL is getting this for the holiday, replacing her old Motorola Moto E, out of internal storage even for a minimal set of Apps due to Facebook, WeChat & one game. It will be her primary & sole smartphone whereas I use mine as a backup with its dual-sim feature, a 32 GB mSD card is storing quite a # of photo & videos. Probably one of the best buy in the last few years for $60 USD.

Amazon put them back on their site, $99 for the 16GB model with ads - perhaps that's why BLU updated the security patches ... while other newer variants like the R1 Plus or R2, etc. got release, but those being locked down & unrootable is a no deal for me.
[BLU R1 HD Guides, News, & Discussion] t4n017:
Thanks for V9 update!, although the zip can't be flashed.

This package is for device: Life_Max,Life_Max_blu,blu_Life_Max,blu_Life_Max, blu Max; this device is BLU_R1_HD.

Looking at the updater script:

assert(getprop("ro.product.device") == "Life_Max" || getprop("ro.build.product") == "R1_HD" || getprop("ro.product.device") == "Life_Max_blu" || getprop("ro.build.product") == "p6601" || getprop("ro.product.device") == "blu_Life_Max" || getprop("ro.build.product") == "blu_Life_Max" || getprop("ro.product.device") == "blu_Life_Max" || getprop("ro.build.product") == "blu_Life_Max" || getprop("ro.product.device") == "blu Max" || getprop("ro.build.product") == "blu Max" || abort("This package is for device: Life_Max,Life_Max_blu,blu_Life_Max,blu_Life_Max,blu Max; this device is " + getprop("ro.product.device") + "."););

It should be an assert against "BLU_R1_HD".
[BLU R1 HD Guides, News, & Discussion] mrmazak:
most, but apparently not all of the twrp recoveries put out for the R1HD have setting ro.build.product = p6601.

To install this, if you have error, either use different recovery or remove the assert line from updater script
[BLU R1 HD Guides, News, & Discussion] yaconsult:
It worked fine for me. Thank you for continuing to provide modified updates!
[BLU R1 HD Guides, News, & Discussion] bibikalka:
[MENTION=5312578]mrmazak[/MENTION]

Asking for clarification here. When you say "Full with Ads V9.0" - does this mean that you take V6.1 all the way to 9.0, and don't touch anything at all?

Basically, if I were to take V6.1 up to 9.0 myself via the official update files, is that what I'd get? Meaning same version that you posted for V9?

It is a lot cleaner approach - posting the full factory ROM updated to whatever version, and letting people modify it to remove ads, OTA, etc. So good call posting later versions unmodified.

Also, what is the difference between your debloat script and that one by [MENTION=6782683]emc2cube[/MENTION]? Just a different flavor of the same thing? Or do you delete files vs just renaming them?

[MENTION=6782683]emc2cube[/MENTION]

Are the scripts posted in here still good for V9? I've used the original v2, those worked well!
[BLU R1 HD Guides, News, & Discussion] emc2cube:
Yes, I have been updating them and they should still be up to date.

I used them with V9 (which I think is exactly what you describe, a full untouched factory rom updated to V9.0) and did not notice anything left out by the scripts.
[BLU R1 HD Guides, News, & Discussion] mrmazak:
The only difference here with this update vs taking the OTA is this one here does not replace the preloader or bootloader, doesn't reapply 0artition signatures ,and does not update the "trustzone" (because did not update bootloader)

My script is once and done delete, so no undo., As it were
[BLU R1 HD Guides, News, & Discussion] CharlieRuiz97:
I'd installed v8.5 and accidentally I lose my TWRP when I installed, now I cannot root my BLU R1HD (I'm still using v8.5), what can I do, i need to know if there's a way to unlock the bootloader, install TWRP and root my phone, HELP ME PLEASE!!!
[BLU R1 HD Guides, News, & Discussion] mrmazak:
Your bootloader should not have "re-locked" on its own. You should just need to install twrp again from fastboot.
[BLU R1 HD Guides, News, & Discussion] bibikalka:
[MENTION=5312578]mrmazak[/MENTION]

Another question. I've looked into V9, you are using the standard update via zip feature with updater-script file. How did you figure out which symlinks to create afterwards?

symlink("/system/lib/libbluetooth_jni.so", "/system/app/Bluetooth/lib/arm/libbluetooth_jni.so");
symlink("/system/lib/libjni_pacprocessor.so", "/system/app/PacProcessor/lib/arm/libjni_pacprocessor.so");
symlink("/system/lib/libprintspooler_jni.so", "/system/app/PrintSpooler/lib/arm/libprintspooler_jni.so");
symlink("toybox", "/system/bin/acpi");
symlink("app_process32", "/system/bin/app_process");
...

I guess I am asking - are you sure it does not miss anything?

I guess an alternative is to copy everything at once, sort of like this:

ui_print("Patching system image unconditionally...");
block_image_update("/dev/block/platform/mtk-msdc.0/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat");

Then system.patch.dat is an empty file, while system.transfer.list is a bunch of blocks (or something ...).
[BLU R1 HD Guides, News, & Discussion] mrmazak:
I used the stock patch file to make my system updated. Then pulled the system folder

and read the symlinks.

Then finally used [MENTION=718594]super[/MENTION]r kitchen to verify links

And make updater-script
[BLU R1 HD Guides, News, & Discussion] bibikalka:
OK, great! This looks like a convenient Blu update that the manufacturer never made! :D
[BLU R1 HD Guides, News, & Discussion] unspecial:
Did Blu include the fix for the wifi bug "krack" in V9?

thanks
[BLU R1 HD Guides, News, & Discussion] mrmazak:
Not sure. There changelog was not detailed in any way.

According to an article on Forbes.net, as long as security patch level date is November 6, 2017 then it should be patched.

Also there is these test scripts .

https://github.com/vanhoefm/krackattacks-scripts

I have not tried them yet.
[BLU R1 HD Guides, News, & Discussion] unspecial:
Damn it. Patch level on V9 is November 5, 2017.
[BLU R1 HD Guides, News, & Discussion] Kazan15:
Hello! :cowboy:

Is it possible for you to upload the v8.4 or v8.5 to another server? I live in Venezuela and the connection is horrible with androidfilehost :(

My phone is half-bricked, I can only charge it and access TWRP, I wiped the system when trying to factory reset it and ****ed it up! :eek:

Also, no way to flash it using rootjunkie firmwares, it'll always say PMT changed.

Thanks, I appreaciate your feedback and help.
[BLU R1 HD Guides, News, & Discussion] mrmazak:
I don't have a different file host. But you can try to use "savetodrive"

http://www.theitstuff.com/save-files-directly-google-drive-download-10-times-faster

You will need to get to the actual download link in file host.

And use that link in the save-to-drive web page.
[BLU R1 HD Guides, News, & Discussion] Kazan15:
Mr., let me tell you that you just have changed my night from sad and doomed to happiness. :victory:

I can't believe this is working, save-to-drive... OMG.

Really, thank you.

PS: I sent you a tiny gift for your help. Check your email.
[BLU R1 HD Guides, News, & Discussion] CharlieRuiz97:
Can I use dirtycow tool to install TWRP again?, Or I need to do it in a different way? Please can you give me a method to do it; and sorry for ask you but I'm a little newbie with this kind of things, please I need your help!
[BLU R1 HD Guides, News, & Discussion] mrmazak:
you should be able to use the "tool" to install twrp again.

from what you have told us, i gather you halo unlocked, then installed 8.5 (aasume you used the "stock-ish" rom i provided), and lost twrp.

If that is correct , all you need to do is use the tool and select recovery install option.. No need to repeat the dirty-cow portion, or unlock section either.
[BLU R1 HD Guides, News, & Discussion] CharlieRuiz97:
Ok my friend, I'll try to do it,

Thanks a lot...

HAPPY NEW YEAR 2018!! :)

Have a good new year...
[BLU R1 HD Guides, News, & Discussion] zombie_ryushu:
Is there a way I can use the KRACK Fix to Fix the LineageOS 13.x Rom to not be vulnerable to KRACK?
[BLU R1 HD Guides, News, & Discussion] mrmazak:
Krack is not fixed on stock rom.

Nov 6 patch was krack fix

Stock patch is Nov 5
[BLU R1 HD Guides, News, & Discussion] zombie_ryushu:
Can you post a howto on how these Modified Stock Roms are made?
[BLU R1 HD Guides, News, & Discussion] mrmazak:
Nothing to it.

Blu puts out an ota update, I download the update, read the updater-script, edit it skip the preloader and lk,.

Install the update on my device

Pull the system.img and boot.img from updated phone.

Load the images into superr Android kitchen, where they are unpacked. Then let superr make updater-script and. Zip it all back up.
[BLU R1 HD Guides, News, & Discussion] RobertsDF:
I just downloaded and tried to flash v9.0. it gave me an error saying it was for various Blu phones(r1 HD was not listed) then said because my phone was an r1 HD that it could not flash.

How do I fix this? I i believe i am on 8.5 right now.
[BLU R1 HD Guides, News, & Discussion] mrmazak:
Yes the updater-script was quickly hacked together from several devices I was working on. And it worked with the version of twrp I had installed, but not on all of the versions that are here on the forum.

problem and solution discussed in the linked post and the next three posts after it.

https://xdaforums.com/showpost.php?p=74849223&postcount=249
[BLU R1 HD Guides, News, & Discussion] AtomicFizzle:
Looks like 9.2 is out now.
[BLU R1 HD Guides, News, & Discussion] mrmazak:
That's must be the smallest update I have seen so far.
[BLU R1 HD Guides, News, & Discussion] AtomicFizzle:
Yeah really! Where does it download to? I wanted to take a look at it. I checked the fota folders but didn't see anything.

NM, found it.. Ext sdcard..
[BLU R1 HD Guides, News, & Discussion] mrmazak:
Have not turned this phone on in long time. I don't have the update file.

It used to be in /data/data/com.adups.fota I think files folder
[BLU R1 HD Guides, News, & Discussion] emc2cube:
Or can be downloaded from

http://hwfotadown.mayitek.com/ota/r...RIC_6.0_20180326-15201522247911738/update.zip
[BLU R1 HD Guides, News, & Discussion] AtomicFizzle:
Just delete out these lines (bold+red) from the updater-script? Attaching the full script too.

assert(run_program("/system/bin/dd", "if=/dev/zero", "of=/proc/driver/mtd_writeable", "bs=3", "count=1"));
[COLOR="Red"][B]assert(package_extract_file("uboot.img", "/tmp/lk.img"),
write_raw_image("/tmp/lk.img", "lk"),
delete("/tmp/lk.img"));[/B][/COLOR]
apply_sig(package_extract_file("sig/boot.sig"), "/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/boot");
show_mtupdate_stage("/cache/recovery/last_mtupdate_stage");
ifelse (
less_than_int(get_mtupdate_stage("/cache/recovery/last_mtupdate_stage"), "1") ,
(
ui_print("start to update general image");
[B][COLOR="red"]package_extract_file("lk.bin", "/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/lk");[/COLOR][/B]
package_extract_file("secro.img", "/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/secro");
package_extract_file("logo.bin", "/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/logo");
[B][COLOR="red"]assert(package_extract_file("preloader_p6601.bin", "/tmp/preloader_p6601.bin"),
write_raw_image("/tmp/preloader_p6601.bin", "/dev/block/mmcblk0boot0"),
delete("/tmp/preloader_p6601.bin"));[/COLOR][/B]
set_mtupdate_stage("/cache/recovery/last_mtupdate_stage", "1");
),
[BLU R1 HD Guides, News, & Discussion] yaconsult:
Will you be preparing an update zip for 9.2? No hurry, but it would be nice if someone who knows how to do it did it for us. Thanks!
[BLU R1 HD Guides, News, & Discussion] mrmazak:
I can. What I will do is put modified update script, that removed the flashing command for lk, preloader, and tee. And also change the "abort" lines to "ui_print" , that way if you have de-bloated you can still update.

I don't have the device to test run it first , so if I share , I will need a tester to verify it works.

No promises.
[BLU R1 HD Guides, News, & Discussion] emc2cube:
I can test on mine if needed, I'm not using it anymore so if it get bricked I don't really mind.

I would still advice anyone that used the debloat scripts to run the "rebloat" script before applying the update, just to be on the safe side.
[BLU R1 HD Guides, News, & Discussion] mrmazak:
this update script should be ok.

Full modded update is in the OP with the rest of the updates
[BLU R1 HD Guides, News, & Discussion] emc2cube:
For reproducibility:

- In SuperSu full unroot with original boot images restored.

- Boot into TWRP recovery

- Ran Restore (rebloat) script

- Installed OTA with modified script

- Ran debloat scripts

- Installed Magisk v16 (as chainfire is giving up on root I guess it's the perfect time to switch root)

- Wiped Cache and Dalvik

- Reboot system

Everything worked, 9.2 confirmed installed and Magisk root OK (and pass SafetyNet). Thanks [MENTION=5312578]mrmazak[/MENTION]
[BLU R1 HD Guides, News, & Discussion] mrmazak:
Yes , for the patch to work you need at the least, the original boot.img

The rest is good measure too.
[BLU R1 HD Guides, News, & Discussion] AtomicFizzle:
Worked for me too. I also just ended up removing all of the Amazon apks from the update zip and the associated script lines. I was already using Magisk for root, so I ran the uninstall for that before applying the update. Worked perfectly[emoji108]

Also cleared AdupsFota data to get the apply update nag to go away.

Thanks [MENTION=5312578]mrmazak[/MENTION] & [MENTION=6782683]emc2cube[/MENTION]
[BLU R1 HD Guides, News, & Discussion] Darkyputz:
Hello...

I am reading through this and since i got lost here an there and would love NOT to brick my phone or lose root, i thought is better asks real quick...

My phone is rooted, twrp and su installed, OS version 6.0 with Android security patch Aug 5th 2016

How do i start?

Just download zip, boot to TWRP and flash it?

Would love to since the phone has its glitches...and a few bug fixes would be def welcome...

Do i lose my files/contacts/texts/whatsup messages??

Thx for some advice
[BLU R1 HD Guides, News, & Discussion] mrmazak:
Don't "have to" wipe after using one of these roms, As they are the stock rom. But I always suggest it. It leaves less chance for issues. So try just flashing, and if you have quirks or issues then do factory reset.
[BLU R1 HD Guides, News, & Discussion] Darkyputz:
What exactly does this mean here:

As a preventive step, when done flashing and wiping reboot to recovery FIRST, before booting the system It will allow recovery to handle removing the recovery-from-boot.p that flashes stock recovery.
[BLU R1 HD Guides, News, & Discussion] bibikalka:
[MENTION=5312578]mrmazak[/MENTION]

Your V9.2 script seems to be missing this line:

apply_sig(package_extract_file("sig/boot.sig"), "/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/boot");

What does this do? Since the boot was patched, should this line be kept?
[BLU R1 HD Guides, News, & Discussion] mrmazak:
Only locked bootloader cares about boot.signature

None of the modified stock roms have signature applied
[BLU R1 HD Guides, News, & Discussion] Darkyputz:
Thx so far for this awesome work...

I just started flashing...Never mind...was fast from nothing on bar to final...

Phone came up stating 9.0 in custom build...

Was hoping for Android version 6.1 but not coming, right?!

Have to install TWRP/root/debloat now i assume...since recovery shows meta mode...

Did TWRP and debloat, but i seem still to have the system update in the phone...and i also deleted the two folders out of the zip before flashing...

Any thoughts?
[BLU R1 HD Guides, News, & Discussion] mrmazak:
What are you saying? You have ota notice still?

Or the update app?

And what you mean custom build says 9.0. Is that before or after the v9.2 patch. Ohh or did you just install v9.0?
[BLU R1 HD Guides, News, & Discussion] Darkyputz:
Hello...

I only did the update to 9.0 yet...to see if and how it turns out...

And i deleted as mentioned in one of the answers here the fota folders from the zip since i understood it would take the update function out...but even after the debloat full script i still have this system update option...so i was just wondering if i am in danger now to recieve on of these de-root de-debloat updates that locks me out...

I will do 9.2 soon as well since i like how it turned out to work...i just think it uses some more battery now...but i did not wipe the phone...so maybe that is causing it.

But besides that...you guys are soooo awesome...i really thank you for your work
[BLU R1 HD Guides, News, & Discussion] bibikalka:
Did you also install systemless Xposed? I tried it recently on another device, and it bootlooped, so I had to become super familiar with the Magisk recovery tool real quick, LOL ( https://xdaforums.com/apps/magisk/module-tool-magisk-manager-recovery-mode-t3693165 )
[BLU R1 HD Guides, News, & Discussion] emc2cube:
I did not.

Did you install it manually, or using the Xposed Framework module from Magisk?

I used to have it, on another device, installed from the modules but it broke SafetyNet and was not able to use some apps in this case. But Xposed was working without any bootloops.
[BLU R1 HD Guides, News, & Discussion] driz:
Hello all; kids' phones were on 6.0 october update. I decided to update. I did this:

booted into twrp

erased everything (advanced wipe)

flashed Full with Ads V9.0.

Worked great; now I'd like to run the v9.2 updater, but i'm not following what needs to occur here. Do i download the OTA from the link in https://xdaforums.com/showpost.php?p=76417062&postcount=284 and then run the script from within adb shell, it doesnt look like bash to me, so i'm unsure? I'm assuming, i need to pull that ota.zip down, open it and inject this script into that .zip and install the zip.. i suppose i'll just test and see what happens :D

OK figured it out, update running now. will update when completed.

rename update script to updater-script

inject into update.zip/META-INF/com/google/android

adb push onto device

install via TWRP

At this point, I am on 9.2 and I did the following

Flash debloat

flash magisk

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

Interestingly enough, on my second daughter's phone, which is exactly the same on the same version. I followed the steps above and got an error 7, which i believe implies the ROM isn't compatible with the device. Not sure what to do at the moment, but am thinking.

Just above the error, I see

ApplyParsedPerms: lsetfilecon of /system/lost+found to u:object_r:system_file:s0 failed: Operation not supported on transport endpoint set_metadata_recursive: some changes failed

figures even on Android selinux is out to get me. the crazy thing is within adb shell (twrp recovery) selinux status is disabled.
[BLU R1 HD Guides, News, & Discussion] mrmazak:
not sure what is happening to your updates. I just checked my files and I have the full update not just the updater-script uploaded. So there should be no need to inject the script into the normal update.
[BLU R1 HD Guides, News, & Discussion] driz:
oh whoops, i didnt check the OP. just pulled the update.zip from page 6 and injected your v9.2 script into it.

for my second daughter's phone, i had to restart twrp and it flashed fine using my same process again. Everything is smooth, thanks everyone who contributed!
[BLU R1 HD Guides, News, & Discussion] mrmazak:
Just added a note to post with the script, that full modded Update is in op.
[BLU R1 HD Guides, News, & Discussion] driz:
Awesome man, my kids and I appreciate your efforts :)
[BLU R1 HD Guides, News, & Discussion] 0xd0gf00d:
Pardon my N00Bness but I was looking for better instructions than in OP to update my device. My device is originally a Prime version updated to the non-Prime version to get rid of ads. I have TWRP recovery but no root at this time.

Is there a guide that would allow me to update to the latest Prime version without Ads and retain the TWRP recovery? Secondly, what guide should I use to get root? Lastly, can all this be done on a Mac (since the scatter file tool used to run on Windows)?