Page 1 of 5 123 ... LastLast
Results 1 to 10 of 48
  1. #1
    Senior Member
    Join Date
    Aug 2015
    Location
    Washington DC
    Posts
    296
    Thanks
    17
    Thanked 45 Times in 23 Posts

    How to use a raspberry pi to connect to your macbook bios, How to clean ME Region and change serial

    DO NOT FLASH THE EFI WHILE THE CHIP IS STILL ATTACHED TO THE BOARD. --- 3/8/2017


    ~~~As of lately i have noticed that newer model MacBooks do not like to be flashed when they are still attached to the board. I have about 5 boards now that will not boot, from any EFI. I am unsure exactly what the cause is but the one similarity is that i flashed all these using the GhostlyHacks adapter.~~~


    **Please note that this may not be the most efficient way to do this, as im pretty amateur when it comes to this. But since in my quest to learn how to do this i could never find any complete tutorials, ill bring them together here.**

    Items needed

    Raspberry pi 2(specifically 2 because that is the one ill be doing the tutorial with you can do it with other ones as well)
    Raspberry pi charger
    Micro SD card(your choice of size, you can also buy micro sd cards with Raspbian installed)
    USB Micro SD card reader or a laptop/computer with a micro sd card slot
    Bread board 400pin at least
    Bread board jumper wire around 6 inches in length at least
    SOIC clip 8 pin (i've heard panoma is the best, but it is not what im using) - This is used for Macbook Pro(MBP)

    Optional: [Only Registered and Activated Users Can See Links. Click Here To Register...] This makes connecting to your raspberry pi easier. I litterally just discovered this while making this tutorial and will probably be buying it as this seems to make life a bit easier.

    Macbook Air(MBA) clip (now there are a few options for this)
    -https://ghostlyhaks.com/projects/categories/16-hacking-projects/10-universal-easy-flash-v1-0 (This will probably be the best and easiest option if it gets the funding, but its not available yet)
    -http://advancedreworks.com/forum/showthread.php/anybody-used-mba-bios-programmer-ghostlyhaks-1661.html (Splee explains to us how he created one out of the LIO board on a MBA in this post)
    -I had troubles getting Splee's creation to work, and i opt for now to just manually wire it to the board from the pi



    This first section comes directly from this ghostly haks tutorial. [Only Registered and Activated Users Can See Links. Click Here To Register...] This tutorial is good but i had found a few things that didn't make exact sense to me, so i want to try to make this have more sense. But there are some good pictures on his tutorial i don't have the time to try and find/take pictures for this at the moment.

    -----------------------------------------------Setting up the Raspberry Pi----------------------------------------------------

    1. Download Raspbian lite [Only Registered and Activated Users Can See Links. Click Here To Register...]
    2. Download Win32 Disk Imager [Only Registered and Activated Users Can See Links. Click Here To Register...]
    3. Use Win32 Disk Imager to write the Raspbian lite image to the SD card
    4. After installation of Raspbian lite insert the SD card into the raspberry pi 2 and boot it up, we will be setting up the raspberry to work with the SPI pins on the raspberry pi, as well as setting it up for SSH into the raspberry pi from another computer. (This allows you to only have to have one monitor and what not instead of a monitor for both your normal computer and raspberry pi.)

    ----------------------------------------------Configure the Raspberry Pi-------------------------------------------------------
    1. When you first boot up the raspberry pi you will need to connect an HDMI monitor, a keyboard, a mouse, and an ethernet cable. Raspberry pi 2 will not handle a gigabit transfer over ethernet so make sure you only have a 100MB connection.

    2. Once it boots up it will bring you to a login Usernamei Password:raspberry

    3.We are now going to setup the configuration of the pi. Type in the following command.
    -sudo raspi-config
    -Go to advanced configuration
    -Go to SSH and enable it
    -Go to SPI and enable it
    -You can now go to finish and leave this menu
    5.Now we will be updating and installing some things on the pi, here are the commands that you will need to run one by one
    -sudo apt-get update
    -sudo apt-get upgrade
    -sudo apt-get dist-upgrade
    -sudo apt-get install pciutils
    -sudo apt-get install libftdi-dev
    -sudo apt-get install libusb-dev
    -sudo apt-get install libpci-dev
    -sudo apt-get install libusb-1.0-0-dev

    5. now we will download and isntall a program called flashrom that will read and write to the bios
    -sudo git clone [Only Registered and Activated Users Can See Links. Click Here To Register...]
    -cd flashrom
    -sudo make
    -sudo make install
    This now completes the installation of flashrom

    6.We will now make a new folder/directory that the .bin files will go to when read from the bios
    -sudo mkdir efi
    This makes a new dir called efi

    7. You will want to make sure the pi has a static ip so that using SSH is easy
    -sudo ifconfig

    If you see a line that says "iface eth0 inet static" you already have a static ip
    Write down the number after the line that says "address" will probably look like 192.168.1.XX if you have a standard network.

    If the line says "iface eth0 inet dhcp you will need to follow this following tutorial to set it to static
    [Only Registered and Activated Users Can See Links. Click Here To Register...]

    This concludes setting up the raspberry pi

    --------------------------------------------Setting up your computer to SSH with the Pi---------------------------------------
    1. On your computer(assuming you have a windows based computer) you need to download a few programs

    2.Go here and download and install HxD [Only Registered and Activated Users Can See Links. Click Here To Register...]

    3. Go here [Only Registered and Activated Users Can See Links. Click Here To Register...] and download both Putty and PSCP

    4. You can put the Putty program anywhere on your computer that you want to run it from. I have mine on the desktop.

    5. You need to move the PSCP.exe file in to the C:\Windows\System32\ folder. We will be using this program later through a command prompt to transfer files back and forth between the pi and your computer.

    6. Now open Putty and in the field that says Host Name type in the static ip address of your raspberry pi that we wrote down earlier. Port can stay as 22. Connection type SSH. Click save and save it as the name you would like. Now click on That name in the list below and click open. It should now open a box that looks like a command line program, asking you to log in to the pi. Username: pi Password: raspberry.

    7. Now you are able to run commands to the pi through your main computer. You will no longer need a monitor, keyboard, or mouse for your pi. All you need is the power cable and ethernet cable plugged into the pi.

    This concludes the setup of using your computer to SSH with the pi. Don't worry the PSCP file and HxD program will come into play later.

    --------------------------------------------Connecting your Macbook bios to the Pi---------------------------------------------

    Now this step will involve you also figuring out how you need to setup your wires for proper connections to the pi. I won't be able to give exact directions for how you need to setup your connection to the bios. I definitely suggest looking up some quick tutorials on how breadboards work as well, if you aren't familiar. Now this is where you will need your breadboard, soic clip if you are working with a macbook pro, or if you decided to make your own adapter for a macbook air, or just solder wires directily bios on the macbook air. which is what im currently doing.

    Now im assuming since we are all on this forum that we have some schematics and board views for your logic boards. And you know how to work them and find and match each connection. Here are some following images that will help you know where to connect the wires on your raspberry pi and on your logic board.

    Pin 1 on the bios is always marked by a small dot, so you do not neccessarily need a board view to connect this.

    Bios>>>>>>>>Pi
    Pin 1 CS# >> pin 24
    Pin 2 MISO >> pin 21
    Pin 3 WP# >> pin 17
    Pin 4 GND >> pin 25
    Pin 5 MOSI >> pin 19
    Pin 6 SCLK >> pin 23
    Pin 7 Hold# >> pin 17
    Pin 8 3.3V >> pin 17


    The following picture shows which pin on the bios goes to which pin on the raspberry pi.
    [Only Registered and Activated Users Can See Links. Click Here To Register...]

    The following picture shows the pin out on the raspberry pi 2, if you have a different version you will need to look up the pinouts for it.
    [Only Registered and Activated Users Can See Links. Click Here To Register...]

    Now for the SOIC clip i run wires from the pi to the breadboard and then plug the clip into the breadboard.

    For MBA's i run wires directly from the pins to the logic board. but after discovering this [Only Registered and Activated Users Can See Links. Click Here To Register...] will be incorporating this into my setup. and hopefully ghosts MBA clip will get produced i would also incorporate that as well.

    ---------------------------------------------------Reading the Bios---------------------------------------------------------------

    Hopefully you were able to figure out how to wire the bios and pi together. You will need to ensure they have a good connection to be able to successfully read and write to the bios.

    1. Get on to your computer and open up Putty and SSH into your pi. Username: pi Password: raspberry

    2. If your connection is good and all the wires in the correct configuration. We will need to run these commands. MacBook Pros and Airs only have 2 different types of bios chips.

    --sudo flashrom -p linux_spi:dev=/dev/spidev0.0 (run this command to find out which chip you have)

    You will then either need to do one of these 2 commands.

    -sudo flashrom -r ~/efi/read1.bin -V -p linux_spi:dev=/dev/spidev0.0 -c "MX25L6406E/MX25L6408E"
    or
    -sudo flashrom -r ~/efi/read1.bin -V -p linux_spi:dev=/dev/spidev0.0 -c "N25Q064..3E"

    if you get "no EEPROM chip found" on either of these then make sure you have everything wired correctly. If you are 100% sure everything is connect correctly then there may be a possibility that the bios chip is completely dead. But if your bios chip is completely dead then your macbook should not boot at all.

    Now that past command will make a file called read1.bin in the efi directory/folder.

    You should do that command 3 times to ensure you are getting a good reading. read1.bin, read2.bin, and read3.bin you will need to make sure you change that in the command line so you are not overwriting the same file.

    now if you type the command

    -cd efi
    -lis

    You should see the 3 read files.

    ------------------------------------------------------Editing the Bios File--------------------------------------------------------------------

    We will now open a command prompt in windows in administrator mode. (Click start button type in cmd and then right click on the file and click Run as administrator)

    We will now be transfering the file from the pi to the computer using that pscp file we downloaded and moved into the system32 folder.

    In the command prompt do the following command. Make sure the ipaddress matches the ipaddress of the pi we wrote down earlier.
    -pscp pi@192.168.1.XX:/home/pi/efi/read1.bin C:\Users\your username here\Desktop\
    -pscp pi@192.168.1.XX:/home/pi/efi/read2.bin C:\Users\your username here\Desktop\
    -pscp pi@192.168.1.XX:/home/pi/efi/read3.bin C:\Users\your username here\Desktop\

    This will copy the 3 files to your desktop on your computer. Right click on each one and select properties, they should all have the exact same size, if not you should do the read again and ensure a good connection.

    Now we will be applying a new ME region as well as ensuring the serial number is correct for your logic board.

    No go head and download the Management Engine Region, [Only Registered and Activated Users Can See Links. Click Here To Register...]

    In the section B1 find the right link for Apple as well as on that matches your processor on the board.

    Now we will open HxD program we downloaded and installed earlier. In this program open one of the Read1 files on your desktop, as well as open the ME region we just downloaded.

    Now select the ME region tab we just downloaded, in the right hand column that looks like a bunch of random characters, right click it and click select all. Take a look at the length at the bottom of the windows, it will probably either be "11F000" or like "11E000". Keep note of this.

    Now right click again and click copy. Switch over to the read1 tab and press ctrl+f and type in KRID. Check the All circle in the search box to search in all directions. Now when you find krid you will need to select the first line in front of the € symbol. Make sure you have selected the absolutely first part. Pointing here in this picture.

    [Only Registered and Activated Users Can See Links. Click Here To Register...]


    Right click and and click on select block. In the box select the length circle and type in the length that we wrote down earlier "11F000" and click ok.

    This will select the same exact length of block that the ME region will replace. Right click on the selection and click paste write. This will overwrite all the code there and replace it with a clean ME region.

    Next if you pulled the bios from another board you will need to make sure the serial number is correct for your logic board.

    Press crtl+f again and search for hwc. Make sure the all direction is selected again. If you do not see the word serial and what looks like a serial number next to it. Press F6 to go to the "hwc" keep going till you find the word serial and what looks like an actual serial number. Highlight the serial number and type in the new one.

    Now you can save the read1 file. and we will get ready to write it back to the bios.

    --------------------------------------------------------Writing the file back to the bios---------------------------------------------------

    Now back in Putty SSH into your Raspbery Pi, and run the command

    -sudo chmod -R 777 efi

    This will make this directory accessible for reading and writing.

    Now open a CMD prompt in windows again with administrator rights, we will now transfer the read1.bin file back to the pi. run the following command.

    -pscp C:\Users\your username here\Desktop\read1.bin pi@192.168.1.XX:/home/pi/efi/

    It should ask you for the password to the pi in order to transfer the file.

    Once the file transfer is complete we will now write the .bin file back to the bios.(Make sure you wires are hooked up correctly still.) Open up putty again and enter the following command.

    -sudo flashrom -w ~/efi/read1.bin -V -p linux_spi:dev=/dev/spidev0.0 -c "MX25L6406E/MX25L6408E"
    or
    -sudo flashrom -w ~/efi/read1.bin -V -p linux_spi:dev=/dev/spidev0.0 -c "N25Q064..3E"

    Depending on what chip you have.

    Once it finishes, it should also Verify that the writing process was successful.

    Congratulations you have now fixed your own bios file.


    I want to make sure i give credit to the people that have helped me get this far.

    -www.ghostlyhaks.com for making a great tutorial on how to setup and connect to the bios
    -CygnusX1 over at Ghostlyhaks for giving me direct help on some of my problems in this quest
    -Louis Rossmann for helping me get this far in board repair
    -As well as the great users of this forum for helping each other out all the time.


    There may be some mistakes in this tutorial and hopefully I will be able to update it and make it more complete. Thanks everyone.
    Last edited by Rykono; 03-08-2017 at 09:26 AM.

  2. The Following 14 Users Say Thank You to Rykono For This Useful Post:

    alanduy21 (11-30-2016), Gurmon (03-20-2016), jadao (06-18-2016), lakai (01-20-2017), Martin Hempel (03-29-2016), nhattamlaptop (04-06-2017), overflow (02-16-2017), overshoot (02-12-2017), Rupert Handford (04-18-2016), sargfowler (03-19-2016), sbyseven (09-04-2016), sjword (06-17-2016), SnyggLeif (04-19-2016), widerstandproject (10-11-2016)

  3. #2
    Senior Member
    Join Date
    Aug 2015
    Location
    Washington DC
    Posts
    296
    Thanks
    17
    Thanked 45 Times in 23 Posts

    Re: How to use a raspberry pi to connect to your macbook bios, How to clean ME Region and change ser

    Two of the images in the Wiring section are not working. If any mod or admin could give me rights to edit this post it would be appreciated.

  4. The Following 3 Users Say Thank You to Rykono For This Useful Post:

    mitchW (03-18-2016), sjword (03-18-2016), splee (03-18-2016)

  5. #3
    Moderator
    Join Date
    Aug 2015
    Posts
    706
    Thanks
    112
    Thanked 158 Times in 124 Posts

    Re: How to use a raspberry pi to connect to your macbook bios, How to clean ME Region and change ser

    I haven't had time to read through this or try it, but THANK YOU Rykono for taking the time and effort to post this; I don't know much about ME regions (yet!), but I can tell by the amount of information you provided it will be very useful in the future.

  6. #4
    Senior Member
    Join Date
    Aug 2015
    Location
    Washington DC
    Posts
    296
    Thanks
    17
    Thanked 45 Times in 23 Posts

    How to use a raspberry pi to connect to your macbook bios, How to clean ME Re...

    Well i guess it should be good to point out the signs of a bad bios.

    If the bios chip itself is completely fried the macbook wont even turn on and you will need to replace the chip and then do all of this.

    -Typically a bad bios will show up in ASD saying no management engine found

    -your macbook turns on, can even chime, but sits at a black screen

    -your macbook turns on chimes and even gets to loading but freezes on loading bar(sometimes this could be an SMC issue as well)






    The Pizza Guy
    Owner of Board Level Repair (Subsidiary of eAsset Solutions)
    [Only Registered and Activated Users Can See Links. Click Here To Register...]

  7. The Following User Says Thank You to Rykono For This Useful Post:

    NewbieTech99 (09-27-2016)

  8. #5
    Administrator
    Join Date
    May 2014
    Location
    Florida, USA
    Posts
    1,111
    Thanks
    56
    Thanked 894 Times in 319 Posts

    Re: How to use a raspberry pi to connect to your macbook bios, How to clean ME Region and change ser

    Quote Originally Posted by Rykono [Only Registered and Activated Users Can See Links. Click Here To Register...]
    Two of the images in the Wiring section are not working. If any mod or admin could give me rights to edit this post it would be appreciated.
    PM me the changes that you want to make.
    [Only Registered and Activated Users Can See Links. Click Here To Register...]
    [Only Registered and Activated Users Can See Links. Click Here To Register...]

  9. #6
    Senior Member
    Join Date
    Jan 2016
    Location
    los angeles
    Posts
    204
    Thanks
    2
    Thanked 16 Times in 11 Posts

    Re: How to use a raspberry pi to connect to your macbook bios, How to clean ME Region and change ser

    wow thank you man ! I hope I can try this soon !
    Hey Im fixing boards!

  10. #7
    Senior Member
    Join Date
    Jul 2014
    Location
    New York
    Posts
    695
    Thanks
    2
    Thanked 293 Times in 186 Posts

    Re: How to use a raspberry pi to connect to your macbook bios, How to clean ME Region and change ser

    One of the best students I've ever had. I am proud to have had you at the course.

    He is a prime example of what can be learned in a short period of time if you are determined and put your mind to it!

    And contributing back to the community as well. Tears of joy here, tears of joy.

  11. #8
    Member
    Join Date
    Aug 2015
    Posts
    52
    Thanks
    21
    Thanked 14 Times in 8 Posts

    Re: How to use a raspberry pi to connect to your macbook bios, How to clean ME Region and change ser

    Very nice! We've had to use this method to change the serial # on a used board for a few of our clients (schools) that get angry when their inventory software shows a different serial # and we aren't able to get blank serial number boards.

    I believe that you can also clear the serial # so that it can be changed by the blank board serializer tool. A string of 12 spaces will not work, the string is either "systemserial" or "SystemSerial" I don't really remember. Not a lot of testing on that because once I've got the spi ROM I'll just change it to the correct one and reflash.

  12. #9
    Senior Member
    Join Date
    Aug 2015
    Location
    Washington DC
    Posts
    296
    Thanks
    17
    Thanked 45 Times in 23 Posts

    How to use a raspberry pi to connect to your macbook bios, How to clean ME Region and change serial

    Heres my new setup for this




    Sent from my iPhone using Tapatalk
    Owner of Board Level Repair (Subsidiary of eAsset Solutions)
    [Only Registered and Activated Users Can See Links. Click Here To Register...]

  13. The Following 2 Users Say Thank You to Rykono For This Useful Post:

    iamthebehr (03-30-2016), Tellyman (03-30-2016)

  14. #10
    Senior Member
    Join Date
    Jan 2016
    Location
    los angeles
    Posts
    204
    Thanks
    2
    Thanked 16 Times in 11 Posts

    Re: How to use a raspberry pi to connect to your macbook bios, How to clean ME Region and change ser

    [Only Registered and Activated Users Can See Links. Click Here To Register...]

    hi man this is the right model to buy right?

    what kind of charger uses?
    Hey Im fixing boards!

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •