Skip to content

Instantly share code, notes, and snippets.

View T-rex2017's full-sized avatar
🐢

T-rex2017 T-rex2017

🐢
View GitHub Profile
@T-rex2017
T-rex2017 / build_rom
Last active October 2, 2020 08:32
rom compiling guide
# not an actual script but you could convert it though
# links are for lenovo vibe P1m nougat roms for other devices and android version these may or ma not be different
# selecting the os
# you could use any varient of ubuntu but i suggest to use on above 16.xx
#update what you have
sudo apt-get update && sudo apt-get upgrade
# install all the tools
@T-rex2017
T-rex2017 / kick-vendor.sh
Last active July 18, 2019 09:25
script to uninstall all 3rd party applications via adb
#!/bin/sh
#script to uninstall all 3rd party applications via adb
#chmod +x kick-vendor.sh
#./kick-vendor.sh
clear
if [ `adb get-state` = 'device' ]
then
for i in `adb shell cmd package list packages -3 | sed 's/package://'`
@T-rex2017
T-rex2017 / youtube-dl-termux
Last active May 5, 2023 06:19
youtube to mp3,m4a,mp4 on android using termux
#single command
pkg install curl && curl https://pastebin.com/raw/stMateZB -o install.sh && dos2unix install.sh && chmod u+x install.sh && ./install.sh
# line by line
pkg install curl
curl https://pastebin.com/raw/stMateZB -o install.sh
dos2unix install.sh
chmod u+x install.sh
./install.sh
@T-rex2017
T-rex2017 / bus_final.ino
Last active November 25, 2019 04:03
rfid based bus announcement system using arduino
#include "SD.h"
#include "TMRpcm.h"
#include "SPI.h"
#include "LiquidCrystal_I2C.h"
#define SD_ChipSelectPin 4
TMRpcm music;
LiquidCrystal_I2C lcd(0x27, 16, 2);
git clone https://github.com/svoboda18/android_alps_kernel_p1m.git kernel/lenovo/p1m && git clone https://github.com/svoboda18/android_vendor_lenovo_p1m.git vendor/lenovo/p1m && git clone https://github.com/svoboda18/android_device_lenovo_p1m.git device/lenovo/p1m
export CCACHE_DIR=./.ccache && ccache -C && export USE_CCACHE=1 && export CCACHE_COMPRESS=1 && prebuilts/misc/linux-x86/ccache/ccache -M 50G
cd device/lenovo/p1m/patches && bash install.sh && cd ../../../../
source build/envsetup.sh && lunch lineage_p1m-userdebug && brunch lineage_p1m -j$(nproc --all)
@T-rex2017
T-rex2017 / peters conversation
Last active October 2, 2020 08:36
peter is some random person who came in to p1m community at some point a shed some light on issues related to booting based on different versions of lcm and touch
hello guys, is there any chance to get p1m with aftermarket display working with LOS14.1 3.18.19 ? Phone boots with oem cracked display, but not with new aftermarket one. I have set up serial console to take a look on boot process, but I just cannot find the cause...
Is it version lineage-14.1-20180102_172327-UNOFFICIAL-P1m.zip ?
well I am able to flash it, but it will not boot with aftermarket display
yup, I have made some research: https://forum.xda-developers.com/android/help/how-to-debug-kenrel-bootloop-adb-t3820790#post77172298
but still no luck to fix it in kernel
//modify@zte.com.cn add at 20160605 begin
/*
*
* FocalTech fts TouchScreen driver.
*
* Copyright (c) 2010-2015, Focaltech Ltd. All rights reserved.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
# repo sync
repo init -u git://github.com/omnirom/android.git -b android-9.0 && repo sync -c -j$(nproc --all) --force-sync --no-clone-bundle --no-tags
# clone repo's
git clone https://github.com/trex-p1m-clones/kt_3.18.xx_alps.git kernel/lenovo/p1m && git clone https://github.com/trex-p1m-clones/dt_3.18.xx_alps.git -b twrp device/lenovo/p1m && git clone https://github.com/trex-p1m-clones/vt_3.18.xx_alps.git vendor/lenovo/p1m
# compile
source build/envsetup.sh && lunch omni_p1m-eng && make -j$(nproc --all) recoveryimage
# upload
int led[] = {2, 3, 4, 5, 6, 7, 8, 9 ,10, 11, A5, A4}; // led pins
int sensor[] = {A0, A1, A2, A3}; //sensor pins
int redDelay = 5000;
int yellowDelay = 2000;
String finalint = "0000";
int ondelay = 300;
bool needDelay = false;
void setup() {
Lenovo Vibe P1m
an android device by lenovo launched in 2015, so why am i writing this, some may ask
as a user of the device and with 4 years of history with it i wouldn't regret to say it is one of the best rom ever made for the device,
getting the latest version (s040) is pretty simple , there are couple of ways to do this
if you are on an older version of the rom update via system updater or download this file and fl;ash through stock recovery
if you have a pc , install spflashtool and download this file and flash through it