Android Terminal Emulator Command - Sony Xperia P, U, Sola, Go

Tell me what you need to enter the command to flash the kernel via Android terminal emulator?

SonyFan23 said:
Tell me what you need to enter the command to flash the kernel via Android terminal emulator?
Click to expand...
Click to collapse
What reason you have to flash it this way and nor with fastboot or CWM?

ChikeD said:
What reason you have to flash it this way and nor with fastboot or CWM?
Click to expand...
Click to collapse
Am often away from the computer, and through cmw kernel sew, it is also necessary to find
One person on my friend said that the form can be sewn through Termunal Android, that's interested in the question

SonyFan23 said:
Am often away from the computer, and through cmw kernel sew, it is also necessary to find
One person on my friend said that the form can be sewn through Termunal Android, that's interested in the question
Click to expand...
Click to collapse
In principle the dd command should work
However I haven't tried it before and don't know if it is safe to do, so if you do it it's at your own risk.
Code:
dd if=<kernel file> of=<kernel partition>

ChikeD said:
In principle the dd command should work
However I haven't tried it before and don't know if it is safe to do, so if you do it it's at your own risk.
Code:
dd if=<kernel file> of=<kernel partition>
Click to expand...
Click to collapse
So here we introduce: "dd if = <filename> of = <Where is it>"
Will look like?
Code:
dd if=/mnt/sdcard/boot.img of=/dev/block/mmcblkNNN
True or false?

SonyFan23 said:
So here we introduce: "dd if = <filename> of = <Where is it>"
Will look like?
Code:
dd if=/mnt/sdcard/boot.img of=/dev/block/mmcblkNNN
True or false?
Click to expand...
Click to collapse
Almost correct, of=/dev/block/mmcblkNNNpNNN.
If you don't know which it is you can find which partition is the kernel written to with package_extract_file or write_raw in any CWM flashable kernel for your phone.
You better make sure fastboot is working for you before you try it or you may not be able to recover if it is not safe to do and the phone reboot before it finish.

ChikeD said:
Almost correct, of=/dev/block/mmcblkNNNpNNN.
If you don't know which it is you can find which partition is the kernel written to with package_extract_file or write_raw in any CWM flashable kernel for your phone.
You better make sure fastboot is working for you before you try it or you may not be able to recover if it is not safe to do and the phone reboot before it finish.
Click to expand...
Click to collapse
Thank you, I have asked the developer firmware he said that the code would be:
Code:
dd if=/mnt/sdcard1/boot.img of=/dev/block/mmcblk0p9

Related

[RECOVERY][BETA] [TESTERS NEEDED]TWRP 2.3.3.0 touch recovery [2013-1-11]

Disclaimer: Do only if you know what you are doing. I am not responsible for any damage although there is no possible damage with this
Click to expand...
Click to collapse
Hello all, just wished to compile TWRP for this phone and I have done that
But I don't own this phone and need someone of you to test it
Click here to Download
Instructions(needs root):
Install Terminal emulator
Put the recovery.img in external storage
Open terminal emulator and type following
Code:
su
dd if=/storage/extSdCard/recovery.img of=dev/block/mmcblk0p21
If recovery doesn't work and gives you a black screen then you can revert back to stock recovery by replacing recovery.img with stock one and sending in same commands
Reserved for future use
Thanks for this!
Is there a way to install this if someone isnt rooted? (eg. via ODIN)
quendil said:
Thanks for this!
Is there a way to install this if someone isnt rooted? (eg. via ODIN)
Click to expand...
Click to collapse
Yes there is
In terminal of Linux on ur pc do this
tar -H ustar -c recovery.img > recovery.tar
Then do
md5sum -t recovery.tar >> recovery.tar
Then rename the recovery.tar formed to recovery.tar.md5 and flash it under PDA tab in ODIN
Or wait for me to do it, I will be home after some hours
varun.chitre15 said:
Yes there is
In terminal of Linux on ur pc do this
tar -H ustar -c recovery.img > recovery.tar
Then do
md5sum -t recovery.tar >> recovery.tar
Then rename the recovery.tar formed to recovery.tar.md5 and flash it under PDA tab in ODIN
Or wait for me to do it, I will be home after some hours
Click to expand...
Click to collapse
Did you setup the wifi modules to get built inside recovery?
Enviado desde mi GT-I8190 usando Tapatalk 2
If you want to do this on phone, then replace the tar line with
tar cf /storage/extSdCard/recovery.img > /storage/extSdCard/recovery.tar
And md5 line with
md5sum -t /storage/extSdCard/recovery.tar >> /storage/extSdCard/recovery.tar.md5
And flash the recovery.tar.md5 in Odin
Terminal Emulator say's :
#su
#ge/extSdCard/recovery.img/ of=dev/block/mmcblk021/storage/extSdCard/recovery.img/ : cannot open for read
: Not a directory
#
OliverG96 said:
Did you setup the wifi modules to get built inside recovery?
Enviado desde mi GT-I8190 usando Tapatalk 2
Click to expand...
Click to collapse
No I have skipped that, will do it next build if this doesn't work.
cheech01 said:
Terminal Emulator say's :
#su
#ge/extSdCard/recovery.img/ of=dev/block/mmcblk021/storage/extSdCard/recovery.img/ : cannot open for read
: Not a directory
#
Click to expand...
Click to collapse
Oops I did a mistake over there
It should be
dd if=/storage/extSdCard/recovery.img of=dev/block/mmcblk0p21
Not
dd if=/storage/extSdCard/recovery.img/ of=dev/block/mmcblk0p21
The trailing backslash is causing the problem.
varun.chitre15 said:
Oops I did a mistake over there
It should be
dd if=/storage/extSdCard/recovery.img of=dev/block/mmcblk0p21
Not
dd if=/storage/extSdCard/recovery.img/ of=dev/block/mmcblk0p21
The trailing backslash is causing the problem.
Click to expand...
Click to collapse
Thank's but not working,Phone will not start after this Test is Still on the Samsung Galaxy S3 mini GT-i8190 Bootlogo.
cheech01 said:
Thank's but not working,Phone will not start after this Test is Still on the Samsung Galaxy S3 mini GT-i8190 Bootlogo.
Click to expand...
Click to collapse
Ok, will do another build today
cheech01 said:
Thank's but not working,Phone will not start after this Test is Still on the Samsung Galaxy S3 mini GT-i8190 Bootlogo.
Click to expand...
Click to collapse
Give me output of
cat proc/cmdline in terminal emulator app
Another thing, when it is stuck on logo, adb pull recovery.log from /cache/recovery/tmp
Like this
adb pull /cache/recovery/tmp/recovery.log Path/where/u/want/to/pull
And gimme the recovery.log.
varun.chitre15 said:
Give me output of
cat proc/cmdline in terminal emulator app
Another thing, when it is stuck on logo, adb pull recovery.log from /cache/recovery/tmp
Like this
adb pull /cache/recovery/tmp/recovery.log Path/where/u/want/to/pull
And gimme the recovery.log.
Click to expand...
Click to collapse
The phone does not boot further stays the logo stand, Nothing helps more. New Rome flashed helps not.
Don't use this !!!!!
cheech01 said:
The phone does not boot further stays the logo stand, Nothing helps more. New Rome flashed helps not.
Don't use this !!!!!
Click to expand...
Click to collapse
Cant you enter download mode?
And if you can enter download mode, doesnt ODIN work to flash an official ROM?
quendil said:
Cant you enter download mode?
And if you can enter download mode, doesnt ODIN work to flash an official ROM?
Click to expand...
Click to collapse
Yes i can enter Download Mode...... i am Downloading Now Offical Rom i hope it's Work
cheech01 said:
Yes i can enter Download Mode...... i am Downloading Now Offical Rom i hope it's Work
Click to expand...
Click to collapse
Cool then. I hope it works for you!
cheech01 said:
Yes i can enter Download Mode...... i am Downloading Now Offical Rom i hope it's Work
Click to expand...
Click to collapse
It has nothing to do with system partition and system should boot
And if still isn't booting then reflashing system partition and recovery partition via ODIN should work.
As I said in disclaimer this is only for advanced users. Soft bricking is nothing new in development, its normal when you are testing something.
If you guys need development to proceed you need to take risks. So only test when you know what you are doing, its completely your own responsibility. That's a unwritten rule of xda now.
varun.chitre15 said:
It has nothing to do with system partition and system should boot
And if still isn't booting then reflashing system partition and recovery partition via ODIN should work.
As I said in disclaimer this is only for advanced users. Soft bricking is nothing new in development, its normal when you are testing something.
If you guys need development to proceed you need to take risks. So only test when you know what you are doing, its completely your own responsibility. That's a unwritten rule of xda now.
Click to expand...
Click to collapse
Ofc it's understood!
:good:
And we're thankful for your efforts!
cheech01 said:
The phone does not boot further stays the logo stand, Nothing helps more. New Rome flashed helps not.
Don't use this !!!!!
Click to expand...
Click to collapse
you can use Ns pro box to write one special file into the phone,and the phone will be fine.good luck
Very quiet but I just did not Accused. Did you just say that the phone will not start after the (your) recovery. Is a beta test, and if what I write is not true is not es.did not Accused.Ok!

[TUT][Dummy Guide] How to Flash Recovery.img And Or Maybe Boot.img

Well im writing this tutorial because I myself ran into this problem.... I download the latest TWRP 2.5.0.0 and it broke while using aroma. Never happen on 2.4.4.0.. But anyways I flashed a test kernel through recovery and it kept freezing my phone and so I tryed flashing my pizzuto Rom and it broke. And I have no computer at the moment, So this tutorial is for people who are on the go and have no computer access. Or backup.
LIKE I SAID THIS IS FOR PEOPLE ON THE GO THAT DON'T HAVE COMPUTER ACCESS AND DON'T HAVE NANDROID BACKUPS. AND FOR PEOPLE WHO FLASHED TWRP 2.5.0.0 ON THE GO.
Requirements:
1. A Rom that doesn't use aroma to install.
2. Android terminal
3. TWRP 2.3.3.0 image
HOW TO DO IT:
1. Download or Install Android Terminal, And Open It
Code:
su
2.
Code:
flash_image recovery /path/to/recovery.img
^^^ And I Believe Same Can Apply Boot.img ^^^
But only like this:
Code:
flash_image boot /path/to/boot.img
24ky said:
Code:
Type " su "
Click to expand...
Click to collapse
When you encapsulate text in [ CODE ] tags, do not write Type or include quotation marks if they aren't meant to be included in the terminal command. This should simply say:
Code:
su
Adjust your other code encapsulations as well.
24ky said:
Code:
Type " flash_image recovery /path/to/were/recovery.img/is
Click to expand...
Click to collapse
/path/to/were/recovery.img/is is a terrible path example. Either use /path/to/recovery.img or give a legitimate example /sdcard/recovery.img.

Flashing cwm and rooting on unlocked BL P760?

Hi everyone,
So after deciding whether to do it or not, i finally unlocked my BL yesterday. At least when i dial the secret number and look at BL info, it says "UNLOCK".
But I've been trying to flash cwm and rooting but it seems my device is not being recognised in cmd.
And i am having difficulties to install fastboot drivers again because my device is not showing up at all in device manager.
If you could kindly list some simple instructions on how to flash cwm and rooting on unlocked BL (Before you ask, yes i went through all the guides with no avail) or help me to install flashboot drivers properly, it would be appreciated.
Thank you and good day.
EDIT 1: I can boot in fastboot mode, But when i do adb devices, driver installation fails and thus the command for flashing cwm says "waiting for device" and never flashes.
EDIT 2: From what i have searched from previous posts , i need to wait 30mins, I will do that and report.... Hopefully it will work
If you can boot into fastboot then do fastboot devices, adb devices are commands in adb mode, not fastboot mode, instead of flashing through adb use fastboot flash , hope I help!
Sent from my LG-P769 using xda app-developers app
EpicLordPhone said:
If you can boot into fastboot then do fastboot devices, adb devices are commands in adb mode, not fastboot mode, instead of flashing through adb use fastboot flash , hope I help!
Sent from my LG-P769 using xda app-developers app
Click to expand...
Click to collapse
Sorry,
I actually did what u said.
But when i type the command (in cmd) : C:\Android>fastboot devices ---> The command is accepted and there is a driver installation which fails.
Even then i continued and typed : C:\Android>fastboot flash recovery recovery-clockwork-touch-6.0.3.1-p760.img
But with the second command, it simply says "waiting for device" in the command window, but nothing happens.
kirakun said:
But with the second command, it simply says "waiting for device" in the command window, but nothing happens.
Click to expand...
Click to collapse
Put recovery.img on sdcard
Using Android Terminal Emulator:
su
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p4
P.S Sorry my ENG
Lgeob said:
Put recovery.img on sdcard
Using Android Terminal Emulator:
su
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p4
P.S Sorry my ENG
Click to expand...
Click to collapse
But I only have an unlocked BL and I do NOT have root either :/
kirakun said:
But I only have an unlocked BL and I do NOT have root either :/
Click to expand...
Click to collapse
What prevents get root?
Lgeob said:
What prevents get root?
Click to expand...
Click to collapse
When i enter fastboot mode, pc installs drivers but driver installation fails. Cannot use fastboot commands. I try to re-install fastboot drivers (omap4boot drivers) but i cannot find device in device manager
kirakun said:
When i enter fastboot mode, pc installs drivers but driver installation fails. Cannot use fastboot commands. I try to re-install fastboot drivers (omap4boot drivers) but i cannot find device in device manager
Click to expand...
Click to collapse
BL unlocked?
Get root with LGPwn.apk.
Thru Terminal put recovery.img
Lgeob said:
BL unlocked?
Get root with LGPwn.apk.
Thru Terminal put recovery.img
Click to expand...
Click to collapse
okay ill try this
Lgeob said:
BL unlocked?
Get root with LGPwn.apk.
Thru Terminal put recovery.img
Click to expand...
Click to collapse
I don't have spritebud, so LGPwn.apk does not work
kirakun said:
I don't have spritebud, so LGPwn.apk does not work
Click to expand...
Click to collapse
Try this method.
Casserole said:
Try this method.
Click to expand...
Click to collapse
Thanks for the reply ^^ I was planning to use this as last resort XD Do u think its reliable o-o?
And also after installing this i can flash cwm ?
kirakun said:
And also after installing this i can flash cwm ?
Click to expand...
Click to collapse
Do it.Не ссы :good:

Root Access on Miui 8.1 Global rom without Volume up Key

Hi Guys,
I'm trying to add root access to my Miui 8.1 global rom but my volume up key doesn't work so I can't go into recovery to do this. Does anyone know of another way?
Much appreciated
Assuming your TWRP image file is named TWRP.img and it's in your current directory, try
Code:
fastboot boot TWRP.img
That should reboot your device reading the image from your PC.
Make any adjustment to the above command according to your twrp image file name.
This just installs TWRP which I've already done. I need to be able to boot into it.
rndm said:
This just installs TWRP
Click to expand...
Click to collapse
That should be
Code:
fastboot [B]flash recovery[/B] TWRP.img
Did you try before replying?
rndm said:
This just installs TWRP which I've already done. I need to be able to boot into it.
Click to expand...
Click to collapse
Have you tried through adb (adb reboot recovery)?
ser.clansman said:
Have you tried through adb (adb reboot recovery)?
Click to expand...
Click to collapse
How do I do that?
gnazio said:
That should be
Code:
fastboot [B]flash recovery[/B] TWRP.img
Did you try before replying?
Click to expand...
Click to collapse
Thanks for the reply...when you say "that" what exactly are you referring to?
Can you notice the difference in the two commands I wrote?
I'm referring to the part of your message I've quoted.

[ROOT] How to flash recovery within Android with terminal / adb shell

Hi,
this is a small tutorial to show you how to flash the recovery, also eRecovery, via command line / adb shell within Android.
Flashify and other apps never worked for me, so I used commands to flash it without the need of fastboot.
It's a small tutorial for those who never worked with commands like this.
Please notify me if something went wrong or if you found any other issues.
I wanted to make a small script but I stopped it because of the lack of available commands in Android.
DISCLAIMER:
Read this tutorial first.
Never flash custom recovery to eRecovery.
Never flash recoveries from different devices.
Don't try to flash other partitions with this commands if you don't want to risk a brick.
Requirements:
- Oreo / EMUI 8 installed, Nougat hast other partition names. Pie isn't supported by me until final release.
- working root access
- terminal emulator app (I recommend Termius, it's easy to use and has nice features, it's free to use)
> or a PC, and USB cable and working ADB, also USB Debugging enabled in developer settings
- recovery img files on your phone, I recommend it to put them into your user root /data/media/0/ (internal memory)
NOTE: All commands are case sensitive!
Now open your terminal app or open the adb shell.
Type following command to enable root access:
Code:
su
SuperSU will ask you for root access, grant it.
Following command is needed to figure out, which type of memory your phone has:
Code:
ls /dev/block/platform
There are two possible outputs:
If you've a device with the faster UFS memory, it's ff3b0000.ufs, if eMMC it's hi_mci.0.
From now I'll write MEMORY instead of ff3b0000.ufs or hi_mci.0.
For flashing the recovery fire up following command:
Code:
dd if=/PATH/TO/YOUR/RECOVERY.IMG of=/dev/block/platform/MEMORY/by-name/recovery_ramdisk_a
Example: dd if=/data/media/0/twrp_3.2.1.img of=/dev/block/platform/ff3b0000.ufs/by-name/recovery_ramdisk_a
The output should look like this:
Code:
65536+0 records in
65536+0 records out
33554432 bytes transferred in 0.247 secs (135847902 bytes/sec)
If not, check your command and file paths.
For flashin the eRecovery fire up following command:
Code:
dd if=/PATH/TO/YOUR/ERECOVERY.IMG of=/dev/block/platform/MEMORY/by-name/erecovery_ramdisk_a
Example: dd if=/data/media/0/ERECOVERY_RAMDI.IMG of=/dev/block/platform/ff3b0000.ufs/by-name/erecovery_ramdisk_a
IMPORTANT NOTE: DO NOT INSTALL TWRP IN THIS! Flash only stock eRecovery!
The dd command won't give you any progress output, so be a bit patient. It should be done in a few second, but don't close the terminal app or connection before you got any output.
Unix systems like Android will give an output if something went wrong, always.
I use this to flash new TWRP versions or to flash stock recovery before I update.
If you recently updated your phone, you still need to flash via fastboot, because you lost root during the update.
The dd commands also work with fastboot. Mostly you'll use "fastboot flash recovery_ramdisk", but if you need to flash eRecovery, you can use the dd command.
23. February 2019:
Pie should also work, but you have to remove the "_a" after the partition name.
Example:
dd if=/data/media/0/twrp_3.2.1.img of=/dev/block/platform/ff3b0000.ufs/by-name/recovery_ramdisk
Please report if it's working or not.
How to know the path to the recovery_ramdisk?? Is all devices the same?? I didn't get it right the 1st time .. it shows path is invalid
Sent from my VTR-L29 using Tapatalk
fr3ker said:
How to know the path to the recovery_ramdisk?? Is all devices the same?? I didn't get it right the 1st time .. it shows path is invalid
Sent from my VTR-L29 using Tapatalk
Click to expand...
Click to collapse
Should be the same on every device. Remember, case sensitive and use _ and not -.
Maybe it's different on non UFS devices, which one do you have?
Are you able to post a screenshot of your command and output?
Jannomag said:
Should be the same on every device. Remember, case sensitive and use _ and not -.
Maybe it's different on non UFS devices, which one do you have?
Are you able to post a screenshot of your command and output?
Click to expand...
Click to collapse
Maybe @fr3ker is not on Oreo? The recovery_ramdisk partition is only for Oreo. In Nougat it is just called recovery. I don't know how the Pie partitions are called.
M1chiel said:
Maybe @fr3ker is not on Oreo? The recovery_ramdisk partition is only for Oreo. In Nougat it is just called recovery. I don't know how the Pie partitions are called.
Click to expand...
Click to collapse
Also my thought, I wanted to add this to the requirements when I created this post but apparently I forgot this. Now it's added as first point.
Hi.
I have a hard bricked p10. When I connect to laptop it's says USB SER. It doesn't not turn on I can't access recovery with power + vol. I can't get into fastboot. Anyway I can access fastboot to flash kernel and erecovery?
Jannomag said:
I use this to flash new TWRP versions or to flash stock recovery before I update.
Click to expand...
Click to collapse
Is it mandatory to flash stock recovery before update? Is it applies only to ota update or ff method?
Yes, FF or OTA are using stock recovery to flash the update. With TWRP it won't work.
Updated?
@ Jannomag:
Have you checked this for Pie meanwhile?
I currently have the problem, not being able to enter fastboot with:
Code:
sudo adb reboot bootloader
Additionally, there's something I do not understand. For the dd-command for flashing, why is the input-file (if=) the file in "/dev/block/platform/..." and the output on the sd-card? Wouldn't mean flashing an img to the device, that if= on the sd (or connected PC) and of= the path to the device (phone)?
Blümchen Blau said:
@ Jannomag:
Have you checked this for Pie meanwhile?
I currently have the problem, not being able to enter fastboot with:
Code:
sudo adb reboot bootloader
Additionally, there's something I do not understand. For the dd-command for flashing, why is the input-file (if=) the file in "/dev/block/platform/..." and the output on the sd-card? Wouldn't mean flashing an img to the device, that if= on the sd (or connected PC) and of= the path to the device (phone)?
Click to expand...
Click to collapse
WTF....Why didn't I notice this terrible mistake! Thank you for reading my post completely, you're 100% correct, I'll correct this directly after I submit this post.
Huawei did also a small change at naming the recovery partition, which I'll update, too.
I had also the problem that I wasn't able to boot into fastboot by command before I fried my phone - I couldn't figure out the reason for this.
Again, thank you!
Jannomag said:
Again, thank you!
Click to expand...
Click to collapse
Your'e welcome! I did update now, but didn't need your (correct ) way to fastboot, because the method described by borgerapper did the trick for me to get into fastboot and flash the needed original recovery.
Thanks anyway!

Categories

Resources