|
本帖最后由 叶落·情殇 于 2014-5-17 20:51 编辑
本人可能不会再发包了,主要是好包太少又全是不痛不痒的更新。所以我走之前教大家最简单的rom移植,所谓授人以鱼不如授人以渔吗
此移植教程是最简单,但又是最麻烦的rom移植,因为有些bug蛋疼(注:这里不提供bug修复,此教程包70%开机,应该是100%谦虚了一下)
此教程基于联想a820移植,记住只适用于a820
下面联想a820的阿里云为参考http://bbs.ydss.cn/thread-427891-1-1.html第一步下载包大家都知道的。
第一步修改脚本,脚本位置百度show_progress(0.500000, 0);
ui_print("Formatting system...");
unmount("/system");
format("ext4", "EMMC", "/dev/block/mmcblk0p5", "0");这儿改5为9
ui_print("正在解压ROM ...");
mount("ext4", "EMMC", "/dev/block/mmcblk0p5", "/system");同上
package_extract_dir("system", "/system");
ui_print("Creating system links...");
symlink( "aee_aed", "/system/bin/debuggerd" );
symlink( "/data/system/auitheme/fonts/auitheme_font.ttf", "/system/fonts/auitheme_font.ttf" );
symlink( "mksh", "/system/bin/sh" );
symlink( "Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf" );
symlink( "Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf" );
symlink( "toolbox", "/system/bin/cat",
"/system/bin/chmod",
"/system/bin/chown",
"/system/bin/cmp",
"/system/bin/cp",
"/system/bin/date",
"/system/bin/dd",
"/system/bin/df",
"/system/bin/dmesg",
"/system/bin/du",
"/system/bin/getevent",
"/system/bin/getprop",
"/system/bin/grep",
"/system/bin/hd",
"/system/bin/id",
"/system/bin/ifconfig",
"/system/bin/iftop",
"/system/bin/insmod",
"/system/bin/ioctl",
"/system/bin/ionice",
"/system/bin/kill",
"/system/bin/ln",
"/system/bin/log",
"/system/bin/ls",
"/system/bin/lsmod",
"/system/bin/lsof",
"/system/bin/md5",
"/system/bin/mkdir",
"/system/bin/mount",
"/system/bin/mv",
"/system/bin/nandread",
"/system/bin/netstat",
"/system/bin/newfs_msdos",
"/system/bin/notify",
"/system/bin/printenv",
"/system/bin/ps",
"/system/bin/reboot",
"/system/bin/renice",
"/system/bin/rm",
"/system/bin/rmdir",
"/system/bin/rmmod",
"/system/bin/route",
"/system/bin/schedtop",
"/system/bin/sendevent",
"/system/bin/sensorservice",
"/system/bin/setconsole",
"/system/bin/setprop",
"/system/bin/sleep",
"/system/bin/smd",
"/system/bin/start",
"/system/bin/stop",
"/system/bin/sync",
"/system/bin/top",
"/system/bin/touch",
"/system/bin/umount",
"/system/bin/uptime",
"/system/bin/vmstat",
"/system/bin/watchprops",
"/system/bin/wipe" );
symlink( "wlan_mt6628.ko", "/system/lib/modules/wlan.ko" );
symlink("/system/bin/su", "/system/xbin/su");
ui_print("Set permission...");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 0, 0755, 0644, "/system/auitheme/default");
set_perm_recursive(0, 0, 0755, 0644, "/system/auitheme/fonts");
set_perm_recursive(0, 0, 0755, 0644, "/system/auitheme/inner_themes");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 2000, 06750, "/system/bin/run-as");
set_perm(0, 0, 04755, "/system/bin/uuid");
set_perm_recursive(0, 0, 0755, 0644, "/system/data/misc");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm_recursive(1014, 2000, 0755, 0550, "/system/etc/dhcpcd");
set_perm(0, 0, 0755, "/system/etc/dhcpcd");
set_perm_recursive(0, 0, 0755, 0644, "/system/etc/dhcpcd/dhcpcd-hooks");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm(0, 0, 06755, "/system/bin/su");symlink("/system/bin/su", "/system/xbin/su");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 0, 0755, 0644, "/system/etc/property/app");
set_perm_recursive(0, 0, 0755, 0644, "/system/etc/voicecommand/keyword");
set_perm_recursive(0, 0, 0755, 0644, "/system/etc/voicecommand/training/ubmfile");
set_perm_recursive(0, 0, 0755, 0644, "/system/etc/voicecommand/voiceui/modefile");
set_perm_recursive(0, 0, 0755, 0644, "/system/etc/voicecommand/voiceui/uipattern/Chinese-Mandarin");
set_perm_recursive(0, 0, 0755, 0644, "/system/etc/voicecommand/voiceui/uipattern/Chinese-Taiwan");
set_perm_recursive(0, 0, 0755, 0644, "/system/etc/voicecommand/voiceui/uipattern/English");
set_perm(1014, 2000, 0550, "/system/etc/wide-dhcpv6/dhcp6c.script");
set_perm_recursive(0, 0, 0777, 0755, "/system/etc/init.d");
set_perm(0, 0, 0644, "/system/app/MTKTweak.apk");
set_perm(0, 0, 0644, "/system/MTCpuMode");
set_perm(0, 0, 0644, "/system/MTLogcatOF");
set_perm(0, 0, 0644, "/system/MTRamMode");
set_perm(0, 0, 0755, "/system/xbin/zipalign");
set_perm_recursive(0, 0, 0755, 0644, "/system/lib/ssl/engines");
set_perm_recursive(0, 0, 0755, 0644, "/system/lockscreen/yunos");
set_perm_recursive(0, 0, 0755, 0644, "/system/res/images");
set_perm_recursive(0, 0, 0755, 0644, "/system/res/sound");
set_perm_recursive(0, 0, 0755, 0644, "/system/tts/lang_pico");
set_perm_recursive(0, 0, 0755, 0644, "/system/usr/icu");
set_perm_recursive(0, 0, 0755, 0644, "/system/usr/idc");
set_perm_recursive(0, 0, 0755, 0644, "/system/usr/keychars");
set_perm_recursive(0, 0, 0755, 0644, "/system/usr/keylayout");
set_perm_recursive(0, 0, 0755, 0644, "/system/usr/share/bmd");
set_perm_recursive(0, 0, 0755, 0644, "/system/usr/share/tianyunIme");
set_perm_recursive(0, 0, 0755, 0644, "/system/usr/share/zoneinfo");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
set_perm_recursive(0, 2000, 0755, 0755, "/system/vendor/bin");
set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/lib");
set_perm(0, 2000, 0755, "/system/vendor/lib");
set_perm(0, 0, 06755, "/system/bin/su");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 0, 06755, "/system/xbin/su");
ui_print("写入内核...");
show_progress(0.200000, 0);
show_progress(0.200000, 10);
package_extract_file("boot.img", "/dev/bootimg");
package_extract_file("logo.bin", "/dev/logo");这一行删掉
show_progress(0.100000, 0);
mount("ext4", "EMMC", "/dev/block/mmcblk0p7", "/data");这儿改7为9
package_extract_dir("system/etc/operator", "/data");
set_perm_recursive(1000, 1000, 0755, 0644, "/system/etc/operator/app");
unmount("/data");
unmount("/system");
ui_print("os update end");
ui_print("我是移动叔叔mrfeipeng,大家多多支持我");
下面说明重要一步boot.img移植
boot.img打开刷机包的第一眼就可以看见。boot有问题的bug一般表现为卡第一屏,当然天下之大奇葩无所不在乐蛙就是,他没boot刷机有开机动画但不开机。下面说具体移植:工具一mtk一键移植boot:下载后解压一个是放移植boot的里面放联想a820的boot,一个是放官方boot我已经给你们放了,然后运行exe开始一键移植。此工具简单快捷,但是bug就是相机无法使用。1:简单修复刷机后进入系统根目录找到init.protect文件较大的那个这个修复完后重启局可以了我也不知道有没有效果,这是我理论上的方法2:厨房修改当然有其他的但是我觉得厨房靠谱,安装厨房前要安装JDK,这个就百度自己下吧。下面给个一键厨房具体使用教程百度有的不多说。 boot和刷机脚本都修改好了下面我们要做的是把他们分别替换进刷机包
之前我们在刷机脚本有删过一语句下面我们就要删除刷机包里的logo.bin文件(一打开刷机包就可以看见)
还有基带要替换为我们7295的不然可能没2g信号更不用说3g了,这个替换基带位置在system、etc、firmware、modem.img
以上工作都做完了下面就可以刷机体验并修复bug了
这里说明一下移植大概bug:没声音(替换相应so,部分so替换后可能不开机),相机无法使用即使修复了boot问题也是,要替换相应so但不能全是官方so否则不开机这就是联想a820的蛋疼之处
教程是粗略的,不敢说的太详细,因为还有人要靠刷机包内置apk赚钱的嘛本教程只为带给你们做刷机包的体验和让你们明白做刷机包一次性开机就几分钟的事不是太难。做刷机包虽然赚钱,但是不能昧着良心做刷机包,我做刷机包都是修复bug到无法修复的地步才放包,内置也就5-6个。而且本人又只移植10天以内的包,加上本人新出道,结果上个月累死累活10天赚了100元还纳了6元税。
说多了都是泪啊。
这也是我不发包的小小原因之一,本人实在做不出那种下三滥的举动。
|
|