Related
I have managed to compile (from source) and install CM7.2 on my HTC dream, but my questions below are related to Android:
1. Is there a way to find out which packages (.apk) were installed on my system and if so, how do I do that?
2. Is there a way to find out each package dependencies (I need to figure out this as I am bent on removing the vast amount of guff installed on the phone - I won't need 90% of this stuff)?
3. Similarly to 2 above - is there a way to look at dependencies of a package not yet installed on my system (i.e. the .apk file)?
4. How do I actually remove a package for good from the system?
5. Similarly to 3 above, how do I actually install a package from within the root system - I know I can do this via adb, but is there a way to do this inside the, say, command line terminal?
6. Is there a way to alter (understand remove) certain program permissions which I could see "granted" to a particular program/package? I know there are various ways to look at these, but I wish to remove permissions I am not happy being granted to that particular program/package.
And one last a bit more advanced query: I would like to build a single package from the source tree and then install the resulting .apk file on my system.
Basically, I will try to upgrade a package with a new revision and add a few patches to the package source of my own before compiling it and building it again.
I usually build the whole lot (all packages + the rootfs image itself) with "mke bacon", but if I want to alter the source and build a single package how do I do that?
I am not very familiar with the Android make system, so I don't want to go heads-first into something and make a real mess of it.
Thanks a lot for any assistance given.
Small addition as apparently I cannot post a reply (too few posts) in this thread: http://forum.xda-developers.com/showthread.php?p=9055790#post9055790
Question to ezTerry (if he is reading this!): the advice given in that post above was absolutely splendid! I followed it religiously and it worked an absolute treat!
There is one exception though - I've LOST all of my IMEI, IMEI SV and Baseband information after applying these fixes. As soon as I installed the radio updates and then installed my newly-compiled kernel + CM7.2 (successfully!) I then checked the above fields from Settings and they were all gone!
After a while, the baseband, IMEI and IMEI SV appeared, but the IMEI and IMEI SV stuff have now different values than what I've had previously (I've had T-Mobile IMEI, now it appears that I was "assigned" O2 IMEI & IMEI SV values - very bizarre!).
Is this something I need worry about and (I don't yet have a sim card, but I plan to get one soon after I fix my phone), more importantly, how the hell do these IMEI numbers appeared on my phone - where did they came from?!
josh36 said:
Small addition as apparently I cannot post a reply (too few posts) in this thread: http://forum.xda-developers.com/showthread.php?p=9055790#post9055790
Question to ezTerry (if he is reading this!): the advice given in that post above was absolutely splendid! I followed it religiously and it worked an absolute treat!
There is one exception though - I've LOST all of my IMEI, IMEI SV and Baseband information after applying these fixes. As soon as I installed the radio updates and then installed my newly-compiled kernel + CM7.2 (successfully!) I then checked the above fields from Settings and they were all gone!
After a while, the baseband, IMEI and IMEI SV appeared, but the IMEI and IMEI SV stuff have now different values than what I've had previously (I've had T-Mobile IMEI, now it appears that I was "assigned" O2 IMEI & IMEI SV values - very bizarre!).
Is this something I need worry about and (I don't yet have a sim card, but I plan to get one soon after I fix my phone), more importantly, how the hell do these IMEI numbers appeared on my phone - where did they came from?!
Click to expand...
Click to collapse
Any takers?
@1 Check out the respective directories, i.e. for system apps /system/app
@2 Trial and Error, or someone might have made such a list for your device already
@3 No simple way, you would have to look through the decompiled code i guess
@4 Remove the apk from the folder (for example /system/app) and reboot your device, after wards you might have to clean up some extra folders, i.e. settings of that app. (you can use SD Maid from my signature for that)
@5 Some can just be installed the usual way, by opening it. Some .apk files have to be put in the system folders, afterswards reboot and the app should be "installed". To put those apps there use a rootcapable file explorer of your choice. To edit /system you will need to remount it as it is read only by default, you can do that through command line, but most good file explorers have an option for that.
@6 Yes thats possible, there was an app to do that, just not sure what it was called... It is very likely though, that those apps will not work correctly or just FC.
For the make system, if you just change a package, and build again, it will most likely just rebuild the changed files. I'm not so sure either though... damn make system can be pretty messy... and get upset real fast if you change something ;-).
Dark3n said:
@1 Check out the respective directories, i.e. for system apps /system/app
Click to expand...
Click to collapse
Yep, that indeed helped - I didn't realise that the .apk files are "intact" and do not behave in the "standard" (in Linux terms) way a "package" behaves - the app is "installed" as soon as .apk is placed in /data/app or /system/app. The PacketManager does the rest on reboot.
It also cleans up the mess "automagically" if I delete .apk file and reboot, which is nice.
Dark3n said:
@2 Trial and Error, or someone might have made such a list for your device already
Click to expand...
Click to collapse
Yeah, that's a real bugger - I can't see a way of finding the dependencies, but I haven't looked properly at "pm" (the Package Manager command line tool) - maybe I could use something there.
Dark3n said:
@6 Yes thats possible, there was an app to do that, just not sure what it was called... It is very likely though, that those apps will not work correctly or just FC.
Click to expand...
Click to collapse
A very simple example will issustrate my point - my calendar application is installed and needs some sort of GOOGLE_MAIL and access to the internet permissions, neither of which I am happy to grant, because 1) I won't be using online calendars; and 2) I won't use (google) mail.
The truth is, I deliberately did not install any google apps as I won't be using any of them - ever!
Now, every time I boot up and look at my log files with logcat I see a bunch of error messages that this application (the calendar) needs a bunch of permissions which do not exist (naturally, as I haven't installed a single google app on my phone).
So, I wish to wipe out these permissions from the calendar so that logcat is not filled with junk every time I start my phone.
As I already pointed out above, there are also some installed apps who are listed to "need" permissions I am not happy to grant - like the internet access to calendar for example (there are more apps, but I think you get the point).
Dark3n said:
For the make system, if you just change a package, and build again, it will most likely just rebuild the changed files. I'm not so sure either though... damn make system can be pretty messy... and get upset real fast if you change something ;-).
Click to expand...
Click to collapse
Yeah, that was my plan B - there must be another - easier - way though.
I wish to update a lot of stuff (I will be recompiling/refreshing existing packages as well as adding new things I developed for "standard" Linux), but with this Android make system I am blind - it is very different to what I am used to in the Linux world.
To top it all off, I can't post in any of the devs forums yet as I do not have 10 posts!
Further to my previous post - I just found out a superb article about stripping out Android and removing unnecessary packages from it - http://wiki.cyanogenmod.com/wiki/Barebones
It lists various dependencies and shows what could be deleted and what cannot be - what I wanted really.
My only remaining problem - at least for now - is the making of specific packages without building the whole image.
Warning/disclaimer: This thread is intended for those who already know how to compile a kernel and have a working knowledge of Linux and its derivatives. There shouldn't be a great deal of risk involved, but you are responsible for what happens if you decide to follow these instructions.
Polite request: Please don't post replies to this thread that aren't of a technical nature directly related to compiling, modifying, or testing the kernel.
Introduction:
It appears as if Lenovo have released a buildable and bootable kernel source. I've done some preliminary testing with it. However, it would be better if we could get lots of people building and running the kernel, so that we can spot any remaining problems. This is also an opportunity to start hacking it to add/fix features such as USB OTG, etc.
Kernel source:
Get it from the Github repository at: https://github.com/gmarkall/lenovo_a1_07_kernel
Toolchain:
The Makefile seems to suggest that Codesourcery 2010q1 has been used by Lenovo to compile the kernel. Get it from https://sourcery.mentor.com/sgpp/lite/arm/portal/release1293, and make sure that the arm-none-linux-gnueabi-* binaries are on your path.
Building the source:
You may wish to edit the Makefile around line 192 to set CROSS_COMPILE=arm-none-linux-gnueabi- instead of the hardcoded path that is the default.
Then, to build the kernel:
Code:
make distclean
make a1_07_defconfig
make uImage
Booting the kernel
Normally, Android devices have two boot images that consist of a kernel and a ramdisk. One boot image is for the recovery, and the other is for the Android system. This makes it safe to flash a new boot image containing an untested kernel for the Android system, since the recovery can always boot up using the other boot image. However, the A1, by some bad design decision, only has one kernel - the bootloader always loads the same kernel, and just loads a different ramdisk depending whether it is to boot into recovery or system. As a result, it is not safe to flash a kernel to your A1 unless it's already been tested, since a bad kernel will make it impossible to boot from the internal memory, and you'll need a bootable SD card.
The solution to this problem is to make a bootable SD card for loading the kernel and ramdisk from. A bootable SD card consists of two partitions:
* A small bootable VFAT partition, that holds the X-Loader (MLO), U-Boot (u-boot.bin) and the kernel (uImage).
* An ext2 partition that holds the root filesystem.
In order to create a bootable SD card, use the omap3-mkcard.sh script that is attached below. To invoke it for making /dev/mmcblk0 a bootable SD card:
Code:
sudo omap3-mkcard.sh /dev/mmcblk0
You may need to hack the script if your SD card device isn't a /dev/mmcblk* one, since the script searches for partitions denoted "p1" and "p2" - this may need changing to just "1" and "2" respectively (thanks Xbdesign and Brancaleone for this).
This will create the necessary partitions, set the bootable flag, and format them. You will then need to mount the first partition (e.g. /dev/mmcblk0p1), and copy MLO and u-boot.bin to it (also linked below). Then, copy the uImage that you built from your kernel tree, which will be located in /arch/arm/boot. You can now unmount this partition.
Next, mount the second partition (e.g. /dev/mmcblk0p2). This will need to contain the same set of files that the initial ramdisk contains. There are two different ramdisks that you might want to use - one is from the Cyanogenmod 7 build, and the other one is from the stock system. Download links for these are also below. To extract the ramdisk, copy it onto the SD card second partition, then run the following commands (assuming the ramdisk is called ramdisk.ub):
Code:
dd if=ramdisk.ub of=ramdisk.img.gz bs=64 skip=1 # Strip off the U-Boot header
gunzip ramdisk.img.gz # Unzip
sudo cpio -idmv < ramdisk.img # Extract the cpio archive
Then, unmount the second partition of the SD card.
You should now be able to remove the SD card and insert it into your A1. Power down the A1 and power up again, and it should hopefully boot from the SD card and load your kernel. If it's booted from the SD card and loaded your kernel, you should be able to see that it was compiled on your host by looking in Settings -> About Phone -> Kernel Version.
Troubleshooting:
This is not a comprehensive guide, just a few pointers to where a problem might be - please post replies to the thread to get troubleshooting suggestions.
System boots up, but is not running my kernel - it didn't boot from the SD card. If the A1 is plugged into the charger/USB, you sometimes need to reboot multiple times before it boots off the SD card (I think it doesn't always turn off fully when the charger is plugged in).
The static Lenovo logo flashes up over and over again - it's booted from the SD card, but didn't manage to load your kernel
The static Lenovo logo comes up and stays there/goes to a black screen - it's probably loaded your kernel and mounted the root file system, but failed to mount /system. Try running adb shell to see what happens. If you get something like
Code:
/system/bin/sh: no such file or directory
then your kernel is running but /system isn't mounted.
IRC Channel
Join #ideapad-a1 on irc.freenode.net to discuss the kernel and other A1 development-related topics!
Download Links:
MLO
u-boot.bin
omap3-mkcard.sh
Ramdisk for Cyanogenmod 7
Ramdisk for ROW 2643 stock release
I've added the two ramdisks that I suspect will be most common - if you need another ramdisk, you'll have to extract it from an OTA.
Also, I compiled a tun.ko - www.doc.ic.ac.uk/~grm08/ideapad/tun.ko
Here's a cifs.ko - http://www.doc.ic.ac.uk/~grm08/ideapad/cifs.ko
EDIT: AutobahnA1 and infraredevans have confirmed that tun.ko works on ROW_2643.
EDIT 2/3: Please test out cifs.ko! (It doesn't work - it needs slow-work.ko. Will get that done when I can. Thanks to Ilikecokethree on the Lenovo forums for pointing that one out).
你懂中文吗,大神!
我是中国人 关注你的帖子很久了,我不懂英文,用翻译软件看的大概,我们这里很多人支持你,都在用你的rom 很棒!比联想官方的好多了,谢谢!
I think I did exactly the steps as you told, but it still boots the original kernel, may something be wrong? Thank you very much.
PS: I'm a chinese too, and my English is not good either
gmarkall said:
This is also an opportunity to start hacking it to add/fix features such as USB OTG, etc.
Click to expand...
Click to collapse
Please do not forget to try the WiFi-based geolocation, which is also missing!
I wish I had the knowledge to work on it myself but I am far from taking over such tasks...do not have the slightest idea about how these things work.
Good luck and please keep us informed!
geoponer said:
Please do not forget to try the WiFi-based geolocation, which is also missing!
Click to expand...
Click to collapse
Geolocation bug has nothing to do with kenerl. It's a missing entry in framework-res.apk in ROM from Lenovo
see : forums.lenovo.com/t5/IdeaPad-Slate-Tablets/A1-Geocode-Bug-in-Firmware-Solution/td-p/709701
betabox said:
Geolocation bug has nothing to do with kenerl. It's a missing entry in framework-res.apk in ROM from Lenovo
see : forums.lenovo.com/t5/IdeaPad-Slate-Tablets/A1-Geocode-Bug-in-Firmware-Solution/td-p/709701
Click to expand...
Click to collapse
Also, it's working in CM7.
hohoxu_hao115 said:
I think I did exactly the steps as you told, but it still boots the original kernel, may something be wrong?
Click to expand...
Click to collapse
Sounds like it's booting from eMMC instead.
Can you post the partition table of the SD card as listed by fdisk, and also a directory listing of each of the two partitions? I ask this to confirm what's happened - seems like you're the first person to follow these instructions, and it's quite possible I made a mistake somewhere.
betabox said:
Geolocation bug has nothing to do with kenerl. It's a missing entry in framework-res.apk in ROM from Lenovo
see : forums.lenovo.com/t5/IdeaPad-Slate-Tablets/A1-Geocode-Bug-in-Firmware-Solution/td-p/709701
Click to expand...
Click to collapse
Apologies for the off-topic, but I think that we are discussing two different things here: I am referring to the Geolocation bug, which prevents me from e.g. checking in with Foursquare by using only WiFi location information (active GPS signal is needed) while you have solved the Geocoding bug, which has nothing to do with the Geolocation one...
Please correct me if I am wrong.
@Graham: I plan to install the CM7 that you have been working on (with the feedback from other users - I keep an eye on that thread!) but since I use my A1 for professional purposes as well, I would like to make sure that everything is working fine before moving to CM7. Apologies for not being able to contribute to the beta testing of CM7 but I am really looking forward to seeing a version based on the source code provided by Lenovo, which I think will lead to a more stable version of your CM7. I cannot thank you enough for taking the time to work on this, really!
geoponer said:
Apologies for the off-topic, but I think that we are discussing two different things here: I am referring to the Geolocation bug, which prevents me from e.g. checking in with Foursquare by using only WiFi location information (active GPS signal is needed) while you have solved the Geocoding bug, which has nothing to do with the Geolocation one...
Please correct me if I am wrong.
Click to expand...
Click to collapse
I think that whether it works in CM7 or not, it almost certainly isn't a kernel issue. I'll test it by signing up for Foursquare and give it a try out on CM7 to see if it works later on. Will post my findings in the CM7 thread.
Hi Graham,
just gonna pile up several questions/thinkings and feel free to comment them the or answer on your liking
We do have few hickups on CM7 but I am more excited about idea of having proper recovery then ironing current CM rom that works more than satisfactory right now. Do we have enough code (I assume that target here is u-boot) on our hands that someone can implement necessary changes to internal partitions and boot procedures?
what is your opinion on replacement of u-boot with something else? for example LK loader or to be more precise with its current HD2 implementation known as cLK. it allready has some neat features like HBOOT like GUI, ability to change partition sizes on device itself (without computer), ability to boot from different partitions (would be nice to have android and ubuntu side by side loaded on our devices) and last but not least it has fastboot support enabled...or is it better way fill up u-boot with desired features if possible?
so...just my wishful thinking...not enough knowledge on my side to do anything regarding all this just hoping that some of you, more capable guys gets interested in this
dusko_m said:
Hi Graham,
just gonna pile up several questions/thinkings and feel free to comment them the or answer on your liking
We do have few hickups on CM7 but I am more excited about idea of having proper recovery then ironing current CM rom that works more than satisfactory right now. Do we have enough code (I assume that target here is u-boot) on our hands that someone can implement necessary changes to internal partitions and boot procedures?
what is your opinion on replacement of u-boot with something else? for example LK loader or to be more precise with its current HD2 implementation known as cLK. it allready has some neat features like HBOOT like GUI, ability to change partition sizes on device itself (without computer), ability to boot from different partitions (would be nice to have android and ubuntu side by side loaded on our devices) and last but not least it has fastboot support enabled...or is it better way fill up u-boot with desired features if possible?
so...just my wishful thinking...not enough knowledge on my side to do anything regarding all this just hoping that some of you, more capable guys gets interested in this
Click to expand...
Click to collapse
I do want to implement something that's pretty much as you describe. My biggest motivation is that it's currently not safe to flash a kernel since you can break both system and recovery that way in one go - I really want to make the boot process more robust.
gmarkall said:
Also, I compiled a tun.ko - tun.ko
I haven't tested it yet - is anyone able to try it please?
Click to expand...
Click to collapse
The module loaded without a problem on my 2643_ROW Kernel. Installed "Rooted AnyConnect" from the "Play Place". Now I can connect to my company VPN.
gmarkall: YOU ROCK! THANK YOU!!!
tun.ko
Graham
The tun.ko module works perfectly with openvpn on 2643_ROW.
I can now access my Amahi home server,awsome.
Thanks a lot you are doing a great job.
Dont want to sound presumptuous but any chance of a cifs.ko to go with it .
Cheers
Infraredevans said:
Dont want to sound presumptuous but any chance of a cifs.ko to go with it .
Click to expand...
Click to collapse
I'll give it a whirl... give me a few minutes.
gmarkall said:
I'll give it a whirl... give me a few minutes.
Click to expand...
Click to collapse
Here it is: http://www.doc.ic.ac.uk/~grm08/ideapad/cifs.ko
To compile it I had to copy md5.h from another kernel source to fs/cifs in the kernel tree. I also had to edit init/Kconfig so that CONFIG_SLOW_WORK defaulted to yes. I configured the module with the options:
Support Legacy LANMAN servers which use weaker security
CIFS Extended attributes
CIFS POSIX attributes
and without statistics, debugging, or experimental features. Let me know if this is a suitable config - I could always tweak it and build another one.
arm-2010q1-202-arm-none-linux-gnueabi.bin
Did someone manage to install arm-2010q1-202-arm-none-linux-gnueabi.bin on 64bit system?
xbdesign said:
Did someone manage to install arm-2010q1-202-arm-none-linux-gnueabi.bin on 64bit system?
Click to expand...
Click to collapse
I did - I didn't have any problems, but my random guess about how to solve it could be to install ia32-libs. If installing that doesn't solve it, can you post a bit more detail about the problem?
I am using ubuntu 10.04 LTS and just cant install / find Getlibs to install a 32-bit version of xulrunner :-(
xbdesign said:
I am using ubuntu 10.04 LTS and just cant install / find Getlibs to install a 32-bit version of xulrunner :-(
Click to expand...
Click to collapse
Do you need that to run the installer? I just downloaded the tar version instead and extracted it. I saw there was an installer as well, but I thought it would be more hassle than using the tarball so I just ignored it.
Hi everyone! I'd like to experiment developing little apps and run them in ARM..
I have an old HTC Polaris to play with, which originally included WinMo and now has a wiped NAND with Android Kernel...
Is it possible to, instead of running Android, having a little bash running on the device to run little scripts and compiled binaries?
I was fooling around with a custom Android setup I had, named "Not So Super Froyo RLS18". I deleted android-related files (apks, frameworks and stuff) and just left binaries, config files, libraries and firmwares...
In the root filesystem there's a sysinit.rc file, which repairs permissions, initializes services and stuff.. once it's done, I'm not sure where the boot sequence goes!
I disabled a couple services (zygote, bootanimation, for instance) and now the boot hangs in a screen saying " A N D R O I D ". At this stage, the phone started configuring some stuff and the bootanimation showed up. Well, I got there and the phone seems to be halted, even though i created a little script on /etc/init.d that echoed a hello world and called bash, but still... nothing showed up..
Is this idea kinda crazy or am I just missing something?
Cheers!
Sorry for double-posting.
I've been able to get into a bash by creating the init file at the root of /system partition, but I wasn't able to manipulate it, since ADB wasn't running in background.. So I kept untouched the sysint.rc file, and triggered from there a little bash that called "busybox run-parts [...]" to run init.d scripts.
Everything going well so far, so I tried to push it a little bit further. Since I still cannot run compiled C binaries on there (linking problems), I tried to run a minimal debian install from that little bash.
Using debootstrap, I made a little rootfs which chrooted correctly. Now I'm trying to run Xorg.
Having a configured xorg.conf file, I get "invalid argument" initializing framebuffer...
Code:
(EE) FBDEV(0): FBIOPUT_VSCREENINFO: Invalid argument
(EE) FBDEV(0): mode initialization failed
But running Xorg in verbose mode, seems to get display properties right (screen resolution, depth, etc).
Now I'm thinking about two plausible problems: Is this a permissions issue (I haven't read too much about how android handles this) or a Kernel issue (In this case, I'll have to manage and find a way to edit the NBH file)?
Any help would be appreciated..
Cheers!
PS: Sorry for double-posting.
SEE 4TH POST FOR ROM LINK
DISCLAIMER
As per always im not responsible for any problems that may or may not arrise from this UNOFFICIAL build, i am in no way responsible for any flash issues using SP flash tool, What you do here you do of your own accorrd i never forced you to flash anything, now the legal part is out of the way.
______________Device_specification____________
Model : 5044T
Chip type : eMMC
Fs type : Ext4
Mtk chip type : MTK6737M
Mtk chip type : MTK6735M
Kernel version : 3.18.19+
........Welcome to CR Droid 3.8.7 UNOFFICIAL.......
** NOTE **
This firmware is for Alcatel U5/Optus x Spirit 5044T models ONLY,
NOT WORKING
• Front Camera DOES NOT work
____________________________________________
PRE REQUISITE'S
• OEM unlocked in developer options
• Flash TWRP with SP flash tool.
• Format data in wipe menu before flashing rom & Gapps
• Install Rom first then install Gapps straight after
• Wipe cache/Dalvik & reboot
___________________________________________
LINKS
TWRP 3.2.3-0
https://drive.google.com/file/d/1YMfYp4z1tgdjvlK6KRlMsGLmkW_oikZz/view?usp=drivesdk
GAPPS
https://opengapps.org
SP FLASH TOOL
https://spflashtool.com
MEDIATEK VCOM FLASH DRIVER
https://spflashtool.com/download/MediaTek_USB_VCOM_drivers.zip
Pics of build
Links been pulled temporarily due to a modem issue.
Currently rectifying the situation now link will be back up asap.
See links on first post for GAPPS, TWRP, & SP flash tool.
CR droid 3.8.7 2019-02-24
https://drive.google.com/file/d/1S78TeH-8rHXAhqmSZS_h1PyoEGhSxUE0/view?usp=drivesdk
DISCLAIMER
As per always im not responsible for any problems that may or may not arrise from this UNOFFICIAL build, i am in no way responsible for any flash issues using SP flash tool, What you do here you do of your own accorrd i never forced you to flash anything, now the legal part is out of the way.
CHANGELOG
• RIL error is now resolved
• Minor changes to UI,
• Removed substratum until i can fix
• changed to TCL fingerprint for the play store,
• Added low ram optimiastion
• Added Volte to /etc /bin /lib & boot.img
• Added Vilte to /etc /bin /lib & boot.img
• Added hd voice calling
• Added Dual mic support
• Added NFC compatabilty
• Changed some cam libs to clean the picture up, touch to focus works camera quality is on par with stock if not better.
• Ril optimisations, call quality is now same as stock
NOT WORKING
• Vilte, driver compatabilty issue trying to fix may work partially
• NFC, im working on it for now everything but the running app has been placed.
• FRONT CAMERA DOES NOT WORK
dont ask me to fix it, i will decompile the kernel when i get free time to do so to try and fix,
ive already chowned & chmod'ed init.rc & init.mt6735 with drivers from stock, switched to running through mediaserver instead of cameraserver in service_contexts as it does on stock, created an init.camera.rc to enforce the stock camera permissions, switched each lib out individually leaving only those that dont break the camera, switched camera.mt6735m out in HW aswell as the mtk_camera_clientand it still dosent work i will continue to work on this problem until resolved
Nice job with the ROM, mate. I presume you're Australian, right? Had to mention it based on the Optus reference so yeah.
And care to expound on decompiling the kernel? I presume you can deduce what's going on with it so you could build an equivalent kernel using extant sources, yes?
blakegriplingph said:
Nice job with the ROM, mate. I presume you're Australian, right? Had to mention it based on the Optus reference so yeah.
And care to expound on decompiling the kernel? I presume you can deduce what's going on with it so you could build an equivalent kernel using extant sources, yes?
Click to expand...
Click to collapse
Hey mate sorry for late reply, been finishing a ubifs cyanogenmod 11 build ive jjust released,
Cheers for the feedback yeah this one is for alcatel 5044T using kernel 3.18.19+ great rom though just havent gotten round to decompiling kernel to fix the front camera managed to interpolate the back though to be better than stock
I use a .sh file called kernel-decompile.sh usually but havent decompiled a kernel in a while i try to use stock untouched as it saves the headache of getting kernel readable to make changes,
Did you make any progress on your build yet ? Managed to take a breif look at your device tree i noticed in one of the files it was screeming at the init.environ.rc is this present in your boot.img as its stating that the paths are missing for it if you have the init.environ.rc present you just need to add the paths listed into there corresponding path being either BOOTCLASSPATH or SYSTEMCLASSPATH
I noticed you init.rc is not right at all there is no information within to run any of the /bin resources required to execute gui, post fs-data section is also missing aswell as setting up the global evironment was also wrong i beleive as there was no info for chowning or chmodding below the mkdir asserts,
Ive still not looked at alot but everything else that i have managed to look at seems to be pretty good
I should be hopefully getting my Lineage 14.1 build up for the alcatel pixi 3 using stock 3.4.67 kernel soon so you may be able to see how i made the boot.img and compare it yours if you want or i have my LineageOS 13.0 build already up for the Pixi 3 already which uses the same setup pretty much because afaik the way the fs setup is set it out in the fstab and init.rc is all the same from 5.0+ onwards as it uses encrypted footers and what not, i had to vold manage the 900Mb /custpack partition to be used as user accessible data for file transfers and general storage of photos videos etc as it would not mount any other way and would cause me infinite boot loop i had to also set the 3.6GB /internal storage as a voldmanaged user inaccessible partition reserved for system storage as the /system partition is only 512mb so ive been struggling for space to make everything work but its nearly done
Matty1993 said:
Hey mate sorry for late reply, been finishing a ubifs cyanogenmod 11 build ive jjust released,
Cheers for the feedback yeah this one is for alcatel 5044T using kernel 3.18.19+ great rom though just havent gotten round to decompiling kernel to fix the front camera managed to interpolate the back though to be better than stock
I use a .sh file called kernel-decompile.sh usually but havent decompiled a kernel in a while i try to use stock untouched as it saves the headache of getting kernel readable to make changes,
Did you make any progress on your build yet ? Managed to take a breif look at your device tree i noticed in one of the files it was screeming at the init.environ.rc is this present in your boot.img as its stating that the paths are missing for it if you have the init.environ.rc present you just need to add the paths listed into there corresponding path being either BOOTCLASSPATH or SYSTEMCLASSPATH
I noticed you init.rc is not right at all there is no information within to run any of the /bin resources required to execute gui, post fs-data section is also missing aswell as setting up the global evironment was also wrong i beleive as there was no info for chowning or chmodding below the mkdir asserts,
Ive still not looked at alot but everything else that i have managed to look at seems to be pretty good
I should be hopefully getting my Lineage 14.1 build up for the alcatel pixi 3 using stock 3.4.67 kernel soon so you may be able to see how i made the boot.img and compare it yours if you want or i have my LineageOS 13.0 build already up for the Pixi 3 already which uses the same setup pretty much because afaik the way the fs setup is set it out in the fstab and init.rc is all the same from 5.0+ onwards as it uses encrypted footers and what not, i had to vold manage the 900Mb /custpack partition to be used as user accessible data for file transfers and general storage of photos videos etc as it would not mount any other way and would cause me infinite boot loop i had to also set the 3.6GB /internal storage as a voldmanaged user inaccessible partition reserved for system storage as the /system partition is only 512mb so ive been struggling for space to make everything work but its nearly done
Click to expand...
Click to collapse
You're welcome, glad you had things sorted out on your end. I do have an init.environ.rc on my /out folder but I am not sure if it's right at all lol:
Code:
# set up the global environment
on init
export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
export ANDROID_BOOTLOGO 1
export ANDROID_ROOT /system
export ANDROID_ASSETS /system/app
export ANDROID_DATA /data
export ANDROID_STORAGE /storage
export ASEC_MOUNTPOINT /mnt/asec
export LOOP_MOUNTPOINT /mnt/obb
export BOOTCLASSPATH /system/framework/core-libart.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/apache-xml.jar
export SYSTEMSERVERCLASSPATH /system/framework/org.cyanogenmod.platform.jar:/system/framework/org.cyanogenmod.hardware.jar:/system/framework/services.jar:/system/framework/ethernet-service.jar:/system/framework/wifi-service.jar
export LD_PRELOAD libsigchain.so:libxlog.so
On the stock ramdisk it looks like this:
Code:
# set up the global environment
on init
export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
export LD_LIBRARY_PATH /vendor/lib:/system/lib
export ANDROID_BOOTLOGO 1
export ANDROID_ROOT /system
export ANDROID_ASSETS /system/app
export ANDROID_DATA /data
export ANDROID_STORAGE /storage
export ASEC_MOUNTPOINT /mnt/asec
export LOOP_MOUNTPOINT /mnt/obb
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework2.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/webviewchromium.jar:/system/framework/mediatek-common.jar:/system/framework/mediatek-framework.jar:/system/framework/CustomProperties.jar:/system/framework/mediatek-telephony-common.jar:/system/framework/mediatek-tablet.jar
And by init.rc do you mean init.mt8127.rc? Could you tell me which parts are wrong please, as I've based this off @Stricted's MT8127 repo. I doubt that the missing "LD_LIBRARY_PATH" is at fault too. Also, I am getting a missing "__umodsi3" symbol error prior to introducing a (rather pointless imo) shim just to sort of make hwcomposer happy, even though I still end up not getting the GUI to show up.
You mind if we continue on discussing this on the LeapFrog development thread though? I don't want to stray off your original topic here anyway.
blakegriplingph said:
You're welcome, glad you had things sorted out on your end. I do have an init.environ.rc on my /out folder but I am not sure if it's right at all lol:
On the stock ramdisk it looks like this:
And by init.rc do you mean init.mt8127.rc? Could you tell me which parts are wrong please, as I've based this off @Stricted's MT8127 repo. I doubt that the missing "LD_LIBRARY_PATH" is at fault too. Also, I am getting a missing "__umodsi3" symbol error prior to introducing a (rather pointless imo) shim just to sort of make hwcomposer happy, even though I still end up not getting the GUI to show up.
You mind if we continue on discussing this on the LeapFrog development thread though? I don't want to stray off your original topic here anyway.
Click to expand...
Click to collapse
Hey mate sorry for late replty been helping a friend out building a twrp for them,
Yeah ill go through your init now on your guthub and ill type out into a notepad++ what i can visually see is wrong with it and any other files also,
LD_LIBRARY_PATH i beleive wont break a system and shouldn't stoo GUI loading up, also with HW composer could you notjust disabling it to run native 2D graphics ?
Anyhow yeah ill jump on the leapfrog forum when i get some time
user154 said:
Hey buddy, hows things going?
I was able to fix the front camera in my rom a few weeks ago,
There is no need to touch the boot image or kernel, I also experimented with changing permissions of camera drivers in the init files to no avail.
To fix we must ignore the advice of every porting guide and replace more than one lib.
In the end I looked at similar mtk kernel sources and was able to trace the error back to libcam.hal3a.v3.so however just changing this lib is not enough, we must also change some of its dependencies. Attached is a list of 12 libs that I changed to solve the problem
EDIT:
It may not be necessary to change all of these libs, you may be able to get away with just changing the hal3a libs and featureio and featureiodrv as these were the last ones I changed, I didnt try taking away any of the other libs I replaced as I found 720p recording was better and general camera quality had improved
Click to expand...
Click to collapse
Hey mate,
Yeah im not to bad sorry for late reply ahh sweet that means i dont have to decompile my kernel now that may have been one of the libs id changed that time id gotten it working and didnt even know id changed it, how did you figure tthat one out, as usually for cam the mains are camalgo, camdrv, gralloc & featureio i couldnt wrap my head round why i couldnt get it working again lol
Yeah 720p i found was the best optimal setting as SS 480p seemed to be a bit grainy and 1080p isnt device supportive so is so slow i havent released an update to CRdroid so may end up getting it done in the next few weeks 5044T users will be happy great work on figuring it out
Matty1993 said:
Hey mate sorry for late replty been helping a friend out building a twrp for them,
Yeah ill go through your init now on your guthub and ill type out into a notepad++ what i can visually see is wrong with it and any other files also,
LD_LIBRARY_PATH i beleive wont break a system and shouldn't stoo GUI loading up, also with HW composer could you notjust disabling it to run native 2D graphics ?
Anyhow yeah ill jump on the leapfrog forum when i get some time
Click to expand...
Click to collapse
I am not sure, something's keeping the loading animations from showing up, maybe I might have missed a few more blobs or whatnot. I'll have to upload an unsigned dump of the Epic for you to peruse some time. You mind if we get you a donor Epic whilst I wait for mac2612 at /r/OpenLF to get his own Epic being he's had Linux development experience before.
user154 said:
So I looked at logcat and saw that the issue was lensdrv looking in the wrong place for the lens. so I looked at some mtk kernel sources to see if I could trace lensdrv back to a specific lib. It appeared to be part of hal3a however changing this lib would make the camera app disappear, so I tried installing a different camera app which failed to install. when I looked at logcat the install failed because native libs were missing so I used a dependency viewer to see what libs were dependencies of hal3a and began changing them one by one, focussing on drv libs and then testing. Looking at logcat after I had changed a few I saw a reference to a problem with featureio so I opened featureio and featureiodrv in a hex viewer and one of them (cant remember which) had a string specifying the lens location, so I added these two and the front camera worked. This is what makes me think you could maybe get away with just changing hal3a and the 2 featureio libs to get the front camera working, however I was happy with how the camera was working so didnt try to take away any of the other depdencies I had changed
Click to expand...
Click to collapse
Dependency viewer? Which one are you using if you don't mind telling?
user154 said:
This is the one I use:
https://forum.xda-developers.com/android/software-hacking/tool-read-elf-gui-android-libs-t3717016
Click to expand...
Click to collapse
Hey bud sorry for the very late reply i feel quite rude i somehow managed to unmark my own thread just scoured my mentions section looking for a comment on it lol,
Had troubles with pc also blowing just got it fixed today so looking forward to getting camera all working well with it managed to make some progress with my rom before it did though
Ive turned my build into a vendor image as im also trying to incorporate all the test tools from the stock rom aswell as the VOLTE modem thats been attached to custpack in stock,
Managed to get most test tools working well but something wrong with the modem not engaging properly it says YES OPTUS but has no signal or service and imei is also blank not invalid but blank & gone lol yet sim still registers optus so i think im gonne be doing some debugging on it to see whats going wrong ive got a feeling i may need to reverse engineer the modem libs hoepfully not other than that ive only got a small bug when it first boots up that states "a vendor image mismatch has been detected, typically this means your vendor image is out of date please ensure your vendor image matches NJH47F"
Got me stumped a bit on it as i cant spot anything obvi wrong but ill persevere as having it as a vendor build seems to use at least 60-100mb less ram, first boot is quicker & there is virtually no lag at all compared to a traditional build and i was able to add all the SLPencryption and Fpsv files and libs without getting a bootloop as im trying to get encryption to work with it, not sure if its working though as i didnt get a chance to test yet.
Ill keep you updated on progress anyhow as i go when i get round to it i gotta help blake first though as i promised him id help him get his CM 12.1 working when i got my computer working again as hes been dying to get it working on his leapfrog epic
Hows things on your end with your rom ? Did you manage to make any progress with getting IMS, VOLTE or VILTE anywhere near working im struggling to say the least with it lol
MTK source code
Hi @Matty1993
Not sure if this will help but I have found the FULL Mediatek source code for the MT6737x.
The Android 8.1 sources can be found HERE along with some other useful things like the Android SDK source (This is the full 6.0 source code). :good:
I have downloaded the 8.1 source and it seems to be complete.
There are also full build instructions although you will need to create your own "Build Project" from what I understand or maybe you can just cherry pick what you need. :fingers-crossed:
Below are the officially maintained repository's on github.
OrangePi 4G-IOT
OrangePi 4G-IOT build on MTK6737 Soc, the officially maintained repository as follows:
kernel:
https://github.com/orangepi-xunlong/OrangePi4G-iot_kernel.git
u-boot:
https://github.com/orangepi-xunlong/OrangePi4G-iot_bootloader.git
build scripts
https://github.com/orangepi-xunlong/OrangePi4G-iot_scripts.git
external binary file
https://github.com/orangepi-xunlong/OrangePi4G-iot_external.git
toolchain
https://github.com/orangepi-xunlong/OrangePi4G-iot_toolchain.git
:fingers-crossed:
user154 said:
Hey, dont feel rude we cant all always reply straight away I've just welcomed my 2nd son into the world so not really been on here very much over the last month or so.
How is turning your build into a vendor image going? I didnt think this device had a seperate vendor partition just a sub folder of the system partition. If youve managed to give this device a vendor partition that would be quite a feat, theoretically it would mean it would be able to boot a GSI although I dont know how much mileage you would get out of this in reality.
I would imagine some of the problems you are having would be due to the system expecting files to be in one place but you have them in another, you should be able to work this out from the logs though if this is the case.
Good luck to the pair of you on the leapfrog epic front, sounds like a very fun project
I havent done much more on my ROM the only thing left to fix is IMS/VOLTE but I cannot test this so without having someone to test it and provide logs there isnt much I can do. I've been looking round for an oreo rom to port from but thanks to TCL deciding to compile the stock rom as 32 bit and not 64 this is proving rather difficult. I have looked at the possibility of porting 64 bit rom to 32 but from what I can tell the chances of ending up with a decent port rom with no major bugs is pretty slim.
At the moment my main project has been making a game for/with my eldest son, he is obsessed with kirby so made a simple platformer using sprites ripped from various kirby games.
Click to expand...
Click to collapse
Havent worked on the build in a while been in hosptial with pneumonia horrible just horrible wouldnt wish it upon anyone, before hand though yeah vendor build was going great so much more can be added and works where it dosent in /system, such as the slp encryption and cloud test suites etc would all give me bootloop when added to /bin /etc and /lib so what i did is made the system think its got an emulated /vendor partiton instead of me going to all the trouble to create a logical /vendor partitiion by editing a few things in the boot.img .rc files and slinking it in the cpiolist so that the dir is set in the rootfs with 0644 permission but still using 0755 permissions in /system/vendor took me a while to figure it out but even makes system boot and run faster and smoother dont know how thats possible though as it even uses 100mb less ram deffo works as /vendor but as the message i stated in the earlier post just wont go TF away no matter what i do lol,
Still fixing front camera trying to compile my own camera lib for the front but havent gotten round to it yet
bigrammy said:
Hi @Matty1993
Not sure if this will help but I have found the FULL Mediatek source code for the MT6737x.
The Android 8.1 sources can be found HERE along with some other useful things like the Android SDK source (This is the full 6.0 source code). :good:
I have downloaded the 8.1 source and it seems to be complete.
There are also full build instructions although you will need to create your own "Build Project" from what I understand or maybe you can just cherry pick what you need. :fingers-crossed:
Below are the officially maintained repository's on github.
OrangePi 4G-IOT
OrangePi 4G-IOT build on MTK6737 Soc, the officially maintained repository as follows:
kernel:
https://github.com/orangepi-xunlong/OrangePi4G-iot_kernel.git
u-boot:
https://github.com/orangepi-xunlong/OrangePi4G-iot_bootloader.git
build scripts
https://github.com/orangepi-xunlong/OrangePi4G-iot_scripts.git
external binary file
https://github.com/orangepi-xunlong/OrangePi4G-iot_external.git
toolchain
https://github.com/orangepi-xunlong/OrangePi4G-iot_toolchain.git
:fingers-crossed:
Click to expand...
Click to collapse
Big rammy my friend how have you been and thank you so much for linking me to some proper oreo source for these SoCs as i was trying to port lineage 15.0 32bit rom i found for Moto G4 MT6373M but just cant get it past the logo no natter what i do, being complete or near complete sources though i should be able to make something works cant thank you enough for the links again
Matty1993 said:
Big rammy my friend how have you been and thank you so much for linking me to some proper oreo source for these SoCs as i was trying to port lineage 15.0 32bit rom i found for Moto G4 MT6373M but just cant get it past the logo no natter what i do, being complete or near complete sources though i should be able to make something works cant thank you enough for the links again
Click to expand...
Click to collapse
Sorry to hear you have been seriously ill with pneumonia
I thought you had gone kind of quite on the forum, I do hope your all sorted now and feeling better. :fingers-crossed:
Yes the source is probably the best I have seen thus far and providing you have the necessary drivers and a little know how I am pretty sure you could bring up a new Project for your own device. :fingers-crossed:
Not sure about your booting issue as it could be just about anything but I am sure you will hunt down the problem. :fingers-crossed:
bigrammy said:
Sorry to hear you have been seriously ill with pneumonia
I thought you had gone kind of quite on the forum, I do hope your all sorted now and feeling better. :fingers-crossed:
Yes the source is probably the best I have seen thus far and providing you have the necessary drivers and a little know how I am pretty sure you could bring up a new Project for your own device. :fingers-crossed:
Not sure about your booting issue as it could be just about anything but I am sure you will hunt down the problem. :fingers-crossed:
Click to expand...
Click to collapse
All good dude yeah lots of nasty stuff in my lungs i got the privledge to know what a tube being stuck down your throat to make you breathe felt like yeah ill be sure to check it out as ive looked at a few but none of them were by far near complete which is probs why i couldnt get oreo to boot,
optus have finally switched to Qualcomm's snapdragon so they can run 8.1.0 on there new updated Optus x spirit 2 so they even have abandoned mtk i on the other hand prefer the overjoyable mess that mediatek is haha yeah thats what i figured about the boot issue to could be an init.xx.rc or se_contexts or even the init possibily everything else is perfect in bootimg, either that or could be one of the binaries in /bin or .jars in /framework could even be in /lib ill just keep picking away while i go through the oreo source until some magic happens :laugh:
Matty1993 said:
All good dude yeah lots of nasty stuff in my lungs i got the privledge to know what a tube being stuck down your throat to make you breathe felt like yeah ill be sure to check it out as ive looked at a few but none of them were by far near complete which is probs why i couldnt get oreo to boot,
optus have finally switched to Qualcomm's snapdragon so they can run 8.1.0 on there new updated Optus x spirit 2 so they even have abandoned mtk i on the other hand prefer the overjoyable mess that mediatek is haha yeah thats what i figured about the boot issue to could be an init.xx.rc or se_contexts or even the init possibily everything else is perfect in bootimg, either that or could be one of the binaries in /bin or .jars in /framework could even be in /lib ill just keep picking away while i go through the oreo source until some magic happens :laugh:
Click to expand...
Click to collapse
Yes most definitely not a good experience I am sure. :crying:
Hope you work out your booting issue :good:
I may need to pick your brains later on regarding the Lenovo TAB2 A10-70F/L I managed to get the KK 3.10.65 kernel source to build without any real errors but I think it maybe arm rather than arm64 IDK the old style MediaTek layout is very confusing and I am not sure how it all works eg which parts come from the actual kernel and what comes from the Mediatek project which config's it use or how to make config changes even etc etc.
I have had a lot on recently so not really had time to fully explore it Github lenovo_kernel_a10-70f
I can't seem find any good guides for working with this old style layout unless you know of any. :fingers-crossed:
bigrammy said:
Yes most definitely not a good experience I am sure. :crying:
Hope you work out your booting issue :good:
I may need to pick your brains later on regarding the Lenovo TAB2 A10-70F/L I managed to get the KK 3.10.65 kernel source to build without any real errors but I think it maybe arm rather than arm64 IDK the old style MediaTek layout is very confusing and I am not sure how it all works eg which parts come from the actual kernel and what comes from the Mediatek project which config's it use or how to make config changes even etc etc.
I have had a lot on recently so not really had time to fully explore it Github lenovo_kernel_a10-70f
I can't seem find any good guides for working with this old style layout unless you know of any. :fingers-crossed:
Click to expand...
Click to collapse
Yeah was horrible, made some minor progress on the boot issue dosent switch straight off now is sitting on logo for about 30 seconds before it switches off so getting there bit by bit haha,
Never worked on a lenovo Tab 2 what MTK specs is it running ?
your correct to also about it being confusing the word id use is uniqe experience to say the least last time i worked on older style mtk sources however i did make some notes as i got stuck a fair amount of times aswell not knowing where to put things but it varies from source to source where things go and configs etc etc so i dont know if the layouts would be the same
Matty1993 said:
Yeah was horrible, made some minor progress on the boot issue dosent switch straight off now is sitting on logo for about 30 seconds before it switches off so getting there bit by bit haha,
Never worked on a lenovo Tab 2 what MTK specs is it running ?
your correct to also about it being confusing the word id use is uniqe experience to say the least last time i worked on older style mtk sources however i did make some notes as i got stuck a fair amount of times aswell not knowing where to put things but it varies from source to source where things go and configs etc etc so i dont know if the layouts would be the same
Click to expand...
Click to collapse
The tablet is based on the mt6752/6732 chip set (Quad Core) although Lenovo's specs say HERE
WiFi: MediaTek® MT8165 64-bit 1.7 GHz Quad Core
4G LTE: MediaTek® MT8732 64-bit 1.7 GHz Quad Core
The kernel will boot on either device WiFi or 4G so clearly not much difference between them and seems to be more of a naming thing and possibly some minor tweaking.
The Lenovo K3 kernel source is called the aio (All in One) so I am thinking it may well build for this Tablet too as all the drivers seem to be present in that source. android_kernel_lenovo_aio_otfp I just need to workout the defconfig and what device specific parts I need from the tablets KK source code.
:fingers-crossed:
After many hours of trial and error, I now understand how to get RR and Lineage to boot with latest firmware updates. NO MORE BLINKING BLACK/GREY SCREEN!
Tested with Resurrection Remix 16.1 and Lineage 15.1 (Oreo)
Simply flash the boot and vendor images to their corresponding partitions using fastboot. Find the proper images from this Tmobile firmware,. https://androidfilehost.com/?fid=11410963190603878004 This method preserves IMEI and Baseband.
Nano/pico gapps work as well. HideProps magisk module can set your fingerprint to Moto E5 Play and get around that unregistered Google sh**. I edit /vendor/etc/fstab.qcom myself with vi and inside TWRP terminal shortly after flashing vendor partition. I do this because zips and other copies held me up. All I change is forceencrypt to encryptable in the data line of the fstab. Magisk 19.3 patches for verity. Another thing I do is move /vendor/lib/libeffects.so to /vendor/lib/soundfx/libeffects.so. Doing this will keep music/audio from studdering when screen is off. Last thing, TWRP 3.3.1 formats data as ext4 by default. We want to format with f2fs or you get corrupted data messages at boot. Happy flashing!
##
I find the earliest of these metro pcs firms have a working vendor image.
https://mirrors.lolinet.com/firmware/moto/james/official/Metropcs/
I got bluetooth working today, and lots of clues where I found the fix...
####Bluetooth
Now that I can set it up from a clean install, here's the basics for Bluetooth...
You'll need files from the stock system image. You can use a backup to get these or also use simg2img with dd and 7zip, I'll make a zip installer when I have more time.
1. Copy the following files, from stock image directory "/system/etc/" to the "/vendor/etc/" directory on device
mixer_paths* (14 files)
audio_* (5 files)
media_profiles* (3 files)
Edit the file /system/etc/ld.config.26.txt
add this text to the very end of line 61 :/system/${LIB}/vnd-sp/hw
You're done! If you did everything as described, and it doesn't work, check the permissions of the files you add to vendor partition with other xml files in same directory. I did mine on the device while running, it worked in place, without rebooting device. The GSI system is new to me, however the "Same Proccess HAL(hardware abstraction layer)" voodoo can likely be configured correctly to fix screen and port other GSIs' to our device.
Any chance of getting lamens terms step by step instructions on how to do this? That is the model I have and really liked those roms when I tried unsuccessfully to make them work last year.
edit: 9/21 6pm
I think it's because mine is TMO variant.
Mattswad said:
Any chance of getting lamens terms step by step instructions on how to do this? That is the model I have and really liked those roms when I tried unsuccessfully to make them work last year.
Click to expand...
Click to collapse
Trying based on this now. I'll update you.. been trying for TOO LONG lol it's almost the same time you posted 2 days ago!
---------- Post added at 04:12 AM ---------- Previous post was at 03:45 AM ----------
I've been up all night trying to get either one to work.. I think I came close but I am stuck at a looping blank screen.
If you could step through a bit more for us? I'd REALLY love to have lineageOS on it.
mrbox23 said:
After many hours of trial and error, I now understand how to get RR and Lineage to boot with latest firmware updates. NO MORE BLINKING BLACK/GREY SCREEN!
Tested with Resurrection Remix 16.1 and Lineage 15.1 (Oreo)
Simply flash the boot and vendor images to their corresponding partitions using fastboot. Find the proper images from this Tmobile firmware,.
Nano/pico gapps work as well. HideProps magisk module can set your fingerprint to Moto E5 Play and get around that unregistered Google sh**. I edit /vendor/etc/fstab.qcom myself with vi and inside TWRP terminal shortly after flashing vendor partition. I do this because zips and other copies held me up. All I change is forceencrypt to encryptable in the data line of the fstab. Magisk 19.3 patches for verity. Another thing I do is move /vendor/lib/libeffects.so to /vendor/lib/soundfx/libeffects.so. Doing this will keep music/audio from studdering when screen is off. Last thing, TWRP 3.3.1 formats data as ext4 by default. We want to format with f2fs or you get corrupted data messages at boot. Happy flashing!
Click to expand...
Click to collapse
I have the Metro PCS version
Moto e5 Play XT1921-3
Mattswad said:
I have the Metro PCS version
Moto e5 Play XT1921-3
Click to expand...
Click to collapse
Ahh That is excellent news. I am about to take a focus supplement, and dive into trying again I'll let you know. I found a few more of MrBox23's posts and I think I MAYBE onto something.... wish me loads of luck. If it works for me I THINK it should work for you, but you might need to start with a diff image than me, or use a different boot and vendor img than I will.. not sure if I can help you find those files or not..
I'll be back later to update what I find.
Sorry I haven't been on for awhile. I'll go ahead and post my working vendor and boot images. On Google drive for download. Doing this will trash your speaker if you play music very loud at all, expect that. I do not understand how to fix it. Other than that it's a daily driver. I have been asked about encryption this and that.. You have to modify fstab.qcom within vendor partition. Also the TWRP for this device will format your data partition as ext4 while the ramdisk and init stack are configured for f2fs(if you try and boot with ext4 data, you get corrupted/encrypted data message). You have to change data partition back to f2fs in TWRP every time you format that partition. Or you could modify the TWRP image like I did to fix it permanent.
Files will be uploaded soon, make sure you understand what's involved before getting into this. I'll answer questions best I can, but this is for those who are dediced and willing to get down on some bootloops to figure it out, especially if you're not used to this sort of thing. Some magisk modules will cause bootloops, do those one at a time and gapps separately. I seriously recommend taking apart the firmware from OP and focus on getting to the aosp boot animation, THEN take care of verity/root and fstab. You're formatting data partition anyway you might as well successfuly backport the graphics first.
Vendor image TWRP backup, put this on its own with boot image. I keep it as vendor_fixed for easy reference. The fstab is already patched if you use mine.
Boot image TWRP backup, it is patched with magisk (19.4 likely) install magisk on your own anyhow. KEEP YOUR ORIGINAL VENDOR/BOOT PARTITIONS! There's stuff in there that you might want later on. Like the /vendor/etc/wifi folder for example or the pieces from the original ramdisk.
Vendor and boot with md5 sums to verify integrity.
https://drive.google.com/folderview?id=1-2KO_iRFTjLv6pyx-7Qmhi8kWZBpVIWD
Wipe everything, including internal storage(after backing up a working system).
Format data partition back to f2fs in advanced wipe options.
Get LineageOS 15.1 beta or RR you can find these here on XDA.
Flash Lineage zip its the old style zip install that copies idividual files, not an image, the boot image it installs needs to be replaced per instructions that follow.
Or flash RR system image from official repository link is found here on XDA.
If you flash a system image with TWRP you'll need to reboot back into recovery right after and resize the system partition in advanced wipe options or your system partion will be incorrect size afterwards, if flashing system with fastboot(recommended) then skip the resize instruction.
After you have a system installed, restore the vendor and boot images from the link. A good approach would be to backup your existing boot/vendor as a pair, then replace originals with downloaded images.
The first time I got this to work, I used fastboot to flash partitions, like this.... I followed instructions within Metro PCS firmware(one of those xml files has the fastboot commands, including some oem options that specify a particular mode) Then i flashed ...RR system, followed by boot/vendor images from firmware referenced in OP. I finished that with fastboot -w option, that was when it worked for me. I dealt with the fstab and boot verity patching AFTER I first saw the default Android boot animation. Once you see that plain white "android" with the slow moving left to right animation, your in. From what I can tell our device needs the older kernel within the boot image and the libs/binaries from the vendor image to get the screen working correctly. Your trading your working speaker, for a working screen. I have attempted to find exactly what it is that's different between the two, but it's over my head. Overall it's relatively stable, go easy with magisk modules, some of them will cause kernel panic(bootloop) use a recovery based magisk tool to disable offending module if this happens. Sometimes the device will not boot normally, usually this means the cache was erased(its okay) for whatever reason and I wait it out, otherwise I restore the vendor_fixd backup I made. I have not had gone back to stock ROM, however I have had to flash the vendor partition to get it booting, usualy happens if i flash a module or when updates break substratum theme.
Good luck!
Oh email me for quick response, within reason.
mrbox24 at gmail
Bonus screenshot and the TWRP 3.1.1 I modified with correct data format. If you have an sdcard with second partition it will show up as "linux" named after the chroot partition from mine.
Screenshot shows LSM kernel found here, yes it works.
mrbox23 said:
The first time I got this to work, I used fastboot to flash partitions, like this.... I followed instructions within Metro PCS firmware(one of those xml files has the fastboot commands, including some oem options that specify a particular mode) Then i flashed ...RR system, followed by boot/vendor images from firmware referenced in OP. I finished that with fastboot -w option, that was when it worked for me.
.
Click to expand...
Click to collapse
thank you for this! (and the files)
questions...
1.) Your files in your zip extract as boot.emmc.win and vendor_image.emmc.win ...
Should we rename them to boot.img and vendor_image.img before flashing?
2.) Is your file TWRP-3.1.1_JAMES_T_f2fs-data.img already fixed to format data as f2fs?
3.) where is the option in Twrp to backup vendor and boot images?
I'm almost ready to dive in...
aka.bugle said:
thank you for this! (and the files)
questions...
1.) Your files in your zip extract as boot.emmc.win and vendor_image.emmc.win ...
Should we rename them to boot.img and vendor_image.img before flashing?
2.) Is your file TWRP-3.1.1_JAMES_T_f2fs-data.img already fixed to format data as f2fs?
3.) where is the option in Twrp to backup vendor and boot images?
I'm almost ready to dive in...
Click to expand...
Click to collapse
Yes TWRP is fixed for f2fs data, also the correct version is 3.3.1 latest for device.
Those files are ready to be RESTORED, not flashed in TWRP. You would replace files in an existing backup with those. I have a fresh backup made from from the earliest metro pcs firmware. I am about to upload. What device do you have?
mrbox23 said:
Yes TWRP is fixed for f2fs data, also the correct version is 3.3.1 latest for device.
Those files are ready to be RESTORED, not flashed in TWRP. You would replace files in an existing backup with those. I have a fresh backup made from from the earliest metro pcs firmware. I am about to upload. What device do you have?
Click to expand...
Click to collapse
Cool. thanks.. So far I have three, 1921-2 At&t (new, prepaid, bootloader unlockable so far, daily phone), an xt1921-5 unlocked bootloader, sim locked to sprint, so far been unable to get another rom to boot, and an xt1921-3 metropcs Gsm unlocked, boot loader unlocked, and now booted to lineage 15.1 thanks to you and phh. Wifi works, and gapps go seem to not crash, I did the register a non-stock rom hoop jump with google. Camera nothing but gray or crashes. Everytime it boots, clock time is wrong. haven't really tested much yet.
Really want to be able to get camera functioning, and test an At&t sim in it before switching it to my daily device. I read that the camera fix was committed to 15.1 but I'm lost as how to apply those patches even if I could find them.
aka.bugle said:
Cool. thanks.. So far I have three, 1921-2 At&t (new, prepaid, bootloader unlockable so far, daily phone), an xt1921-5 unlocked bootloader, sim locked to sprint, so far been unable to get another rom to boot, and an xt1921-3 metropcs Gsm unlocked, boot loader unlocked, and now booted to lineage 15.1 thanks to you and phh. Wifi works, and gapps go seem to not crash, I did the register a non-stock rom hoop jump with google. Camera nothing but gray or crashes. Everytime it boots, clock time is wrong. haven't really tested much yet.
Really want to be able to get camera functioning, and test an At&t sim in it before switching it to my daily device. I read that the camera fix was committed to 15.1 but I'm lost as how to apply those patches even if I could find them.
Click to expand...
Click to collapse
I think those patches are applied at source code level. meaning it would be in a future release. My camera works running Resurrection Remix, on xt-1921-3 try copying [email protected] from stock /system/lib/hw to /vendor/lib/hw, making sure to keep permissions same as others in vendor/lib. im willing to read logs, does your att run lineage? if so, does bluetooth work?
I make custom scripts and have a custom build.prop, for example this.....
resetprop 'media.camera.ts.monotonic' 0
resetprop 'persist.camera.HAL3.enabled' 1
resetprop 'audio.deep_buffer.media' true
Those three lines are saved to a file called mediafix.sh in /data/adb/service.d to be ran at boot. it helps with media and camera issues. As well as a one line file called led-chg.sh
echo battery-charging > /sys/class/leds/charging/trigger
Which turns on the light, otherwise never used, in front of phone when charging.
I think it's important to use a/the real fingerprint from an e5 device along with other properties. To get the best out of the hardware and least error messages during boot. I go through logcat/dmesg and attempt to fix what's broken, like the camera on lineage(works without trouble on rr remix btw). I used hidepropsconf module at first and a sprint fingerprint, but later began using the one found in info.txt of firmware zip.
ill post my work in progress build.prop(hosting it with new vendor and boot images on gdrive) which noticeably improves overall performance and lends to less log errors, or lags and crashes.
I find the vendor/boot firmware here(oldest 2018) https://mirrors.lolinet.com/firmware/moto/james/official/Metropcs/ to work best. Audio is completely a loss though. My speaker is blown now and no Bluetooth unless running stock, not even the headphone jack works. All sound comes from the one speaker, even with headphones plugged in I'm at a loss with that issue.
I also modify the boot image. turns out the 1921-3(possibly others?) uses the sdk26 8.0 android ld(library config) instead of the ld.config.27.txt that matches its sdk level. in fact if i try to force the 27 lib config, the gray/black screen comes back. it boots up, i know because my charger light comes on, but no screen. Anyhow i change the os level in boot config to 8.1.0, this gets me to where i am now with only bluetooth(mixerpath/lib issues i suspect) and a couple missing ui features due to what i imagine originate from missing whitelists in /system/etc/permissions xml files.
Another thing of note is how i spoof the mac adress for wifi, this(and other things) is done by modifying the kernel command line config in boot.img. my second e5 play xt-1921-3 has a broken screen, and serves exclusively as a wifi-repeater, captive-portal, and ssh server/tunnel. i spoof the busted screen wifi mac, with an old device mac address that is still registered on xfininity wifi network. it repeats that connection to my other devices. very efficiciently at that. with 3+MiB/s average. it took some hacking but after i found out the oem partition on this device can be formatted, and removed from the ramdisk/system all together, without consequence(not to lineage, bootleggers, or rr remix that is) and be re-purposed to whatever else. its roughly 700MB in size perfect for a debian chroot with my custom wifi repeater and misc servers. running in its own dedicated internal(FAST)partition. This device, and its kernel level mac spoofing with the now almost phased out WCNSS qualcom configurable wifi firmware, is incredible. the busted screen one has been on every day non stop functioning as a repeater, router with captive portal, and dhcp service, for almost two months. it automatically connects to wifi, kills the android zygote/system server, kills its backlight and starts up a hotspot and sshserver/captive portal, all without cell service, and without any interaction.
Anyway, new mpcs files up soon.....
mrbox23 said:
I think those patches are applied at source code level. meaning it would be in a future release. My camera works running Resurrection Remix, on xt-1921-3 try copying [email protected] from stock /system/lib/hw to /vendor/lib/hw, making sure to keep permissions same as others in vendor/lib. im willing to read logs, does your att run lineage? if so, does bluetooth work?
###bugle added### my Att is an xt1921-2, can't even unlock the bootloader... But 30 bucks isn't bad for a new screen and a new speaker. ###
Another thing of note is how i spoof the mac adress for wifi, this(and other things) .
Anyway, new mpcs files up soon.....
Click to expand...
Click to collapse
Years ago, I used to compile Gentoo to run on some archaic hp tablets... Now I just run Linux mint on somewhat newer hardware. This gave me a limited skillset to get an old Moto mb300 running with gingerbread and CyanogenMod. Everything worked, had them for over 4-5 years, just started really messing up over the summer. Miss the real keyboard.
Thanks so much for the tips and insights. It'll take some time to absorb everything in your post.
aka.bugle said:
Years ago, I used to compile Gentoo to run on some archaic hp tablets... Now I just run Linux mint on somewhat newer hardware. This gave me a limited skillset to get an old Moto mb300 running with gingerbread and CyanogenMod. Everything worked, had them for over 4-5 years, just started really messing up over the summer. Miss the real keyboard.
Thanks so much for the tips and insights. It'll take some time to absorb everything in your post.
Click to expand...
Click to collapse
My first "Android" phone was the HTC HD2 wich was actually a Windows phone that can boot linux from the sdcard. I came across it while learning how to get linux booting on laptops. I was fascinated with booting a mini linux on a portable device. I learned about Android and linux in that way, at the same time. Kernel, ramdisk, java machine, broadband cellular modem, and wifi radio in my pocket. I abandoned windows entirely, to this day lol
Right you are! @mrbox23 ... I've got camera on RRemix on the metro 1921-3!
I'm gonna put the lineage/no camera issue on the back burner for when I try to use your older boot/vendor img trick (boot Lineage 15.1) on the unlocked 1921-5.
(I only have a 1Mb/s dsl connection here, takes about 4-5 hours for a 1 gig file to dl)
So, for the Metro 1921-3, I can't find libeffects.so or even the soundfx folder to copy into. (studder fix)
Your script 2 files for media/camera and charge led, other than making them executable (0755? 0700?) will they be called (without any other mod) being in /data/adb/service.d ?
I think it's important to use a/the real fingerprint from an e5 device along with other properties. To get the best out of the hardware and least error messages during boot. I go through logcat/dmesg and attempt to fix what's broken, like the camera on lineage(works without trouble on rr remix btw). I used hidepropsconf module at first and a sprint fingerprint, but later began using the one found in info.txt of firmware zip.
Click to expand...
Click to collapse
I pulled one out of my Att phone that is a james xt1921-2 but has a locked bootloader, all stock ... I used #getprop ro.build.fingerprint.. not sure if i should use this, or wait to see your build.prop...
ill post my work in progress build.prop(hosting it with new vendor and boot images on gdrive) which noticeably improves overall performance and lends to less log errors, or lags and crashes.
Click to expand...
Click to collapse
All the best to you and yours in 2020. Meeeerrrry eXksMix, hic up'
Yes to service.d with those three. I ditched the camera ones though, footej or another camera is nice. Im close to figuring out what the vndk library thing.
hosting current prop setups, between resetprop in service.d and modifying build prop. other goodies too. I turned oem partition into swap space, and added permissions to priv-app xml's enabling more RR features, like hold back to kill app.
mrbox23 said:
Yes to service.d with those three. I ditched the camera ones though, footej or another camera is nice. Im close to figuring out what the vndk library thing.
hosting current prop setups, between resetprop in service.d and modifying build prop. other goodies too. I turned oem partition into swap space, and added permissions to priv-app xml's enabling more RR features, like hold back to kill app.
Click to expand...
Click to collapse
mediafix line 2... set or resetprop?
1 resetprop 'media.camera.ts.monotonic' 0
2 setprop 'persist.camera.HAL3.enabled' 1
what are these last lines in mediafix for?
16 resetprop net.dns1 1.1.1.1
17 resetprop net.dns2 1.0.0.1
and i'm guessing the deb.sh is for your wifi repeater? swap space in oem?
how is mpcs.prop called? where is its proper folder?
can you host a copy of libeffects.so ?
@mrbox23 Bluetooth working! check.
aka.bugle said:
@mrbox23 Bluetooth working! check.
Click to expand...
Click to collapse
something I just noticed here recently is that's all the audio output now. I can't test cellular calls, Hangouts only works when i restore that vendor path Back to where it was. My camera broke again to. I want to reach out to phh here or github.
Well that's a big bug, sorry. I've reverted the metro 1921-3 to stock for now, but on the positive side, I tried using your older boot/vendor imgs trick on the 1921-5 (Sprint)... and success! it boots Lineage 15.1 and bluetooth works, I haven't tried using the GSM Att Sim yet and still no camera, (I haven't tried your other camera recommendations yet.) One step closer for the 1921-5.