[Q]Deodex necessary to help. - Galaxy Ace S5830 Android Development

S5830XWKS2 deodex trying to make firmware.
Many frameworks and app was deodex. If some files have failed.
I get the following error message.
Operating environment like this.
Ubuntu 64 bit.
dsixda's Android Kitchen (I know the S5830 is not suitable. I used to just deodex process.)
ERROR MESSAGE
Disassembling Dlna.odex ...
java -Xmx512m -jar baksmali.jar -d ../framework -c :twframework.jar -x Dlna.odex
Assembling into classes.dex ...
java -Xmx512m -jar smali.jar -o classes.dex out
out/com/samsung/upnp/media/server/ContentDirectory$IUploadFinished.smali[0,0] No enum const class org.jf.dexlib.AnnotationVisibility.RUNTİME
out/com/samsung/upnp/media/server/MediaServer.smali[0,0] No enum const class org.jf.dexlib.AnnotationVisibility.RUNTİME
out/com/samsung/upnp/media/server/ContentDirectory$ICreateObjectReceived.smali[0,0] No enum const class org.jf.dexlib.AnnotationVisibility.RUNTİME
out/com/samsung/upnp/device/DeviceChangeListener.smali[0,0] No enum const class org.jf.dexlib.AnnotationVisibility.RUNTİME
out/com/samsung/upnp/ControlPoint.smali[0,0] No enum const class org.jf.dexlib.AnnotationVisibility.RUNTİME
out/com/samsung/upnp/event/EventListener.smali[0,0] No enum const class org.jf.dexlib.AnnotationVisibility.RUNTİME
out/com/samsung/api/DigitalMediaControllerAPI.smali[0,0] No enum const class org.jf.dexlib.AnnotationVisibility.RUNTİME
out/com/samsung/api/DMCAPIException.smali[0,0] No enum const class org.jf.dexlib.AnnotationVisibility.RUNTİME
out/com/samsung/api/DeviceItem.smali[0,0] No enum const class org.jf.dexlib.AnnotationVisibility.RUNTİME
out/com/samsung/util/DebugOutputHandler.smali[0,0] No enum const class org.jf.dexlib.AnnotationVisibility.RUNTİME
out/com/samsung/util/Debugs.smali[0,0] No enum const class org.jf.dexlib.AnnotationVisibility.RUNTİME
WARNING: Unable to produce classes.dex!
-> Using brute-force method (ignore above error if successful):
FAİLED FİLES
Browser.odex Contacts.odex Dlna.odex Email.odex Gallery3D.odex SystemUI.odex TouchWiz30Launcher.odex framework.odex
Others succeeded.
.................................................................
The error message is not descriptive enough.How can I solve the problem?

Try to use xUltimate. It can help u to deodex easier

xultimate definitely does not work. Even if one could not deodex file. Would serve no purpose in my win7.Sometimes the phone does not work even if you Xultimate deodex. Results incorrect always. Often interrupted. Linux is much easier methods, fast and simple.
If you have received good results with xultimate deodex for KS2 Is it possible to share?

U can see that I made custom rom based on KS2. I used xUltimate to deodex my rom It worked well. I can confirm that and I'm using win7 too .

devilsking said:
U can see that I made custom rom based on KS2. I used xUltimate to deodex my rom It worked well. I can confirm that and I'm using win7 too .
Click to expand...
Click to collapse
KS2 TheMyth ROM already know.
I think that some version of the app and KS2 framework files. : (

I can provide you original deodexed app and framework from KS2 if u want.
In my rom, I modified to enable CRT Off and Powermenu.

Related

Smali error: All register args must fit in 4 bits

Hi everybody
I'm trying to add one line of smali code to onCreate method. That line of code calls my method that i add to the end of smali file.
Doing this on one app works (the app runs without errors and my code gets executed), but on another app I get this error in onCreate:
"All register args must fit in 4 bits"
The line I add:
invoke-virtual {p0}, Lcom/someapp/someclass;->doMyMethod()V
Click to expand...
Click to collapse
Does somebody know what exactly does this error mean and how do i fix it?
px registers are after vx ones, so if you have for example 17 vx registers, then p0 is v17. Most of instructions can't use registers above v15, so you have to move values to "lower" registers to use them.
Find some free "lower" register, e.g. v3 and do:
Code:
move v3, p0
invoke-virtual {v3}, Lcom/someapp/someclass;->doMyMethod()V
There are probably similar constructions in already existing code.

[Q] Changing smali using apktool gives problem with r.Java

I've been stuck for a while now, trying to add some new functionality (day counter) to an existing apk (widget).
What I've done so far:
- unpacked the apk using apktool (using apktool d -d)
- start new project in netbeans with the specific source
- adding the java class to the existing package
The java code introduces some new parameters. I've added the parameters to different xml's. When I try to rebuild I keep getting the message:
cannot find symbol
symbol : variable layout
location: class fr.gdi.android.news.R
remoteViews = new RemoteViews(context.getPackageName(), R.layout.main);
Can anyone give me a hint what to do?
some additional info. This is the class I'm trying to add:
Code:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fr.gdi.android.news;
/**
*
* @author John
*/
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.Timer;
import java.util.TimerTask;
import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProvider;
import android.content.ComponentName;
import android.content.Context;
import android.widget.RemoteViews;
public class CountDays extends AppWidgetProvider {
@Override
public void onUpdate(Context context, AppWidgetManager appWidgetManager,
int[] appWidgetIds) {
Timer timer = new Timer();
timer.scheduleAtFixedRate(new MyTime(context, appWidgetManager), 1, 60000);
}
private class MyTime extends TimerTask {
RemoteViews remoteViews;
AppWidgetManager appWidgetManager;
ComponentName thisWidget;
public MyTime(Context context, AppWidgetManager appWidgetManager) {
this.appWidgetManager = appWidgetManager;
remoteViews = new RemoteViews(context.getPackageName(), R.layout.main);
thisWidget = new ComponentName(context, CountDays.class);
}
@Override
public void run() {
Date date1 = new Date();
Calendar calendar = new GregorianCalendar(2010, 11,25);
long days = (((calendar.getTimeInMillis()- date1.getTime())/1000))/86400;
remoteViews.setTextViewText(R.id.days,""+ days);
appWidgetManager.updateAppWidget(thisWidget, remoteViews);
}
}
}
1. Apktool does not support writing your code in Java right now. Whole story is here: http://code.google.com/p/android-apktool/issues/detail?id=88 . If you want to use Java, it's possible, but you will have to use a workaround. It's not that hard to implement, but requires you to understand, how Java/javac/bytecode works. Workaround is described in above link, if you don't want to read full story, instructions start at "My script is here".
2. I think (but maybe I'm wrong) that you misunderstand, how R references work. These R.drawables.xxx strings aren't magically converted to resIDs at compile or run time. To use them you have to generate proper R class using SDK. If you use Eclipse or Netbeans, you don't have to do that, cause IDE regenerates R.java file each time you modify something in resources, so you can use R references in your code whenever you want.
In app decoded by apktool you have to manage resIDs manually. It's caused by the fact, that if you want to use some resources in smali, you can't let SDK generate ids for these resources automatically, cause resIDs are stored in smali in numerical form, i.e. "const v0, 0x7f012345", not something like "const v0, R.drawables.xxx". So if you would add e.g. "const v0, 0x7f012345" line to smali and resIDs would be regenerated, your line might reference other resource, that you want.
Of course that's not the case if you want to use resources from Java code, but as I said, this feature isn't fully supported by apktool. Also I think it would be good to add possibility to generate resIDs automatically, even for smali code, cause managing resIDs manually is very inconvenient. But that's future.
For now if you want to add new resource and use it from your Java/smali code, you have to modify public.xml file, add that resource with next free resID and then use that resID from your code.
If you want to know more, you could read this: http://forum.xda-developers.com/showthread.php?p=7380557#post7380557
@Brut.all: Thanks for your extensive answer! I will read the stuff you mention and get back at it.
@Brut.all: I think you're right about me not understanding R.java completely. But what I understand from your story is this. When I want a new resource to use in a new class and to be used in the existing xml, I would have to do the following:
- add a line to the res/values/ids.xml, for example:
Code:
<item type="id" name="main">false</item>
- add a line to the res/values/public.xml, for example:
Code:
<public type="id" name="main" id="0x7f0a0034" />
- add a line to the R$id.java and R$layout.java (don't exactly know which one)
Code:
.field public static final main:I = 0x7f0a0034
first: is this correct? second: How can I refer to the newly added resource in my new class. R.layout.main doesn't work, R$layout.main doesn't work.
Code:
remoteViews = new RemoteViews(context.getPackageName(), R$layout.main);
john37 said:
- add a line to the res/values/ids.xml, for example:
Code:
<item type="id" name="main">false</item>
Click to expand...
Click to collapse
You don't have to do that. If you add new drawable, XML or @+id/something value, then it's ok.
john37 said:
- add a line to the res/values/public.xml, for example:
Code:
<public type="id" name="main" id="0x7f0a0034" />
Click to expand...
Click to collapse
Yes.
john37 said:
- add a line to the R$id.java and R$layout.java (don't exactly know which one)
Code:
.field public static final main:I = 0x7f0a0034
Click to expand...
Click to collapse
No ;-)
If you want to use these resources in smali, then you could use them as is, e.g.: "const v0, 0x7f0a0034".
If you want to use my workaround to work in Java, then you could do the same, as above, e.g.:
Code:
int id = 0x7f0a0034;
or you could do this cleaner and generate R class manually: remove all existing R*.java classes (they aren't used) and create single R.java file:
Code:
public final class R {
public static final class id {
public static final int main = 0x7f0a0034;
}
}
and then you could use it as "R.id.main" in your code.
But first you have to implement workaround to use any Java code.
@Brut.all: thanks again for your reply. I think I didn't understand your previous story fully. I am 'developing' on windows, so your workaround is going to be tricky. Do you know if anyone has ported your script to windows?
Some additional info: I don't want to use a new resource in the existing smali code. What I want is a new resource, say @id/main, to be used in the xml files and in a java class, which describes the method that should be invoked when the widget updates.
What I've done now is that I've made a new R$main class with the resources I want to use. I also made the java class with the method and it refers to the resources mentioned in the R$main class. This way I can build it without problems in Netbeans. But when I want to use apktool, I keep getting the message:
Code:
I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" java.lang.NullPointerException
at org.jf.util.PathUtil.getRelativeFile(Unknown Source)
at org.jf.smali.smaliFlexLexer.getSourceName(Unknown Source)
at org.jf.smali.smaliFlexLexer.getErrorHeader(Unknown Source)
at org.jf.smali.smaliFlexLexer.nextToken(Unknown Source)
at org.antlr.runtime.CommonTokenStream.fillBuffer(Unknown Source)
at org.antlr.runtime.CommonTokenStream.LT(Unknown Source)
at org.jf.smali.smaliParser.smali_file(Unknown Source)
at brut.androlib.mod.SmaliMod.assembleSmaliFile(Unknown Source)
at brut.androlib.src.DexFileBuilder.addSmaliFile(Unknown Source)
at brut.androlib.src.SmaliBuilder.buildFile(Unknown Source)
at brut.androlib.src.SmaliBuilder.build(Unknown Source)
at brut.androlib.src.SmaliBuilder.build(Unknown Source)
at brut.androlib.Androlib.buildSourcesSmali(Unknown Source)
at brut.androlib.Androlib.buildSources(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Maybe I'm completely on the wrong track...
Sometimes I get NullPointerException instead of real smali errors, when I'm doing "apktool b". I think it's a bug in the apktool. Try to smali "smali" dir normally, without apktool to see errors.
But I don't really see much sense in adding any Java classes, because they just can't work without additional steps. What my script does, is:
javac all files from brut.iface
javac all files from brut.src against compiled brut.iface
convert compiled brut.src to smali. This is done in two steps:
dx them to classes.dex
baksmali them using baksmali or apktool
Most of commands from my script (javac, dx, apktool/baksmali) should work on a Windows. File operations, i.e. mkdir, rm, cp should be easily portable. I don't know, how to replace "find" command.
You could try to use Cygwin - then you should be able to run my script on a Windows.
To do this properly, I'm installing Linux now, so my next reply could take a while...

[Q] CM9 Build failure on Mac OS X 10.8 (when building kernel)

I am currently trying to build CM9 for my A500 on my Mac (which is running OS X 10.8). It is failing while building the kernel, with the error:
Code:
Undefined symbols for architecture i386:
"android::renderscript::rsi_Allocation1DElementData(android::renderscript::Context*, void*, unsigned int, unsigned int, void const*, unsigned long, unsigned int)", referenced from:
...
android::renderscript::rsp_Allocation2DElementData(android::renderscript::Context*, void const*, unsigned long)in libRS.a(rsgApiReplay.o)
I'll describe the steps I followed to get to that point below, but first: It doesn't look like I'm the only one having this problem, but it doesn't look common - I found the same error in three pastebins: 1, 2, 3. The interesting thing is that 1 and 2 there are both on OS X (both contain 'out/host/darwin-x86/'), and they are for different devices.
Anyway, to get to that point I did the following:
(Following the CyanogenMod Wiki template for Mac OS X building)
1. Trashed my entire MacPorts tree using the commands provided in the CyanogenMod wiki.
2. Reinstalled all the ports I already had installed, along with those indicated in the CyanogenMod wiki. I used the supplied command, but then after the described error appeared the first time, I installed all the ports with the +universal directive as well.
3. Checked out the code for CM9 using:
Code:
repo init -u http:github.com/CyanogenMod/android.git -b ics --reference=/Volumes/Backup/AndroidDevelopment/cm9/mirror/CyanogenMod/
repo sync
4. Following the post by waydownsouth, ran:
Code:
. build/envsetup.sh
lunch cm_a500-userdebug
This synced the a500 bits from the repository
5. Plugged in the tablet, and entered the commands:
Code:
cd device/acer/a500
./extract-files.sh
A bunch of files downloaded, and all was well.
6. I returned to the root of my working directory, and ran:
Code:
brunch cm_a500-userdebug
and received the error:
Code:
It bombed with:
make: *** No rule to make target `vendor/cm/proprietary/RomManager.apk', needed by `out/target/product/a500/system/app/RomManager.apk'. Stop.
make: *** Waiting for unfinished jobs....
7. Got the prebuilts using the commands:
Code:
cd vendor/cm
./get-prebuilts
8. Returned to the root of the working directory again, and ran:
Code:
brunch cm_a500-userdebug
It looked like it was working until I received the error:
Code:
Result was:
target thumb C++: libwebcore <= external/webkit/Source/WebCore/xml/XPathP****r.cpp
out/target/product/a500/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/XPathGrammar.hpp: In member function 'WebCore::XPath::Expression* WebCore::XPath::P****r::p****Statement(const WTF::String&, WTF::PassRefPtr<WebCore::XPathNSResolver>, WebCore::ExceptionCode&)':
out/target/product/a500/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/XPathGrammar.hpp:106: error: too many arguments to function 'int WebCore::XPath::xpathyyp****()'
external/webkit/Source/WebCore/xml/XPathP****r.cpp:480: error: at this point in file
make: *** [out/target/product/a500/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/xml/XPathP****r.o] Error 1
9. I found that the above error was due to Bison 2.6, and I shopped around, and found a patch which appeared to address this issue. It didn't apply quite correctly (on file Source/WebCore/xml/XPathP****r.cpp), but I manually merged that file.
10. I shut down and restarted (because I was going from one place to another, and stuff in on an external drive) so I got my environment variables set etc. again by running:
Code:
9. At this point, I shut down. When I recommenced, I ran
. build/envsetup.sh
lunch cm_a500-userdebug
brunch cm_a500-userdebug
Webkit built correctly this time, but then I hit the error:
Code:
/Volumes/Backup/AndroidDevelopment/cm9/working_copy_2/kernel/acer/t20-common/scripts/mod/mk_elfconfig.c:4:17: error: elf.h: No such file or directory
/Volumes/Backup/AndroidDevelopment/cm9/working_copy_2/kernel/acer/t20-common/scripts/mod/mk_elfconfig.c: In function ‘main’:
/Volumes/Backup/AndroidDevelopment/cm9/working_copy_2/kernel/acer/t20-common/scripts/mod/mk_elfconfig.c:9: error: ‘EI_NIDENT’ undeclared (first use in this function)
/Volumes/Backup/AndroidDevelopment/cm9/working_copy_2/kernel/acer/t20-common/scripts/mod/mk_elfconfig.c:9: error: (Each undeclared identifier is reported only once
...
make[4]: *** [scripts/mod/mk_elfconfig] Error 1
11. I looked around and found one thread which suggested I copy the elf.h file to /external/elfutils/libelf but that didn't appear to fix the problem, so deleted the elf.h file from that directory again.
Then I found another thread which suggested the way to solve the problem was to build the kernel separately, and in advance using the command:
Code:
make -j`sysctl -an hw.logicalcpu` ARCH=arm CROSS_COMPILE=./prebuilt/darwin-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- HOSTCFLAGS="-I./external/elfutils/libelf"
(Note that I changed the paths here to match my system).
To save from having to recompile everything every time, I ran:
export USE_CCACHE=1 && ./prebuilt/darwin-x86/ccache/ccache -M 20G
Then I used the command identified above (i.e. make -j`sysctl -an hw.logicalcpu` ...).
It failed after quite some time with the error:
Code:
Build failed with:
Undefined symbols for architecture i386:
"android::renderscript::rsi_Allocation1DElementData(android::renderscript::Context*, void*, unsigned int, unsigned int, void const*, unsigned long, unsigned int)", referenced from:
android::renderscript::rspr_Allocation1DElementData(android::renderscript::Context*, android::renderscript::Fifo*, unsigned char*, unsigned long)in libRS.a(rsgApiReplay.o)
android::renderscript::rsp_Allocation1DElementData(android::renderscript::Context*, void const*, unsigned long)in libRS.a(rsgApiReplay.o)
"android::renderscript::rsi_Allocation2DElementData(android::renderscript::Context*, void*, unsigned int, unsigned int, unsigned int, RsAllocationCubemapFace, void const*, unsigned long, unsigned int)", referenced from:
android::renderscript::rspr_Allocation2DElementData(android::renderscript::Context*, android::renderscript::Fifo*, unsigned char*, unsigned long)in libRS.a(rsgApiReplay.o)
android::renderscript::rsp_Allocation2DElementData(android::renderscript::Context*, void const*, unsigned long)in libRS.a(rsgApiReplay.o)
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
As I noted above, it seems like one or two other people have had this error also. At this point, I'm basically stumped. I've never really done much C/C++ dev, so I'm fairly unfamiliar with reading the output of the linker. Looking over it, I wouldn't have expected it to need i386 symbols for libRS.a (if that is indeed what it is looking for symbols of) because it is building for ARM, but I could just be completely misunderstanding the output.
Anyway, if anyone has suggestions as to what might be causing the problem or how to address it (or even wants to briefly explain what that linker error actually means in a clearer way) that would be great. I've fought with CM7 builds in the past (for the Moto Defy) and basically given up because I couldn't get them to build. I'd rather not just do that again.
Have you solved this issue? Any update?
Any update?
FFU5y said:
I am currently trying to build CM9 for my A500 on my Mac (which is running OS X 10.8). It is failing while building the kernel, with the error:
Code:
Undefined symbols for architecture i386:
"android::renderscript::rsi_Allocation1DElementData(android::renderscript::Context*, void*, unsigned int, unsigned int, void const*, unsigned long, unsigned int)", referenced from:
...
android::renderscript::rsp_Allocation2DElementData(android::renderscript::Context*, void const*, unsigned long)in libRS.a(rsgApiReplay.o)
I'll describe the steps I followed to get to that point below, but first: It doesn't look like I'm the only one having this problem, but it doesn't look common - I found the same error in three pastebins: 1, 2, 3. The interesting thing is that 1 and 2 there are both on OS X (both contain 'out/host/darwin-x86/'), and they are for different devices.
Anyway, to get to that point I did the following:
(Following the CyanogenMod Wiki template for Mac OS X building)
1. Trashed my entire MacPorts tree using the commands provided in the CyanogenMod wiki.
2. Reinstalled all the ports I already had installed, along with those indicated in the CyanogenMod wiki. I used the supplied command, but then after the described error appeared the first time, I installed all the ports with the +universal directive as well.
3. Checked out the code for CM9 using:
Code:
repo init -u http:github.com/CyanogenMod/android.git -b ics --reference=/Volumes/Backup/AndroidDevelopment/cm9/mirror/CyanogenMod/
repo sync
4. Following the post by waydownsouth, ran:
Code:
. build/envsetup.sh
lunch cm_a500-userdebug
This synced the a500 bits from the repository
5. Plugged in the tablet, and entered the commands:
Code:
cd device/acer/a500
./extract-files.sh
A bunch of files downloaded, and all was well.
6. I returned to the root of my working directory, and ran:
Code:
brunch cm_a500-userdebug
and received the error:
Code:
It bombed with:
make: *** No rule to make target `vendor/cm/proprietary/RomManager.apk', needed by `out/target/product/a500/system/app/RomManager.apk'. Stop.
make: *** Waiting for unfinished jobs....
7. Got the prebuilts using the commands:
Code:
cd vendor/cm
./get-prebuilts
8. Returned to the root of the working directory again, and ran:
Code:
brunch cm_a500-userdebug
It looked like it was working until I received the error:
Code:
Result was:
target thumb C++: libwebcore <= external/webkit/Source/WebCore/xml/XPathP****r.cpp
out/target/product/a500/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/XPathGrammar.hpp: In member function 'WebCore::XPath::Expression* WebCore::XPath::P****r::p****Statement(const WTF::String&, WTF::PassRefPtr<WebCore::XPathNSResolver>, WebCore::ExceptionCode&)':
out/target/product/a500/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/XPathGrammar.hpp:106: error: too many arguments to function 'int WebCore::XPath::xpathyyp****()'
external/webkit/Source/WebCore/xml/XPathP****r.cpp:480: error: at this point in file
make: *** [out/target/product/a500/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/xml/XPathP****r.o] Error 1
9. I found that the above error was due to Bison 2.6, and I shopped around, and found a patch which appeared to address this issue. It didn't apply quite correctly (on file Source/WebCore/xml/XPathP****r.cpp), but I manually merged that file.
10. I shut down and restarted (because I was going from one place to another, and stuff in on an external drive) so I got my environment variables set etc. again by running:
Code:
9. At this point, I shut down. When I recommenced, I ran
. build/envsetup.sh
lunch cm_a500-userdebug
brunch cm_a500-userdebug
Webkit built correctly this time, but then I hit the error:
Code:
/Volumes/Backup/AndroidDevelopment/cm9/working_copy_2/kernel/acer/t20-common/scripts/mod/mk_elfconfig.c:4:17: error: elf.h: No such file or directory
/Volumes/Backup/AndroidDevelopment/cm9/working_copy_2/kernel/acer/t20-common/scripts/mod/mk_elfconfig.c: In function ‘main’:
/Volumes/Backup/AndroidDevelopment/cm9/working_copy_2/kernel/acer/t20-common/scripts/mod/mk_elfconfig.c:9: error: ‘EI_NIDENT’ undeclared (first use in this function)
/Volumes/Backup/AndroidDevelopment/cm9/working_copy_2/kernel/acer/t20-common/scripts/mod/mk_elfconfig.c:9: error: (Each undeclared identifier is reported only once
...
make[4]: *** [scripts/mod/mk_elfconfig] Error 1
11. I looked around and found one thread which suggested I copy the elf.h file to /external/elfutils/libelf but that didn't appear to fix the problem, so deleted the elf.h file from that directory again.
Then I found another thread which suggested the way to solve the problem was to build the kernel separately, and in advance using the command:
Code:
make -j`sysctl -an hw.logicalcpu` ARCH=arm CROSS_COMPILE=./prebuilt/darwin-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- HOSTCFLAGS="-I./external/elfutils/libelf"
(Note that I changed the paths here to match my system).
To save from having to recompile everything every time, I ran:
export USE_CCACHE=1 && ./prebuilt/darwin-x86/ccache/ccache -M 20G
Then I used the command identified above (i.e. make -j`sysctl -an hw.logicalcpu` ...).
It failed after quite some time with the error:
Code:
Build failed with:
Undefined symbols for architecture i386:
"android::renderscript::rsi_Allocation1DElementData(android::renderscript::Context*, void*, unsigned int, unsigned int, void const*, unsigned long, unsigned int)", referenced from:
android::renderscript::rspr_Allocation1DElementData(android::renderscript::Context*, android::renderscript::Fifo*, unsigned char*, unsigned long)in libRS.a(rsgApiReplay.o)
android::renderscript::rsp_Allocation1DElementData(android::renderscript::Context*, void const*, unsigned long)in libRS.a(rsgApiReplay.o)
"android::renderscript::rsi_Allocation2DElementData(android::renderscript::Context*, void*, unsigned int, unsigned int, unsigned int, RsAllocationCubemapFace, void const*, unsigned long, unsigned int)", referenced from:
android::renderscript::rspr_Allocation2DElementData(android::renderscript::Context*, android::renderscript::Fifo*, unsigned char*, unsigned long)in libRS.a(rsgApiReplay.o)
android::renderscript::rsp_Allocation2DElementData(android::renderscript::Context*, void const*, unsigned long)in libRS.a(rsgApiReplay.o)
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
As I noted above, it seems like one or two other people have had this error also. At this point, I'm basically stumped. I've never really done much C/C++ dev, so I'm fairly unfamiliar with reading the output of the linker. Looking over it, I wouldn't have expected it to need i386 symbols for libRS.a (if that is indeed what it is looking for symbols of) because it is building for ARM, but I could just be completely misunderstanding the output.
Anyway, if anyone has suggestions as to what might be causing the problem or how to address it (or even wants to briefly explain what that linker error actually means in a clearer way) that would be great. I've fought with CM7 builds in the past (for the Moto Defy) and basically given up because I couldn't get them to build. I'd rather not just do that again.
Click to expand...
Click to collapse
sean.wang said:
Any update?
Click to expand...
Click to collapse
I actually gave up in the end, and took to running an Ubuntu 12.04 virtual machine for compiling. There just isn't enough people building on OSX to be able to readily work through the problems.
FFU5y said:
I actually gave up in the end, and took to running an Ubuntu 12.04 virtual machine for compiling. There just isn't enough people building on OSX to be able to readily work through the problems.
Click to expand...
Click to collapse
I believe this fixes this particular problem:
Code:
diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp
index bbf2dbd..c4def9c 100644
--- a/libs/rs/rsAllocation.cpp
+++ b/libs/rs/rsAllocation.cpp
@@ -429,13 +429,13 @@ void rsi_Allocation1DData(Context *rsc, RsAllocation va, uint32_t xoff, uint32_t
}
void rsi_Allocation2DElementData(Context *rsc, RsAllocation va, uint32_t x, uint32_t y, uint32_t lod, RsAllocationCubemapFace face,
- const void *data, uint32_t sizeBytes, size_t eoff) {
+ const void *data, size_t sizeBytes, uint32_t eoff) {
Allocation *a = static_cast<Allocation *>(va);
a->elementData(rsc, x, y, data, eoff, sizeBytes);
}
void rsi_Allocation1DElementData(Context *rsc, RsAllocation va, uint32_t x, uint32_t lod,
- const void *data, uint32_t sizeBytes, size_t eoff) {
+ const void *data, size_t sizeBytes, uint32_t eoff) {
Allocation *a = static_cast<Allocation *>(va);
a->elementData(rsc, x, data, eoff, sizeBytes);
}
The issue has been fixed in another way, as a part of a larger patch, in the upstream AOSP. So, this is most probably only useful if you try to build CM9 / AOSP 4.0.4 under MacOS X 10.7 (Lion) with a suitable version of XCode. My XCode is 4.5 (i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1).

How do I disable Signature verification

Hi All , Im trying to install ROMS but keep getting signature verification failed , I am running SUPERSU and ran CF-Auto-Root-jflte-jfltexx-gti9505.tar.md5 using ODIN , but when I reboot my device into recovery I get : signature verification failed.
I dont have any toggle signature verification , so any ideas how I get round this ?
Thank you , any help appreciated as im pulling my hair out
Stephen
please post this in Q&A section..
Install a custom recovery. That will fix the problem. I had the same problem and i fixed installing custom recovery.
Galaxy S4 i9505 with Tapatalk 4
Done
Thanks
Service.jar
/smali/com/android/server/pm/PackageManagerService.smali
search
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/SignatureI​
change all method
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/SignatureI
.locals 7
const-string p0, "DSA:"
const-string p1, "Skip signatures check"
invoke-static {p0, p1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/StringI
const/4 v6, 0x0
return v6
.end method​
BoBCatRoM said:
Service.jar
/smali/com/android/server/pm/PackageManagerService.smali
search
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/SignatureI​
change all method
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/SignatureI
.locals 7
const-string p0, "DSA:"
const-string p1, "Skip signatures check"
invoke-static {p0, p1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/StringI
const/4 v6, 0x0
return v6
.end method​
Click to expand...
Click to collapse
you're welcome
Requested thread to be moved
Thread moved.
P.S you know a simpler version that doesn't waste resources outputting stuff to logcat is just:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/SignatureI
.locals 1
const/4 v0, 0x0
return v0
.end method​The log stuff is mainly used by devs as a sort of hidden "easter egg" so its easier to spot kangs.
DSA said:
you're welcome
Requested thread to be moved
Click to expand...
Click to collapse
I have tried that on my I9505 and got a bootloop with the message "Scale" at the Android is loading screen. Here is my code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/SignatureI
.registers 9
const/4 v6, 0x0
const-string v3, "PackageManager"
const-string v4, "Skip signature check."
invoke-static {v3, v4}, Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/StringI
return v6
.end method
I am using Android Multitool to rebuild the jar. What could be wrong?
Thanks.
Use the entire method provided (Mine or Jonny), it will work fine (im using it on my own i9505)
And just use smali/baksmali, not any multitool thing
DSA said:
Use the entire method provided (Mine or Jonny), it will work fine (im using it on my own i9505)
And just use smali/baksmali, not any multitool thing
Click to expand...
Click to collapse
Thanks for the indications, mate, but it is still a no go. Same result. Here is step by step what I did:
-Configuration I9505, MK9, GoldenEye ROM
1) Extracted the classes.dex from service.jar using Winrar
2) Decompiled using baksmali:
java -jar baksmali-2.0.2.jar -l -b -o classout/ classes.dex (I am using latest jar found of baksmali)
3) Edited the PackageManagerService,smali file under /com/android/server/pm/ like this:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/SignatureI
.locals 7
const/4 v0, 0x0
return v0
.end method
4) Compile back using smali:
java -Xmx512M -jar smali-2.0.2.jar classout/ -o new-classes.dex (Same here, using latest jar version of smali)
5) Renamed the new-classes.dex into classes.dex and put it back into the services.jar using Winrar and 0 compression (store option)
6) Overwrite existing service.jar with the modified service.jar on my phone under /system/framework
7) Reboot
8) Bootlooop....
Which step(s) could have gone wrong?
i was under the impression this was for a stock rom - i don't know what the chef of that rom has done so it would be best to ask him
DSA said:
i was under the impression this was for a stock rom - i don't know what the chef of that rom has done so it would be best to ask him
Click to expand...
Click to collapse
Good suggestion. I guess I will also give it a try with a stock ROM.
signature verification removal
hello, i have videocon a15...i want to install custom rom.but while installing from sd card signature verification is failed appears.what to do ??help me plzzzzz

How to replace a file from assets to System

Hi again...
I want replace a file (depend on user choose) to system/framework and set permissions for that file...
but i don't know:
1-How to mount system as rw...
2-How to replace a file from assets to system(switch between 7 files depend on user choose)...
3-How to set permission of file to rw- r— r—?
plz just tell me the ways that work for u...
tnx
So have you decided to get everything from here without doing a little research? Simple google search gives me ample of example rom stackoverflow and documentation from developer.android.com
vijai2011 said:
So have you decided to get everything from here without doing a little research? Simple google search gives me ample of example rom stackoverflow and documentation from developer.android.com
Click to expand...
Click to collapse
I searched alot and i did alot of topics guides but they don't work fro me...
like:
http://stackoverflow.com/questions/14559068/android-how-to-set-rw-r-r-permissions-programmatically
http://stackoverflow.com/questions/11268717/write-files-to-system
http://stackoverflow.com/questions/...tem-in-rw-from-within-my-apk-rooted-of-course
and a lot of more that i cant remember....
usually i search for what i want and if i don't find any result for, i ask my question here...
Sorry to ask this, but have you learnt java basics first? Because I feel, you lack basis - Its not humiliation but this something you need on first hand to be a good developer.
1. I have already answered how to mount system as RW:
Code:
Runtime runtime = Runtime.getRuntime();
runtime.exec("su -c mount -o remount,rw /system");
2. The first link you gave has answer for setting permission in 1st answer.
3. To extract assert, refer this answer:
Hint: put up a dialog asking which file to extract and then adopt the above answer to extract it to sdcard first them copy it to system using runtime and cp command.
vijai2011 said:
Sorry to ask this, but have you learnt java basics first? Because I feel, you lack basis - Its not humiliation but this something you need on first hand to be a good developer.
1. I have already answered how to mount system as RW:
Code:
Runtime runtime = Runtime.getRuntime();
runtime.exec("su -c mount -o remount,rw /system");
2. The first link you gave has answer for setting permission in 1st answer.
3. To extract assert, refer this answer:
Hint: put up a dialog asking which file to extract and then adopt the above answer to extract it to sdcard first them copy it to system using runtime and cp command.
Click to expand...
Click to collapse
tnx my friend
yeah i know java about j2se as well!!
and i did about 5 swing projects...
i will try ur answer now thanks...
vijai2011 said:
Sorry to ask this, but have you learnt java basics first? Because I feel, you lack basis - Its not humiliation but this something you need on first hand to be a good developer.
1. I have already answered how to mount system as RW:
Code:
Runtime runtime = Runtime.getRuntime();
runtime.exec("su -c mount -o remount,rw /system");
2. The first link you gave has answer for setting permission in 1st answer.
3. To extract assert, refer this answer:
Hint: put up a dialog asking which file to extract and then adopt the above answer to extract it to sdcard first them copy it to system using runtime and cp command.
Click to expand...
Click to collapse
I tried this code but my device restart...
Code:
package com.android.justtest;
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import java.io.DataOutputStream;
public class MainActivity extends Activity {
[user=439709]@override[/user]
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
MainActivity mainActivity = new MainActivity();
mainActivity.mainActionAmber();
mainActivity.close();
}
[user=439709]@override[/user]
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
public void close()
{
try {
Process proc = Runtime.getRuntime()
.exec("su -c pkill com.android.systemui ");
Thread.sleep(1000);
proc.waitFor();
} catch (Exception ex) {
ex.printStackTrace();
}
}
public void mainActionAmber()
{
try {
Runtime runtime = Runtime.getRuntime();
Process proc = Runtime.getRuntime()
.exec("su");
DataOutputStream os = new DataOutputStream(proc.getOutputStream());
runtime.exec("su -c mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system");
os.writeBytes("find /sdcard/we/Amber -exec mv '{}' /system/framework +\n");
os.writeBytes("chmod 644 /system/framework" + "\n");
os.writeBytes("exit\n");
os.flush();
}catch (Exception e){e.printStackTrace();}
}}
where is the problem?
poria1999 said:
I tried this code but my device restart...
where is the problem?
Click to expand...
Click to collapse
This simply means the framework file you're trying to replace is crucial to the system, and thus the device will reboot if it is deleted.
Androguide.fr said:
This simply means the framework file you're trying to replace is crucial to the system, and thus the device will reboot if it is deleted.
Click to expand...
Click to collapse
I can replace that file manually without any damage!!!
i want to replace SemcGenericUxpRes.apk....
Do you have logcat error?
I use
try {
suProcess = Runtime.getRuntime().exec("su");
DataOutputStream os = new DataOutputStream(suProcess.getOutputStream());
os.writeBytes("\n");
os.flush();
os.close();
suProcess.waitFor();
Sent from my GT-I9505G using Tapatalk 4

Categories

Resources