Amend to Edify Script Converter - XPERIA X10 Q&A, Help & Troubleshooting

Since xRecovery v1.0.0 upgraded its scripting and our zips available for now is not supported/updated YET.
I found this tool here on xda, and tested it on cobrato's bb patch and it worked.
You probably want to go to this thread.
NOTE: I USE GALAXYSi9000 AS MOUNT TYPE.
USE IT AT YOUR OWN RISK. I'M NOT RESPONSIBLE IF YOU HURT YOUR x10's.
Original Thread: http://forum.xda-developers.com/showthread.php?t=903598

Related

[KITCHEN][WIN][GUIDE][MIUI] CosmicUI Kitchen (MIUI 2.4.20 on FXP)

Introduction
Here I am releasing the kitchen and a lengthy guide on what makes it special, how it works, et cetera; as my goodbye gift to the X10 forum as I want to keep this knowledge open so others might be able to help. Please be aware that this is not for newbies, I hope that other people still building custom ROM's for X10 will put my research to good use. It is directly (but heavily modified and enhanced) based on the script by erenz1202 and probably has additional credits, I don't know. His original thread is here for your reference.
I hope to keep this kitchen/guide a progressive effort, I will do my best to keep this thread maintained with the help of all contributors. If you have any questions, don't hesitate to ask! But if you're a newbie and don't know anything about development, please don't spam the thread with silly questions... I don't have the time to teach someone how to use a computer
This thread is under construction, I did rush writing it. Please post your suggestions for sections/updates/anything in this thread. I would love to see a good "Team-XDA" effort
If any other MIUI ROM builders want to take my sh!t and use it in their ROM, I really don't care so go for it. LOL. Credit would be nice but I wouldn't be surprised if you don't. But I really hope this doesn't cause a bunch of people to release ROM's based on this MIUI with no real GOOD changes without sharing the knowledge here, the X10 Dev forum is already enough of a popularity-contest
Notable Features
- Automatic APK/JAR injection subroutines (see below for details)
- Full logging of the build script/process
- Unique tweaks/hacks not present in any other MIUI ROM, fully documented and explained (see below for details)
Requirements
- Windows Vista/7 required (Windows XP cannot handle this advanced batch file)
- Java Runtime Environment
- Above-average knowledge of batch files, XML, smali
Downloads
You can find all relevant downloads, including old versions of CosmicUI, in my Mediafire folder - the important stuff is in the 'Kitchen' subfolder.
http://www.mediafire.com/?ksvtupinjw8nd
- Kitchen update for v0.6.x is also added. You still need to original kitchen, download the update ZIP and extract it to your kitchen folder (overwrite all) to update it. The new version brings a pre-build script to inject language files, and also a post-build script to PNG Optimize/zipalign/recompress JAR's and APK's.
Also included as a separate download is a self-extracting EXE of MIUI 2.4.20 for Incredible S (from MIUI UK i.e. miuiandroid.com), which Cosmic UI was based on. FXP-CM7 is not included, you will need download that from the OT too.
Instruction/Guide
Unpack the kitchen.zip archive to a new folder on your Windows Vista/7 PC. Doesn't matter where, just as long as you have full administration rights (and run the batch file as administrator if you have UAC enabled). Here is an explanation of the kitchen contents:
base_cm7source
- Extract FXP-CM7 files here. CosmicUI v0.5 uses FXP-124. Use the /system contents of the flashable ZIP, not the system subfolder (i.e. this is valid - .\base_cm7source\build.prop)
base_miui
- Extract MIUI files here. Note that this folder is modified with every build, I have created a self-extracting EXE of MIUI 2.4.20 for Incredible S from miuiandroid.com and uploaded it to the mediafire folder. Place this in the root kitchen folder and run it if you need to unpack again, it will extract to the base_miui folder. Open the EXE with WinRAR (or 7-Zip) if you want to inspect it. If you want an original ZIP of MIUI 2.4.20 for various devices, check the page here for direct downloads.
base_postmods
- Precompiled stuff for the MIUI build, either replacing original MIUI/FXP files or completely new. Some is unique to CosmicUI, details in next section.
base_postmods_inject
- Source files for automated JAR/APK injection functions, with a specific folder structure and details of each modification included. Details in next section.
base_postmods_inject_obsolete
- As above, but these are no longer used (and excluded from the build script). They were either for older versions of CosmicUI or only ever used in my test builds.
base_postmods_special
- Special injections for use with my automated mods/scripts in CosmicUI, currently used for building Extended Settings APK/JAR and HW-LED fixed framework APK. The build script will show that these injections are not automated like the base_postmods_inject folder.
base_tool
- All the dependencies and tools used for the build script. Includes 7z binary, aapt, apktool and package-signing jar's. Note that I use APKTool for jar files instead of smali/baksmali, because APK tool has some fixes that the original (bak)smali doesn't. So if you manually decompile APK's/JAR's, you will need to use Apktool v1.4.3 to keep smali/xml compatibility with the mods in this kitchen (you will get compile errors if you mix decompiled files from different versions). This folder also contains a custom 'usr' folder from the original kitchen, I never updated it and it is still used by the build script.
CosmicUI Modpack (obsolete since 0.4)
- Just an extracted Flashable-ZIP of the old Modpack for 0.3 (pre-Aroma). Don't use it on new versions
CosmicUI-FixPermissions
- Just an extracted Flashable-ZIP of a little updater-script that fixes all permissions on /system partition, useful when pushing new files via adb in CWR without having to chmod/chown. I originally made it to save time but it's a bit redundant if you use my modified kCernel-v01 since it boots directly to TouchRecovery (which has Fix Permissions in the menu).
CosmicUI-kernel-kCernel_v01
- Just an extracted Flashable-ZIP of my modified kCernel v01. Only differences are (a) the boot graphic and (b) Boot Menu removed and only uses Touch Recovery (saves time).
CosmicUI-v0.4.01.122
CosmicUI-v0.5.01.124
- Templates for CWM-flashable ZIP after building. Move the system folder into this folder, ZIP the contents and flash. Includes all the Aroma install stuff.
~build.bat
- The main magic. This batch file is well commented and has a lot of experimental stuff commented-out. Take a look. If it makes no sense to you at all, you're not experienced enough to use a kitchen! But feel free to ask specific questions about it
~build.txt
- This is the log file (new one created every time) when running the above script. Good for checking errors with the build, especially with APK Tool (de)compiling or missing files. Pretty fancy stuff there!
How to do a quick build to make CosmicUI v0.5.x?
1) Extract contents of FXP-124 .\system\ to base_cm7source
2) Extract MIUIandroid.com's 2.4.20 for Incredible S contents of .\system\ to base_miui
3) Run the ~build.bat file (yes, it takes a while - the JAR/APK injection mainly)
4) Move the new created .\system\ folder to the flashable-CWM ZIP template folder (e.g., .\CosmicUI-v0.5.01.124\)
5) ZIP up the contents of the template folder you used above, and install the update in CWR.
About base_postmods_inject
Inside the folder you will see two others, app and framework - this is pretty self explanatory. If we go inside framework for example, we will see three folders and three files:
framework.jar [folder]
framework-res.apk [folder]
services.jar [folder]
framework.txt
framework-res.txt
services.txt
Let's take a look at framework.jar. The txt file for it just explains what is in there, it's not used in the build script but is for your info. In this case, it details the changed files used for patching-in some WebKit and Net code to eliminate the need for the 2048 read_ahead_kb tweak that most other MIUI ROM's for X10 need to prevent the WLOD's. Anyway, inside the folder is a smali folder - it follows the same directory tree of the original decompiled package (remember - with apktool 1.4.3), but with only the changes necessary for the patch. [FYI, The 'build' folder is re-created with every build, designed to be a cached-compile to speed the build process but it doesnt work right - probably because of changed timestamps. Don't worry about it.]
Anyway, you could use a program like WinMerge to examine the differences of the changed files and find the patches I made. In the case of framework.jar there is a problem with battery drain in the \net\ code (I think), it's a fairly dirty hack that might put the system_server in a constant loop. I don't know. Anyway, that's everything explained about the apk/jar injection feature. I think. If you want to mod another .apk or .jar, remember to compare your changes to the original and then - following the directory tree of existing injection mods as a template - make new folders and move the modified files there.
UNDER CONSTRUCTION, NOT FINISHED. Ideas/suggestions welcome! Peace
This seems awesome!!!! thanks alot!!
wow, this is beyond generous....thank you very much.
Sent from my Desire HD using xda premium
Tnkz a LOT!!!!!!
I'll still be working on this, I'm not getting rid of my X10 yet. Current priorities:
(1) Get latest MIUI Camera working
(2) Fix battery drain when data enabled
(3) Make it multilanguage
(4) What else? Ideas welcome.
I am also considering downgrading the MIUI version. The current 2.4.20 was never "stable", it was a development release from Xaomi. MIUI 2.3.7 was the last "stable" MIUI Gingerbread release. I don't know the difference between 2.3.7 and 2.4.20 though, does anyone know?
Dan if you update the rom so update miui version not get back to 2.3.7 ( just kidding )
while im looking on miuis thread i'v seen 2.5.11 ( camera updated )
and 2.5.25 i think its more stable than the 2.6.8 version ( that what i see )
so why not to update to a new miui ??
sparxx4 said:
Dan if you update the rom so update miui version not get back to 2.3.7 ( just kidding )
while im looking on miuis thread i'v seen 2.5.11 ( camera updated )
and 2.5.25 i think its more stable than the 2.6.8 version ( that what i see )
so why not to update to a new miui ??
Click to expand...
Click to collapse
Sorry, don't know how I missed this reply lol. Well MIUI 2.3.7 is the last stable gingerbread release of MIUI. 2.4.20 was only ever a development release. So I think there may be some bugs in 2.4.20 (but I can't find anything).
MIUI 2.5 and onwards are only for ICS sadly. I do plan to work on MIUI for ICS in some time, but there are already a heap of X10 MIUI ROM's for ICS and MIUI4 is still beta and many things will change.
Looking at the official MIUI download page, they say Latest Version is 2.6.1. But the latest Gingerbread release is 2.3.7c (e.g. for Desire).
And then in the development downloads, the last one listed for Gingerbread is only 2.4.13.
I have dug around for newer MIUI versions for Gingerbread, I am 99% sure that 2.4.20 is the last one. The best I can do is work on porting over some of the newer apps from MiCode project Gingerbread-branch (open-source MIUI repo) because those apps might have some new updates and fixes.
v0.6 kitchen update added to the folder.
- Kitchen update for v0.6.x is also added. You still need to original kitchen, download the update ZIP and extract it to your kitchen folder (overwrite all) to update it. The new version brings a pre-build script to inject language files, and also a post-build script to PNG Optimize/zipalign/recompress JAR's and APK's.
Click to expand...
Click to collapse
i dont know what im doing ,,,but im trying
Dan on your kitchen you use Incredible s miui rom
but erenz use nexus 1 miui rom
so what the different ?
Any screenshot?? Interesting
Sent from my X10i using xda premium
Superman said:
Any screenshot?? Interesting
Sent from my X10i using xda premium
Click to expand...
Click to collapse
screenshot for what my friend ??
---------- Post added at 02:43 PM ---------- Previous post was at 02:41 PM ----------
i think i found it why you use the incredible s miui not the nexus 1
simple i think bcuz it have the latest stable GB miui wich 2.4.2 and nexus 1 have the 2.3.3
how smart i am
right ?
sparxx4 said:
screenshot for what my friend ??
---------- Post added at 02:43 PM ---------- Previous post was at 02:41 PM ----------
i think i found it why you use the incredible s miui not the nexus 1
simple i think bcuz it have the latest stable GB miui wich 2.4.2 and nexus 1 have the 2.3.3
how smart i am
right ?
Click to expand...
Click to collapse
2.4.2 was not a stable MIUI it was the last development release on GB branch.
Is there xloud for miui ?? Its realy low
Sent from my X10i using XDA
hey Dan can i build v 7 with this steps only ??
How to do a quick build to make CosmicUI v0.5.x?
1) Extract contents of FXP-124 .\system\ to base_cm7source
2) Extract MIUIandroid.com's 2.4.20 for Incredible S contents of .\system\ to base_miui
3) Run the ~build.bat file (yes, it takes a while - the JAR/APK injection mainly)
4) Move the new created .\system\ folder to the flashable-CWM ZIP template folder (e.g., .\CosmicUI-v0.5.01.124\)
5) ZIP up the contents of the template folder you used above, and install the update in CWR.
or there is another thing i have to do ??
That's pretty much it yes, as long as you don't want multilanguage and stuff. There is another batch file for multilanguage injection in the kitchen update. Examine the batch files for details and usage.
But what exactly would make that v7? It'll be the same as 0.6.
i just name it v7
but whats im going to do just updating CM source for the last .. i just want to get into making a rom world
a small step for me but it give me alot and i will be happy if you help me
and pleas talk to me simple english i dont understand all the dev words
---------- Post added at 10:19 AM ---------- Previous post was at 10:14 AM ----------
so here what i'v do for now
taking miui base from the incredible s
taking fxpCm7.2 130 base
puting it on the folders ,, run Build
im cool for now ??
Well... If you don't understand all the dev words you might have a hard time working with the kitchen Yeah cool, you could try building with FXP129 or whatever the latest CM7 is for X10.
What the ROM really needs in an experienced smali and script editor.
CosmicDan said:
Well... If you don't understand all the dev words you might have a hard time working with the kitchen Yeah cool, you could try building with FXP129 or whatever the latest CM7 is for X10.
What the ROM really needs in an experienced smali and script editor.
Click to expand...
Click to collapse
yeah im sure you too had a hard time on the beginning
i will try google what i dont understand and ask you for sure
so after build done ,, i just take the System folder add it to a flashble folder and zip it ???
sparxx4 said:
yeah im sure you too had a hard time on the beginning
i will try google what i dont understand and ask you for sure
so after build done ,, i just take the System folder add it to a flashble folder and zip it ???
Click to expand...
Click to collapse
Yes.
then im cool for now .. build done and the zip done ... all is need now testing the rom

[Utility][2.0]Auto-Patcher

We have moved support away from this thread and into the main thread at Android General. The info in the second post is accurate as of 12/3/12.
Development on the Auto-Patcher continues, I have just stopped adding Nexus 7 specific features as this device's users didn't express any interest.
If I could close the thread, I would. But if something tickles your fancy, come see us at the above link.
The Auto-Patcher 2.4.7​ (Bismuth)​
by pastime1971 and mateorod.​Trouble with Android 4.2? See here.
Current version and changes: Auto-Patcher 2.4.7 is out
Improvements include:
Pdroid for CM7, after a long battle, should finally be working
Internal script improvements.
Pdroid and Pdroid2.0 are incompatible and cannot be applied to the same rom!. If you are switching from one Pdroid to another, go to data/system and delete everything with privacy in the name.
The Auto-Patcher​
The Auto-Patcher is a smali patching utilty that can be used to port mods, framework changes, themes and more across ROMs and devices by patching files and outputting a flashable zip.
We hope that this tool can help developers get their work to a wider audience and help users easily try programs that may call for skills or time they don't have. In one command, you can have all the power and utility of the mods/programs listed below, with no specialized knowledge.
Supports​​
ClockworkMod and Aroma installers
Cyanogen [CM7, CM9, CM10] (cm)
AOKP (aokp)
AOSP (aosp)
ParanoidAndroid (pa)
Evervolv (aosp)
...and many others.
We do not support system.img, Odexed roms or Sense, TouchWiz or other OEM-skinned AOSP at this time.
If you have a build environment and build for TW or Sense, consider joining the team. Additionally, Quarx's CyanogenMod roms are not currently supported. A maintainer would be welcomed for that as well.
Supported Platforms​The Auto-Patcher runs on Linux and MacOSX terminals. Project contributors kobik77 and wbedard have helped us add Windows support as well.
Kobik77 has developed a stand-alone GUI for Windows called ApG. The most current version of ApG can be downloaded here. Note: ApG has some trouble with some virus software. It has no elevated permissions and is demonstrably safe. Here are some anti-virus tips from long-time user Grayfoxmg1
The Available Mods​
Unless there are hardcoded reasons they conflict, all of the mods below can be combined, so you could get all of the programs and tweaks in one shot. If you use other premade patches or zips, you would have to choose between them.
The Auto-Patcher is the only non-destructive way to get these enhancements, short of building your own ROM and/or applying your own changes to the code.
The name is paranthesis is the MODS for use on the command-line. See usage below if that confuses you. It isn't hard, really.
PDroid (pdroid):
The one where we make our bones, PDroid is an advanced privacy app, one that allows you to deny system and user apps permissions they usually need to function. PDroid changes the information passed by permission requests instead of denying it like other apps. That means no FC's or misbehaving apps. PDroid allows you to set custom phone numbers or IMEIs as well. PDroid is only officially supported through GB. The Auto-Patcher makes it an option for ICS and Jellybean ROMs as well.
PDroid is available in the Google Play Store, although you may have trouble installing it from there. It is available from its release thread by svyat, PDroid's sole developer. Discussion about PDroid efficacy and operation for ICS/JB is usually best at pastime1971's port/build patch thread.
PDroid 2.0 (pd2.0): NEW!
CollegeDev's update of the core PDroid app and framework. There is a separate app you will need as well. You can get the app and read about PDroid2.0 and get the .apk here. This mod is only for Android 4.1.2+
V6 Supercharger (v6supercharger):
Most likely needs no introduction to any regular XDA member. The Auto-Patcher will edit your services.jar for you. Our patches contain zeppelinrox's most recent edits. You will still need the script, which you can get at his OP. Only for Android 4.0.0+!
Insecure Boot.img (insecure):
This should work for just about every ROM, giving you true root shell access, enabling adb push of system files and adb remount commands. It can truly save your bacon if you are the type to play with system files and flashing. Some ROMs come with this feature already, so if this patch fails, it just means you already have one.
Secure boot.img (secure):
The opposite of the above. There are advantages to both, and what you want depends on what you do. I haven't seen any other way to secure a boot.img, with so many roms now having insecure by default.
Swap internal and external storage (external_internal):NEW!
This swaps your app storage from an sdcard to internal storage. This allows you to use all apps, even w/o an sdcard!
TabletUI (tabletUI):
Based on findings by barmullio, this allows users of the "Phablets" UI to switch from the stock phone or phablet layout to Tablet user interface. I personally like the tab interface because it allows me more regular access to the status bar. Lockscreen rotation has been enabled as well. Confirmed working on all devices!.
NEW
Mods for Wifi-only Tablets.
3G Dongle (3gdongle):
This allows users of Wifi tabs to use their 3G dongles on their tablets, allowing them to have data on the go. This is a pretty involved mod, and the development is still on-going. We would like to stress that you read up at developer trevd's thread for best practices and troubleshooting. A growing list of confirmed supported dongles can be found there as well.
Google Voice (voice):
As popularized by bongostl, this allows users to use Google Voice to make outgoing calls. It changes your framework-res to recognize that the tablet is voice capable. This allows you to recieve calls as well and has other call quality advantages over things like GrooveIP.
OTG support- Coming SOON.
Usage​
Designed to run on Linux, OSX and Windows (using Cygwin)
The Auto-Patcher has become completely open-source, and no one has gotten more out of that than our Windows users. kobik77 and wbedard have come aboard and brought Windows support to our formerly *nix-only utility.
Kobik has also crafted the first Auto-Patcher GUI! Here is his post with download link and features description (including auto-update from Github!)
Requirements for execution: Java (JDK), cpio, patch
Help
For usage and patch availability, place a rom.zip into this directory and try
Code:
$./auto_patcher <ROMNAME>.zip -h
This will check our various dependancies and provide some useful information. It is not the prettiest thing in the world yet, we're working on it...
To patch a ROM
Code:
./auto_patcher <[FONT="Courier New"]ROMNAME[/FONT]>.zip <[FONT="Courier New"]MODS[/FONT]>
example:
Code:
./auto_patcher cm10-encore-fat-tire.zip pdroid,tabletUI
You can have any number of mods applied at the same time, just separate them with a comma and NO SPACES!
The only thing you may need will be a romtype. The patcher will detect and display the ROMTYPE it thinks you have. If the patches fail, just append your ROMTYPE to the end of the command. The only available ROM types are:
pa
cm
aosp
aokp
Don't worry if your rom doesn't have a type; most roms in XDA are derivatives of one of the above, and tell you which one in their release threads.
Code:
./auto_patcher pa-2.23-mateorod.zip pdroid pa
98% of the time, that is all you need to know!
If you would like to see some of our more advanced usage, please see the third post.
Debugging
There is never any need for any wiping or restoring of a backup! If you encounter any problems, simply reflash the generated restore.zip or your ROM over the install, preserving all data and settings!
In the Auto-Patcher directory you will see a logfile that is generated with each run of the program. Please attach the entire logfile in order to get the best support we can offer.
Current and past versions available at our download page on techerrata
Download
You can also clone from our github. See the README because there is actualy a lot extra there.
Contributors
pastime1971
mateorod
kobik77 (ApG developer/cygwin maintainer)
wbedard (cygwin/AOSP pd2.0 maintainer)
Maintainers
FFU5y (Maintains pd2.0 AOKP)
KickNGuitar (OSX testing)
poncik (Evervolv maintainer)
Thanks
eyeballer and kevank with Team Win for web hosting
Svyat
CollegeDev
tonyp
krylon360
inportb
chainfire (for faapt)
zeppelinrox
trevd
rathian, and TheMatrix2000 (for OSX testing)
romracer and greenblue for 4.1.2 fixes
ninno_mx
The Auto-Patcher is a fully open-source utility, and we welcome new contributors.
If you are a developer, themer or script writer who has code-level edits you walk your users through, let us know and we can get together and create a package for you. A message to developers is here, which also touches on our donation policy.
changelog
12.05.00. (v0.1)
# ...........
# 2012.05.12. (v0.2) allows user to specify a different version of patches
# 2012.05.13. (v0.3.0) force "patch -N", remove temp upon failure, generate log output
# 2012.05.13. (v0.3.1) revised the generation of updater-script (SGS2)
# 2012.05.15. added AOSP patches
# 2012.05.15. added crespo-aosp patches, added device-specific patching if patch exists
# 2012.05.15. remove restore.zip upon failure
# 2012.05.15. (v0.4.1) added CM7 (GB) patches
# 2012.05.18. (v0.4.2) added checking for tool commands
# 2012.05.21. (v0.4.3) apply device-specific patche only when it is specified
# 2012.05.26. added task title to log
# 2012.05.31. (v0.4.4) CM9 patches updated, crespo-aosp added
# 2012.06.04. (v0.4.5) added checking tools and rom, added aroma installer support, add patch outputs reroute
# 2012.06.15. CM9 patches updated
# 2012.06.16. (v0.4.6) AOKP patches updated, patch versions restructured
# 2012.06.17. (v0.5.0) patcher script reorganized, removed build.prop
# 2012.06.17. (v0.6.0) auto patcher script for pdroid and v6 patches
# 2012.06.19. (v0.6.1) add patches for CM7.2 Final
# 2012.06.20. (v0.6.2) updated CM 7.2 patches
# 2012.06.23. (v0.6.3) fix symlinks
# 2012.06.26. (v0.6.4) add CM7 nightly patches (0618 or latest). Removed faulty 7.2 patches (0619)
# 2012.06.27. (v0.6.5) added new CM9 patches (20120626)
# 2012.06.27. (v0.6.6) added CM7 nightly patches (20120625) (finally!)
# 2012.07.02. (v0.7.0) Redid AOSP/AOKP; add Windows support (using Cygwin). Thanks kobik77!
# 2012.07.06. (v0.7.1) updated CM9 patches (20120706)
# 2012.07.08. (v0.7.2) updated AOKP (20120707) and CM9 (20120708) pdroid patches
# 2012.07.11. (v1.0.0) reworked script works on Linux, Mac OSX, and Windows (on Cygwin);
# " " added new ICS/JellyBean support for the new V6-Supercharger
# 2012.07.18. (v1.0.1) updated pdroid patches for CM7/CM9 (20120718)
# 2012.08.06 (v1.5.0) updated smali/baksmali binaries to 1.33
# 2012.08.06 Added Pdroid/V6supercharger support for CM10 Jellybean!
# 2012.08.06. (v1.6.0) added aokp-jb patches for pdroid/v6supercharger, script update
# 2012.08.17. (v1.9.5) Added support for pdroid_addon, by CollegeDev.
# Added insecure boot.img mod
# Added support for aosp-jb (This needs testing, and may not be a wide patch due to large variation between AOSP roms.)
# -Please report all experiences!
# Updated all v6supercharger patches w/new edits to ProcessList
# Major script overhaul in preparation for additional mods!
# 2012.08.20. (1.9.6) Conditional support for Official cm10 and aokp-jb builds
# 2012.08.23. (1.9.7) Final/confirmed pdroid support for Official CM10 and AOKP-JB
# 2012.09.04 (1.9.8) Bundled cygwin-compatible tools (original was corrupt).
# For Cygwin, replaced h2b function with simple bash math
# conversion (req'd for compat w/ Cygwin tools).
# 2012.08.26. (2.0.0) Added .apk patching
# Added 3G Dongle support for Nexus 7
# TabletUI support for Nexus 7 (maybe more)
# Google Voice support for Nexus 7
# mods are 3gdongle, tabletUI, voice, or Nexus7 (for all)
# Added provisional file copy menu to widen patching base
# 2012.09.11. (2.0.1) Cygwin support fixes
# 2012.09.11. (2.0.2) Bugfix for 3gdongle (all)
# 2012.09.16. (2.1.0) Significant restructuring of core operations; added edit text file
# Fix for "method-cap" errors in pdroid.
reserved
Nice to see you and pastimes and your work here as well - and I absolutely love the new Nexus 7 additions as i finally got mine as well
Btw: Are there any news on decompiling the jars and applying these fixes on an android device, without having to use the PC?
It's not important, I'm just interested.
I will try this patcher for getting 3g dongle (ZTE K3565-Z) support.
My config is ParanoidAndroid with franco kernel.
What is my first step?
How do I get my whole rom with kernel into my mac os system? Can I take the nandroid (I dont think so, because I cannot flash zip back again)?
Cetin said:
I will try this patcher for getting 3g dongle (ZTE K3565-Z) support.
My config is ParanoidAndroid with franco kernel.
What is my first step?
How do I get my whole rom with kernel into my mac os system? Can I take the nandroid (I dont think so, because I cannot flash zip back again)?
Click to expand...
Click to collapse
Well, that is interesting, actually. There are a bunch of ways that you could get the update.zip on your tablet, but there isn't support for custom kernels yet. You can patch any rom, but if the patch needs to change the boot.img, flashing a new kernel will remove that part of the patch.
I think I know a way to add it though. I will try to add custom kernel integration to the next update.
But you CAN get the 3gdongle working on your rom, just put it through the patcher and transfer it through adb or email or dropbox.
Code:
./auto_patcher paranoidandroid2.2.1.zip 3gdongle
replacing paranoidandroid2.2.1 with the actual name of the zip.
The stock kernel is pretty awesome, bttw. But I think I can add this to the autopatcher. It is needed anyway.
Edit: I must be really tired. You can do this. The kernels are distributed as boot.imgs. Just open up the kernel installer zip, take out the boot.img. Then replace the boot.img in whatever rom you are using.
Then run it through the Auto-Patcher, using any options you like.
You will ONLY need to replace the boot.img of your rom if you are applying the 3gdongle, insecure,secure, or pdroid-aosp-jb modtypes and would like to use a custom kernel that doesn't come bundled with your rom.
I will add some version of this to the autopatcher's next update though, so it is easy to do from the command-line/GUI.
Cetin said:
I will try this patcher for getting 3g dongle (ZTE K3565-Z) support.
My config is ParanoidAndroid with franco kernel.
What is my first step?
How do I get my whole rom with kernel into my mac os system? Can I take the nandroid (I dont think so, because I cannot flash zip back again)?
Click to expand...
Click to collapse
If you need more info than that, you can ask and I will be more specific, I just reread your post and realized maybe I wasn't thorough enough...
Update Because this seemed so vital to the Nexus 7 community (because we have everyone and their mother with a custom kernel here...) I went and looked through the installers.
It looks most people: faux,_motley, clemsyn et.al. use the AnyKernel updater. Those updaters use some of the same binaries we do to preserve ramdisk edits. They don't want to overwrite mods of this sort any more than we want them to.
A couple devs, franco and some new one from today, Thoravuuk or somethin', just package a boot.img. In those cases you will need to place the custom boot.img (and title it boot.img) in the ROM you would like to patch with the Auto-Patcher.
In all cases, there is existing methods to preserve all support and features with nothing more than winzip or any other archive manager. Drag and drop.
So we will see how we end up handling this in the Auto-Patcher in the future. There are a bunch of methods to distributing kernels which make it tricky, but the more responsible Android devs already are prepared for the fact that you may have modified your ramdisk and want to keep it that way. Using Koush's AnyKernel is a great way to accomplish that.
For franco you will habe to briefly drag and drop for now.
tonyp said:
reserved
Click to expand...
Click to collapse
Just saw this part, tonyp. I hope this means you might have something planned for us...
Hey man, thanks for your big support!
I will try like you said.
As I understand correctly the boot.img keeps untouched by your patch. So I can patch my Rom flash the zip and use any custom kernel by flashing it with fastboot flash boot command?!
NEXUS 7
I tried patching but there´s is a problem:
How to choose the right file and which one is it?
Code:
### applying boot.img patch ###
... applying init.dongle.rc patch ...
... applying init.rc patch ...
The text leading up to this was:
--------------------------
|diff -Npru ramdisk/init.rc 3g-ramdisk/init.rc
|--- ramdisk/init.rc 2012-08-27 00:25:58.749201521 -0500
|+++ 3g-ramdisk/init.rc 2012-08-27 00:24:51.012865613 -0500
--------------------------
File to patch: 3g-ramdisk
3g-ramdisk: No such file or directory
Skip this patch? [y] n
File to patch: 3g-ramdisk/init.rc
3g-ramdisk/init.rc: No such file or directory
Skip this patch? [y] n
File to patch: init.dongle.rc
1 out of 1 hunk FAILED -- saving rejects to file init.dongle.rc.rej
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! error: failed patching init.rc
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Cetin said:
I tried patching but there´s is a problem:
How to choose the right file and which one is it?
Click to expand...
Click to collapse
You're using a Mac correct? That is probably the least tested upon platform, although it should be fine. In your autopatcher folder, there is a logfile. Would you attach it please? I can know a bunch more with that file.
Thanks for reporting back.!
tonyp said:
Btw: Are there any news on decompiling the jars and applying these fixes on an android device, without having to use the PC?
It's not important, I'm just interested.
Click to expand...
Click to collapse
Oh yeah, once 2.0 gets stable (and I solve this new pdroid problem, that is soooo irritating. I predicted this was coming waay back in pastime's port thread, when we first ran into trouble with the build patches) that is the next thing I am going to work on.
I think pastime is going to lead the charge getting a linux GUI and I am going to work on getting the Android front-end. That is going to be wild, most people have just accepted it can't be done.
noob here! i just want to apply 3g dongle patch on my nexus 7 stock rom (rooted ofcourse) help please
thanks
rufh_s said:
noob here! i just want to apply 3g dongle patch on my nexus 7 stock rom (rooted ofcourse) help please
thanks
Click to expand...
Click to collapse
Well, we don;t support system.img modding here yet, mostly because it is so device specific. This tool works on all roms and devices, so adding something for each device would be a real pain. I am going to keep looking at perhaps adding the Nexus 7 system.img, though.
What you can do is look for a deodexed stock rom in the rom page. There are several available, I believe scrosler has one, and maybe a couple more. These are basically stock roms, but with deodexing and unpacking of the system.img already done.
The main advantage to using custom roms is their customizability, (if that is even a word...). All the other stuff is a result of that.
If you want the 3gdongle support, you will probably have to try one of the flashable stock roms.
Very useful mod. Thanks for bringing this here.
Quick question to clear up something:
The tablet mode or 3g dongle, can I just flash them through twrp and be done? Or does the untethered way need your manual method you described above for untethered installation?
I'm running stock rom with trinity kernel(anykernel i believe) BTW. I alternate between motleys and trinity. Sometimes Faux one also.
Edit: I see the above post basically answers my question. Won't work on stock rom. Needs a deodexed stock base rom. Will wait till you hopefully add img. Support. My nexus 7 runs great on stock rom with custom kernel. Waiting for custom roms to mature more before I go flashing.
mateorod said:
Well, we don;t support system.img modding here yet, mostly because it is so device specific. This tool works on all roms and devices, so adding something for each device would be a real pain. I am going to keep looking at perhaps adding the Nexus 7 system.img, though.
What you can do is look for a deodexed stock rom in the rom page. There are several available, I believe scrosler has one, and maybe a couple more. These are basically stock roms, but with deodexing and unpacking of the system.img already done.
The main advantage to using custom roms is their customizability, (if that is even a word...). All the other stuff is a result of that.
If you want the 3gdongle support, you will probably have to try one of the flashable stock roms.
Click to expand...
Click to collapse
Well I have downloaded the rom deodex by scrosler,but I am getting the error,have attached log cat.text
Thanks
rufh_s said:
Well I have downloaded the rom deodex by scrosler,but I am getting the error,have attached log cat.text
Thanks
Click to expand...
Click to collapse
I should make a note of this in the top post, the only way to combine the 3gdongle and the Voice hack is to substitute the list of all the mods separately with
Code:
Nexus7
The voice and 3gdongle have separate edits to the bools.xml that are right next to each other. So applying one makes it so the next patch cannot find its context.
I made the Nexus7 patches by hand, so you get all three mods that way. The good news is that going by your log, that's the only problem. So you are basically done!
Edit: And as for the above stock system.img issue, well I may try and add system.img support. But it is a huge pain in the butt, requiring all sorts of manufacturer-specific stuff. I also like stock, though, and alternate between that and straight CM10. But I deodexed the stock.img as well, strictly to make use of all of the cool development that goes down around here.
You can manually deodex, then redex and all that, but I didn't really see a performance drop personally. I am pretty sure all the kernels you listed use koush's anykernel method, which is compatible with the Auto-Patcher and its methods.
mateorod said:
I should make a note of this in the top post, the only way to combine the 3gdongle and the Voice hack is to substitute the list of all the mods separately with
Code:
Nexus7
The voice and 3gdongle have separate edits to the bools.xml that are right next to each other. So applying one makes it so the next patch cannot find its context.
I made the Nexus7 patches by hand, so you get all three mods that way. The good news is that going by your log, that's the only problem. So you are basically done!
Edit: And as for the above stock system.img issue, well I may try and add system.img support. But it is a huge pain in the butt, requiring all sorts of manufacturer-specific stuff. I also like stock, though, and alternate between that and straight CM10. But I deodexed the stock.img as well, strictly to make use of all of the cool development that goes down around here.
You can manually deodex, then redex and all that, but I didn't really see a performance drop personally. I am pretty sure all the kernels you listed use koush's anykernel method, which is compatible with the Auto-Patcher and its methods.
Click to expand...
Click to collapse
Alright I am off to sleep now... will just patch 3g dongles and see...
Well I got to know this is not just n7 specific in your earlier post itself
This is for all devices that's really great,also I just got my n7 so wanted to be stock as much I can,yep I also prefer it..
Let's see, I ll keep you posted
Thanks again for the great work, will also test it on my phone if it works (droid 3) it would give me lot choices to use my data plan
and yeah I also see otg coming soon,all the best for the concept its perfect for noobs like me
Sent from my Nexus 7 using xda app-developers app
apparantly patching only "3gdongles" patch didn't worked either attached log, may be i ll try this with some rom or try to find some other "stock" similar, can you suggest some?
thanks
rufh_s said:
apparantly patching only "3gdongles" patch didn't worked either attached log, may be i ll try this with some rom or try to find some other "stock" similar, can you suggest some?
thanks
Click to expand...
Click to collapse
Okay, this isn't the fault of your rom. Your log shows that it is failing rebuilding your ramdisk. A user reported a corrupted .exe binary, but when I tried to investigate further I haven't heard back.
But since everything else appears to be working for you that may indeed be the case. Give me a minute to look and then I will put out a hotfix.
This will only affect WIndows users who are patching 3gdongle, insecire/secure and aosp-pdroid. I happen to know for a fact that the program runs fine on Cygwin, so I will checkout some new binaries and you should be okay.
Update: We have fixed the final issues with Cygwin and those selct mods. Thanks for your report, 1000+ downloads of 2.0 in the 24 hours or so and you were the one that aimed me towards the fix.
Thanks! Should be up later tonight, after I put my son to bed.
Okay, update is ftp'ing its way up to techerrata as we speak. Maybe 20 mins or so.
I went and got my hands on a Cygwin terminal, and as far a I can tell, everything works as it should. We were having a hell of a time with the binaries, they just seemed to check out fine right up until we uploaded the package and then they crapped out on us.
But the new update has all working pieces. If you were using cygwin and had an issue, give it another shot. Writing a program to run on all three major platforms has been a major learning experience for me, let me tell you.
I am probably going to add the 720p video shooting next update, so if there is anything else you know and want, let me know. It doesn't have to be limited to this forum, there isn't much we can't tackle at this point.
Oh, and we strengthened the voice and 3gdongle patches, now you should be able to apply them both anyway you want, including the Nexus7 command.

[Q] dsixda's Android Kitchen, add device, SCH-R740C, radio.img

Hello,
Relatively new to the kitchen, and building things for the phone aside from for just personal use, so I'm not yet familiar enough with all the tools.
Currently I'm trying to add device support for the SCH-R740c my device to dsixda's kitchen , and develop a custom ROM and a stock update.zip packages for use with CWM recovery for debricking purposes, updates and the like, as well as providing an easier way to build ROMs for this device.
The trouble I am currently having is my update.zip build's updater-script.
currently edify is producing:
Code:
assert(package_extract_file("radio.img", "/tmp/radio.img"),
write_raw_image("/tmp/radio.img", "radio"),
delete("/tmp/radio.img"));
this is causing the recovery flash to fail, Now I could edit the file manually to produce the desired results but I would like to be able to convert update-script to updater-script from Android Kitchen and produce something similar to the flashing process used by official updates:
Code:
ui_print("Patching modem image...");
assert(write_backup_amssmodem("/dev/block/mmcblk0p3", "/dev/block/mmcblk0p20"));
apply_patch("EMMC:/dev/block/mmcblk0p3:15774976:88c0e2020ec2a0e0bcb98a64873ca0dd186816dc:15791360:db457fe2217aee9186d1a1d610b180d2c0bf8733",
"-", db457fe2217aee9186d1a1d610b180d2c0bf8733, 15791360,
88c0e2020ec2a0e0bcb98a64873ca0dd186816dc, package_extract_file("patch/modem.img.p"));
Obviously I would want to use a radio.img vs a patch file to ensure compatibility (4.1.2 and 4.0.4 radio images are incompatible) so desired output would be something similar to:
Code:
ui_print("Updating modem image...");
assert(write_backup_amssmodem("/dev/block/mmcblk0p3", "/dev/block/mmcblk0p20"));
assert(package_extract_file("radio.img", "/tmp/radio.img"),
write_raw_image("/tmp/radio.img", "/dev/block/mmcblk0p3"),
delete("/tmp/radio.img"));
unfortunately after doing some searching I was unable to find detailed information about adding devices, nor does it seem like there is a similar requirement for other phones..
I have read: http://forum.xda-developers.com/showthread.php?t=1390903
and searched for manuals on edify_def and edify script etc, but my search queries are filled with useless pages.
If someone is willing and able to help me with this specific problem, or point me in the right direction for more information in regards to edify and how it works or what I need to do to add devices to android kitchen it would be greatly appreciated.
CowboyEnvy
Looks like the device needs fix_boot3=yes but that still doesn't help resolve the issue of dd for the radio... Guess I may just have to continue to write/update the updater-script by hand
Sent from my naked 4.1.2 SCH-R740C using the xda app-developers app
What ever happened with the phone?
There is another thread on this forum in regards to this phone and a naked custom ROM however I'm no longer using that phone as anything other than a media player
Sent from my SCH-I545 using XDA Free mobile app

[TOOLS][PXA1908] G531F boot.img unpacking and packing tools

DISCLAIMER:
I'm not or will be responsible for the incorrect use of these tools.
Even if they decide to not work properly.
I've tested on my own and they work fine.
If they ever fail, well, not my fault.
Using them will make YOU responsible of anything they might cause to your phone or you.
Well, after a long time, I've decided to return since I now own 2 more android devices (Xperia E5 and a Galaxy J5) I'm no longer afraid of destroying this phone.
In the end of this thread I will put a link to my github repository where I'm putting the source code of a customized version of the mkbootimg tools, these tools are to help people to unpack and repack the boot.img of our phones which use a PXA1908 SoC that, for some reason, there never was any real development on.
I will try to change that I now possess more skills on programming in C, unfortunatly less time as well. I will try to improve these tools, try to make them more user friendly, and will try to get a real device tree for this model as well a real TWRP port.
HOWEVER IT IS TO NOTE, I HAVE UNIVERSITY SO I CAN'T PROMESS MUCH. DON'T SEE THIS AS A FUTURE GRAND DEVELOPMENT TOPIC OR DON'T EXPECT ANY ROMS TO BE MADE.
Again, be responsible with these tools, they are a low-risk bricking since you are only flashing boot.img or even recovery.img, but, well, no one ever knows.
Credit goes to kumajaya that made the customization to these tools first, I just fixed some warnings and will try to make them more powerful or not.
A link to his repo is in the README file in the root of the repo.
Please, feel free to fork this, to change it to your liking, if you add any features in, let me know so I can update the repo with freshly-made tools!
Source Code: https://github.com/fabiossilva21/custom_mkbootimg
Created: 15/01/2018
Last Updated: 13/04/2018
To be used... maybe?
Good news, I was able to update the tools so that people won't have to change the hex in the boot.img.
You can now just run the tools and repacked them without any edit.
Hello
Can you make a tutorial how to use this tools ??
I already have a modify Image but I dont know to compile it to zip ....
Pls atleast make simple tutorial .. thanks ..
acetdyoslike24 said:
Can you make a tutorial how to use this tools ??
I already have a modify Image but I dont know to compile it to zip ....
Pls atleast make simple tutorial .. thanks ..
Click to expand...
Click to collapse
can someone help us with this tool:crying::crying::crying::crying::crying::crying::crying:

[REQUEST] Custom kernel auto updater

Hi there! So I've been thinking about a script or an app or a method, whatever that enables us, the users to get a certain custom kernel's newest/latest release. I've got 6 different kernels saved on my external sd just in case something goes wrong. It's better be safe than sorry. You can imagine how bothersome it is to check xda for every single custon kernel if they were updated, if yes download the new version and put it in the correct folder on my sd card... The idea came when I saw the miui firmware auto updater which is an online script that does the job itself by selecting the latest Xiaomi firmware for the wanted device and makes a flashable zip for the users to download. Sounds convenient, doesn't it? The wast majority of the devs upload their zips to github or Androidfilehost. Since it sounds a rather complex thing isn't it possible to do something like this that allows the users to download the latest flashable zip for their favored custom kernel? It doesn't sound that hardcore to do. Seems rather easy to manage. To me, who knows nothing about scripting or coding just by the looks of it and their function/usage. Thanks for the answers in advance!

Categories

Resources