Advertisement
SnoutBaron

Adding Dual Window support to any APK.

Oct 23rd, 2015
3,312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.45 KB | None | 0 0
  1. Thanks to A_U on XDA (http://forum.xda-developers.com/showthread.php?t=2213985) for SignApk.
  2.  
  3. =Restrictions:
  4. -You must be able to get the APK you want to modify.
  5. -Windows PC with Admin rights.
  6. -Ensure JRE/JDK 1.7+ is installed.
  7.  
  8. =To get an APK:
  9. -The easiest way to get an APK is to download an app called AirDroid which will allow you get most of the APKs off your device. (http://androidwidgetcenter.com/android-tips/transfer-apk-android-pc-airdroid/)
  10. -Another way is to use sites that are able to get APKs straight from the PlayStore. Google it.
  11.  
  12.  
  13. =Download ApkTools:
  14. -BAT file (Right-click page and "Save As"): https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/windows/apktool.bat
  15. -ApkTool (Download latest, 2.0.2 at time of writing): https://bitbucket.org/iBotPeaches/apktool/downloads
  16.  
  17. =Download SignApk: http://forum.xda-developers.com/attachment.php?attachmentid=1846095&d=1364661948
  18.  
  19. =Decompiling/modifying/building.
  20.  
  21. 1: Copy the downloaded BAT and JAR to C:\apktool. Rename JAR file to "apktool".
  22. 2: Copy the APK you want to decompile to the apktool folder.
  23. 3: Open up CMD (with Admin rights) and navigate to apktool folder using "cd c:\apktool"
  24. 4: To decompile the APK, in CMD type: "apktool d name_of_apk.apk" (Example: apktool d reddit.apk)
  25. 5: Modify what you need in the folder created in the apktool folder (folder will be named the same as the APK)
  26. -This is where you edit the manifest file using a text editor, I recommend NotePad++. Follow this to add Dual-Window to your app: http://developer.lge.com/resource/mobile/RetrieveOverview.dev?categoryTypeCode=ANRS#RS00000848
  27. 6: Build the APK. In CMD type: "apktool b name_of_folder" (Example: apktool b reddit)
  28.  
  29. =Signing. Apps must be signed before they can be sideloaded on a device.
  30.  
  31. **It has come to my attention that signing can break updates due to the certificate not matching the original certificate for the app and thus the certificate on the store. Updates from the store may not be possible due to the certificate. You may have to uninstall the app and reinstall it from the store in order to update. I will try find a way to work around this (I doubt there will be one) and I will update this text file.**
  32.  
  33. 1: Unzip SignApk and copy the contents to C:\SignApk folder.
  34. 2: Copy the APK you want to sign to the SignApk folder. The APK you just built can be found in "C:\apktool\name_of_app_folder\dist".
  35. 3: Open up CMD and navigate to SignApk folder using "cd c:\SignApk"
  36. 4: To sign the APK, in CMD type: "java -jar signapk.jar certificate.pem key.pk8 name_of_apk.apk name_of_signed_apk.apk"
  37. (Example: java -jar signapk.jar certificate.pem key.pk8 reddit.apk reddit_signed.apk)
  38.  
  39. =You can now sideload the signed APK.
  40.  
  41. =The Play Store may not detect new updates for your app due to the custom signature.
  42.  
  43. =You will have to do this everytime if your app is updated from the store.
  44.  
  45. =If you are getting an error when installing the signed app ("Application not installed"), uninstall the original app then install the new signed app.
  46.  
  47. =The best solution to implementing Dual Window is to email the devs of your favourite apps and let them know how easy it is to implement Dual Window so that they can officially support it. Link them the LG Dev page I have linked, a screenshot of the app running in Dual Window and let them know about any bugs or issue caused (if any, there really shouldn't be beside UI issues) by Dual Window so that they can easily implement this feature. Thanks.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement