Sunday, March 16, 2014

Tutorial : Extracting Source Code From an APK file.

APK or Android Package File is a file format used to install applications on an android phone. Extended form of .apk is ZIP format.

Following steps will retrieve Java & XML/HTML source code from an apk file:

Step 1

Change the extension of apk file to .zip and then extract the zip file to a new folder. Copy the classes.dex file and follow next step.

Step 2

Download dex2jar. Extract dex2jar in a folder and paste the classes.dex file into it. Now open the cmd, change path to dex2jar folder and execute the following command “dex2jar classes.dex”. This will create a new file called “classes.dex.dex2jar”.

Step 3

Download java decompiler. Open the jd-gui and open “classes.dex.dex2jar” file created during step 2. Click on file & click ‘save all sources’ in jd-gui; this will create a new folder with java source files. Next step will retrieve the XML files.

Step 4

Download apktoolapktool install window & framework-res.apk. Put all these files in a new folder with the apk file you need to decode. Open the cmd, change path to current folder and execute following two commands back to back - 

apktool if framework-res.apk

apktool d "myapp".apk  (myapp = name of apk you want to decode)

A folder will be created containing XML files in the current folder .Merge folders created in step 2 & 5 and you will have both set of java & xml source files for that particular apk.

This method may not work for obfuscated/encrypted apks. 

Feel free to drop a message in comments section below in case of any query. Good luck! 

Saturday, March 8, 2014

Review: Samsung Galaxy Grand 2 – Designed for Humans, Priced for Aliens?

Pros: Build quality, a decent upgrade from original Grand, much improved screen, decent performance
Cons: Overpriced, Oversized, Overweight



The Samsung Galaxy Grand 2 has been launched in India in January 2014 with a price tag of Rs. 22,000. Successor of the original Grand, the phablet is powered by a Qualcomm MSM8226 Snapdragon 400 chipset, Quad-core 1.2 GHz Cortex-A7 CPU, 1.5 GB RAM, Adreno 305 GPU, 8 GB internal memory with SD card support upto 64 GB, 8MP primary camera + 1.9MP secondary camera, 5.25 inches TFT capacitive touchscreen and Android 4.3 Jellybean operating system.




The Samsung Galaxy Grand, when launched last year was an instant hit due to the premium brand ego attached to it despite of local players like Micromax etc having better products in their portfolios. Brand conscious people bought the Grand despite of poor screen and many other ups and down in the phone. It sell well, but as we know these days, the product lifecycle for a mobile phone is hardly over a year  and manufacturers have to release the next iteration no matter if it is really a worth of. Samsung launched Galaxy Grand as the successor of the successful Galaxy Grand to regain its market share in sub 20k smartphone segment. Let’s have a closer attention to Samsung Galaxy Grand 2 and find out if it is really worth the hefty price tag of 22 grands and be called as a real successor of Galaxy Grand!

Screen & Build Quality

There is significant improvement in screen & build quality. Grand 2 gets a larger 5.2” screen as compared to 5 inches of the outgoing model. Though it is still TFT type but there is significant improvement in terms of resolution & overall display quality. With a 720 x 1280 pixels resolution and pixel density of 280 pixels per inch (ppi), the screen offers nice & sharp images with decent contrast & color saturation levels. Watching movies & reading e-books on Grand 2 will be a nice experience, thanks to its big screen.






Build quality is yet another improvement in Grand 2 when compared to previous phone. The back panel gets a faux leather treatment which sheds the typical Samsung’s plasticky build quality. That also makes the phone premium to hold & feel. On the back, there is an 8MP primary camera with LED flash. The loudspeaker is placed beside the camera. Though Grand 2 is not a light phone in any sense but the thin profile hides the bulky nature of the phone. The phone is surrounded by chrome finish boundary panels. The bezel is a bit smaller as compared to 2013 Grand. Buttons including the home, back and menu are of capacitive touch types.
   
Camera, Buttons & Call/Audio Quality

Samsung Galaxy Grand 2 inherits the same 8 Megapixel shooter from the Galaxy Grand. The front camera is, however for strange reasons, a 1.9 MP unit as compared to 2 MP secondary camera of Galaxy Grand. The camera’s interface is easy to use and modified heavily to match with that of Note 3. The main camera can capture images of 3264 x 2448 pixels. It has features like autofocus, LED flash, Geo-tagging, touch focus, face & smile detection and image stabilization. It can also record 1080p@30fps videos with stereo sound. For daylight conditions, the image quality is very good. Camera also performs at par in indoor conditions but suffers from grain and noise in low light situations. The front camera is good enough for skype/hangouts video calling. Grand 2 misses a dedicated camera shutter button. Overall camera experience satisfied the photographer in me ;)






Just like a typical Android phone, Grand 2 has power button on right hand side and volume rocker on left hand side. On the top there is a 3.5 mm audio jack. USB cum charging port is located at the bottom along with noise cancellation microphone. There are couple of sensors placed near the front camera on the upper bezel. Call quality is very nice though loudspeaker could have been a tad louder. Quality wise there are no issues. Push in type earphones offers decent audio quality for music buffs.

OS/Performance and Battery

Samsung Galaxy Grand 2 has much powerful hardware than its predecessor. Under the hood lies a Qualcomm MSM8226 Snapdragon 400 chipset, Quad-core 1.2 GHz Cortex-A7 CPU, 1.5 GB RAM, Adreno 305 GPU, 8 GB internal memory with SD card support upto 64 GB and Android 4.3 Jellybean operating system. Note that even the Moto G which is almost priced 60% less of Grand 2 has same processor, chipset and GPU. Android 4.3 Jellybean performance is breeze on Grand 2. Thanks to 1.5 GB RAM there is plenty of room for apps to play with. So far there is no announcement for Android 4.4 Kitkat update but it should be out in the third quarter of 2014.




For a general comparison in terms of performance, Grand 2 is almost twice powerful than its predecessor. It scores 15374 in Antunu benchmark test and 7048 in Quadrant benchmark application. For comparison, Quadrant & Antunu score for Moto G is 8426 and 17311 respectively. Better performance in Moto G can be attributed to the fact that it is running vanilla Android version.




Grand 2 easily handles games like Asphalt, Real Racing, and Angry Birds Go etc. So far there are no overheating complaints as well for Grand 2. Samsung has heavily customized the Android 4.3 Jellybean with its Touchwiz UI which is please all offend none type of interface. While it does affects the phone’s performance but vanilla Android is not everybody’s cup of tea either.





Grand 2 has a massive Li-Ion 2600 mAh battery which easily lasts for a complete day. Very few manufacturers put the right capacity battery in very few models. Grand 2 is an example. Samsung provides 1 year manufacturer warranty for Phone and 6 months warranty for in the box accessories. .

Conclusion

While Galaxy Grand 2 ticks most of the right boxes, it has been priced absurdly by Samsung. Probably the marketing team in Samsung needs few lessons to make them aware of consumer’s expectations and market scenario. The 20k smartphone segment is spoilt for choices especially after the launch of Moto G which has already started to take over the segment by good numbers within a short period of time. Samsung Galaxy Grand 2 is not worth a purchase with a price tag of Rs. 21194 at the time of writing this text; Price Grand 2 around 17-18k to make it the segment king.

As far as value for money factory is concerned Think Digital do not recommend Samsung Galaxy Grand 2. If you have enough moolah to spend then definitely it is a good phone.

Ratings (out of 5 stars)

Build Quality ****
Screen ***
Performance ****
Value for Money **

Overall ***

Specs at a glance 

Screen
5.25 inches TFT capacitive touchscreen with resolution of 720 x 1280 pixels (~280 ppi pixel density) 
Processor

GPU
Qualcomm MSM8226 Snapdragon 400
Quad-core 1.2 GHz Cortex-A7 CPU
Adreno 305 GPU
RAM
1.5 GB RAM
Storage
8GB Internal memory + SD card support upto 64 GB
Camera
8 MP Primary camera + 1.9 MP secondary camera
Network Type
Dual SIM, Wi-Fi Hotspot, Bluetooth 4.0 GPS, GPRS/EDGE, 4G
Battery
Li-Ion 2600 mAh battery
OS
Android 4.3 (JellyBean)
Dimensions
146.8 x 75.3 x 8.9 mm
Weight
163  grams