[TOOL] RKLogoTool - replace/extract kernel pics on Rockchip devices - Miscellaneous Android Development

RK Logo Tool​
I want to share tool I did for own purposes, but I've seen it's wanted by many people. It can be used to extract all embeded pictures from kernel image, and then you can replace existing kernel logo and charging animation with your own. The program operates on ascii .PPM format which can be opened using IrfanView or GIMP, but remember that color palette has to be limted to 224 colors.
Download source and usage info: https://github.com/lolet/RKLogoTool
Tested on RK3066 and RK2096 device. Please leave feedback and attach kernel image if it fails on yours.

Related

Matsunichi/Innocomm 'Griffin' M6001 (aka Le Pan TC970) ICS/CM9 development thread

I am no longer working on this project (see the 3/15 update below).
However cas_xp is already working on porting ICS/CM9 to the LePan TC970.
The XDA thread with all his work is here: http://forum.xda-developers.com/showthread.php?t=1483954
(if anyone has a link to the thread specific to CM9 for the TC970, please let me know and I'll update the link above).
================================================================================
This thread is about gathering and sharing info about the hardware, firmware, Linux kernel and modules for the Mitsunichi/Innocom 'Griffin' M6001 tablet, aka Le Pan TC970 in order to be able to port ICS/CM9 to it, if possible.
I'd like to keep this thread about 'low-level' hardware/kernel, i.e. please do not post questions about rooting this tablet (it has already been done, see here: http://forum.xda-developers.com/showthread.php?t=1353951) or about problems with specific applications.
Since there are so many awesome developments in this thread, I decided to just put the interesting news and links here and move the historical info in the second post below.
Franco
================================================================================
Update 3/15/2012
Last Sunday flying back home they had me check-in with the regular luggage my bag with the LePan 970 and when I turned it back on at home that night, it had a bunch of stripes of dead pixels on the screen; it is pretty much unusable now.
Also my wife gave me a new different tablet (which already runs ICS) for my birthday yesterday, so at this point I won't be working on the LePan TC970 anymore.
I just saw that the great cas_xp is already working and making good progress on a version of CM9/ICS for the LePan TC970 (see here http://forum.xda-developers.com/showthread.php?t=1483954 and here https://github.com/cas-xp/device_lepan_griffin) and I wish the best of luck in this project.
I had really fun working on this tablet with all the people here (chinabull, cas_xp, and everyone else of course) and I am already working on the new one.
See you later,
Franco
================================================================================
Update 2/20/2012
I was finally able to compile all of CM9/ICS with specific files for the griffin/TC970 (no ROM yet).
All the details, how to get the files, and compile it on your PC are in the 'how-to' post ( http://forum.xda-developers.com/showpost.php?p=22007753&postcount=113).
Please do try to compile it yourself, but don't try to run those files on your tablet.
================================================================================
Update 2/7/2012
Big news!
cas_xp has released a beta version of Gingerbread/CM7 for the griffin/TC970. The thread with all the information is here: http://forum.xda-developers.com/showthread.php?t=1483954
Awesome job cas_xp!!!
================================================================================
Update 1/30/2012
I tried to put together an initial attempt of an 'how-to' docoment about trying to build CM9/ICS for the griffin/TC970 tablet (movie spoiler: no, I can't build/run ICS yet).
The link to the post is here: http://forum.xda-developers.com/showpost.php?p=22007753&postcount=113
I also created a github repository with the device specific code and configuration files to port CM9/ICS to this tablet (it is all in the post).
Comments, contributions to the code and conf files in the repo are most welcome!
================================================================================
Update 1/27/2012
cas_xp was able to get Gingerbread (CM7) running on the first time! (http://forum.xda-developers.com/showpost.php?p=21888312&postcount=93)!!!
Congratulations to cas_xp for this big success!
================================================================================
Update 1/22/2012
I finally found the time to write the Innocomm firmware 'packer' (and a newer version of 'unpacker'), so we can create our own firmwares for the TC970/griffin.
Since I thought it is better if I keep this post just for the progress updates for this this thread, I just put the descriptions on what 'unpacker 'and 'packer' do and how to use them here: http://forum.xda-developers.com/showpost.php?p=21707308&postcount=80.
Sometime I'll also clean up this post a little bit (and put all the historical information in the second post).
================================================================================
Update 1/19/2012
chinabull has created a working ClockworkMod Recovery for the LePan TC970/griffin; his post with all the instructions is here: http://forum.xda-developers.com/showpost.php?p=21563628&postcount=44.
Please read his whole post wuth all the instructions; please not that this is still a work in progress and that there are risks with your tablet involved with this installation; you may want to read all the posts after chinabull's to have an idea of the possible risks and workarounds.
Again my hat off to chinabull for this great achivement!
================================================================================
Update 18/1/2012
More great news!
chinabull figured out a way to replace Innocomm recovery with an already existing ClockworkMod, sign the firmware with this new version and install it on his tablet.
This means that we should now the able to build our own firmwares for the TC970/griffin.
Many thanks to chinabull for his awesome achievement!
================================================================================
You can find all the other information in the 'historical' log below.
This post is just to keep an archive of all the historical information about porting ICS/CM9 to the griffin/TC970 tablet.
Most of the information here has been superseded by the progress made more recently (see post #1), but I thought it would be useful to have it around, just in case.
Franco
================================================================================
Update 1/16/2012
Great news!
With chinabull's help, I found out how to generate the 20 bytes SHA1 checksum for trhe images contained in the firmware.
It is the SHA1 checksum of the image + the 'cafeefac' trailer + the length of the image (including the 'cafeefac' trailer).
I updated the C program 'unpacker.c' to also compute and check the SHA1 checksum.
The program can be compiled with the following command:
gcc -O -Wall -o unpacker unpacker.c -lz -lcrypto
We still haven't found out how to generate the 20 byte SHA1 checksum for the whole firmware, but I think we are very close now.
I'll also start writing the 'packer' because I think we'll have all the pieces in place very soon.
Many thanks to chinabull again for all his help.
Franco
================================================================================
Update 1/15/2012
What chinabull found is the CRC32-like checksum for the header of the firmware and for each of the images.
As he pointed out in the thread there is still a 20 bytes (160 bits) signature/checksum that we haven't figured out.
I updated the 'unpacker' code attached to this thread with the header CRC checksum stuff that chinabull found out.
The still unknown 160 bits field is displayed as 'signature/checksum' if you run the'unpacker'; if you figure out how to generate it from each image content, please let us know, since this is the last thing we need to know to be able to create ourown firmware images.
Franco
================================================================================
Update 1/13/2012
Very good news!
Chinabull figured out the algorithm used by Innocom to sign/checksum the images and the firmware!
This means that it should be possible to create our own firmware images (possibly with CWM recovery) and start replacing parts of the firmware on the TC970/griffin.
Congratulations to chinabull!
Franco
================================================================================
Update 1/8/12
First of all, thanks to the many who posted useful information about the hardware in this tablet and thanks for the comments (btw, negative critiques do not upset me, so don't worry about them, as long as they don't violate this forums policies).
I thought that in order to boot any alternative ROM or firmware it would be useful to find out how locked down Innocomm has made this tablet.
Since the CPU is an OMAP3630 and the Wifi is a WL1271 and they are the same on the Nook Color tablet and since we know that the TC970 can boot off the SD card using the same type of MLO x-loader and bootloader used by the Nook Color, I downloaded the Nook Color 'Monster Bootpack' SD card bootable images from here: http://code.google.com/p/monster-rootpack/downloads/list. They have a couple of 2GB SD card images there.
I tried both of them and in both cases I had the 'bad firmware image' screen, which seems to indicate that the Innocomm recovery boot checks for 'something' (beyond what a normal OMAP3630 does) in order to boot an MLO x-loader from the SD card.
At this point I thought I would try to discover the full format of the 'griffin.ifw' file, in order to be able to create our own ROM images.
I was able to decode a few more fields in the firmware (the memory load address and a few other value) and I have updated the attached 'unpacker.c' accordingly.
Unfortunately a couple of values are still unknown:
- one is a 28 byte (224 bits) field in the header of each image in the firmware - I strongly suspect it is some sort of checksum (224 bits is the length of a SHA224 checksum), but I haven't been able to find out how to generate that value (I tried doing SHA224 checksums of the image,the image+header, and other combinations, but without any luck). If someone here can find how to generate it, big reward!
- the second one is a 24 byte (192 bits) field in the header of the whole firmware - it is probably some other checksum/signature, but I haven't found out any kind of 192 bit signature to make sense of it, so big reward here too if you can figure out what it is.
Both values are printed out by this version of 'unpacker', so you can play around with it and let me know if you find anything.
Finally, I saw from the FCC schematics that the TC970 presents the OMAP3630 UART3/serial port on the 30 pin connector and I saw that one guy ('chinabull') in the TC970 rooting thread was able to connect to it and obtain a shell in recovery mode. My next step is going to be buying the $15 'podbreakout' from sparkfun Electronics (among others) http://www.sparkfun.com/products/8295 (I am not good with the soldering iron; if you are good and have patience, you may want to try with the $4 iPod connector from the same site) and connect to pins 17, 18, and the ground to have a serial connection and be able to see the actual messages when I try to boot with a different MLO x-loader (should be also useful to 'de-brick' the TC970, since I only have this tablet).
I'll let you know how it goes.
Franco
================================================================================
This thread is about gathering and sharing info about the hardware, firmware, Linux kernel and modules for the Mitsunichi/Innocom 'Griffin' M6001 tablet, aka Le Pan TC970 in order to be able to port ICS/CM9 to it, if possible.
I'd like to keep this thread about 'low-level' hardware/kernel, i.e. please do not post questions about rooting this tablet (it has already been done, see here: http://forum.xda-developers.com/showthread.php?t=1353951) or about problems with specific applications.
Below is what I found so far.
- Hardware
According to the application with the FCC, these are the most interesting components:
- Name: griffin
- Model: 6001
- Manifacturer: Innocomm
- Processor: TI OMAP3630 ES1.2
- LCD: LP097X02-SLA3 (transmitter: TI SN75LVDS83B)
- Power regulator: TI TWL5030
- Front facing camera: 2M pixel fixed focus CM8188-A200SF-E
- g-Sensor: BMA150
- e-Compass: YAS529-PZ
- light sensor: EPL5804
- gas gauge: OZ8805
- Wireless/Bluetooth/FM: TI WL1271-YFV
- GPS: GSD-4t
- Firmware:
Le Pan has apparentely two versions of its latest firmware, V4431 and V4431-2. My analysis below is based on the one with MD5 checksum f9cabf696f08f1c3791d0a4ec14876db.
I wrote the attached C program to extract all the 'images' (files) from the firmware.
The program can be compiled with the following command:
gcc -O -Wall -o unpacker unpacker.c -lz
(all these commands should work on Linux - Fedora 64 bit; you may have to change them to run them on a different version of Linux/OS).
The firmware is composed of the following nine 'images':
- recovery ('.cpio.gz' archive - it can be opened with the command: gzip -dc recovery | cpio -idm)
- linux (this is the actual Linux kernel; see more about it below)
- iload (same as the first stage 'MLO' x-loader binary in the firmware installation disk)
- iboot (same as the second stage 'iboot.ism' loader in the firmware installation disk)
- splash (probably a bitmap image for the splash screen)
- chargesplash (probably a bitmap image for the splash screen when charging)
- bootifw_logo (probably a bitmap image with the company logo to be displayed at boot time)
- ramdisk (.cpio.gz' archive - it can be opened with the command: gzip -dc ramdisk | cpio -idm)
- system (a YAFFS2 filesystem - it can be opened with the 'unyaffs' program - available here: http://code.google.com/p/unyaffs/downloads/list)
The griffin board is based on the TI OMAP3630 ARM CPU, which is the same used by the very popular BeagleBoard (http://beagleboard.org/). Most of the information available for the BeagleBoard apply to griffin, included the functions of the files MLO, iload, iboot (see here: http://omappedia.org/wiki/Bootloader_Project - OMAPpedia is definitely a good starting point here).
- Kernel and drivers:
The firmware file 'linux' is the actual Linux ARM kernel; it has some code at the beginning to uncompress it and the rest is a 'gzip' compressed file.
The actual uncompressed kernel can be extracted with the command:
dd if=linux bs=12878 skip=1 | gunzip -dc > kernel
I then ran 'strings -td -a kernel' and it looks like all the drivers are compiled into this kernel (also confirmed by the very few '.ko' files contained in 'system').
The 'strings' command shows the following lines toward the beginning:
183356 twl5030
183392 griffin-i2c-touch
183428 bma150
183464 yas529
183500 OZ8805
183536 epl5800-ls
183572 hynix253
183608 griffin-ha2608-tk
I think these are the drivers which we need to come up in order to be able to compile ICS/CM9 for this tablet.
Here is what I found about them:
- 'twl5030' is the power regulator for the OMAP board and it is already supported by Linux
- 'griffin-i2c-touch' is the capacitive touch screen (see more about it below)
- 'bma150' is the accelerometer and it is already supported by Linux
- 'yas529' is the magnetometer and it is already supported by Linux
- 'oz8805' is the gas gauge - I didn't find much about it
- 'epl5800-ls' is the light sensor - I didn't find much about it
- 'hynix253' is the 2M pixel camera - I didn't find much about it
- 'griffin-ha2608-tk' is the touch key - I found some code about it here http://topic.csdn.net/u/20110810/09/1a96d532-c517-4771-8bbe-d2dd4c980b4e.html
I started looking at the touch screen first, since it is probably the most critical component in this list (and the one that took some work to get to work correctly on the CM7 for the HP Touchpad).
The 'bootinfo.txt' log file posted on the TC970 rooting thread shows the following kernel message lines for the TS:
input: griffin-i2c-touch as /devices/virtual/input/input7
griffin-i2c-touch 2-0055: registered with irq (313)
Goodix TouchScreen Version:GT801NI_1R02_13T
griffin-i2c-touch 2-0055: Create proc entry success!
Goodix debug sysfs create success!
griffin-i2c-touch 2-0055: Start touchscreen griffin-i2c-touch in interrupt mode
which show that the TS is a Goodix GT801.
Search for Goodix Linux drivers, I found the following page (in Chinese) http://blog.csdn.net/baiduluckyboy/article/details/6616533. It looks like it contains the source code for the Linux driver for the TS and it looks like the driver is under the GPL license. Unfortunately the source code refers to a couple of include files ('goodix_touch.h' and 'goodix_queue.h') that I was not able to find anywhere. The guy who posted that source code might have them, I did not try to contact him. Also the 'goodix_touch.ko' kernel drivers out there refer to a source file 'goodix_touch_1024n.c' that I was not able to find either.
Interestingly enough, the schematics posted on the FCC site do not mention any Goodix chip at all (at least I wasn't able to find it there).
This is what I found so far; I'll add more updates as I find them.
I would also appreciate very much if anyone could post information about the source code for the drivers (or even developer's guides, SDKs, datasheets) for the touch screen (most important), the light sensor, the camera, the GPS, etc
Thanks,
Franco
If you want the kernel source, contact the manufacturer, as the Linux kernel is licenced under GPL and they need to release source!
From my fingers to your eyez
just in case 2
Best of luck!!!!
DerKoch
Sent from my SGH-I897 using XDA App
Good luck.
Appreciate the work to gather the info together, OP. Glad another soul fights for our shiny toy
Having a forum would help putting such info in stickies. Keep voting!
Vote +1 Le Pan forum here
As for source code... anyone threatening legal action yet? j/k ...
Dude, problem? Calm down, I think this is the best thread with all the infos right now.
10chars...
$30 US to the first person with a working CM7 (or CM9) custom ROM on the Le Pan, via Paypal!
gfinockio said:
$30 US to the first person with a working CM7 (or CM9) custom ROM on the Le Pan, via Paypal!
Click to expand...
Click to collapse
I'll give $50
Sent from my TC970 (Wi-Fi) using XDA Premium App
Thx OP, nice... Keep up the good work guys!
So, correct me if I am wrong. In theory the first step is to recreate a 2.2 'custom' kernel replace the existing one, repackage, and try to flash it and see if it works, right?
Worst case (assume the boot loader is not messed up), it should be able to flash back to the official ROM image, right?
(or I should say, first test is to replace the boot screen in ROM image to test repackage and see if it works... Yes I am aware you can change the boot logo in the filesystem afterwards but that's not the point)
I do plan to set up a build environment over the holiday, but I hope those alreay have experience can have a head start!
---------- Post added at 06:33 AM ---------- Previous post was at 06:02 AM ----------
OZ8805 Gas Gauge seems to be an obsolete product from O2Micro. However from some old document (http://www.docin.com/p-97287653.html or http://www.scribd.com/doc/61448457/o2m-Int-Power-Brochure) it shows the pin out which looks like I2C interface (SCL/SDA)
Hynix253 Camera:
Bit and piece of info
http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/100/t/135743.aspx
And looks like it is widely available in China for use in cell phone camera, however can't fins much specs other than a few photos. It is made by 冠普科技. http://detail.china.alibaba.com/buyer/offerdetail/891985423.html
ePL580x Light sensor:
according to this page http://www.computex.biz/elan/default.aspx?pagetype=ProductDetail&pdt_id=38766&cid=561 it is made by ELAN Microelectronics Corp. http://www.emc.com.tw But I can't seems to find the product on their website
Digging continues...
I was able to find this website with
more on the tablet. I tried to email them for more information but idk if it sent to them. Maybe someone else can try on a PC, only have my phone for now....
Edit: forgot the Website. http://211.72.69.29/en/product5802.html
So here it is
Sent from my i777 high in the sky
colbynmeghan said:
I was able to find this website with
more on the tablet. I tried to email them for more information but idk if it sent to them. Maybe someone else can try on a PC, only have my phone for now....
Sent from my i777 high in the sky
Click to expand...
Click to collapse
what is the website?
There is a new firmware file on the horizon for the Le Pan TC 970. Not sure if that's of any importance to you...
gfinockio said:
There is a new firmware file on the horizon for the Le Pan TC 970. Not sure if that's of any importance to you...
Click to expand...
Click to collapse
Source?
Op, is there anything community members can do to help?
sockbot said:
Source?
Op, is there anything community members can do to help?
Click to expand...
Click to collapse
A member of le pan support is a member of the le pan group and asked a few members to test out the firmware. It should be released publicly soon.
Sent from my SPH-D710 using Tapatalk
Let us know if theres anything that can be done to help. Would love to see some CM9 port on this thing. Thanks again for the hard work. Keep it up.
Any info on significant changes, I'm pretty happy with the current firmware....
esunday said:
Any info on significant changes, I'm pretty happy with the current firmware....
Click to expand...
Click to collapse
There is a discussion on the new firmware here: http://forum.xda-developers.com/group.php?do=discuss&discussionid=1446&pp=10
It looks like it is mostly stability fixes but it is still a 2.2 firmware.
This thread is about getting a custom 2.3+ firmware on the TC 970 which I want so my apps behave as tablet apps instead of large phone apps. Ever notice how sometimes you see an app screenshot in landscape mode having two panels for navigation and content but when you actually download it it only shows the content? Its because the tablet can only act as a huge phone in 2.2. Need 2.3 and ideally 4.0 in order to have proper tablet behaviour.

[TOTURIAL](EASY GUIDE) How To Edit Boot.img (Changing/Editing RAMDISK+More)

I seen Many People Facing Problem in Changing RAMDISK.SO Here Is An Easy Guide. Hope it will help You
USE ANDROID KITCHEN TO PACK REPACK BOOT.IMG
Instructions
1) Unpack
2)Drink A Glass Of Water And Keep Patience (MUST)
3) Alter the ramdisk as you like.
4) The repacking batch script requires no input and simply recombines the previously split zImage with the newly packed modified ramdisk using all the original image information (which was also split and saved).
5) The cleanup batch script resets the folder to its initial state, removing the split_img+ramdisk directories and any new packed ramdisk or image files.
There is an optional command-line argument,"--original", for repackimg which will cause it to repack using the original split ramdisk instead of repacking, this is useful for testing or trimming dumps.Usage is similar for the Android and Linux versions, again, just review the release notes for them.
Hopefully this is some help to someone. It's been extremely useful for me in my messing around with kernel ramdisks, which is why I created it in the first place.
Press Thx Button If U like This

[TUTORIAL](EASY GUIDE) How To Edit/change RAMDISK Boot.img

I seen Many People Facing Problem in This Process So created New Guide.Hope It Will help You.
Instructions
1) Unpack Boot.img
2) Take A glass Of Water It Will Help You Later .
3) Alter the ramdisk as you like.
4) The repackimg batch script requires no input and simply recombines the previously split zImage with the newly packed modified ramdisk using all the original image information (which was also split and saved).
5) The cleanup batch script resets the folder to its initial state, removing the split_img+ramdisk directories and any new packed ramdisk or image files.There is an optional command-line argument,"--original", for repackimg which will cause it to repack using the original split ramdisk instead of repacking, this is useful for testing or trimming dumps.
Usage is similar for the Android and Linux versions, again, just review the release notes for them.
Hopefully this is some help to someone. It's been extremely useful for me in my messing around with kernel ramdisks, which is why I created it in the first place.
Press Thanks If This Post seems You Helpful

[TOOL] little tool support for flashing our moto v0.9.3

hello there,
this tool is windows based. You need the .net 4.5 framework. There is no installer. Simply extract the executable onto your computer.
@xQrzy shared some insight about the flashfile.xml. So i made this tool for reading an image archive and creating proper flash statements. Its very rudimentary but its working.
So, whats to do? Use an image file (zip) or unzip it first. Then execute the program and select the image or the folder. And thats it. There is one tab with some information and on the second tab there is a list of flash operations this image provides. Under options you'll find one checkbox. Uncheck it will generate the full file paths for your image files. The third tab is for the output executing a real flash would return on the command line.
Choose your operations wisely, because eg. erase user data will make a factory reset.
version info
Code:
current version: 0.9.3
- (untested) added experimental flashing. There will be a warning before the actual flashing.
- little rework of the gui.
features:
Code:
- checking MD5 hashes of all files
- (untested) selectable flash commands and running them (thats why i called it installer)
for interested devs:
- its a sharpdevelop project (built with sharpdevelop 5.1 rc1). This project was hacked whithin 5 hours so its not that filled with comments and stuff. Its not on git because of this. You can of course download my sourcecode and compile your own binary if you don't trust me. Which would be clever and cautious.
I'm really happy to be the spark of this idea. ^^
And hope you will make the tool better and better.
aVe2000 said:
hello there,
this tool is windows based. You need the .net 4.5 framework. There is no installer. Simply extract the executable onto your computer.
@xQrzy shared some insight about the flashfile.xml. So i made this tool for reading an image archive and creating proper flash statements. Its very rudimentary but its working. I made this tool capable of executing the generated flash statements but i deactivated this because of the potential problems beeing caused by using this feature. Maybe i will continue on this in future.
So, whats to do? Use an image file (zip) or unzip first. Then execute the program and select the image or the folder. And thats it. There is one tab with some information and on the second tab there is a list of flash operations this image provides. Under options you'll find one checkbox. Uncheck it will generate the full file paths for your image files. The third tab is for the output a real flash would provide in the command line.
Choose wisely your operations, because eg. erase user data will make a factory reset.
Additional features:
- checking MD5 hashes of all files
current version: 0.9.2
Click to expand...
Click to collapse
so it will generate a txt file with the statements to type, it doesn't flash anything by itself, right?
bilbo75 said:
so it will generate a txt file with the statements to type, it doesn't flash anything by itself, right?
Click to expand...
Click to collapse
with version 0.9.3 it tries to flash.
Version 0.9.3 added.

[Firefly] [ROCKCHIP] 3.5-Month UPDATE: Firefly ITX-3588J (Rockchip RK3588) "Deskphone" WORKS! Almost.

After 3.5 months of trial and error, unresponsive communities, ups and down, spending $75 on a video card that may be proving unnecessary ... I finally present to you - an almost fully-working Firefly ITX-3588J Dual-Boot Android/Linux ARM Machine.
WHAT IS IT?
The Firefly ITX-3588J is a Mini-ITX - small PC form-factor - "single-board computer" that was released earlier this year by the Chinese manufacturer Firefly, aka. T-Chip Intelligent Technology Co. Ltd.. It features the Rockchip RK3588 (hence the name) ARM system-on-chip (SoC) in a package that adduces many different kinds of ports including a PCI Express x4 slot, multiple HDMI video outs that go to the on-chip Mali GPU, and an M.2 that can be used in theory to add a telephone network card, making it a mini-desktop and smartphone all in one.
I got one because I saw it as an opportunity to for once have an easily-transportable low-energy consumption system that would be both an alternative to x86 and also not the Mac while still offering reasonable performance even if far from top-of-the-line - and ideally, it'd be great if more such boards come later because other ARM SBC boards tend to be both more limited and also very awkward with their cables. This is the only one I'm aware of, besides certain Raspberry Pi breakout boards like the Turing Pi, that can use a standard PC case.
But getting it to work, on the other hand, proved to be MUCH more diifficult because while the vendors offered a choice between Android 12 and Ubuntu 20.04 operating systems, I realized I needed both: I wanted access to both software ecosystems on the same machine, and was determined to get that to happen. And I want to say that within the last few days I have finally come quite close to achieving this dream in full.
WHAT DOES IT DO NOW?
Right now, the machine dual-boots Android 12 and Ubuntu 20.04 using the vendor-provided patched 5.10.66 Linux kernel source tree, with the user-space data of both OSes stored on a SATA SSD hard disk instead of the embedded eMMC. Boot selection is possible on startup simply by hitting "Ctrl+C" and typing the appropriate command to select the Ubuntu OS; otherwise, Android 12 boots by default. All this happens by video console on U-Boot with no serial port requirement, making it function as a proper stand-alone dual-boot ARM PC.
WHAT IS STILL TO BE DONE?
Graphics support on Ubuntu 20.04. No idea why this isn't working even with the provided kernel and driver packages. Text console over monitor works fine, though.
WHAT DID IT TAKE TO MAKE IT GO?
In retrospect, it's not really all that difficult. The most difficult part was just figuring everything out because there was very little comprehensive documentation given beyond how to simply load the images, and I had before this point zero real experience actually piecing together an Android system on a mobile/embedded-style board and machine. One thing that's a casualty is the stock Ubuntu image; it turned out to be much more fruitful to simply install the system to the hard drive via a procedure analogous to, albeit having to be arranged manually, what a typical installer would do, i.e. setting up and using APT to load the whole Ubuntu system from the Internet over wi-fi with the only vendor-adulterated component being the kernel and Mali graphics drivers because Valhall, nor even the whole RK3588, is currently mainlined in the Linux kernel system.
WHAT DOES IT LOOK LIKE?
The machine:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Running Android:
Ubuntu (no graphics yet!):
@Shimmy99 Would you please offer the procedure you used to make the board boot from SATA SSD?
That would be greatly apprecaited. I have a similar board and I have been interested in installing Android on a SATA SSD but the vendors don't respond to messages and there is very little information on their forum.
Thank you
qwestmogul2012 said:
@Shimmy99 Would you please offer the procedure you used to make the board boot from SATA SSD?
That would be greatly apprecaited. I have a similar board and I have been interested in installing Android on a SATA SSD but the vendors don't respond to messages and there is very little information on their forum.
Thank you
Click to expand...
Click to collapse
Mmm. I don't have a direct boot from SSD possible yet. Getting it to this stage has required coding work on the provided U-Boot and I would share a source pack to my github but it will take more to get direct SATA boot because it crashes when the U-Boot is compiled with those config options enabled for some reason. My focus mostly was on getting graphical console on the U-Boot so that there is not need to use the serial debug simply to switch OSes ). The way it works currently is that the kernels for both Android and Ubuntu are loaded to the eMMC, then the userdata / rootfs are loaded to the SSD. That said, I could try to play with that for sure.
It would really be nice if there was an easy way to install OS on SSD drive,that would be a massive upgrade from the measly 128GB EMMC.
By the way I don't know if you have already figured this out but there is an easy way to install GAPPS without using the tedious method you used.
You simply patch boot.img with Magisk then use ADB to install it back to the unit. From there you can use Magisk to install Magisk GAPPS.
For the life of me I can't seem to figure out how to install GPS/GNSS drivers for Android. The stock firmwares provided by the vendor have GPS drivers but those stock firmware have 1920x1080 resolution whereas I want to use 3840x2160 screen.
One way of dealing with that is editing build.prop file in vendor folder which works but then the unit won't boot past boot screen when a patched boot.img is installed. so it is sort of catch 22.
qwestmogul2012 said:
It would really be nice if there was an easy way to install OS on SSD drive,that would be a massive upgrade from the measly 128GB EMMC.
By the way I don't know if you have already figured this out but there is an easy way to install GAPPS without using the tedious method you used.
You simply patch boot.img with Magisk then use ADB to install it back to the unit. From there you can use Magisk to install Magisk GAPPS.
For the life of me I can't seem to figure out how to install GPS/GNSS drivers for Android. The stock firmwares provided by the vendor have GPS drivers but those stock firmware have 1920x1080 resolution whereas I want to use 3840x2160 screen.
One way of dealing with that is editing build.prop file in vendor folder which works but then the unit won't boot past boot screen when a patched boot.img is installed. so it is sort of catch 22.
Click to expand...
Click to collapse
Thanks. Yes. I am currently working on trying to build up a software system that will enable proper booting from SSD "due to popular demand" from here (basically trying to modify the provided "RK U-Boot" and/or combine it with GRUB), however my progress has been set back after having lost the FIQ serial debug converter for my board and needing to get a new one. Also, I didn't know about that trick with Magisk, thanks! And when you say "won't boot past boot screen", what do you mean? Do you have any logs from the USB or from the FIQ serial stream for when that happens?
After the patched boot file is loaded back into the unit using ADB,the unit simply shows Firefly logo,the screen goes black then it shows the same logo,it never goes past that logo.
In other words I want a unit that has a patched boot file so that I can root it with Magisk and also have 4K resolution which only attainable by editing the build.prop file.
The root that is already in the stock firmware is inadequate because they lack SU binaries and therefore most apps that require root permission don't work effectively.
I have no way of generating logs,I don't have a serial debugger.
My goal is to have a simple Android system that I can install in my car with 4K portable screens and GPS.
I have tried the Android radios being sold out there and don't meet my needs for a system that can use 4K screens.They are still stuck in 1920x1080 or below resolution,not to mention that they can't play 4K video files without stuttering or freezing. They also lack storage that can store those large files.
qwestmogul2012 said:
After the patched boot file is loaded back into the unit using ADB,the unit simply shows Firefly logo,the screen goes black then it shows the same logo,it never goes past that logo.
In other words I want a unit that has a patched boot file so that I can root it with Magisk and also have 4K resolution which only attainable by editing the build.prop file.
The root that is already in the stock firmware is inadequate because they lack SU binaries and therefore most apps that require root permission don't work effectively.
I have no way of generating logs,I don't have a serial debugger.
My goal is to have a simple Android system that I can install in my car with 4K portable screens and GPS.
I have tried the Android radios being sold out there and don't meet my needs for a system that can use 4K screens.They are still stuck in 1920x1080 or below resolution,not to mention that they can't play 4K video files without stuttering or freezing. They also lack storage that can store those large files.
Click to expand...
Click to collapse
Wow, that is some really interesting use of this device. Are you able to capture anything via the debug serial interface? (TTL serial, port is called "DEBUG" on the board, it appears to be the preferred serial interface for this processor.) If you don't have a suitable TTL->USB converter, you might want to get one. It must be able to support 1500000 baud, though, so be careful to check. Firefly offers one, though I lost mine as I mentioned and I had to get another, though a different one so I can mount it permanently in the case and break out a back-of-the-case port.
If you can capture anything via the TTL serial line, that would be great. That should give you some idea of what it's choking on. Send me that just so I can think about it while I'm waiting on this.
I will definitely order one.I never thought I would hit such a roadblock.I have edited various kind of Android roms successfully.This one from Firefly though is something else.I suppose that is what happens when they make their work not open source.
By the way do you know how to unpack super.img? the unpack script provide does not recognize super.img even if I change the name to update.img
qwestmogul2012 said:
I will definitely order one.I never thought I would hit such a roadblock.I have edited various kind of Android roms successfully.This one from Firefly though is something else.I suppose that is what happens when they make their work not open source.
By the way do you know how to unpack super.img? the unpack script provide does not recognize super.img even if I change the name to update.img
Click to expand...
Click to collapse
Sorry for not responding sooner but I was diligently cracking away at this thing VERY much actually ... !!!
Ah yes, I think though I'm pretty close to getting it to work; most of the work so far has been in trying just to figure out how everything works given documentation is scant and I had never, ever worked with Android or anything else at this level before!
Very little of the material is not opensource - some of the tools required to generate the rockchip images does not appear to be and there are some binary-blob kernel drivers, but a LOT more than one thinks is; you just have to ask Firefly for the "board SDK" and they will provide on request. Other than what I mentioned, the code in there is pretty much all licensed under GPL (hence why they have to give you that code, given they've made kernel modifications to support the RK3588 - apparently mainstream support is coming along but is still not primetime yet).
Nonetheless, I see you've unpacked the Android image ROM, so perhaps you already have that - if so, great. Hence let's get to it (note maybe you know some of this already but I also want to make this post useful for as many people as possible): super.img - which I'm actually playing with right now - is not Firefly magic, but is generic Android and has been mentioned before on this forum if you search for "super.img" here. It's a "super partition" that contains partitions.
Editing system.img inside super.img and flashing our modifications
I'm trying to modify my system.img (/system/build.prop) to include support for multi users. After struggling a lot, I've succeeded following your guide (that's an awesome work btw) to unpack, mount, modify, umount and repack super.img. Then...
forum.xda-developers.com
To unpack it you need to grab OTA Tools:
[GUIDE] OTA Tools LPUnpack
Please see this URL https://android.googlesource.com/platform/build.git/+/eec4a7cba4face3370acb6293ab357879920b467 and this for more information. Hi everyone. I'm surprised I havent seen a thread about ota tools yet and lpunpack. This zip file...
forum.xda-developers.com
and the way to do this is you should first use the program simg2img, which actually ships with Ubuntu as a package of the same name I believe. Suppose you're in the Linux terminal and working in the directory containing super.img. Create (if you haven't already) a directory to unpack it, e.g.
Code:
mkdir super_unpack
Then use simg2img to get a "raw" version:
Code:
simg2img super.img super.img.raw
then finally use the OTATools (replace the string "/path/to/otatools" with whatever, or put them on your PATH, or ...)
Code:
/path/to/otatools/lpunpack super.img.raw super_unpack/
and now you should have it fully unrolled into smaller .img files which will ACTUALLY mount. In particular, I needed this because product.img specifically seems to be the best place to load GApps into - they will both come up on first Android boot and they will be retained if you do an Android system reset ("reset to factory defaults").
Now REPACKING super.img ... that's the fun part!
I had actually managed to find the instructions to unpack the super.img and also managed to mount vendor.img which is where I wanted to make changes in modifying the build.prop file.
After repacking the super.img and flashing it using fastboot the Android did not boot.
I also managed to incorporate the super.img to a ROM but the Android did not boot as well.
My thinking is that Android 12 being a Dynamic partitioned rom does not allow any modification in the root system and that is why I have not had success making the Android boot.
It used to be so easy to do that on Android 10 but Android 11 and 12 are not.
Well,if someone manages to do it,I hope to understand how they did it.
As of now I am pretty much stuck with a vanilla rom which is very disconcerting considering how expensive the ITX-3588J is.
By the way I already have SDK which I have been using to make roms.
Please let me know if you manage to boot the Android using a repacked super.img
As always I am very grateful for your assistance. Happy Ney Year!
qwestmogul2012 said:
I had actually managed to find the instructions to unpack the super.img and also managed to mount vendor.img which is where I wanted to make changes in modifying the build.prop file.
After repacking the super.img and flashing it using fastboot the Android did not boot.
I also managed to incorporate the super.img to a ROM but the Android did not boot as well.
My thinking is that Android 12 being a Dynamic partitioned rom does not allow any modification in the root system and that is why I have not had success making the Android boot.
It used to be so easy to do that on Android 10 but Android 11 and 12 are not.
Well,if someone manages to do it,I hope to understand how they did it.
As of now I am pretty much stuck with a vanilla rom which is very disconcerting considering how expensive the ITX-3588J is.
By the way I already have SDK which I have been using to make roms.
Please let me know if you manage to boot the Android using a repacked super.img
As always I am very grateful for your assistance. Happy Ney Year!
Click to expand...
Click to collapse
Thanks. I did not see any mention about build.prop, though maybe you dropped that on another thread that wasn't in my notifications anymore.
You say the "Android did not boot". Do you have a adb dump? Do you have a serial (UART) debug dump (i.e. through the FIQ port)? Also, how are you repacking super.img? It is a tricky process as I mentioned at the end.
I did mention build.prop editing on my second comment of this thread.I initially tried to use root explorer file manager,that did not work.Then attempted to pull file from the system using ADB,edited it on my computer then pushed the edited file back to the system.That did not work either.
That is when I resorted to trying to edit it by unpacking the super.img.
I am still waiting to receive USB SERIAL debugger.
As for how I unpacked and repacked the super.img I used the instructions on the thread on this link
Editing system.img inside super.img and flashing our modifications
I'm trying to modify my system.img (/system/build.prop) to include support for multi users. After struggling a lot, I've succeeded following your guide (that's an awesome work btw) to unpack, mount, modify, umount and repack super.img. Then...
forum.xda-developers.com
Maybe this helps: https://forum.xda-developers.com/t/linux-porting-native-linux-to-galaxy-note9.3936077/
Somebody ported Linux to the Galaxy Note 9.

Categories

Resources