Closed aktivkohle closed 5 years ago
@aktivkohle you need to deodex
your ROM before you can patch it
Thanks @JonnyTech is first I have heard of that. Have spent about half an hour reading about it, seems quite a detailed thing to do so wanted to ask for some tips before starting. Also a lot of the advice seems to be for Windows users.
Do you need to use a computer to "deodex" or is it something that the device should do to itself?
Super R kitchen seems like a likely candidate to get the job done on Marshmallow from linux otherwise: https://bitbucket.org/superr/superrs-kitchen/src
Is the principle that this installed ROM is modified "in place" or am I supposed to "treat" the ROM in its folder on the PC and then reflash the whole thing?
I use the free version SuperR's Kitchen to deodex my Marshmallow and Nougat ROM's from Linux.
XDA thread: https://forum.xda-developers.com/apps/superr-kitchen/kitchen-superr-s-kitchen-v1-1-50-v2-1-6-t3597434
Linux download: http://sr-code.com/next/srkfree/
Use SuperR's Kitchen to deodex the ROM image from your computer then flash it to your phone. It is not complicated from a user experience - just select options in the menu.
Thanks @JonnyTech well super-r seems to have deodex'd nicely. It used all the processors for about five minutes performing some kind of surgery on the original zip file.
Seems a bit wrong to de-optimise the entire ROM when only a part of it needs to be patched by haystack. superr created the following in its project folder next to the zip
/superr_mymarshmallow $ ls
00_project_files boot.img cm-13.0-20161109-UNOFFICIAL-LegacyXperia-smultron.zip file_contexts install META-INF recovery system
then looking inside system/ :
$ ls system/
addon.d app bin build.prop etc fonts framework lib media priv-app recovery-from-boot.p semc tts usr vendor xbin
then inside system/framework/ :
$ ls system/framework/
am.jar com.android.future.usb.accessory.jar dpm.jar input.jar org.cyanogenmod.platform-res.apk telephony-common.jar
android.test.runner.jar com.android.location.provider.jar ethernet-service.jar javax.obex.jar pm.jar tm.jar
apache-xml.jar com.android.mediadrm.signer.jar ext.jar media_cmd.jar requestsync.jar uiautomator.jar
appops.jar com.android.media.remotedisplay.jar framework.jar monkey.jar services.jar voip-common.jar
appwidget.jar conscrypt.jar framework-res.apk okhttp.jar settings.jar wifi-service.jar
bmgr.jar content.jar hid.jar org.apache.http.legacy.boot.jar sm.jar wm.jar
bouncycastle.jar core-junit.jar ime.jar org.cyanogenmod.hardware.jar svc.jar
bu.jar core-libart.jar ims-common.jar org.cyanogenmod.platform.jar telecom.jar
I think I will try to replace the files which haystack pulled from my phone with the script https://github.com/Lanchon/haystack/blob/master/pull-fileset ..with the files from this system/framework/ folder which superr created from the original .zip of the ROM rather than somehow trying to flash this entire thing again onto the phone. Say if that is a bad idea
@aktivkohle my knowledge of Android internals is not comprehensive enough to determine whether your idea will work. But if you read the requirements of haystack
:
Requirements:
An Android device that:
Runs a non-odexed rom based on Android version 1.5 through 7.1.
You can clearly see that it requires a deodexed ROM. Therefore I advise not to just replace the individual files. Just use haystack
to patch the files, use SuperR to create a new system.img
and then flash that.
Keep us updated either way. Good luck!
Seems a bit wrong to de-optimise the entire ROM when only a part of it needs to be patched by haystack.
it's the only correct way of doing it. if it seems wrong to you it must be because you dont know what odexing actually does.
and it's not deoptimizing, it's deodexing. odexing a rom only saves some space in the VM cache.
Say if that is a bad idea
yes, it's very bad.
Good news, it worked :) Thanks for the advice @Lanchon , @JonnyTech saved me from barking up the wrong tree.. It took a bit of fiddling around. I recreated a .zip with SuperR's Kitchen from the deodexed ROM it had created. Was quite intuitive, it also asked me if I wanted to zipalign the packages, had no idea so said "yes", it also asked if I wanted to create a signed .zip as well, again said "yes". It made 2 zips but I ended up going with the unsigned one after some trial and error. Also, I thought I better flash the boot.img that SuperR's kitchen had prepared as it might have contained some differences. In CM boot up menu, cleaned cache, deleted system or something like that and did a factory reset. Oh, it wanted adb sideload to be run with sudo, otherwise there was some kind of permissions error in red on the screen of the phone.
So I then reran all the haystack commands from the readme to do the three-ways patch which finished without error.
Switched on spoofing from the option now at the bottom of developer options and proved it was working with the app. Also interesting was that under About > Build-Nummer it now says "Built with SuperRs.Kitchen" which is reassuring.
Saved all the output and some screenshots.
The proof of the pudding is in the eating - initially the DriveNow app was complaining about a lack of google play services, read through this then managed to remedy it by installing "services framework proxy" and "fakestore", now DriveNow is working perfectly with MicroG on CM13, it never really properly got off the ground on CM10..
Excellent news @aktivkohle, well done! Thanks for the feedback. Please close this issue.
Back in late 2016 I put the official CM 10 on my Sony Ericsson Xperia Mini, added UnifiedNLP, MicroG, modified settings.apk so that signature spoofing worked as confirmed in the small test app. I has worked well since. Now I just got a second device to test out the unofficial 13.0 build as this android 6.0.1 allows certain apps which otherwise seem to fail or not install on android 4.2. Can't remember what I used to patch it back then but have just tried to use haystack to do it now with 13.
So here some links about this ROM:
https://forum.xda-developers.com/xperia-arc/development/dev-2011-unofficial-cyanogenmod-13-0-t3323975
https://github.com/LegacyXperia/Wiki/wiki/Installing-Marshmallow
They seem to want you to flash GAPPS during the initial installation. I refrained. The OS looks really nice, everything seems to work including apps which would not work on CM-10, but am now wanting to set up signature spoofing, MicroG for play services and unifiedNLP for network location.
Here's what happened when I tried:
So yes, I kept it easy by using your direcory name fs-oneplus2 but it has crashed with the message that services.jar is empty. Any ideas how to fix this? Would really like to get it to work..