Di Posting Oleh : Crew Blog
Kategori : 2016 Android Android Developers Android N Freeform Preview SMARTPHONE TABLETS
Google has been experimenting with Freeform Mode on its latest Android N Preview. The code to support this feature is already present in the upcoming Android OS however not been made available to public yet and is currently a hidden feature.
What is Android N Freeform Mode?
Freeform Mode feature listed hidden in the upcoming Android N Preview release is a way of enabling floating application screens on Android. You would have already seen similar feature present in a standard Desktop PC running Windows OS or the Mac OS. The Freeform Mode enables its users to resize the application windows and move it around the screen.
If you are interested in enabling the Freeform Mode in Android N, you should know that you need to have knowledge of flashing the images onto your Android device to make this work. If you happen to have obtained Android N Preview release through the Google's official "Beta Release" over the air update, then this method might not be suitable for you. Enabling Freeform mode would tamper your device's stock image and hence any future OTA updates coming in from Google will not be applicable to your device until you revert back to the original untampered Android N Preview image.
How to enable Freeform Mode in Android N Preview?
IN order to enable Freeform Mode on your Android N Preview release device, you first need to flash a recovery image from TeamWin Recovery Project (TWRP). You need to visit the repository and locate the applicable recovery image for your Android device and copy the image to your Android SDK Tools directory.
Plug your Android device into your PC through an USB cable. You then push your Android device into recovery mode using the standard Power + Volume key down button while rebooting the device. This would force your device to enter into fastboot screen.
Now on your PC, open up a command line terminal and type the command:
fastboot flash recovery [TWRP image name]
This would now start flashing the TWRP image onto your Android device. Once the flash is complete, boot into recovery mode by holding volume keys and selecting "Recovery" mode through the Power button.
Now that you are in Recovery mode, press the "Mount" button and check "System box" forcing your system partition to be mounted as a writable partition.
Now, fire up your adb shell from your PC and enter the following command:
cd /system/etc/permissions
sed -e "s/lvie_wallpaper/freeform_window_management/" android.software.live_wallpaper.xml
freeform.xml
This should now enable Freeform Mode on your Android N Preview release.
Now if you reboot your Android device to enter normal boot mode and once the Android N Preview release OS is up and running, you can open up your application apps and notice a tiny square button alongside the close[x] button of your Android app. Clicking this square button should enable Freeform Mode on your Android app.
Happy tinkering!