Hovatek
  • Private Support
  • Blog
  • Home
Login Register Ask Question Hello There, Guest!
Login
Username:
Password: Lost Password?
 

OR

       

Hovatek is hiring: Application is open to residents of Lagos, Nigeria only! Click Here To Apply
Telegram Channel: Join the discussions @ t.me/Hovatek


  1. Hovatek Forum
  2. DEVELOPMENT
  3. Android
 
Thread Rating:
  • 0 Vote(s) - 0 Average

Thread Modes

Signing own android build with AVBv1

AreYouLoco?
Enthusiastic Member
Posts: 5
Threads: 1
Joined: Jan 2020
Reputation: 0
#1

04-01-2020, 03:44 AM


Hi, I have a device its Blackview BV9600 Pro (MT6771) which is a brick now because I might have damaged the screen tape on the way somehow and doesnt show any output on the screen. Wasted money since it was new but its good enough to make further experiments on it. I have taken it apart so I have access to the board and images of the stock partitions. Planning to identify serial port and solder jumpers to get bootloader/kernel log to see if it works. I am able to flash with SP Flash Tools. But stock tjat worked with previous soft-bricked attempts is not resurecting the device no more. Nevermind.

Long story short the bootloader probbably has color states which are green yellow orange and red. As in google docs about verified boot: Signed stock, locked bootloader is green; unlocked bootloader and custom rom state is orange. Red is locked custom rom (doesnt allow to boot) and the missing state according to docs I would like to achieve is possible yellow which is whole correctly self-signed rom booting with locked bootloader. How do I verify if its possible?


I am new to Android Verified Boot and I've read in docs that it should have vbmeta partition with pub keys but it is not there (AVBv1 or AVBv1.1 but not AVBv2.0 for sure) and the keys are somehow appended to the signed stock boot partition which I cannot unsign/unpack correctly. Only worked partially with osm0sis scripts to see that there is some binary file inside called boot-verified. And it might be the one with keys.

How do I replace keys that I am gling to use to sign my own boot.img? For now no kernel sources yet but working on port and anoyying company to give stock kernel sources. Rom building, rooting, unlocking bootloader is not a problem at all so not related and please do skip that part unless well argumented. I have generated my own keys already and to sign each partition should not be a problem as well with android google docs. But how to tell the kernel to use my self-signed keys and ignore vendor/google/root key? And how to append them to the boot-signed.img?

Anybody got some experience with AVB on mediatek devices and Verified Boot? Thanks for any tips. Seriously

Find
Reply
X3non
Hovatek Representative
Posts: 18,453
Threads: 550
Joined: Jul 2014
Reputation: 326
#2

04-01-2020, 09:36 AM
(04-01-2020, 03:44 AM)AreYouLoco? Wrote:  Hi, I have a device its Blackview BV9600 Pro (MT6771) which is a brick now because I might have damaged the screen tape on the way somehow and doesnt show any output on the screen. Wasted money since it was new but its good enough to make further experiments on it. I have taken it apart so I have access to the board and images of the stock partitions. Planning to identify serial port and solder jumpers to get bootloader/kernel log to see if it works. I am able to flash with SP Flash Tools. But stock tjat worked with previous soft-bricked attempts is not resurecting the device no more. Nevermind.

Long story short the bootloader probbably has color states which are green yellow orange and red. As in google docs about verified boot: Signed stock, locked bootloader is green; unlocked bootloader and custom rom state is orange. Red is locked custom rom (doesnt allow to boot) and the missing state according to docs I would like to achieve is possible yellow which is whole correctly self-signed rom booting with locked bootloader. How do I verify if its possible?


I am new to Android Verified Boot and I've read in docs that it should have vbmeta partition with pub keys but it is not there (AVBv1 or AVBv1.1 but not AVBv2.0 for sure) and the keys are somehow appended to the signed stock boot partition which I cannot unsign/unpack correctly. Only worked partially with osm0sis scripts to see that there is some binary file inside called boot-verified. And it might be the one with keys.

How do I replace keys that I am gling to use to sign my own boot.img? For now no kernel sources yet but working on port and anoyying company to give stock kernel sources. Rom building, rooting, unlocking bootloader is not a problem at all so not related and please do skip that part unless well argumented. I have generated my own keys already and to sign each partition should not be a problem as well with android google docs. But how to tell the kernel to use my self-signed keys and ignore vendor/google/root key? And how to append them to the boot-signed.img?

Anybody got some experience with AVB on mediatek devices and Verified Boot? Thanks for any tips. Seriously

what you plan to do will not work, only the OEM's keys will work on the device and they most certainly won't hand it to you
if you can't get stock signed firmware from them to repair the device (check the blackview website and contact their support team) then either send the device to them for repair or discard
Find
Reply
AreYouLoco?
Enthusiastic Member
Posts: 5
Threads: 1
Joined: Jan 2020
Reputation: 0
#3

04-01-2020, 04:47 PM
How do you know it wont work on that device? Some source or info to confirm that?

I am not able to send it back. And I dont even want to I crack opened it so no any guarantee or whatsover anyway. And not like I did even care about that from the begining.

I do have signed stock. But it doesnt fix it anyway. I suspect hardware damage. So thats why I want to use it anyway to experiment.

Any other follow-ups?
Find
Reply
hovatek
Administrator
*******
Posts: 46,775
Threads: 1,179
Joined: Oct 2013
Reputation: 422
#4

04-01-2020, 07:56 PM
(04-01-2020, 03:44 AM)AreYouLoco? Wrote:  Hi, I have a device its Blackview BV9600 Pro (MT6771) which is a brick now because I might have damaged the screen tape on the way somehow and doesnt show any output on the screen. Wasted money since it was new but its good enough to make further experiments on it. I have taken it apart so I have access to the board and images of the stock partitions. Planning to identify serial port and solder jumpers to get bootloader/kernel log to see if it works. I am able to flash with SP Flash Tools. But stock tjat worked with previous soft-bricked attempts is not resurecting the device no more. Nevermind.

Long story short the bootloader probbably has color states which are green yellow orange and red. As in google docs about verified boot: Signed stock, locked bootloader is green; unlocked bootloader and custom rom state is orange. Red is locked custom rom (doesnt allow to boot) and the missing state according to docs I would like to achieve is possible yellow which is whole correctly self-signed rom booting with locked bootloader. How do I verify if its possible?


I am new to Android Verified Boot and I've read in docs that it should have vbmeta partition with pub keys but it is not there (AVBv1 or AVBv1.1 but not AVBv2.0 for sure) and the keys are somehow appended to the signed stock boot partition which I cannot unsign/unpack correctly. Only worked partially with osm0sis scripts to see that there is some binary file inside called boot-verified. And it might be the one with keys.

How do I replace keys that I am gling to use to sign my own boot.img? For now no kernel sources yet but working on port and anoyying company to give stock kernel sources. Rom building, rooting, unlocking bootloader is not a problem at all so not related and please do skip that part unless well argumented. I have generated my own keys already and to sign each partition should not be a problem as well with android google docs. But how to tell the kernel to use my self-signed keys and ignore vendor/google/root key? And how to append them to the boot-signed.img?

Anybody got some experience with AVB on mediatek devices and Verified Boot? Thanks for any tips. Seriously

Some devices do accept self signed boot images on a locked bootloader. We've not tested this with the Blackview. We have access to a BV5900 and are interested in testing how Blackview handles self signed images.
What X3non meant is that if what we've been encountering lately is anything to go by then this might not work. Its absolutely worth a shot and we're game if you're ready to test too.
Question is how do you test since your device is faulty?

Note!
We have a reply schedule for Free Support. Please upgrade to Private Support if you can't wait.
(This post was last modified: 04-01-2020, 08:02 PM by hovatek.)
Website Find
Reply
AreYouLoco?
Enthusiastic Member
Posts: 5
Threads: 1
Joined: Jan 2020
Reputation: 0
#5

04-01-2020, 08:17 PM
*TO BE DELETED*
(This post was last modified: 04-01-2020, 08:40 PM by AreYouLoco?.)
Find
Reply
AreYouLoco?
Enthusiastic Member
Posts: 5
Threads: 1
Joined: Jan 2020
Reputation: 0
#6

04-01-2020, 08:34 PM
Thx @hovatek for your interest. I am willimg to test and see what I can get from that device (and if to fix or buy new one) for sure thats the whole point.

As for how to test... Thats a bit tricky with no screen working but if I am going to manage to identify serialTTY and connect there and see output of the bootloader and/or kernel then I know if its booting or not. That should be enough. Then I could force usb.debbuging=1 and get shell after it boots.

For now the bootloader state is unlocked. And I could lock it back blind when I am in fastboot mode. Just the command to lock and UP button to confirm. And SP Flash Tools are working fine for flashing stuff. That should be enough to test, no?

The bigger problem would be if there is accually something broken for good with the SoC or memory. I am going to test memory with SP Flash Tools and report.

Are you willing to invest some time in research?
Find
Reply
hovatek
Administrator
*******
Posts: 46,775
Threads: 1,179
Joined: Oct 2013
Reputation: 422
#7

04-01-2020, 08:42 PM
(04-01-2020, 08:17 PM)AreYouLoco? Wrote:  Well thx for interest. I am willing to test. It is faulty but if I get console output from serial TTY then I do not need screen to see if it boots.

Lets know once you succeed with that

Note!
We have a reply schedule for Free Support. Please upgrade to Private Support if you can't wait.
Website Find
Reply
AreYouLoco?
Enthusiastic Member
Posts: 5
Threads: 1
Joined: Jan 2020
Reputation: 0
#8

02-02-2020, 06:42 PM
Just pinging myself so the subject will not get closed because of inactivity. I am just super busy now. But will get into that when I have possibility.
Find
Reply
« Next Oldest | Next Newest »

Share

Share Tweet Share Share Pin


Possibly Related Threads…
Thread / Author Replies Views Last Post
Issue signing system image using avbtool
romelley
7
327
Last Post by X3non
06-01-2021, 10:56 AM
Alldocube iplay 20 (Unisoc) - Signing Custom Vbmeta/partitions
natureboy
4
807
Last Post by JamesAt15
25-09-2020, 02:45 PM
How to generate a custom signing key (.pem) using OpenSSL
hovatek
0
1,637
Last Post by hovatek
12-03-2020, 07:20 PM
Please build recovery for my Android 5.1 phone LYF flame 6
Neeraj80
0
1,013
Last Post by Neeraj80
15-09-2016, 06:00 AM
how can we develop our own themes for any android mobile
anil dasari
5
2,401
Last Post by hovatek
24-08-2016, 04:26 PM

  • View a Printable Version


Users browsing this thread: 1 Guest(s)
  1. Hovatek Forum
  2. DEVELOPMENT
  3. Android

About

The Hovatek Forum is a free Tech. Support Forum. We provide solutions to all your device related problems and questions. We'll love to have you participate in discussions here whether you're a Newbie or Experienced.

         

Forum Team

Powered By MyBB. Crafted by EreeCorp.




Linear Mode
Threaded Mode