Android Tablets Forum banner

Helpful Links to Get Started with Firmware Development

62174 Views 83 Replies 8 Participants Last post by  walishahid967
Helpful Links - Firmware Development / Tweaking / Hacking

As you can see, Geodex just created the "Firmware / Development" sub-forum for us. I'm going to compile some useful links for new amateur developers. I am not a developer and have just starting learning about these things. At the very least these links should give people like me a starting point to check out what's inside the files that make up our firmware.

Elf II Source Code:- Since Ainol hasn't released the Crystal Source Code yet and the Crystal is basically an Elf II with a different screen and different WiFi chip, these should be useful starting points.
Ainol Official Release
fards github
My Development Tools Folder on MediaFire

At the moment I am just working with the stock firmware. You can download the stock firmware and then extract the .zip file to get started. I've been told the real development work is done in the kernel though. I'd like to get into the kernel and touchscreen drivers after I've created a stable custom ROM.

RESOURCES AND SCRIPTS

DragonDev's Learning Center - Not a lot here but this is where I write up things that I've learned along the way and post it for other people to learn as well.

XDA-University - Lots of great starter information from the people behind XDA-Developers.

XDA Developers Forum - One of the best places to do your research.

Android Terms, Slang and Definitions - Super handy for understanding terms you may not have run into before.

Update.zip - Ainol Zip Signer - Thanks to Soulflier we can easily sign our update.zip files. You'll need this to be able to make a flashable .zip file.

Unpack and Repack Boot.img - Thanks to Christian Troy for these scripts. You need them to be able unpack and repack the boot.img. They will also unpack and repack the uImage which, as far as I know, is the same thing. Here are some alternative scripts.

Add Root to your ROM - Thanks to Soulflier on this one. I packaged this as the files you need and the folders you need to move those files into. Then open the add-to-updater-script file and add the lines in there to your updater-script.

Add Init.d Support - These are the files and folders you need to add init.d support to your ROM.

Kernel Governors, Modules, I/O Schedulers, CPU Tweaks, AIO App Configs - Giant reference guide.

Alternate ways to Sign packages and ROM's - SignAPK or AutoSign. You would need to re-work them though with the signing keys from the Ainol Signer.

Decompile/Recompile Android applications - This may or may not end up being useful for customized Flash/YouTube/Netflix.

Creating your own UPDATE.zip - For adding or deleting apps from an UPDATE.zip.

SOFTWARE

Android Developer Tools (ADT) Bundle - This is the official Android SDK developers package.

Cygwin - Limited Linux capabilities and terminal in Windows.

dsixda's Android Kitchen, v0.218 - ROM Kitchen that runs in Cygwin. A collection of scripts to help you build/extract, deodex, root, zip-align, sign APK and ZIP files, etc. The boot.img extraction does not work and neither does the update.zip signing. I haven't figured out how to build the working scripts for those options into the Kitchen, so I use the stand alone versions listed in the scripts section. You'll also have to manually fix issues when converting between update-script (Amend) and updater-script (Edify), so you'll have to know how to read that and what to be looking for. What this kitchen will do is deodex your apps/framework and zipalign.

ONDA Kitchen - ROM Kitchen that works in Cygwin. Mostly works fine with the Crystal but it's not as stable as dsixda's kitchen. It seems to work better with the Crystal because it uses the same CPU as the ONDA (I think), but I get a lot of freezes/crashes using it.

VirtualBox - Run a complete Linux operating system inside of Windows.

Ubuntu - This is one of the Linux operating systems I've used over the years. I've found it to be one of the easier ones to get used to if you've never used Linux before.

Linux Mint - Another Linux OS that looks pretty nice and seemed easy to get adjusted to but I ended up going back to Ubuntu.
See less See more
  • Like
Reactions: 5
21 - 40 of 84 Posts
double clicking on the bat file doesn't work for me. I navigate to the folder with cygwin and type ./signerscript.bat
Hey thanks fuser, thats the trick for XP. With cygwin commandline signing works under xp for me. Now comes the next step, finding a working youtube...


JDfense
See less See more
You can pull the one from my ROM. A couple of users spent a long time trying out like 20 versions of the app and settled on the one that's in there.
Yes, that was my second thought - spare some time and take it from fuser-invents fine rom.
Now I have stock with root, init.d and youtube. Next step, the apps I like and lets get it faster over the services.jar.
And what about ubifs. Is it the best partition format for amlogic?

JDfense
See less See more
I don't know if you can change ubifs, I wouldn't mess with that. The battery percentage mod is really easy and working on your own init.d scripting choices would be a huge step. You can do a lot with init.d scripts.
Hi fuser, i have a questions about repacking boot.img but no luck maybe you can give me direction for me to make unsecure boot.img.
I use unpack and repack.sh from patmoss (lokum rom) and try to remove initgoldfish.rc to keep new initramfs-cpio is less then original but still no luck maybe you can help me, thanks in advanced

Sent from my Aurora-II using Tapatalk
Hi fuser, i have a questions about repacking boot.img but no luck maybe you can give me direction for me to make unsecure boot.img.
I use unpack and repack.sh from patmoss (lokum rom) and try to remove initgoldfish.rc to keep new initramfs-cpio is less then original but still no luck maybe you can help me, thanks in advanced

Sent from my Aurora-II using Tapatalk
I read in this thread that you need to:

UPDATE: [Problem SOLVED]
So basically remove gzip part from repack.sh script and it works just fine. Just remember that this method doesn't allow bigger ramdisks than original.
But I'm unsure of exactly how to modify the script and what part of it needs to be deleted. I haven't had any time to experiment with it lately. Let me know if you figure it out before I do.
I read in this thread that you need to:

But I'm unsure of exactly how to modify the script and what part of it needs to be deleted. I haven't had any time to experiment with it lately. Let me know if you figure it out before I do.
Thanks for you're fast reply, now i must read first then try to modify the script


Sent from my Aurora-II using Tapatalk
See less See more
2
Hi fuser-invent,

I make some progress with my rom, but still not ready. Your work helps a lot to learn, how amlogic roms are built.
I found no kitchen for amlogic devices?
I tried to open the boot.img, but no success so fare. Last choice I will try your hint - the onda kitchen. I want to replace the ainol novo... writing and I think, I will find it in the boog.img or is it the logo.img in the stock, which I can't open too. Boot.img seems not to be a gzip file with a header, tried it to open in ubuntu.
The framework-res of the crystal JB is very large with about 12MB, maybe bad for the performance. For my other tablets, I have only about 6MB for the framework-res in JB.
Next thing are the maps.apk. Do we really need 4 versions for different dpi?
I needed some time to study the user-script(1109) difference between stock and yours, but I didn't find the cause for error with the twrp. Since I took your user-script, I had no problems to flash with twrp recovery, but why?
Copy and paste is not the real thing, but without understanding it is worse.


JDfense
See less See more
Hi fuser-invent,

I make some progress with my rom, but still not ready. Your work helps a lot to learn, how amlogic roms are built.
I found no kitchen for amlogic devices?
I tried to open the boot.img, but no success so fare. Last choice I will try your hint - the onda kitchen. I want to replace the ainol novo... writing and I think, I will find it in the boog.img or is it the logo.img in the stock, which I can't open too. Boot.img seems not to be a gzip file with a header, tried it to open in ubuntu.
The framework-res of the crystal JB is very large with about 12MB, maybe bad for the performance. For my other tablets, I have only about 6MB for the framework-res in JB.
Next thing are the maps.apk. Do we really need 4 versions for different dpi?
I needed some time to study the user-script(1109) difference between stock and yours, but I didn't find the cause for error with the twrp. Since I took your user-script, I had no problems to flash with twrp recovery, but why?
Copy and paste is not the real thing, but without understanding it is worse.


JDfense
You need to use the boot scripts in my developers tools folder. The onda apk tools are also in my developers tools folder. Amlogic devices have a specific magic header so you can't use other unpacking scripts. I guess you could strip the header first but why do the extra step. So they scripts will unpack the .img fine but I don't know how to repack it. Gotta figure out what the whole removing gzip thing is. If anyone know figures out how to repack the boot.img please let me know.

I think the ainol novo thing you are talking about is "initlogo.rle" in the boot.img. If you are talking about the splash screen. If you are talking about the boot animation, that is in the system/media folder. The two logo images in most of these stock ROM's aren't used as far as I know. I've never actually seen the logos show up anywhere in the ROM and I have no idea why they are in the firmware packages.

There is plenty of stuff in the framework-res that you can strip out. I'll be cleaning up mine in Crystal Clear soon. The device doesn't use all the drawable dpi folders, so I'm figuring out what the best way to go about trimming it down will be. I'm unsure about the maps.apk's but I'm assuming its the same deal.

As for updater-script problems, post your errors here.
See less See more
  • Like
Reactions: 1
Thanks fuser-invent. I see you have in some points the same trouble.
I try it again with the boot.img and the 'magic' header. Yes, I have assumed that the bootlogo.rle will be in the boot.img. With the bootanimation I'm done.
I think, we have to careful with the framework-res or we end in a bootloop.
If I find out, how to repack boot.img, I let you know. Does Troy explain something about boot.img? For shure, he will know how to do the trick.


user-script from stock rom allways produces a status 7 errors.

JDfense
See less See more
Thanks fuser-invent. I see you have in some points the same trouble.
I try it again with the boot.img and the 'magic' header. Yes, I have assumed that the bootlogo.rle will be in the boot.img. With the bootanimation I'm done.
I think, we have to careful with the framework-res or we end in a bootloop.
If I find out, how to repack boot.img, I let you know. Does Troy explain something about boot.img? For shure, he will know how to do the trick.


user-script from stock rom allways produces a status 7 errors.

JDfense
Do you have a mediafire account?

Upload the META folder you are using and I'll check it out.

You will definitely get a bootloop if you mess up the framework-res but its not a big deal. The easiest way to test that kind of stuff is to make a zip that only pushes the framework-res and resets permissions. The create another zip that pushes the original framework-res back, so if the new one doesn't work, you can just flash the old one. Or you can do everything with ADB, which is also pretty easy and quick. You won't hard brick your device or anything if you make a mistake with the framework-res, it's low risk to expirement with.

I haven't seen CT explain the boot scripts anywhere but he did provide some of them, so he probably knows what to do.
Yes, I have a mediafire account. Here is the meta-inf from stock 1109 with rooting and no assert lines. After that I compared it with your user-script, but with any change, I always got the status 7 error. Finally I took your Meta-inf and all work fine with TWRP, but why is that?


http://www.mediafire.com/download.php?l2e6wtyp8burguc

Right now I take a look in that magic unpack script. It seems to be for the recovery, but boot.img has the same format, I assume. In rockship devices recovery.img and boot.img have the same format, too.

Yes framework will not brick my device, but it is one of the most important apks for the rom.
JDfense
See less See more
Yes, I have a mediafire account. Here is the meta-inf from stock 1109 with rooting and no assert lines. After that I compared it with your user-script, but with any change, I always got the status 7 error. Finally I took your Meta-inf and all work fine with TWRP, but why is that?


http://www.mediafire.com/download.php?l2e6wtyp8burguc

Right now I take a look in that magic unpack script. It seems to be for the recovery, but boot.img has the same format, I assume. In rockship devices recovery.img and boot.img have the same format, too.

Yes framework will not brick my device, but it is one of the most important apks for the rom.
JDfense
I just looked at the META folder, I don't think you can hash stuff out in the updater-script, so just completely delete the first three lines instead of using a #. Also later on when you are labeling the rooting section and a random # after the rooting section, you need to delete those lines or use this instead:
Code:
ui_print("Rooting");
If you use that, you can label your different sections to keep things organized but it will show up in the recovery when it gets to that line and "print" whatever you put in there.

The unpack scripts work with the boot.img and recovery.img, I've tested them with both.
Hi fuser, how about the repack script? The unpack script work fine but still stuck on repack script

Sent from my Aurora-II using Tapatalk HD
Hi fuser, how about the repack script? The unpack script work fine but still stuck on repack script

Sent from my Aurora-II using Tapatalk HD
I haven't even had time to attempt to try and figure it out yet. Maybe sometime next week. I remember back when I first got them I did some google research and didn't find a solution, so I guess it will be down to trial and error.
2
Thanks for your'e fast reply
take your'e time bro, i try a lot of repack script but still no luck. I guess need more time to do some experiment ( as you said trial and error ).


Sent from my Aurora-II using Tapatalk HD
See less See more
I just looked at the META folder, I don't think you can hash stuff out in the updater-script, so just completely delete the first three lines instead of using a #. Also later on when you are labeling the rooting section and a random # after the rooting section, you need to delete those lines or use this instead:
Code:
ui_print("Rooting");
If you use that, you can label your different sections to keep things organized but it will show up in the recovery when it gets to that line and "print" whatever you put in there.

The unpack scripts work with the boot.img and recovery.img, I've tested them with both.
Hmm.. the problem may be the windows formatting ... use notepad++
haven't not tested with TWRP but #comments and empty lines are ok at least in stock updater-script.

That gzip thing is already removed in those unpack/repack scripts of Christian Troy, and those perl versions fix that wrong "Trailer!!!" problem.
(I think I saw similar sh scripts posted by somebody in Troy's TWRP thread...)
Hmm.. the problem may be the windows formatting ... use notepad++
haven't not tested with TWRP but #comments and empty lines are ok at least in stock updater-script.

That gzip thing is already removed in those unpack/repack scripts of Christian Troy, and those perl versions fix that wrong "Trailer!!!" problem.
(I think I saw similar sh scripts posted by somebody in Troy's TWRP thread...)
I have used always notepad++. Thats not the cause.
Could it be a different file format for user-script in stock, then in the cm10, which notepad++ ignores?

I try to find a repack solution for uImage in the evening. Maybe I find the trick for crystal, or we have to ask Troy.

JDfense
>Could it be a different file format for user-script in stock, then in the cm10, which notepad++ ignores?
The formatting is the same (unix) but for some reason the formatting of the updater-script you uploaded has changed into windows...
Change it in notepad++: edit -> EOL conversion -> Unix Format

Here is the sh script post with Trailer fix
http://www.slatedroid.com/topic/41030-recovery-twrp-v2410/page__view__findpost__p__558354
  • Like
Reactions: 1
Thanks cxz. I'll check the scripts out.
Don't know when it happens, the notepad++ saved in unixformat, but you are right it is windows txt.

JDfense
See less See more
21 - 40 of 84 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top