Unpacking/Packing stock rom (first results) - Transformer TF300T Android Development

Hi to all.
Right now I'm trying to figure out how stock JB is packed.
I found great tool that can pack/unpack stock rom.
But it contains some errors.
I fixed all the errors, and I found out that:
1) It contains some unknown 256 bytes. I guess it some sign.
2) I packed to zip by some magic app. Because right now I unpacked blob file, the packed it. I used compare tool to compare original blob file with newely created and it says they are the same. Packed to ZIP and tried to install. Installation failed. So, I assumed, that they use some application to pack
Maybe someone tried to do the same? Some ideas?
PS: Right now I seems like the only wat to get root. Because current permissions in android allows to write only to /proc/procID/ folder and /sdcard that's all.

We wont help you until its out of development so move it and we can help, DEVELOPMENT ONLY!

Related

[Q] Create flashable .zip?

Hi im working on creating some boot animations. Ive got the files ready, but i cant figure out how to put them into a flashable .zip.
I flashed this file thunderbolt boot animation and it worked so i figured if i just replaced my animation and audio it would work but i get an error saying "e:update script not found" or something along those lines.
Id like to know if there is an easy way to create a "template" were i just copy my animation into a folder and zip it, or if there is a program that will package it for me including the script/etc.
Any input or guide on how to make these boot animations flashable .zip's would be great, thanks.
Eat it iPhone said:
Hi im working on creating some boot animations. Ive got the files ready, but i cant figure out how to put them into a flashable .zip.
I flashed this file thunderbolt boot animation and it worked so i figured if i just replaced my animation and audio it would work but i get an error saying "e:update script not found" or something along those lines.
Id like to know if there is an easy way to create a "template" were i just copy my animation into a folder and zip it, or if there is a program that will package it for me including the script/etc.
Any input or guide on how to make these boot animations flashable .zip's would be great, thanks.
Click to expand...
Click to collapse
Thats weird it didn't work. Should. Maybe it wasn't re-packaged correctly.
Try the one attached.
CCallahan said:
Thats weird it didn't work. Should. Maybe it wasn't re-packaged correctly.
Try the one attached.
Click to expand...
Click to collapse
Thanks ill try it out, just dont have the time right now.
If you cant figure it out i'll give you a guide tomorrow when i'm off my iPad .
did you rezip it correctly?
I ran into this trouble, I forget what it is, but you have to zip the files a certain way or they will not work. I don't remember the settings anymore, but just creating a regular zip file won't work.
There is a good guide to making your own update script on xda somewhere. Just search the entire site. If i'm just flashing something simple like a theme or boot animation sometimes I just use someone else's flashable zip and replace the necessary files. I can't remember off the top of my head, but iirc there are two folders you want to keep from someone else's zip. Meta-inf which is basically the signature files and something else which contains the script. If you dissect someone's zip it should be obvious what the other folder you want to keep is. You will find the update script in one of the sub folders, and if you want you can open it with a text editor and get an idea of how the script works.
If you need more info I can help you more when I get to my computer.
Sent from my PC36100 using XDA App
dkdude36 said:
If you cant figure it out i'll give you a guide tomorrow when i'm off my iPad .
Click to expand...
Click to collapse
Id appreciate a guide either way, id rather learn to do it myself than use someone else's. No rush as i cant really approach this til the weekend.
Eat it iPhone said:
Id appreciate a guide either way, id rather learn to do it myself than use someone else's. No rush as i cant really approach this til the weekend.
Click to expand...
Click to collapse
ok, here it goes.
first, figure out where you want to push your file. i'd reccomend pushing manually in recovery to make sure the file itself works. then, using a tool like 7zip (pc) or betterzip (mac) create a file structure that matches the one on the phone. for example, if you wanted a boot animation to be put in system/customize/resource, make a folder system, customize in that, resource in that, and the bootanimation.zip inside that. now you have the main part. next, make a folder in the root of the zip called META-INF (caps counts) inside that, com, inside that, google, and inside that, android. thats /META-INF/com/google/android/. inside android, you need to place in an update-script. i'd reccomend taking one from another zip and just editing it becasue i still have not figured out a way to make that type of file (unix exec) from scratch. open it up in a .txt editor like notepad++ (pc) or coda (mac) and write your script. here is the baisic script for copying the directory system on the zip to system on the phone (like flashing a boot animation).
copy_dir PACKAGE:system SYSTEM:
CAPS COUNT AND MAKE SURE YOU HAVE AN ENTER AT THE END. IF YOU DO NOT HAVE AN ENTER AT THE END (TO MAKE IT TWO LINES INSTEAD OF ONE, LIKE ISSUEING A COMMAND) THEN IT WILL NOT WORK AT ALL ( E:SYNTAX ERROR IN UPDATE-SCRIPT IS THE ERROR YOU WILL GET)
so put this file into the folder android, and zip it. make sure it is in store only, compatibility mode, if you have such options. then, use an auto signer (or just say zip is not signed and make sure to put sig verification off) to sign the zip. flash, and watch your work magically appear.
the update-script i showed is written in amend. i have no idea how to write in edify bcuz it is much more complicated with the binary and stuff. so dont flash with cwm 3.0+.
good luck. ask if you have any questions.
hello will this methed work on like adding some personal apps you want to be on your rom?

Install zip-files

On my rooted Defy - how do I install a zip-file??
Like this one;
http://forum.xda-developers.com/showpost.php?p=12426274&postcount=24
install the 2ndinit apk 1.4.2 newer ones wont work with some files
then reboot 2 times.
third reboot: press volume down, when the led is blue.
now choose recovery by pressin vol up or down and power to accept.
then choose costum recovery, and apply zip from sd. choose your file and confirm.
done
hope this answers your question
Thanks, seems simple enough
uh, where do I find 2ndinit.apk
You can find it here.
I know how to install .zip but I have a question. CWM3.1 does not flash some .zip like a baseband or a theme. It says "aborted". I think that the problem is that the file is not signed or something. In CWM2.5.1.8 works but the problem is that CM7 or MIUI changes it to CWM3. So, what should I do?
Thanks!
Works fine, even the mentioned zip-file!
The "issue" is that the latest CWM3.x no longer support "amend scripting" (stored in update-script) and won't apply zip's created with such scripts. Therefore all .zip which where written using the old method should be converted to edify scripting (which use different statements - more details here-).
is there an way to downgrade the 2ndinit? an how-to would be very nice
You can replace the recovery file from /system/bootmenu/recovery/sbin with the one from 2nd init 1.4.2 . The file persimmon should be rwxr-xr-x (755).
nepotu said:
You can replace the recovery file from /system/bootmenu/recovery/sbin with the one from 2nd init 1.4.2 . The file persimmon should be rwxr-xr-x (755).
Click to expand...
Click to collapse
and how do i do that? with rootexplorer? what for do i need the file permission? to change it or to set it after changing the files?
Yup. You can replace it using an app like root explorer. And the file permission should be set up after you copy the file (if you have the wrong file permission it won't work).
EDIT: I haven't tried yet to downgrade it this way but that's what I've read on the forum, therefore I cannot guarantee you it will work.
sry for me being a noob. i found the file named recovery in the folder you mentioned. but have got only the file 2ndinit.apk..... where do i get the recovery file from 2ndinit.apk ?
thank you for your time!
You can unpack it using a tool like Apk Manager 4.9 or simply by using 7zip to extract the files from the apk which is in fact some sort of archive. However as I've mentioned in the previous post I didn't tried to downgrade using this method. All I can say is that I've read here on xda about this method, therefore I cannot guarantee you this will work. I think is better to wait someone with more experience to answer.
As an unexperienced user i think i'll wait for a better solution.
As i read, this problem appears quite often, how come that nobody tried to make a solution for this problem?

[Q] How does the system work?

On Samsung phones I guess you can turn root on/off by changing the variable in default.prop, but I have my phone rooted and it says ro.secure=1. How would I modify the bootloader? What would I look for to find out what I'm talking about?
I would like to try compiling my own kernel too. XDA University has information about compiling the kernel, but it is kind of unclear about how to put the actual package together though, or at least confusing. It says just zip the image and .ko files together and then it is good to flash, but then gives a file structure tree with unknown files? I downloaded a kernel to test from this site and the file structure was different, and it also reset the whole phone to get the job done.

Flashing is not working (at all)

Been busy for a week now to create my own custom rom. I got the advise to build the ROM i want by edited the ROM i have now on the phone by edited it all on the phone. Then i did the "dd" command to extract the rom to a system.img file. Created a META-INF folder with a updater-script where the locations are defined like how the structure is on my phone. Zipped the META-INF folder incl. the system.img to get it ready to flash.
But when i try to flash that it keeps saying ERROR: 6 in WTRP.
Because flashing any other custom rom is workng, i am doing something wrong here, but i really don't know it anymore because i have run all out of options.
Anyone a tip which i could do?

issues with update zipping

Hi all, having a strange issue with a signed update zip file.
i have an update i need to modify, i made the changes and signed it properly, but update failed.
to make sure, i just unzipped the original file and zipped it again (no changes and all signatures shouldn't change) - update failed AGAIN.
(BTW i also tried to sign after zipping, that didn't help as well).
the original zip and the new one aren't the same size, but when extracted all files are identical.
would appreciate any direction here..
some specific info - i'm trying to modify a connected car (FlyAudio) update file, the recovery is proprietary so there's little info on why it fails.
bigfoot2047 said:
Hi all, having a strange issue with a signed update zip file. i have an update i need to modify, i made the changes and signed it properly, but update failed. to make sure, i just unzipped the original file and zipped it again (no changes and all signatures shouldn't change) - update failed AGAIN. (BTW i also tried to sign after zipping, that didn't help as well). the original zip and the new one aren't the same size, but when extracted all files are identical. would appreciate any direction here.. some specific info - i'm trying to modify a connected car (FlyAudio) update file, the recovery is proprietary so there's little info on why it fails.
Click to expand...
Click to collapse
Typically, update.zip files are recovery flash files and ODIN doesn't flash zip files in that manner.
***Please Note: As always, I welcome any member to help with further valuable information/clarification for any of my posts.
Sent via Communicator [d2vzw] from the Bridge of the U.S.S. Enterprise.
ok, so the problem is that the update.zip (it has a different name but it's an 'update.zip' file) wasn't signed.
after extracting, zipping, signing i'm getting a file that's ~1K smaller than the original and identical up to that point.
the tool i'm using to sign uses test keys so i assume it's a keys issue.
--------------------------
update - needed to sign with -w (signapk option) that added the required footer.
thanks all

Categories

Resources