yashsingh1/xdaforums huggingface dataset:
[Sony Xperia P, U, Sola, Go] mohammadagha:
Watch this (Your kernel for JB in Dear Devswift1's Rom):
[Sony Xperia P, U, Sola, Go] munjeni:
:o seems I mised some lines

Please extract right cmdline from stock JB kernel.elf !
[Sony Xperia P, U, Sola, Go] mohammadagha:
No man, No end ... in kernels (Phantom, Experimental, CM10)

Sorry but i can't find it.
[Sony Xperia P, U, Sola, Go] munjeni:
Ok, than its ok!
[Sony Xperia P, U, Sola, Go] mohammadagha:
Dear Dev how can i modify ramdisk on windows?( By extracting ramdisk.gz and edit ramdisk file with notepad? How can i compile it?)
[Sony Xperia P, U, Sola, Go] dotafan:
+1

Also someone please tell me from where to extract ràmdisk after making changes

Thanks

Winter is Coming
[Sony Xperia P, U, Sola, Go] mohammadagha:
I'm going to install Ubuntu right now :laugh::good:

http://xdaforums.com/showthread.php?t=1477845
[Sony Xperia P, U, Sola, Go] jonathan240196:
I tried the tutorial of munjeni with CM10.1 but it does not work for me.

Error: Something went wrong, please see log!
[Sony Xperia P, U, Sola, Go] munjeni:
TOOLS FOR ANDROID ALL IN ONE

Simple use our tools in your android, no need debian ...etc :)

You have error in settings.ini !!! Please double check them!

Simple extract them and repack in your phone directly! Tools is in attacment! Install tools to your system/bin folder and use them in your android. Put ramdisk for example to data/local/tmp directory, use tools for packing-repacking, use android notepad for editing rc files (or simple download them with adb pull blabla)...etc

to pack ramdisk simple do:

mkbootfs ./ramdiskdir | gzip > initrd.gz

to unpack ramdisk do:

mkdir ramdiskdir && cd ramdiskdir && gunzip < ../initrd.gz | cpio -i -d

Allso you no need perl and sony tool for making elf based boot image, I tried standard android format boot.img and got it working -> http://xdaforums.com/showpost.php?p=44378219&postcount=21

mkbootimg and unpackbootimg for android is in attachment
[Sony Xperia P, U, Sola, Go] cesanaboia:
video

make a video please :(
[Sony Xperia P, U, Sola, Go] mohammadagha:
I am complitly lost. Do i need to extract ur zip atachment and put files in system/bin ? Then how can i install them? Also i get permission denied in Terminal emulator on my device, Can i use cmd in x:/sdk/platform blabla/ on my pc to command my device?. I know this questions will make u angry because i dont belong to dev threads but i'm really want to test ur works (all of them :D )

I have many other question (Like what we have to do when we dont have this'end lpj=24019' in our device's kernel? And when we clone that ext4 files we will have only 700Mb free on sdcard,what can we do for that? How can we copy more than 2 roms when we have just 700MB?.....)

So,Do u think i have to leave here and i cant try this boot menu?
[Sony Xperia P, U, Sola, Go] munjeni:
How to install to system/bin?? Simple "adb remount", than "adb push file_blabla /system/bin/"

Permision denied? Simple "chmod 755 /system/bin/all_files_blabla"

700mb?? What;s size of xperia u internal sd card? Maybe you need to clone only system partition but make data 300mb + cache 50mb

lpj=24019 ?? Not needed because all U kernels have no these end lpj=24019
[Sony Xperia P, U, Sola, Go] dotafan:
He said we can customize the size of the clones according to our needs

Dev

Can we use the root directory to make a clone? I got like 1.5gb free there,and everyone else must have at least 1 GB

Also, if we could make a clone in the space reserved for àpps it'd be good,cause 1gb is enough IMO for apps

I myself have never used more than 600mb for apps :confused::(

Winter is Coming
[Sony Xperia P, U, Sola, Go] munjeni:
Hmm, seems good idea! I think these will be posible, for example you can move data.ext4 file to these partition, than modify ramdisk by this way:

- see post 36 and blue line for idea

- replace blue line with partition where you stored *.ext4 file

- than replace lines "mount ext4 loop@/sde" with mount ext4 loop@/new_path_you_mounted

I have another ideas related to partitioning for example emmc data partition, but not sure if these is posible? If thats posible than I think we no need to use loop devices. Maybe we can repartition emmc and make doubled data and cache partition?

Where is root? Is partition?
[Sony Xperia P, U, Sola, Go] jonathan240196:
Don't works :'( The settings.ini is Ok! :'(
[Sony Xperia P, U, Sola, Go] dotafan:
Root directory

"/" which contains system, etc in a Rom dev

Also,

As I understand, we are loading the Rom which we want to run, in the partition clones isn't it?

Could it be possible to load via otg, so we don't have to carry rom in phone? Or via pc?

Winter is Coming
[Sony Xperia P, U, Sola, Go] munjeni:
Hey, repartitioned my emmc :):):)

DO NOT TRY IF YOU WAN'T TO BRICK YOU DEVICE !!!!!!!!!!

deleted 10,11,12,13,14 partitions from mmcblk0 and created new 5 new LOGICAL partitions, now my emmc have:

Sdcard have 5,7 GB :cyclops:

PLEASE DO NOT TRY AND ALLSO PLEASE DO NOT ASK ME FOR HELP IF YOU BRICK YOUR PHONE!!! I WILL NOT BE RESPONSIBLE FOR ANYTHING, YOU DOING EVERYTHING FROM OUR THREAD ON YOUR OWN RISK !!!!

Just want to say: repartitioning is possible :) Allso I can make a lot more partitios with smaller size. If you going to try (on your own risk!!!) DO NOT TOUCH PARTITIONS < 10 !!! You might hard brick your emmc/phone !!!
[Sony Xperia P, U, Sola, Go] munjeni:
Wau guys :) Android installed to new partitions and working without any problem!

Will try to resize 10,11,12,13,14 partitions to an minimum and make new 15(system2),16(data2),17(cache2) partition for seccond android... will let you know soon if these thing working!

Now my phone partitions sizes:

There is a lot of unused spaces! :laugh: For example data partition have free ~500mb, cache partition have ~100mb, system have ~200mb...

500+100+200=???? ==seccond android :D

Please give me output of command:

adb shell df
[Sony Xperia P, U, Sola, Go] munjeni:
1. Root is in ram memory, so after rebooting everything which was in ram was deleted, so you can not use root!

2. you loading android from file based partitions (previously stored on your sdcard)

3. no because partitions (file.ex4) must exist and must be loaded to loop device! Will be posible only storing them in ram memory, but since we have 512mb memory thats not posible (not enought space in ram):(
[Sony Xperia P, U, Sola, Go] munjeni:
More that 14 partitions can be created but deleted by bootloader after reboot :( But good thing my internal sdcard have 5.8 GB :D now more enought for 3 boot.

Curent partition table:
[Sony Xperia P, U, Sola, Go] --N7--:
hi there!

would you mind to make one complete tutorial ?PLZ!

im really want to have A full working boot menu!but i completly lost with your explains!

and one more thing!

if i get that right you said that we can change the capsivity of sd card from 3.89GB to 5.7GB!

is that right can we do such a thing?

and sorry for my bad english!
[Sony Xperia P, U, Sola, Go] XperianPro:
Waiting for repartition tut...

Anyway I think data partition is 2 gb and system 1 gb,splitting them for new OS would be really usefull.
[Sony Xperia P, U, Sola, Go] munjeni:
Fdisk :) Delete always last partition (14,13,12,11,10), than

n

l

last block from 9 + 1

End of new partition (do not use last block of emmc, simple try for example 20000, than p to see partition list, if you not satisfied simple delete with d, try again...until you are satisfied)

n

l

...etc until you create all

Than

t

83

t

83...etc

last partition (vfat) t b

And finaly display table by p, if you are satisfied, write w, reboot, if not satisfied simple d command again (delete)...use w only at finish! Reboot...

Boot again and make_ext4fs every partition, last partition (vfat) simple mount with recovery to your computer and format to fat32
[Sony Xperia P, U, Sola, Go] jonathan240196:
Does anyone can tell me how to make a dual boot CM and MIUI please?
[Sony Xperia P, U, Sola, Go] Randy Edge:
You can't i guess. You can only dualboot stock with a custom rom as per my knowledge.
[Sony Xperia P, U, Sola, Go] jonathan240196:
And where to find a JB Stock ROM on Xperia U? ... Thank you for your help :)
[Sony Xperia P, U, Sola, Go] JohnLouise:
Is it possible to multiboot via usb otg? [MENTION=4120742]munjeni[/MENTION]
[Sony Xperia P, U, Sola, Go] dotafan:
No! Ext4 partition will exist, but can the rom to be installed be stored in the pc?

Somewhat like ftf, just we install from pc instead of flashing,we load the Rom into respective .ext4 partitions?

Winter is Coming
[Sony Xperia P, U, Sola, Go] AGONTUK:
Successfully booted to BootMenu. CWM is working. A simple thanks wouldn't be enough to appreciate ur works bro :)

How to apply the kexec patch to the kernel ? You said to look into your git but I'm having problem understanding the github since I'm no dev. Can u pls explain ? Also.........

1) U system has 1gb space. So If I want to use, say CM rom & slim rom which would take only around 300MB, they can be easily stored inside system partition itself without using sdcard or phone storage. So is it possible ?

2) Let's say I have only one rom. So if I want to know another rom, how can it know which partition to use since I've created multiple partitions. Just modifying the updater script is enough ?

3) Again let's say I have now 2 roms installed. When I power on the device, I got into bootmenu. From there I can use your touch recovery. But the 2 roms have also their own recovery in kernel. So will I have 3 recoveries ??

I'm still in learning phase so don't get mad bro :)
[Sony Xperia P, U, Sola, Go] munjeni:
You can load rom from pc but thats very compilcated! For example you can mount network share at boot time but if you disconect your pc, your phone will reboot! You need to modify ramdisk (example) to use cifs and nls for network mounting, but thats not practic, your phone must stay with pc than because you mounted network folders!
[Sony Xperia P, U, Sola, Go] munjeni:
Simple install miui, than clone system partition, than create data and cache partion, than modify ramdisk to use loop devices and finaly compile ics kernel previously kexec patched, than add your miui to settings.ini. Next thing. Chose primary rom. You can install whatewer you want because boot menu will boot everything, cm9, cm10, gb, ics, miui...blabla (kernels must be kexec patched to get it to work), install these rom, extract zImage and initrd.gz from boot.img of these rom, modify ramdisk, add primary rom to settings.ini, you are done. You can create max 10 roms

For CM. CM after compilation have allready created system.img, data.img, cache.img, so if you compiled cm from source you no need to create partitions, simple put these .img (ext4) files to sdcard, modify ramdisk to boot them from sdcard...
[Sony Xperia P, U, Sola, Go] estape11:
This will can work in Xperia P? :crossfingers:
[Sony Xperia P, U, Sola, Go] munjeni:
If you have no experience with git or compilations, than simple search google and learn!

1. recomended is storing them to sdcard

2. yes, simple modify updater script and recovery will install your rom to these defined partitions from updater-script

3. yes you will have 3 recoveries :) You can remove recoveries from ramdisk if you no need these recoveries :)
[Sony Xperia P, U, Sola, Go] munjeni:
Yes! I stoped development for P 6 months ago and not updated my kernel for P and allso not updated recovery for P, so you can make small changes to kernel and small changes to cwm and small changes to boot manu and these things will work on P. Source code is on my git, simple download and compile, I will not support P, sorry !

Allso I going to sell my Go soon and buy new phone, very soon, so all developments will stop for Xperia devices
[Sony Xperia P, U, Sola, Go] mohammadagha:
Dear Dev are u going to make a complete guide for noob guys (like myself) or this thread belongs to devs or pro users?

Whaaaaat??? Then all of us have to sell it.Do Not do that please. We will die man.
[Sony Xperia P, U, Sola, Go] munjeni:
Be patient mate, I am sure experienced users will get them working in his device and make full tutoriall. Allso I am sure some one will upload complete working sdcard builds and share them will non experienced users!
[Sony Xperia P, U, Sola, Go] munjeni:
Yes, for example from external usb storage, but if you remove usb storage than your device will reboot!
[Sony Xperia P, U, Sola, Go] kedar512:
Which new phone you gonna buy?
[Sony Xperia P, U, Sola, Go] dotafan:
[MENTION=4120742]munjeni[/MENTION]

So, I did everything, when i select ROM, it says kexecing and then reboots, i get a black screen, then again reboot to menu. Is this because i used zImage from CWM.rar and it is not compatible with my current Rom? Will i have to wait for a kexec patch to be applied to zImage?

I am using DevSwift's v4 JB Unofficial stock Rom. I am attaching kernel.elf link here and if possible can someone attach kexec patch to it? Thanks.

CWM recovery included works very well! Thanks a lot!

https://www.dropbox.com/s/ula4dtctedebzsj/kernel.zip
[Sony Xperia P, U, Sola, Go] mohammadagha:
htc one mini or similar device, Right [MENTION=4120742]munjeni[/MENTION] ?
[Sony Xperia P, U, Sola, Go] alematt:
Very very bad news for Xperia owners! Sad to hear that :'(

Sorry for ot but I had to say that

Inviato dal mio Xperia U usando Tapatalk 4
[Sony Xperia P, U, Sola, Go] munjeni:
You can not use JB zImage provided in cmw.rar with MIUI v4 !!! MIUI v4 is ICS based! You need to compile ICS kernel kexec patched!
[Sony Xperia P, U, Sola, Go] munjeni:
HTC One Mini is good but have no external sd slot :(, not sure which one i will buy, searching...
[Sony Xperia P, U, Sola, Go] mohammadagha:
Whyyyyyy One mini??? http://www.gsmarena.com/compare.php3?idPhone1=5204&idPhone2=5505
[Sony Xperia P, U, Sola, Go] tefal78:
the trick is to buy same same phone as him.

:laugh:
[Sony Xperia P, U, Sola, Go] dotafan:
I'm using it with JB stock Rom itself!

Winter is Coming
[Sony Xperia P, U, Sola, Go] kedar512:
My cousin has bought xperia SP.Its awesome.Never lags.You can buy it.:)
[Sony Xperia P, U, Sola, Go] dotafan:
Booted into primary Rom via Boot Menu!!!1 :D:D:D:victory::victory::victory:

Will try second rom and report tomorrow!

Attaching Video :D:D

(Sorry I couldn't upload to youtube :))

https://www.dropbox.com/s/8izicdnova837vp/VID_20130827_220147.3gp
[Sony Xperia P, U, Sola, Go] mohammadagha:
Would U please tell me how did u do that?

I cant modify ramdisk.
[Sony Xperia P, U, Sola, Go] dotafan:
I used original ramdisk directly. With original ramdisk it atleast boots from boot menu.Had some problem in the modified one

Bt I haven't installed another Rom yet so I don't know how that affects other things:(

Winter is Coming
[Sony Xperia P, U, Sola, Go] mohammadagha:
I had put this files in system/bin and changed permission to rwx r-x r-x for all of them.

and when i try to enter this codes:

in emulator (on my device), I face this errors:

Did I miss anything?

+ [MENTION=4120742]munjeni[/MENTION] please don't kill me.
[Sony Xperia P, U, Sola, Go] munjeni:
You must be root! Before any thing enter su command and press enter, you will se # than continue...
[Sony Xperia P, U, Sola, Go] dotafan:
I recompiled initrd.gz

Device was stuck at Sony logo.

Is this because it tried to boot from cloned system partition and as I didn't have anything there, it couldn't boot? Could anyone tell me how to install my Rom to the cloned partition? Having problems with updater script modifications

I am attaching initrd.gz if anyone wants to verify if it is wrong

Thanks
[Sony Xperia P, U, Sola, Go] mohammadagha:
I had put 'ramdisk' (extracted from ramdisk.gz with winrar) in /data/local/tmp/

Then tried this in terminal emulator:

su

mkdir ramdiskdir && cd ramdiskdir && gunzip < ../initrd.gz | cpio -i -d

result:
[Sony Xperia P, U, Sola, Go] XperianPro:
Type su first.
[Sony Xperia P, U, Sola, Go] mohammadagha:
Read again please.
[Sony Xperia P, U, Sola, Go] AGONTUK:
i think he is right. If u typed su first then the path should be root@android:/, not u0_a168@android:/
[Sony Xperia P, U, Sola, Go] mohammadagha:
Read Again 2

Terminal Emulator:

su (enter)

root@android:/ # mkdir ramdiskdir && cd ramdiskdir && gunzip < ../initrd.gz | cpio -i -d (enter)

result:
[Sony Xperia P, U, Sola, Go] AGONTUK:
I can read but your path isn't changing, that's strange. OK, u can do it this way.....

1) place your ram_disk.gz in sdcard.

2) from terminal type mkdir /sdcard/ramdisk and then cd /sdcard/ramdisk

3) now type gunzip < ../ram_disk.gz | cpio -i -d

hope it helps
[Sony Xperia P, U, Sola, Go] mohammadagha:
1 question:

I have experimental kernel (experimental.img) i'm going to rename it to blabla.elf and extract it with flashtool, Then i will have blabla.ramdisk.gz

can i use this blabla.ramdisk.gz????

Result:

+ Files in Sdcard/ramdisk/
[Sony Xperia P, U, Sola, Go] AGONTUK:
It should work. munjeni bro provided another tools for these in post 64. About the result I'm also getting these. Maybe munjeni bro will shed some light on it :)
[Sony Xperia P, U, Sola, Go] dotafan:
Dev [MENTION=4120742]munjeni[/MENTION] you said we couldn't create system partitions and had to clone them, I managed to create one. Do you think we can use this? How do I modify code?

Will this suffice?
[Sony Xperia P, U, Sola, Go] nickholtus:
1 tip, look at the dual boot method used for the xperia play, there you can find(in the source) how to create the system data partition on sd.
[Sony Xperia P, U, Sola, Go] dotafan:
But I did manage to create one with the commands used for data and cache partitions by munjeni! :confused::(
[Sony Xperia P, U, Sola, Go] munjeni:
No! Never use VFAT partitions for these thing because all files will lose owner and perm! Instead of these vfat beter is use /data/local/tmp:

adb push ramdisk.gz /data/local/tmp

adb shell

cd /data/local/tmp

mkdir ramdisk

cd ramdisk

gunzip < ../ramdisk.gz | cpio -i -d

You will have extracted ramdisk in /data/local/tmp/ramdisk folder! For packing simle do:

cd /data/local/tmp

mkbootfs ./ramdisk | gzip > initrd.gz

initrd.gz will be created in /data/local/tmp

For example, you want to edit init.rc file, simple download them to your computer, edit and put back to ramdisk folder:

pres ctrl+c to exit from adb, than download for example init.rc:

adb pull /data/local/tmp/ramdisk/init.rc

or to put back to ramdisk folder:

adb push init.rc /data/local/tmp/ramdisk/

About text editor:

make sure save your file in unix/utf8 format! Do not save them in dos/utf8 because linux need text in unix format, not windows (dos) format! If you save in dos format your ramdisk maybe will not fork! I am using pspad text editor for linux things.

Yes! And allso, main rom (default rom which is installed regulary to emmc) no need ramdisk modification, simple extract ramdisk from boot image. All other androids which is not on default location (emmc) will regure ramdisk modifications (provided in tutorials)!

Thats not problem, I allso can create sysrtem partition but these partition not working, have boot loop! For cache and data you can create without problem!

Will be big help if you provide part of the tutorial here for system partition creation!
[Sony Xperia P, U, Sola, Go] AGONTUK:
thanks bro. I didn't know that. Anyway I did it your way but the extracted folder is same as before when I placed in sdcard. All the folders except sbin and res are empty. Is it ok ?

Also I posted about a problem in ur kernel_dump/make thread. Maybe u didn't notice so I'm going to post it here....

When I use kernel_dump to dump boot.img in a non existing folder, it says "FAILURE to create output folder /data/local/tmp/ramdisk/disk! Pllease try another folder!"

If I use a existing folder it says "FAILURE to dump boot.img to /data/local/tmp/ramdisk! Pllease try another folder!"

What am I doing wrong ?
[Sony Xperia P, U, Sola, Go] munjeni:
New version of these tools is in our thread! I allso noticed these thing by using these tools (old version)! Simple search in our thread for new version!
[Sony Xperia P, U, Sola, Go] dotafan:
Dev, can you please upload the updater script you used to install the ROM to these partitions for our reference please? Thanks a lot

Winter is Coming
[Sony Xperia P, U, Sola, Go] nickholtus:
Hi [MENTION=4120742]munjeni[/MENTION],

I will search for it, from what i remember is that he implented it into the boot menu so you could chose to clone the system and data partition from internal to sd and then install an other on internal and you had an option to make "clean" partitions on the sd, where you could install rom zips on (he used 4 recovery.fstab files for that, 4 slots for multiboot, so recovery could mount the loop partitions)

edit:

he used this for making loop partitions:

makeimage()

{

if [ "$3" == "system" ]; then

IMGSIZE=$4

rm /turbo/system$2.ext2.img

dd if=/dev/zero of=/turbo/system$2.ext2.img bs=1K count=$IMGSIZE

mke2fs -b 1024 -I 128 -m 0 -F -E resize=$(( IMGSIZE * 2 )) /turbo/system$2.ext2.img

tune2fs -C 1 -m 0 -f /turbo/system$2.ext2.img

elif [ "$3" == "userdata" ]; then

IMGSIZE=$4

rm /turbo/userdata$2.ext2.img

dd if=/dev/zero of=/turbo/userdata$2.ext2.img bs=1K count=$IMGSIZE

mke2fs -b 1024 -I 128 -m 0 -F -E resize=$(( IMGSIZE * 2 )) /turbo/userdata$2.ext2.img

tune2fs -C 1 -m 0 -f /turbo/userdata$2.ext2.img

fi

}

and this to clone:

copyimage()

{

mkdir /dest

if [ "$3" == "system" ]; then

mount -t yaffs2 -o ro /dev/block/mtdblock0 /system

mount -t ext2 -o rw,loop /turbo/system$2.ext2.img /dest

cp -a /system/* /dest

umount /system

elif [ "$3" == "userdata" ]; then

mount -t yaffs2 -o ro /dev/block/mtdblock1 /data

mount -t ext2 -o rw,loop /turbo/userdata$2.ext2.img /dest

cp -a /data/* /dest

umount /data

fi

umount /dest

rm -f -R /dest

}

with a good sd-card there wasn't any difference in read/write speed, so that's also fine.

edit 2: here is the kernel source, with the used ramdisks for the xperia play (he used an aroma based dual boot menu, if you want to use that too, please contact me, as there are some problems on xperia 2012 models, i know how to solve it): https://github.com/cosmicdan/Xperia-2011-Kernel-2.6.32.9-KRsH

Nick
[Sony Xperia P, U, Sola, Go] AGONTUK:
It worked!!! BTW, I'm already using latest tools that u posted here. I was using sdcard to dump the file so that's why it didn't work maybe :o

Edit: How can I remove cwm recovery from ramdisk since I'll be using yours :) . which file do i need to delete ?

Also does cmdline vary with kernel ? I tried matching cmdline from phantom kernel, slimbean kernel, devswift1's cm10.1 kernel but they all vary in some of the values.
[Sony Xperia P, U, Sola, Go] munjeni:
How to make new rom? Asume you have created sustem,data,cache partition. Dirty way:

reboot to recovery. Establish adb connection, mount system.ext4 to loop1, , than mount -t ext4 /dev/block/loop1 /system , than cd to /system folder and delete everything but do not delete folder lost+found, you done cleaning system partition. Next step(install rom to these partition is easy): simple remove every each line which contain "mount" or "format" from updater-script, put these modified zip to sdcard and simple install, done :) It will install rom to your system.ext4 :p If you removed "unmount" line than do not forget to umont system partition trought adb shell !

I think thats ext2 but not ext4! We want ext4!

Simple remove line "exec /sbin/bootrec" and no need to remove recovery, recovery will be disabled!
[Sony Xperia P, U, Sola, Go] nickholtus:
It should also work for ext4 file system, just give it a try
[Sony Xperia P, U, Sola, Go] munjeni:
Since every rom have CWM builtin, we can reuse these cwm more user friendly! Figured out some thing for ICS boot proces from sdcard, so figured out some "better idea" things... will provide you more info soon ;)
[Sony Xperia P, U, Sola, Go] munjeni:
No mate, I tried allready and having boot loop, so only get solved these boot loop after cloning system partition :( And allso no, in your previous post I can see thats ext2 filesystem so we can not use them as a ext4 ! I want to figure out system.ext4 image creation instead of using cloned one!