You are not logged in.

#1 2014-02-11 05:12:18

Shashwat
Member
From: India
Registered: 2011-05-08
Posts: 101

Flashing android rom in Linux (Xperia Sola)

Hi

I have installed Arch Linux but cannot find suitable material on setting up drivers and utilities for flashing rom on Linux specifically arch linux. I am using Sony Xperia Sola and I want to flash custom rom into it.

I can setup arch even if instructions are available for other distro Linux Mint and Ubuntu so any link can come in handy.

I was using flashtool in windows but after shifting to Arch, I am not sure whats the right procedure to do it.

I have unlocked bootloader and rooted rom (FXP kernel + MIUI) installed as of now which I want to change asap.

Please help.

Regards

Offline

#2 2014-02-11 07:50:03

phil
Member
Registered: 2012-09-22
Posts: 72

Re: Flashing android rom in Linux (Xperia Sola)

I use fastboot https://aur.archlinux.org/packages/fastboot/ to flash my Nexus 4 without problems.
You should also install android-udev https://aur.archlinux.org/packages/android-udev/ .
What you could also do is flash from the bootloader I think.
But with the above tools, I had no problems to flash a zip file onto  my Nexus. Maybe this link is helpful:
http://androidxda.com/enable-fastboot-m … smartphone

Last edited by phil (2014-02-11 07:50:19)

Offline

#3 2014-02-11 07:54:10

Shashwat
Member
From: India
Registered: 2011-05-08
Posts: 101

Re: Flashing android rom in Linux (Xperia Sola)

^^ Thanks I have installed the fastboot already and i have downloaded the android-sdk and made the package using makepkg , but it doesn't seems to have generated an installable .tar.xg package or I am not sure how to proceed further.

The main thing I am concerned about is driver/udev support for my Xperia Sola. How do I check whether my device is properly connected and is ready for flashing?

The basic thing I do is enable Usb debugging and enter fastboot method by connecting the phone by pressing vol up button.

What steps should I take to ensure proper functioning.

Thanks for the headsup, looking forward to have a suave experience flashing and then developing my own custom rom for my device using Arch Linux.

Offline

#4 2014-02-11 16:11:34

phil
Member
Registered: 2012-09-22
Posts: 72

Re: Flashing android rom in Linux (Xperia Sola)

fastboot --help
usage: fastboot [ <option> ] <command>

commands:
  update <filename>                        reflash device from update.zip
  flashall                                 flash boot + recovery + system
  flash <partition> [ <filename> ]         write a file to a flash partition
  erase <partition>                        erase a flash partition
  getvar <variable>                        display a bootloader variable
  boot <kernel> [ <ramdisk> ]              download and boot kernel
  flash:raw boot <kernel> [ <ramdisk> ]    create bootimage and flash it
  devices                                  list all connected devices
  reboot                                   reboot device normally
  reboot-bootloader                        reboot device into bootloader

options:
  -w                                       erase userdata and cache
  -s <serial number>                       specify device serial number
  -p <product>                             specify product name
  -c <cmdline>                             override kernel commandline
  -i <vendor id>                           specify a custom USB vendor id

So you should do a

fastboot devices

.

In my case, I think it shows two things. One seems to be the serial number of my phone. But just do it without and with your phone connected.
After that you can use the

fastboot flash 

command to flash the parts of the rom you want to flash, for example, cyanogenmod provides flashable *.zip files and in *.tgz file from google (for my nexus 4) there is a flashall.sh which shows all commands that are executed.

fastboot flash bootloader bootloader-mako-makoz30d.img
fastboot reboot-bootloader
sleep 5
fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1700.98.img
fastboot reboot-bootloader
sleep 5
fastboot -w update image-occam-kot49h.zip

You can run the script or do every step manuelly.

Offline

#5 2014-02-11 18:36:42

Šaran
Member
From: Bosnia
Registered: 2011-09-03
Posts: 407

Re: Flashing android rom in Linux (Xperia Sola)

For Sony, all you need is fastboot (from AUR) and udev rule.

After plugging phone in fastboot, run lsusb.
You will get something similar to this:
Bus 002 Device 005: ID 0fce:5166 Sony Ericsson Mobile Communications AB

Just replace question marks in the snippet below with appropriate characters in place marked bold (usb product id) and you are all set.

## /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb",ATTR{idVendor}=="0fce",ATTR{idProduct}=="????",MODE="0666"

You can use same rule for any other phone, and both adb and flash modes. Just change vendor and product id's accordingly.

EDIT: If you ever wish to return to stock, you will need flashtool.

Last edited by Šaran (2014-02-11 18:37:48)

Offline

#6 2014-02-12 04:17:44

Shashwat
Member
From: India
Registered: 2011-05-08
Posts: 101

Re: Flashing android rom in Linux (Xperia Sola)

Ok I created the udev file and this the ouput of my lsusb

Bus 001 Device 003: ID 0fce:0146 Sony Ericsson Mobile Communications AB 

and this is my 51-android.rules file

SUBSYSTEM=="usb", ATTR{idVendor}=="054c",ATTR{idProduct}==0146, MODE="0666", GROUP="plugdev" 

now when I use `fastboot devices` nothing happens. What am I doing wrong ?

I have enabled developer option and the phone is set at MTP mode.

Edit 1  - Its weird , the product ID changes after setting the device in developer mode.

[shashwat@arch android]$ lsusb
Bus 002 Device 005: ID 413c:2107 Dell Computer Corp. 
Bus 002 Device 003: ID 046d:c051 Logitech, Inc. G3 (MX518) Optical Mouse
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 019: ID 0fce:0146 Sony Ericsson Mobile Communications AB 
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[shashwat@arch android]$ lsusb
Bus 002 Device 005: ID 413c:2107 Dell Computer Corp. 
Bus 002 Device 003: ID 046d:c051 Logitech, Inc. G3 (MX518) Optical Mouse
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 020: ID 0fce:5146 Sony Ericsson Mobile Communications AB 
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[shashwat@arch android]$ 

before and after usb debugging mode

Last edited by Shashwat (2014-02-12 06:44:39)

Offline

#7 2014-02-12 07:20:13

Shashwat
Member
From: India
Registered: 2011-05-08
Posts: 101

Re: Flashing android rom in Linux (Xperia Sola)

Ok I have reinstalled fatsboot, android-sdk-platform-tools and openjre

Now I still cannot use fastboot devices , its list nothing.

Also since I should have adb available (from sdk-platform) when I run adb it says no command ?

[shashwat@arch fastboot]$ fastboot devices
[shashwat@arch fastboot]$ sudo fastboot devices
[shashwat@arch fastboot]$ sudo fastboot devices
[shashwat@arch fastboot]$ sudo adb
sudo: adb: command not found
[shashwat@arch fastboot]$ adb
bash: adb: command not found

Offline

#8 2014-02-12 07:58:26

phil
Member
Registered: 2012-09-22
Posts: 72

Re: Flashing android rom in Linux (Xperia Sola)

I did not need to make my own udev rule. maybe try to delete it and reinstall android-udev and try again. Did you try fastboot in fastboot mode - bootloader of your device?

Offline

#9 2014-02-12 08:07:01

Shashwat
Member
From: India
Registered: 2011-05-08
Posts: 101

Re: Flashing android rom in Linux (Xperia Sola)

^^ Didn't worked either way.

Downloaded sdk from google and used the flashtool from there and worked like charm, not sure whats the issue with aur package!

Offline

#10 2015-03-31 13:15:24

timofonic
Member
Registered: 2007-05-15
Posts: 47

Re: Flashing android rom in Linux (Xperia Sola)

Hello.

Sorry to recueing and old thread.

I'm trying to rescue Samsung Galaxy Ace S5830i without using Odin, but some native Linux app.

fI found Heimdall, but there's no AUR package and it seems to not support my model
https://github.com/Benjamin-Dobell/Heimdall.

Any ideas?


Thanks for everything.
Regards.

Offline

#11 2015-03-31 14:51:14

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,740

Re: Flashing android rom in Linux (Xperia Sola)

I think you will find they have moved to community; just grab them with Pacman.

I am going to close this old thread.  If you have further questions, please feel free to start a new thread that you will own.  If you believe this thread is relevant, go ahead and link back to it.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Online

Board footer

Powered by FluxBB