Fixing boot on custom kernels support that targets CyanogenMod - Miscellaneous Android Development

I get a lot of question that my custom kernel breaks support their own AOSP-based ROMs.
So I'm here to how to fix that from your side.
The culprit is CyanogenMod's /init.environ.rc.
CM has been messing around that in recent months.
Changing BOOTCLASSPATH does not break cross-compatibility between different AOSP forks, as long as they don't remove stuffs and just adds stuff.
The problem is SYSTEMSERVERCLASSPATH. If any new stuffs are added, Android RunTime will just abort itself and refuse to boot.
And recently, CyanogenMod added Cyanogen Platform API.
That additionally adds /system/framework/org.cyanogenmod.platform.jar to the /init.environ.rc's SYSTEMSERVERCLASSPATH.
That breaks other AOSP-forks that doesn't use Cyanogen Platform API.
So those ROM developers have 3 options.
They can..
1. Just go and use Cyanogen Platform API. Undoubtedly, this would be super hard if your ROM is not already based on CyanogenMod.
2. Ask custom kernel developers to release a separate version just for your ROM. Very unlikely.
3. Solution below.
Most elegant solution I ended up so far is patch your Android RunTime(android_art) to just bypass extra SYSTEMSERVERCLASSPATH.
Just go to art/runtime/native/dalvik_system_DexFile.cc.
Around line 380..
Code:
diff --git a/runtime/native/dalvik_system_DexFile.cc b/runtime/native/dalvik_system_DexFile.cc
index 3298b46..50aa44c 100644
--- a/runtime/native/dalvik_system_DexFile.cc
+++ b/runtime/native/dalvik_system_DexFile.cc
@@ -382,14 +382,6 @@ static jbyte IsDexOptNeededInternal(JNIEnv* env, const char* filename,
// Logging of reason for returning kDexoptNeeded or kPatchoatNeeded.
const bool kReasonLogging = true;
- if ((filename == nullptr) || !OS::FileExists(filename)) {
- LOG(ERROR) << "DexFile_isDexOptNeeded file '" << filename << "' does not exist";
- ScopedLocalRef<jclass> fnfe(env, env->FindClass("java/io/FileNotFoundException"));
- const char* message = (filename == nullptr) ? "<empty file name>" : filename;
- env->ThrowNew(fnfe.get(), message);
- return kUpToDate;
- }
-
// Always treat elements of the bootclasspath as up-to-date. The
// fact that code is running at all means that this should be true.
Runtime* runtime = Runtime::Current();
Remove those 7 lines and your ROM will be now compatible with custom kernels targeting CyanogenMod.
(Git style patch is added for 'git am' command. I'd appreciate it if you maintain Git repository, apply that Git patch for authorship.)
The only problem so far would be that this will break compatibility with Xposed, which replaces Android RunTime thus reverting this modification.

Related

[ROM] EzGingerbread (Dream and Sapphire) stable-v1.0 2011-12-04

[size=+3]EzGingerbread[/size]
(Latest release: stable v1.0)
Welcome to the ezGingerbread Rom and Development thread
Here we discuss building, testing, and patching a basic gingerbread build for the Dream Sapphire platform.
The goal is for this to be a reasonably bare bones build gingerbread build; Focusing on memory and speed performance.
[size=+2]Installation Guide (of Binaries)[/size]
While ezGingerbread remains as open source as possible this sections will provide some pointers to installing the latest distributed binary.
(The following is automatically done if installed via Rom Manager)
Requirements
EzGingerbread works on most 32b Dream, 32b Magic (MT3G), and 32a magic devices running 2.22, and/or 3.22 radios, and will auto detect the correct configuration on install.
However the following configurations are optimal:
32b Dream: Radio-2.22.28.25 and SPL 1.33.0013d are recommended
32b Sapphire: Radio-2.22.28.25 and either SPL 1.33.0013d or 1.33.0013 (if the SPL is not already installed I recommend 1.33.0013d)
32a Sapphire w/ audio plug (ie MT2.1/fender): Radio-2.22.28.25 and either SPL 1.33.0013d or 1.33.0013 (This is likely what you already have installed, if you don't have this and your phone works you likely you don't have a MT2.1/fender)
32a Classic (no audio plug): Radio 3.22.20.17 + any SPL (however 1.33.2009 or 1.33.2010 may be better) [Note 6.x radio will not work with this rom]
Users of customMTD must have an 87 Meg system '87 2' is common. There is no need to flash the cMTD boot patch as the rom installer automatically patches the boot image for cMTD.
Download Rom related files
> The ROM: GINGERBREAD-DS-Stable-v1.0-20111204.zip (md5: 2ae9f618b0650c98b9621b37ad7e8596)
> GAPPS: gapps-mdpi-gb-20110709_S.zip (mirror)(mirror 2 -- dead) (md5: 6f9a6d27cce1f58be1f34f696212d326)
> GPRS Patch (optional but recommended) gprs_patch_S.zip (md5: fa259735ca394a650710e6b26673c91a)
> Alt Launcher [Zeam] Completely optional, but for those that want a smaller launcher, or just intend to replace the default (Launcher2) anyway with a market download this may apply to you, Note its an older version, and the newer market version has been slightly unstable:
ezgb_ZeamReplacement2_S.zip (md5: 6416ec0efa15f92f3d36f6ec6b524a11)
Language Port/Pack File
If you use (German, English, Spanish, French, Italian, Japanese, Korean, Polish, Portuguese, Russian, and Chinese)
These are contained in the base rom, do not download a language pack.
If you use (Bulgarian, Czech, Danish, Greek, Finnish, Hungarian, Dutch, Slovak, Serbian, Swedish, Tagalog, Turkish, Ukrainian)
These require lang pack 1:
EZGB_lang1_20111204_S.zip MD5: 37ee9cbf4f4c80a4b5fd96269332b853
Copy Files to the phone
Copy all the downloaded zip packages to your SD Card, Remember Ra-Recovery users must put them on the root of the sd-card.
wipe or not to wipe, and other preparations
> Users upgrading from
GINGERBREAD-DS-Alpha-20110509-1, Beta builds, or the Gamma build
There is no need to wipe as long as you wiped when you first installed one of these versions of ezGingerbread. You are however encouraged to uninstall SetCPU or other overclock software, and backup your rom before installing. (if the new built in CPU Speed function is not to your liking feel free to disable and re-install the 3rd party overclock software after upgrading)
> Users New to ezGingerbread (upgrading from a different rom)
You are encouraged to wipe before installing, however feel free to use Titanium or other utility to back up your application and application data to be restored after installation.
Installing the rom
flash in the following Order:
> GINGERBREAD-DS-Stable-v1.0-20111204.zip
> [If you need it] EZGB_lang1_20111204_S.zip
> gapps-mdpi-gb-20110709_S.zip
> [optional but recommended] gprs_patch_S.zip
> [if you chose it] ezgb_ZeamReplacement2_S.zip
Reboot
Reboot the phone and wait for the screen to dim before interacting with the phone
(First boot will take additional time; longer if you had many applications installed and are doing a no-wipe upgrade)
[size=+2]Tips and Tricks[/size]
Now that the system is installed I have some pointers to making the system as fast as possible, you may ignore these if you really must have something they don't allow but if the phone runs slower you know why:
Tip 1: Google Maps: If you can live without it the phone will be much more stable.. (Maybe using mapquest as an alternative) However if you really do need Google Maps note the newer versions require much more resources than the older ones.
If you must have google maps try an older version rather than maps 5+
Google Maps 4.7 (mirror) MD5: b8c558351949be97eb8703d1f4a05807 (download/place on SD card and install with File Manager)
Brut Maps based on Maps v4.6
Tip 2: Facebook: Well I can't say facebook was ever fast on our slow Dream, but the most resent versions run an "Upload Service" 24/7 in the background eating much unnecessary ram.. v1.6.4 is the newest version I know of without this behavior.
Tip 3: Apps2SD, well best to keep apps you want to use frequently of quickly on the system, but to enable Apps2SDext if you have an ext partition here are the directions:
> goto settings->Applications->Development
> Check SD-EXT
> Reboot
> Now you can use the Manager Applications screen to move apps to/from sd-ext .. if you want sd-ext to be the default install location choose it in Settings->Applications->Preferred install Location
> Data2sd will move all your application data to the sd-ext partition.. this will significantly slow down the phone thus best to leave unchecked.
Tip 4: SuperUser
The system by default prevents the update of superuser or anything signed with the same key (such as superuser elite); to temporary lift this restriction goto Settings->Applications->Development and check Update Superuser.
This will allow superuser to be updated, superuser elite to be installed/updated until reboot.
This ensures no application can change Superuser.apk on your behalf when you do not expect it thus can't grant themselves superuser access.
Tip 5: EzGb Extras
Settings->EzGingerbread Extras
This menu has historic "Spare Parts" funcitons, as well as other performance enhancements.
> Configure PowerWidget allows you to configure the powerbar widgets, when you are done configuring either reboot, or rotate the display to re-set the widget and see the update
> Incoming Call TouchUI - enables the slide to answer/end calls when a call comes in, rather than only being able to use send/end hardware buttons
> Busybox NTP Cliemt - If your phone is not keeping time, even with the sync to network time enabled, checking this may help keep the phone in sync with earthly time
> CPU Speeds, This lets you overclock and under volt, I recommend setting Min speed to 128000, leave Max screen off 480000, and max screen on may either stay 528000, or very slightly overclock to 537600. If you want the settings to apply after your next boot tap "Apply On Boot" if you have problems with the settings, before the screen turns off after boot enter this screen and tap "Reset CPU Settings" before rebooting again.
> Compcache RAM Usage, sets the amount of compcache, keep this as low as possible but not so low background services keep restarting.
> Use KSM Module, this may improve ram usage if checked, however may also slightly increase CPU usage and reduce battery life (all three results are very slight and thus hard to notice) no restart is required so test when/if it works best for you
> Window/Transition animatinos, since froyo animation times have been increased.. many find speeding these up make the rom feel more responsive as they are historically used to.
> End button behavior: choose "go to sleep"
> Haptic feedback/Compatibility Mode .. most will leave these alone
Tip 6: Surface Dithering:
Well this is a trade off [Settings->Display->Surface Dithering] if its checked the display may loose some more frames than if unchecked.. but some people rather loose the frames than see the artifacts left by skipping the dither, choose your poison and reboot
Tip 7: sync: disable what you can
Go into settings -> Accounts &sync
Tap your Google Id. Unless otherwise needed, unchecked Sync Picasa Web Albums, and Books
If you have Google plus you may also wish to disable Sync Instant Upload.
Historic versions, and additional addons can be found below in post 2
[size=+2]Kernels:[/size]
Regarding kernels: If you are looking for stand alone kernels (sometimes there is an update between official releases; or for use in other roms):
See the Stand Alone Kernel Post
The Stand Alone Kernel Post contains both the ezgb-2636 kernels and links to the tags in github they are built from.
[size=+2]Developers:[/size]
Developer's Guide (How to build ezGingerbread and the ezgb2636 kernel) is now on GitHub:
https://github.com/ezterry/manifest-gingerbread-DS/blob/gingerbread/README.mkdn
Includes instructions to fetch and build from source both ezGingerbread and its related kernel.
Binaries
"NIGHTLY" BINARIES:
Builds 20110116-1 and newer are EBI0/EBI1/2708+ auto kernel, Flash and the rom will install the correct kernel
Builds 20110107-1 and older are 2708+ kernel only
20111204-1: GINGERBREAD-DS-Stable-v1.0-20111204.zip
(md5: 2ae9f618b0650c98b9621b37ad7e8596)
Note: Release v1.0 (stable): clean resync with android.googlesource.com, Fix Japanese IME force quit, Update timezone data (removal of DST from the Moscow Time Zone), add libpico fix to build (fix text to speech force quit), Add Russian dictionary to keyboard, Fix SuperUser lock down to properly allow unmodified apk to be locked down, and cleanly allow update/elite install, update Superuser.apk, Force Quite fix on entering About Phone with no keyboard installed, some translations via AndDiSa, add new Cpu Speed settings to EzGb extras (note you will want to disable this if you wish to continue using 3rd party overclocking apps).
/
20111107-1: GINGERBREAD-DS-Gamma-20111107-1.zip
(md5: f57ebc7ccd0819e0536407d066f02c6b)
Note: Gamma release (beta+1): Kernel update to v1.5.2 w/ patches for time skew, updates to android 2.3.7, wifi lease fix, add pt_BR to language set, various framework patches fixes speedups from CM7, KSM (Kernel SamePage Merging) support to dalvik-vm with supporting kernels (eg: ezgb-2636) MMS Time display and MDPI icon from CM7, compress xbin and move various libs to a compressed xlib, compact (pngcrush + zip -9 resources.arsc) apks, superuser 3.0.6, Odex framework (shrinks the framework jars, and moves the framework dalvik-cache into system) EzGbExtras also now has options for KSM, Incoming Call TouchUI CompCache chooser, ntpd background service for better time sync. Security fixes based off digitalgardian certs, Settings no long has compcache (moved to EzGb Extras)
Edit 20111110:PICO Fix (ie: text to speech for navigation)
/
20110828-1: GINGERBREAD-DS-Beta-20110828.zip
(md5: 0161b47d36ce3ae24b85907fe19fe4ca)
Note: Kernel update to v1.5.1, Android update to 2.3.5, Pan networking from CM7 (allows bluetooth tethering without extra software, just link the devices and use tether to your phone) Gallery 3d: CM7 patches for MT zoom bug and MDPI patches, Phone: CM patches for 2g/3g power widgets toggle, framework updates thanks to AndDiSa/ADS Magpie, "Disk" (MTD) io enhancements, wifi renew logic described starting here; auto custom MTD via bootcmdutil (no need to flash boot patcher anymore) , some translation updates. Faster boot time patch from Firerat
Please read the security notice here regarding ca certs and DigiNotar
/
20110716-1: GINGERBREAD-DS-Beta-20110716.zip
(md5: 8c3293e26b6aef25851a9ce5c53fc81b)
Note: Kernel update to v1.5 (as previously released here, USB Accessory support working, update to minfree levels, improvements to services, statusbar power widgets (configure in Settigns->EzGingerbread Extras) Spare parts replaced with EzGb Extras, GPS improvements, HW3D settings improvements, please note gapps package 20110709 is recommended (however 20110508b should still work)
/
20110626-1: GINGERBREAD-DS-Beta-20110626.zip
(md5: d03a960c90b80eb077a1fe46581cc759)
Note: Kernel update to v1.4 (as released last week in the stand alone version, Fix out of space install bug when user had no sd-ext partition or sd-ext disabled, add option in Settings->Applications->Development to allow superuser updates until subsequent reboot, fix an outstanding reboot menu bug, superuser, and stability updates.
/
20110605-1: GINGERBREAD-DS-Beta-20110605.zip
(md5: fc2a33cad7affe4cf656067118eecfcb)
Note: Kernel update (Wifi disabled drain solved with hack, MMC temp log in ram for 30s after SMS details, Surface Dithering option added to Display settings, French translations, Update to services. Attention if you have long stalls after update/clean install run fix permissions [logcat shows CPU pegged], also its highly recommended to clear dalvik cache on the install of this rom.
/
20110529-1: GINGERBREAD-DS-Beta-20110529.zip (md5: 50fba2c5adabe0f83a4e4b9616680ba1)
Note: BETA!!!! Features magpie, to enable you first need to allow sd-ext to be mounted Settings->Applications->Development->Attempt to mount sd-ext.. Other features: Data 2 sd bind mount, touch screen edge bugfix, and some other bug fixes including many for better memory maintenance. Available on rom manger including options for gapps, zeam launcher and small older stable facebook [manual links below]
/
20110509-1: GINGERBREAD-DS-Alpha-20110509-1.zip (md5: e22dd434aa41cbdd744893951b12e5bc)
Note: Security updates, preventing Settings and Superuser apps to have another app using their keys on /data (this prevents a non-system app from having access to all your settings, or able to give its self root privileges), in addition I've changed the platform key, Kernel updates, swipe notification now visually swipes away (thanks to update in CyanogenMod), some settings tweaks, and minor bug fixes. Starting this version you must use GAPPS: 20110508b due to the new Platform key in use.
/
20110502-CheckPoint: GINGERBREAD-DS-CheckPoint-20110502.zip (md5: 5c0969ebf1209922add7a1e357d969ca)
Note: A re-sync with aosp to fix various bugs in the sync on 2011-05-01, APN now can be created w/o error [new IPV4/IPV6 protocol caused the confusion] various other projects got updates in AOSP as well synced into this build (additional CheckPoint build info here) ATTENTION: kernel update possible fix to camera and other crashes here for use with 20110425-1 and newer
/
20110501-CheckPoint: GINGERBREAD-DS-CheckPoint-20110501.zip (md5: d5a3765001f6fa69321bcffb642ce516)
Note: Checkpoint of the android-2.3.4 initial release. Updated to head of Gingerbread branch and the 2.3.4 release. Also renamed typo CompCache script and lowered 32b default CompCache to 8MB, 32a remains disabled by default. (build info here)
/
20110425-1: GINGERBREAD-DS-Alpha-20110425-1.zip (md5: d69b689e4aeb12335c6e67123abf20fd)
Note: New kernel 2.6.36.4-s1-ezgb-v1 / Built in zram compcache (default enabled on 32b, disabled on 32a) settable in Settings->Applications->CompCache; {requires kernel with built in zram module} / new lowmemorykiller min free and Home App memory levels for hopefully better memory use.
/
20110308-1: GINGERBREAD-DS-Alpha-20110308-1.zip (md5: bf0f6a922b3afd5c9faa15333b1e32f5)
Note: Update to android 2.3.3, add in white-listed unrestricted packages (fixes Facebook sync), Add build.trout to make dream not identify as sapphire, make sound recorder visible in launcher (was always included), include file manager (CM's version), allow download of all file types.
/
20110304-CheckPoint: GINGERBREAD-DS-CheckPoint-20110304.zip (md5: 715eba3cf37270a5ff3456c9e5c04563)
Note: Checkpoint of the android-2.3.2 ezGingerbread build; all future builds will be 2.3.3 See checkpoint information here
/
20110208-1: GINGERBREAD-DS-Alpha-20110208-1.zip (md5: 2211d8f9a1f8071b28734999d4908f3a)
Note: Added CM7 dictionaries to LatinIME (word auto completion), added pl_PL bringing supported locales to: en_US en_GB fr_FR it_IT de_DE es_ES ja_JP es_US ko_KR pl_PL pt_PT ru_RU zh_TW zh_CN (let me know if you have font issues), updated LatinIME touch logic, fix_permissions, enhanced blend/blur transforms to libsurfaceflinger.
/
20110129-1: GINGERBREAD-DS-Alpha-20110129-1.zip (md5: 87d74801b43fb97740799bacd8adccc7)
Note: Various patch sets from Cyanogen Mod 7: Javascript engine switched to V8, armv6j JIT and processor support (was previously v5), swipe to dismiss individual notification, some webkit and skia patches.. the combo of these among other things fixes gmail; Also pushed in this build to su from ChainsDD, build env updates (32bit builders, try a clean environment); some additional graphic speed enhancements.
/
20110122-1: GINGERBREAD-DS-Alpha-20110122-1.zip (md5: 74c081f42cb25cef79b5c6077866a239)
Note: some graphics framework updates, Superuser.apk, Fonts.sqf + fallback fonts (from issue 3), LiveWallpaper picker, busybox sh in use for all sh needs, super tiny toolkit.. and some small fixes. (For a terminal get one you like from market or elsewhere .. I just use connection bot for both local and remote)
/
20110117-1: GINGERBREAD-DS-Alpha-20110117-1.zip (md5: b6aa8732517f52565efac3d9febe0f5c)
Notes: GPS working, cleanup camera shim, update opengls and agl framework (video) details, builders please delete and regenerate your vendor/htc/sapphire directory (extract-files or unzip-files)
/
20110116-1: GINGERBREAD-DS-Alpha-20110116-1.zip (md5: aef05eef5e7be24e46d2f6cc70218c63)
Notes: Auto kernel (EBI1/EBI0/2708) using ez-exp20110109-cm binaries, Audio hack (corrects AudioPara4.csv on flash, gziped versions of all profiles in /system/etc/.audio/) SpareParts included, run-parts, fix modprobe (had wrong path for modules), modules.sqf
/
20110107-1: GINGERBREAD-DS-Alpha-20110107-1.zip (md5: 3f0cc16aac87a8ebc3f8c9aa3c11a3fe)
Notes: Updated proprietary files, video decoder now working in gallery3d, update internet calling permissions, fix a bug with restart menu.
/
20110103-1: GINGERBREAD-DS-Alpha-20110103-1.zip (md5: b81545dcbd5ae0f2da388d77aa3b5997)
Notes: fixed video recording thanks to CM framework patches (playback still fails), reboot power menu option thanks to CM, gsensor thanks to havlenapetr. Current Languages: en_US en_GB fr_FR it_IT de_DE es_ES ja_JP
/
20101222-1: GINGERBREAD-DS-Alpha-20101222-1.zip (md5: e16ac0bcfbf6c6e163410a3ded97fb8a)
Notes: first build released, kernel is my 2708+ port of the cm 285 nightly kernel, overall drawing speed increased.
/
20101219-1: GINGERBREAD-DS-Alpha-20101219-1.zip (md5: bef700cf0e04de003788365de469dd49)
Notes: first build released, kernel is my 20101106, better results with CM nightly or pershoot kernels however.
/
ADDONS:
Additional non-open addons that may be useful
Zeam Launcher By cloakt(replacing Launcher2 on system, also reduced to MDPI only):
ezgb_ZeamReplacement2_S.zip(md5: 6416ec0efa15f92f3d36f6ec6b524a11) [updated june 26th, 2011]​
LANGUAGE PACK1:
The packages above include support for: de, en, es, fr, it, ja, ko, pl, pt, ru, zh and are recommended for most users
If however your preferred language is not listed above, this LANG PACK 1 will replace the above languages with support for:
bg, cs, da, el, fi, hu, nl, sk, sr, sv, tl, tr, uk
Please download the version matching the ROM you are installing (see: adtl. details)
20111204-1:EZGB_lang1_20111204_S.zip(v1.0)
(md5: 37ee9cbf4f4c80a4b5fd96269332b853)
20111107-1:EZGB_lang1_20111107_S.zip
(md5: 957a943e10c81699070bd415d74ae9c8)
20110828-1:EZGB_lang1_20110828_S.zip
(md5: 054d28fe41976eabdb6d26b92bcfc045)
20110716-1:EZGB_lang1_20110716_S.zip
(md5: dfb83772e2a0d9edf6f72cdc23966e8b)
20110626-1:EZGB_lang1_20110626_S.zip
(md5: eb354f34573db67270da57cc27fa737b)
Mobile Data GPRS Tool:
A tool to update GPRS settings form gprsclass=10 to gprsclass=12 (also enables dtm)
Most users will experience better mobile network rates if they flash and choose yes, however if you run into problems simple re-flash choosing no to revert to the ezGingerbread defaults,
This tool will likely work on most Dream/Sapphire roms, however as always best to make a backup first
gprs_patch_S.zip
(md5: fa259735ca394a650710e6b26673c91a)​
GAPPS:
GAPPS: 20110709 (Please note if you are using 20110502-CheckPoint or an older build you must use gapps 20110205)
gapps-mdpi-gb-20110709_S.zip (mirror)(mirror 2 -- dead)
MD5: 6f9a6d27cce1f58be1f34f696212d326
Cleaner 2.3.4 gapps package, recommended over 20110508b. Restore from Google corrected in this package, Talk2 has been replaced with the original talk app due to incompatibilities with voice/audio chat. However you may manually install it if you wish to use the newer interface w/o the newer features. While not 100% support of all languages, core apps support more languages in this package. Mirror thanks to SilentTweak.
GAPPS: 20110508b (Please note if you are using 20110502-CheckPoint or an older build you must use gapps 20110205)
gapps-mdpi-gb-20110508_b_S.zip
MD5: 475fbf654977af73f30e509cb4adb21c
Also see information about Talk
Previous GAPPS: 20110205
gapps-mdpi-gb-20110205_S.zip (mirror)
md5: 70ddd820738b902d9b9f9b109e8fad5a
Note do not install both 20110508 and 20110205
MDPI Facebook App:
http://depositfiles.com/files/sdhr9ol3g [gb_facebook_fix_S.zip] (outdated)
md5: 17cb43e88f42cdf513f2c7c960347f21
v1.6.4 is newer w/o some of the newest memory eating services get the apk from:
http://www.apktops.com/facebook-for-android-1-6-4.html
For additional gapps:
1) Log into your Google account
2) tap gtalk to make sure its running
3) install the gapps you want from market (some common ones):
You Tube
GMail
Voice Search
Google Translate
*Maps and Streetview may also be grabbed from market; however Maps v5.* appears to be very resource intensive and overwhelms our poor devices; therefore I recommend either installing MapQuest; and/or an older version of GoogleMaps example extracted from froyo gapp pacakges. This will provide a much better gingerbread experience both while running maps and while not running maps.
Brut Maps based on Maps v4.6
Google Maps 4.7 (mirror) MD5: b8c558351949be97eb8703d1f4a05807 (download/place on SD card and install with File Manager)
​
Apps2Ext: (Included in 20110529-1 onwards)
This enabled in Settings->Applications->Development->SD-EXT
Sim Toolkit:
See: http://forum.xda-developers.com/showpost.php?p=15742165&postcount=2618
A friendly reminder... One hopes users of this thread know how to wipe their device .. and if they fail how to see they missed something in logcat.. but if not Super Wipe because regardless of subsequent errors all of these do boot to the Launcher.
Other uses are free to post custom builds in the thread for reference and testing.
Note however all of the above builds were cleanly made from the repo without modification. (ie. you are getting the file produced by the build system)
[SIZE=+2]For full credits check github; Many peoples hard work (particularly that of the CyanogemMod's team make this rom possible)[/SIZE]
GINGERBREAD-DS-Alpha-20101222-1.zip boots very well.
Under android version it still says 2.2.1. Almost ready for a daily driver.
I hope this becomes CM7 someday
Edit: I seem to have battery life issues using pershoots 2708 2.6.34.*... Any other kernel I should try (that does not have usb unplug bug)?
mschoolbus said:
Terry,
I am unable to get the alpha1 to boot no matter what kernel I try. I am using your +15mb ram hack and 2708 kernels on cm6.1 just fine.
Am I missing something?
Your work is fantastic btw! So nice you are continuing support for our old dreams
Click to expand...
Click to collapse
Not that I know much, did you check if you have the latest radio and SPL?
sada23 said:
Not that I know much, did you check if you have the latest radio and SPL?
Click to expand...
Click to collapse
I have: HBOOT-1.33.0013d
RADIO-2.22.28.25
Thanks for the help!
Did you get it to boot?
The first time i installed, it would not boot, I waited for like 15 minutes or so, then tried a different kernel, same thing.
Just to try it, I flashed the gingerbread alpha again, and tried one more time, and it booted up.
I did notice the first time I flashed it, the "progress bar" did not move at all, the second time I was able to see it move.
-Jeff
um worked fine for me but, on the setup "Touch Android to Begin", is irresponsive
the android flashes on touch but no continuation, hhelp?
Love it! Looking forward to a beta next year
mschoolbus said:
Terry,
...
I am unable to get the alpha1 to boot no matter what kernel I try.
Click to expand...
Click to collapse
1. backup
2. superwipe
3. shutdown
4. boot to recovery
5. flash the alpha rom (do not reboot)
6. flash pershoot latest New SPL + Radio 2708 Combo
7. unplug USB and reboot
Let it boot all the way up and let it sleep on it's own.
Don't expect a fluid UI and don't compare it to other ROMs. It's not intended for public consumption.
im able able to get it boot, but it hangs at the setup
when I touch the android an error pops up that launcher force closed and I cant go on with the setup
Since001 said:
im able able to get it boot, but it hangs at the setup
when I touch the android an error pops up that launcher force closed and I cant go on with the setup
Click to expand...
Click to collapse
Um.. setup is part of gapps .. we have not hacked gingerbread gapps to work yet on this.. so I'd not install whatever non gingerbread gapps you have.
I haven't flashed any gapps. I just flashed your alpha, nothing else.
Sent from my HTC Dream using XDA App
While trying to build gingerbread I've experienced some trouble:
Code:
. build/envsetup.sh
including device/htc/sapphire/vendorsetup.sh
debian:~/Desktop/android/gingerbread$ lunch
You're building on Linux
Lunch menu... pick a combo:
1. generic-eng
2. simulator
3. full_sapphire-userdebug
Which would you like? [generic-eng] 3
prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: /lib/i686/cmov/libc.so.6: version `GLIBC_2.11' not found (required by prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc)
prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: /lib/i686/cmov/libc.so.6: version `GLIBC_2.11' not found (required by prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc)
prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: /lib/i686/cmov/libc.so.6: version `GLIBC_2.11' not found (required by prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc)
prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: /lib/i686/cmov/libc.so.6: version `GLIBC_2.11' not found (required by prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc)
prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: /lib/i686/cmov/libc.so.6: version `GLIBC_2.11' not found (required by prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc)
prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: /lib/i686/cmov/libc.so.6: version `GLIBC_2.11' not found (required by prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc)
prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: /lib/i686/cmov/libc.so.6: version `GLIBC_2.11' not found (required by prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc)
prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: /lib/i686/cmov/libc.so.6: version `GLIBC_2.11' not found (required by prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc)
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.1
TARGET_PRODUCT=full_sapphire
TARGET_BUILD_VARIANT=userdebug
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GINGERBREAD
============================================
prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: /lib/i686/cmov/libc.so.6: version `GLIBC_2.11' not found (required by prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc)
prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: /lib/i686/cmov/libc.so.6: version `GLIBC_2.11' not found (required by prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc)
A quick and brutal fix is to:
1) go to gingerbread/prebuilt/linux-x86/toolchain
2) rename arm-eabi-4.4.3 to arm-eabi-4.4.3.old
3) link arm-eabi-4.4.0 to arm-eabi-4.4.3
Code:
cd gingerbread/prebuilt/linux-x86/toolchain
mv arm-eabi-4.4.3 to arm-eabi-4.4.3.old
ln -s arm-eabi-4.4.0 arm-eabi-4.4.3
One more fix needed to build on x86 is to change
Code:
# This forces a 64-bit build for Java6
LOCAL_CFLAGS += -m64
LOCAL_LDFLAGS += -m64
in the Android.mk files of the gingerbread/external/clearsilver/ directory
and subdirectories to:
Code:
# This forces a 64-bit build for Java6
LOCAL_CFLAGS += -m32
LOCAL_LDFLAGS += -m32
This should be fixed in a more elegant way based on the host arch.
Started to compile now....................................Done.
Works so far.
Patch attached to fix build on 32 bit hosts.
Code:
repo diff
project build/
diff --git a/core/main.mk b/core/main.mk
index 6113e52..72e32c8 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -72,7 +72,8 @@ $(info Checking build tools versions...)
ifeq ($(BUILD_OS),linux)
build_arch := $(shell uname -m)
-ifneq (64,$(findstring 64,$(build_arch)))
+#ifneq (64,$(findstring 64,$(build_arch)))
+ifneq (i686,$(findstring i686,$(build_arch)))
$(warning ************************************************************)
$(warning You are attempting to build on a 32-bit system.)
$(warning Only 64-bit build environments are supported beyond froyo/2.2.)
project external/clearsilver/
diff --git a/cgi/Android.mk b/cgi/Android.mk
index 21c534b..2c7bf36 100644
--- a/cgi/Android.mk
+++ b/cgi/Android.mk
@@ -13,8 +13,12 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/..
LOCAL_CFLAGS := -fPIC
# This forces a 64-bit build for Java6
-LOCAL_CFLAGS += -m64
-LOCAL_LDFLAGS += -m64
+#LOCAL_CFLAGS += -m64
+#LOCAL_LDFLAGS += -m64
+
+# This forces a 64-bit build for Java6
+LOCAL_CFLAGS += -m32
+LOCAL_LDFLAGS += -m32
LOCAL_NO_DEFAULT_COMPILER_FLAGS := true
diff --git a/cs/Android.mk b/cs/Android.mk
index 9f0e30a..4807b3f 100644
--- a/cs/Android.mk
+++ b/cs/Android.mk
@@ -9,8 +9,10 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/..
LOCAL_CFLAGS := -fPIC
# This forces a 64-bit build for Java6
-LOCAL_CFLAGS += -m64
-LOCAL_LDFLAGS += -m64
+#LOCAL_CFLAGS += -m64
+#LOCAL_LDFLAGS += -m64
+LOCAL_CFLAGS += -m32
+LOCAL_LDFLAGS += -m32
LOCAL_NO_DEFAULT_COMPILER_FLAGS := true
diff --git a/java-jni/Android.mk b/java-jni/Android.mk
index 21b4fd1..cc6d3ce 100644
--- a/java-jni/Android.mk
+++ b/java-jni/Android.mk
@@ -34,8 +34,10 @@ LOCAL_C_INCLUDES := \
LOCAL_CFLAGS += -fPIC
# This forces a 64-bit build for Java6
-LOCAL_CFLAGS += -m64
-LOCAL_LDFLAGS += -m64
+#LOCAL_CFLAGS += -m64
+#LOCAL_LDFLAGS += -m64
+LOCAL_CFLAGS += -m32
+LOCAL_LDFLAGS += -m32
LOCAL_NO_DEFAULT_COMPILER_FLAGS := true
diff --git a/util/Android.mk b/util/Android.mk
index 386f379..fc27bbf 100644
--- a/util/Android.mk
+++ b/util/Android.mk
@@ -18,8 +18,12 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/..
LOCAL_CFLAGS := -fPIC
# This forces a 64-bit build for Java6
-LOCAL_CFLAGS += -m64
-LOCAL_LDFLAGS += -m64
+#LOCAL_CFLAGS += -m64
+#LOCAL_LDFLAGS += -m64
+
+# This forces a 64-bit build for Java6
+LOCAL_CFLAGS += -m32
+LOCAL_LDFLAGS += -m32
LOCAL_NO_DEFAULT_COMPILER_FLAGS := true
I saw you changed a few things so i made a new build, 3d seams faster, but it will crash still:
http://cyanogenmod.pastebin.com/eSGptyBR
Click to expand...
Click to collapse
I build the test rom with the Pershoot 2.6.35.10.
Also i attached the script im using for the build, isnt "mine", just adapted it a bit
p.s make the directory for the repo, put this script in in, chmod a+X G1Ginger.txt, ./G1Ginger.txt
roalex said:
I saw you changed a few things so i made a new build, 3d seams faster, but it will crash still:
I build the test rom with the Pershoot 2.6.35.10.
Also i attached the script im using for the build, isnt "mine", just adapted it a bit
p.s make the directory for the repo, put this script in in, chmod a+X G1Ginger.txt, ./G1Ginger.txt
Click to expand...
Click to collapse
You could add processor number autodetection to your the script:
Code:
processors=`grep -c processor /proc/cpuinfo`
and substitute the -j n switch with:
Code:
-j $processors
Going to give this a try on my spare G1.
Is this designed to require the 2708 or do we need to run a different kernel for 2708 support?
brentil said:
Going to give this a try on my spare G1.
Is this designed to require the 2708 or do we need to run a different kernel for 2708 support?
Click to expand...
Click to collapse
ATM it is a 2708 kernel.
If you dont have lastest radio you can always try to flash pershoot's Kernel 2.6.35.10 – OC-UV-RAM-FP – Dream/Sapphire (32B/A) here right after flashing the rom.
I have'nt tested it myself, but I changed and used pershoot's 2708 kernel zImage instead of ezterry's since it was getting a lil old when we first started working together on this...
It worked fine so it should work...
Yeah, I'm running the newer radio on both my G1 & MT3G.
Ok so I tried flashing the Gingerbread rom after super wiping my G1. I get the following error.
Code:
Installing update...
assert failed: || getprop("ro.bootloader") == "1.33.0011" ||
...
|| getprop("ro.bootloader") == "1.33.0013d"
(status 7)
So I thought maybe it was the spoofed SPL so I refashed back to engineering HBOOT 2005 and fastbooted 2013d without spoofing it and I get the same issue,
farmatito said:
You could add processor number autodetection to your the script:
Code:
processors=`grep -c processor /proc/cpuinfo`
and substitute the -j n switch with:
Code:
-j $processors
Click to expand...
Click to collapse
normaly you dont access /proc/cpuinfo w/o sudo tho right ?
in any case people can just change it as they see fit
brentil said:
Yeah, I'm running the newer radio on both my G1 & MT3G.
Ok so I tried flashing the Gingerbread rom after super wiping my G1. I get the following error.
Code:
Installing update...
assert failed: || getprop("ro.bootloader") == "1.33.0011" ||
...
|| getprop("ro.bootloader") == "1.33.0013d"
(status 7)
So I thought maybe it was the spoofed SPL so I refashed back to engineering HBOOT 2005 and fastbooted 2013d without spoofing it and I get the same issue,
Click to expand...
Click to collapse
If you have the newest radio and spl combo, you don't need to spoof the SPL.
You can always remove the SPL check in the updater script (\META-INF\com\google\android\updater-script) :
Code:
assert(getprop("ro.bootloader") == "1.33.0011" ||
getprop("ro.bootloader") == "1.33.2011" ||
getprop("ro.bootloader") == "1.33.3011" ||
getprop("ro.bootloader") == "1.33.0013" ||
getprop("ro.bootloader") == "1.33.2013" ||
getprop("ro.bootloader") == "1.33.3013" ||
getprop("ro.bootloader") == "1.33.0013d");
and resign with test-keys the modded update.zip and it will flash without checking the installed SPL.
roalex said:
normaly you dont access /proc/cpuinfo w/o sudo tho right ?
in any case people can just change it as they see fit
Click to expand...
Click to collapse
Code:
dr-xr-xr-x 69 root root 0 2010-12-06 10:16 /proc
-r--r--r-- 1 root root 0 2010-12-22 17:17 /proc/cpuinfo
/proc/cpuinfo is world-readable.

[Q] Jelly Bean wifi patch help

As many know, Jelly Bean wifi does not support enterprise wifi.
A fix was posted on the google forum that will hopefully work with the TF300t http://code.google.com/p/android/issues/detail?id=34212#c165
external/wpa_supplicant_8:
diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c
index aaa920b..be94e8a 100644
--- a/src/crypto/tls_openssl.c
+++ b/src/crypto/tls_openssl.c
@@ -929,6 +929,11 @@ struct tls_connection * tls_connection_init(void *ssl_ctx)
#ifdef SSL_OP_NO_COMPRESSION
options |= SSL_OP_NO_COMPRESSION;
#endif /* SSL_OP_NO_COMPRESSION */
+#ifdef ANDROID
+ options |= SSL_OP_NO_TLSv1_1;
+ options |= SSL_OP_NO_TLSv1_2;
+ options |= SSL_OP_NO_TICKET;
+#endif /* ANDROID */
SSL_set_options(conn->ssl, options);
conn->ssl_in = BIO_new(BIO_s_mem());
(note similar patch in wpa_supplicant_6 if your build configuration uses that)
those shouldn't disable WiFi, just limit what TLS versions are used by wpa_supplicant to talk to the server. it should still use TLSv1.0 and SSLv3.0.
My understanding is that you have to apply the patch to the source code and recompile the file. I have no clue how to do this despite a few searches with explanations beyond my abilities. Could someone give me a newb guide on how to do this or uploaded a patched file to fix this common issue?
Many, many thanks!
Is it possible to apply the patch and recompile it in Windows 7? From my searches it seems that you need linux (Ubuntu?) or Mac. If so, can you point me in the right direction?
Thanks!

Sensorhub and Note 2 recovery maintainers

Please compile, if possible, your embedded recovery kernels without the sensorhub defconfig options.
CONFIG_SENSORS_SSP=y
CONFIG_SENSORS_SYSFS=y
CONFIG_SENSORS_SSP_ACCELEROMETER_POSITION=7
CONFIG_SENSORS_SSP_GYROSCOPE_POSITION=7
CONFIG_SENSORS_SSP_MAGNETOMETER_POSITION=7
CONFIG_SENSORS_SSP_LSM330=y
CONFIG_SENSORS_SSP_CM36651=y
CONFIG_SENSORS_SSP_AK8963C=y
CONFIG_SENSORS_SSP_BMP182=y
CONFIG_SENSORS_SSP_AT32UC3L0128=y
CONFIG_SENSORS_SSP_SENSORHUB=y
The kernel flashes over the sensorhub firmware on every single entry of recovery, and rebooting into the normal kernel, if the embedded kernel firmware mismatches the live hardware firmware. I consider this dangerous because firstly I don't know what happens if a firmware flash fails on boot, and secondly, the whole procedure is done over the I2C bus and takes about 22 seconds, increasing the boot time (and recovery entry) dramatically. The firmware changes relatively often and we have like 4 different versions out there in the wild at this moment and they will surely increase.
Off-topic: The sensorhub is a new dedicated micro-controller chip found on the Note 2 which handles all device sensors, instead of them being handled by the main CPU itself. The point of the thing is to offload that work from the CPU to vastly improve battery life.
Thank you a lot for the feedback and input about this issue
When compiling recoveries, we get the binary (recovery file) and the kernel. Sorry if I seem noob here, but I do not compile kernels, I am only used to cwm source. And in the recovery binary sources, there is no sensors flashed, it is the kernel that is repacked with it.
Now, if I take a recovery.img as it is outputted when compiled from cm10 sources, that is packed with a cm10 kernel, the recovery will boot without a delay.
However, that will break exfat support since we cannot insmod the external modules
So, the only choice is to repack the recovery ramdisk with a stock Samsung kernel, and that's what I do in my recoveries. However, this seems to induce the boot delay for people using custom kernels built around some sources (redpill, Perseus)
These recoveries repacked with a Samsung kernel will run fine along stock kernels and Note2core custom kernel (also a 4.1.2 source).
One of the potential causes is this part of code I believe (have no Note 2 to debug it)
drivers/sensor/ak8963.c
Code:
if (retry_count < 5) {
retry_count++;
pr_warn("############################################");
pr_warn("%s, retry_count=%d\n", __func__, retry_count);
pr_warn("############################################");
goto retry;
} else {
There is a check routine repeated 5 times, and on each repeat count a goto loop. The retry loop restarts much above in the code
retry:
Code:
#ifdef FACTORY_TESTstatic int ak8963c_selftest(struct akm8963_data *ak_data, int *sf){
.
.
.
retry:
/* read device info */
i2c_smbus_read_i2c_block_data(ak_data->this_client,
AK8963_REG_WIA, 2, buf);
pr_info("%s: device id = 0x%x, info = 0x%x\n",
__func__, buf[0], buf[1]);
/* set ATSC self test bit to 1 */
i2c_smbus_write_byte_data(ak_data->this_client,
AK8963_REG_ASTC, 0x40);
/* start self test */
i2c_smbus_write_byte_data(ak_data->this_client,
AK8963_REG_CNTL1,
AK8963_CNTL1_SELF_TEST);
/* wait for data ready */
while (1) {
msleep(20);
if (i2c_smbus_read_byte_data(ak_data->this_client,
AK8963_REG_ST1) == 1) {
break;
}
}
i2c_smbus_read_i2c_block_data(ak_data->this_client,
AK8963_REG_HXL, sizeof(buf), buf);
/* set ATSC self test bit to 0 */
i2c_smbus_write_byte_data(ak_data->this_client,
AK8963_REG_ASTC, 0x00);
x = buf[0] | (buf[1] << 8);
y = buf[2] | (buf[3] << 8);
z = buf[4] | (buf[5] << 8);
/* Hadj = (H*(Asa+128))/256 */
x = (x*(ak_data->asa[0] + 128)) >> 8;
y = (y*(ak_data->asa[1] + 128)) >> 8;
z = (z*(ak_data->asa[2] + 128)) >> 8;
pr_info("%s: self test x = %d, y = %d, z = %d\n",
__func__, x, y, z);
if ((x >= -200) && (x <= 200))
pr_info("%s: x passed self test, expect -200<=x<=200\n",
__func__);
else
pr_info("%s: x failed self test, expect -200<=x<=200\n",
__func__);
if ((y >= -200) && (y <= 200))
pr_info("%s: y passed self test, expect -200<=y<=200\n",
__func__);
else
pr_info("%s: y failed self test, expect -200<=y<=200\n",
__func__);
if ((z >= -3200) && (z <= -800))
pr_info("%s: z passed self test, expect -3200<=z<=-800\n",
__func__);
else
pr_info("%s: z failed self test, expect -3200<=z<=-800\n",
__func__);
sf[0] = x;
sf[1] = y;
sf[2] = z;
if (((x >= -200) && (x <= 200)) &&
((y >= -200) && (y <= 200)) &&
((z >= -3200) && (z <= -800))) {
pr_info("%s, Selftest is successful.\n", __func__);
return 1;
} else {
if (retry_count < 5) {
retry_count++;
pr_warn("############################################");
pr_warn("%s, retry_count=%d\n", __func__, retry_count);
pr_warn("############################################");
goto retry;
}
These are many retries using a non efficient goto loop.
Basically, here's the current possibilities I see:
- if we repack the recovery with your kernel or redpill, people will get delay issues on stock ROMs/Kernels
- if we use cm10 kernel: no delays but we loose exfat support
- if we use note2core kernel we'll probably loose exfat support
- if I recompile kernel from samsung sources without the sensors, it seems it will also break exfat
So, at the end I do not see a good choice that will satisfy every one. Either I wait for Samsung to release their sources so that you fix the kernel or I repack with 2 kernels: Samsung stock and redpill, so people can chose
Hope I am not getting it all wrong, but that's how I understand it
All that code is totally irrelevant and has nothing to do with the issue. I also don't understand what you want to say about that loop? Goto is inefficient? Nonsense.
The firmware flash and logic happens in /drivers/sensorhub/ssp_firmware.c and its just a few lines of code. The whole flash process is logged in kmsg at boot so you can just retrieve that and see for yourself.
And you're missing the point, as long as you embed ANY kernel with the sensorhub drivers, they will flash it. There are stock kernels out there with versions 91100, 92600, 92800, 102600 (just from the top of my head, might differ). If you use any recovery kernel whose version mismatches the boot.img kernel firmware, you will get the issue.
And to be honest, I don't understand what the fuss is about fixing it, TWRP includes now a kernel with exFat and removed sensor drivers. You just have to do the same.
Phil3759 said:
Either I wait for Samsung to release their sources so that you fix the kernel
Click to expand...
Click to collapse
There is nothing to fix from the live kernel side, I hope you understand that...
AndreiLux said:
All that code is totally irrelevant and has nothing to do with the issue. I also don't understand what you want to say about that loop? Goto is inefficient? Nonsense.
The firmware flash and logic happens in /drivers/sensorhub/ssp_firmware.c and its just a few lines of code. The whole flash process is logged in kmsg at boot so you can just retrieve that and see for yourself.
And you're missing the point, as long as you embed ANY kernel with the sensorhub drivers, they will flash it. There are stock kernels out there with versions 91100, 92600, 92800, 102600 (just from the top of my head, might differ). If you use any recovery kernel whose version mismatches the boot.img kernel firmware, you will get the issue.
And to be honest, I don't understand what the fuss is about fixing it, TWRP includes now a kernel with exFat and removed sensor drivers. You just have to do the same.
There is nothing to fix from the live kernel side, I hope you understand that...
Click to expand...
Click to collapse
AndreiLux said:
Sorry but you're a bit out of bound here with accusing kernel developers and doing such claims about the source of the issue while you seem pretty ignorant about the technical aspects of the problem.
As I said and explained in the thread you linked, the problem lies with the recovery and not the boot kernel. You're the one who will have to adapt your embedded kernel that you include here.
Click to expand...
Click to collapse
You also seem a bit ignorant about recoveries
TWRP doesn't included any custom kernel with exfat support. It comes with cm9 kernel and maybe now cm10.1 since they moved sources to 4.2 recently. Their source is just the android/bootable/recovery part built around cyanogenmod source. CM kernel, as I said in my answer, doesn't flash the sensors that's why there is no delay. That's the only reason why twrp won't have the delay. I can also include cm10 kernel and no more delays, but say good bye to exfat.
TWRP includes native exfat support where as CM and AOKP choose to not include it in their source (thus cwm) because it is not legal (MS patent). Only thing cwm devs can do:
- import twrp source for exfat support and break the MS patent
- use Samsung genuine kernel to get exfat support
So, not an easy decision / move as you suggest
Phil3759 said:
TWRP doesn't included any custom kernel with exfat support. It comes with cm9 kernel and maybe now cm10.1 since they moved sources to 4.2 recently. Their source is just the android/bootable/recovery part built around cyanogenmod source. CM kernel, as I said in my answer, doesn't flash the sensors that's why there is no delay. That's the only reason why twrp won't have the delay. I can also include cm10 kernel and no more delays, but say good bye to exfat.
TWRP includes native exfat support where as CM and AOKP choose to not include it in their source (thus cwm) because it is not legal (MS patent). Only thing cwm devs can do:
- import twrp source for exfat support and break the MS patent
- use Samsung genuine kernel to get exfat support
So, not an easy decision / move as you suggest
Click to expand...
Click to collapse
Sorry but almost everything you said its wrong.
TWRP includes a modified CM kernel with added exFat and since I've made Bigbiff aware, also removes the sensorhub drivers.
CM kernel, as I said in my answer, doesn't flash the sensors that's why there is no delay.
Click to expand...
Click to collapse
The CM kernel is based on the Samsung sources and has the flash logic intact, because it's obviously needed in the OS to even have functioning sensors. It's not flashing in your case because you have matching firmwares, and that's all.
Sorry but I suggest you inform yourself here a bit more, I've explained it pretty clearly yet you seem to be ranting about things which are just not correct.
delete

[History] How the Droid was Rooted

Originally written by Evan Charlton, however his site is down and I'm preserving this here for "history"
Posted: Monday, Dec 14 2009
How Droid Was Rooted
As you may (or may not) know, the Verizon Droid was recently rooted. That is to say that the average user can get root/superuser access on the device. Here's how it was pulled off:
In Android, updates must be signed by a known private key in order for the phone to install them. The recovery image checks these updates and installs (or does not install) these binaries. In Android 2.0, this code was rewritten for some reason. Here's what a certain portion of the vulnerable file (now fixed) looks like: int i; for (i = 4; i < eocd_size-3; ++i) { if (eocd[i ] == 0x50 && eocd[i+1] == 0x4b && eocd[i+2] == 0x05 && eocd[i+1] == 0x06) { // if the sequence $50 $4b $05 $06 appears anywhere after // the real one, minzip will find the later (wrong) one, // which could be exploitable. Fail verification if // this sequence occurs anywhere after the real one. LOGE("EOCD marker occurs after start of EOCD\n"); fclose(f); return VERIFY_FAILURE; } }
It's important to know what happens with verification. First, the zip's signing key is verified. This is located at the beginning of the file. Next, the file is read from the end backwards until it finds a certain series of bytes, known as EOCD (end-of-central-directory). The author correctly noted that you could get around this by sticking two .zips together--the first one would have the correct signature and the second one would be the one applied, and they put in a check for it.
However, they made a crucial typo in this line of code: if (eocd[i ] == 0x50 && eocd[i+1] == 0x4b && eocd[i+2] == 0x05 && eocd[i+1] == 0x06) { If you still don't see it, look at the offsets. Here is why the check fails: if(foo == 1 && foo == 2) { // there's an exploit! // note that the above condition is never true }
With that discovered, all that had to happen was getting a signed zip from Verizon and then stick a payload zip on the end (it's a tiny bit more difficult than that, but that's the general idea).
Just to clarify: I can claim no credit for this hack. Zinx created the magical zip (but wants it to be known that he did not find the exploit).
Click to expand...
Click to collapse
Proper link for the fixed file : http://androidxref.com/2.1/xref/bootable/recovery/verifier.c
Hmmm
Sent from my GT-I9300 using XDA Free mobile app

How To Guide [SOURCE] ASUS_I005_1-kernel (MacOS / Linux)

WARNING:
This is NOT a custom kernel!​
GPL requires that source is released for Android kernels.
It does not, however, require that the source is tracked.
ROG Phone 5 - Support
www.asus.com
Each release is downloaded, extracted, and added to git in a single repo in order to create a kernel changelog. Some commits may be added to improve building the kernel as a standalone binary. The core functionality and features will remain unchanged.
GitHub - Skywalker-I005/ASUS_I005_1-kernel
Contribute to Skywalker-I005/ASUS_I005_1-kernel development by creating an account on GitHub.
github.com
The IKCONFIG is then pulled from a running device to get the compiler hash
GitHub - Skywalker-I005/llvm-project_asus
Contribute to Skywalker-I005/llvm-project_asus development by creating an account on GitHub.
github.com
The source provided by ASUS is meant to be built as a complete firmware.
Some commits have been added to fix broken links and restore missing code.
The source, as it is provided, does not build without missing components.
There are changes required to use newer versions of LLVM that were already included in the CAF source, but not in the one from Asus.
ANDROID: vmlinux.lds.h: merge compound literal sections · Skywalker-I005/[email protected]
After LLVM rG9e33c096476a ("[ELF] Keep orphan section names (.rodata.foo .text.foo) unchanged if !hasSectionsCommand"), LLD splits compound literals to separate sections with -fdata-secti...
github.com
Code:
commit 210ecf9a8921bccf197372da9a91efb8aa38202f
Author: Sami Tolvanen <[email protected]>
Date: Wed Nov 25 08:44:09 2020 -0800
ANDROID: vmlinux.lds.h: merge compound literal sections
After LLVM rG9e33c096476a ("[ELF] Keep orphan section names
(.rodata.foo .text.foo) unchanged if !hasSectionsCommand"), LLD splits
compound literals to separate sections with -fdata-sections, which
it always enables with LTO. Merge these sections to allow LLVM to be
upgraded.
Bug: 174047799
Change-Id: I858c5fcc48283d5528c1d3e2b2d7a3c72f9e03d6
Link: https://github.com/ClangBuiltLinux/linux/issues/958
Suggested-by: Danny Lin <[email protected]0n.dev>
Suggested-by: Fangrui Song <[email protected]>
Signed-off-by: Sami Tolvanen <[email protected]>
(cherry picked from commit 559c23e691b8d0b25b055ecdf4c07f19c8407794)
(cherry picked from commit 6f7ffcefc7b0ad82dbe0975057ea82b045abe160)
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index ef257c136f11..b5c86d85f7b3 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -72,10 +72,10 @@
#if defined(CONFIG_LD_DEAD_CODE_DATA_ELIMINATION) || defined(CONFIG_LTO_CLANG)
#define TEXT_MAIN .text .text.[0-9a-zA-Z_]*
#define TEXT_CFI_MAIN .text.[0-9a-zA-Z_]*.cfi
-#define DATA_MAIN .data .data.[0-9a-zA-Z_]* .data..LPBX*
+#define DATA_MAIN .data .data.[0-9a-zA-Z_]* .data..L* .data..compoundliteral*
#define SDATA_MAIN .sdata .sdata.[0-9a-zA-Z_]*
-#define RODATA_MAIN .rodata .rodata.[0-9a-zA-Z_]*
-#define BSS_MAIN .bss .bss.[0-9a-zA-Z_]*
+#define RODATA_MAIN .rodata .rodata.[0-9a-zA-Z_]* .rodata..L*
+#define BSS_MAIN .bss .bss.[0-9a-zA-Z_]* .bss..compoundliteral*
#define SBSS_MAIN .sbss .sbss.[0-9a-zA-Z_]*
#else
#define TEXT_MAIN .text
The techpack is only a stub and folder layout, but is also missing parts.
For anyone unfamiliar with Asus source, it may not be immediately obvious that there are four additional components that are required.
platform/vendor/qcom/opensource/datarmnet - Unnamed repository; edit this file 'description' to name the repository.
source.codeaurora.org
platform/vendor/qcom/opensource/datarmnet-ext - Unnamed repository; edit this file 'description' to name the repository.
source.codeaurora.org
platform/vendor/opensource/dataipa - Unnamed repository; edit this file 'description' to name the repository.
source.codeaurora.org
platform/vendor/opensource/sched - Unnamed repository; edit this file 'description' to name the repository.
source.codeaurora.org
Techpack for ZS673KS
Being new to Asus devices that use the techpack, I was curious if anyone knows where to find current techpack source with the relevant changes for this device. I have found versions that support other current Asus devices, but they do not include...
forum.xda-developers.com
The modules do collide, but can be built in hybrid fashion to overcome the issues.
Code:
CONFIG_TOUCHSCREEN_ROG=y
CONFIG_TOUCHSCREEN2_ROG=m
Code:
CONFIG_INPUT_SX932X=y
CONFIG_INPUT_SX932X_2ND=m
The easiest method for building the kernel is to make all modules inline (replace m with y).
Modules will still be unable to load on their own, since the signatures and versions may be off. That is why the verification needs to be disabled.
kernel/module.c: safely bypass sig, vermagic, modversion · Skywalker-I005/[email protected]
Contrary to common modifications that disable all checks entirely, we should still verify the integrity of modules that have not been signed by the manufacturer and may be versioned differently. We...
github.com
Code:
commit e009a01e9cf2f0c64a87b84b6986fff01e278b3f
Author: Abandoned Cart <***************@gmail.com>
Date: Thu Sep 16 12:16:03 2021 -0400
kernel/module.c: safely bypass sig, vermagic, modversion
diff --git a/kernel/module.c b/kernel/module.c
index ab50f522b662..b9bbde4ad512 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2925,6 +2925,11 @@ static int module_sig_check(struct load_info *info, int flags)
const char *reason;
const void *mod = info->hdr;
+#ifdef CONFIG_MODULE_FORCE_PASS
+ info->sig_ok = true;
+ return 0;
+#endif
+
/*
* Require flags == 0, as a module with version information
* removed is no longer the module that was signed
@@ -3274,10 +3279,12 @@ static int check_modinfo(struct module *mod, struct load_info *info, int flags)
err = try_to_force_load(mod, "bad vermagic");
if (err)
return err;
+#ifndef CONFIG_MODULE_FORCE_PASS
} else if (!same_magic(modmagic, vermagic, info->index.vers)) {
pr_err("%s: version magic '%s' should be '%s'\n",
info->name, modmagic, vermagic);
return -ENOEXEC;
+#endif
}
if (!get_modinfo(info, "intree")) {
@@ -3988,11 +3995,6 @@ static int load_module(struct load_info *info, const char __user *uargs,
goto free_copy;
}
err = rewrite_section_headers(info, flags);
if (err)
goto free_copy;
@@ -4199,9 +4201,11 @@ SYSCALL_DEFINE3(finit_module, int, fd, const char __user *, uargs, int, flags)
pr_debug("finit_module: fd=%d, uargs=%p, flags=%i\n", fd, uargs, flags);
+#ifndef CONFIG_MODULE_FORCE_PASS
if (flags & ~(MODULE_INIT_IGNORE_MODVERSIONS
|MODULE_INIT_IGNORE_VERMAGIC))
return -EINVAL;
+#endif
err = kernel_read_file_from_fd(fd, &hdr, &size, INT_MAX,
READING_MODULE);
Restoring Stock / Rooted Boot Image
Boot / DTBO Images [Root / Stock] - 5 / Pro / Ultimate (NOT S)
These images are NOT built from source. These are the stock images from the firmware provided by Asus that are extracted with payload dumper and uploaded without modification. 18.0840.2202.231 18.0840.2201.226 18.0840.2112.211...
forum.xda-developers.com
Compiling on MacOS (Mojave or lower)
Skywalker-ZS673KS/build at master · Skywalker-I005/Skywalker-ZS673KS
Contribute to Skywalker-I005/Skywalker-ZS673KS development by creating an account on GitHub.
github.com
Custom Kernel Development on MacOS
[Kernel] (Anakin) Skywalker ZS673KS - Stable Gaming [3/31/2022]
This kernel is (just barely a little) experimental. Use at your own risk. Feel free to skip past the first 5 pages when reading over this thread. This kernel assumes a few things about you, the user: 1. You have a ROG Phone 5 2. You have read...
forum.xda-developers.com
Thanks!
This process was probably much easier for the last generation. I have never seen a manufacturer hand over a device without any resources for development.
This time around, it seems they haven't even kept the source updated (or at least updated the page to reflect that it hasn't changed). Hopefully that will change once the device releases in the US.
Post moved to https://forum.xda-developers.com/t/kernel-starkissed-zs673ks.4283585/
Updated to V18.0840.2104.50
Adding the compiler (based on the extracted ikconfig) that Asus used to build the kernel. This will be updated alongside the kernel.
Updated to V18.0840.2104.56
Edit: Apologies to anyone tracking for the delayed notification.
Updated to V18.0840.2106.86
Also adding the newest Magisk patched boot / vendor_ boot combo here, since this is updated for every firmware release.
Updated to V18.0840.2107.151
Rooted images also updated
Moved the stocked and rooted images to AndroidFileHost and their own thread to keep previous versions and make them easier to locate.
No changes for V18.0840.2107.157
Currently a CN exclusive firmware
Adding all of important details from the posts for getting the custom kernel to boot as a tutorial alongside the kernel source. See the second and third posts.
Updated to V18.0840.2109.176
Currently a CN exclusive again
The main repo is freshly rebuilt as a completely stock log, including empty commits. Each commit has been tagged with Asus support as the author. This should allow it to be used for updating custom kernels and tracking version changes completely separate from any custom code.
Hi bro can you check this one?
https://dlcdnets.asus.com/pub/ASUS/ZenFone/ZS673KS/ASUS_I005_1-18.0840.2107.157-kernel-src.tar.gz
Is it installable? How?
Just wanted to fix my wifi bro. The wifi stopped after the update that's why I'm frustrated
TOYOBHUMAX said:
Hi bro can you check this one?
https://dlcdnets.asus.com/pub/ASUS/ZenFone/ZS673KS/ASUS_I005_1-18.0840.2107.157-kernel-src.tar.gz
Is it installable? How?
Click to expand...
Click to collapse
That's source. It can't be installed. You build a kernel with it.
TOYOBHUMAX said:
Just wanted to fix my wifi bro. The wifi stopped after the update that's why I'm frustrated
Click to expand...
Click to collapse
Might want to try a factory reset. If that doesn't work, it may be a hardware issue.

Categories

Resources