Tinker Board Forum

Full Version: Can I build Android image from Android SDK myself?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
(03-19-2018, 01:23 AM)jamess Wrote: [ -> ]
(03-17-2018, 12:42 AM)samsonluk Wrote: [ -> ]@jamess: At the final stage of the build, looks to me it is possible to generate an OTA image for the Tinker Board from mkimage.sh.  Can I make use of the output image to update the existing system and application software without writing a new sdcard? What would be the procedures for OTA upgrade? Thanks!

Hi, samsonluk
    OTA is a google native function , I think it should be work. But I need to say honestly, I have not tested the OTA function. We will try to test it.

(03-22-2018, 05:47 AM)samsonluk Wrote: [ -> ]I see, so it attempt to look for micro usb in the otg, is it possible to made use of usb flash drive connected to the usb port?

I manage to generate the OTA update.zip but it is too big for putting in /cache, still no luck with it...  tried copy it to /data and saw the little Android green man show up after "adb reboot recovery" but it failed with the following output
Quote:Supported API: 3
Finding update package...
Opening update package...
Verifying update package...
Installing update...
Target:  Android/rk3288/rk3288:6.0.1/MXC89K/root03220008:userdebug/test-keys
E: Error in /data/OTA.zip
(Status 0)
Installation aborted.

Hi samsonluk,

After testing, we have a good news on OTA. Big Grin 

1. You can apply this patch (patch_for_OTA.diff) in /bootable/recovery and rebuild a full image into TinkerBoard.

2. Build an OTA package and rename it into update.zip.
$ source build/envsetup.sh
$ lunch rk3288-userdebug
$ make otapackage -j16
(New OTA package will under /out/target/product/rk3288/)

3. Using a usb storage to put OTA package (update.zip) into Tinker Board (recommended under /data/media/0/).
Plugging in usb storage will auto-detect your new OTA package.
Then you can update new image into TinkerBoard.
So when we have now the neccessary source code, maybe someone could implement this important feature https://tinkerboarding.co.uk/forum/thread-668.html
And it would be greate if the 3,5mm Audio Jack can be used for A2DP so Mic (external) and Audio Out connected to car speakers with Y-Splitter.

Thanks & Greets
(03-23-2018, 10:31 AM)TW_Lyle Wrote: [ -> ]After testing, we have a good news on OTA. Big Grin 

1. You can apply this patch (patch_for_OTA.diff) in /bootable/recovery and rebuild a full image into TinkerBoard.

2. Build an OTA package and rename it into update.zip.
$ source build/envsetup.sh
$ lunch rk3288-userdebug
$ make otapackage -j16
(New OTA package will under /out/target/product/rk3288/)

3. Using a usb storage to put OTA package (update.zip) into Tinker Board (recommended under /data/media/0/).
Plugging in usb storage will auto-detect your new OTA package.
Then you can update new image into TinkerBoard.

Thanks TW_Lyle!  I will try the patch and get back...

One quick question, do I need to apply the OTA against a 'make dist' full installation?

Am I correct that /data/media/0/ is the same as /sdcard? Plugging in usb storage do you mean via the otg?
(03-23-2018, 10:31 AM)TW_Lyle Wrote: [ -> ]After testing, we have a good news on OTA. Big Grin 

1. You can apply this patch (patch_for_OTA.diff) in /bootable/recovery and rebuild a full image into TinkerBoard.

2. Build an OTA package and rename it into update.zip.
$ source build/envsetup.sh
$ lunch rk3288-userdebug
$ make otapackage -j16
(New OTA package will under /out/target/product/rk3288/)

3. Using a usb storage to put OTA package (update.zip) into Tinker Board (recommended under /data/media/0/).
Plugging in usb storage will auto-detect your new OTA package.
Then you can update new image into TinkerBoard.

No luck...

Apply patch:
cd [source tree]
patch -p1 < patch_for_OTA.diff
patching file updater/install.c

Re-build a full system:
source build/envsetup.sh
lunch rk3288-userdebug
make -j8
./mkimage.sh ota
cd [source tree]/RKTools/linux/Linux_Pack_Firmware/rockdev_rk3288
./collectImages.sh && ./mkupdate.sh
Load update.img to SpiImageTools.exe prepare sdcard image
Reboot TB with the new build sdcsrd

Update source:
cd [source tree]
repo sync -c -d

Generate OTA update.zip:
cd [source tree]
make otapackage
rename/transfer output update.zip to TB

Method 1
adb push update.zip /data/media/0
Reboot to install update after update.zip being detected in /sdcard/
[Image: IbVrNk6.jpg]

Method 2
adb shell
#cd /cache/recovery
#echo "--update_package=/data/media/0/update.zip" > command
# cat command
--update_package=/data/media/0/update.zip
# ls -l /data/media/0/update.zip
-rw-rw-rw- root     root     291464247 2018-03-24 00:52 update.zip

adb reboot recovery
[Image: eTtgRmu.jpg]
As @samsonluk I faced the same error. I have tried a third version:
Selected 'Apply update from ADB' from recovery menu and sent update.zip via 'adb sideload out/target/product/rk3288/update.zip'
Same error messages.
(03-24-2018, 01:39 AM)samsonluk Wrote: [ -> ]
(03-23-2018, 10:31 AM)TW_Lyle Wrote: [ -> ]After testing, we have a good news on OTA. Big Grin 

1. You can apply this patch (patch_for_OTA.diff) in /bootable/recovery and rebuild a full image into TinkerBoard.

2. Build an OTA package and rename it into update.zip.
$ source build/envsetup.sh
$ lunch rk3288-userdebug
$ make otapackage -j16
(New OTA package will under /out/target/product/rk3288/)

3. Using a usb storage to put OTA package (update.zip) into Tinker Board (recommended under /data/media/0/).
Plugging in usb storage will auto-detect your new OTA package.
Then you can update new image into TinkerBoard.

No luck...

Apply patch:
cd [source tree]
patch -p1 < patch_for_OTA.diff
patching file updater/install.c

Re-build a full system:
source build/envsetup.sh
lunch rk3288-userdebug
make -j8
./mkimage.sh ota
cd [source tree]/RKTools/linux/Linux_Pack_Firmware/rockdev_rk3288
./collectImages.sh && ./mkupdate.sh
Load update.img to SpiImageTools.exe prepare sdcard image
Reboot TB with the new build sdcsrd

Update source:
cd [source tree]
repo sync -c -d

Generate OTA update.zip:
cd [source tree]
make otapackage
rename/transfer output update.zip to TB

Method 1
adb push update.zip /data/media/0
Reboot to install update after update.zip being detected in /sdcard/
[Image: IbVrNk6.jpg]

Method 2
adb shell
#cd /cache/recovery
#echo "--update_package=/data/media/0/update.zip" > command
# cat command
--update_package=/data/media/0/update.zip
# ls -l /data/media/0/update.zip
-rw-rw-rw- root     root     291464247 2018-03-24 00:52 update.zip

adb reboot recovery
[Image: eTtgRmu.jpg]

(03-25-2018, 02:18 PM)lobo Wrote: [ -> ]As @samsonluk I faced the same error. I have tried a third version:
Selected 'Apply update from ADB' from recovery menu and sent update.zip via 'adb sideload out/target/product/rk3288/update.zip'
Same error messages.

Thank you for feedback .

I can reproduce the same error and feel sorry for some mistake in patch.

if you 'repo sync' new code , remind to full build you source code before making otapackage.

Update a new patch (new_patch_for_OTA.diff)

[attachment=194]
Thank you, I will try tomorrow.
(03-26-2018, 12:06 PM)TW_Lyle Wrote: [ -> ]I can reproduce the same error and feel sorry for some mistake in patch.

if you 'repo sync' new code , remind to full build you source code before making otapackage.

Update a new patch (new_patch_for_OTA.diff)


Confirmed, it works!!!  Thanks for the patch!

Am I correct that 'make otapackage' will do same thing as a full 'make' just with additional of creating ota zip file? So all I need to update the existing system is to:

1) repo sync
2) make otapackage
3) rename/copy ota zip file to /sdcard
(03-28-2018, 05:51 AM)samsonluk Wrote: [ -> ]
(03-26-2018, 12:06 PM)TW_Lyle Wrote: [ -> ]I can reproduce the same error and feel sorry for some mistake in patch.

if you 'repo sync' new code , remind to full build you source code before making otapackage.

Update a new patch (new_patch_for_OTA.diff)


Confirmed, it works!!!  Thanks for the patch!

Am I correct that 'make otapackage' will do same thing as a full 'make' just with additional of creating ota zip file? So all I need to update the existing system is to:

1) repo sync
2) make otapackage
3) rename/copy ota zip file to /sdcard

Hi samsonluk,

Thank you for feedback.  

Question 1.  Am I correct that 'make otapackage' will do same thing as a full 'make' just with additional of creating ota zip file?
1. Yes, you can see differences in /build/core/Makefile .

Question 2.
So all I need to update the existing system is to:
1) repo sync
2) make otapackage 
3) rename/copy ota zip file to /sdcard

If there is no new change in /u-boot and /kernel, you don't need to rebuild /u-boot and /kernel between step (1) and (2).
**Strongly recommend to full build if you re-sync code.
@TW_Lyle:
Could you please check why from within recovery still failed to mount /sdcard?
Pages: 1 2 3 4