[HELP] Working on a patch for Tablet UI on Nexus10 - Android Q&A, Help & Troubleshooting

There is currently a patch for true Tablet UI on the Nexus7 Development that has worked successfully. Link is here. The following is a quote from the original thread:
Intro
Goal of thread is to share details around how the trigger for Phone UI/Phablet UI/Tablet UI works, and provide a dpi independent patch for tablet ui. Hopefully this also eliminates the misinformation that changing lcd density is the only way to get Tablet UI.
What's "true" tablet UI vs what is called tablet UI in many roms? The Tablet UI actually defines how some apps work (e.g. dual-paned settings like in the screenshots below) vs the other solutions that simply draw the standard Nexus UI with tablet navigation/system bars.
The 'Triggers'
In 4.1.x, there are two files that need to be modified:
PhoneWindowManager.java, located in frameworks/base/policy/src/com/android/internal/policy/impl contains the code that determines which UI to present. During compile this is a part of android.policy.jar
WindowManagerService.java, located in frameworks/base/services/java/com/android/server/wm contains code that specifies the lowest DP settings and has the system select from either sw600 or sw720 presentations. It is a part of services.jar
Click to expand...
Click to collapse
Basically, I'd like to modify this to work on a 4.2.1 AOSP ROM on the Nexus10 (flashing the Nexus7 patch on the Nexus 10 leads to a bootloop). The OP shows what modifications can be made in his thread so I'm wondering how I can port this to a Nexus10 ROM. I've used APKTool to break down the "android.policy.jar" file and looked through the smali files hoping to simply edit the corresponding lines but I was unable to locate it. Apparently there's more to it than that. Any thoughts on how to create a flashable zip to patch these files?

brGabriel said:
There is currently a patch for true Tablet UI on the Nexus7 Development that has worked successfully. Link is here. The following is a quote from the original thread:
Basically, I'd like to modify this to work on a 4.2.1 AOSP ROM on the Nexus10 (flashing the Nexus7 patch on the Nexus 10 leads to a bootloop). The OP shows what modifications can be made in his thread so I'm wondering how I can port this to a Nexus10 ROM. I've used APKTool to break down the "android.policy.jar" file and looked through the smali files hoping to simply edit the corresponding lines but I was unable to locate it. Apparently there's more to it than that. Any thoughts on how to create a flashable zip to patch these files?
Click to expand...
Click to collapse
haha i saw your post to my rom thread and this is exactly what i tried to do!
the thing is when you decompile precompiled java code you get the assembly and actually have to edit the opcodes. i tried doing that and failed (bootloop). I was so frustrated because i spent like 6 hours for nothing and decided to learn how to build AOSP from scratch. When i succeeded i posted my rom

schnip said:
haha i saw your post to my rom thread and this is exactly what i tried to do!
the thing is when you decompile precompiled java code you get the assembly and actually have to edit the opcodes. i tried doing that and failed (bootloop). I was so frustrated because i spent like 6 hours for nothing and decided to learn how to build AOSP from scratch. When i succeeded i posted my rom
Click to expand...
Click to collapse
Haha, well it was a noob "shot in the dark" attempt on my part. Going to start looking into building from scratch so I can take care of business on my own instead of having to rely on others. I don't mean that in a negative sense, I'd like to be able to contribute to the community one day.
Anyway, thanks for your work, schnip!

Related

[Q] New rom (or just launcher)?

The first thing I want to say is that my English is not really good. I hope you understand my questions.
I have an idea for a new Android rom, but I'm faced with a dilemma. I want to have as much as possible supported devices, so I also can just build a launcher apk which can be installed through Google Play. In this way all mobile devices with the minimal platform version can use it. The biggest problem is that I don't only want a replacement for the application launcher but also the notification drawer and everything else. Is it possible to replace them also? I don't think so, so I think I'll work on a custom rom.
The next problem is which base rom I would use if I really build a custom rom. It's most likely to use AOSP as base because it's clean. The question is which version of AOSP: Gingerbread, Ice Cream Sandwich, or the newest version Jelly Bean. You would probably say Jelly Bean because this is the newest version. The problem is the phone support. Gingerbread is supported on most phones. If I build ICS or JB the phones which are supported by Cyanogenmod are easy to support, because I can use their device files. The only problem is that my phone, the Samsung Galaxy Gio is not officially supported and the unofficial port is not really stable. I don't think it's a big problem to use this device files and just wait till the developer makes it more stable, but I don't know for sure.
The last thing I want to know is if it's really that simple to support multiple devices. If I read tutorials about porting existing roms to your device they all say you just have to add your device files to the source and compile it. But they never say something about the kernel. Most devices need another kernel because their hardware is different isn't it? Please explain me how this works.
I'm sorry about this hazy story, but please help me before I make wrong choices. Thanks on purpose.
Wietse
WietsedeVries said:
The biggest problem is that I don't only want a replacement for the application launcher but also the notification drawer and everything else. Is it possible to replace them also? I don't think so, so I think I'll work on a custom rom.
Click to expand...
Click to collapse
These changes you are talking about can be done. They are system changes so not supported by the android app installer.
Eg: Your notification drawer, status bar are part of SystemUI.apk. The source for this is can be found in the AOSP source code under android/frameworks/base/...
You can make your modifications, compile it into an apk and then make a flashable zip to replace the current one (or push it via a rooted adb console).
or you can compile the entire source code into a flashable zip (eg CM7,9 etc..) and use it a replacement ROM with your modifications.
This is the line between an application under the android runtime and the android runtime itself.
these files, under framework are part of the OS. so to provide a customized version of the operating itself is what people like to call ROMs.
Now ROMs (like any OS) are device dependant. Windows has the code to run in a lot of different hardware configs, but android aims to be small. It should have only the minimum required code to efficiently run itself on a device.
Thats the kernel. The kernel communicates with the hardware and so the rest of the hardware can happily talk to a working kernel and expect the hardware to function as advertised. Kernel is a simple program which goes into the RAM on system start and sits there directing the operation of the phone.
Kernel devs work on making sure the hardware and the android runtime work perfectly together. Now, in this imperfect world, not all sources are open, even though they should be. and therein the issue lies.
If you want to compile android from source and make sure it works on your phone, first you need to make sure you have the kernel with all the changes(patches) to it made by the vendor (chap who made the phone and bullied you into buying it) to get it working on your hardware.
If you dont have that, you have to do it yourself. Or wait for someone else to do it.
once you can compile android and get it working on your phone with all the itty bitty hardware working A-OK.. then you can browse through the source, make changes as per your individual requirements and compile it into a ROM.
see the changes to the OS are separate from the changes to the kernel. The kernel changes are for hardware-software interaction so they are phone SPECIFIC.
but changes to your custom android OS (ROM) can be "cherry-picked" from other ROM/gerrit/AOSP/CM/AOKP sources and put inside your own source tree to get included in your build.
so if you have all the device / kernel stuff from a working android distribution, you can take the source of another android distribution and swap the device stuff into it and see if it works.
hope this helps.
wingie6200 said:
These changes you are talking about can be done. They are system changes so not supported by the android app installer.
Eg: Your notification drawer, status bar are part of SystemUI.apk. The source for this is can be found in the AOSP source code under android/frameworks/base/...
You can make your modifications, compile it into an apk and then make a flashable zip to replace the current one (or push it via a rooted adb console).
or you can compile the entire source code into a flashable zip (eg CM7,9 etc..) and use it a replacement ROM with your modifications.
This is the line between an application under the android runtime and the android runtime itself.
these files, under framework are part of the OS. so to provide a customized version of the operating itself is what people like to call ROMs.
Now ROMs (like any OS) are device dependant. Windows has the code to run in a lot of different hardware configs, but android aims to be small. It should have only the minimum required code to efficiently run itself on a device.
Thats the kernel. The kernel communicates with the hardware and so the rest of the hardware can happily talk to a working kernel and expect the hardware to function as advertised. Kernel is a simple program which goes into the RAM on system start and sits there directing the operation of the phone.
Kernel devs work on making sure the hardware and the android runtime work perfectly together. Now, in this imperfect world, not all sources are open, even though they should be. and therein the issue lies.
If you want to compile android from source and make sure it works on your phone, first you need to make sure you have the kernel with all the changes(patches) to it made by the vendor (chap who made the phone and bullied you into buying it) to get it working on your hardware.
If you dont have that, you have to do it yourself. Or wait for someone else to do it.
once you can compile android and get it working on your phone with all the itty bitty hardware working A-OK.. then you can browse through the source, make changes as per your individual requirements and compile it into a ROM.
see the changes to the OS are separate from the changes to the kernel. The kernel changes are for hardware-software interaction so they are phone SPECIFIC.
but changes to your custom android OS (ROM) can be "cherry-picked" from other ROM/gerrit/AOSP/CM/AOKP sources and put inside your own source tree to get included in your build.
so if you have all the device / kernel stuff from a working android distribution, you can take the source of another android distribution and swap the device stuff into it and see if it works.
hope this helps.
Click to expand...
Click to collapse
Thank you very very much for your explanation! It's a pity it's impossible to hit multiple times "Thanks".
I think I'm going to make a modified SystemUI.apk but you didn't tell the application launcher is also in this file. Did you just forget this or is this stored in another file/folder? And the lock screen? And I want also to replace the boot animation if it's possible.
If I take the source files of the SystemUI.apk of AOSP ICS, does this work on every phone running ICS? Included CM, AOKP and other (smaller) custom roms? And my last question: Since SystemUI.apk a apk file is, is it possible to edit these files through Eclipse and build it in Eclipse? Or do I get errors?
//Edit:
Still another question: How much work is it to, as example, port a modified Gingerbread SystemUI.apk to ICS? (Or vice versa)
WietsedeVries said:
Thank you very very much for your explanation! It's a pity it's impossible to hit multiple times "Thanks".
I think I'm going to make a modified SystemUI.apk but you didn't tell the application launcher is also in this file. Did you just forget this or is this stored in another file/folder? And the lock screen? And I want also to replace the boot animation if it's possible.
If I take the source files of the SystemUI.apk of AOSP ICS, does this work on every phone running ICS? Included CM, AOKP and other (smaller) custom roms? And my last question: Since SystemUI.apk a apk file is, is it possible to edit these files through Eclipse and build it in Eclipse? Or do I get errors?
//Edit:
Still another question: How much work is it to, as example, port a modified Gingerbread SystemUI.apk to ICS? (Or vice versa)
Click to expand...
Click to collapse
Only way is through exchanging the png files since porting the whole .apk is impossible.
Sent from my Jelly Beaned Ace
Thanks for the answer. And do you also know the answers of the other questions?
Sent from my GT-S5660 using xda app-developers app
WietsedeVries said:
If I take the source files of the SystemUI.apk of AOSP ICS, does this work on every phone running ICS? Included CM, AOKP and other (smaller) custom roms? And my last question: Since SystemUI.apk a apk file is, is it possible to edit these files through Eclipse and build it in Eclipse? Or do I get errors?
//Edit:
Still another question: How much work is it to, as example, port a modified Gingerbread SystemUI.apk to ICS? (Or vice versa)
Click to expand...
Click to collapse
There are two roads you can go now - one is use apktool to *decompile* apk the apk file that you've taken from your phone, it doesnt convert the app to java source code but java bytecode in .smali files (like an assembly version of the source) but you will have access to the resource files (xml, images etc..) so you can replace them and create some new themes.
http://forum.xda-developers.com/showthread.php?t=1814441
http://forum.xda-developers.com/showthread.php?t=1760133
And no - a GB systemUI.apk will *NOT* work on ICS. It is very probable that any changes you make through any of these methods can brick you phone. So make sure you have CWM and a nandroid backup.
If you want to add/edit functionality within the source code of systemUI.apk, you need to learn how to compile Android from Source. i would suggest getting hold of the CyanogenMod source tree for your device and playing around with it.
Ginger bread is CM7 and ICS is CM9.
http://forum.xda-developers.com/showthread.php?t=1552090
once you have the full source tree, you'll find a folder called android/frameworks/base/core/...something../systemui/..
this will contain the javasource code for your application. Here you can edit stuff to your hearts content!
Note that this cannot be compiled standalone by eclipse. The Android build system must be used to compile this (cuz its a system app).
a nice resource i used when i was doing the same thing :laugh:
http://iserveandroid.blogspot.in/2011/01/how-to-implement-your-own-status-bar.html
cheers and have fun.

[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.

Want to start with AOSP JB 4.2 - experienced developers are welcome :)

Hi all,
i want to start with AOSP 4.2 for our SGS3 i9300 - is anybody interested to develop and publish a AOSP based rom with me?
I'm a real application developer (C,C++,JAVA,PHP,MySQL,some Oracle PLSQL) and now its some cold out - i have time to do
some nice things
I think a team of 2 or 3 developers should be enough to develop on this rom, as we can use a lot from AOSP 4.1.2
### EDIT
As long as no one has found to help, here a short description of current progress:
- Code is pure based on AOSP 4.2 but some snippets of CyanogenMod to bring up hardware (camera,graphics,audio)
- Device is bootable (no other boot.img required anymore)
- Bootanimation is working
- Mount of partitions is working
- Deodexing is working
- adb, debuggerd and root access is working
Not working: a lot
- Graphic not working perfect, needs a kernel patch or a working gralloc/hwcomposer/hwconverter to work without laggy PMEM)
- Camera can not be activated due to a missing function call (undefined reference, maybe it can be solved with a newer driver)
- Audio: missing speaker device (Code have to reworked to work with stagefright and tinyalsa libs)
- USB/internal SDCard: cant be mounted (error message sounds like the device is mounted twice, have to find the error in init process)
- RIL not working (Java file from CM10 have to be integrated in frameworks/opt/telephony)
Currently, i'm working on the Graphic problem and USB part to bring up the device to a stable UI
Way to go man. Good luck to you!
Good luck ...!! Im waiting
Sent from my GT-I9300 using xda premium
Good evening,
Well how have you imagined that? Do you have build something like that before or would this be your first attempts to build up a rom from scratch? Do you know what's all necessary to contribute for that?
I would try to help you, but I have clearly to say that I haven't done anything like this before. I'm in the last term of my study of technical computer sciences, working in a company as application programmer for C/C++ and Java(Android). Due to my studies I have also some knowledge about hardware programming, down to read/writing some code in assembler. I would be interested to this if I get introduced to the topic and some help with the necessary tool chain wouldn't hurt too ^^.
greetings
hop3l3ss1990 said:
Good evening,
Well how have you imagined that? Do you have build something like that before or would this be your first attempts to build up a rom from scratch? Do you know what's all necessary to contribute for that?
I would try to help you, but I have clearly to say that I haven't done anything like this before. I'm in the last term of my study of technical computer sciences, working in a company as application programmer for C/C++ and Java(Android). Due to my studies I have also some knowledge about hardware programming, down to read/writing some code in assembler. I would be interested to this if I get introduced to the topic and some help with the necessary tool chain wouldn't hurt too ^^.
greetings
Click to expand...
Click to collapse
I have successfully built a rom in year 2010 for the LG-P500 device, based on CM7 and modified it in a strange way, so i included a lot of nice things
written from scratch - this rom was a unicate ... later, i developed the "Phoenix Launcher" for Gingerbread enabled devices, but its development is currently
frozen because its strange to support every or almost every device with a bugless launcher. In the last months i learned a lot about android and have to re-think about
what i'm able to do, and what i want to do. In the summer of 2011 i bought my SGS3, the first thing i was doing was to remove that samsung crap from my device and
have installed AOKP. So now it's time to do my own thing again - i want to have AOSP as i think for me its the best Android solution for myself and want to publish it
to other users who think "thats ok for me" too
In short, it doesnt matter if its your first rom - its enough if you know about basic things like "how is android doing all that nice things", "how to debug code", "how to fix
some bugs (even strange bugs)" and some experience with git and github. All other you can learn in a very short time - i've learned the most of things with try & error
andy572 said:
I have successfully built a rom in year 2010 for the LG-P500 device, based on CM7 and modified it in a strange way, so i included a lot of nice things
written from scratch - this rom was a unicate ... later, i developed the "Phoenix Launcher" for Gingerbread enabled devices, but its development is currently
frozen because its strange to support every or almost every device with a bugless launcher. In the last months i learned a lot about android and have to re-think about
what i'm able to do, and what i want to do. In the summer of 2011 i bought my SGS3, the first thing i was doing was to remove that samsung crap from my device and
have installed AOKP. So now it's time to do my own thing again - i want to have AOSP as i think for me its the best Android solution for myself and want to publish it
to other users who think "thats ok for me" too
In short, it doesnt matter if its your first rom - its enough if you know about basic things like "how is android doing all that nice things", "how to debug code", "how to fix
some bugs (even strange bugs)" and some experience with git and github. All other you can learn in a very short time - i've learned the most of things with try & error
Click to expand...
Click to collapse
This all sounds interesting for me and yes I like the idea of developing a own clean rom with some cool additional stuff, too. But what would be the first steps to a new rom? Have you begun with all the administration stuff like setting up a new gitrepo, make a to do list etc...?
I think Code debugging and writing some new stuff wouldn't be a problem for me but what are you meaning excactly with "how is android doing all that nice things"? How it build up, deep level architecture? Well, I know how the "normal" Linux system is working, how modules are getting loaded into the kernel... But how this is correctly working on android I have to learn at first and if there is a chance to do that I would do it
Currently on my S3 is SlimBean and till that there is still no update to 4.2 I'm happy with it, but exploring something new would be pretty cool
Do you have an IRC chat room or something like that? I've to go offline now, my girlfriend wants more attention.^^ But If you want, I' m willing to try to contribute to the rom
PS. I'm sorry for my bad English and hope its understandable, but outside from here you can talk to me in German ^^
If you want to help the AOSP experience on our phones the best place to do it is with the CyanogenMod guys. You'll find pretty much everything based on AOSP (including people that port Vanilla AOSP and AOKP) is using a CM kernel.
They're likely working on the merge now in terms of getting CM10.1 out (with Android 4.2) but most of our CM guys are pretty burned out on working with Samsung's subpar reference material to get basic stuff working (mostly HWC). If you think you could help with this, this would be provide a massive boost to the whole community that want to run these phones on an AOSP based ROM and they would be very grateful.
Gotta warn you though it sounds like it'll be an uphill struggle to get the rest of the stuff working right; unless Samsung release some decent sources for HWC.
Currently i have only downloaded the AOSP sources and started to integrate most of the configs. Currently it cant compile because AOSP is not AOKP/CM10
where i got the device and vendor directories, so i have to make some changes in the basic system. if it's compiling to the end, i open a fresh github account
and upload all my modifications. The compile process stops currently on audio,OMX plugins, graphics and camera - most of that are small pieces of changes
i have to make - i think, tomorrow (its monday in germany here) i can upload all and then we can start to develop on
andy572 said:
Currently i have only downloaded the AOSP sources and started to integrate most of the configs. Currently it cant compile because AOSP is not AOKP/CM10
where i got the device and vendor directories, so i have to make some changes in the basic system. if it's compiling to the end, i open a fresh github account
and upload all my modifications. The compile process stops currently on audio,OMX plugins, graphics and camera - most of that are small pieces of changes
i have to make - i think, tomorrow (its monday in germany here) i can upload all and then we can start to develop on
Click to expand...
Click to collapse
Wish i could help (just started learning JAVA ) ! gl with this awesome project
Nice to see you here, I remember you from the P500 forums.
Xda user krarvind should be able to give you some useful hints, you will have to contact him through the RD forum as his pm is locked down, or I could possibly put him in contact with you
slaphead20 said:
Xda user krarvind should be able to give you some useful hints, you will have to contact him through the RD forum as his pm is locked down, or I could possibly put him in contact with you
Click to expand...
Click to collapse
Thank you, it would be nice if you can contact him
andy572 said:
Thank you, it would be nice if you can contact him
Click to expand...
Click to collapse
Ok, will mention it to him
andy572 said:
Currently i have only downloaded the AOSP sources and started to integrate most of the configs. Currently it cant compile because AOSP is not AOKP/CM10
where i got the device and vendor directories, so i have to make some changes in the basic system. if it's compiling to the end, i open a fresh github account
and upload all my modifications. The compile process stops currently on audio,OMX plugins, graphics and camera - most of that are small pieces of changes
i have to make - i think, tomorrow (its monday in germany here) i can upload all and then we can start to develop on
Click to expand...
Click to collapse
How it's going forward?
Maybe it could be useful to publish the github link when it's ready and some more information like staus, on first post
In the next days I have some trouble with my exams ( in two weeks I'm completely finished with my studies ^^) but I think if there is something to do I'll find some time to work on.
Good Luck Dude~
I haven't tried AOSP yet.
Hope someday i can give it a go.:silly:
hop3l3ss1990 said:
How it's going forward?
Maybe it could be useful to publish the github link when it's ready and some more information like staus, on first post
In the next days I have some trouble with my exams ( in two weeks I'm completely finished with my studies ^^) but I think if there is something to do I'll find some time to work on.
Click to expand...
Click to collapse
current state:
- patched android/build so we can compile the kernel within the main compile process
- patched android/build main.mk file so we can use OpenJDK or Oracle JDK
- added android/vendor/aokp and android/vendor/samsung tree from AOKP (its the most useful directory structure)
- added android/hardware from AOKP so we have all that Exynos things that are needed, even by AOSP
- modified android/frameworks/native/include so a OMX Plugin header can be found
- modified android/libhardware and patched gralloc module
currently it compiles to the Webkit library, most of all apps, libs and binaries are building without errors - the next problem
to solve is the PRODUCT_COPY_FILES ****: nothing of proprietary files are copied to the android/out directory, seems like
a bug in android/build too.
For only 2 days trying to compile to the end without errors its a very good cut
here we go: it compiles to the end and a flashable "JOP40" zip could be created
tryed to flash, but it gives errors in CWM: have to remove the recovery folder and the recovery.sh file from etc folder in the ota zip file, but it doesnt boot up - got a black screen only.
do we need a new or patched kernel instead the CM10 smdk421x one?
Well does it have all the closed source libraries fron the phone? If not, it wont boot. Dont think i am calling you stupid, you obviously know what you are doing, but maybe you forgot. Idk. Check that. Try running a log cat and debug that.
Sent from my GT-I9300 using xda premium
b-eock said:
Well does it have all the closed source libraries fron the phone? If not, it wont boot. Dont think i am calling you stupid, you obviously know what you are doing, but maybe you forgot. Idk. Check that. Try running a log cat and debug that.
Sent from my GT-I9300 using xda premium
Click to expand...
Click to collapse
Thanks for the hint, yes i have all files included - i cant connect to adb, i see only small colored point on the top left side and a sensor
is red blinking (the one to the right of the speaker.
That would be the proximity sensor near the top front speaker. Cant connect, adb binary in /system/bin or xbin?
Sent from my GT-I9300 using xda premium

Porting htc one roms to the max?

hey guys, just wondering how difficult it would be to do this and keep the finger print scanner. i (with no android developing experience) tried following a few tuts to try and port a 4.3 rom with little success, i managed to get it to start installing in cwm then to give a permission failure or something similar so yeah just a quick question
+1
Sent from my SM-N900V using Tapatalk
hectorz321 said:
hey guys, just wondering how difficult it would be to do this and keep the finger print scanner. i (with no android developing experience) tried following a few tuts to try and port a 4.3 rom with little success, i managed to get it to start installing in cwm then to give a permission failure or something similar so yeah just a quick question
Click to expand...
Click to collapse
Permission failure? Noob here too
I am guessing the ROM you tried to port checks for the Model number of the phone before flashing. What ROM did you try to port to and if you could post the instructions here we will make this the porting thread
Given that HTC One has all the custom ROM's and kernels we need devs or someone like us who can follow instructions to start doing it. I am sure we will get help from one another and end up with custom ROM's for the MAX.
I was also thinking of doing this but just to start with i don't want to look at the fingerprint scanner and may be later we could get it working.
I am certain most people would be willing to not have a working fingerprint scanner, as a trade off for a few custom roms/kernels...
Well to start you need to make sure your Meta-Inf directory is one from the Max, you should be porting from something with the same board as well which would give you less headaches in the long run. The One would be a good starting port since they use the same boards (msm8960 Snapdragon 600) The updater script in Meta-Inf needs to be pointing to the correct device. For example and this is just an example in the beginning of the updater script which is really the instructions for flashing the rom in recovery shouldn't say something like "get prop blah blah m7vzw" the m7 being the model # should be t6vzw if you were using a Verizon device etc etc.. All mount points need to be exactly what the Max's mount points are otherwise it will never flash.. The original One mount points aren't the same as the One Max. Also the kernel from the Max is a must, plus in system/lib you need the modules as well as hardware. In system/bin you need vold, vold is device specific. In system/etc you need vold.fstab again device specific stuff. The you need the hardware directory, which is touch capacitive buttons and LED's and what not. Those may be the same as the One since they are laid out the same.. The audio should most likely be the same but you would need to remove all the Beats Audio crap from system/etc since the One Max isn't a beats device.. GSM to GSM may be an easy port, CDMA to CDMA may be a little more difficult. Although they use libril-qc-qmi-1.so I think it is, that may be a typo but that's something like what the lib path will point to, the code may be slightly different in telephony for CDMA LTE devices. That would be found in framework.jar if applicable framework2.jar..
I could most likely easily get a port done, I'm just very limited to time.. Some of the tutorials out there are very generic and would kind of work well if you have 2 very identical devices with minor changes and manufactured around the same time small example would be like the HTC Desire and the HTC Thunderbolt.. That's a pretty straight forward port with some minor audio tweaks since sound image in system/etc is different and that as well are devices that would require a RIL hack as stated above with framework.jar... That right there would be strictly smali/baksmali hacking which I have some knowledge with but by no means a master of it lol... That is unless we had source for certain things but that isn't likely by no means... If anyone is interested in getting to work I'm more then willing I just sometimes have a hectic schedule... There is more to porting then just a few quick changes if you want a clean solid daily driver port... I started to port MIUI V5 just haven't really had much of a chance to test it. I have 3 MIUI ports built all slightly altered to eventually test different hacks..
The reason I chose MIUI V5 to port is because a good deal of HTC MIUI ROMs are based heavily on Sense.. Not many of them are AOSP based anymore which to me is kind of a shame.... The Chinese must have gotten tired of so many ports popping up with a lot of broken stuff because they all use to be AOSP based and to get them ported required a ton smali hacks and now when you decompile an actual source built official chinese MIUI rom and you diff out lets say services.jar from CM and services.jar from MIUI for every line of code like cdmareceiver.smali in CM in MIUI it's i.smali then cdmareceiver$1.smali in CM in MIUI it's 23.smali.... Those aren't actual lines those are just examples but they made it damn near impossible to properly diff stuff out.. You'd literally have to go through thousands and thousands upon thousands of lines to figure out which matches what and then make the changes you feel like need to be made and then hope you didn't break something in the process.... It sucks lol...
So yeah most of the HTC devices are now MIUI converted Sense based builds and I'm hoping are a little easier to port with less changes!! But I guess we'll see?!?!
Like I said, anyone wanting to work with me I will be more then glad to lend my knowledge of Android! I need someone to get me motivated again. I really miss working on Android and building stuff porting stuff whatever.. It's just fun! Plus we desperately need some form of a custom Android really really bad.... All of us do... I mean I'm Verizon, but Sprint, the International crew, all of us....
Lets pool all of our knowledge together and do some work!!! To all reading this if you are down contact me in this thread or PM me and lets get busy!
Murrda said:
Well to start you need to make sure your Meta-Inf directory is one from the Max, you should be porting from something with the same board as well which would give you less headaches in the long run. The One would be a good starting port since they use the same boards (msm8960 Snapdragon 600) The updater script in Meta-Inf needs to be pointing to the correct device. For example and this is just an example in the beginning of the updater script which is really the instructions for flashing the rom in recovery shouldn't say something like "get prop blah blah m7vzw" the m7 being the model # should be t6vzw if you were using a Verizon device etc etc.. All mount points need to be exactly what the Max's mount points are otherwise it will never flash.. The original One mount points aren't the same as the One Max. Also the kernel from the Max is a must, plus in system/lib you need the modules as well as hardware. In system/bin you need vold, vold is device specific. In system/etc you need vold.fstab again device specific stuff. The you need the hardware directory, which is touch capacitive buttons and LED's and what not. Those may be the same as the One since they are laid out the same.. The audio should most likely be the same but you would need to remove all the Beats Audio crap from system/etc since the One Max isn't a beats device.. GSM to GSM may be an easy port, CDMA to CDMA may be a little more difficult. Although they use libril-qc-qmi-1.so I think it is, that may be a typo but that's something like what the lib path will point to, the code may be slightly different in telephony for CDMA LTE devices. That would be found in framework.jar if applicable framework2.jar..
I could most likely easily get a port done, I'm just very limited to time.. Some of the tutorials out there are very generic and would kind of work well if you have 2 very identical devices with minor changes and manufactured around the same time small example would be like the HTC Desire and the HTC Thunderbolt.. That's a pretty straight forward port with some minor audio tweaks since sound image in system/etc is different and that as well are devices that would require a RIL hack as stated above with framework.jar... That right there would be strictly smali/baksmali hacking which I have some knowledge with but by no means a master of it lol... That is unless we had source for certain things but that isn't likely by no means... If anyone is interested in getting to work I'm more then willing I just sometimes have a hectic schedule... There is more to porting then just a few quick changes if you want a clean solid daily driver port... I started to port MIUI V5 just haven't really had much of a chance to test it. I have 3 MIUI ports built all slightly altered to eventually test different hacks..
The reason I chose MIUI V5 to port is because a good deal of HTC MIUI ROMs are based heavily on Sense.. Not many of them are AOSP based anymore which to me is kind of a shame.... The Chinese must have gotten tired of so many ports popping up with a lot of broken stuff because they all use to be AOSP based and to get them ported required a ton smali hacks and now when you decompile an actual source built official chinese MIUI rom and you diff out lets say services.jar from CM and services.jar from MIUI for every line of code like cdmareceiver.smali in CM in MIUI it's i.smali then cdmareceiver$1.smali in CM in MIUI it's 23.smali.... Those aren't actual lines those are just examples but they made it damn near impossible to properly diff stuff out.. You'd literally have to go through thousands and thousands upon thousands of lines to figure out which matches what and then make the changes you feel like need to be made and then hope you didn't break something in the process.... It sucks lol...
So yeah most of the HTC devices are now MIUI converted Sense based builds and I'm hoping are a little easier to port with less changes!! But I guess we'll see?!?!
Like I said, anyone wanting to work with me I will be more then glad to lend my knowledge of Android! I need someone to get me motivated again. I really miss working on Android and building stuff porting stuff whatever.. It's just fun! Plus we desperately need some form of a custom Android really really bad.... All of us do... I mean I'm Verizon, but Sprint, the International crew, all of us....
Lets pool all of our knowledge together and do some work!!! To all reading this if you are down contact me in this thread or PM me and lets get busy!
Click to expand...
Click to collapse
this was exciting to read, best of luck
I am going to get Ubuntu installed today and then Android Kitchen here i come!
pradeepvizz said:
I am going to get Ubuntu installed today and then Android Kitchen here i come!
Click to expand...
Click to collapse
You can always use Cygwin on windows. there is a how to cook a rom tutorial in the General Android Dev forum.
DeadPhoenix said:
You can always use Cygwin on windows. there is a how to cook a rom tutorial in the General Android Dev forum.
Click to expand...
Click to collapse
Thanks, i just installed it via virtual box without disturbing my system.
Just got android kitchen up and running, on prting sides of things got further this time, into aroma installes but error 7 which suggested earlyer is to do with mount points, if anyone could happen to help with theese it would be fab ))
Ok this is good start, i am proud of us here
I have got Android Kitchen running on my Ubuntu via virtual box.
I tried to set my working folder and tried tried to import my TWRP stock ROM backup. It seems like Android kitchen will require a CWM backup and TWRP does not seems to work.
With the TWRP backup i got this error
NON-YAFFS/NON-TAR FILE FORMAT DETECTED IN ROM
Click to expand...
Click to collapse
So i have just restored stock ROM on my phone, flashed CWM and now backing up my Stock ROM to COOK ANDROID
@[email protected] did you miss this thread just kidding, I know you have got a hectic schedule.
Again i am extremely happy to see ppl starting to develop ROM's!
Thanks for your encouragement @Murrda
No problem.. I'm home from work already and I'm off for the next 3 days so I'm actually going to get back to working on some ports. Anyone need a hand with anything as far as questions or setting up Linux or a dev environment please feel free to hit me up!
pradeepvizz said:
Ok this is good start, i am proud of us here
I have got Android Kitchen running on my Ubuntu via virtual box.
I tried to set my working folder and tried tried to import my TWRP stock ROM backup. It seems like Android kitchen will require a CWM backup and TWRP does not seems to work.
With the TWRP backup i got this error
So i have just restored stock ROM on my phone, flashed CWM and now backing up my Stock ROM to COOK ANDROID
@[email protected] did you miss this thread just kidding, I know you have got a hectic schedule.
Again i am extremely happy to see ppl starting to develop ROM's!
Thanks for your encouragement @Murrda
Click to expand...
Click to collapse
Murrda said:
No problem.. I'm home from work already and I'm off for the next 3 days so I'm actually going to get back to working on some ports. Anyone need a hand with anything as far as questions or setting up Linux or a dev environment please feel free to hit me up!
Click to expand...
Click to collapse
heyy i could use some help doing this part in android kitchen. straight from android kitchens page but i can't seem to get the recovery.fstab out anyway! im on t6ul verson of the max by the way thanks
/HIDE (sorry dont know how to get this to work (forum noob here too)
Create a file under the kitchen's /tools/edify_defs folder, with the name being the same as the value of ro.product.device (found in your device's /system/build.prop file).
If the stock ROM images for your device contain the recovery.img file, extract its files from the kitchen menu: Advanced --> Tools for boot image --> Extract from boot.img/recovery.img in any folder. Then, open up its ramdisk folder, and look for /system/etc/recovery.fstab or /etc/recovery.fstab or similar FSTAB file location. Open this file to find the mount points.
See the template file in the edify_defs folder to see how to set the mount points inside the file you created. Look at the other files in that folder for examples on how to do it.
managed to flash something and get mounting things sorted ))), getting an interesting navy green screen when booting now, will let you know on further developments. its a vanilla android rom i tried insertcoin-m7-google-edition_5.0-1 to be exact
hectorz321 said:
managed to flash something and get mounting things sorted ))), getting an interesting navy green screen when booting now, will let you know on further developments. its a vanilla android rom i tried insertcoin-m7-google-edition_5.0-1 to be exact
Click to expand...
Click to collapse
Good start mate! awesome!
update, getting a boot logo now which is great but im in a bootloop and have no idea where to start, iv been looking on trying to get logcat and such running but no success yet. Any advise anyone?
hectorz321 said:
update, getting a boot logo now which is great but im in a bootloop and have no idea where to start, iv been looking on trying to get logcat and such running but no success yet. Any advise anyone?
Click to expand...
Click to collapse
Which guide are you following? i just cooked a ROM today first time. I made the stock ROM for the T6UL.
---------- Post added at 08:34 PM ---------- Previous post was at 08:34 PM ----------
ooo, Merry Christmas everyone
Yeah I've been trying to port gpe over to the max but I think I need the gpe kernel ported too.. I used the Max Sense kernel for it and I get a bootloop or frozen boot logo after install with no hope of getting a logcat. I didn't move the Max sense update-binary but don't think that would be an issue, both since Its gpe and I'm using aroma..
Sent from my HTC One using XDA Premium 4 mobile app
HolyAngel said:
Yeah I've been trying to port gpe over to the max but I think I need the gpe kernel ported too.. I used the Max Sense kernel for it and I get a bootloop or frozen boot logo after install with no hope of getting a logcat. I didn't move the Max sense update-binary but don't think that would be an issue, both since Its gpe and I'm using aroma..
Sent from my HTC One using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Got to exactly the same point as you, reading several tutorials online i came across this interesting line "To port Sense you have to unpack the boot.img of your base rom and edit the init.rc to change the bootclasspath and match it with the port one" which is what iv done but also got stuck in a bootloop, looking at the two kernels are are a few differences in them. I think that might be they key.
hectorz321 said:
Got to exactly the same point as you, reading several tutorials online i came across this interesting line "To port Sense you have to unpack the boot.img of your base rom and edit the init.rc to change the bootclasspath and match it with the port one" which is what iv done but also got stuck in a bootloop, looking at the two kernels are are a few differences in them. I think that might be they key.
Click to expand...
Click to collapse
Yeah, i know for the kernel, without being able to mess with the zimage, the sense max kernel lacks the init.environ.rc from gpe, the fstab file is different(at least file extension), and there's a few things that point to sense files or folders that don't exist on gpe. Currently there is no released source for the max yet :'( so unless someone knows how to do it manually and hasn't shared HOW to do so, I just have to wait.. Hopefully it won't be too long.
Sent from my HTC One using XDA Premium 4 mobile app

[Q] Migration of a ROM 2.3 To 4. Where to begin?

Hi to all!
I am new in the Android world and I have a mutimidia car system with Android 2.3.4.
The problem i have is to install new applications available on the playstore like Viago.
This application requires at least Android. I have the Android 2.3.4 ROM soucecode and my doubt is if can i make a compilation of the ROM, to upgrada to Android 4 just modifying the sourcecode of the ROM i have.
Or if can i use any other V4 stock ROM, and add the kernel i have and cook it together.
Thanks in advance.
c_verri said:
Hi to all!
I am new in the Android world and I have a mutimidia car system with Android 2.3.4.
The problem i have is to install new applications available on the playstore like Viago.
This application requires at least Android. I have the Android 2.3.4 ROM soucecode and my doubt is if can i make a compilation of the ROM, to upgrada to Android 4 just modifying the sourcecode of the ROM i have.
Or if can i use any other V4 stock ROM, and add the kernel i have and cook it together.
Thanks in advance.
Click to expand...
Click to collapse
Well, what you could do is modify the AndroidManifest.xml in the apk file so that the minSdkVersion is set to API 10. so it would look like this:
minSdkVersion="resource_id:0x10"
Make sure that the app does not require any features that are not in Gingerbread. I hope this helps.
rcunningham said:
Well, what you could do is modify the AndroidManifest.xml in the apk file so that the minSdkVersion is set to API 10. so it would look like this:
minSdkVersion="resource_id:0x10"
Make sure that the app does not require any features that are not in Gingerbread. I hope this helps.
Click to expand...
Click to collapse
Thanks for your quick response. I have some trouble. When I decompile the apk, i am having some errors and dont know what to do. The apk is fully functional in my s4 mini With Android 4.2. this apk (garmin viago) and apktool are not good friends. Initially there are some errors with .9.png images, i've made the Changes in the AndroidManifest.xml and then a recompiled the apk. The result: More and more errors. The only i want to do is modify the min sdk to 10. I Dont know where to follow.
c_verri said:
Thanks for your quick response. I have some trouble. When I decompile the apk, i am having some errors and dont know what to do. The apk is fully functional in my s4 mini With Android 4.2. this apk (garmin viago) and apktool are not good friends. Initially there are some errors with .9.png images, i've made the Changes in the AndroidManifest.xml and then a recompiled the apk. The result: More and more errors. The only i want to do is modify the min sdk to 10. I Dont know where to follow.
Click to expand...
Click to collapse
Trying to get a apk file from Android 4.2 to work on Gingerbread is hard. Getting a apk from ICS to work on Gingerbread is much more simple. But if you only make changes to the AndroidManifest.xml everything should work. If you have more issues, message me on XDA and I could help you a bit more. I might get marked as spam if I post on this page to much.

Categories

Resources