[Q] Extracting LG E400 stock files - General Questions and Answers

Hello everyone,
I'm new to low-level Android hacking, so I guess I need some help.
What I am trying to do is getting the stock files from an LG E400, and modify 1-2 things, repack, flash, and see if it works for me.
My first step:
1) Rooting the LG E400
2) Flash CWM Recovery
3) Create a backup
4) Get boot.img from the backup.
So I have a boot.img (which I think is stock, because rooting does not modify the contents of the boot image as far as I know.)
After that, I followed this tutorial to extract the kernel and the ramdisk.
I used a hex editor for this. I saved the kernel and the ramdisk as separate files, and I tried to gunzip the ramdisk. That seemed to work. However, after that, when I try to run cpio on the file, I get a lot of "Malformed number" errors, and only two empty folders are extracted.
And that is where I'm stuck at.
Are the LG phone boot.img-s encrypted somehow? Am I doing something wrong?
If anyone can help me, I would be really grateful.
Thanks in advance

Related

[Q] GT-P5113 modify stock firmware and flash question

I have spent several weeks working on this (reading thread after thread) on modifying stock firmware and im running into a problem. I more or less want to know if what i want to do is actually possible. I have downloaded the original .tar.md5 firmware image, opened with 7zip and "extracted" the .tar file (more or less just removed the hash) and then extracted the .img files from the .tar file. I have unpacked/mounted/modified/repacked using several methods (dsixda kitchen -which havent been able to work around adding the java path since after i add the path cygwin thinks im missing clean app until i remove the path in which case i get an error saying it cant find java/ i have tried mounting using ext4_utils in ubuntu) my issue arises when i take my modified and repacked system.img file i cant get it to work either by 1. zipping it in a .tar with the other .img files and flashing with odin, 2. zipping system.img alone into a .tar and flashing with odin, 3. installing cwm/root and flashing the system.img)
More or less my question is
1. is it possible to modify the stock firmware and load it onto the tablet without rooting
2. can system.img be flashed by itself or does it need the other .img files in the same .tar
3. does the tar file require being signed before flashing even with CWM recovery and root already on the tablet?
I have used these forums for a while to find answers, but i am new to posting, i havent needed to post a question until now since i spend as much time researching as i can before bothering people with a question (i like to figure stuff out and hate to admit defeat) Thanks in advance for the help despite my noobishness

[Q]Repacking boot.img (need help)

I was trying to learn about unpacking boot.img and tried to remove my initlogo.rle inside it since I do have a oemlogo.mbn (have 2 splash screens when booting). So I tried this tutorial on how to get that done in windows as I don't have a working Ubuntu as of now (although I still don't know how to do this the right way using Ubuntu). So I managed to unpack without errors, deleted initlogo.rle and repacked it without any errors. Then put the new boot.img inside an update.zip I made and flashed it into my phone. It was flashed successful. When I rebooted the system (from recovery) it was stucked at the oemlogo. Did I miss anything. My guess is that I didn't find out what my kernel base address is (don't know how to get it) and the script from the cygwin used a default address instead of the right one. So I tried to get my base address, unfortunately, I can't figure out how to do it. Can anyone help me out?

[Q] Getting .img from phone

Hi folks.
I have an unusual smartphone from a Brazilian manufacturer, CCE, who have been bought for Lenovo.
This manufacturer are not exactly knowed for their support our product quality and I'm prety sure my device will not be updated or suported for any longer.
It's the SK504 and I want to try to customize the rom, build tunning apps (battery consumption sucks) and things like that. I have a good programming backgroung but not for mobile devices so I'm stepping on eggs for now.
The first thing I tried to do was get a backup from my actual rom so if I mess with something I shouldn't I would be able to come back to a working version through fastboot.
long story short, I managed to obtain through romdump 5 files; checksum.md5, config.gz, system.info.gz and system.tar
but, in the posts I been reading, it gives me the idea that I should get a boot.img, a recovery.img and a system.tar.gz
And with this I would be able to generate my own system.img through a different process.
Since I'm not being able to find what I did wrong, can anyone tell me if there are a different way to get those boot.img and recovery.img?
I tried the "adb backup -f boot.img boot" but it generates a 1kb .img file and I don't believe this is a valid boot.img.
rhodesbauer said:
Hi folks.
I have an unusual smartphone from a Brazilian manufacturer, CCE, who have been bought for Lenovo.
This manufacturer are not exactly knowed for their support our product quality and I'm prety sure my device will not be updated or suported for any longer.
It's the SK504 and I want to try to customize the rom, build tunning apps (battery consumption sucks) and things like that. I have a good programming backgroung but not for mobile devices so I'm stepping on eggs for now.
The first thing I tried to do was get a backup from my actual rom so if I mess with something I shouldn't I would be able to come back to a working version through fastboot.
long story short, I managed to obtain through romdump 5 files; checksum.md5, config.gz, system.info.gz and system.tar
but, in the posts I been reading, it gives me the idea that I should get a boot.img, a recovery.img and a system.tar.gz
And with this I would be able to generate my own system.img through a different process.
Since I'm not being able to find what I did wrong, can anyone tell me if there are a different way to get those boot.img and recovery.img?
I tried the "adb backup -f boot.img boot" but it generates a 1kb .img file and I don't believe this is a valid boot.img.
Click to expand...
Click to collapse
Instead of making a backup, have you tried to find original restore image? Usually it is a an .IMG file.
qwertyu123 said:
Instead of making a backup, have you tried to find original restore image? Usually it is a an .IMG file.
Click to expand...
Click to collapse
I used Root Explorer to look for both, recovery.img and *.img.
No result.
try this http://forum.xda-developers.com/showthread.php?t=2450045

Help with ftf extraction for 6.0 ROM.

Hi guys, I'm fairly new to this whole ftf system so I am having a bit of trouble extracting the boot.img out of it. I am working on a pure stock 6.0 ROM but need the boot.img extracted, I already got the system just need boot. I have tried using flashtool to convert the boot.sin to a boot.img and it tried making a 450 terabyte file when I clicked dump data. Any advice would be great. I also just tried renaming extension but that yielded a black screen upon immediate boot.
As a side note I don't think this is even going to work because starting from 6.0 and above the file system changed from system folder to the new format with the .dat files and that really makes things even more complicated than they already are.

[Modify BOOT LOGO!] Samsung Galaxy S6

Welcome. Today I am going to teach you how to modify your android boot logo!
Modify at your own risk! I strongly recommend that you do not try this. But if your going to attempt this, make a BACKUP! I will explain the backup process down the page!
This method has been tested on the Galaxy S6. I RECOMMEND you do NOT attempt this method on any other smartphone other than the S6!
I own a Samsung Galaxy S6 [SDK21 ARM64] and my carrier is Straighttalk. This method might possibly work with the newer Android smartphones. In other words, attempting to do my method will probably not work with androids running 4.4.2 or lower. I will first explain why.
According to what I researched, there is a file in the root directory of the Android system that contains a file called "initlogo.rle". That is your boot logo. Older Android phones had this. The .rle is a bitmap extension and cannot be edited with Android. Actually, let me rephrase that, the .rle COULD MAYBE possibly be edited if you were to download the right tools off of the Play Store but computers can identify .rle as a bitmap very easily and can be opened. Windows computers can open .rle according to what I researched.
The initlogo.rle is also part of the boot.img. The boot.img contains the kernel and the boot files (like init.rc), that are necessary for the phone to boot up. Modifying your boot.img requires a computer. You can't just replace the initlogo.rle with another one. To make changes to a boot.img, you need to unpack the ramdisk, replace or modify the files, repack, and THEN flash the modified boot.img to make the changes.
Newer Android smartphones don't have initlogo.rle. Or at least MINE doesn't. Instead, I had to search for my boot logo which took my quite a while. After searching deep into the android system and messing around with the files, I came accross PARAM.
If you were to go in the /dev/block/platform directory, you would come accross a file called PARAM. Mine was in the directory /dev/block/platform/15577000.ufs/by-name. Inside that directory is basically the whole system. You will find files like BOOT, EFS, OTA and all that. You will also notice that all those files look empty. They all show 0.00B. I don't know exactly why that is, but they aren't really empty files.
My official boot logo was in the file "PARAM". What I did was copied it to my internal directory and attempted to extract it. After trying different extensions, I founded out that .tar is the correct extension. So to extract it, I renamed "PARAM", to "PARAM.tar". After doing that, you will be able to actually extracted it and be left with files with .jpg. Basically pictures inside it. I used root browser. :good:
Inside, you should find "logo.jpg". And whatta ya know! It's your boot logo!
I used PicArt to create a custom boot logo. It is a really great app! You can get it off the Play Store. Then I renamed it to logo.jpg and replaced the original logo.jpg with my newer one. Make sure it is named "logo.jpg" or there will be errors!
Now the last step is to archive the files through .tar format. I used root browser to do that. To correctly archive the files, multi-select the .jpg files. In other words, DON'T SELECT THE "PARAM" FOLDER!!!
When archiving the files, use LZMA compression option along with tar.(Look for that with root browser). This will not compress the files as much which will reduce the risk of errors.
Once it's archived, rename the new archive file to just "PARAM".
LAST STEP! Before overwriting your PARAM, copy your modified PARAM into the /system folder and set the correct attributes (PERMISSIONS) to -rwxrwxrwx. Now you are ready. Copy "PARAM" to the same director where you originally got your unmodified PARAM file. It will ask you if you want to overwrite. Say yes.
I was now introduced with a different boot logo. My phone never got bricked during the process. However, with Android, ANYTHING can happen, so I will give you some advice. If you have a custom recovery, you can easily restore PARAM. Make a copy of your original PARAM and put it in your internal directory. If something ever goes wrong, you can use the file manager (like with TeamWin) and replace the currupt PARAM with your backup PARAM. Then set the permissions to -rwxrwxrwx or 0777
I strongly recommend that you do not try this. Yes, I took the risk and was able to safely change my boot logo. However, not all Android devices are the same so be very careful if you are attempting to do this one an Android device OTHER than the Galaxy S6.
Leave comments if you have any questions!

Categories

Resources