A way of install ROM without OTG - Realme X2 Pro Guides, News, & Discussion

I have no OTG, I find a way of flash Lineageos/Pixelextend.......ROM of Realme x2 pro without OTG.
1. make adb works on your computer, mine is Windows7.
2. boot your phone into twrp or orangefox recovery. if you can't see the internal storage of phone, then:
3. on your pc, In the directory of ROM file you downloaded, run this command (you must config windows system environment and add the adb directory first, or you must move the ROM file to your work directory of adb.exe )
Code:
adb push PixelExtended_RMX1931-12.1-20220715-0042-UNOFFICIAL.zip /tmp
the ROM file will transfer to /tmp directory of your phone.
4. in twrp, you can "install" and find the ROM file under /tmp directory.

Related

[TOOLS][ADB][Windows]Push files to device through ADB*now include deodex tools*

See my previous post before in post#2
This is a simple batch file using ADB..
With this you can use ADB to manage your file or APK , Backup, Push Your File to device, or pull file from device..
ADB Work on Stand by Mode (Home Screen) or in Recovery Mode, just set it up..
Extract ADBTOOLSv1.0.1.zip and you will find :
command.bat : Windows Batch Command
_BACKUP_OUT : folder where your backup process done and made
_FLASHING_OUT:
folder for flashing your :
kernel (place your boot.img here)
recovery (place your recovery.img here),
modem (place your modem.bin here)--only for gt p7300
_MODDING_FILE: Folder where your file were created by PULL process
Folder where file for PUSH process should be here
_BATCH_INSTALL : place your APK here for batch install
tools: ADB.exe and busybox binary
success_APK : A folder created for All apk from _BATCH_INSTALL move here after instalation.
Click to expand...
Click to collapse
Notes:
ADB can access all file from device from CWM Recovery, especially CWMR 5.5.0.4
ALL you need to do is:
From Recovery menu, you need to mount /data and /system for ADB working..
THEN, From Command Prompt set ADB Mode to "recovery".(This Batch File set ADB mode to "Home Screen" by default)
So when you use ADB from Online device ( I mean a stand by device).. you dont need to change ADB Mode..
After you set up, you can use ADB as you like..
Code:
=============================================================================
:::: ADB TOOLS FOR GT P7300 and P7310 by suwandiapr
-----------------------------------------------------------------------------
| [*] Before use read this:
| --make sure you have installed adb drivers for your device
| --enable "USB DEBUGGING"
| from (Menu\Settings\Applications\Development)
| --enable "UNKNOWN SOURCES"
| from (Menu\Settings\Applications)
| --increase screen timeout to 10 minutes
| --connect USB cable to PHONE and then connect to PC
| --MAKE SURE YOU HAVE A ROOTED DEVICE AND BUSYBOX
| --Place the right file in the right folder
| --Some feature like Flashing need more tester..so please be aware
| --If you use adb recovery feature, set ADB Mode to recovery
| mount /data and /system from your device recovery
| --If you use adb from homescreen, set ADB Mode to HomeScreen
| --All you Do is your own Risk, use with carefull
-----------------------------------------------------------------------------
****Turn on the screen and allow superuser permission when asked!****
_____________________________________________________________________________
| Current MODDING FILE: NONE | ADB MODE :HomeScreen | sdcard path: /sdcard/|
=============================================================================
:::: ADB PULL ::::
=============================================================================
0 Pulling file from /data ( see result in _MODDING_FILE)
1 Pulling file from /system partition ( see result in _MODDING_FILE)
2 Pulling file from SDcard ( see result in _MODDING_FILE)
3 Backup recovery ( see result in _BACKUP_OUT)
4 Backup Kernel ( see result in _BACKUP_OUT)
5 Backup modem (for P7300 only-see result in _BACKUP_OUT)
6 Backup /system (tar format-see result in _BACKUP_OUT)
7 Backup /efs (tar and .img format-see result in _BACKUP_OUT)
8 Backup APK from /data/app (tar format-see result in _BACKUP_OUT)
=============================================================================
:::: ADB PUSH ::::
=============================================================================
9 Pushing file to /data ( from _MODDING_FILE to device)
10 Pushing file to /system ( from _MODDING_FILE to device)
11 Flashing recovery ( from _FLASHING_OUT to device)
12 Flashing Kernel ( from _FLASHING_OUT to device)
13 Flashing modem for GT P7300 ( from _FLASHING_OUT to device)
=============================================================================
:::: Setting ::::
=============================================================================
14 Set current working File ( for PUSH and PULL )
15 Install busybox on device (need root)
16 Set ADB mode (if you on recovery mode)
17 Install apk ( from _MODDING_FILE to device)
18 Install batch apk ( from _BATCH_INSTALL to device)
=============================================================================
:::: Reboot Menu ::::
=============================================================================
19 Reboot System
20 Boot Into Recovery
21 Reboot Bootloader
22 Quit
My previous post
inspiration from congox case
when you got a problem with bootlop and you forget make a nandroid backup
only have file from other ROM with flashable.zip and need to push the file from your computer to device
you have a recovery support with mount /system and mount /data (tested on CWM 5.5.0.4 and overcome CWM 5.1.2.6) and you can enter this menu while bootloop happen..
STEP 1 : MANUAL
Connect your device with computer
From device, Go to recovery - mounts and storage - mount /system and mount /data
From your computer go to adb terminal and type this
Code:
adb shell "ls /data/media/"
If you can see list of file from your device sdcard, so you make adb work for your device ..
Place your zip file on your path, says on C://backup.zip and you want to copy the file to /sdcard/download/ and type this code
Code:
adb push backup.zip /data/media/download/.
wait for copying progress done..
After you done with moving file to device sdcard, check content of your sdcard with this code
Code:
adb shell "ls /data/media/download/"
When you found your file from list, you can flash backup.zip from recovery
STEP 2 : WINDOWS BATCH FILE
I made a simple Batch File for windows (sorry i dont have MAC or LINUX distro) , this file will make a folder with name "emergency" in SDCARD and with your files inside that.
Extract the FLASHER.rar somewhere on your Local folder,example: on your " Desktop" Folder
in folder "FLASHER" you will find runme.bat and folder "files"
Rename your file ((flashable.zip files you want to send through ADB) to "backup.zip" and then Put your file into this path /FLASHER/files/myfiles/ (just replace the existing "backup.zip" with files from yours)
Connect your tab with Computer
Reboot into Recovery Menu from your device
From menu Mounts and Storage choose mount /system and /data
From your Computer go To Folder flasher and klik runme.bat
Follow the instruction on window untill copying process done and device reboot to recovery again (copying process will take a minutes depend on your file size)
Now you can flash a emergency ROM from recovery
Window instruction
Code:
-----------------------------------------------------------------------------
ADB EMERGENCY COPYING TOOL for TAB 8,9
created by SUWANDIAPR
-----------------------------------------------------------------------------
[*] This script will:
(1) COPY YOUR FILE FROM COMPUTER TO SDCARD/emergency/*
(2) CHECKING YOUR CONNECTED DEVICE DIRECTORY
[*] Before u begin:
(1) make sure u have installed adb drivers for ur device
(2) make sure u have installed CWM 5.5.0.4 ON YOUR DEVICE
(3) connect USB cable to PHONE and then connect to PC
(4) Rename your Flashable .zip file with "backup.zip"
and place inside "myfiles" folder on your Computer
(5) from Recovery Menu, Choose "Mounts and storage" then
-mount /system and -mount /data
(6) CONNECT YOUR TAB WITH PC WHILE ON RECOVERY MENU
---------------------------------------------------------------
CONFIRM ALL ABOVE
Sorry for my Bad english, if there is somebody want to correct every words i use , im very welcome and will change with the proper words and sentence..
Hope this help someone..
Nice guide, thanks!!
I needed some help with mounting the system using adb through a batch file.
I use this command
adb -d shell mount -o remount rw /system
But the mounting fails (I have a rooted phone )
pleas help me I know this is off topic
2 possible reasons for this command to fail:
- /default.prop (on the phone) contains the following line: "ro.secure=1". Then you need another boot.img (in fact just a modified ramdisk). look for "unpack-bootimg.pl" or "unpackbootimage" you may find a guide how to do this manually (not too easy). A rooted kernel would also do the trick.
you can check your default prob with this command "adb shell cat /default.prop".
- in some cases mount requires more parameters. try "adb shell mount" and look for the line containing "/system". In front of system is the "device-name". in my case the mount command would look like this:
mount -o remount,rw /block/dev/mmcblk0p24 /system
hope this helps and sorry for answering off-topic questions....
nail16 said:
I needed some help with mounting the system using adb through a batch file.
I use this command
adb -d shell mount -o remount rw /system
But the mounting fails (I have a rooted phone )
pleas help me I know this is off topic
Click to expand...
Click to collapse
you can use busybox and call the binary from the shell
i assume that your device in normal mode ( in home screen)..
here some example..
Code:
su
adb push busybox /tmp/.
adb shell "chmod 755 /tmp/busybox"
adb shell "tmp/busybox mount -o remount,rw /system"
after you type "su" superuser will prompt a request, choose "allow".
glitschi667 said:
2 possible reasons for this command to fail:
- /default.prop (on the phone) contains the following line: "ro.secure=1". Then you need another boot.img (in fact just a modified ramdisk). look for "unpack-bootimg.pl" or "unpackbootimage" you may find a guide how to do this manually (not too easy). A rooted kernel would also do the trick.
you can check your default prob with this command "adb shell cat /default.prop".
- in some cases mount requires more parameters. try "adb shell mount" and look for the line containing "/system". In front of system is the "device-name". in my case the mount command would look like this:
mount -o remount,rw /block/dev/mmcblk0p24 /system
hope this helps and sorry for answering off-topic questions....
Click to expand...
Click to collapse
yes you right glistchi, samsung lock adb root on new firmware on my SG- Note..
And make me flash an older firmware for rooting..
new update
Never mind, got it to work
i want to push same file in data system (/data/data) but my tab is not root. can i??
if from cwm recovery, yes you can.. if from stand by mode (home screen) the answer is no... you need root to make it happen..
i got this error
please help

How to put file on SDCard from Recovery

I need to flash a ROM, but I can't start my phone up to be able to transfer the file over. There used to be a Mount Storage Device option on my old DHD, but I noticed that on the N4, CWM does not have this option (maybe to do with MTP).
How can I copy a file over onto SDCard so I can flash it? I tried:
Code:
adb push file.zip /sdcard/file.zip
When I try and flash it, it says "Can't open /sdcard/file.zip (bad)
Flash TWRP via fastboot and mount the phone via usb the same drag it into the phone.
Alternatively as a last resort, flash back to stock using stock images provided by Google vis fast boot and then drag it onto the sd as well as reinstalling the recovery.
Sent from my Nexus 4 using xda premium
stefandunn said:
I need to flash a ROM, but I can't start my phone up to be able to transfer the file over. There used to be a Mount Storage Device option on my old DHD, but I noticed that on the N4, CWM does not have this option (maybe to do with MTP).
How can I copy a file over onto SDCard so I can flash it? I tried:
Code:
adb push file.zip /sdcard/file.zip
When I try and flash it, it says "Can't open /sdcard/file.zip (bad)
Click to expand...
Click to collapse
Remove the "file.zip" after the sdcard:
Code:
adb push file.zip /sdcard/
Also ensure the real file name doesn't contain spaces.
Edit: the command as you were typing it was telling adb to take the CONTENTS of file.zip and place them in a FOLDER called file.zip. Out of adb's range of abilities
Alternatively, if you're using CWM, you can use the "Install zip from sideload" option. Once you're in, push the file from adb using "adb sideload filename.zip"
The adb command you tried should work fine in recovery. Maybe you weren't in the correct folder where file.zip was located when you executed the adb command?
Also, if you don't have adb set in your PATH, then the adb app will need to be in the same folder as file.zip.
http://forum.xda-developers.com/showthread.php?t=1667929
se1000 said:
Alternatively, if you're using CWM, you can use the "Install zip from sideload" option. Once you're in, push the file from adb using "adb sideload filename.zip"
Click to expand...
Click to collapse
Thank you very much!

How can i copy Rom zip to phone, i formatted, no rom to flash but i have recovery

I deleted Rom file in sdcard. I cant flash a rom. I have recovery, root and Philz Touch.
How can i copy Rom zip file from computer to Phone? Any idea. I have rooted KK, i dont want to do all things again.
How to: Copy ROM zip file to the freshly wiped device
I found and share with you, it worked.
Have you ever been in a situation where you mistakenly (or not) wiped the content of the internal storage (including system partition and virtual SD card) on your phone or tablet and unfortunately it doesn't support external storage? Now you can't flash desired custom ROM because you removed it and the device can't be booted due to wiped system partition. Don't worry - it's very easy to fix!
Here are the steps you need to follow to copy the correct rom.zip package to your internal storage:
Download this mini-sdk package and extract it to c:\mini-sdk
Rename the custom ROM package you want to flash to "rom.zip" and copy it to c:\mini-sdk
Connect your device to the PC
Boot your device in recovery mode
Open a command prompt on the PC (cmd.exe), type and confirm each command with ENTER:
cd /d c:\mini-sdk
adb shell
mount /data (error might mean that /data partition is already mounted)
on Android 4.2 and above: mkdir -p /data/media/0
on Android 4.1.2 and below: mkdir -p /data/media
exit
on Android 4.2 and above: adb push rom.zip /data/media/0
on Android 4.1.2 and below: adb push rom.zip /data/media
Wait for a few minutes until the file is copied. It will looks like command shell is not responding, but that means it's still copying. Wait patiently until you'll see blinking cursor again.
Depends on your custom recovery, use the navigation keys to flash the custom rom.zip package in a typical way you used to flash custom ROMs. It should be on your internal storage now. Done! http://android-revolution-hd.blogspot.com.tr/2013/12/how-to-copy-rom-zip.html
easier solution:
*bring device in recovery mode
*open cmd, go to adb.exe
*type adb.exe push *filename.zip* /sdcard/your path **/sdcard is already linked to /data/media/0
*wait after pushing the file, reboot recovery again
*choose file and flash
*** other method ***
*use the sideload function in recovery
*adb.exe sideload *rom.zip* in cmd
it says usb device descriptor failed...is it due to bad cable??
it says usb device descriptor failed...is it due to bad cable??

[Tutorial] TWRP ADB Sideloading

Alternative solution: OTG usb flash drive - With one of these, you can store a ROM zip safely, and still format ‘userdata’ to f2fs or EXT4.
TWRP ADB Sideloading​
Requirements: Mac | Linux | Windows PC / Laptop and TWRP Custom Recovery
Moto G (1st Gen) has no SD Card slot. This creates a problem for people converting their phones to GPE and back; as the entire internal storage needs to be formatted (wiped.)
Fastboot images can be used to get android onto your phone after formatting, but there is another way.
NOTE: TWRP needs to be restarted whenever 'data' is changed to a different filesystem.
Example 1:
GPE user wants to flash Stock Motorola ROM.
1) In TWRP, format ‘data’ to f2fs
2) In TWRP, enable ADB Sideloading
3) On PC, use command: ADB sideload stockrom.zip​
Example 2:
Stock Motorola ROM user wants to run GPE.
1) In TWRP, format ‘data’ to ext4
2) In TWRP, enable ADB Sideloading
3) On PC, use command: ADB sideload gperom.zip​
How to access ‘Recovery mode’ ADB:
On a Linux laptop, this is what happens when I use the 'adb devices' command while in TWRP. No drivers are required. I suspect the same applies to Mac OS.
[email protected]:~$ sudo adb devices
List of devices attached
TA53307V38 recovery​
On Windows, it seems not everyone is able to use ADB when in TWRP. The reason for this is that the Motorola drivers installed on the PC are not adequate.
15 Seconds ADB installer includes a generic android driver that may be the solution for people with this problem.
I'd appreciate any tips and insights into how to make this work on different versions of Windows.
Thanks for the guide
some other methods of doing same
Method-1. TWRP 2.8.4.0 supports MTP mode. (Main Menu >> Mount >> Enable MTP) Drivers required for windows. zip file can be copied in MTP mode (Though MTP mode available in 2.7.1.0 it was not working for me but TWRP2.8.4.0 works ). flash via recovery
Method-2. using ADB: place ROM.zip in the adb folder. type following command
Code:
adb push rom.zip /sdcard/
rom will be copied to sdcard. but it does not show the transfer process. flash via recovery
I will report as soon as I will reach home. Well this was needed for people who have issues with adb..
Sent from my Moto G using XDA Free mobile app
For those getting error:
Code:
C:\Users\username\moto>adb sideload sideload.zip
loading: 'sideload.zip'
* failed to write data 'protocol fault (couldn't read status): Invalid argument' *
In TWRP, go to restart > Recovery mode and try again, after the reboot!
Then it works:
Code:
C:\Users\username\moto>adb sideload sideload.zip
loading: 'sideload.zip'
sending: 'sideload.zip' 100%
Can i sideload any type of zip, like BootAnimation zip or System app zips etc, instead of only ROM zips???
subroto1427 said:
Can i sideload any type of zip, like BootAnimation zip or System app zips etc, instead of only ROM zips???
Click to expand...
Click to collapse
You can sideload any zip that you could also install from local storage.
reversegear said:
Thanks for the guide
some other methods of doing same
Method-1. TWRP 2.8.4.0 supports MTP mode. (Main Menu >> Mount >> Enable MTP) Drivers required for windows. zip file can be copied in MTP mode (Though MTP mode available in 2.7.1.0 it was not working for me but TWRP2.8.4.0 works ). flash via recovery
Method-2. using ADB: place ROM.zip in the adb folder. type following command
Code:
adb push rom.zip /sdcard/
rom will be copied to sdcard. but it does not show the transfer process. flash via recovery
Click to expand...
Click to collapse
It seems Lineage 14.1 uses boot loader 0x4111, instead of 0x411A.
Edit: The following resolved it
https://forum.xda-developers.com/moto-g/general/falcon-bootloader-upgrader-tool-t3093793

[Root guide] Easytone T95 Super, android 10, 2GB RAM 16GB ROM

There is no TWRP for this device and there is very little information on it on XDA at time of writing, but here is what I did after a LOT of research and trial and error.
1. Sideload latest magisk.apk onto the device with an SD card or something and install it (you will need this to patch the boot image using “select and patch a file”
2 Either plug the device into your computer with a usb A to usb A cable into the port labelled usb2 or use adb over network and use “adb connect (your IP address)”
3 You should see the device appear when you type “adb devices”.
4 Type “adb shell” to cmd or Linux console (I did this on openSUSE but it should work for windows too as far as I know, feel free to add more in comments if not or you did a different way) and then when you are in the Android shell, type “su” (the little dollar sign should change to a hashtag)
5 You need to copy your boot image to internal storage with dd so you can patch it with magisk. Type “dd if=/dev/block/by-name/boot of=/sdcard/download/boot.img” this will put a copy of your boot image in your downloads folder.
6 ¡You should now copy this to your computer so you always have a normal copy to restore if anything goes wrong! You can’t replace this boot image because there’s no stock firmware for the device I can find online so be careful. I recommend using dd to backup all the partitions in by-name so you have a copy of the whole firmware so you can go back to before you changed anything, this will let you recover from a softbrick or bootloop.
7 Open the magisk app you installed from the apk file and when you’re in, click the “install” button for magisk and “select and patch a file” and find the boot.img in your downloads folder. (You might have to move the boot.img file to different places, the default file manager thing that comes up only found mine when I put it in certain folders I think, also there’s an option in the top right corner if you click the 3 lines button and enable viewing internal storage)
8 If you found the boot image file and opened it in magisk, you should see magisk modify the boot image and tell you where it outputs it. Write down the file path of the patched image (it won’t appear in /sdcard it goes to /storage/emulated/0 so it won’t come up on your computer, I tried to just copy it with the cable)
9 Open an adb shell again and type “su”. Type “cp /storage/emulated/0/download/magisk_patched-XXXXX_XXXXX.img /sdcard (replace the Xs with the name of your patched magisk file, also if yours is outputted to a different place, use that first path instead.
10 Copy patched magisk file to computer with mtp or copy it over sdcard so you have a copy
11 Type “adb shell”, “su”, and dd if=/sdcard/magisk_patched-XXXXX_XXXXX.img of=/dev/block/by-name/boot to replace stock boot image with magisk boot image.
12 When you reboot and open magisk, it will give you a message about the root being abnormal or something but it will say installed and root apps will work!

Categories

Resources