Advertisement
eudemonics

README file for the HALF-ASSED ONEPLUS ONE TOOLKIT v1.3b!

Aug 24th, 2014
489
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.81 KB | None | 0 0
  1. ##################################################################################
  2. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  3. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  4. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  5. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7~~~~~~~~~~~~~~~~#
  6. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7~~~~~~~~~~~~~~~~#
  7. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7~~~~~~~~~~~~~~~~#
  8. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7~~~~~~~~~~~~~~~~#
  9. #~~~~~~~~~~~~~~~~ 77~~~~~~ 7~~~~~~~~#
  10. #~~~~~~~~~~~~~~~~ 7~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7~~~~~~~~~~~~~~~~#
  11. #~~~~~~~~~~~~~~~~ 7~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 7~~~~~~~~~~~~~~~~#
  12. #~~~~~~~~~~~~~~~~ 7~~~ HALF-ASSED ONEPLUS ONE TOOLKIT ~~~~~ 7~~~~~~~~~~~~~~~~#
  13. #~~~~~~~~~~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~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  39. ##################################################################################
  40.  
  41. LICENSE AGREEMENT & DISCLAIMER
  42. copyright (C) 2014 vvn <vvn@eudemonics.org>
  43.  
  44. This program is FREE software: you can redistribute it and/or modify
  45. it as you wish. Copying and distribution of this file, with or without modification,
  46. are permitted in any medium without royalty provided the copyright
  47. notice and this notice are preserved. This program is offered AS-IS,
  48. WITHOUT ANY WARRANTY; without even the implied warranty of
  49. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  50. GNU General Public License for more details.
  51.  
  52. For more information, please refer to the "LICENSE AND NOTICE" file that should
  53. accompany all official download releases of this program.
  54.  
  55. HALF-ASSED ONEPLUS ONE TOOLKIT by vvn
  56. VERSION: 1.3 STABLE
  57. RELEASE DATE: AUGUST 30, 2014
  58.  
  59. this is a very half-assed project, as you might assume from the name of it, and i cannot guarantee fast or frequent updates. i will continue updating and adapting the application to support the latest official updates from both OnePlus and CyanogenMod11S, and will make every attempt to enable as much backwards-compatibility as possible. when something is NOT backwards compatible (such as re-unlocking your bootloader on firmware versions newer than XNPH25R), i will include an emphasized warning in the app itself before the command execution.
  60.  
  61. REQUIREMENTS FOR SCRIPT TO WORK:
  62. * opotoolkit.py is the main script. that's the one file you REALLY need.
  63. - get it here: http://pastebin.com/y511TjV1 -or- here: http://notworth.it/opo/opotoolkit.py
  64. * my PYADB library needs to be in the same directory as filename "pyadb.py".
  65. - get it here: http://pastebin.com/7VSpinAz -or- here: http://notworth.it/opo/pyadb.py
  66. * obviously, you'll need python 2.7. download python here: https://www.python.org/downloads/
  67. * you need ADB and FASTBOOT from the android SDK. download the SDK here: https://developer.android.com/sdk/
  68. * finally, you need an OS that supports Python and the android SDK, which I'm afraid narrows it down to:
  69. - Linux (all flavors)
  70. - Mac OSX (exotic jungle cats and beyond)
  71. - Windows (pretty much all releases, or starting from whichever one could support Python.)
  72. i apologize for limiting your options like that.
  73.  
  74. you can either put the scripts and other files in the same directory as your android SDK,
  75. or set an environmental path variable for your android SDK directory.
  76.  
  77. ##################################################################################
  78.  
  79. SETUP FROM ZIP BUNDLE DOWNLOAD:
  80.  
  81. unzip files to new directory, like "1PLUS1TOOLKIT"
  82.  
  83. *IMPORTANT*
  84. if you haven't installed ADB or setup an environmental path variable, you may want to use the included ADB and FASTBOOT binaries. if you're on windows or mac OSX, you can leave as is. if you're on linux, you'll want to rename "adb" to "adb-mac" and "fastboot" to "fastboot-mac", then rename "adb-linux" to "adb" and "fastboot-linux" to "fastboot."
  85.  
  86. ##################################################################################
  87.  
  88. SETTING UP AN ENIVIRONMENTAL PATH VARIABLE (HIGHLY RECOMMENDED):
  89.  
  90. if you're on windows you can go to my pastebin (pastebin.com/u/eudemonics), find the only powershell
  91. script on there, and steal/adapt the code to create your own environment path variable. but it's much
  92. easier to configure in system properties - i'm not on windows right now so these may not be exact
  93. instructions, but you should be able to right click on "my computer", select "properties", go to the
  94. "environment" tab in system settings, and add the environment path there. linux and OSX users just need
  95. to add the android SDK directory to their ~/.bash_profile or ~/.bashsrc or wherever environment paths are
  96. defined. if you still don't understand environmental path variables or symbolic links, i highly recommend
  97. google (or startpage.com, the private version).
  98.  
  99. if you don't want to go to the trouble of creating the environmental path variables, and you want to use
  100. the android SDK on your computer, then just extract all the files from the ZIP into your android SDK directory.
  101.  
  102. ##################################################################################
  103.  
  104. HOW TO RUN THE TOOLKIT:
  105.  
  106. plug phone to computer via USB, turn on android debugging.
  107.  
  108. open command prompt or terminal window to scripts directory. start toolkit by entering:
  109. "python opotoolkit.py"
  110.  
  111. if everything is installed and in the right places, you should see a menu like the attached screenshot. if for some reason you get a permission denied error, try launching the command prompt or terminal as administrator or superuser.
  112.  
  113. i'll continue working on it and adding more when i can so keep checking this space. everything's open source; use, share, steal whatever you want from the code. some credit would be nice, though.
  114.  
  115. you can use the pyadb.py library to incorporate adb/fastboot commands into your own python projects. i'll be adding more features to that, but for now most of the common features are covered.
  116.  
  117. USE AT YOUR OWN RISK. i am not responsible for any damage to your device.
  118.  
  119. i have tested every function except the unlock bootloader and sync functions.
  120. everything works except the uninstall APK function, but i think i just don't quite understand the adb command.
  121.  
  122. to report bugs, ask questions, offer suggestions, explain the adb uninstall and sync functions(?!), bitch at me, propose marriage, or send anonymous death threats, email me: vvn (at) eudemonics (dot) org
  123.  
  124. feel free to share, modify, whatever.
  125. some credit would be nice. donations are super nice. but buying & sharing my EP would be the most awesome way to show your appreciation. really, it would mean the world to me.
  126.  
  127. you can stream and buy the EP at: http://dreamcorp.bandcamp.com or any major online music retailer (itunes, google play, amazon, spotify, cdbaby, etc.) - just search for "the dream corporation" and album title "last night on earth"
  128. follow on facebook: http://www.facebook.com/dreamcorporation
  129. and of course, more music on soundcloud: http://www.soundcloud.com/dreamcorp
  130.  
  131. ##################################################################################
  132.  
  133. CHANGES IN v1.3B:
  134.  
  135. updated README. added linux binaries to zip package. updated PYADB.PY library for increased flexibility. also authored and attached a license agreement and disclaimer document. fixed function to copy files between device and computer - it works now, even added progress status. sync works too! there's actually more, but i'm too lazy to provide comprehensive details.
  136.  
  137. ##################################################################################
  138.  
  139. CHANGES IN v1.2B:
  140.  
  141. new SuperSU binary - we are now on v2.02! many thanks to chainfire for the development and maintenance of SuperSU. also added a 3rd rooting option using the "Superuser" zip - this is an older file that may work on older devices. or not. hey look, options!
  142.  
  143. also added some more flashing options and made the sideload/install from device/fastboot options a bit more flexible instead of always following the same path.
  144.  
  145. probably not even noticeable to most people, but for some reason TWRP hasn't been behaving all the time, especially with installing the SuperSU binaries for rooting. so instead of TWRP or stock recovery being the only options, i added ClockworkMod and Philz as options to whatever functions (flash and sideload) that use a custom recovery and were previously only able to use TWRP. i've tested rooting with the towelroot method on my samsung galaxy note 3 and it works perfectly, doesn't even trigger the knox 0x1 bit (as long as firmware is NE6 or earlier) and no reboot required. towelroot will not work for the oneplus one though - i tested the latest superSU (2.02) update on the OPO's latest update (33R) and it flashes successfully through Philz Recovery.
  146.  
  147. developing and running the script primarily on a Macbook Pro OSX 10.8 with Python 2.7.x, though sometimes i work on it in a Linux Debian environment. i have no clue how this script will run in Python 3, i could try it and find out, but i just don't care.
  148.  
  149. also new - check out the sweet ASCII art i added (even in oneplus' signature colors)! since it's the first thing you see when you run the script, you probably can't miss it. added because, obviously, it's an absolute REQUIREMENT that every terminal application (at least, the ones that matter) include some uber leet ASCII. like, the functionality doesn't even matter. handling exceptions doesn't matter (i don't do much of that here, by the way). all that matters is whether or not you have ASCII art, and how uberleet it is. otherwise, nobody will give a shit about you or your app. (at least, that's what i was told. mommy????)
  150.  
  151. i tested the crap out of this with my oneplus one 64GB with the hallucinatory display (my oneplus one's display has issues with abusing psychedelics, apparently), since i'm getting a brand new warranty replacement soon. yay! i am pleased to report that none of the functions i have extensively tested in this program have caused my phone to brick or do anything where it wasn't able to boot into the system. (though if you DON'T follow instructions, you CAN brick your device. so stop being such a rebel.) i accidentally upgraded to the latest OTA (33R) and was unable to root or even boot into the TWRP image (my bootloader is unlocked but still on stock recovery), then reverted back by flashing the 30O images, then realized the problem wasn't the update but TWRP. also tested the 33R OTA update - i can confirm that's working.
  152.  
  153. in a future release there will be more functionality for other phones. i plan to add a script for deodexing, and maybe if i am not too tired i'll create a stock ROM with root already injected into it.
  154.  
  155. my github repository is still being a jerk and won't let me commit anything. sorry. keep checking my pastebin until then to get the latest updates:
  156.  
  157. http://pastebin.com/u/eudemonics
  158.  
  159. there might be some errors. i don't know. i thought i fixed the ones i came across. i really need sleep.
  160.  
  161. ##################################################################################
  162.  
  163. CHANGES IN v1.1:
  164.  
  165. - most files in script can be downloaded directly from script by demand to proper location, making it an easier install and a more seamless user experience
  166. - added support and files for latest updates: XNPH33R released 8/22/2014, and XNPH30O updates #1 and #2
  167. - can now flash entire factory stock ROMs - full XNPH30O and XNPH25R stock images - or flash your own custom ROM
  168. - updated PYADB library to return STDOUT response instead of just a '0' success or error if not 0.
  169. - reboot functions should behave a bit more sanely now that the piped STDOUT response can be used as qualifiers
  170. - added more details and instructions in certain procedures, especially those having to do with booting into recovery.
  171. - several root options available now: superSU is recommended for OnePlus One. TowelRoot is recommended for Android firmware releases earlier than June 2014. I also included a "superuser" zip file which is also supposed to be for rooting, but unless you are well acquainted with what it does, which devices it supports, and what to do with it, I would advise you not to try flashing it.
  172. -i shuffled a lot of items around, it's very likely that there may be some syntax errors floating around. Please report any errors you come across to me at vvn (at) eudemonics (dot) org. thanks!!
  173.  
  174. ##################################################################################
  175.  
  176. for the most up-to-date version of the toolkit, check my pastebin:
  177.  
  178. http://pastebin.com/u/eudemonics
  179.  
  180. ##################################################################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement