PINE64
How to create the img file to use with etcher once you build the android SDK? - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: ROCKPRO64 (https://forum.pine64.org/forumdisplay.php?fid=98)
+--- Forum: Android on RockPro64 (https://forum.pine64.org/forumdisplay.php?fid=100)
+--- Thread: How to create the img file to use with etcher once you build the android SDK? (/showthread.php?tid=7716)



How to create the img file to use with etcher once you build the android SDK? - dazza5000 - 07-18-2019

How do we construct the single .img file like the one that is distributed on the wiki after we build the Android ROM?

I found these steps for flashing:

rkdeveloptool is here: http://opensource.rock-chips.com/wiki_Rkdeveloptool
Get the board into bootrom mode. Short the two pins next to the LEDs and hit reset.

Code:
cd rockdev/Image-rk3328_box
rkdeveloptool db MiniLoaderAll.bin
rkdeveloptool ef
rkdeveloptool gpt parameter.txt
rkdeveloptool ppt
rkdeveloptool ul MiniLoaderAll.bin
rkdeveloptool wlx uboot uboot.img
rkdeveloptool wlx trust trust.img
rkdeveloptool wlx misc misc.img
rkdeveloptool wlx baseparameter baseparameter.img
rkdeveloptool wlx resource resource.img
rkdeveloptool wlx kernel kernel.img
rkdeveloptool wlx dtbo dtbo.img
rkdeveloptool wlx vbmeta vbmeta.img
rkdeveloptool wlx boot boot.img
rkdeveloptool wlx recovery recovery.img
rkdeveloptool wlx system system.img
rkdeveloptool wlx vendor vendor.img
rkdeveloptool wlx oem oem.img
rkdeveloptool rd



RE: How to create the img file to use with etcher once you build the android SDK? - dazza5000 - 07-18-2019

There is a file at the very bottom here:


https://wiki.pine64.org/index.php/ROCKPro64_Software_Release


Under the section: Miscellaneous tools

I would like to know how to do this same process on linux


RE: How to create the img file to use with etcher once you build the android SDK? - octavian - 08-12-2019

Hi, dazza5000,
Did you manage to write the compiled OS on your RockPro? I\'ve compiled mine from sources and I've just written a few partitions but now it boots directly into Maskrom.\

I haven't had any luck in the past with Android 7.1 compiled from sources either.
Not sure what I'm doing wrong but it drives me crazy, especially that I only need to modify something in the device tree (enable SPI bus).

Also when I'm deflating the SDK archive, tar tells me that there are some corrupted files, still I was able to compile it without any fatal errors.

I did use your Docker container for the build environment, it's a very big help, thank you!

Do you have any advice for me? I would greatly appreciate some help.

Thanks,
Octavian


RE: How to create the img file to use with etcher once you build the android SDK? - octavian - 08-12-2019

(07-18-2019, 01:02 PM)dazza5000 Wrote: How do we construct the single .img file like the one that is distrIibuted on the wiki after we build the Android ROM?

I found these steps for flashing:

rkdeveloptool is here: http://opensource.rock-chips.com/wiki_Rkdeveloptool
Get the board into bootrom mode. Short the two pins next to the LEDs and hit reset.

Code:
cd rockdev/Image-rk3328_box
rkdeveloptool db MiniLoaderAll.bin
rkdeveloptool ef
rkdeveloptool gpt parameter.txt
rkdeveloptool ppt
rkdeveloptool ul MiniLoaderAll.bin
rkdeveloptool wlx uboot uboot.img
rkdeveloptool wlx trust trust.img
rkdeveloptool wlx misc misc.img
rkdeveloptool wlx baseparameter baseparameter.img
rkdeveloptool wlx resource resource.img
rkdeveloptool wlx kernel kernel.img
rkdeveloptool wlx dtbo dtbo.img
rkdeveloptool wlx vbmeta vbmeta.img
rkdeveloptool wlx boot boot.img
rkdeveloptool wlx recovery recovery.img
rkdeveloptool wlx system system.img
rkdeveloptool wlx vendor vendor.img
rkdeveloptool wlx oem oem.img
rkdeveloptool rd

I believe the tool you're looking for is located in `$SDK_ROOT/RKTools/Linux/Linux_Pack_Firmware`.
Reading the `mkupdate.sh` script, it seems to be doing exactly that. Not sure how the OTA packages for install in recovery are created, but those should have a .zip extension.


RE: How to create the img file to use with etcher once you build the android SDK? - dazza5000 - 08-13-2019

Hi octavian - i downloaded the sources a few times and each time the tool indicated a corruption during expansion.

I have successfully built the image, but haven't got the board to try it on yet.

These are the instructions I used:

https://forum.pine64.org/showthread.php?tid=7616&pid=47621#pid47621


RE: How to create the img file to use with etcher once you build the android SDK? - octavian - 08-17-2019

(07-18-2019, 01:02 PM)dazza5000 Wrote: How do we construct the single .img file like the one that is distributed on the wiki after we build the Android ROM?

I found these steps for flashing:

rkdeveloptool is here: http://opensource.rock-chips.com/wiki_Rkdeveloptool
Get the board into bootrom mode. Short the two pins next to the LEDs and hit reset.

Code:
cd rockdev/Image-rk3328_box
rkdeveloptool db MiniLoaderAll.bin
rkdeveloptool ef
rkdeveloptool gpt parameter.txt
rkdeveloptool ppt
rkdeveloptool ul MiniLoaderAll.bin
rkdeveloptool wlx uboot uboot.img
rkdeveloptool wlx trust trust.img
rkdeveloptool wlx misc misc.img
rkdeveloptool wlx baseparameter baseparameter.img
rkdeveloptool wlx resource resource.img
rkdeveloptool wlx kernel kernel.img
rkdeveloptool wlx dtbo dtbo.img
rkdeveloptool wlx vbmeta vbmeta.img
rkdeveloptool wlx boot boot.img
rkdeveloptool wlx recovery recovery.img
rkdeveloptool wlx system system.img
rkdeveloptool wlx vendor vendor.img
rkdeveloptool wlx oem oem.img
rkdeveloptool rd

Hi dazza5000,

This is the tool you're looking for, to create images that can be written with etcher. SD_Firmware_Tool._v1.46, you can find this in the RKTools directory in the SDK, however it's only for windows.

Btw, did you get your board? I was able to build mine but I'm having some weird problems with the U-boot from the SPI flash, it works if I just bypass it though Smile


RE: How to create the img file to use with etcher once you build the android SDK? - dazza5000 - 08-17-2019

I need a linux tool! I got my board yesterday and have been able to boot one of the android 7.1 images, but not the others. I think I might not have enough power, but also not sure.


RE: How to create the img file to use with etcher once you build the android SDK? - octavian - 08-18-2019

Try the SDCard versions as well (on an SDCard of course) It seems to be way more stable at the moment, slower but stable.
tllim said he'll release 8.1 SDK as well, so it might be worth giving the precompiled images a chance as well, I remember n the past that 8.1 worked nicely.


RE: How to create the img file to use with etcher once you build the android SDK? - webgourou - 01-22-2020

Hello,

I am also interested to do so, were you successfull ? could you help ?

Thanks

Aurel