Showing posts with label fastboot. Show all posts
Showing posts with label fastboot. Show all posts

Wednesday, December 17, 2014

Lolipop (Android v5) on Oppo Find 7(S)(QHD)

NOTE: I am not responsible for any physical damage or loss of *imporatant* data or for wasting your *precious* time. Strictly use the info provided at your own risk.

Oppo caught my eye because of the developer friendliness of the forums. And it is good that it comes recommended by various devs out at XDA. If anybody visits their forums, they would be shocked to see that the custom roms are allowed to be uploaded and discussed about equivalent to their own color os. Now, there are some glaring issues with the device

1. No unified memory(Yes, this is something many of the major brand phone users dont understand. This is becuase all their phones have unified memory). search the public network for more on this.
2. The color OS from oppo is still at JB in its stable version.
3. There is not ETA regarding the upgrade of the phone to KK or lolipop

So, what do we have here?  We have a phone with excellent hardware specs(This is pretty relative since the specs area a moving target), Good build quality and QHD resulution. The display is crisp and clear.

As concerns cooking of custom roms, oppo helps the third party devs a lot and also showers them with free devices to aid them in development. Another plus is that your warranty is not void if you flash a custom rom until you dont damage a hardware component in the process

The roadblocks in development/cooking of custom roms are

1. No Kernel sources(were available, now removed)
2. No blob bundles(as provided by sony)

But, still devs have been succesful in cooking up custom roms and have succesfully built lolipop roms using jelly bean blobs and other pieces from one plus one. So the result is we have working Lolipop roms from Nameless(based on cm) and omni. Both the forums are very active and what rom is chosen is just based on personal preference. Nameless is a bit senior here.

Getting down to business let us see how to flash custom roms on the find 7. There are various roms based on KK for the find 7(CM, PA(official device status), Nameless and many more). The general procedure to be followed can be summarized as below

1. connect the phone with coloros. In windows it will prompt for installing software of the phone. Install it. This will install the necessary drivers.
2. Shut down the phone
3. Press the up volume and power button until the phone vibrates
4. The phone will display "fastboot..." exactly at the centre of the screen
5. Connect the phone to your computer
6. Wait for windows to install the necessary fastboot drivers(required only once, later phone will be recognized immediately)
7. Open terminal . Go to the folder where you have your adb and fastboot executables
8. Run "fastboot devices"
9. This should return a serial number
10. copy the twrp and coloros recovery and rename them aptly into the folder with fastboot and adb executables
11. flash the twrp recovery run "fastboot flash recovery twrp....img"
12. unmount the phone
13. shut down the phone
14. Hold the down volume button and press the power button together until the phone vibrates
15. You will boot to twrp
16. Backup the present coloros and reboot
17. Boot the phone into coloros
18. shut down the phone
19. Press the down volume button and the power button until the phone vibrates
20. if you boot into the coloros recovery it is fine. Otherwise follow the steps from 2 to 13. But use the coloros_recovery.img in the fastboot command
21. Flash coloros v1.2.5
22. This is the version with the modem which plays well with all the custom roms out there.
23. shut down the phone
24. follow the steps from 2 to 13 and flash twrp........img
25. step 14 and 15
26. From now on you know the drill of installing a custom rom(Before installing any custom rom or coming back to color os from custom rom, do a standard wipe(cache, data, dalvik cache))
27. For me paranoid android was of choice for the find 7. The major reason is it being maintained as the "official" device
28. The other major reason being that their releases are sedate and minimal.
29. As for other things on PA check out a video made available on the oppo forums regarding PA on find 7 QHD.



You are now finished with trying and playing with custom roms and now want to return to stock. Just restore the backup you earlier made. Flash back the color os recovery. You are now ready to recieve OTA's from oppo.

Monday, August 12, 2013

AOSP on Sony xperia Z

Disclaimer: I dont take any responsibility for the damage of your equipment. If you point your ire at me, I will have the last laugh. USE THE INFO AT YOUR OWN RISK.



Sony android phone team has taken the android philosophy very seriously. This is one team within sony which is passionate w.r.t idea, philosophy and legality of FLOSS. If we compare the android and the GNU/Linux eco-system, I would sum up the relation between them by using Android/Linux for android and GNU/Linux for the desktop OS which we are familiar with. While GNU used the Linux kernel for coming up with a complete Desktop OS, Google built the UI shell and other mobile telephony stack over the Linux kernel. But, the similarity ends there.

The two components of GNU/Linux are licensed with "free as in freedom" philosophy with the GPL.(Though the linux kernel is licensed with GPL V2 and the GNU utils are mostly licensed with the latest GPL version). The source code of the original program and all its improvements are always and should be made available in source form for public consumption.

If we come to Android/Linux, the first part is licensed under the Apache license. This is a permissive licensing philosophy, wherein, the original source and its improvements "may" be provided in source form if the author wishes, or else the source can be withheld and only the binaries "may" be provided for public consumption. So, the author, google, and other mobile manufacturers who licence android from google are not compelled to share the original source code(scripted by google) or any variations of it for use by various mobile manufacturers with the general public. The result is, if google wants to put out the source for its newest shiny android version it will, if it is not in a mood to do it, then also, google is honoring the apache license. The second part, the linux kernel, is licensed under GPL v2, google and all the mobile manufacturers have to honor the license and give out the kernel with all their additions and alterations for public consumption.

This post is about sony, let us continue. Sony is the only phone manufacturer which honors the GPL for the linux kernel meticulously, it is almost like clockwork. Even if the sony mobile team has released a beta kernel for a specific device, the source is out within a week. But, But, with Xperia S, sony took their commitment to the FLOSS philosophy a step ahead. They went ahead and release the "android" portion of the OS also for public consumption, again, of course under the apache license. There your are. You have the entire gamot of source code of "Android/Linux" in your hands, now, Go Play.

Once the sony smartphone team released the source for xperia Z, their flagship phone for 2013(while other manufacturers closely guard their flagship phones for nearly a year by not releasing the kernel source which they are supposed to do with the release of the device), I had decided that will be my next phone. It does not match with my primary requirement of hardware keyboard, but, the hardware specs was awesome and the purple color was beautiful on this phone.

The XDA forums is full of various spins of upmarket roms with "n" number of customizations. You will be spoilt for choice. Only one rom of mention still struggling is the MIUI. But devs are on it and I definitely believe they will succeed in running it on the Z.

Oh, let us get back to our topic, FLOSS. Google releases the source code after baking the lates version of the android OS in-house. It is released under the label "AOSP" ie, the Android Open Source Project. This will be the most generic tree of the source. Normally, it would be difficult to compile this vanilla version as it is and run it on a phone. It would be missing the device specific code required to get it running on a specific phone. The other missing thing, vital, would be the binaries which are required to use the all the hardware(SoC) properly.

Now, we have a completely new word here, binary, yes all FLOSS enthusiasts hate it. Every manufacturer makes use of an Arm SoC or an Intel SoC. The manufacturer provides the drivers for these hardware components. But, the hardware manufacturers dont play well with the FLOSS philosophy. They guard their hardware, its implementation and usage with hawk eyes. The driver are always release in the form of blobs(Binary large objects). They have to be linked in during the compile stage of the rom to result in a fully working rom to be installed on your device.

We now have one non-freedom component on our otherwise "free as i freedom" system. But, we are somewhat ok with it.(Apologies to RMS). Anybody can compile an AOSP rom for the xperia z. The sources are at github with clear instructions for building it. You just have to have good bandwidth, patience, building on GNU/Linux (64 bit)(building on windows,..... forget it) and a lot of googling to use the experience of developers over the XDA forums.

If you dont want to compile it, An XDA developer going by the username pabx, has done it for us. Before I proceed, if you are an XDA member go and thank him. If you have a paypal account donate to him. This rom compiled/developed by him is awesome. It is one of the minimal rom I have seen and used. When I backed it up with CWM, with all my usual apps installed, the backup size was, believe it (or not), 560MB. How awesome is that. Compare it with the stock rom whic is approx 1.7GB. Now, that is light. But do remember that it is minus all the bells and whistles. It may not be visually appealing compared to the stock rom. Few quirks might be lurking here and there. My major quirks were two. One, the volume is awfully low(Stock rom with purexaudio is awesome. Hear it to believe it). Two, Plugging an earpiece without mic will result in phone calls not being audible both for the caller and the receptor. The number two problem does not exist for earpiece with mic(for eg, the sony supplied one). One more issue is the video playback. On the stock rom it is great even when the processor is underclocked to 800MHz with the hardware decoder. On the AOSP rom you have to use the software decoder for better performance.

How do we install this awesome effort on our phone?

Before you unlock your bootloader, try this tool. This is to backup the TA partition which is required for the Bravia Engine to work(Just remember that the Bravia engine comes into play when you watch a video or photographs. Otherwise the BE does not do anything during the general use of the device.) I have not tried this. But please go through the thread. It is quite big and intimidating. I did backup the TA partition but not tried to restore it back. But there are numerous examples on the thread where people have restored the TA partition and got back the BE. Please do remember that for restoring the TA, you should be back on "pure" stock(kernel and the rom).

If possible make an .ftf of your current stock rom or download one(Just in case)
Install flashtool
Install fastboot drivers from within the flashtool installation(The installer is in C:/flashtool/drivers). Double click the .exe in that folder. If you are using windows 7 or windows 8 go here)

1. Unlock your bootloader go here
2. Root the device go here
3. Install CWM recovery go here
4. Backup the stock rom with CWM recovery brief intro
5. Enter CWM and clear data, cache and dalvik cache
6. shutdown the phone
7. Connect one end of the USB cable to the computer and plug in the phone end of the cable to the phone while simultaneously pressing and holding the volume up button
8. Download pabx's effort from here
9. Extract the archive (unzip pabx_aosp_yuga*.zip) to c:\flashtool\x10_flasher_lib\
10. Open the cmd window on windows and change directory to x10_flasher_lib

run the command below
  
fastboot devices

 -- It should list the device name (not exactly the name of the device) If you get an output, then continue, otherwise you have problems regarding fastboot drivers. If you get an output, run these commands(wait for completion of the command befor entering another)

fastboot flash boot boot.img
fastboot flash system system.img

If this is an initial installation,
also run:

fastboot flash userdata userdata.img

# NOTE: The above command will wipe all your data and the internal SD card - only do this on first-install of this rom.

Now run
   
fastboot reboot  ---Or just disconnnect and reboot

Now, we have to root this rom. Download superuser and copy it to the external sd card of your device. reboot the device, press the volume up button continously as the phone reboots, you will enter CWM(the swiss army knife). Choose Install zip/Install from external sd card and choose the file.

reboot

Now you are rooted with an AOSP rom.

Now, we should boot into pure vanilla experience. Of course, you need google apps like the play store, gmail, maps etc... Download this, copy to external sd card and repeat the procedure for installing it via cwm.

reboot

You now have the play store. Go ahead and install your favorite apps.



Advanced:-

To get more realestate from your phone, edit the build.prop in /system with root explorer and change the lcd density to 320.


Operating the phone using the softkeys at the bottom of this huge phone is tricky. Install LMT launcher. start the app, start the service, click the option of start this app at boot. Then edit the build.prop in /system and add the following line at the bottom


qemu.hw.mainkeys=1

reboot

If the media players are not able to save the album details and they show empty libraries, then Edit file /system/etc/permissions/platform.xml

    Find text

    name="android.permission.WRITE_EXTERNAL_STORAGE"
        group gid="sdcard_rw"


    And replace it with
permission name="android.permission.WRITE_EXTERNAL_STORAGE"         group gid="sdcard_rw"
        group gid="media_rw"   ---> Only this line is to be added in the format exactly as in the file with the arrows and the backslashes

    Reboot

    Make it with caution. XMLs are very syntax sensitive. Any mistake may make your phone inoperable.


Thanks to all the users and fantastic devs at XDA for bringing in excitement into the phone arena. The info has been culled from various resources. If any user/dev requires a mention please comment. It will be immediately updated.

UPDATE: 12.11.2013:   Owing to un-ethical kang of pabx's rom, his builds and discussion will now happen http://www.blinkenlights.ch/ccms/android/yuga.html
He has succesfully compiled kitkat for our device. The most important of all we now have double tap to wake for our xperia z thanx to championswimmer, dev at the xda. It is now available for this AOSP rom also. For further instructions please visit the above link and also visit his thread on xda. 

Thursday, September 13, 2012

Custom Recovery and Custom roms on Dell streak 5

I nor any devs whose works we are using are responsible for any sort of damage to your phone. It is all your responsibilty!!!!!!!!!

Ok, You have a streak running Froyo(from the dell official channel). The android implementation is buggy. Lets go ahead and install the hardwork of the devs at XDA and spice up our streak.

Prerequisites

1. streak mod recovery from here  http://forum.xda-developers.com/showthread.php?t=840326
2. amss.mbn and dsp1.mbn from here (It is better to try the latest version i.e., 407)
3. Basebands with numbers starting with 4 are for Gingerbread roms(android 2.3). Be careful not to use base bands from Froyo roms(Though people liked the last of the Froyo rom i.e., 366 and are using them in GB roms)
4. fast boot and adb tools from here http://mirror2.streakdroid.com/manii/Tools/Fastboot+ADB.zip Don't install anything. If you followed the previous post every driver required is already there. Just extract it and place all the contents in a folder.
5. copy the recovery.img from step 1 and put it into fastboot+adb/.…../win32/
6. put the amss.mbn and dsp1.mbn also to fastboot+adb/.../win32/
7. Download your favourite custom rom. My favourite rom for streak 5 is by tenontex, here.
Why, because it is easy to install and is based on CM 7.2(Android 2.3.7)

His post lists out all the devs who have sweated in keeping the streak alive. Thanx to all of their endeavours. The procedure for flashing the rom is very straight forward. Once we are finished with flashing recovery, you can follow the procedure in his OP to install the ROM.

8. copy the rom longhorn2.7.zip to the root of the SD card of your device.

Power on the streak while holding the camera button simultaneously. Device will enter into fast boot mode. Now connect it to the computer. Fire up the terminal,  change directory to fastboot+adb/.../win32/ .

fastboot.exe -i 0x413c flash recovery recovery.img
fastboot.exe -i 0x413c flash dsp1 dsp1.mbn
fastboot.exe -i 0x413c flash amss amss.mbn
fastboot.exe -i 0x413c reboot

Once you run the last command, keep your fingers near the volume up and down button. Once the streak reboots and reaches the dell streak logo, press both the volume buttons simultaneously. This will take you to recovery mode. Here you ail have a black and white screen(This is the recovery of stock rom) with options namely,

1. Factory reset
2. Install update.zip ……..
3. ……

Use the volume keys to navigate up and down, Use the camera key to select. Select the second option the screen will turn to black background with blue menus. Now we are in streak mod recovery. Use volume keys to navigate and select advanced and then select nandroid and then select full backup. It will take a long time so, be patient.

Use the back key to go back to the original black and blue recovery screen. Here select update from update.zip and select "zip from sd card". Browse to the longhorn2.7.zip. choose yes in the next option. Wait the rom will get installed. From here please follow the steps mentioned in the tenontex post. Please strictly adhere to the steps mentioned there. It is "important".

Thats it. Its been a long journey, but worth it.