edit system.img

Search This thread

trapacska

Senior Member
May 15, 2010
169
361
Érd
martmatch.co.uk
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 files:(unyaffs and mkfs.yaffs2.x86)
 

Attachments

  • linux_tools.zip
    211.2 KB · Views: 670

racht

Inactive Recognized Developer
Dec 18, 2010
333
875
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.
 

trapacska

Senior Member
May 15, 2010
169
361
Érd
martmatch.co.uk
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.

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.
 

propc

Senior Member
Feb 21, 2010
258
130
Google Pixel 2
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 files:(unyaffs and mkfs.yaffs2.x86)

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++
 

Attachments

  • plist.zip
    922 bytes · Views: 139
Last edited:

trapacska

Senior Member
May 15, 2010
169
361
Érd
martmatch.co.uk
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++

it's cool! thank you. now i try to debrand the oroginal x8 rom.
 

propc

Senior Member
Feb 21, 2010
258
130
Google Pixel 2
it's cool! thank you. now i try to debrand the oroginal x8 rom.

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 :D (running on sdcard)
EDIT2: some problem with root permissions, will work on it
 
Last edited:

trapacska

Senior Member
May 15, 2010
169
361
Érd
martmatch.co.uk
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 :)
 

bnight

Senior Member
Nov 26, 2010
124
14
Sofia
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.
 

propc

Senior Member
Feb 21, 2010
258
130
Google Pixel 2
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.

i tried it. no luck. too many files. where are the files that need to be edited?
/system/lib?