Guest Auxx Posted May 27, 2010 Report Posted May 27, 2010 I've just ran readelf on my libwebcore.so and libwebcore.so from Acer to find out why my lib crashes. The most important thing I've noticed right at the start is that my lib is for arm5, thumb1 and without fpu optimizations. So now I recompile it from scratch... Oh, well... So, my questions. Did anyone successfully compiled any system libs for Acer from AOSP sources? If so, what flags did you use? How did you fight reloc issues? Thanks in advance!
Guest amdnikos Posted May 28, 2010 Report Posted May 28, 2010 I've just ran readelf on my libwebcore.so and libwebcore.so from Acer to find out why my lib crashes. The most important thing I've noticed right at the start is that my lib is for arm5, thumb1 and without fpu optimizations. So now I recompile it from scratch... Oh, well... So, my questions. Did anyone successfully compiled any system libs for Acer from AOSP sources? If so, what flags did you use? How did you fight reloc issues? Thanks in advance! afaik noone was able to built an aosp system.tbh i would love it cause it includes all languages even Greek that none acer rom include it.
Guest Auxx Posted May 28, 2010 Report Posted May 28, 2010 afaik noone was able to built an aosp system.tbh i would love it cause it includes all languages even Greek that none acer rom include it. Khm... If you are correct, then it'll take more time then I hoped...
Guest Piter1225 Posted May 28, 2010 Report Posted May 28, 2010 I got used to use my phone without my native lang, even I thought there will be AOSP for this device...
Guest Auxx Posted May 31, 2010 Report Posted May 31, 2010 Guess what, guys? I just did it! I have found a reloc issue workaround! I now have custom webkit in my Liquid (:
Guest demolition23 Posted May 31, 2010 Report Posted May 31, 2010 Guess what, guys? I just did it! I have found a reloc issue workaround! I now have custom webkit in my Liquid (: and thats mean...??
Guest Auxx Posted May 31, 2010 Report Posted May 31, 2010 and thats mean...?? That means we are free to compile any system libs from Android sources and use them on our devices (:
Guest dguerre Posted May 31, 2010 Report Posted May 31, 2010 That means we are free to compile any system libs from Android sources and use them on our devices (: Excellent. Is this for 1.6 or 2.1?
Guest Auxx Posted May 31, 2010 Report Posted May 31, 2010 (edited) Excellent. Is this for 1.6 or 2.1? For anything. does this mean aosp ? Yes! I will provide details tomorrow - I want to go to sleep (: It's 1:41 here and I need to wake up at 8:00. Edited May 31, 2010 by Auxx
Guest pipajoja Posted June 1, 2010 Report Posted June 1, 2010 very good news waiting for applications impress us :(
Guest G_Technik Posted June 1, 2010 Report Posted June 1, 2010 It's great!!! «One small step for man, one giant leap for...»Liquid users!!!
Guest drigerott Posted June 1, 2010 Report Posted June 1, 2010 lol fantastic lol AOSP on liquid ihhihihi great work auxx :(
Guest Auxx Posted June 1, 2010 Report Posted June 1, 2010 So, technical details. Google decided to use prelinking technique to speed everything up and to waste as little RAM as possible. Great! So they took prelink utility and modified it to fit their needs. Two tools were born: apriori and soslim. They are run on every build to produce optimized and prelinked system libs. Almost every .so file you see in /system/lib is prelinked via soslim/apriori. Prelinking works by loading libs at known base addresses which are defined in a special file called prelink-linux-arm.map. This file contains a list of libs with their predefined base addresses. What Acer did is that they modified this file and did not share it with us. So every AOSP attemp failed. If you compile any lib from Android sources and put it on your Liquid boom happens and nothing works. Studying Android sources I've found a small utility which is called isprelinked. It checks binary library if it is prelinked and if it is, then base address is shown. So yesterday I ran isprelinked on Acer libs and recreated prelink-linux-arm.map for Liquid. Then I built test version of webkit (libwebcore.so), put it into /system/lib replacing version from Acer and rebooted the phone - it worked! I can not share prelink map at the moment - it is at my home PC and I don't have remote access. I will share this file in the evening, but you can make it yourself, actually. How to make prelink map? Quite simple. First of all you need to create isprelinked binary. cd to your Android source (cd ~/mydroid as in docs) and run "make isprelinked" (without quotes, of course). You will get app binary in a while, it will be somewhere in ~/mydroid/out/host/bla-bla-bla. The correct path will be shown in console once compilation is done. Next step is run isprelinked over Acer binaries. It is quite simple, but will take some time. Copy all libs from your Liquid to some folder, for example to ~/acer-libs. Now open original prelink map (make a backup!), copy its contents to empty text file, in this new text file remove comments and base addresses, leave only lib names. Put a new line at top with full path to isprelinked and merge all lib names into single line with spaces between. You should have text file with one line looking like this: ~/mydroid/out/host/tools/isprelinked libdl.so libc.so libstdc++.so This line will be very long (: Now go back into console, cd ~/acer-libs and run this BIG line. It will fail (: Because this list has some libs which Acer does not have. It will fail WITHOUT telling which lib is missing. But you will see base addr of previous lib. So find all unneeded libs and remove them from command line. Hell of a work, actually. But once again - I'm not at home, I can not paste correct line at the moment. Sorry. Once isprelinked runs clean without errors you will see a list of all libs and their base addresses. Remove ":" character between lib name and address, paste it into prelink-linux-arm.map replacing all previous contents (you made a backup, right?) and this part is finished - now you have all base addresses needed for successful compilation of system binaries. But if you run compilation now it will fail - apriori will tell you that lib addresses are out of bound. You need to modify prelinkmap.c. There is a line: #define PRELINK_MIN 0x90000000 Change it to: #define PRELINK_MIN 0x50000000 And recompile apriori tool with "make apriori" from your ~/mydroid. Now you have a 100% Acer compatible build environment! Now if you wish to compile any component just run "make SOMETHING" where SOMETHING is what you need to compile. For example, "make libwebcore" compiles WebKit (: This is the simplest way of compilation, but you also want to make Snapdragon optimizations generated. So you need to compile with additional option TARGET_ARCH_VARIANT to target Snapdragon. SD has armv7-a CPU inside. So final string for WebKit is "make TARGET_ARCH_VARIANT=armv7-a libwebcore". That will make default WebKit with all CPU dependent optimizations. Compilation result can be found in ~/mydroid/out/target/system/lib - full and correct path will be shown in console after compilation. What does it all mean? Well, AOSP is finally possible! This will also be helpful for porting binaries from other non-acer ROMs - now you can easily rebase libs to Acer standard and everything will work. Today I will put map file I've generated from Acer libs and will continue working on Flash support for 2.1. I also think I will compile Flash supporting WebKit with V8 JavaScript engine (like in Froyo), SVG support and I will look into animated GIFs issue. There will be two libwebcores from me: stock with Flash and full-blown (which may eat your RAM and kill CPU).
Guest Charlton22 Posted June 1, 2010 Report Posted June 1, 2010 So, technical details. Google decided to use prelinking technique to speed everything up and to waste as little RAM as possible. Great! So they took prelink utility and modified it to fit their needs. Two tools were born: apriori and soslim. They are run on every build to produce optimized and prelinked system libs. Almost every .so file you see in /system/lib is prelinked via soslim/apriori. Prelinking works by loading libs at known base addresses which are defined in a special file called prelink-linux-arm.map. This file contains a list of libs with their predefined base addresses. What Acer did is that they modified this file and did not share it with us. So every AOSP attemp failed. If you compile any lib from Android sources and put it on your Liquid boom happens and nothing works. Studying Android sources I've found a small utility which is called isprelinked. It checks binary library if it is prelinked and if it is, then base address is shown. So yesterday I ran isprelinked on Acer libs and recreated prelink-linux-arm.map for Liquid. Then I built test version of webkit (libwebcore.so), put it into /system/lib replacing version from Acer and rebooted the phone - it worked! I can not share prelink map at the moment - it is at my home PC and I don't have remote access. I will share this file in the evening, but you can make it yourself, actually. How to make prelink map? Quite simple. First of all you need to create isprelinked binary. cd to your Android source (cd ~/mydroid as in docs) and run "make isprelinked" (without quotes, of course). You will get app binary in a while, it will be somewhere in ~/mydroid/out/host/bla-bla-bla. The correct path will be shown in console once compilation is done. Next step is run isprelinked over Acer binaries. It is quite simple, but will take some time. Copy all libs from your Liquid to some folder, for example to ~/acer-libs. Now open original prelink map (make a backup!), copy its contents to empty text file, in this new text file remove comments and base addresses, leave only lib names. Put a new line at top with full path to isprelinked and merge all lib names into single line with spaces between. You should have text file with one line looking like this: ~/mydroid/out/host/tools/isprelinked libdl.so libc.so libstdc++.so This line will be very long (: Now go back into console, cd ~/acer-libs and run this BIG line. It will fail (: Because this list has some libs which Acer does not have. It will fail WITHOUT telling which lib is missing. But you will see base addr of previous lib. So find all unneeded libs and remove them from command line. Hell of a work, actually. But once again - I'm not at home, I can not paste correct line at the moment. Sorry. Once isprelinked runs clean without errors you will see a list of all libs and their base addresses. Remove ":" character between lib name and address, paste it into prelink-linux-arm.map replacing all previous contents (you made a backup, right?) and this part is finished - now you have all base addresses needed for successful compilation of system binaries. But if you run compilation now it will fail - apriori will tell you that lib addresses are out of bound. You need to modify prelinkmap.c. There is a line: #define PRELINK_MIN 0x90000000 Change it to: #define PRELINK_MIN 0x50000000 And recompile apriori tool with "make apriori" from your ~/mydroid. Now you have a 100% Acer compatible build environment! Now if you wish to compile any component just run "make SOMETHING" where SOMETHING is what you need to compile. For example, "make libwebcore" compiles WebKit (: This is the simplest way of compilation, but you also want to make Snapdragon optimizations generated. So you need to compile with additional option TARGET_ARCH_VARIANT to target Snapdragon. SD has armv7-a CPU inside. So final string for WebKit is "make TARGET_ARCH_VARIANT=armv7-a libwebcore". That will make default WebKit with all CPU dependent optimizations. Compilation result can be found in ~/mydroid/out/target/system/lib - full and correct path will be shown in console after compilation. What does it all mean? Well, AOSP is finally possible! This will also be helpful for porting binaries from other non-acer ROMs - now you can easily rebase libs to Acer standard and everything will work. Today I will put map file I've generated from Acer libs and will continue working on Flash support for 2.1. I also think I will compile Flash supporting WebKit with V8 JavaScript engine (like in Froyo), SVG support and I will look into animated GIFs issue. There will be two libwebcores from me: stock with Flash and full-blown (which may eat your RAM and kill CPU). And what is this for? Sorry.. noob..
Guest Auxx Posted June 1, 2010 Report Posted June 1, 2010 And what is this for? Sorry.. noob.. What does it all mean? Well, AOSP is finally possible! This will also be helpful for porting binaries from other non-acer ROMs - now you can easily rebase libs to Acer standard and everything will work. Basically, if you are not ROM creator/hacker, then it has nothing to do with you (:
Guest mirox3m Posted June 1, 2010 Report Posted June 1, 2010 (edited) .....Today I will put map file I've generated from Acer libs and will continue working on Flash support for 2.1. I also think I will compile Flash supporting WebKit with V8 JavaScript engine (like in Froyo), SVG support and I will look into animated GIFs issue. There will be two libwebcores from me: stock with Flash and full-blown (which may eat your RAM and kill CPU). Congrats and thanks for your work!!! :( Isn't it easier to port Froyo than enabling Flash on 2.1? Edited June 1, 2010 by mirox3m
Guest liquid_it Posted June 1, 2010 Report Posted June 1, 2010 Great job Auxx, thanks for sharing tech details, this is what I call a Community! (not everyone on android scene is smart enough to understand that sharing knowledge is the best choice..) I think I'll spend my night messing with aosp code.. :(
Guest Auxx Posted June 1, 2010 Report Posted June 1, 2010 Congrats and thanks for your work!!! :( Isn't it easier to port Froyo than enabling Flash on 2.1? Of course it is! But many people are stuck with 2.1 (: Even with earlier versions. So my work will help them.
Guest Mr.r9 Posted June 1, 2010 Report Posted June 1, 2010 Maybe you can contact Malez since he is working on Froyo? I've no idea if either of you will benefit since Idon't develop but maybe something good might come out of it.
Guest koudelka Posted June 1, 2010 Report Posted June 1, 2010 (edited) Congrats and thanks for your work!!! :( Isn't it easier to port Froyo than enabling Flash on 2.1? Have they published the Froyo sources yet? Edit* Btw, GREAT JOB Auxx! Edited June 1, 2010 by koudelka
Guest Auxx Posted June 1, 2010 Report Posted June 1, 2010 Maybe you can contact Malez since he is working on Froyo? I've no idea if either of you will benefit since Idon't develop but maybe something good might come out of it. I'm already sharing info with Froyo team (malez, vache, phh).
Guest drigerott Posted June 1, 2010 Report Posted June 1, 2010 Auxx why don't try to buil an AOSP from cyanogenmod surce? ^^ and then port flash player :( lol would be fantastic ihhihihihi anyway...you are great... great work... ^^
Guest wytek Posted June 1, 2010 Report Posted June 1, 2010 Auxx why don't try to buil an AOSP from cyanogenmod surce? ^^ and then port flash player :( lol would be fantastic ihhihihihi anyway...you are great... great work... ^^ QUOTE!!! :(
Guest uzirox Posted June 1, 2010 Report Posted June 1, 2010 I usually don't post, but this news is INCREDIBLE. Let me say this please: Auxx you're GREEEEEAT! Congrats, really!
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now