Skip to content

Instantly share code, notes, and snippets.

View yshalsager's full-sized avatar

Youssif Shaaban Alsager yshalsager

View GitHub Profile
@yshalsager
yshalsager / gist:fd5258fd4053de3313b985aa9ef965a2
Created October 10, 2016 20:38
Nokia X/XL (msm8625) info
0 3817472 mmcblk0
179 1 20 mmcblk0p1 /QCSBLHD emmc
179 2 250 mmcblk0p2 /QCSBL emmc
Bootloader 179 3 51200 mmcblk0p3 34 6434 51200 c Win95 FAT32 (LBA) /sys_boot
179 4 1 mmcblk0p4
179 5 2048 mmcblk0p5 /OEMSBL
179 6 3072 mmcblk0p6
179 7 3072 mmcblk0p7
179 8 3072 mmcblk0p8
179 9 2048 mmcblk0p9
find /dev/block | grep platform
/dev/block/platform
/dev/block/platform/msm_sdcc.3
/dev/block/platform/msm_sdcc.3/mmcblk0p26
/dev/block/platform/msm_sdcc.3/mmcblk0p25
/dev/block/platform/msm_sdcc.3/mmcblk0p24
/dev/block/platform/msm_sdcc.3/mmcblk0p23
/dev/block/platform/msm_sdcc.3/mmcblk0p22
/dev/block/platform/msm_sdcc.3/mmcblk0p21
/dev/block/platform/msm_sdcc.3/mmcblk0p20
@yshalsager
yshalsager / gist:dd4b3ee9ee8d091ac4753decb4fb2703
Created September 6, 2017 16:07
DualBootPatcher device template
- name: (Device Name)
id: (device id)
codenames:
- (device codename1)
- (device codename2)
- (device codename3)
architecture: (device architecture)
block_devs:
base_dirs:
@yshalsager
yshalsager / gist:1e494c87dc5b51be632a4da585b0cc2a
Created September 6, 2017 16:17
DualBootPatcher Device yml
- name: Xiaomi Mi4S
id: aqua
codenames:
- aqua
architecture: arm64-v8a
block_devs:
base_dirs:
- /dev/block/bootdevice/by-name
- /dev/block/platform/soc.0/f9824900.sdhci/by-name
@yshalsager
yshalsager / twrpsources.sh
Last active July 28, 2018 12:14
Switch between TWRP and RedWolf
#bin/bash
path=~/ysh/recovery
if [ -e 7/version ]
then
echo source is $(cat 7/version)
else
echo "can't file source info"
fi
echo "Choose source you want to build:"
https://github.com/premaca/kernel_motorola_msm8953_sanders/commits/8.1
git cherry-pick aff5e417d7113acd5e2a4a3f5080b37f49adbdbc
git cherry-pick 44456157c0477e996839059257b886c5c67fbaec
git cherry-pick 26dbef0ccd1b9f89e6e4ea7c4efe3f78561c7c4d
git cherry-pick 35580a83c5f89652c7d6a9613b33b1f6d3f32ab7
git cherry-pick 845b2a87e22efd0dc461e240ad5b4517e890b34b
git cherry-pick ed8c9354ec7cbf2b6643bb03eee408a3613a01cf
git cherry-pick a9a8faa54e736c95f1d5cf032673a6d9eab3ae94
git cherry-pick 7197ab4284f1014811a7eecaac3ce3f496444aec
git cherry-pick 1bafc94d7effb25eab5190a5e6646888a569d322
@yshalsager
yshalsager / buildtwrp.sh
Created April 4, 2018 19:20
A script to build TWRP (in docker) and upload to basketbuild
#Usage: sudo ./buildtwrp.sh [Brand] [Model]
# You need to define basketbuild info!
docker run --rm -i -e USER_ID=$(id -u) -e GROUP_ID=$(id -g) -v "$(pwd):/home/cmbuild/twrp/:rw,z" stucki/cyanogenmod bash << EOF
cd ../twrp/
source build/envsetup.sh ; lunch omni_$2-eng ; make -j16 recoveryimage
exit
EOF
export version=$(cat bootable/recovery/variables.h | grep "define TW_MAIN_VERSION_STR" | cut -d '"' -f2)
cp out/target/product/$2/recovery.img out/TWRP-$version-$2-$(date +"%Y%m%d").img
cd out
@yshalsager
yshalsager / devices
Created April 10, 2018 10:32
A script to get all miui stable rom names
261,HM2XWC_
261,HM2XWCPro_
263,MI4iGlobal_
273,MINotePro_
293,MI4c_
297,HMNote1S_
297,HMNote1SGlobal_
298,HM3_
298,HM3Global_
299,MI5_
@yshalsager
yshalsager / devices
Created April 10, 2018 11:37
Fetch miui latest stable
261,HM2XWC_
261,HM2XWCPro_
263,MI4iGlobal_
273,MINotePro_
293,MI4c_
297,HMNote1S_
297,HMNote1SGlobal_
298,HM3_
298,HM3Global_
299,MI5_
@yshalsager
yshalsager / mangaforall.sh
Created July 2, 2018 08:54
mangaforall.com Downloader!
# Usage: ./mangaforall.sh 'mangaurl'
curl -s $1 | grep "zip_url" | tr , '\n' | grep '.zip' | cut -d '"' -f4 | sed 's.\\/./.g' >> links.txt
echo Downloading:
for list in links.txt; do wget -i $list ;done