When you compile android apps, sometimes you can see this message: -compile:
[javac] Compiling 12 source files to /home/max/Projects/Android/postphone/bin/classes
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
Now, how is possible to find the API call which seems to be deprecated?
The solution
$ ant -Djava.compilerargs=-Xlint:deprecation debug
The above command will show you what you were searching for: [javac] /home/max/Projects/Android/xxx/src/net/mx17/xxx/Yyy.java:212: warning: [deprecation] getNotification() in android.support.v4.app.NotificationCompat.Builder has been deprecated
[javac] Notification notif = notificationBuilder.getNotification();
Recently I came across a Stackoverflow question about sample code in Android SDK.
The user was asking how to import code in an Eclipse project.
I’m not using Eclipse in my Android projects so I answered with command line instructions. My development environment is based on vim and bash.
My answer was a bit off topic, but can be useful to someone else.
Let’s presume you want to compile LunarLander sample.
You need to copy the directory recursively to a new path and work on it with the android command: $ cp -r $ANDROID_SDK/samples/android-15/LunarLander .
$ android update project --path LunarLander/ --target 3 --subprojects
$ cd LunarLander/
$ ant debug install
You have to check the targets available to your system with the following command: $ android list targets
Let’s be honest: starting from zero it’s a huge process, but it’s possible.
This procedure is a bit complicated and needs some skills.
I can do (and I did) almost everything from GNU/Linux.
Prerequisites (my starting point)
a full backup done: you’ll lose your phone data
the phone must run the stock image.
Latest 2.1.1.A.0.6 SE firmware is required for bootloader unlocking procedure.
If you are running an unofficial ROM, you can check my preferred way to restore stock ROM. Firmware 2.1.1.C.0.0is reported to work, too, but I can’t confirm it
a bash script I wrote to run msm7227 from GNU/Linux. Download here
kernel image
I used U20_nAa-ics-04_2.6.29.6-nAa-ics-04.ftf
Download links on Google Code official pages. Kernel file names for our device start with “U20” string and they contain “ics” string as well
MiniCM9 ROM
I used MiniCM9-3.0.3-mimmi.zip
Download links on Google Code official pages. Be carefull, we have a device with codename “mimmi”
Google Apps (also known as gapps)
I used gapps-ics-20120317-signed.zip
You can find download links on goo.im official pages. Pick gapps for “ics”
What you’ll get
A super clean phone (no data and crappy bloatware).
One of the most recent mobile operating system: Android Ice Cream Sandwich.
All the goodies provided by CyanogenMod: the ROM I installed is MiniCM9.
Everything working great: camera, wifi etc. (I admit I have to check tethering…).
Disclaimer
I AM NOT RESPONSIBLE IF YOU BRICK / RUIN YOUR PHONE IN ANY WAY.
BASIC COMPUTER SKILLS REQUIRED.
PROCEED WITH CAUTION.
The instructions are provided only to show how reached my goal.
Please follow them at your own risk. Stop if you are not in my same situation.
Procedure summary
We have basically 3 things to do:
unlock bootloader
install custom kernel (suitable for ICS)
install ICS ROM + Google Apps
Without an unlocked bootloader, you can’t install a custom kernel.
Without a custom kernel, you can’t install ICS.
0. Copy needed files on the phone
As pointed out by Fabian in his comment, it’s safer to copy the files you’ll use at the end of the procedure when your phone is still fully functional.
So, connect the device to your pc, use it as an external storage and copy these files on the sdcard
MiniCM9-3.0.3-mimmi.zip
gapps-ics-20120317-signed.zip
1. Unlock bootloader
I presume you’re starting from the very beginning, so I think you have a locked bootloader.
To fix this situation you’ll need some software:
msm7227.7z
my script: msm7227_semc.sh
This is the most difficult and dangerous step. The risk is that the phone get bricked. Be careful.
Probably you should read the full story here. There are reported some incompatible situations. If you have never unlocked your bootloader, probably you can go on as I did.
The software you downloaded is written for Windows types of operating systems.
I rewrote the cmd script and made a bash script.
Many kudos to xda forum user “the_laser”, I just translated his work.
You have to follow these steps:
unpack archive in a new folder $ 7z x -omsm7227 msm7227.7z
uncompress and copy my script in the same folder $ mv msm7227_semc.sh msm7227/
connect the phone to an USB port
enable debug USB on the phone itself
run the script $ cd msm7227/
$ ./msm7227_semc.sh see my output
2012-08-06 16:55:43 msm7227_semc[10085] Begin
2012-08-06 16:55:43 msm7227_semc[10085] Waiting for device
adb server is out of date. killing...
* daemon started successfully *
2012-08-06 16:55:48 msm7227_semc[10085] Checking phone software version
2012-08-06 16:55:49 msm7227_semc[10085] Transferring exploit
2559 KB/s (585731 bytes in 0.223s)
2012-08-06 16:55:49 msm7227_semc[10085] Running exploit
property service neutered.
killing adbd. (should restart in a second or two)
2012-08-06 16:55:49 msm7227_semc[10085] Waiting for device
2012-08-06 16:55:52 msm7227_semc[10085] Checking root
2012-08-06 16:55:52 msm7227_semc[10085] Removing NAND MPU restrictions via SEMC backdoor. Permanent.
68 KB/s (3087 bytes in 0.044s)
success
2012-08-06 16:55:54 msm7227_semc[10085] Reboot, please wait
2012-08-06 16:56:11 msm7227_semc[10085] Waiting phone
2012-08-06 16:56:41 msm7227_semc[10085] Sleep done
2012-08-06 16:56:41 msm7227_semc[10085] Running exploit (second time)
error: protocol fault (no status)
2012-08-06 16:56:41 msm7227_semc[10085] Got error, it's normal
2012-08-06 16:56:51 msm7227_semc[10085] Checking root
2012-08-06 16:56:51 msm7227_semc[10085] Putting files for patching semcboot
172 KB/s (8064 bytes in 0.045s)
2554 KB/s (596916 bytes in 0.228s)
2012-08-06 16:56:51 msm7227_semc[10085] Writing patched semcboot. Two step process
2012-08-06 16:56:51 msm7227_semc[10085] First, we need get access to semcboot area
2012-08-06 16:56:53 msm7227_semc[10085] Second, we need to write semcboot
successfully wrote 0003ff00
2012-08-06 16:56:54 msm7227_semc[10085] Done, reboot, please wait
2012-08-06 16:57:11 msm7227_semc[10085] Done
2. Install custom kernel
You have successfully unlocked your bootloader and now you can now install a custom kernel.
You’ll need flashtool utility and the ftf image file containing the kernel to flash and the recovery software.
FlashTool
kernel image file
Follow these steps:
uncompress and untar flashtool $ 7z x -oflashtool flashtool-0.8.0.0-linux.tar.7z
$ tar -C flashtool -xf flashtool/FlashTool-0.8.0.0-linux.tar
$ rm flashtool/FlashTool-0.8.0.0-linux.tar
launch FlashTool, it’s a java tool with a simple GUI
drag on the main window the ftf file
follow the instructions
at the end the program will tell you that the phone will reboot. It’s not true, so disconnect the USB cable
wait 5 seconds
boot the phone and repeatly push the back button to enter recovery menu.
ClockworkMod must be installed and should come up.
You must see nAa kernel logo.
if CWM menu doesn’t appear you must retry with a reboot (at the moment the phone is unusable)
If you find yourself in troubles, keep in mind that everything can be repaired with a full system restore through SEUS.
3. Install MiniCM9 and the Google Apps
We are almost at the end.
At this time you have an useless phone which cannot even properly boot.
It’s time to flash MiniCM9.
If you followed all steps, you are now in ClockworkMod Recovery menu.
On the step number 0, you should have copied the files on the phone’s SD card. It’s time to use them.
If you skipped that part, you can still do the job via Recovery:
connect the phone to the pc
choose “Mounts and Storage”
choose the last item “mount USB storage”
copy the files I mentioned
umount storage from the pc
choose “umount” from Recovery menu
Follow these steps:
choose “wipe data/factory reset” than confirm
choose “wipe cache partition” than confirm
choose “Advanced” -> “Wipe Dalvik Cache” than confirm
go back
choose “install zip from sdcard” -> “choose zip from sdcard” -> find “MiniCM9-3.0.3-mimmi.zip” and confirm
choose “choose zip from sdcard” -> find “gapps-ics-20120317-signed.zip” and confirm
go back
choose “reboot system now”
The first boot can be a little slower. I saw nAa logo, than CyanogenMod boot animation for about 5 mintes, than the first use Android wizard.
Conclusions
If everything went well we reached our goal.
I found that ICS for Xperia X10 Mini Pro is fast and stable.
You can always revert back with a full restore or you can just install a different ROM.
By continuing to use the site, you agree to the use of cookies. more information
The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.