edit system.img - XPERIA X8 Android Development

hy everybody.
i try mod the system.img on ubuntu linux with unyaffs and mkfs.yaffs2, i "hacked" the symlinks(because the armv6 unyaffs doen't like) so now everything is ok, unyaffs works well. BUT:
when i flash the other sin files with flashtool, my x8 is restart after a green sony ball. i gave to all file in bin folder: rwx-rx-rx and the all other files got rw-r-r permissions.
so, i don't know what is the problem with this method.
//my system.img was flashed with a method in "clean and pre-rooted 2.1 rom" thread.//
in attachment the filesunyaffs and mkfs.yaffs2.x86)

unfortunately unyaffs-x86 does NOT preserve all file permissions if image is extracted and reassembled in Linux x86.
You have to extract/assemble on the phone to keep permissions.
Or, alternatively, you can fix permissions by using xRecovery tool, there's a menu "fix permissions".
To see why exactly your phone reboots, use adb logcat from PC.

racht said:
unfortunately unyaffs-x86 does NOT preserve all file permissions if image is extracted and reassembled in Linux x86.
You have to extract/assemble on the phone to keep permissions.
Or, alternatively, you can fix permissions by using xRecovery tool, there's a menu "fix permissions".
To see why exactly your phone reboots, use adb logcat from PC.
Click to expand...
Click to collapse
yess, thank you! now i found a mkfs.yaffs2 for arm processors for android. it's verry slow.
so i made my sdcard to ext2, and now i try to "extract" my img.

so ... It's used to ?

trapacska said:
hy everybody.
i try mod the system.img on ubuntu linux with unyaffs and mkfs.yaffs2, i "hacked" the symlinks(because the armv6 unyaffs doen't like) so now everything is ok, unyaffs works well. BUT:
when i flash the other sin files with flashtool, my x8 is restart after a green sony ball. i gave to all file in bin folder: rwx-rx-rx and the all other files got rw-r-r permissions.
so, i don't know what is the problem with this method.
//my system.img was flashed with a method in "clean and pre-rooted 2.1 rom" thread.//
in attachment the filesunyaffs and mkfs.yaffs2.x86)
Click to expand...
Click to collapse
i've created sh script to view your current permissions.
it could be useful to re-set the permission manually to create the ROM
how:
upload to root of sdcard
run
Code:
su
cd /sdcard
sh plist.sh
it will create folder "permissions" on your sdcard.
all files permission listed there
open with notepad++

propc said:
i've created sh script to view your current permissions.
it could be useful to re-set the permission manually to create the ROM
how:
upload to root of sdcard
run
Code:
su
cd /sdcard
sh plist.sh
it will create folder "permissions" on your sdcard.
all files permission listed there
open with notepad++
Click to expand...
Click to collapse
it's cool! thank you. now i try to debrand the oroginal x8 rom.

trapacska said:
it's cool! thank you. now i try to debrand the oroginal x8 rom.
Click to expand...
Click to collapse
you know what. i've found a better method to change permissions
1-mount original system.img
Code:
mkdir tmp/1
sudo mount -o loop /your/system.img/path /tmp/1
2-clone permissions from original system.img to your system folder
Code:
chmod -R --reference /tmp/1 /your/new/system/path
and the permission fix done!
EDIT: tested. and worked. I've finally created my own modified ROM (running on sdcard)
EDIT2: some problem with root permissions, will work on it

thank you i found a way to fix permissions too:
1. unyaffs original system.img
2. in busybox shell mount it to r/w
3. copy xrecovery and su and superuser to fresh rom.
(for me it works well without xrecovery fix permissions)
if there is some error, you can fix it with xrecovery

Hello,
Can you try to change the /system image with one from froyo ? You can find such image in the X10 forum. I thing that if we change the contents of the /system with such from froyo it should work. With the standard kernel from eclair.
Please try this and let me know.

bnight said:
Hello,
Can you try to change the /system image with one from froyo ? You can find such image in the X10 forum. I thing that if we change the contents of the /system with such from froyo it should work. With the standard kernel from eclair.
Please try this and let me know.
Click to expand...
Click to collapse
i tried it. no luck. too many files. where are the files that need to be edited?
/system/lib?

propc said:
i tried it. no luck. too many files. where are the files that need to be edited?
/system/lib?
Click to expand...
Click to collapse
/system/framework (for a skin)((but the all folder))

trapacska said:
/system/framework (for a skin)((but the all folder))
Click to expand...
Click to collapse
thanks. will try porting from htc legend 2.2 rom later.

Related

X8 2.1 ROOT !!! APP2SD !!! + more

.....................
Rootshell file on the cooking 2.1/2.2 thread
Click here for the file.
To flash to 1.6
Go Here
Legen...wait for it...darryy!!
Awesome i saw ur post in the dev thread made my day!
Two questions 1) you mentioned in the dev thread it was restarting quite often is that fixed?
2)is there any means to flash it in internal memory?
muzik_demon said:
Legen...wait for it...darryy!!
Awesome i saw ur post in the dev thread made my day!
Two questions 1) you mentioned in the dev thread it was restarting quite often is that fixed?
2)is there any means to flash it in internal memory?
Click to expand...
Click to collapse
1. Yes, thats fixed, it works fast and stable ! (there's one big problem - sdcard is not properly seen for camera/music), still testing it ..
2. Yes, it will be possible to flash into internal memory later.
1) For the first problem i recommend throwing a pm to zdzihu- he has employed the same technique to get dual boot in x10 and his rom is able to access sdcard for camera/music but we cant mount sdcard
2) If flashing into internal memory is straightforward then i recommend it since it will solve all the above problems
Looking forward to testing
(where can i get x8.img and data.img? or are you gonna release it in some time?)
Well done pulpoff2, I will test this solution, when I gone back home from work. Thanks
thank you . i am downloading the flies .
pulpoff2 said:
So far so good!
I started a new thread cause other one is filled up with junk.
Following my weekend theory, I finally managed to boot 2.1 on X8 with root.
I will post the files shortly.
The process is quite complicated for now, but early testers are welcome.
So, to start u need :
1. Flash 1.6 and root it
2. Copy busybox and rootshell to /system/bin
3. chmod 4755 /system/bin/rootshell
4. copy chargemon.txt into /system/bin/chargemon
5. chmod 777 /system/bin/chargemon
6. copy data.img and x8.img to SDCARD root directory
7. Flash 2.1 KERNEL ONLY (put 2.1 firmware files, remove system.sin and userdata.sin from firmware directory, than flash)
8. reboot your new 2.1 pre-rooted X8 !
Wasted weekend .. was it worth the hassle guys?
Cheers!
Here are the files you need to boot :
pulpX8.rar
ext.rar contains e2fsck to check .img for errors before booting, if you will not install these, booting should work anyway.
P.S. this is a very early stage solution now, wait until I make it clean, or try it if you are a flash maniac
Click to expand...
Click to collapse
how to find rootshell?
isaac12 said:
how to find rootshell?
Click to expand...
Click to collapse
Its on the cooking 2.1/2.2 thread
Click here for the file.
To flash to 1.6
Go Here
thanks... flash only kernel.sin without amss.sin amss_fs.sin cache.sin fota0.sin fota1.sin simlock.ta and update.xml?
isaac12 said:
thanks... flash only kernel.sin without amss.sin amss_fs.sin cache.sin fota0.sin fota1.sin simlock.ta and update.xml?
Click to expand...
Click to collapse
No, do as I wrote in first post, move 2.1 files over 1.6 files, than just remove system and userdata and flash than..
This just keeps getting better and better
Sent from my E15i using XDA App
pulpoff2 said:
No, do as I wrote in first post, move 2.1 files over 1.6 files, than just remove system and userdata and flash than..
Click to expand...
Click to collapse
I'm flashing all files without system and userdata .phone booting only sonyericsson logo. overwrite files and delete user data and system?
pulpoff2 said:
So far so good!
I started a new thread cause other one is filled up with junk.
Following my weekend theory, I finally managed to boot 2.1 on X8 with root.
I will post the files shortly.
The process is quite complicated for now, but early testers are welcome.
So, to start u need :
1. Flash 1.6 and root it
2. Copy busybox and rootshell to /system/bin
3. chmod 4755 /system/bin/rootshell
4. copy chargemon.txt into /system/bin/chargemon
5. chmod 777 /system/bin/chargemon
6. copy data.img and x8.img to SDCARD root directory
7. Flash 2.1 KERNEL ONLY (put 2.1 firmware files, remove system.sin and userdata.sin from firmware directory, than flash)
8. reboot your new 2.1 pre-rooted X8 !
Wasted weekend .. was it worth the hassle guys?
If the answer is yes and you would like me to spend some time and make this perfect, don't forget the "donate" button.
Cheers!
Here are the files you need to boot :
pulpX8.rar
Firmware 2.1 (rus)
Firmware 1.6 (uk)
ext.rar contains e2fsck to check .img for errors before booting, if you will not install these, booting should work anyway.
P.S. this is a very early stage solution now, wait until I make it clean, or try it if you are a flash maniac
UPDATE
The system.img now comes with LauncherPro and other goodies, some vaporware removed and GingerBread (2.3) black theme !!!
Donation count : $0
Click to expand...
Click to collapse
may be superuser.apk put inside of your firmware?
dviktor said:
may be superuser.apk put inside of your firmware?
Click to expand...
Click to collapse
It is inside the x8.img, as well as su and rootshell and busybox.
So if phone gets stuck on boot, connect adb and u can get root in console and fix problems.
and if i am right understand all running files be booted from sd card? and if it's unmount the phone will be still work? or it will be freezing or rebooting? and may be then we can start 2.3 on expiria x8?
dviktor said:
and if i am right understand all running files be booted from sd card? and if it's unmount the phone will be still work? or it will be freezing or rebooting?
Click to expand...
Click to collapse
/system and /data are mounted from x8.img and data.img from Sdcard.
This is good to debug problems, without need to reflash the phone every time.
Once we have the Xrecovery for X8, it will be easy to replace/update files like on X10i.
Without sdcard, you will have 2.1 kernel with 1.6 system, it will get stuck on boot, but adb shell will work (with root!), so you can investigate/fix problems/put new /system files.
pulpoff2 said:
/system and /data are mounted from x8.img and data.img from Sdcard.
This is good to debug problems, without need to reflash the phone every time.
Once we have the Xrecovery for X8, it will be easy to replace/update files like on X10i.
Without sdcard, you will have 2.1 kernel with 1.6 system, it will get stuck on boot, but adb shell will work (with root!), so you can investigate/fix problems/put new /system files.
Click to expand...
Click to collapse
I'm flashing all files without system and userdata .phone booting only sonyericsson logo. overwrite 1.6 files and delete user data and system?. how to long wait for booting phone?
pulpoff2 said:
/system and /data are mounted from x8.img and data.img from Sdcard.
This is good to debug problems, without need to reflash the phone every time.
Once we have the Xrecovery for X8, it will be easy to replace/update files like on X10i.
Without sdcard, you will have 2.1 kernel with 1.6 system, it will get stuck on boot, but adb shell will work (with root!), so you can investigate/fix problems/put new /system files.
Click to expand...
Click to collapse
so, if i take a normal files with undeleted (clean) from system/app, and copy it in phone with root, i can delete x8.img and data.img from sd card? i am just a curator of 4pda (russian) thread by X8 phone. becouse i ask you about everything
Well... I am a new guy, I am happy that the root was released, however, I don't know about the post, so is there a detailed version with pictures please?
Regards
Sent from my E15i using XDA App
how to set chmod in windows vista?

I want to install Xrecovery but...

The thing wont recognize my phone and wont show the options to do xrecovery or any of the other options except for Flash...please help im desperate for a rom
You need to root first.
Here: http://forum.xda-developers.com/showthread.php?t=1196421
Then in flashtool click 'ask root permissions' and have your phone unlocked and accept superuser permissions w/the prompt on your phone. Then you're good to go.
*edit- make sure it is the fixed xrec for 2.3.3. I use a Rom w xrec included so I didn't have to install it & I dont remember if that's the one in flashtool now.
Which firmware version are you on?
I have done that already...i am rooted because I have superuser on my phone. Where do I check firmware?
Sent from my X10i using XDA App
zm4 said:
I have done that already...i am rooted because I have superuser on my phone. Where do I check firmware?
Sent from my X10i using XDA App
Click to expand...
Click to collapse
unzip xrecovery file and copy all files manually to the right places using root explorer then check all boxes on permitions.
reboot and try
How do i do that?
zm4 said:
How do i do that?
Click to expand...
Click to collapse
a very old guide written by me HERE
read "2nd mode" but use xrecovery v3 instead the one linked there
will this work for 2.3.3?
zm4 said:
will this work for 2.3.3?
Click to expand...
Click to collapse
these commands still the same you just need to change (eventually) to the right path.
check the zip structure to see that
HTML:
adb shell
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
dd if=/sdcard/busybox of=/system/bin/busybox
dd if=/sdcard/chargemon of=/system/bin/chargemon
dd if=/sdcard/xrecovery.tar of=/system/bin/xrecovery.tar
reboot
chargemon to \system\bin
charger to \system\bin
sh to \system\xbin
xrecovery.tar to \system\xbin
i dont see any busybox file or anything like that...please help i dun think busybox has been installed...
zm4 said:
i dont see any busybox file or anything like that...please help i dun think busybox has been installed...
Click to expand...
Click to collapse
ok...you have a reading problem kiddin´
Crowds said:
these commands still the same you just need to change (eventually) to the right path.
check the zip structure to see that
Click to expand...
Click to collapse
type this:
HTML:
adb shell
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
dd if=/sdcard/chargemon of=/system/bin/chargemon
dd if=/sdcard/charger of=/system/bin/charger
dd if=/sdcard/sh of=/system/xbin/sh
dd if=/sdcard/xrecovery.tar of=/system/xbin/xrecovery.tar
reboot
this should do it
cheers
where do i get this adb thing?
zm4 said:
where do i get this adb thing?
Click to expand...
Click to collapse
forguet it...
copy all files to sdcard then copy/paste to the right places after that use root explorer and do this ON EVERY FILE YOU COPIED:
HTML:
- Press and hold on each file;
- Check all Permitions on the drop down menu;
- After changes were made save and exit;
- Reboot.
try enter on xrec
*Cannot open for read: No such or directory* wth?
where does meta go?
zm4 said:
where does meta go?
Click to expand...
Click to collapse
Anywhere. Just copy the files I told you to. I didn't referred anything about that, did I?
Sent from my X10 Erenz MIUI 1.9.2 using Tapatalk
Just start all over with flashtool it will work then.
Go to settings then applications, then development, check debug mode.
Start flash tool on your pc and connect the phone
IF the phone is rooted, it should be recognized by flash tool
On flash tool click ask root perm, look at your phone screen, superuser should pop up asking if to give permission, simply choose allow.
Then click recovery on flash tool and wait a sec....
should pop up asking which gingerbread version to use. choose 0.3GB, since its gb version you have.
when you're ready to use xrecovery, restart the phone
as soon as the phone comes on and the first sony ericsson name comes up, keep pressing the back button, xrecovery will come up.
i did both kernel things...but the thing is it won't recognize my device as a rooted device...i have superuser and I have used apps that require root...so i guess the problem is well idk...and thats what i need help with sorting out.
1. Install busybox from market (xrec needs busybox)
2. Give root explorer root acces and mount /system writeable (look in settings of your file explorer)
3. Copy files to right place:
chargemon to /system/bin
charger to /system/bin
sh to /system/xbin
xrecovery.tar to /system/xbin
4. Give above files the right permissions (long touch on file and choose property option):
user > read, write, execute
other > read, execute
group > read, execute

[Q] Trying to replace a system apk

Hi,
I'm attempting to replace Email.apk on my miui rom. This is the method I am using:
Code:
adb push Email.apk /sdcard/
adb shell
su
rm /system/app/Email.apk
rm /system/app/Email.odex
mount -o rw,remount /dev/block/mmcblk0p9 /system
cp /sdcard/Email.apk /system/app
reboot
When the phone has rebooted, my changes do not take affect. To check, I pulled the /system/app/Email.apk back, and found it to be the original version.
Can anyone tell me what I'm doing wrong here?
Thanks,
Have figured this out...
adb appears to send some kind of cached version over. Renaming the file before transferring forced adb to use the correct file, and all is well.
jimhaddon said:
Have figured this out...
adb appears to send some kind of cached version over. Renaming the file before transferring forced adb to use the correct file, and all is well.
Click to expand...
Click to collapse
How? I like to know too, guide step by step....thanks
You mean renaming the original file first to any name then copy the moded file with the original name ?
If that what u mean , so I better to delete the original one first then but enstead my moded file . Is that right ?
Sent from my GT-I9100 using XDA App
Just use something like root explorer, no need for adb...
Joey2o11 said:
Just use something like root explorer, no need for adb...
Click to expand...
Click to collapse
I tried to use root explorer to change phone.apk, it didnt work.. i changed the file but it kept on crashing all the time ...
Sent from my GT-I9100 using XDA App
hielo_te said:
I tried to use root explorer to change phone.apk, it didnt work.. i changed the file but it kept on crashing all the time ...
Sent from my GT-I9100 using XDA App
Click to expand...
Click to collapse
You'll get lots of FCs until you reboot the phone then it should be fine.

DELETE ME

Edit: Delete me
Heh, adding bootanim support to my kernel was something I was thinking of this weekend.
It needs initramfs hacks - check the commits for my I777 initramfs.
Entropy512 said:
Heh, adding bootanim support to my kernel was something I was thinking of this weekend.
It needs initramfs hacks - check the commits for my I777 initramfs.
Click to expand...
Click to collapse
I'm confused... I checked out your commits. It seems like essentially, what I did in my 2nd senario up there should have worked with a "bootanimation.zip". You pulled the switcharoo in initramfs and I pulled it at the file location. You off loaded execution to a shell script and I executed from the call in the initramfs.
Is there a difference in offloading to the shell script verses directly calling from init.rc?
Is there some reason I can't just make up an arbitrary name for a service? Like: I can't just call it "serviceA" and point at some daemon; in init.rc?
It seem like as long as you retain the service name "samsungani" you can point it anywhere you want? So like, the service names are set in stone?
Your solution is definitely more elegant, I think I would have gotten there if I could have just gotten a custom boot animation to load..
Thank you for the reply by the way.
Meticulus said:
Custom Boot Animations!
I'm only posting 1 for now but will post more as I have time
Need to have CMW
Method # 1
1. Download, Animod.zip and one of the animations and put them on you sdcard.
2. Use CMW to install Animod.zip and then animation. ( no need to reboot and you only need to install Animod.zip once.
3. Reboot.
Method # 2
1. Download Animod.zip and install using CMW.
2. Search the web and find a "bootanimation.zip" that you like and download.
3. Rename file "sanim.zip".
4. Connect your player and adb shell.
5. mount -o remount,rw /system
6. exit
7. push sanim.zip /system/media
8 adb reboot.
Let me know how it goes...
Click to expand...
Click to collapse
Thank you Meticulus for finding out how to use custom boot animations!
I have a Galaxy Player 4.0, so I couldn't use your CWM because it is not formatted as ext4. But here's how I did it:
1. Change /system/bin/samsungani to /system/bin/samsungani.met
2. Change /system/bin/bootanimation to /system/bin/samsungani
3. Drag sanim.zip to /system/media and reboot.
It works perfectly!
wow !!! Gotta try
thanks for your hard work
I really want to change my boot animation but I search everywhere it's said SAMSUNG use another method to change boot animation.
but if this work
I must be happy
###Edit###
after try
Method # 2
1. Download Animod.zip and install using CMW.
2. Search the web and find a "bootanimation.zip" that you like and download.
3. Rename file "sanim.zip".
4. Connect your player and adb shell.
5. mount -o remount,rw /system
6. exit
7. push sanim.zip /system/media
8 adb reboot.
Click to expand...
Click to collapse
after reboot boot animation still stock samsung
but when I try following advice from klin1344
1. Change /system/bin/samsungani to /system/bin/samsungani.met
2. Change /system/bin/bootanimation to /system/bin/samsungani
3. Drag sanim.zip to /system/media and reboot.
Click to expand...
Click to collapse
& yeah !!!! it's work
Thanks all yall !!!!
The bootanimation binary in Samsungs points to sanim.zip and not bootanimation.zip - I kanged a binary from CM7.
A CM7 GalaxyS binary should work on this device.
klin1344 said:
Thank you Meticulus for finding out how to use custom boot animations!
I have a Galaxy Player 4.0, so I couldn't use your CWM because it is not formatted as ext4. But here's how I did it:
1. Change /system/bin/samsungani to /system/bin/samsungani.met
2. Change /system/bin/bootanimation to /system/bin/samsungani
3. Drag sanim.zip to /system/media and reboot.
It works perfectly!
Click to expand...
Click to collapse
I forgot about the CWM being ext4 only I'll make one that is rfs and post it!
Entropy512 said:
The bootanimation binary in Samsungs points to sanim.zip and not bootanimation.zip - I kanged a binary from CM7.
A CM7 GalaxyS binary should work on this device.
Click to expand...
Click to collapse
Yeah, adb logcat became my friend! I was looking at the platform source code and of course Samsungs changes where not in there!
so method 3
need to install animod ??
or just do following step
just ask for anyone who will trying to do that
aillez said:
so method 3
need to install animod ??
or just do following step
just ask for anyone who will trying to do that
Click to expand...
Click to collapse
No need to install Animod for method 3. animod. does steps 1 and 2 in method 3.
RFS version is tested and working now.
This method also works on an international GP 5.0 with some tiny modification to the flashable zip.
The mount command in the updater-script is not compatible with YP-G70, but it works after I changed that to
Code:
run_program("/sbin/mount", "/system");
WT Ho said:
This method also works on an international GP 5.0 with some tiny modification to the flashable zip.
The mount command in the updater-script is not compatible with YP-G70, but it works after I changed that to
Code:
run_program("/sbin/mount", "/system");
Click to expand...
Click to collapse
Thanks man, I new to created CWM update zips. I should be able to consolidate back down to 2 files instead of 4!
Glad it works in international as well.
Thanks, worked great! No more stupid samsung bootscreen!

[Q] SGPT12, modified build.prop, won't boot anymore!

hi,
I still have adb access,
already tried to adb-push of the original build.prop backup back in place, it is actually uploaded, but won't boot anyway.
backup done by build.prop editor, and file pop and push from a linux machine (so no CRLF thing for sure).
attaching snapshot of logcat.txt
... *HELP*
thank you
the problem was in the file permissions. i had to remove write permissions to the group. (rw-r--r--)
You can fix permissions using adb
Sent from my GT-S5830 using xda premium
the.fuzzy.guy said:
hi,
I still have adb access,
already tried to adb-push of the original build.prop backup back in place, it is actually uploaded, but won't boot anyway.
backup done by build.prop editor, and file pop and push from a linux machine (so no CRLF thing for sure).
attaching snapshot of logcat.txt
... *HELP*
thank you
Click to expand...
Click to collapse
First of all DO NOT WIPE DATA / FACTORY RESET
This will remove adb access. Depending how far you can boot, do you get adb in recovery or normal. Can you use adb shell? If you can you can us adb shell chmod 644 /system/build.prop
EDIT:
Failing that try to install a zip. Sell my links for both current and older zips

Categories

Resources