yashsingh1/xdaforums huggingface dataset:
[BLU R1 HD Guides, News, & Discussion] maximisxxx:
I hope this development process dosen't end too quickly! I have the first one installed on my r1 HD Blu, the version x.3.3 and the only problem I have is the camera is not stable and keep crashing, not that i use the camera much. This Slim ROM that have been ported is very interesting and I love that it is a lighter ROM then the original stock. I downloaded the ROM the first day you posted it hoping my r1 HD Blu was not bore no more. What in interest to ask is, will you one day or later add a custom kernel overclock (1.4ghz+) in CPU and GPU?? Slim6 i think, looks lighter then the Lineage port you make on the other thread.
[BLU R1 HD Guides, News, & Discussion] mrmazak:
TBH

I do not know how to , so I would say no. I just experiment with code and file swapping.

Custom kernel will take a real dev.

not a "cut-and-paste" junkie

**did you mean you do not have the no-mic problem on 3.3 and phone speaker does not stop working after about 5 minutes.
[BLU R1 HD Guides, News, & Discussion] maximisxxx:
Oh ya, for x.3.3 that I'm currently using. The mic have problems, it barely works(Just realized). The speaker sometimes is a little off.
[BLU R1 HD Guides, News, & Discussion] mrmazak:
looks like the files replaced to make microphone work are the cause of the speaker dropping out.

"system\lib\hw\audio.primary.default.so"

"system\lib\hw\audio.primary.mt6737m.so"

**when I swap these files with ones from V21 the microphone works. But after some time the speaker stops working, at the audio server level. (example: 5 second audio clip shows it completed but no sound came out. Then connect to bluetooth and the sound of the clip then comes out from the bluetooth device)

When I leave these files as they are built from slim then audio sound is stable but the mic does not work.

hopefully there is another way to get mic working.
[BLU R1 HD Guides, News, & Discussion] maximisxxx:
Keep with the developement bro! Good work for you!
[BLU R1 HD Guides, News, & Discussion] overthc:
Hi, I´ve flashed this rom and the open camera have some troubles, I hope this will be fixed soon, thanks for all support [MENTION=5312578]mrmazak[/MENTION].
[BLU R1 HD Guides, News, & Discussion] mrmazak:
Uploading version 5.0

Audio still dropping out causing videos to also stop playing.

So far only thing found that has caused the change in audio stopping was changing "/system/lib/hw/audio.primary.mt6737m.so"

if i leave the file from original slim rom, the audio stays working and microphone does not work.

if i swap the file from v21 microphone works butaudio quits after few minutes, but the audio will still play through bluetooth.

I do not understand what it could be yet. The same file swapped out in lineageOS 13 got microphone working but did not mess up the audio playing.

change logs.
[BLU R1 HD Guides, News, & Discussion] pas7771:
Hello [MENTION=5312578]mrmazak[/MENTION]

I don't want to abuse your time, the only rom I can install on this Blu R1 HD phone is the "Slim--6.0.1-R1-HD-Port-x-3.5.zip" no matter what I do.

All the other roms including the new Slim 5.0 and others LineageOS etc FAILED to boot.

If you know a way to totally wipe the phone to nothing and reload a factory firmware from fastboot I really appreciate.

Thanks
[BLU R1 HD Guides, News, & Discussion] mrmazak:
Have not had success flashing system with fastboot.

It's not in correct "sparse" type format.

From twrp wipe menu , advanced wipe menu, select all except internal and sdcard, then try different Tom install.

I have gone back and forth between all versions, and also back to 8.4, and 21. Sometimes it takes a format of data between ROMs. And format of data needs a reboot of twrp

Your problem could be rom unable to access /data.

Next time you flash rom and it only boots to recovery, go-to wipe and then format. Then reboot
[BLU R1 HD Guides, News, & Discussion] Jô$èph D:
I look forward to using this rom once the issues are fixed and does the fm radio work?
[BLU R1 HD Guides, News, & Discussion] pas7771:
Thanks for your answer, I already did all of these steps. fastboot fomat data, system, cache, I flashed the stock recovery and did a factory reset, I did format with twrp as well > but I did format everything including internal sd < could it be my problem? but the "Slim--6.0.1-R1-HD-Port-x-3.5.zip" always come back alive when flashing....... like previous erasing and formatting do not work???

I'm not sure what else to do to get rid of this rom (the audio is not working) :eek: :eek:
[BLU R1 HD Guides, News, & Discussion] mrmazak:
Your problems started when you flash wrong recovery. I can't guess what that could have done.

But I only have one other option, and that is to flash with spft ,

In the unlock tool I have preloader roll back, if needed.

Read and follow all the notes. It causes a boot loop and need to om unlock again, I have it all coded to do the unlock again but you need to pay attention hold volume up during the boot loop to get back to fastboot.

This has worked Everytime I used it. But your phone is not acting normal so this might totally brick it. You do so at your own decision.
[BLU R1 HD Guides, News, & Discussion] mrmazak:
I have ported [MENTION=2472806]vampirefo[/MENTION] new twrp 3.1.1-0 and he has a "bail-out" script built in for a boot looping situation I had asked about.

Install the ported twrp from the first post and follow directions in the following post.

https://xdaforums.com/showpost.php?p=72377609&postcount=20
[BLU R1 HD Guides, News, & Discussion] kormend:
Is this going anywhere or is it dead in the water?
[BLU R1 HD Guides, News, & Discussion] mrmazak:
I try to poke it with a stick every once in a while , to see if it is alive.

I have very little (none) android building knowledge. So I have only swapped files in and out of the rom, not knowing the possible outcome. I think with the diff file provided it is a good starting point for a Dev to hopefully take it forward, but I myself have nothing left to offer this beast.

Previous ports/ builds did not have camera at all so this is another step forward to complete.
[BLU R1 HD Guides, News, & Discussion] yepi15:
Probe the LOS13 but is not for my daily use, is this more stable?
[BLU R1 HD Guides, News, & Discussion] mrmazak:
currently playing around with this port again.

Newer gapps package as when first tried. Now camera did not have problem for first about fifty launches. But when it failed it did not have any message on screen, just grey screen with small camera icon in center.

On a positive note. I was also looking at the sound (mediaserver) problem. Sound was dropping out after few minutes of music play, and sooner if I kept changing songs/ videos back and forth. I found out if I were to search for the mediaserver pid

and kill it then server would quick restart and musc / video played again without needing to reboot phone.

1. adb shell

2. ps | grep media

3. find pid for /system/bin/mediaserver

4. kill "pid from above"

5. next time media started the mediaserver automaticly relaunches

Now, when since the camera stopped working , the sound has not dropped out in over 1.5 hours.

so I suspected my quick uneducated approach to making the port made the prolem to begin with , this almost shows for sure it did. Some file I blindly swapped in to get camera to work has quit and made camera not launch, but it also stopped messing up the mediaserver.

so once again I think a fresh start , this time really one lib at time testing to get camera up without _borking_ the mediaserver.
[BLU R1 HD Guides, News, & Discussion] mrmazak:
I have restarted th eport and did few testa along the way. I had not had same permissions set in boot.img as they were in stock rom, so I imported stock files to boot.

init.common_svc.rc

init.mt6735.rc

init.mt6735.usb.rc

init.project.rc

init.rc

init.usb.rc

init.volte.rc

These changes are mostly permission settings , and device ID (when plug into usb on pc it says R1_HD not life max)

The init.vo;te.rc was imported to by stock init.rc, and required three volte binaries to be added to /system/bin from the stock rom. This has not caused any errors that I can see, yet. I have not had it running on voice service to see if volte is actually working now or not.

Then I started adding the base line changes.

/system/etc/firmware/

/system/etc/mddb/

/system/usr/keylayout/

This booted and had pink/ green tint on video playback for first 5 seconds or so, But loud speaker did not drop out. Tested for several hours.

Next i Started adding the" /system/lib/libcam*" .so files. After adding them all in one shot on first boot the loud speaker was turning off after only 1 or 2- 10 second audio clips or in middle of first youtue video played. This was evience of where trouble was.

From what I have read on trouble shooting android "mediaserver" (the file that I restart t fix the loud speaker) , the only time it creates log entrries is when it is explicetly compiled with a certain build flag set. And not recomended to leave the debug flag on for normal use. So i dont know how to trouble shoot deeper yet. So what I did was take the V5.0 (has all BLU- ROM - V21 libcam*.so files) and replace with original slim libcam*.so files one "libcam*" lib at a time. The result was I have had the phone playing youtube videos "with sound" for 9 hours now, After one mediaserver sestart. I think maybe this will work now.

to restart media server

1. adb shell

2. ps | grep media

3. kill (pid listed for media server from above command)

[IMG="kill mediaserver"]https://xdaforums.com/attachment.php?attachmentid=4221752&d=1500895914[/IMG]

NEED testers to try it out.'

V6.4 has been uploaded
[BLU R1 HD Guides, News, & Discussion] d3athd3al3r:
Downloading now ... hopefully all goes well and wifi, Bluetooth and 4G work for me. Will keep you posted
[BLU R1 HD Guides, News, & Discussion] mrmazak:
Update:

My test device is starting day three with this v6.4 version of the slim port, audio and camera are still working. Previous tests they both would have dropped off and stopped working after only 20 minutes tops.
[BLU R1 HD Guides, News, & Discussion] roboman2444:
Will the CM port benefit from these changes? still some stability issues with the camera.
[BLU R1 HD Guides, News, & Discussion] mrmazak:
It could, I have not tried.
[BLU R1 HD Guides, News, & Discussion] kormend:
Gave this ago...no dice...boots to main screen says no sim installed...try to unlock the phone don't even get a chance to click got it...and it soft reboot and after a couple tries just flat out reboots itself...if I swipe down and try to get settings another soft reboot/eventual hard restart...guessing with no sim showing it's still wiping out my imei info.
[BLU R1 HD Guides, News, & Discussion] mrmazak:
So, you didn't get the android setup wizard?

You just went to regular lock screen?

Need to do factory reset (wipe) before boot up
[BLU R1 HD Guides, News, & Discussion] kormend:
Did factory reset twice even , but yes went right to lock instead of setup..
[BLU R1 HD Guides, News, & Discussion] mrmazak:
That suggests something has gone wrong with the install.

Have you tried to format /data then advanced wipe every thing then install again
[BLU R1 HD Guides, News, & Discussion] kormend:
Gonna try that next...

---------- Post added at 01:01 PM ---------- Previous post was at 12:26 PM ----------

Is there a difference in format data vs wipe data?
[BLU R1 HD Guides, News, & Discussion] mrmazak:
Yes. Wipe only does the folder "/data" and format does the partition "/data"
[BLU R1 HD Guides, News, & Discussion] kormend:
So update....no change got the setup screen then does same as before on lock screen..soon as I press any button it reboots...
[BLU R1 HD Guides, News, & Discussion] mrmazak:
I don't know why you are having trouble with these roms. They all work on my three test phones.
[BLU R1 HD Guides, News, & Discussion] kormend:
No idea, your earlier versions installed fine just no wifi,bt, or cell.....just like couple others had issues with.... this one just doesn't like something....other roms also install fine...it's just this one and cm13 that have same issues for me....previous cm14 install and work fine minus camera of course....
[BLU R1 HD Guides, News, & Discussion] mrmazak:
I do appreciate you trying and letting me know the results.
[BLU R1 HD Guides, News, & Discussion] kormend:
Maybe I'll try earlier version that does boot proper...then install latest overtop and see if I get anywhere...after the install are you letting it sit for any amount of time ? I let it sit for about 5 min before touching anything and no change.
[BLU R1 HD Guides, News, & Discussion] mrmazak:
I have done it both ways.
[BLU R1 HD Guides, News, & Discussion] kormend:
Any date?

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

Any update?
[BLU R1 HD Guides, News, & Discussion] jrk190:
So I'm trying the latest build. No navbar for some re4ason until you toggle in settings. I'm not a big fan of slim but it works.

Do you think you could update LOS 13 to reflect the changes you made in 6.4?
[BLU R1 HD Guides, News, & Discussion] mrmazak:
The navbar setting is mentioned in the install directions on OP.

I had planned on updateing the boot.img for LOS-13 only, as the changes inside the rom were mainly for fixing the audio on slim. SO maybe just boot.img "patch"

Made updates, and needed to add three files to the /system/bin for volte. I do not know if it will work but the stock boot ramdisk had a volte.rc file and it executes the three files inside /system/bin. And i have seen it mentioned on other forums as a what is needed to get volte on custom roms, so i added it. I would prefer to test it on my device before I put out a link.

more on topic. My current test install is still working , without trouble with audio, or camera. And i had not noticed but the selfie video camera is also now working.
[BLU R1 HD Guides, News, & Discussion] jrk190:
I tested that all earlier, all working on my end. Also no ui lag like on los
[BLU R1 HD Guides, News, & Discussion] mrmazak:
I have gotten one of my phones doing same thing you are describing, now.

cm rom boots with no baseband and that makes no wifi, no bluetooth, no sim card.. And slim does not get past setup, and reboots when screen touched.

I dont know what i did , but if I fix it then you will also benifit.

lol'

I assume that either the hardware is different or a different partition, other than system is different and causing the trouble.

My next step will be to restore full flash images to not working phone from working , including secro.img and s protect , f protect. And maybe will find problem.
[BLU R1 HD Guides, News, & Discussion] kormend:
Sounds good, glad it wasn't me just being slow and not doing something right lol
[BLU R1 HD Guides, News, & Discussion] mrmazak:
I have small update. I flashed all images from phone with working slim installed to phone that slim either has no base-band or reboots during setup.

Outcome is, now both phones are running slim.

I took a "diff" on the images before flashing and have narrowed problem down to

1. lk.bin mmcblk0p5

2. protect1.bin mmcblk0p3

3. protect2.bin mmcblk0p4

4. proinfo.bin mmcblk0p1

5. seccfg.bin mmcblk0p11

These are the partitions that I suspect causeing the one device to run the rom and the other to not.

The way I see it I could include these partitions in the inistall and have the updater-script instal them. Or just make it patch to be used as needed.

I do not know if I have the ability to make the rom work with either bin.

My next step I guess will be flash back to the not working way and change the five one at a time to see if maybe just one is the problem.
[BLU R1 HD Guides, News, & Discussion] kormend:
Good job, keep me informed and will give ago :)
[BLU R1 HD Guides, News, & Discussion] mrmazak:
Still trying to understand what the different partitions do and narrow down the safest way to make changes.

During test before I flash back to the not working partitions, I did a clean install but did not flash gapps. The imei was in tact but wifi mac was cleared. After wipe and gapp flash the mac was returned.

At the same time I am testing the same changes I made to Slim_Port in the CM13_port. I had similar, but different issue with wifi mac. During the setup wizzard when screen came to connect to wifi , it showed mac address as almost all 0. Then it flashed the screen and the mac was shown. (camera stability in CM13 has not changed like it has in Slim)

Another observation of signs of the problem:

1. when slim install not connecting to imei, phone is in selinux = enforcing mode. Even though rom is built with selinux isabled.

2. logcat shows, early in log before "start of Main", Unable to read "protect1", "protect2", "nvdata", permission denied permissive =0

I am leaning toward the bootloader being the problem. (lk)

When the lk.bin is changed it triggers a bootloop and need to "fastboot oem unlock" again.

which makes me think to just try a second "oem unlock"

can you try

"fastboot oem unlock"

"fastboot format userdata"

"fastboot format cache"

"fastboot reboot"

If fastboot reboot does not work, long press the power button to cycle power.
[BLU R1 HD Guides, News, & Discussion] kormend:
When I get a chance will give it ago. What happened on your device when you tried the 2nd oem unlock ?
[BLU R1 HD Guides, News, & Discussion] mrmazak:
same as first time. It sets flag to do factory format of user data. Usually that needs stock recovery to complete, Thats why the fastboot format commands.

One time after "fastboot format userdata" I was left with a data partitoin that was only 744mb in size, but follow that with a format data in twrp fixed that.

I have not tried this as a fix for the problem, I still did not flash the original five partitons back yet, I'm still gathering information on what is going on.
[BLU R1 HD Guides, News, & Discussion] mrmazak:
Update on the Slim_port in general.

My latest port (the one I put out last week V6.4) Has been working on my test phone all week , Audio has not dropped all week. Today I rebooted phone and the audio dropped out again in middle of second youtube video.

I ran this in terminal emulator on the phone itself

"ps | grep media"

then

"kill pid" where pid is the number for mediaserver found from the first command.

I ended up doing this 2 times, then the audio has not failed again, At least not yet. This appears to be needed each reboot, untill the real problem is found.

I am working on a script that can be saved into "gscript lite" and make a short cut on home screen to reset the media server.

the script will look these lines that i am testing in terminal right now. It seems pretty efficient

root@android:/ # server=$(ps|grep mediaserver |awk '{print $2}')
127|root@android:/ # echo $server
6992
root@android:/ # kill $server
root@android:/ # server=$(ps|grep mediaserver |awk '{print $2}')
root@android:/ # echo $server
7441
root@android:/ #

I ended up using $cripter instead. And the script file was like this

#!/system /bin/sh

server=$(ps | grep mediaserver | awk '{print $2}')
kill $server
exit 0

save the script as whatever name you want.

select to run as root then on home screen long press and select widget scripter and this script.
[BLU R1 HD Guides, News, & Discussion] mrmazak:
I have narrowed it down to the lk (little kernel -- bootloader)

I have made it a recovery install patch. if you would try again to install slim rom, gapps, and the attached lk.zip. then let us know if it also worked for you.

The lk.bin (bootloader) that works with the slim rom is the lk that originally came with the prime version of the R1-HD

And the the one that does not work came with the non-prime version of the R1.

The preloader roll back I made included the lk from non prime. So if you had done my preloader roll-back, I made this problem for you not being able to use this slim_port. Untill you flash this new lk.zip, which reverts your lk back to the prime version.

I had first installed a protect-1-2.zip but it did not fix the problem of boot loop during setup wizard, I did not remove it before trying the lk.zip. So if lk.zip does not fix it by it self please go back and add the protect-1-2.zip

****Edit***

The protect-1-2.zip does not appear to be needed.

*******************************************************************************

*******************************************************************************

***ONLY USE THE lk.zip IF YOU HAVE DONE THE PRELOADER ROLL BACK***

*******************************************************************************

*******************************************************************************
[BLU R1 HD Guides, News, & Discussion] kormend:
Will try . Thanks.

---------- Post added at 07:35 PM ---------- Previous post was at 07:15 PM ----------

We have success!!! On initial boot it wasn't showing sim or WiFi so held power button down until off...then booted into recovery which oddly enough didn't happen....but once it booted again had sim showing WiFi working ...so all is good :)
[BLU R1 HD Guides, News, & Discussion] d3athd3al3r:
Still no no radios working for me ... reverted back to V21 Rom
[BLU R1 HD Guides, News, & Discussion] kormend:
However no root? Just need to flash su I assume ?
[BLU R1 HD Guides, News, & Discussion] mrmazak:
root is built in. Enable inside developer options.
[BLU R1 HD Guides, News, & Discussion] mrmazak:
I beleive I found problem with radios. On my testing devices the fix works. try to flash the lk.zip I posted 2-3 posts back
[BLU R1 HD Guides, News, & Discussion] mrmazak:
And to confrim you did just the lk.zip not both?
[BLU R1 HD Guides, News, & Discussion] d3athd3al3r:
ok ... Downloading now

---------- Post added at 07:34 PM ---------- Previous post was at 06:52 PM ----------

Update: after flashing phone will not turn on ... i guess ive managed to brick it.
[BLU R1 HD Guides, News, & Discussion] mrmazak:
Is it switching from the BLU splah screen to off then BLU spalsh screen again?

If yes. Need to do oem unlock again. Ask if you are not sure how.

If it is stuck at boot animation, a wipe in recovery should clear it. If wipe does not clear then will need format data.
[BLU R1 HD Guides, News, & Discussion] kormend:
Even after latest update? Flash 6.4 , gapps, and lk.zip...it will reboot and not show signals....but once I did a force restart long press power it booted up fine.

---------- Post added at 09:37 PM ---------- Previous post was at 08:59 PM ----------

Did find one issue...after being on for abit...went to unlock screen and kept like soft booting from lock to home screen until i did a reboot and was fine..

Also I only flashed lk after ROM/gapps...

Is there away to adjust brightness doesn't seen to make a diff when using slider.

---------- Post added at 09:48 PM ---------- Previous post was at 09:37 PM ----------

Also videos don't play in YouTube...?

---------- Post added at 09:50 PM ---------- Previous post was at 09:48 PM ----------

Ads play but without sound, soon as main video plays its just stops playing.
[BLU R1 HD Guides, News, & Discussion] mrmazak:
My brightness works> ?? while changing slider the shade is down so screen is little dull. ??

videos not playng is the audio stream engine (or what ever its called) crashing. Thats what I posted the codes to restart mediaserver. (mediaserver restarts on its own after it is killed. )

this is the sript runnung app I use to add widget script to home screen to restart mediaserver

https://apkpure.com/cripter/sites.mjwhitta.scripter

and here is the script that i use. Need to set it to run as root

#!/system/bin/sh

server=$(ps | grep mediaserver | awk '{print $2}')
kill $server
exit 0
[BLU R1 HD Guides, News, & Discussion] d3athd3al3r:
The phone doesn't turn on, no blu splash screen just stays off. I'm typing this from my windows phone. I think it's time to fix my galaxy S4's broken LCD. If I get the R1 HD running again then I'll be here for testing, but as of now looks like I'll be sitting this one out...