How to convert PhoenixSuit image format? - Android Q&A, Help & Troubleshooting

Hello all,
I'm new to xda forum, so apologies if anything isn't formatted right or if this is in the wrong place.
I'm working with an Android device that uses the Allwinner A64. I've got an image (*.img) file that is from the device manufacturer. Ultimately, my goal is to be able to write a script that flashes the device without having to press any buttons from a Linux computer.
That seems like it should be pretty simple if you have the correct image file.
1. adb reboot bootloader
2. fastboot flashall <image.zip>
Unfortunately, the image that I have from the device manufacturer is in some kind of PhoenixSuit image format. I was able to unpack the file using imgrepacker (https://forum.xda-developers.com/showpost.php?p=28329544&postcount=1) but it gave me a bunch of *.fex files that I'm not sure what I can do with.
Using this image, I've been able to flash the device using PhoenixSuite on Windows and LiveSuit on Linux, but both of these tools are close sourced (as far as I can tell) so I can't figure out how they are doing it to write my own script.
So my question is:
1. How can I convert the PhoenixSuit image that I have into something that works with flashboot flashall?
2. If thats not possible, how can I script something that will flash on Linux using the image in its current format?
Thanks a ton!

Related

[Q] Cube U27GT - Help with Rooting a Stock Rom and can we get a forum?

Dear Admins,
Could we get a forum setup for the Cube U27GT WiFi version? I dug around on the site a bit beforehand but didn't see one, I apologize if I missed it and please direct me there if I did.
I have this tablet and I am doing some initial basic firmware development for it and want a proper place to start putting threads.
Dear Dev Community,
I can't root this bloody thing... At least, not the rom itself. Let me explain...
I can flash the stock rom from Cube and that can be rooted using Kango Root. --Fine...
However, I can't figure out how to replicate this when I make my own rom.
Thus far, here is what I have attempted...
1. Setup dsixda's excellent kitchen on my Ubuntu workstation.
2. Unpack the rom, clean things up, manually put the boot image into the dsixda unpacked working rom folder, run dsixda's root functionality (which add SU binary to xbin and SuperSu apk file to app folder as well as do some things with the boot image file).
3. Rather than using repack with Dsixda (which makes an update.zip image which I can't use because the stock recovery environment on this device can't flash zip update files and I can't for the life of me figure out how to get and or make a working CWM or TWRP recovery image for this unit)...
4. What I do is I run commands in linux to unpack the stock rom to another directory and mount that directory, then clear out a bunch of folders and then manually copy in my files from dsixda's working folder, then repackage up my unpacked stock rom into a new system.img file.
5. Then copy my now modified boot image, system image, and also userdata image (I modify that as well as that is where most all of the chinese bloatware is loaded from) to my SP_Flash_Tool, generate new checksum.ini file and flash normally...
What I get as a result...
1. As long as I am really careful with how I copy files into my new image, the new system flashes okay (if I am not careful, after flash USB storage for some reason has a format error and the system will boot but can't mount USB storage and other odd issues ensue as a result).
2. Assuming everything flashes okay, and no issue with USB storage partition, I have SuperSU installed and when I go to use an app (ES File Explorer or Root Checker) that require's root, I do get the prompt. However none of the root functions actually work and Root Checker tells me I am not rooted.
That is as far as I have got. So as a result, I have a really nice, westernized, cleaned up rom but with no root.
Anyone have any ideas?
This is my first adventure into mod'ing MTK roms so I am sure I am doing all kinds of things wrong . I had a good bit of experience on Rockchip SoC's before this though.
Kind regards and thanks in advance!
Roman
Figured it out!
So I finally did the following rather hackish work-around...
1. Flash stock firmware...
2. Root with Kingo Root
3. Enabled ADB
4. Attach to PC and fire up MTK Droid Tools
5. Take a full backup
6. Modify the system image from the backup and make changes
7. Put that in new firmware flash package
8. Flash new firmware
YAY - Cleaned up rom, modified, with root!
Once I get it all packaged up and uploaded to mtkfirmware.com I will post a link for anyone that wants a cleaned up rom with root!
The only downfall of the above method is that it absolutely requires that the developer have a device on hand because you can't just root the stock image file (at least, I couldn't figure out how... - bleh...
Kind Regards,
Roman
Dear roman,
Thanks for your hard work.
I have a simple question (I think) and if you have the time to reply or -any other android guru- I would be thankful.
My later issue was with a U27GT cube tablet, but I have others, one for each kid, and this is more of general question.
I am reading this and other forums about how to flash tablets from PC. My question is:
Can the flashing process be done from a SD card?
Thanks a lot and regards,
Fernando
SKorea

[Q] ADB sideload how to install/update a specific file in a specific directory

Hello guys,
so i have messed up my ZenFone 5's booting configuration. good thing is, i know where i have messed up, unlike other noobs like myself. i have been modifying the adbon.sh file, where i added a conditional to check if a file(/dev/keycheck) exists and if it exists(will always return 'true'), to extract the contents of a recovery.tar(custom recovery). problem is, now i cannot boot normally into my device. if anyone can help me with three things, i'd be grateful.
1. How to modify the adbon.sh file using:
(a) preferred choice: using adb sideload <filename> ( i need to update THAT SPECIFIC FILE ONLY) ->(the file is in /system/bin/)
(b) secondary choice: using fastboot flash command. is it possible to update a single file using fastboot flash? (probably not, i think) should i have to flash the entire system partition with a stock/custom ROM? (i already know most about this, but a clear good guide can help me)(i know it will overwrite the total /system partition)
2. Give me a link to the original(stock) adbon.sh file if method 1(a) is possible.
3. Give me a compatible link to a CWM recovery for my device, ASUS_T00J (the recovery in my recovery.tar is a stock recovery, i got f**** fooled into downloading a stock one where i thought it was a custom CWM recovery)

Boot.img or system.img unpack / repack, different size, odin fails, no boot

Well, as the title sugests, I've tried to root my phone (Samsung Galaxy J1 SM-J100MU) and failed. Since no twrp or any other custom recovery is made for my specific model, I tried the method that involves mounting the android systems and modifying the famous build.prop, or putting su binaries inside the /system folder.
I ran an unpack script from ubuntu to decompress the boot file, and simg2img to be able to mount /system following some guides I've found, and made use of mkbootimg to repack it and flash it.
The thing is that the phone won't boot because the modified boot image size differs from the original. The system also differs but Odin won't even flash it and I'll have to reflash the stock rom.
Any ideas about what it can happen? I get no apparently errors during the process of unpacking/repacking the images so I don't know. The only thing I can think of is that the unpack script says something like "There's an extra file in ramdisk; though this file can exist, the script is not made for this type of ramdisk", so I edited the script in order to skip this warning, and everything else went well. The bootimg got unpacked and then the ramdisk and then I modified default.prop.
Well, that's it, I hope you can understand and give me some help in order to proceed.
Thank you in advance.

Help with an updater script to flash a ROM onto a S905x2 TV box

Hi,
Long story:
This is not a question about a specific device, although it involves one (A95X MAX) which has made it extremely difficult to modify. I have a ROM that I want to install, but it is essentially only a system.img file in a RAR file which is only accompanied by a file SECURE_BOOT_SET. The stock recovery doesn't know how to use RAR files and, if I unpack the system.img & SECURE_BOOT_SET onto an SD card, stock recovery doesn't know how to handle that. Stock recovery just wants a zip file. (I can't use USB to send ADB commands to the box or use the Amlogic burning ROM tool. I can't get USB communications going, though the USB cable supplies power.)
Examining a TWRP.zip I find a relatively simple structure that I think should be able to get my system.img onto my TV box. It looks as though I just need an updater.script buried in a sub-directory off META-INF with the system.img in the zip's root directory, so, the updater.script...
Short version:
If I only put this command
package_extract_file("system.img", "/dev/block/system");​
into the updater.script and reconstruct a system.zip with my desired system.img is this sufficient to flash the system.img?
And another (hopefully simple) issue, do I need to sign the zip? If so, how do I do it? (Google has magically pointed me to how to sign a zip file.)
Thanks!
--
(If this is the wrong sub-forum, which is the right one?)
maybe a stupid question but is the "System.img" purely the system partition or is that the entire firmware just called system.img?
the "SECURE_BOOT_SET" file suggests its the entire firmware and not just the system.img in which case "USB Burning tool 2.1.6.8" will do the job
Tonian1878 said:
maybe a stupid question but is the "System.img" purely the system partition or is that the entire firmware just called system.img?
the "SECURE_BOOT_SET" file suggests its the entire firmware and not just the system.img in which case "USB Burning tool 2.1.6.8" will do the job
Click to expand...
Click to collapse
Not a stupid question. I'm pretty much in the dark. You may be right that it is the entire firmware. I have no way of seeing inside the package, but a developer elsewhere suggested I take the line of restructuring the package with Simg2img and dd it into the system partition. I renamed it system.img to try to restructure it with a version of Simg2img. And SECURE_BOOT_SET contains nothing readable, if it contains data for the install at all. The package containing these two files looks like no full firmware installation I've seen.
I cannot establish USB communications with this box (it doesn't behave like other S905x2 boxes in circulation, though it seems to have the same central hardware; no-one seems to be doing work on the box and there's no technical support), which makes the USB Burning Tool useless, as I understand it.
your system.img isnt a true system.img, its the entire firmware, which is also a .img file that has several other .img files inside it, this includes the proper system.img , boot.img and recovery.img etc.
i have the A95X Max and i have used USB Burning tool to flash firmwares to it.
Install USB Burning tol 2.1.6.8.
Go to whichever folder you installed USB burning tool in and create a new folder called "license" and put the the "secure_boot_set" file in the "license" folder.
start usb burning tool, select your firmware (.img) then hook the A95X Max to the pc via the back USB connection while pressing the reset/recovery button (hidden in the 3.5mm socket) and then insert power cable.
should pop up on USB Burning tool. press start.
Note: make sure the is nothing else in the USB slots while flashing or the HDD slot.

can't unpack boot.img or recovery.img

This post continues my quest to get android 5.0 for my Onida TV
since there was no info on this TV,
I decided to go digging around
I used ADB to pull the recovery block device and the boot block device into recovery.img and boot.img respectively
then I tried to use AIK unpack script to unpack them (It didn't work)
then I scanned the Interwebs for more unpacking scripts to try to unpack the images
none of them worked
I saw in many posts people saying that there need to 'ANDROID!' at the start of the boot image but I checked using dhex if there was anything like that. and there wasn't
Is it possible that the boot image is encrypted?
Or have I done something wrong?

Categories

Resources