[WIP] Galaxy Mega Base Rom

Okay I bought Galaxy Mega for my wife and it's not been activated yet so I am holding onto this.

I probabaly have few days to play with this so let's what I can get out from this.

Once it gets activated and handed to my wife, I can no longer work on this lol -_-;

Below is just collective information for further rom development use.





(Getting CWM Nandroid backup)

1) Install CWM via Odin

2) Make Backup with CWM

3) Copy files into kitchen setting

4) CWM separate big files into pieces. Within the cygwin, use CAT command to put them into 1 file.

cat system.ext4.tar system.ext4.tar.a system.ext4.tar.b > system.ext4.tarall



(recovery.fstab)

# Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK

#TODO: Add 'check' as fs_mgr_flags with data partition.
# Currently we dont have e2fsck compiled. So fs check would failed.

#<src>                                             <mnt_point>        <type>    <mnt_flags and options>                     <fs_mgr_flags>
/dev/block/platform/msm_sdcc.1/by-name/boot        /boot              emmc      defaults    defaults
/dev/block/platform/msm_sdcc.1/by-name/recovery    /recovery          emmc      defaults    defaults
/dev/block/platform/msm_sdcc.1/by-name/system      /system            ext4      ro,errors=panic                             wait
/dev/block/platform/msm_sdcc.1/by-name/cache       /cache             ext4      nosuid,nodev,barrier=1                      wait,check
/dev/block/platform/msm_sdcc.1/by-name/userdata    /data              ext4      nosuid,nodev,noatime,noauto_da_alloc,journal_async_commit,errors=panic    wait,check,encryptable=footer,length=-16384

# vold managed volumes
/devices/platform/msm_sdcc.3/mmc_host              auto               auto      defaults         wait,voldmanaged=sdcard1:auto
/devices/platform/msm_hsusb_host/usb1              auto               auto      defaults         wait,voldmanaged=sda:auto



(Kitchen's edify-defs)
Name it as meliuslte Metro PCS

*Galaxy Mega - Metro PCS
change_mnt=yes

param1=ext4
param2=EMMC

param1_sdcard=vfat
param2_sdcard=MTD

data_mnt=\/dev\/block\/platform\/msm_sdcc.1\/by-name\/userdata
sys_mnt=\/dev\/block\/platform\/msm_sdcc.1\/by-name\/system
cache_mnt=\/dev\/block\/platform\/msm_sdcc.1\/by-name\/cache
sdcard_mnt=\/dev\/block\/mmcblk0p1
boot_mnt=\/dev\/block\/platform\/msm_sdcc.1\/by-name\/boot
recovery_mnt=\/dev\/block\/platform\/msm_sdcc.1\/by-name\/recovery


(updater-script - don't use below, phone bricks... it needs to be fixed)

show_progress(0.1, 0);
ui_print("");
ui_print("Galaxy Mega");
ui_print("Base ROM");
ui_print("Zipaligned, Deodexed, Bloated");
ui_print("Contributed by Bard @ Android Forum");
ui_print("");
ui_print("1. Format System & Cache");
format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system");
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
ui_print("2. Extract System Directory");
package_extract_dir("system", "/system");
ui_print("3. Symlinks and Permissions");
symlink("toolbox", "/system/bin/cat");
symlink("toolbox", "/system/bin/chcon");
symlink("toolbox", "/system/bin/chmod");
symlink("toolbox", "/system/bin/chown");
symlink("toolbox", "/system/bin/cmp");
symlink("toolbox", "/system/bin/cp");
symlink("toolbox", "/system/bin/date");
symlink("toolbox", "/system/bin/dd");
symlink("toolbox", "/system/bin/df");
symlink("toolbox", "/system/bin/dmesg");
symlink("toolbox", "/system/bin/du");
symlink("toolbox", "/system/bin/getenforce");
symlink("toolbox", "/system/bin/getevent");
symlink("toolbox", "/system/bin/getprop");
symlink("toolbox", "/system/bin/getsebool");
symlink("toolbox", "/system/bin/grep");
symlink("toolbox", "/system/bin/hd");
symlink("toolbox", "/system/bin/id");
symlink("toolbox", "/system/bin/ifconfig");
symlink("toolbox", "/system/bin/iftop");
symlink("toolbox", "/system/bin/insmod");
symlink("toolbox", "/system/bin/ioctl");
symlink("toolbox", "/system/bin/ionice");
symlink("toolbox", "/system/bin/kill");
symlink("toolbox", "/system/bin/ln");
symlink("toolbox", "/system/bin/load_policy");
symlink("toolbox", "/system/bin/log");
symlink("toolbox", "/system/bin/ls");
symlink("toolbox", "/system/bin/lsmod");
symlink("toolbox", "/system/bin/lsof");
symlink("toolbox", "/system/bin/md5");
symlink("toolbox", "/system/bin/mkdir");
symlink("toolbox", "/system/bin/mount");
symlink("toolbox", "/system/bin/mv");
symlink("toolbox", "/system/bin/nandread");
symlink("toolbox", "/system/bin/netstat");
symlink("toolbox", "/system/bin/newfs_msdos");
symlink("toolbox", "/system/bin/notify");
symlink("toolbox", "/system/bin/printenv");
symlink("toolbox", "/system/bin/ps");
symlink("toolbox", "/system/bin/reboot");
symlink("toolbox", "/system/bin/renice");
symlink("toolbox", "/system/bin/restorecon");
symlink("toolbox", "/system/bin/rm");
symlink("toolbox", "/system/bin/rmdir");
symlink("toolbox", "/system/bin/rmmod");
symlink("toolbox", "/system/bin/route");
symlink("toolbox", "/system/bin/runcon");
symlink("toolbox", "/system/bin/schedtop");
symlink("toolbox", "/system/bin/sendevent");
symlink("toolbox", "/system/bin/setconsole");
symlink("toolbox", "/system/bin/setenforce");
symlink("toolbox", "/system/bin/setprop");
symlink("toolbox", "/system/bin/setsebool");
symlink("mksh", "/system/bin/sh");
symlink("toolbox", "/system/bin/sleep");
symlink("toolbox", "/system/bin/smd");
symlink("toolbox", "/system/bin/start");
symlink("toolbox", "/system/bin/stop");
symlink("toolbox", "/system/bin/sync");
symlink("toolbox", "/system/bin/top");
symlink("toolbox", "/system/bin/touch");
symlink("toolbox", "/system/bin/umount");
symlink("toolbox", "/system/bin/uptime");
symlink("toolbox", "/system/bin/vmstat");
symlink("toolbox", "/system/bin/watchprops");
symlink("toolbox", "/system/bin/wipe");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm(0, 3003, 06755, "/system/bin/ip");
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_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
set_perm(0, 0, 0755, "/system/etc/bluetooth");
set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pair_devlist.conf");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm(0, 0, 0544, "/system/etc/install-recovery.sh");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/firmware");
set_perm(0, 2000, 0755, "/system/vendor/firmware");
set_perm(0, 2000, 0755, "/system/vendor/lib");
set_perm(0, 2000, 0755, "/system/vendor/lib/hw");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 0, 06755, "/system/xbin/su");
symlink("/system/xbin/su", "/system/bin/su");
show_progress(0.1, 10);
show_progress(0.2, 0);
ui_print("4. Install Kernel");
package_extract_file("boot.img", "/dev/block/platform/msm_sdcc.1/by-name/boot");
show_progress(0.2, 10);
ui_print("5. Unmount System");
unmount("/system");
ui_print("6. Success");



(Symlink Issues)
red = dunno....
==================================================================

WARNING! The following symlinks were found in the system/ folder:

 ./csc_contents
 ./etc/firmware/acdb.mbn
 ./etc/firmware/apps.mbn
 ./etc/firmware/dsp1.mbn
 ./etc/firmware/dsp2.mbn
 ./etc/firmware/dsp3.mbn
 ./etc/firmware/efs1.mbn
 ./etc/firmware/efs2.mbn
 ./etc/firmware/efs3.mbn
 ./etc/firmware/lkmauth.b00
 ./etc/firmware/lkmauth.b01
 ./etc/firmware/lkmauth.b02
 ./etc/firmware/lkmauth.b03
 ./etc/firmware/lkmauth.mdt
 ./etc/firmware/mdm_acdb.img
 ./etc/firmware/modem.b00
 ./etc/firmware/modem.b01
 ./etc/firmware/modem.b02
 ./etc/firmware/modem.b03
 ./etc/firmware/modem.b04
 ./etc/firmware/modem.b05
 ./etc/firmware/modem.b06
 ./etc/firmware/modem.b07
 ./etc/firmware/modem.b08
 ./etc/firmware/modem.b09
 ./etc/firmware/modem.b10
 ./etc/firmware/modem.mdt
 ./etc/firmware/modem_fw.b00
 ./etc/firmware/modem_fw.b01
 ./etc/firmware/modem_fw.b02
 ./etc/firmware/modem_fw.b03
 ./etc/firmware/modem_fw.b04
 ./etc/firmware/modem_fw.b05
 ./etc/firmware/modem_fw.b09
 ./etc/firmware/modem_fw.b10
 ./etc/firmware/modem_fw.b11
 ./etc/firmware/modem_fw.b12
 ./etc/firmware/modem_fw.b13
 ./etc/firmware/modem_fw.b15
 ./etc/firmware/modem_fw.b16
 ./etc/firmware/modem_fw.b23
 ./etc/firmware/modem_fw.b24
 ./etc/firmware/modem_fw.b25
 ./etc/firmware/modem_fw.b27
 ./etc/firmware/modem_fw.b28
 ./etc/firmware/modem_fw.b31
 ./etc/firmware/modem_fw.fli
 ./etc/firmware/modem_fw.mdt
 ./etc/firmware/modem_fw.*
 ./etc/firmware/modem_fw.b00
 ./etc/firmware/modem_fw.b01
 ./etc/firmware/modem_fw.b02
 ./etc/firmware/modem_fw.b03
 ./etc/firmware/modem_fw.b04
 ./etc/firmware/modem_fw.b05
 ./etc/firmware/modem_fw.b09
 ./etc/firmware/modem_fw.b10
 ./etc/firmware/modem_fw.b11
 ./etc/firmware/modem_fw.b12
 ./etc/firmware/modem_fw.b13
 ./etc/firmware/modem_fw.b15
 ./etc/firmware/modem_fw.b16
 ./etc/firmware/modem_fw.b23
 ./etc/firmware/modem_fw.b24
 ./etc/firmware/modem_fw.b25
 ./etc/firmware/modem_fw.b27
 ./etc/firmware/modem_fw.b28
 ./etc/firmware/modem_fw.b31
 ./etc/firmware/modem_fw.fli
 ./etc/firmware/modem_fw.mdt
 ./etc/firmware/q6.b00
 ./etc/firmware/q6.b01
 ./etc/firmware/q6.b03
 ./etc/firmware/q6.b04
 ./etc/firmware/q6.b05
 ./etc/firmware/q6.b06
 ./etc/firmware/q6.mdt
 ./etc/firmware/rpm.mbn
 ./etc/firmware/sbl1.mbn
 ./etc/firmware/sbl2.mbn
 ./etc/firmware/tima.b00
 ./etc/firmware/tima.b01
 ./etc/firmware/tima.b02
 ./etc/firmware/tima.b03
 ./etc/firmware/tima.mdt
 ./etc/firmware/tzapps.b00
 ./etc/firmware/tzapps.b01
 ./etc/firmware/tzapps.b02
 ./etc/firmware/tzapps.b03
 ./etc/firmware/tzapps.mdt
 ./etc/firmware/vidc.b00
 ./etc/firmware/vidc.b01
 ./etc/firmware/vidc.b02
 ./etc/firmware/vidc.b03
 ./etc/firmware/vidc.mdt
 ./etc/firmware/wcd9310/wcd9310_anc.bin
 ./etc/firmware/wcd9310/wcd9310_mbhc.bin
 ./etc/firmware/wcnss.b00
 ./etc/firmware/wcnss.b01
 ./etc/firmware/wcnss.b02
 ./etc/firmware/wcnss.b04
 ./etc/firmware/wcnss.b05
 ./etc/firmware/wcnss.b06
 ./etc/firmware/wcnss.mdt
 ./etc/thermal-engine.conf
 ./etc/thermald.conf
 ./lib/hw/sensors.qcom.so
 ./lib/libxt_native.so
 ./lib/modules/wlan.ko

Cygwin may not process them correctly when building the ROM. To
ensure they get flashed to your device uncorrupted, copy an
existing version of the same files from your device (e.g. using
Root Explorer or ADB) to your PC.  Overwrite the files above
with the ones you copied from your device.

==================================================================

Comments

  1. Great info.
    I have a LG F6 that I messed with systemapk.apk and now don't have a working hard "Home" button, nor do any dnloaded soft buttons work, for "Home."
    Also on "Power" down the "Airplane" option is gone on menu. Guessing it may be related. Don't no tho.

    I've tried all the UNBRICK LG F6/ F3 / F9 /L9 Etc and LG Tool crashes with Anti-virus OFF, and newest drivers installed, with mini server running and without.

    SO do you have any "Home" button file that I can download and copy and past to somewhere? GRIN!

    ReplyDelete
  2. Ouch... in that case wouldn't overwriting phone's systemui.apk (systemui or systempk?) with original systemui.apk fix this issue?

    If you haven't backed up this file, check if you can get it from stock rom or someone else.

    If that doesn't work either, usually the best way to go back is un-brick method.

    If un-brick method is crashes, try all different methods that you know to get it to work; download KDZ file again make sure it's not corrupted, install LG tool again, install LG driver again, try to run with admin mode, try different USB port, try different USB cable etc etc..

    Have you tried Android F6 forum? They may give you better answers on this case.

    ReplyDelete
  3. Cool article, as the interests of the exchange would like to draw your attention to useful information.
    With the growing number of web-enabled devices used in today's business environment (e.g. smartphones, tablets), access to your data is even easier. There are many benefits to moving your business to the cloud:virtual data rooms

    ReplyDelete

Post a Comment

Popular Posts