How can I do this?
Can I somehow extract the whole /system and change the file, make it an img file and fastboot it back to the desire?
deswong said:
How can I do this?
Can I somehow extract the whole /system and change the file, make it an img file and fastboot it back to the desire?
Click to expand...
Click to collapse
if you have root, you can extract the file and push it back through Recovery
adb shell mount /system
adb push gps.pref /system/[place of gps.pref]
Related
so...i'm behide the curve on on this hero stuff (being a rom cook for the s200 i'm not complete clueless...but thats winmo)
Anyway i'm playing around and would love an answer on these from one of the resident dev's on here
1. i took boot.img from the RUU rom.zip of wwe 2.73.405.61, took the system.img, did the magic to create an update.zip, which seems to flash fine from a recovery rom BUT on reboot it's stuck on the Hero boot screen/logo, any clue as to where to look/debug (yes I did the wipe etc. etc. it must be something about the update.zip / boot.img i'm missing)
2. i assume there is still no way to re-sign the a changed RUU rom.zip ?
Thanks for your time !
1: extract the system with unyaffs
2: zip the contents of the extracted system
3: sign the resulting zip (androsign or whatever)
boot into recovery
4: copy over to sdcard
5: copy over boot.img also to sdcard
6: cat /dev/zero > /dev/mtd/mtd2
or
dd if=/dev/zero of=/dev/mtd/mtd2
whichever you prefer
7: flash_image boot /sdcard/boot.img
8: flash your update.zip or whatever you called it
9: wipe system (format DATA: & CACHE
OR
flash_image system system.img (might not work)
adwinp said:
1: extract the system with unyaffs
2: zip the contents of the extracted system
3: sign the resulting zip (androsign or whatever)
boot into recovery
4: copy over to sdcard
5: copy over boot.img also to sdcard
6: cat /dev/zero > /dev/mtd/mtd2
or
dd if=/dev/zero of=/dev/mtd/mtd2
whichever you prefer
7: flash_image boot /sdcard/boot.img
8: flash your update.zip or whatever you called it
9: wipe system (format DATA: & CACHE
OR
flash_image system system.img (might not work)
Click to expand...
Click to collapse
Thanks, i got that far, but rolling the whole thing (so boot.img + extracted system.img) into update.zip and flashing that from a recovery image is where it goes all tits up and doesn't boot, even tried without any changes and just taking the boot.img and system.img from a offical htc rom and creating an update.zip
so i must be doing something wrong but can't put my finger where it goes wrong.
anycase, i'll keep trying
thx
1: Did you sign your update.zip?
2: An update.zip usually contains an update script; did you write one too?
This is why I suggested you flash manually.
adwinp said:
1: Did you sign your update.zip?
2: An update.zip usually contains an update script; did you write one too?
This is why I suggested you flash manually.
Click to expand...
Click to collapse
both answers yes
still digging, but it could be that "something" in the update script isn't working, however i've copied one from a working rom, with the same results...
going through the script now....i'm sure it's something stupid and i'll smack my head later, but for now no go......thanks for your tips and time !
Edit:
is there something special you need to do with the boot.img if you just copy (unzip thats it) from a rom.zip and put it in the update.zip ??
Jesterz said:
Edit:
is there something special you need to do with the boot.img if you just copy (unzip thats it) from a rom.zip and put it in the update.zip ??
Click to expand...
Click to collapse
Either you push it to sdcard and
#flash_image boot /sdcard/boot.img
or
in the update.zip:
META-INF\com\google\android\update-script
where META-INF is a folder in the root, and update-script is a text file without file extension; its contents should be:
show_progress 0.1 0
write_raw_image PACKAGE:boot.img BOOT:
show_progress 0.1 10
So, the contents should be:
\META-INF\
com\
google\
android\update-script
\boot.img
zip all that into update.zip, and sign the zip.
Got bored of searching and googleing... but using MoDaCo's WIP R4 FroYo ROM and Clockwork Recovery... when I flashed the ROM I lost the boot time animation (the PC BIOS one) so tried to put it back in recovery using adb push *file* /data/local (file copied ok) but still only have the htc boot screen also tried pushing the file with the phone booted, but again no dice
Anyone got any ideas?
Thanks in advance
------ Resolution ------
Ok, firstly massive thanks to those who helped - you are what xda is all about ... I finally managed to resolve this problem by
adb mount /system
adb shell
looking around and removing all bootanimation.zip's I could...
then exit the shell session and adb push the bootanimation.zip to /system/media
adb reboot and
I found this info here: http://androidforums.com/all-things-root-droid/97562-froyo-boot-animation.html
Not sure why this keeps changing? Maybe it is something specific to the Modaco R5 ROM?
Try pushing it to /system/customize/resource
yes the directory for froyo is the
/system/customize/resource
thanks for the assist guys, I tried this in recovery
"adb push bootanimation.zip /system/customize/resource" which went ok, the adb reboot and no show with the new boot screen any ideas??
Many thanks
first of all
mount the /system
then the path should be /system/customize/resource/bootanimation.zip
still cant get it to work I'm afriad
Here is what I did...
reboot to recovery (clockwork mod)
adb shell mount /system/
adb push bootanimation.zip /system/customize/resource
adb reboot
and no new boot animation
any ideas what I'm doing wrong?
Ok, found this http://forum.xda-developers.com/showthread.php?p=7239986 - booted to clockworkmod recovery and tried:
adb shell
mount /system
and got "mount: mounting /dev/block/mtdblock3 on /system failed: Device or resource busy
MadMic said:
still cant get it to work I'm afriad
He is what I did...
reboot to recovery (clockwork mod)
adb shell mount /system/
adb push bootanimation.zip /system/customize/resource
adb reboot
and no new boot animation
any ideas what I'm doing wrong?
Click to expand...
Click to collapse
Is that a typo? the path for the first adb command entry should be 'adb shell mount /system', not 'adb shell mount /system/'
Also, where are you placing the bootanimation.zip file? try placing it directly to the C: (C:\bootanimation.zip) and try executing the commands again.
MasDroid said:
Is that a typo? the path for the first adb command entry should be 'adb shell mount /system', not 'adb shell mount /system/'
Also, where are you placing the bootanimation.zip file? try placing it directly to the C: (C:\bootanimation.zip) and try executing the commands again.
Click to expand...
Click to collapse
Thanks for the reply -
The bootanimation.zip is in the same folder as adb... it says xxx bytes copied which is the same as the file size... I've tried with /system with and without the trailling / still no joy..
If I do adb shell mount /system in recovery I dont see anything... but if I do adb shell [enter] then the commands I see the error about the device being busy...
Is there anyway to do this from a terminal app in the phone directly?? I seem to recall there is but cant find it...
Thanks for the help guys
Hi,
As you probably know, ext4 image can be extracted from system.sin but cannot be mounted. When trying to mount it, it fails with :
[ 1476.821582] EXT4-fs (loop0): bad geometry: block count 262144 exceeds size of device (144631 blocks)
I open this thread just to share what I did around the issue and maybe have some helpful quotes about it
Here is what I did (under linux)
# First create an zero filled file. Size is system partition size (262144 blocks of 4096 each)
dd if=/dev/zero of=/home/xperia/virtualfs bs=4096 count=262144
# Attach file to loopback
sudo losetup /dev/loop0 /home/xperia/virtualfs
# Format it with same features as system partition on phone
sudo mkfs.ext4 -O has_journal,^ext_attr,^dir_index,^flex_bg,^huge_file,resize_inode,filetype,extent,sparse_super,large_file,^uninit_bg,^dir_nlink,^extra_isize -v /dev/loop0
# Write extracted system.sin.ext4 extracted image to loopback
sudo dd if=system.sin.ext4 of=/dev/loop0
# Mount filesystem
sudo mount /dev/loop0 /mnt
It can be mounted and I can have folder structure but I can't work with files. Editing default.prop gives me a non readable file.
But we can go a step ahead as we can now mount the image.
Still some issues have to be worked out.
The poit is, why we cant mount system.img on ICS but we can on GB?
maybe someone can contact with sony t oask
im extracting the .sin to .img like always but its impossible to mount.. what are you using to extract the .sin to a .ext4?
BTW, thanks for the info, i've been trying to modify system.img since ICS appeared.
EDIT: of, ext4 can be extracte with flashtool ~.~
maybe we need to read something from system.partinfo
Yakandu said:
The poit is, why we cant mount system.img on ICS but we can on GB?
maybe someone can contact with sony t oask
im extracting the .sin to .img like always but its impossible to mount.. what are you using to extract the .sin to a .ext4?
BTW, thanks for the info, i've been trying to modify system.img since ICS appeared.
EDIT: of, ext4 can be extracte with flashtool ~.~
maybe we need to read something from system.partinfo
Click to expand...
Click to collapse
Yes Flashtool can extract image from system.sin.
partinfo is partition information used by loader in flashmode to identify where to flash image on phone. (Something like start nand address of system partition)
so, any ideas why ext4 cant be mounted? maybe its encrypted or something..
Sorry for double post, i found a solution
Flash the system through a .ftf with flashtools
Flash a custom kernel with recovery (or the nozomi recovery)
Backup nandroid
We get a system.ext4.tar ··· move it to your developement folder
Create a folder (mkdir system)
Enter nautilus with root acces
Extract system files to the created folder
Modify whatever you want
Make a flashable system.img with: "./mkuserimg.sh -s /system ./system.img ext4 ./temp 1024M"
AND ITS WORKING!
Yakandu said:
Sorry for double post, i found a solution
Flash the system through a .ftf with flashtools
Flash a custom kernel with recovery (or the nozomi recovery)
Backup nandroid
We get a system.ext4.tar ··· move it to your developement folder
Create a folder (mkdir system)
Enter nautilus with root acces
Extract system files to the created folder
Modify whatever you want
Make a flashable system.img with: "./mkuserimg.sh -s /system ./system.img ext4 ./temp 1024M"
AND ITS WORKING!
Click to expand...
Click to collapse
This solution is already known
But my goal is to be able to mod a system partition without having to flash it before. And more, understand why extracted system image cannot be mounted and how to work this out
oh, ok xD
i didnt know that solution, its new for me
Yakandu said:
Sorry for double post, i found a solution
Flash the system through a .ftf with flashtools
Flash a custom kernel with recovery (or the nozomi recovery)
Backup nandroid
We get a system.ext4.tar ··· move it to your developement folder
Create a folder (mkdir system)
Enter nautilus with root acces
Extract system files to the created folder
Modify whatever you want
Make a flashable system.img with: "./mkuserimg.sh -s /system ./system.img ext4 ./temp 1024M"
AND ITS WORKING!
Click to expand...
Click to collapse
Have you already tried flashing this img on your device? I have already tried this solution twice but didn't succeed (@Spectre51 that's why I haven't replied your PM yet). system.img was succesfully created but I got boot loop when I flashed it on my device.
Hi Androxyde,
I figured it out, basically we have to dig further in sin format as new ext4 sins skips part of the file. See my thread for more details.
PS: Thanks for flashtool, it's a great tool!
LeTama
letama said:
Hi Androxyde,
I figured it out, basically we have to dig further in sin format as new ext4 sins skips part of the file. See my thread for more details.
PS: Thanks for flashtool, it's a great tool!
LeTama
Click to expand...
Click to collapse
:good:
Ok it's hopefully just something I'm overlooking but haven't gotten it to work so far. I have ADB and Fastboot set up on computer and the phone is T-Mob m8, unlocked, rooted, TWRP, Custom ROM, S-Off, Super CID. I have downloaded the radio zip, extracted the radio.img and put it in the adb folder in my c drive. Now I followed a couple of steps posted:
Fiash via adb:
1. Download the radio.img above
2. Put the radio.img file into your ADB folder
3. Open up command prompt and copy and paste the EXACT lines
4. adb push radio.img /storage/sdcard0/radio.img
5. adb shell
5. su
6. dd if=/storage/sdcard0/radio.img of=/dev/block/mmcblk0p20
7. adb reboot
I get cannot stat "radio.img" no such file or directory any suggestions? thanks
I have read multiple instructions regarding how to root the Pixel XL (non Verizon) which look pretty straight forward; however, one instruction set said to copy the twrp img file to the adb folder while another set of instructions said to copy the twrp img file to the Partition-Tools sub folder. Wondering which is correct (or does it matter)?
Thanks for your help.
If adb.exe and fastboot.exe are in your path, just open a command prompt in the directory the twrp img file is in and run the commands. If not, copy the img file to the directory with adb and fastboot, open a command prompt there, and run the commands. Another alternative is to open a command prompt in the directory with adb and fastboot, and run the commands with the full path of the img file.