Custom ROM for new device - Android Q&A, Help & Troubleshooting

Hi, I have new Prestigio tablet PMT5777_3G and I want to modify it's default ROM. I followed this tutorial: http://forum.xda-developers.com/showthread.php?t=1801690. I successfully extracted system folder, but I have no idea how to create updater-script for this specific ROM. If I understand correctly I need to get updater-script from original ROM.
I've got something that resembles original ROM, but it's folder structure is completely different from what I would expect.
I would expect:
META-INF
system
boot.img
I've got:
APDB_MT6582_S01_MAIN2.1_W10.24
boot-sign.img
BPLGUInfoCustomAppSrcP_MT6582_S00_MOLY_WR8_W1315_MD_WG_MP_V12_P4_1_wg_n
cache-sign.img
Checksum.ini
EBR1-sign
lk-sign.bin
logo-sign.bin
MBR-sign
MT6582_Android_scatter.txt
preloader_htt82_tb_jb5.bin
recovery-sign.img
secro-sign.img
system-sign.img
sro-lock-sign.img
sro-unlock-sign.img
userdata-sign.img
I'm an android developer, but have no experience with custom ROM's and now am in a situation, where I want to get that custom ROM up and running, but am unable, because I can't figure out how to create updater-script or extract it from files that I currently have. It would be great if someone could point me to the right direction of what to do next.
Thanks
P. S. It seems it's against the rules to ask questions here, but I can't seem to find where else to ask this on xda

Dantenas said:
Hi, I have new Prestigio tablet PMT5777_3G and I want to modify it's default ROM. I followed this tutorial: http://forum.xda-developers.com/showthread.php?t=1801690. I successfully extracted system folder, but I have no idea how to create updater-script for this specific ROM. If I understand correctly I need to get updater-script from original ROM.
I've got something that resembles original ROM, but it's folder structure is completely different from what I would expect.
I would expect:
META-INF
system
boot.img
I've got:
APDB_MT6582_S01_MAIN2.1_W10.24
boot-sign.img
BPLGUInfoCustomAppSrcP_MT6582_S00_MOLY_WR8_W1315_MD_WG_MP_V12_P4_1_wg_n
cache-sign.img
Checksum.ini
EBR1-sign
lk-sign.bin
logo-sign.bin
MBR-sign
MT6582_Android_scatter.txt
preloader_htt82_tb_jb5.bin
recovery-sign.img
secro-sign.img
system-sign.img
sro-lock-sign.img
sro-unlock-sign.img
userdata-sign.img
I'm an android developer, but have no experience with custom ROM's and now am in a situation, where I want to get that custom ROM up and running, but am unable, because I can't figure out how to create updater-script or extract it from files that I currently have. It would be great if someone could point me to the right direction of what to do next.
Thanks
P. S. It seems it's against the rules to ask questions here, but I can't seem to find where else to ask this on xda
Click to expand...
Click to collapse
Since you are a beginner to ROM development, I would recommend the use of dsixda's Android kitchen, which you probably have downloaded already. If not use this link
http://forum.xda-developers.com/showthread.php?t=633246
Follow these steps to obtain the file structure and Meta-Inf folder for your custom rom.
1. Open the folder where you have placed the kitchen.
2. You will find a folder called original_update.
3. Open that folder and copy your boot.img and system.img files into it. ( In your case it is boot-sign.img and system-sign.img. Rename those files into boot.img and system.img and place them in the folder )
4. Now open the kitchen. ( Refer the above link to know how to do it )
5. You will find " 1. Set up working folder from ROM " option under Main Menu.
6. Type 1 and you will be directed to another menu. Click Enter.
7. Select your boot.img and system.img from the menu.
8. Now follow the instructions that appear on the screen.
9. When you successfully complete the steps, you will have the required Working folder, with boot.img, system folder and Meta-Inf folder, which will contain the updater-script (It will be automatically generated)
All the best. :good:
Hit Thanks if this helped you... PM me if you need further help or search the forum for detailed instructions.

Thanks, this helped me, but I still can't create ROM.
I encountered a problem with kitchen:
Code:
Available ROMs:
(1) system.img and boot.img
Enter selection number (default=1, cancel=0, r=refresh):
Found original_update/system.img
Found original_update/boot.img
The new working folder will be named WORKING_061614_070841
Change the name (y/n)? (default: n):
Creating working folder WORKING_061614_070841 ...
Copying boot.img ...
Copying system.img ...
Adding an update-script ...
NON-YAFFS/NON-TAR FILE FORMAT DETECTED IN ROM
Mounting system.img to loopback device and then extracting files ...
Error: Unable to mount system.img
Error: No /system/framework folder found!
Press Enter to continue
This creates my missing update-script and boot.img, but system folder is empty.
Would it be a good idea to extract all system files from device and attempt to create ROM with them, and this update-script, or is there something I could do with system.img to make it extract?

Try this
Don't worry. There's always an alternative. Try this simple method.
1. Boot into CWM (Clockwork Mod) Recovery. (I'm pretty sure you know how to do it, if not, you can feel free to search the forum)
2. Choose Backup and Restore.
3. Make a backup in your external sdcard.
4. Now boot normally, open your external sdcard. You will find a folder called clockworkmod. Copy that folder to your PC.
5. Inside that folder, you will find the backup.
6. Now, copy boot.img and system.ext4.tar.a to your original_update folder of the kitchen.
7. Warning! Do not copy system.ext4.tar, only copy system.ext4.tar.a
8. Once you have copied these two files, rename system.ext4.tar.a into system.ext4.tar
9. Now, open android kitchen and follow the exact same steps as you did before.
10. When you choose the available rom, you will find the screen as below.
Code:
Available Roms:
(1) system.ext4.tar and boot.img
11. Choose it and follow the instructions. You will have your required working folder.
Try this and let me know if you still face any issues. :good:

I was unable to load CWM recovery, because it is not supported by my device. I tried TWRP too, which also doesn't support my device. Is it possible to do without CWM?

Dantenas said:
I was unable to load CWM recovery, because it is not supported by my device. I tried TWRP too, which also doesn't support my device. Is it possible to do without CWM?
Click to expand...
Click to collapse
I'm sorry my friend, even if you create your own ROM, you require either one of them to flash the ROM to your device. Seeing you so keen on developing the rom, try to use any yaffs tool to create your system.img from extracted system folder. You may refer this thread.
http://forum.xda-developers.com/showthread.php?t=1645412

Related

How to build your own rom using stock rom/firmware(noob friendly guide)

HERE IS A GUIDE FOR YOU ALL YOU CAN CREATE YOUR OWN ROM BY THIS METHOD.I AM NOT RESPONSIBLE FOR BRICKED DEVICES.
Click to expand...
Click to collapse
Requirement to make a custom rom
*JAVA JDK installed on your SYSTEM
*WIN XP/ 7/8/8.1.
*package given in download section
Who is this kitchen for ?
Those who are brand new to
creating custom ROMs and
want an easy place to start
learning
Those who just want to modify
shipped ROMs or someone
else's custom ROMs to their
liking
Those who are confused by all
those scripts and complex
commands required for
building and extracting
This is NOT a tool to
automatically turn you into a
full-fledged ROM developer.
ROM development normally
involves work from the ground
up and involves time , research
and patience .
Click to expand...
Click to collapse
PRESS THANKS IF YOU LIKE MY WORK..
Kitchen setup
setting up dsixda kitchen
1.download all the three link and unzip kitchen.rar and cywin package.
2.open cywin_package then open folder now, you can see 3 icons, a read-
me,a setup, and a folder. Choose
the setup. Here you will choose
install from local directory. Next,
navigate to the the folder of
extraction of cygwin and choose
the folder cygwin_packages inside
the cygwin extraction folder. Wait
for some time. Then, you will come
across a list of file. Click the 2-
circle-arrows,untill, it displays
“install”
after the procedure is complete,
run the batch file cygwin.bat . Now, minimise
it and copy kitchen folder,
keep it in some location where you have installed your cygwin package open home/ajay-pc(in my case this is administrator name of my pc)kitchen
now, open the batch file window
and type
cd c:\kitchen
wait for some time and then when
the location the changed, type
./menu
Click to expand...
Click to collapse
press thanks if you like my work
GUIDE
now minimize the batch file and extract official rom there you will find system.img then extract it using magic iso or flash
the official stock rom using odin the take a nandroid backup u will get system.rfs.tar in your sd card extract it using magic iso then make a folder in called rom and open it. again create a folder called system and copy all data from system.rfs.tar which u have extracted(do drag and dropping).
Now copy meta-inf of any stock rom and copy and kernel to rom folder.
Now you will get two folder and one file in your rom folder zip the folder content and copy the file where you have installed cygwin/home/ajay/kitchen/original update folder.
now open command shell which you have minimized 1st create working folder then add root permission,deodex your rom.
and at last press 99 to build your rom..
note-if it ask you to change updater script to update script change it but dont forget to change it back to updater script.now you will get your rom in output folder copy it to your sd card flash it if error occur unzip the zip file and delete meta-inf and boot.img and again copy meta-inf of any rom and kernel to it and zip it..again flash the rom..
PRESS THANKS IF YOU LIKE MY WORK
DOWNLOADS
Downloads​
Link for cygwin click here :good:​link for kitchen click here :good:​link for magic iso click here :good:​
Link for official firmware click here :good:​
PRESS THANKS IF YOU LIKE MY WORK
CREDIT
DSIXDA for Android Kitchen
Samsung for this awesome device
ME for this Guide

[Q] pulling boot.img for TWRP 2.7.0.0 touch recovery

Hello Friends,
I just registered to this forum.
It's awesome to read all of the thread inside this forum...
but my brain is limited to learn everything in no time.
Well, I found this thread.
The title is: [RECOVERY][XSOLA] TWRP 2.7.0.0 touch recovery [2014-04-27]
.....................................................
.....................................................
.....................................................
.....................................................
"Installation:
since our device developers are constantly trying to fix bugs, they are always changing something in init.*.rc files for testing. For this reason I can't post a regular boot.img file because it won't work. For now, I've created a script that will take all init.*.rc files from current rom's boot.img and then compile new boot.img with TWRP inside it.
Note : For Rooted & Unlocked Bootloader Only
Note : For 4.4 ROM (should work on older version of android upto 4.1). I don't own Xperia Sola so didn't test it. So please provide feedback
1) Download the latest zip file.
2) Extract it in a folder and place your current rom's boot.img inside that folder. (it must be named boot.img)
3) Connect your phone with PC. (adb must be working)
4) Open your command line and cd to that folder
5) For linux users, type ..........................."
Do you all know what must I do on "placing my current rom's boot.img"? I just can't find the file on my Xperia Sola device.
Please Help.
Thank You.
Boot.img is not a file on the XP. It is the image of the boot partition.
You can extract it from the zip of your ROM or from the ftf from Sony or from the CWM backup.
Sheers
adi10pn said:
place your current rom's boot.img
Click to expand...
Click to collapse
have u kept the .zip file of the ROM you are currently using? if so extract the files from it and you will find a file named "boot.img"
Press Thanks if I helped you

[Q] Extract Compressed File to SD Card Director on First Boot

Hey guys,
I'm currently in the middle of developing my own ROM for an S802 based TV box (M8). I am close to releasing but I have a few issues, one very much in particular. I am trying to find a script that will extract a .tar file to the /sdcard/ directory on first boot of the ROM but I'm having a hell of a time. I am a reseller of these boxes and I'm trying to get my Kodi userdata to extract into the proper directory, /sdcard/Android/data/, on first boot but nothing I do seems to be working. Currently I'm using a script called installApk.sh. From what I've gathered it works fine for extracting .tar files to non-sdcard directories but when I attempt to point the extract path of the tar to the /sdcard/ directory it fails. I've also tried decompiling the kodi apk, injecting all of my userdata directly into the apk and re-signing but that causes all of the addons to fail. I'm wondering if any of you have run into a similar issue or know a solution to my problem. Any help is appreciated. Thanks.
Mag
th3magpi3 said:
Hey guys,
I'm currently in the middle of developing my own ROM for an S802 based TV box (M8). I am close to releasing but I have a few issues, one very much in particular. I am trying to find a script that will extract a .tar file to the /sdcard/ directory on first boot of the ROM but I'm having a hell of a time. I am a reseller of these boxes and I'm trying to get my Kodi userdata to extract into the proper directory, /sdcard/Android/data/, on first boot but nothing I do seems to be working. Currently I'm using a script called installApk.sh. From what I've gathered it works fine for extracting .tar files to non-sdcard directories but when I attempt to point the extract path of the tar to the /sdcard/ directory it fails. I've also tried decompiling the kodi apk, injecting all of my userdata directly into the apk and re-signing but that causes all of the addons to fail. I'm wondering if any of you have run into a similar issue or know a solution to my problem. Any help is appreciated. Thanks.
Mag
Click to expand...
Click to collapse
see Introduction : How to build an Android ROM - XDA-University
[GUIDE] [how to] CREATE OWN ROM [FOR ANY ANDROID DEVICE] [FOR N00B] [EASIEST METHODS] by lokeshsaini94
This thread will be moved to Android Q&A, Help & Troubleshooting

How to create flashable zip from system.img?

I have a system.img file, which I extracted from a 20J KDZ. I would now like to convert it into a flashable zip. I have 2 reasons for this. One, I dont want to have to use LGUP to revert my phone to a 100% stock system. It is much easier to just flash a zip of the system partition. Two, I would like to get into modding and ROM development. I believe that it is best to start from pure stock and make changes from there, instead of basing your work off of something that someone else has already modded.
I found these threads but they're a bit old (Lollipop):
1. http://forum.xda-developers.com/lg-v10/development/lg-h901-stock-img-files-boot-recovery-t3238638
2. http://forum.xda-developers.com/tmobile-lg-v10/development/lg-h901-stock-images-device-restore-t3241170
In one of them a member provided img's for recovery, boot, and system. In the other thread flashable zips of these img's were posted. These are for the Tmo v10. So it's not a matter of whether it can be done, but how. What tools are needed?
I downloaded the zip from one of the aforementioned threads, deleted the boot.img, replaced his system.img with mine, edited updater-script, and zipped up the meta-inf and system.img files with 7zip. I also checked to be sure that the block to be flashed was correct, it is the same (even though my img is for MM). I tried flashing with TWRP, I immediately get an error code 6.
What should I do?
Just off the subject slightly...but Eliminater74 already has a flashable zip (thought TWRP) for the 20J release. Its a 2 Part System.
Eliminator74's zip is modified. I want to take a 100% pure stock system.img (extracted from stock firmware) and put it into a zip that can be flashed in TWRP. When I say stock, that's what I mean. No root, no Xposed, no BusyBox, nothing. This has already been done for Lollipop on the v10, but I have MM. I have already explained why I want to do this. I'm currently looking into whether Superr's Kitchen can accomplish this.
He has a Fully Stock 20J release..just gotta read the thread..
AnonVendetta said:
I have a system.img file, which I extracted from a 20J KDZ. I would now like to convert it into a flashable zip. I have 2 reasons for this. One, I dont want to have to use LGUP to revert my phone to a 100% stock system. It is much easier to just flash a zip of the system partition. Two, I would like to get into modding and ROM development. I believe that it is best to start from pure stock and make changes from there, instead of basing your work off of something that someone else has already modded.
I found these threads but they're a bit old (Lollipop):
1. http://forum.xda-developers.com/lg-v10/development/lg-h901-stock-img-files-boot-recovery-t3238638
2. http://forum.xda-developers.com/tmobile-lg-v10/development/lg-h901-stock-images-device-restore-t3241170
In one of them a member provided img's for recovery, boot, and system. In the other thread flashable zips of these img's were posted. These are for the Tmo v10. So it's not a matter of whether it can be done, but how. What tools are needed?
I downloaded the zip from one of the aforementioned threads, deleted the boot.img, replaced his system.img with mine, edited updater-script, and zipped up the meta-inf and system.img files with 7zip. I also checked to be sure that the block to be flashed was correct, it is the same (even though my img is for MM). I tried flashing with TWRP, I immediately get an error code 6.
What should I do?
Click to expand...
Click to collapse
What tool did you use to extract the KDZ? I am trying to get a stock boot.img for the H901J build and I cannot seem to find it. I used the WindowsLGFirmwareExtract 1.2.5.0 release and all I see are a ton of .bin files and system.img. Is boot.img inside system.img?
@Sippi4x4man: I also used WindowsLGFirmwareExtract. Inside the KDZ there is a DZ and DLL file. Just extract the DZ, then you see lots of BINs. The system.img is split up (since it's around 4GB alone), but the tool can combine the pieces into one file. I was able to figure out how to manually flash the IMG, by running a dd command with TWRP's terminal emulator.
dd if=/external_sd/system.img of=/dev/block/platform/f9824900.sdhci/by-name/system
It takes a few minutes to finish, followed by a message that says no more space is available (I guess /system got filled up). I think when you dd anything you are copying both free and used space, since an IMG is usually just a (sometimes raw) disk image. TWRP will also initially say that no system is installed, I just ignored it, the device boots fine, everything is pure stock, no issues at all. System is mountable after subsequent boots into recovery. I used Magisk and the phh Superuser Magisk module to gain root without modding system partition, and the Magisk version of Xposed. But I would still like to create a flashable zip to automate this. If I figure it out I don't mind uploading it so the community can benefit.
As for the stock boot.img, I would imagine that the boot.bin inside the DZ is probably what you're after. The file size seems about right. However, I tried renaming boot.bin to boot.img and flashing from TWRP. Device wouldn't boot. So maybe there is some other conversion process that needs to be done. I can't think of any other way to obtain a pure stock boot image, extracting it from stock firmware seems like a sure way. If you ever figure it out then please provide a copy. Make sure it isn't patched by SuperSU, Xposed, Magisk, etc. I could maybe merge it into a stock zip.
AnonVendetta said:
@Sippi4x4man: I also used WindowsLGFirmwareExtract. Inside the KDZ there is a DZ and DLL file. Just extract the DZ, then you see lots of BINs. The system.img is split up (since it's around 4GB alone), but the tool can combine the pieces into one file. I was able to figure out how to manually flash the IMG, by running a dd command with TWRP's terminal emulator.
dd if=/external_sd/system.img of=/dev/block/platform/f9824900.sdhci/by-name/system
It takes a few minutes to finish, followed by a message that says no more space is available (I guess /system got filled up). I think when you dd anything you are copying both free and used space, since an IMG is usually just a (sometimes raw) disk image. TWRP will also initially say that no system is installed, I just ignored it, the device boots fine, everything is pure stock, no issues at all. System is mountable after subsequent boots into recovery. I used Magisk and the phh Superuser Magisk module to gain root without modding system partition, and the Magisk version of Xposed. But I would still like to create a flashable zip to automate this. If I figure it out I don't mind uploading it so the community can benefit.
As for the stock boot.img, I would imagine that the boot.bin inside the DZ is probably what you're after. The file size seems about right. However, I tried renaming boot.bin to boot.img and flashing from TWRP. Device wouldn't boot. So maybe there is some other conversion process that needs to be done. I can't think of any other way to obtain a pure stock boot image, extracting it from stock firmware seems like a sure way. If you ever figure it out then please provide a copy. Make sure it isn't patched by SuperSU, Xposed, Magisk, etc. I could maybe merge it into a stock zip.
Click to expand...
Click to collapse
It's been a while from this post... But I'm looking after the same goal you were and got the same error 6 trying the same things you described in your previous posts. Despite of these long 4 years, let me try: did you finally achieve to make the flashable zip with system.img?
I do not own an LG V10 anymore.....it is the most garbage phone I've ever had.
I now use SuperR's Kitchen to create flashable zip from system.img. Works like a charm every time. Downside is that you need a PC to use it. It works for all phones (but you must also have an unlocked bootloader and custom recovery, or you will not be able to flash the zip). There are both free and donate versions, both will work fine.
AnonVendetta said:
I do not own an LG V10 anymore.....it is the most garbage phone I've ever had.
I now use SuperR's Kitchen to create flashable zip from system.img. Works like a charm every time. Downside is that you need a PC to use it. It works for all phones (but you must also have an unlocked bootloader and custom recovery, or you will not be able to flash the zip). There are both free and donate versions, both will work fine.
Click to expand...
Click to collapse
Thank you for your reply. My device is Lenovo Z6 Pro but I thought this wouldn't make a difference.
Just to be sure, what you get with SuperR's Kitchen is a zip including system.img file and not the /system folder, right? Thank you in advance.
Edit: I had tried with other kitchen softwares with no success but SuperR's Kitchen did the job as you said, like a charm. Tons of thanks.
@descarao81: No, SuperR's Kitchen does not include system.img/boot.img, you must provide them yourself. They are device-specific. And system.img is a very large file, so it cannot reasonably be included in the Kitchen zip.
Yeah, maybe I wasn't clear, I meant if the resultant zip would include those raw image files being the original image files provided by the user. It's clear now. Thank you.
Here is how to do it...
1. Go to:
https://forum.xda-developers.com/tm.../lg-h901-stock-images-device-restore-t3241170
Download from the link he provided.
2. Extract the .zip file that you downloaded.
3. Make a new folder called "rom"
4. Copy the META-INF folder from the folder you extracted and place it into the "rom" folder.
5. Download any other flashable rom for your device. Extract it.
6. Go to {EXTRACTED_FLASHABLE_ROM}\META-INF\com\google\android\update-binary in your flashable extracted rom folder. Copy the "update-binary" . Got to the "rom" folder and go to META-INF\com\google\android. Delete the update-binary there and replace it with the one you have copied.
7. Now copy the boot.img from the other rom that is for your device. And place it into the "rom" folder.
8. Now Finally Compress the all the files.
9. Now you will have a flashable system.img.
10. Go to TWRP and flash the .zip that you have just made!
Upytry2 said:
Here is how to do it...
1. Go to:
https://forum.xda-developers.com/tm.../lg-h901-stock-images-device-restore-t3241170
Download from the link he provided.
2. Extract the .zip file that you downloaded.
3. Make a new folder called "rom"
4. Copy the META-INF folder from the folder you extracted and place it into the "rom" folder.
5. Download any other flashable rom for your device. Extract it.
6. Go to {EXTRACTED_FLASHABLE_ROM}\META-INF\com\google\android\update-binary in your flashable extracted rom folder. Copy the "update-binary" . Got to the "rom" folder and go to META-INF\com\google\android. Delete the update-binary there and replace it with the one you have copied.
7. Now copy the boot.img from the other rom that is for your device. And place it into the "rom" folder.
8. Now Finally Compress the all the files.
9. Now you will have a flashable system.img.
10. Go to TWRP and flash the .zip that you have just made!
Click to expand...
Click to collapse
Trying that exactly when im home! Thank you!

Converting Amlogic firmware IMG files into flashable ZIP for custom recovery

While trying to create my first ever Android firmware I had solve several problems, especially if you consider that I prefer under Windows instead of Linux.
I won't go into too many details as I have to assume everyone attempting this did at least some reading on the general how to of firmware installations and modifications.
Things you need:
Original firmware for your device as a IMG file
Amlogic's Customisation tool
A Rom Kitchen of your choice (I use Carliv)
System_Extractor-WIN-master
Some time...
Step1: Load the firmware into the AML tool and tick all boxes except the last one.
In the tmp folder you will find the unpacked files.
Under Level one are the files we want.
You will see a bunch of "PARTITION" files, we copy the following ones into a seperate folder for further use to create the ZIP.
I suggest to name the folder "Install" so we are all on the same page here.
boot.partition
bootloader.partition
logo.partition
recovery.partition
If you checked a flashable ZIP update before you will notice some files are missing, let's try to fix that.
Rename all partition files you copied to img, so instead of boot.partition you get boot.img.
Unpack the boot.img with your kitchen.
You will find a file "boot.img-second" - copy that into your install folder and rename it to dtb.img.
Inside the unpacked ramdisk (In your kitchen) of the boot.img you will fing the "file_contexts" file - copy that into your install folder as well.
Most AML firmware I had so far used a system.new.dat and a system.transfer.list to create the system partition.
We can create them from the system.partition file after renaming to system.img in System_Extractor-WIN-master .
To do this the system.img needs to be unpacked and we need again a copy of the file_contexts.
After the image is unpacked we can pack it again as system.new.dat and system.transfer.list.
The last missing bits can be tricky though as now we need a META-INF folder that works for our device in question.
There are two way to fix that.
Method one:
Search the usually chinese websites using Google to find original firmware for your device.
Chance are that you will find something like an OTA update - in there you will find what you need.
Method two (I never tested that):
Take the META-INF folder from an OTA update of a box with identical hardware specs.
Most important part here is the memory configuration so for a 2/16GB box you need a 2/16GB OTA update.
Next of same importance is the WiFi/Bluetooth config.
If you only have Wifi than an update for a box With daul wifi and BT4.0 won't help you.
If the actual Wifi chip is a different one but CPU, GPU, Memory and connections are the same it should still work.
Once you have the META-INF folder included into your Install folder the firmware is ready to be zipped - in theory!
The X96 for example uses a hash check for the update and created system partition.
To be able to flash your image you need to know what the original recovery would expect - has check or not.
The updater script within the META-INF folder needs to be updated to match your build.prop details as well hash check/no hash check.
Again, with an original OTA update you will find these infos.
Only if you don't have the OTA and no clue what your updater script and recovery needs you are a bit lost.
I know I has not all the steps in detail and if you are without and OTA update you need to search but otherwise feel free to ask and I will try to assist to make it complete if I can.
Downunder35m said:
While trying to create my first ever Android firmware I had solve several problems, especially if you consider that I prefer under Windows instead of Linux.
I won't go into too many details as I have to assume everyone attempting this did at least some reading on the general how to of firmware installations and modifications.
Things you need:
Original firmware for your device as a IMG file
Amlogic's Customisation tool
A Rom Kitchen of your choice (I use Carliv)
System_Extractor-WIN-master
Some time...
Step1: Load the firmware into the AML tool and tick all boxes except the last one.
In the tmp folder you will find the unpacked files.
Under Level one are the files we want.
You will see a bunch of "PARTITION" files, we copy the following ones into a seperate folder for further use to create the ZIP.
I suggest to name the folder "Install" so we are all on the same page here.
boot.partition
bootloader.partition
logo.partition
recovery.partition
If you checked a flashable ZIP update before you will notice some files are missing, let's try to fix that.
Rename all partition files you copied to img, so instead of boot.partition you get boot.img.
Unpack the boot.img with your kitchen.
You will find a file "boot.img-second" - copy that into your install folder and rename it to dtb.img.
Inside the unpacked ramdisk (In your kitchen) of the boot.img you will fing the "file_contexts" file - copy that into your install folder as well.
Most AML firmware I had so far used a system.new.dat and a system.transfer.list to create the system partition.
We can create them from the system.partition file after renaming to system.img in System_Extractor-WIN-master .
To do this the system.img needs to be unpacked and we need again a copy of the file_contexts.
After the image is unpacked we can pack it again as system.new.dat and system.transfer.list.
The last missing bits can be tricky though as now we need a META-INF folder that works for our device in question.
There are two way to fix that.
Method one:
Search the usually chinese websites using Google to find original firmware for your device.
Chance are that you will find something like an OTA update - in there you will find what you need.
Method two (I never tested that):
Take the META-INF folder from an OTA update of a box with identical hardware specs.
Most important part here is the memory configuration so for a 2/16GB box you need a 2/16GB OTA update.
Next of same importance is the WiFi/Bluetooth config.
If you only have Wifi than an update for a box With daul wifi and BT4.0 won't help you.
If the actual Wifi chip is a different one but CPU, GPU, Memory and connections are the same it should still work.
Once you have the META-INF folder included into your Install folder the firmware is ready to be zipped - in theory!
The X96 for example uses a hash check for the update and created system partition.
To be able to flash your image you need to know what the original recovery would expect - has check or not.
The updater script within the META-INF folder needs to be updated to match your build.prop details as well hash check/no hash check.
Again, with an original OTA update you will find these infos.
Only if you don't have the OTA and no clue what your updater script and recovery needs you are a bit lost.
I know I has not all the steps in detail and if you are without and OTA update you need to search but otherwise feel free to ask and I will try to assist to make it complete if I can.
Click to expand...
Click to collapse
Thank you for this explanation, but the explanation of the video to better understand everyone
Will see if I can at least add some pics while working on Nougat.
Hello,
Thanks for you tutorial.
I have a h96 Pro+ and the last firmware was a .img file... (Link of the firmware : https://mega.nz/#F!d1tHVZgA!Qc0mAom7FBHT9HDv3rGtGQ )
Is there a good guy who can convert this .img to a .zip file please ?
A lot of users are asking for this, me too and if you can help me to do this it will be really cool and appreciate
Thank you,
Carmin.
Thanks for your explanation im trting to port 7.1.1 to my tv box and i have found one funcional the only troble is the wi fi drivers not working ill give it a try latter today
Sent from my SM-N9300 using Tapatalk

Categories

Resources