[Q] How does the system work? - LG Optimus G Pro

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.

Related

possible to create aku3 rom for my device with aku1?

My device rom seems to be aku1.
is it possible that i use other roms,which is aku3,replace dlls and other things from them and create my aku3 rom?
For example i saw contacts in newer roms is lot improved,is it possible that i use contact.exe(if it is the file name)from newer roms,replace it into my current rom file?or other .exe or .dll files?
Thats what ROM cooking is.
You take components that are generic and not device dependent from a more advanced ROM and place it in a ROM for your device that contains all the device specific stuff like drivers.
BUT: it is not as simple as it sounds.
First, you need a ROM image for your device (and if you are going to ask more serious questions on this matter you must specify exact model of your device) which you can get through a dump or from an official update.
Second you need tools, also specific for your device, that can take apart that image and put it back together.
And finally you need the new files which also have to be obtained from a ROM image for the more advanced device.
Thank you.
Well i guess i have the tools,becouse i could create the dump folder.and repack it again.
although the generated files were not same.(someone in chineese forum told me it is enough that value in bootloader be same,in my case values before 0x060000,i dont know if it is enough or not).
I havent yet tried to upgrade that rom,until i have enough knowledge.
But if we assume i have all tools,is there a guide or something that what files i can replace?
for example if i want to have new contact program,what files should i upgrade?
or is there a list of all dlls,exe files which are device independent?
so?anyone?
Some other questions:
using addfile/removefile,can i replace .dll files?
becouse i used the dump folder,shellres.96.dll,and deleting/adding,i get no icons in windows.
also using s000 file renaming it to shellres.96.dll i still get the same problem?
is there anyway to change this dll?

Howto make a permanent change to $PATH?

Is there a way to make a permanent change to the $PATH variable to place /system/xbin ahead of /system/bin? I found /init.rc when the phone is booted, but obviously I can't make changes to that yet. When booted into recovery, I can't find the same file to edit it. The /init.rc file is specific to the recovery image at that point.
Basically, I have busybox installed in /system/xbin and want it to override the /system/bin apps. I do not want to install busybox in /system/bin.
Any help would be appreciated. Thanks!
are you trying to export a path? if so it would go something like
export PATH=$PATH /system/bin
or you can
PATH=$PATH /system/bin
export PATH
B-dub25 said:
are you trying to export a path? if so it would go something like
export PATH=$PATH /system/bin
or you can
PATH=$PATH /system/bin
export PATH
Click to expand...
Click to collapse
He's trying to make it so he doesn't have to reset the $PATH variable every time. I'm assuming you are currently just using something like.
export PATH=/system/xbin:/sbin:/system/sbin:/system/bin
every time you enter shell. The way I would do it is by editing the init.rc as you stated, however it doesn't stick on the incredible, also as you stated.
The only thing I can recommend is making it a shorter PATH to type. You could just enter
export PATH=/system/xbin:$PATH
for example, and that would accomplish the same thing with less typing.
The only other way that I know of would be to make a start-up script, not sure how to accomplish this outside of init.rc however. In linux I would add it to the bash_profile or something similar. Not sure how to do it in android...
Not only for shell, but I'd like to be able to do it for installed apps as well, such as OpenVPN. Ah well, just have to wait for full root unlock.
This is done in the ramdisk. You can actually do this yourself. You need to extract the boot image, break it apart into the ramdisk and kernel, alter the init.rc file, package it back up and then flash it back to your phone in recovery.
Even if we get the nand unlocked, you will still need to do this since the init.rc recreates itself from the ramdisk during each boot.
If you are using a custom ROM, just request the dev to do this.
ihtfp69 said:
This is done in the ramdisk. You can actually do this yourself. You need to extract the boot image, break it apart into the ramdisk and kernel, alter the init.rc file, package it back up and then flash it back to your phone in recovery.
Even if we get the nand unlocked, you will still need to do this since the init.rc recreates itself from the ramdisk during each boot.
If you are using a custom ROM, just request the dev to do this.
Click to expand...
Click to collapse
Thank you kindly, didn't know where those files were kept. Interesting how that works, so basically the phone works like a hardware chip, where the main parts of the OS recreate themselves from ROM, similar to firmware... I like it... prevents corruption I suppose.
Out of curiosity (I've never made a ROM, and therefor never packaged the boot image), is it packaged as a tarball? Or do you require ADB to extract? If you don't want to answer, I can probably track it down somewhere.
It's a bit more complicated than that. Take a look at this link. I'm sure there are other ways, but I would recommend only doing this in some flavor of Linux like Ubuntu.
HOWTO: Unpack, Edit, and Re-Pack Boot Images
ihtfp69 said:
It's a bit more complicated than that. Take a look at this link. I'm sure there are other ways, but I would recommend only doing this in some flavor of Linux like Ubuntu.
HOWTO: Unpack, Edit, and Re-Pack Boot Images
Click to expand...
Click to collapse
Cool link. Thanks.
But yea, pretty much seems to be that simple, Just a gzip (zip) and tarball (cpio). The only thing I wasn't expecting was stripping out the 2k header with a hex editor, but I think I'll try using the scripts found through that link to do that, not that I couldn't do it by hand... but I'm lazy...
Thanks again.

Building Stock Firmwares (Verizon Specifically)

Hey guys, I've been reading for a while now, finally decided to sign up.
I'm making some modifications to the Galaxy Tab, just playing around and seeing what all is possible. Before I go start deleting potentially important system files, I wanted to get myself a little 'brick insurance'. I'm looking to get a copy of the stock firmware for the US Verizon Wireless version of the Tab (SCH-I800). It is currently running DJ11.
I don't think it is available from either Samsung or Verizon currently, although Samsung HAS provided all of the source code. If I wanted to make a backup of the firmware, something that I could load from the SDCard (ideally, just give it one of those update.zip files) how would I go about doing that?
This is my current plan, tell me if I'm not on track here. I have downloaded the Android Froyo source code available on the Android site. I downloaded the SCH-I800_OpenSource files from Samsung's open source center. If I combine these files as described in the readme from Samsung, and then build the whole project, I should get some sort of "stock" software, in basically the exact same state that it was when I got it from Verizon. Does this sound right?
I want to be able to quickly revert back to like-new set up, so I would prefer to not have to use one of the modified European/International versions if possible. Is there any other trick to getting an unmodified firmware to revert to? Any suggestions?
Thank You
I don't think it'll matter until someone creates a new recovery image. If you could get a clockwork recovery image, you'd be a hero
DavidThompson256 said:
This is my current plan, tell me if I'm not on track here. I have downloaded the Android Froyo source code available on the Android site. I downloaded the SCH-I800_OpenSource files from Samsung's open source center. If I combine these files as described in the readme from Samsung, and then build the whole project, I should get some sort of "stock" software, in basically the exact same state that it was when I got it from Verizon. Does this sound right?
Click to expand...
Click to collapse
Not even close i'm afraid!
Samsung are only required to release the Linux kernel source. The actual OS is not licensed under a "copy left" license, so Samsung are under no obligation to release their customized Android code.
So, you could create your own AOSP build, but this would be absolute stock Froyo - no Samsung launcher, or any of their custom apps.
Regards,
Dave
Yaotl said:
I don't think it'll matter until someone creates a new recovery image. If you could get a clockwork recovery image, you'd be a hero
Click to expand...
Click to collapse
You can use odin or redbend_ua to flash firmwares, you don't necessarily need clockwork - although it would be nice!
Hey infamousjax,
Do you happen to have an update.zip for the verizon tab you can upload? I managed to ninjamorph my framework so nothing opens anymore. I must have used a file that was the wrong png format or something. Anyway I do have the backup framework-res.apk, but I am unsure on the "update-script" as I can't get programs on my tab at the moment.
ninja4hire said:
Hey infamousjax,
Do you happen to have an update.zip for the verizon tab you can upload? I managed to ninjamorph my framework so nothing opens anymore. I must have used a file that was the wrong png format or something. Anyway I do have the backup framework-res.apk, but I am unsure on the "update-script" as I can't get programs on my tab at the moment.
Click to expand...
Click to collapse
I have the Sprint version... and the stock recovery can't flash update.zips unless they are signed.
infamousjax said:
I have the Sprint version... and the stock recovery can't flash update.zips unless they are signed.
Click to expand...
Click to collapse
Yeah I just tried to make an update.zip and sign it with a test signer. Now when go into recovery and run the update.zip it freezes on an Android icon with an exclamation point.
ninja4hire said:
Yeah I just tried to make an update.zip and sign it with a test signer. Now when go into recovery and run the update.zip it freezes on an Android icon with an exclamation point.
Click to expand...
Click to collapse
Can you boot up regularly?
yeah, it's just that I can't open programs or the settings menu.
edit: I have been trying to do an update.zip, but I keep getting "E: signature verification failed". I have tried to different signers already...
This one
http://www.robmcghee.com/android/creating-an-android-update-zip-package/
and this one
http://www.londatiga.net/it/how-to-create-android-update-zip-package/
Your not going to able to sign it without Samsung's signatures... and good luck finding those
yeah I pretty much gave up. I called last night and got the verizon insurance. So now I'm just gonna wait a few days then tell them I dropped it and pay $80 for a new one.
just tell them it started bootlooping for no reason... they should replace it for free if its within 30 days
So it sounds as though I'm not really on the right track here, perhaps I don't need to recompile this thing myself. From some of the replies, I've gathered that there IS at least some way to create a backup of the firmware, in case I screw it up.
Can anyone point me to specific steps on how to do a backup for the Tab? I've seen several guides for other phones before, but I believe that each device is slightly different, and may take different steps. Any suggestions?
Thanks again.
For your stock recovery
Code:
cat /dev/block/bml8 > /sdcard/recovery.bin
For your kernel
Code:
cat /dev/block/bml7 > /sdcard/zImage
Thanks a lot, that info was really helpful!
So, unrelated now, but just kind of curious... is there a reference sheet somewhere or something that explains what each of the files in /dev/block is for? I know they are different sections of the filesystem.
I have about 60 different files in that directory, and was just curious to know what each of them was for.
Thanks again for all the info.
DavidThompson256 said:
is there a reference sheet somewhere or something that explains what each of the files in /dev/block is for? I know they are different sections of the filesystem.
Click to expand...
Click to collapse
What they represent is different devices, not different sections of filesystems. At best (without RAID or LVM) each device holds one filesystem. In unix, filesystems can be mounted at various points into the root filesystem to appear as a single namespace, but they will still be separate filesystems.
Under the block dir you will see anything that is a block device, anything that can be written to randomly, as opposed to a serial type of device. So, all the random access hardware on your device (SDCARD, NAND...) will be represented there except for your RAM. Each physical device will likely have partitions on them so, if a device is named xxx, xxx01 will likely mean partition one on device xxx. Sometimes the same device will appear with several names, one may be buffered access, the other may be raw.
Your internal NAND is likely on the same device, just different partitions of that device. Some of these partitions may not hold filesystems, they may hold other blobs such as a boot loader, or the kernel. To see which ones hold filesystems, you can type df in a terminal and you will likely see which devices are mounted where in the filesystem namespace.
As for the rest of the devices and partitions, they are very hardware device specific. And I don't own a Galaxy tab, so I can't help with that, sorry. But, I hope I didn't give you info you already knew and I hope it might have been at least somewhat helpful...

[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?

Unpacking/Packing stock rom (first results)

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!

Categories

Resources