[Q] Xperia Firmware & Rooting - Sony Xperia P, U, Sola, Go

Hi,
I'm considering buying the Xperia-S but I have no information about Sony's policy in modding & tweaking. I don't plan to install custom kernels / recoveries / rom's initially & would only want to root the device & maybe customise it a little.
How good is Sony's support in updates & How easy is it to stay close to stock & still be rooted ?
I was browsing the development subforum & came across the thread with the stock firmware at : http://forum.xda-developers.com/showthread.php?t=1527319.
I downloaded Xperia_S_(LT26)_6.0.A.3.62_1252-0023.rar & LT26i_6.0.A.3.62_NCB World.ftf. I've extracted both the files & managed to get the system.sin files but I dont know how to browse / extract them.
I found a link to an old utility 'Xperia ROM Manager' which comes with mkyaffs.exe, SIN2IMG.exe & unyaffs.exe but I'm stuck as I cant get the output from the sin to img to mount in linux.
Any pointer in the right direction would help. Thank You.

Snmjm said:
Any pointer in the right direction would help. Thank You.
Click to expand...
Click to collapse
Yes, not to create new topic and continue discussion in the right thread.

I'm Sorry to have offended you but which is the right thread for a question like this ?
I thought posting something on the dev thread would be wrong & the thread with the utilities ( mkyaffs.exe, SIN2IMG.exe & unyaffs.exe) wasn't in the Xperia S forums but a year old thread for other SE devices.

Hey.
Use our FreeXperia/CM sin2img converter. It works better than the windows tools.
https://github.com/defer/semc-xperia-tools/blob/master/sin2img.py
After that extract the partitions, but its not yaffs its ext4. So if you are running linux system you can simply mount with:
mount -o loop system.img /home/yourname/folderwhereitgetsmounted
Have fun

Thank You so much.
I'm new to Xperia but not to android. I know how to root my desire-hd & a little about theming. Is there a wiki where general information about Xperia is available ?

Right, I am sorry for the above. I focused more on you topic name, rather than post itself. I apoligize.
Snmjm said:
Thank You so much.
I'm new to Xperia but not to android. I know how to root my desire-hd & a little about theming. Is there a wiki where general information about Xperia is available ?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=1526866

No worries.

Bin4ry said:
Hey.
Use our FreeXperia/CM sin2img converter. It works better than the windows tools.
https://github.com/defer/semc-xperia-tools/blob/master/sin2img.py
After that extract the partitions, but its not yaffs its ext4. So if you are running linux system you can simply mount with:
mount -o loop system.img /home/yourname/folderwhereitgetsmounted
Have fun
Click to expand...
Click to collapse
I am getting the below error when running the script with system.sin from .62 firmware
Code:
Traceback (most recent call last):
File "sin2img.py", line 52, in <module>
convert (sin, img)
File "sin2img.py", line 28, in convert
bt = sinfile.read(2)
File "D:\Python32\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 130: character maps to <undefined>

I tried it in linux & it worked. Maybe you can try it using a live cd or install linux in a vm

Bin4ry said:
Hey.
Use our FreeXperia/CM sin2img converter. It works better than the windows tools.
https://github.com/defer/semc-xperia-tools/blob/master/sin2img.py
After that extract the partitions, but its not yaffs its ext4. So if you are running linux system you can simply mount with:
mount -o loop system.img /home/yourname/folderwhereitgetsmounted
Have fun
Click to expand...
Click to collapse
Hi, i have debian installed, how can i use sin2img.py? i mean, what commands and what packages do i need to make it work? because i only get "command not found" error

Yakandu said:
Hi, i have debian installed, how can i use sin2img.py? i mean, what commands and what packages do i need to make it work? because i only get "command not found" error
Click to expand...
Click to collapse
use your python path, for example i'm using redhat and my python path is /usr/bin/python, then the command is
# /usr/bin/phyton sin2img.py system.sin system.img

Related

[Q][NVFLASH]Gain root on stock system image

Hi all, researcher and enthusiast,
I own a complete backup of all partition of the LG P990 with stock ICS, made it with nvflash with a command like this,
Code:
nvflash -r -read <-partition number-> my_partition.img
for all the partition listed in the partition table.
I guess that in someone of that raw image file, (outputted by nvflash), is located the entry system partition, (PartitionId=23 for the LG P990 ICS partition layout).
It's easy for every linux user to mount the raw image file, simply with 'mount' utility.
Browsing them we can find as already hypothesized the entrie android system partition!
If I copying in it the 'su' executable compiled for my platform, it could work?
Yes. Simple as that. Just be careful with permissions.
There's a topic I made on the ancient v28g time with stock v28g rooted system, on dev section. There you'll find useful info.
Do not say "thanks"; just press it under here.
louiscypherbr said:
Yes. Simple as that. Just be careful with permissions.
There's a topic I made on the ancient v28g time with stock v28g rooted system, on dev section. There you'll find useful info.
Do not say "thanks"; just press it under here.
Click to expand...
Click to collapse
Thanks! I'll have a close look to your work now, for others that consider this stuff interesting, louiscypherbr's work is here:
http://forum.xda-developers.com/showthread.php?t=2010671
Nice job!
louiscypherbr said:
Yes. Simple as that. Just be careful with permissions.
Click to expand...
Click to collapse
Ok louis, but the partition23 image file after adding su binary or other things is bigger than the previous that we had read with nvflash, right?
If I flash back it with
--bl fastboot.bin --download 23 image.img
how can this work..?
In the part table is write that have been reserved 536.870.912 bytes for the partiton 23, but we want flash an img file bigger than that size (because we added some stuff), this not causes problem?
And what do you mean for careful?
The extracted file is a dd partition image, meaning it's extracted byte by byte. So it includes the empty space, which you can see with "df" command after mounting it.
You can add files that fit in that position and it will be ok when flashed.
Do not say "thanks"; just press it under here.
Stupid thing! You're right!
And, what you mean for careful with perm?
The su binary should be have the setuid bit set in addition to the obvious x, is this enough?
Have you compiled su by yourself...?
louiscypherbr said:
There's a topic I made on the ancient v28g time with stock v28g rooted system, on dev section. There you'll find useful info.
Click to expand...
Click to collapse
Where have you found the executable of su packed in your v28g louis...???
Hey, sorry for being far from this.
What I was talking about permissions is that you should keep su permissions/owner. I did this just copying the su from a rooted Rom zip to /system/xbin and pasting inside your loop mounted /system with file manager (I'm kde fan, so I used dolphin, the kde graphical file manager, but you can use any other as well).
Sent from my LG-P990 using xda app-developers app

[Q] How to Extract data from .Backup file ? - Created with android system recovery

I Backup-ed my Acer tab b1-A71 using android system recovery - Just like CWM.
The file name ends with .Backup, and i wanted to extract some files from it..
How to Extract data from .Backup file ? - Created with android system recovery
looking for the same
reena0307 said:
I Backup-ed my Acer tab b1-A71 using android system recovery - Just like CWM.
The file name ends with .Backup, and i wanted to extract some files from it..
How to Extract data from .Backup file ? - Created with android system recovery
Click to expand...
Click to collapse
me too looking for the same thing ..how to extract from or decompile .backup file which we get thru recovery.
hi loverboyritesh :: i and you are in same position.. but some advaaanced users are here that we are telling rumors and lies.. dont worry bro.. even i'm trying to get solution.. will tel you after geeing one.. Still no one can tell me hoe to extract .BACKUP file..
same
i am looking for how to reinstall .backup myself so i can have my original rom install.
but i have notice my .backup is 700+mb while custom rom is 200+mb
do you know how to?
reena0307 said:
I Backup-ed my Acer tab b1-A71 using android system recovery - Just like CWM.
The file name ends with .Backup, and i wanted to extract some files from it..
How to Extract data from .Backup file ? - Created with android system recovery
Click to expand...
Click to collapse
same here. dunno how to open and extract the files from a .backup file. hoping you know already
siiingkeeet said:
same here. dunno how to open and extract the files from a .backup file. hoping you know already
Click to expand...
Click to collapse
Nope.. Still i'm having that file but no one knew
reena0307 said:
Nope.. Still i'm having that file but no one knew
Click to expand...
Click to collapse
been searching for 5 days now :<
not a single answer found on google and forums
cant even post a new thread yet. just joined
hope someone will drop by this thread
still no solution?
got same problem here
Got a bootloop issue with an ASUS MeMo Pad 7 HD and I've booted in recovery <3e> to make a backup.
I've got a userdata_YYYYMMDD_HHMMSS.backup. I tried opening it with a bunch of tools like unyaffs, abe (Android backup extractor), going live on the file using linux tools (open as 7zip, zip, rar, tar, tar.gz, gz, bz2 , mount as iso, ext4 and so on....)
Still no luck :-/
Only clue is that the file seems compressed. During the backup under recovery, it told me 3600MB to backup and the file userdata_xxxxxxxx_xxxxxx.backup show only 2.61GB
I did this backup 3 time to ensure there were no corruption during the write process from the pad and did again the same "tests" to open the file...Not better.
If any dev' have any clue of the file format, I'd be glad to help
It doesn't seem to be a valid unix img file. Tried mounting it to no avail. When it's restored by the recovery it also extracts the individual files because i fails on one in my case and stops the entire restore... I tried unzipping it, changed extension to ,jar, .tar, .zip, etc., none of them are recognised...amazing for a standard android feature to find so little info about it
Any solution?
I called Alcatel's technical service today and they told me that you can use the backup file only from the phone. Mine gives me the following error when I try to restore it: Error Magic header
If anyone knows how to unpack the backup file I would be more than grateful.
It's a 512 byte header in front of a "tar.gz"
hexdump -C userdata_xxxxxxxx_yyyyyy.backup | less​showed the magical zip header "1f8b0800 00000000" at offset 0x200
So, skipping 512 bytes, the rest can be gunzip | tar
dd if=userdata_xxxxxxxx_yyyyyy.backup bs=512 skip=1 | gunzip -c | tar xv​
Sir ektoric what d u mean on ur post?
Sorry cant understand it..
Can u please d a step by step procedure? Please...pls...plss
Thanks in advance...
Steps?
@ektoric sir im a noob in this... Can u show a step by step procedure?
@killen00 sorry, I assume you have a linux machine (or have access to one). The command is actually all there is to it.
Code:
dd if=userdata_xxxxxxxx_yyyyyy.backup bs=512 skip=1 | gunzip -c | tar xv
If you don't have a linux machine available, might I suggest one of the many distros of your choice, most of which have LiveCDs which you can run without installing.
script for gunzip method
maybe on xda it is common sense, but for me it was necessary to know, that these stock android recovery extracted files can be restored with nandroid custom recovery, if you simply repack them into tar archive.
i put this two command lines in a dirty shell script (extract + repack as tar).
thanks to ektoric figuring out his gunzip method!
edit: notamamasboy's mount method added (but not tested yet). if script not works come back few days later, download again and check version, maybe it has changed meanwhile.
with this you're able to transfer data of non-rooted phone to (rooted) similar one.
this is useful in case touchscreen is broken, you haven't custom recovery installed, usb-debugging is disabled and connecting usb-otg-mouse doesn't work.
tested on my Archos 50 b Oxygen (Mediatek MT6582).
it works for me, feel free to improve, port to busybox and publish. no support. use at own risk.
edit: bckp2cwm.sh is deprecated it is FOR JELLY BEAN ONLY (no selinux support)
a newer (selinux) version bckp2win.sh for TWRP you can find here:
http://forum.xda-developers.com/showthread.php?t=3775129
How did you go about determining the magic number found at 0x200? My hexdump output does not have that magic number (1f 8b) in any instance. Leads me to believe my backup is not a tar file. Any suggestions then?
@notamamasboy, you are unfortunately correct.
Someone else also mentioned that their
Code:
userdata_xxxxxxxx_yyyyyy.backup
file was not of the same format I tried some "known magic headers", and could not find anything tell-tale. In which case, without some clues, you are back at square one.
ektoric said:
@notamamasboy, you are unfortunately correct.
Someone else also mentioned that their
Code:
userdata_xxxxxxxx_yyyyyy.backup
file was not of the same format I tried some "known magic headers", and could not find anything tell-tale. In which case, without some clues, you are back at square one.
Click to expand...
Click to collapse
Even more peculiarly, two backups were created a .backup and a .backup2, I wonder if combining with cat I can get somewhere...

[Q] Android L custom ROM symlinks & permissions

Hey!
I have some questions. With Android L arrived the custom ROMs with files packed into image files (like system.img). And I saw that cm12(just an example) doesn't need anymore to set permissions and create symlinks because they are already stored inside the image file.
And my question is: how can I store the system files into a image file with all symlinks created and permissions set? And also which files require symlinks and what permission should be set for folders/files ?..and into a image files, where are stored the symlinks?
I'm using Windows 7 and I want to make a custom ROM based on stock LG G2 firmware.
I have other ROM's as reference(with system packed into an image file, and with system unpacked) and I can look inside them to see which files needs symlinks..but my main question is, why these files need symlinks?
Thanks!
My two cents :
Cmd to find symlinks (in term emulator, you can remove the end of the cmd if you just want to see the result in the terminal instead of creating a file fic.txt)
ls -lR /system | grep ^l | grep " -> " > fic.txt
Note : in cloudyfa's rom you can see symlinks in updater script (same as stock + busybox)
6ril1 said:
My two cents :
Cmd to find symlinks (in term emulator, you can remove the end of the cmd if you just want to see the result in the terminal instead of creating a file fic.txt)
ls -lR /system | grep ^l | grep " -> " > fic.txt
Note : in cloudyfa's rom you can see symlinks in updater script (same as stock + busybox)
Click to expand...
Click to collapse
Thanks for help ..I understand better now..I searched more and the system.img is the stock image from kdz(I think).. and it contains the necessary symlinks and permissions.
raulx222 said:
Thanks for help ..I understand better now..I searched more and the system.img is the stock image from kdz(I think).. and it contains the necessary symlinks and permissions.
Click to expand...
Click to collapse
Can you help me,how do you get the symlinks and permissions from the system.img;
Thank you very much,I searched this issue long time
austinycl said:
Can you help me,how do you get the symlinks and permissions from the system.img;
Thank you very much,I searched this issue long time
Click to expand...
Click to collapse
Try running that command and see the output. It's been a long time, I don't quite remember right now. Try looking into cloudyfa's ROM zip, it might help
raulx222 said:
Try running that command and see the output. It's been a long time, I don't quite remember right now. Try looking into cloudyfa's ROM zip, it might help
Click to expand...
Click to collapse
Thank you very much,I will try it!
U can use SuperR kitchen

Any methods to change font without root?

A guy on Chinese forum had released some font apks which is not originated from SmartWorld,and its working.
Have tried simply replacing ttf file in the apk,seemed not working.
Any ideas to change custom fonts without root?(Cant know how the font apk works...)
rexx0520 said:
A guy on Chinese forum had released some font apks which is not originated from SmartWorld,and its working.
Have tried simply replacing ttf file in the apk,seemed not working.
Any ideas to change custom fonts without root?(Cant know how the font apk works...)
Click to expand...
Click to collapse
It's not that simple. You can replace the ttf files under /system/fonts that relate to LG's default font changer. They all start with HY. Replace the files of the font you don't like/use with those that you do. You need a regular type and a bold one. Also, you need to do this in a Linux environment. Make sure you correct security contexts when you finish, or it won't work.
ashkan-khatar said:
It's not that simple. You can replace the ttf files under /system/fonts that relate to LG's default font changer. They all start with HY. Replace the files of the font you don't like/use with those that you do. You need a regular type and a bold one. Also, you need to do this in a Linux environment. Make sure you correct security contexts when you finish, or it won't work.
Click to expand...
Click to collapse
Hello,/system/fonts seems to be Read-Only?
rexx0520 said:
Hello,/system/fonts seems to be Read-Only?
Click to expand...
Click to collapse
You need to mount it as a re-writable partition. Use the command below:
Code:
mount -o loop,rw -t ext4 image-file.img the-folder-you-want-to-mount-the-image-in
Then, when you're done, use this:
Code:
umount the-folder-you-mounted-the-image-in
You can find attached a screenshot of what the process will do in the end. I have replaced Foxrain.
ashkan-khatar said:
You need to mount it as a re-writable partition. Use the command below:
Code:
mount -o loop,rw -t ext4 image-file.img the-folder-you-want-to-mount-the-image-in
Then, when you're done, use this:
Code:
umount the-folder-you-mounted-the-image-in
You can find attached a screenshot of what the process will do in the end. I have replaced Foxrain.
Click to expand...
Click to collapse
It seems that the phone has to be rooted...?
rexx0520 said:
It seems that the phone has to be rooted...?
Click to expand...
Click to collapse
Do you know where to use those commands?
ashkan-khatar said:
Do you know where to use those commands?
Click to expand...
Click to collapse
Nope...seems to be adb in linux?
I've just installed Ubuntu
confused about everything...Which img file should I mount?And where to mount...
sorry for my basic english
rexx0520 said:
Nope...seems to be adb in linux?
I've just installed Ubuntu
confused about everything...Which img file should I mount?And where to mount...
sorry for my basic english
Click to expand...
Click to collapse
Oh, well, use KDZ Extractor to get a stock system.img from a KDZ. Then open a terminal in the folder where you have the image and use the following commands:
Code:
sudo
mkdir something
mount -o loop,rw -t ext4 system.img something
Then modify what you want, and, when you're done and have corrected security contexts using "ls -lZ" and "chcon", use this:
Code:
umount something
ashkan-khatar said:
Oh, well, use KDZ Extractor to get a stock system.img from a KDZ. Then open a terminal in the folder where you have the image and use the following commands:
Code:
sudo
mkdir something
mount -o loop,rw -t ext4 system.img something
Then modify what you want, and, when you're done and have corrected security contexts using "ls -lZ" and "chcon", use this:
Code:
umount something
Click to expand...
Click to collapse
Find only python and windows version KDZ extractor,should i use the python one?
after system.img modded,how do i flash it in to my phone?any method to pack it back to kdz?
thanks for your helping..
rexx0520 said:
Find only python and windows version KDZ extractor,should i use the python one?
after system.img modded,how do i flash it in to my phone?any method to pack it back to kdz?
thanks for your helping..
Click to expand...
Click to collapse
Oh, I'm not familiar with Python. Why did you install ubuntu? You could just boot it through VMWare or something. I think you'd need either Windows or Mac to use KDZ Extractor.
You don't need to re-pack your modded system.img into a KDZ to flash it. Use the guide in this thread to do so.
ashkan-khatar said:
Oh, I'm not familiar with Python. Why did you install ubuntu? You could just boot it through VMWare or something. I think you'd need either Windows or Mac to use KDZ Extractor.
You don't need to re-pack your modded system.img into a KDZ to flash it. Use the guide in this thread to do so.
Click to expand...
Click to collapse
should i start with step 1 or 9?
rexx0520 said:
should i start with step 1 or 9?
Click to expand...
Click to collapse
Step 1. It won't work otherwise. The port needs to be opened, and that's what LGUp does.
By the way, you can mod your ROM in many ways, not just fonts and stuff. The security contexts are very important, don't forget correcting them after you're done modding.

Sailfish OS on X

Instructions:
https://jolla.com/sailfishxinstall/
Download:
http://images.devaamo.fi/sfe/suzu/
thanks to all the guys that worked on this port.
Kernel source:
https://github.com/mer-hybris/android_kernel_sony_msm
This make_ext4fs works for flashing on macOS
For some reason with this build the system-icons vanish for me after restarting the device once :/
I had much better results using this build.
Also by default (at least with the image I linked) only two of the 6 cpu-cores are enabled. To fix that one must add this under the init-section of the /init.loire.pwr.rc file and reboot (All credit for this go to abranson from the #sailfishos-porters irc).
Thanks for this port! are you planning to continue building for Xperia X or is a test build before official release?
Enviado desde mi F5121 mediante Tapatalk
keep going till then, also ive updated the above link
how flash it?
FuLiterary said:
how flash it?
Click to expand...
Click to collapse
read the first post
FuLiterary said:
how flash it?
Click to expand...
Click to collapse
make sure when you are flashing sailfish support only F5121 and does not support sdxc
Hello, friend! I am a Chinese user, I do not understand the tutorial, there is no mor
Jozinek said:
so only Linux or MacOS too?
Click to expand...
Click to collapse
Flashing works on macOS too. You just need to use the make_ext4fs I linked instead of the one linked on top.
janeliang34 said:
Hello, friend! I am a Chinese user, I do not understand the tutorial, there is no mor
Click to expand...
Click to collapse
extract the tar, open a terminal inside the extracted folder and run ./flash.sh
One question. Zip file with AOSP should be moved intact or only vendor folder from inside it?
Seems it has to be whole .zip.
Jozinek said:
i never make something like this in MacOS (i have Macbook Air, but also with Windows), can you write step by step how to make it. This is something totally new for me (i flashed hundreds of XPERIA smartphones, i have Emma tool, but never try this...)
Click to expand...
Click to collapse
Sure thing
First of all your bootloader needs to be unlocked. I'm assuming you already did that but if not you should read about backuping your drm-keys because otherwise they can't be recovered after unlocking your bootloader unless you do that.
If you don't have fastboot installed yet follow this guide.
After that download the first file linked at the top of this thread.
Unpack the archive (if you can't open it I recommend "the unarchiver" from the app-store).
Place both this file and the zip from the third link at the top in the unpacked folder (in the path where the flash.sh is). Don't unpack the .zip file!
After that open a terminal and navigate to your unpacked folder (if you don't know how to do that google for "terminal tutorial mac").
Run
Code:
chmod +x flash.sh
chmod +x make_ext4fs
to mark the flash-script and the make_ext4fs-file as executable.
Boot your device into fastboot mode (hold volume up while it's turned off and plug in your usb-cable) and finally run
Code:
./flash.sh
to install sailfishOS on the device.
If there is a "hybris-recovery.img" file in the directory (can't quite remember if that's the case with this build) also run
Code:
fastboot flash recovery hybris-recovery.img
to install a sailfishOS specific recovery.
After that you can reboot your device and enjoy Sailfish OS
@Jozinek
You didn't unpack the .tar.bz, inside are all files needed to flash. Than You have to move make_ext4fs, AOSP.zip and flash.fs into created (by unpacking) folder and start/cd Terminal there.
Jozinek said:
Edit3 - it worked now, it was bad make_ext4fs, thanks all of you
Click to expand...
Click to collapse
So that means you are doing a review on YouTube, right?
Friend, is there a tutorial for Windows installation? To be more detailed, this is my first contact
janeliang34 said:
Friend, is there a tutorial for Windows installation? To be more detailed, this is my first contact
Click to expand...
Click to collapse
Right now there is no windows support. The final build (which will be officially sold by Jolla) will make windows-installation possible.
If you know your way around cygwin you could probably get it to flash using windows (other than the flash.sh script there's nothing *nix-exclusive).
Is the rom stable enough for daily use ? and is Alien Dalvik available in this rom to run Android apps ?
no android dalvik or any software that needs license, this version is just community version like aosp without play store.
when flashing there's error make_ext4fs: no such file or directory, when i use the second one there's error: wrong exec format

Categories

Resources