[Milestone XT720 Android Development] peshovec:
look very nice .... inside:)

still not trying it yet (because will try to just incorporate relevant changes to the current flashed khai wanhu :)

so:

regarding boot img it looks promising:

the built in the kernel initramfs is again empty (except from /dev/console), so the same things

the initrd in the boot.img seems ok (especially having in mind that files from it are overwritten:)

and the nice part:)

sh_hijack-ed:)

so after init is processing init.rc (badly the setted here:

setprop ro.FOREGROUND_APP_MEM 1536
setprop ro.VISIBLE_APP_MEM 2048
setprop ro.SECONDARY_SERVER_MEM 4096
setprop ro.BACKUP_APP_MEM 4096
setprop ro.HOME_APP_MEM 4096
setprop ro.HIDDEN_APP_MEM 5120
setprop ro.CONTENT_PROVIDER_MEM 5632
setprop ro.EMPTY_APP_MEM 6144

cannot be changed anymore )

it (the init process) start parsing init.mapphone_umts.rc

then in the very begining of that file exec /init_prep_keypad.sh is called:)

and the beauty begins:) as sh is hajacked, the custom thing start to happen:)

so the hijacked sh invokes sh_hijack.sh

#!/system/xbin/sh
/system/xbin/fast_boot_mode
/system/xbin/mount -o remount,rw rootfs /
/system/xbin/rmdir /config
/system/xbin/rmdir /sdcard
/system/xbin/cp -fr /system/etc/rootfs/* /
# echo "-16" > /proc/$$/oom_adj
/system/xbin/umount /dev/cpuctl
/system/xbin/umount /sqlite_stmt_journals
# /system/xbin/umount /dev/pts
/system/xbin/chmod 666 /dev/usb_device_mode
exec /system/bin/2nd-init

e.g. replacing the "fabric" files /init.rc /init.mapphone_umts.rc /default.prop with the corresponding files from /system/etc/rootfs

I like that:) it just 80k, but modification is as easy as that:)

after 2nd-init is invoked, init start to parse the new init.rc and init.mapphone_umts.rc

That is very good for me (as i have modified my inside the .tar), so i just will compare and eventually straight replace with mine (/cache with proper for dalvik-cache permission and some other minor things)

ok so the "new" init.rc

loads some fancy modules about native froyo application to sdcard

and invokes exec /system/bin/sysinit :

#!/system/bin/sh

export PATH=/sbin:/system/sbin:/system/bin:/system/xbin
/system/bin/logwrapper /system/xbin/run-parts /system/etc/init.d

which greatly executes all in /system/etc/init.d :)

so again good for me:) i just will review the scripts and again eventually will straight replace them with mine (from /system/etc/init.c ) :)

00fsprep -> it is very good for start & play, but i prefer to manually manage the storage:)

00insmod -> seems very good:)

00minfree -> will avoid (i personally stick with the yet setted _MEM values, and keep minfree parameters in tact with them (in init.mapphone_umts.rc)

05mount -> as 00fsprep

05readahed -> good:) (but again i use just 640 k , but instead of only sdcard, i increase to same 640k the cache to the mtd file subsystem too:)

05swap -> great (but require fastbooting)

98minfree -> don't see the point as 00minfree can do the same job. May be it is for later user tweaking. Kudos for that. (i still will stick with the defaults)

then continue with init.mapphone_umts.rc

badly, the modification of quoted above _MEM values cannot be changed, but i can live with that, so i usually left the minfree parameters in consistence with the _MEM ones.

some new services are defined

service ap_fmloader /system/bin/wlan_loader -f /system/etc/wifi/fw_tiwlan_ap.bin -i /system/etc/wifi/tiwlan_ap.ini -e /pds/wifi/nvs_map.bin
class post-zygote_services
disabled
oneshot

service hostapd /system/bin/Hostapd -d /data/misc/wifi/hostapd.conf
class post-zygote_services
socket hostapd_tiwlan0 dgram 660 wifi wifi
disabled
oneshot

service dnsmasq /system/bin/logwrapper /system/bin/dnsmasq_mot -C/data/misc/wifi/dns.conf -k
class post-zygote_services
group wifi
disabled
oneshot

service mynet_start /system/bin/sh /data/misc/wifi/forward_start.sh
class post-zygote_services
disabled
oneshot

service mynet_stop /system/bin/sh /data/misc/wifi/forward_stop.sh
class post-zygote_services
disabled
oneshot

about data optimization....

in com.android.providers.settings/databases/settings.db

INSERT INTO "system" VALUES(26,'window_animation_scale','1.0');
INSERT INTO "system" VALUES(27,'transition_animation_scale','1.0');
INSERT INTO "system" VALUES(34,'low_battery_sound','/system/media/audio/ui/LowBattery.ogg');
INSERT INTO "system" VALUES(40,'lockscreen_sounds_enabled','0');
INSERT INTO "system" VALUES(41,'lock_sound','/system/media/audio/ui/Lock.ogg');
INSERT INTO "system" VALUES(42,'unlock_sound','/system/media/audio/ui/Unlock.ogg');
INSERT INTO "system" VALUES(128,'key_bootup_network_popup','0');

looks new to me:) some of them can probably be set with something like spareparts, but some of them look really new Kudos:)

So all is looking good, well have enough time, will make backup and start playing.

Basically what i plan to do: use just the system.img , apply over it my changes (build.prop for lcd_density 180, have moved some application to /system/app etc.) and see what will happen. It seems that the phone will survive:) and all of my application (and their data) and customization has be preserved. If not openrecovery and adb shell will go to the arena:)

edit: forget to mention... the above is based on http://www.xt720.ru/WanHu/XSpecial_h_Alfa.zip