Created
July 4, 2014 20:47
-
-
Save diclophis/cc8775c7617b060ef8e3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cd /tmp | |
#CMDLINE="androidboot.hardware=qcom user_debug=31 maxcpus=2 msm_rtb.filter=0x3F ehci-hcd.park=3 msm_rtb.enable=0 lpj=192598 dwc3.maximum_speed=high dwc3_msm.prop_chg_detect=Y" | |
CMDLINE="androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3 msm_rtb.enable=0 lpj=192598 dwc3.maximum_speed=high dwc3_msm.prop_chg_detect=Y androidboot.emmc=true androidboot.bootloader=s1 oemandroidboot.s1boot=1270-3115_S1_Boot_MSM8974_Rhine1.2_LA1.04_12 androidboot.serialno=BH906G1Y0G ta_info=1,16,256 startup=0x00000005 warmboot=0x77665500 oemandroidboot.imei=35 0940555023900 oemandroidboot.phoneid=0000:3580940555023900 oemandroidboot.security=0 androidboot.baseband=msm" | |
MKBOOTIMG=~/ubuntu-touch/out/host/linux-x86/bin/mkbootimg | |
KERNEL=~/ubuntu-touch/sony-oss/kernel/arch/arm/boot/zImage | |
RAMDISK=~/ubuntu-touch/out/target/product/honami/ramdisk.img | |
SYSTEM=~/ubuntu-touch/out/target/product/honami/system.img | |
DTIMG=~/ubuntu-touch/sony-oss/dt.img #/tmp/dt.img | |
BOOTIMG=/tmp/boot.img | |
UTOPICTARGZ=~/utopic-preinstalled-touch-armhf.tar.gz | |
#~/dtbTool -v -o ../dt.img -s 2048 -p scripts/dtc/ /home/jbardin/ubuntu-touch/sony-oss/kernel/arch/arm/boot/ | |
#simg2img $SYSTEM /tmp/system.img.nonsparse | |
$MKBOOTIMG \ | |
--kernel $KERNEL \ | |
--ramdisk $RAMDISK \ | |
--cmdline "$CMDLINE" \ | |
--base 0x00000000 \ | |
--pagesize 2048 \ | |
--ramdisk_offset 0x02000000 \ | |
--tags_offset 0x01E00000 \ | |
--dt $DTIMG \ | |
--output $BOOTIMG | |
ls -lhSr $BOOTIMG | |
test -e /tmp/system.img || (if=/dev/zero of=/tmp/system.img bs=1M count=1500 && make_ext4fs -l 1500M /tmp/system.img) | |
test -e /tmp/userdata.img || (if=/dev/zero of=/tmp/userdata.img bs=1M count=1505 && make_ext4fs -l 1505M /tmp/userdata.img) | |
mkdir -p /tmp/system.d | |
sudo umount /tmp/system.d | |
sudo mount -t ext4 -o loop /tmp/system.img /tmp/system.d | |
cd /tmp/system.d && zcat $UTOPICTARGZ | sudo tar xf - | |
cd /tmp && sudo umount /tmp/system.d | |
mkdir -p /tmp/userdata.d | |
sudo umount /tmp/userdata.d | |
sudo mount -t ext4 -o loop /tmp/userdata.img /tmp/userdata.d | |
sudo mv /tmp/system.img /tmp/userdata.d/system.img | |
cd /tmp && sudo umount /tmp/userdata.d | |
time sudo fastboot -i 0xfce flash boot $BOOTIMG | |
time sudo fastboot -i 0xfce flash userdata /tmp/userdata.img | |
sudo fastboot -i 0xfce reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment