Related
Okay so, after having my phone for a few months now, I've decided to start developing for it. I decided I wanted an application that backs up my applications for me. Yes, I know Astro does it, but it's going to become a paid app soon, and I don't need the file managing aspect of it either.
So, knowing the commands to do back my apps up through the terminal:
$su
#cp -r /data/app /sdcard/apps
(That backs up all my apps to my SDcard, in a folder called apps.)
I knew that openoverclocker sends commands to the phone, in order to set the cpu speed. So using the openoverclocker source (available from here: http://code.google.com/p/openoverclocker/ ) as a reference I created an application that sends the command to the phone. After successfully compiling the app and installing it, I'm getting a force close. I've uploaded my source for you guys to take a look at here: http://www.mediafire.com/?zdmjmydzk2x
Suggestions?
Cheers in advance- Thrash
The easiest way to debug is to make sure USB dev is enabled, then have a binary copy of 'adb' and run 'adb logcat' on your computer it will dump out system log from your phone including why apps crash, although it sounds like you don't have the proper permissions in your manifest file.
ThrashWolf said:
Okay so, after having my phone for a few months now, I've decided to start developing for it. I decided I wanted an application that backs up my applications for me. Yes, I know Astro does it, but it's going to become a paid app soon, and I don't need the file managing aspect of it either.
So, knowing the commands to do back my apps up through the terminal:
$su
#cp -r /data/app /sdcard/apps
(That backs up all my apps to my SDcard, in a folder called apps.)
I knew that openoverclocker sends commands to the phone, in order to set the cpu speed. So using the openoverclocker source (available from here: http://code.google.com/p/openoverclocker/ ) as a reference I created an application that sends the command to the phone. After successfully compiling the app and installing it, I'm getting a force close. I've uploaded my source for you guys to take a look at here: http://www.mediafire.com/?zdmjmydzk2x
Suggestions?
Cheers in advance- Thrash
Click to expand...
Click to collapse
how about i just add that script to the app that i will be releasing in a few days?? my app will have a free version and a donate version that will allow people to pay a dollar to danate to me if they so please but the versions will be no different other than nagging for donationg on the free version. would you mind if i implement your idea?
looks like what you did wrong that i saw right off the bat is CoreTask should be capitalized, but what about just using the "Runtime.getRuntime().exec("command");" instead? just input the command you want to execute in place of the word command in the quotes
oh and you have no xml layout in /res/layout
start a new project and just import the files you need from your source, the layout xml should create what it needs at the top on it's own. it shouldn't be empty
Thanks for all the help guys, tubaking182, if you want to do that, go ahead =)
I really want to complete this application myself though, as it's important to me (first app blah blah blah) and I'll feel I'll have accomplished something by seeing it through.
ThrashWolf said:
Thanks for all the help guys, tubaking182, if you want to do that, go ahead =)
I really want to complete this application myself though, as it's important to me (first app blah blah blah) and I'll feel I'll have accomplished something by seeing it through.
Click to expand...
Click to collapse
i completely understand that, the app i just released is my first app as well, i wanted something for myself and a few beta testers told me i should sell it so i made a donate version. i am mainly just happy that it works in one build, hopefully i can get it to work in all builds as it is supposed to
This would be awesome if you could give it su permissions & have it backup the protected apps as well so I don't have to manually do it through terminal everytime I wanna try a new ROM out
Beast84 said:
This would be awesome if you could give it su permissions & have it backup the protected apps as well so I don't have to manually do it through terminal everytime I wanna try a new ROM out
Click to expand...
Click to collapse
Use a Apps to SD build that way your apps etc won't get wiped if/when you upgrade with a build the wipes the data partition etc.
tubaking182 said:
i completely understand that, the app i just released is my first app as well, i wanted something for myself and a few beta testers told me i should sell it so i made a donate version. i am mainly just happy that it works in one build, hopefully i can get it to work in all builds as it is supposed to
Click to expand...
Click to collapse
Awesome, is it in the market just now?
Beast84 said:
This would be awesome if you could give it su permissions & have it backup the protected apps as well so I don't have to manually do it through terminal everytime I wanna try a new ROM out
Click to expand...
Click to collapse
Something along these lines?
CoreTask.runRootCommand("cd /data/app-private");
CoreTask.runRootCommand("cp -r /data/app-private /sdcard/apps");
CoreTask.runRootCommand("cd /data/app");
CoreTask.runRootCommand("cp -r /data/app /sdcard/apps");
ThrashWolf said:
CoreTask.runRootCommand("cd /data/app-private");
Click to expand...
Click to collapse
That's funcitonality from one of the tether apps, use this instead:
hasroot = true;
try
{
Runtime.getRuntime().exec("su");
} catch (Exception e) {
hasroot = false;
}
delta_foxtrot2 said:
That's funcitonality from one of the tether apps, use this instead:
hasroot = true;
try
{
Runtime.getRuntime().exec("su");
} catch (Exception e) {
hasroot = false;
}
Click to expand...
Click to collapse
getting a bit of an issue here, I'm being told "hasroot cannot be resolved"
Any suggestions?
thanks for all the help so far guys.
ThrashWolf said:
Awesome, is it in the market just now?
Click to expand...
Click to collapse
yes my app is in the market but i have not implemented you idea because i want you to have the joy of finishing an app before i decide to merge it with another app
tubaking182 said:
yes my app is in the market but i have not implemented you idea because i want you to have the joy of finishing an app before i decide to merge it with another app
Click to expand...
Click to collapse
Thanks man =D
ThrashWolf said:
getting a bit of an issue here, I'm being told "hasroot cannot be resolved"
Any suggestions?
thanks for all the help so far guys.
Click to expand...
Click to collapse
you just needed to put boolean in front of the first instance of gotroot, but that code doesn't work as I thought it would, you need to do this instead.
Code:
private boolean GotRoot()
{
boolean ihasroot = false;
Process process = null;
DataOutputStream os = null;
try
{
process = Runtime.getRuntime().exec("su");
os = new DataOutputStream(process.getOutputStream());
os.writeBytes("exit\n");
os.flush();
process.waitFor();
if(process.exitValue() == 0)
ihasroot = true;
} catch (Exception e) {
} finally {
try
{
if(os != null)
os.close();
os = null;
if(process != null)
process.destroy();
process = null;
} catch (Exception e) {}
}
return ihasroot;
}
You can use that code by doing something like this:
Code:
if(!GotRoot())
{
new AlertDialog.Builder(this)
.setTitle("Unable to get root.")
.setMessage("I was unable to get root access.")
.setNeutralButton("Ok", new DialogInterface.OnClickListener()
{
public void onClick(DialogInterface dialog, int whichButton)
{
finish();
}
})
.show();
}
Still having a tiny bit of trouble with the app.
So far as I can see, it *should* work, but it isn't (opens and exits correctly, just isn't copying over .apks, or even looking for root access). If someone could have a look at the source and point me in the right direction I'd really appreciate it. Thanks for all the help so far:
http://www.mediafire.com/?sharekey=b26ee7e91e0cb0d7dd8b33b5aa27078d
Oh forgot to mention, the (rather stupid) icon's a WIP.
tubaking182 said:
yes my app is in the market but i have not implemented you idea because i want you to have the joy of finishing an app before i decide to merge it with another app
Click to expand...
Click to collapse
Whats your app called?
my app is Kingdroid Scripts, there is a free and donate version but for the time being it only works in dude builds(and i am not sure why) but i am looking into it and hopefully i can get some work done if my girl will let me near my computer long enough. been trying to downgrade my comp back to ubuntu 8.10 which is a pain in the arse especially when you are trying not to lose anything
tubaking182 said:
my app is Kingdroid Scripts, there is a free and donate version but for the time being it only works in dude builds(and i am not sure why) but i am looking into it and hopefully i can get some work done if my girl will let me near my computer long enough. been trying to downgrade my comp back to ubuntu 8.10 which is a pain in the arse especially when you are trying not to lose anything
Click to expand...
Click to collapse
Awesome, shame it doesn't work on the JF firmware =(
Hi all,
My Xposed module deals with different versions of an app. Different versions means different hooks, so my question is: how can I get the application version during the handleLoadPackage execution? I mean... getPackageManager requires a context which I do not have *or* I don't know how to find out...
Any clues, guys?
Thanks.
From memory, I believe you can use the appInfo field in LoadPackageParam: lpparam.appInfo.
Otherwise you can get a context with AndroidAppHelper.currentApplication()
GermainZ said:
From memory, I believe you can use the appInfo field in LoadPackageParam: lpparam.appInfo.
Otherwise you can get a context with AndroidAppHelper.currentApplication()
Click to expand...
Click to collapse
No luck!
AndroidAppHelper.currentApplication() returns null and lpparam.appInfo does not appear to be a Context object...
Any other idea?
slvrbllt said:
No luck!
AndroidAppHelper.currentApplication() returns null and lpparam.appInfo does not appear to be a Context object...
Any other idea?
Click to expand...
Click to collapse
lpparam.appInfo = ApplicationInfo, not Context. It might have the version, but I can't recall if it does or check it right now.
GermainZ said:
lpparam.appInfo = ApplicationInfo, not Context. It might have the version...
Click to expand...
Click to collapse
I couldn't see anything in the ApplicationInfo object that could be related to the version number of the package...
I assume you're placing your hooks in handleLoadPackage(). The Context/Application isn't created yet at that time. I think some modules managed to get a system context via reflection, but I don't know which ones. Maybe you can find something via the search function.
Just another idea: Instead of comparing versions, you might be able to achieve the same by checking whether certain classes/methods exist.
rovo89 said:
I assume you're placing your hooks in handleLoadPackage(). The Context/Application isn't created yet at that time. I think some modules managed to get a system context via reflection, but I don't know which ones. Maybe you can find something via the search function.
Just another idea: Instead of comparing versions, you might be able to achieve the same by checking whether certain classes/methods exist.
Click to expand...
Click to collapse
Thanks for your reply, mate.
You are correct! handleLoadPackage is where I placed my hooks.
As per your suggestion, I will try to find any other existing module that does what I'm looking for.
Unfortunately I need to identify the package version in any reliable way but classes/methods existence check.
The app is obfuscated... method a.a.b could be a.b.c in another version while method a.a.b could still exist but with different implementation.
Is there any other way to retrieve the installed version of a package, given it's package name?
Thanks.
slvrbllt said:
Is there any other way to retrieve the installed version of a package, given it's package name?
Click to expand...
Click to collapse
Apart from using the system context to access the package manager, you could try to parse the package yourself. There is a PackageParser class which is hidden from the SDK, but if you manage to call parsePackage() via reflection (or by referencing a JAR which includes the hidden APIs as well, like XposedBridge does), then you can use it with ApplicationInfo.sourceDir and get the version numbers from the result. Not sure how expensive that operation is, but if you execute it just once, it should be ok.
rovo89 said:
[...] if you manage to call parsePackage() via reflection (or by referencing a JAR which includes the hidden APIs as well, like XposedBridge does), then you can use it with ApplicationInfo.sourceDir and get the version numbers from the result.[...]
Click to expand...
Click to collapse
I will definitely give it a try.
Thanks!
For anyone wondering the snippet we used up until now is "deprecated" in Android 11 and totally gone in 12 (S). You can use the code below to get the version code for your app:
Java:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
Class<?> pkgParserClass = XposedHelpers.findClass("android.content.pm.PackageParser", lpparam.classLoader);
Object packageLite = XposedHelpers.callStaticMethod(pkgParserClass, "parsePackageLite", apkPath, 0);
versionCode = XposedHelpers.getIntField(packageLite, "versionCode");
} else {
Class<?> parserCls = XposedHelpers.findClass("android.content.pm.PackageParser", lpparam.classLoader);
Object pkg = XposedHelpers.callMethod(parserCls.newInstance(), "parsePackage", apkPath, 0);
versionCode = XposedHelpers.getIntField(pkg, "mVersionCode");
}
Massi-X said:
For anyone wondering the snippet we used up until now is "deprecated" in Android 11 and totally gone in 12 (S). You can use the code below to get the version code for your app:
Java:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
Class<?> pkgParserClass = XposedHelpers.findClass("android.content.pm.PackageParser", lpparam.classLoader);
Object packageLite = XposedHelpers.callStaticMethod(pkgParserClass, "parsePackageLite", apkPath, 0);
versionCode = XposedHelpers.getIntField(packageLite, "versionCode");
} else {
Class<?> parserCls = XposedHelpers.findClass("android.content.pm.PackageParser", lpparam.classLoader);
Object pkg = XposedHelpers.callMethod(parserCls.newInstance(), "parsePackage", apkPath, 0);
versionCode = XposedHelpers.getIntField(pkg, "mVersionCode");
}
Click to expand...
Click to collapse
Thank you so much broo
Hi everyone,
I wanna build old version of Xposed, for Android SDK 16-19, then have tried to compile Xposed fw for hundreds time but still failed.
Environment: Ubuntu 15.10 x64 | tools: JDK 1.6, libc6 ....
AOSP: JZO54L / android-4.1.2_r2 /Jelly Bean ("make app_process" have been run successfully).
My steps:
- Download AOSP into /opt/android/aosp
- XposedBridge.jar: Download Xposed Installer here repo[dot]xposed[dot]info/module/de.robv.android.xposed.installer and detach jar from apk. Put it to /opt/out/java
- Download XposedTools source from github into /opt/xposed/ then make build.conf file:
[General]
outdir = /opt/out
[Build]
# Please keep the base version number and add your custom suffix
version = 58
# makeflags = -j4
[GPG]
sign = release
user = 852109AA!
# Root directories of the AOSP source tree per SDK version
[AospDir]
16 = /opt/android/aosp
# SDKs to be used for compiling BusyBox
# Needs github[dot]com/rovo89/android_external_busybox
[BusyBox]
Click to expand...
Click to collapse
- To integrate Xposed to AOSP, I tried following 2 ways in the instruction (local manifest and manual cloning)
+ local manifest: link [XposedTools]/local_manifests/xposed_sdk16.xml to [aosp]/.repo/local_manifests/ then run repo sync.
+ manual cloning: remove [aosp]/build; clone github[dot]com/rovo89/platform_build/ to replace; clone github[dot]com/rovo89/Xposed into [aosp]/framework/base/cmds/xposed
- Go back to [XposedTools] and run ./build -t x86:16
>>output: cd /opt/android/aosp && . build/envsetup.sh >/dev/null && lunch full_x86-user >/dev/null && make -j8 TARGET_CPU_SMP=true xposed
Click to expand...
Click to collapse
The result I received is a big "app_process_xposed" file (~ 270-350 KBs), it size is as many times as the origin app_process file (~20 KBs). I think there are somethings wrong. I open them by 7z and see some differences:
i.imgur.com/PU80vSV.png
Click to expand...
Click to collapse
I may did some mistakes in these steps. Could you please give me any advice?
Thank so much!
Help me Pls...
Did you actually try the app_process_xposed you got, or did you just assume it was wrong because it was bigger? If you did try it, what did it do?
josephcsible said:
Did you actually try the app_process_xposed you got, or did you just assume it was wrong because it was bigger? If you did try it, what did it do?
Click to expand...
Click to collapse
Thank for your reply. I tried rename app_process_xposed to app_process_sdk16 then push new file to assets folder of XposedInstaller project. When XposedInstaller.apk file installed, i had receive messages not compatible with my sdk 19...
hahalulu said:
When XposedInstaller.apk file installed, i had receive messages not compatible with my sdk 19...
Click to expand...
Click to collapse
What was the exact message that you got? Can you post a screenshot of it?
josephcsible said:
What was the exact message that you got? Can you post a screenshot of it?
Click to expand...
Click to collapse
My message i had received
Update: sdk16.zip file
I'm still stuck at this problem :crying:
hahalulu said:
I'm still stuck at this problem :crying:
Click to expand...
Click to collapse
build duoc chua ban. minh cung dang bi giong ban. khong biet giai quyet the nao
hellboy211 said:
build duoc chua ban. minh cung dang bi giong ban. khong biet giai quyet the nao
Click to expand...
Click to collapse
Please post in English, I have translated this one for you
Regards
Sawdoctor
Build is not acid. You are also welcome. Not the right time
Does its existence for devices like the Z3C make it more or less likely for us to see on suzuran? Would love to see a LineageOS 17 ROM for this device. Makes me wish I was a dev. Thanks to all those who continue to grind hours into porting and developing ROMs for the platform.
beflythis said:
Would love to see a LineageOS 17 ROM for this device.
Click to expand...
Click to collapse
Oh! I have successfully built a LineageOS 17.0 rom for z5c! :good:
But.... As my 16.0 try this rom is not booting...
Don't know why
Berni-0815 said:
Oh! I have successfully built a LineageOS 17.0 rom for z5c! :good:
But.... As my 16.0 try this rom is not booting...
Don't know why
Click to expand...
Click to collapse
Are you making any kernel changes? If not, that's probably why. You can't use the LineageOS 15.1 kernel on the PIE. Correct me if I'm wrong but Pie requires linux kernel 4.4x and greater while, Android 10 requires 4.9 and greater.
Apart from fixing compile-errors, no.
But I don't think that the kernel version is important. This project uses kernel 3.x too, if I'm not wrong...
Sure, there have to be changes, but I can't do so...
I've tried another kernel (this one) and I changed/added some files to avoid compile errors. But the result is the same:
The splash screen apears, then a blank screen....
The splash screen apears, then a blank screen....
The splash screen apears, then a blank screen....
The splash screen apears, then a blank screen....
...and so on until end of battery...
Have you tried looking at any sort of logs, kernel logs? (I'm not sure if there would be one in the first place) It would be better to try by increments (PIE first with https://github.com/joel16/android_kernel_sony_msm8994). I might give it a try this weekend just for the sake of it.
Joel16 said:
Have you tried looking at any sort of logs, kernel logs? (I'm not sure if there would be one in the first place)
Click to expand...
Click to collapse
Where should these logs be?
I have no access to the device at this early stage...
An when I reflash a working rom /system will be overwritten.
It would be better to try by increments (PIE first with https://github.com/joel16/android_kernel_sony_msm8994). I might give it a try this weekend just for the sake of it.
Click to expand...
Click to collapse
I've tried to build pie with this kernel. Nearly the same result.
Berni-0815 said:
Where should these logs be?
I have no access to the device at this early stage...
An when I reflash a working rom /system will be overwritten.
I've tried to build pie with this kernel. Nearly the same result.
Click to expand...
Click to collapse
Weird, I ran into some issues building pie yesterday, but didn't have any time to fix it. I'll try again tonight and see how it goes. If I still have issues, I'll have to wait till the weekend.
Joel16 said:
Weird, I ran into some issues building pie yesterday
Click to expand...
Click to collapse
I'm sorry; I should have tell you about that... :angel:
I changed a lot of things to compile it successfully. Here are my changes (I hope this list is complete):
.bashrc:
Code:
export CPU_SSE42=false
to avoid crashes in hiddenapi and profman
device/sony/kitakami-common/SonyOtgSwitch/Android.mk:
Code:
LOCAL_SDK_VERSION := current
kernel/sony/msm8994/include/uapi/linux/rmnet_data.h; insert lines 226 to 236 (line 226 changed [a comma at the end of line]):
Code:
RMNET_NETLINK_DEL_VND_TC_FLOW,
/*
* RMNET_NETLINK_NEW_VND_WITH_NAME - Creates a new virtual network
* device node with the specified
* device name
* Args: int32_t node number
* char[] vnd_name - Use as name
* Returns: status code
*/
RMNET_NETLINK_NEW_VND_WITH_NAME
bionic/libc/include/bits/fortify/fcntl.h; insert lines 33 to 36:
Code:
#ifndef __O_TMPFILE
#define __O_TMPFILE 020000000
#endif
#define O_TMPFILE (__O_TMPFILE | O_DIRECTORY)
hardware/qcom/audio-caf/msm8994/hal/audio_hw.c; line 2457:
Code:
ALOGE("%s: error [B]%ld[/B] - %s", __func__, ret, pcm_get_error(out->pcm));
hardware/qcom/audio-caf/msm8994/hal/audio_extn/audio_extn.c; lines 523 and 524:
Code:
void audio_extn_set_parameters(struct audio_device *adev [B]__unused[/B],
struct str_parms *parms [B]__unused[/B])
and line 67:
Code:
static struct audio_extn_module aextnmod [B]__unused[/B] = {
hardware/qcom/display-caf/msm8994/libqdutils/idle_invalidator.cpp; line 127:
Code:
ALOGD_IF(II_DEBUG, "IdleInvalidator::%s Idle Timeout fired len [B]%ld[/B]",
hardware/qcom/display-caf/msm8994/libhdmi/hdmi.cpp: line 196:
Code:
ALOGD("%s: Scan Info string: %s length = [B]%ld[/B]",
and line 320:
Code:
ALOGD_IF(DEBUG, "%s: EDID string: %s length = [B]%ld[/B]",
device/sony/kitakami-common/SonyOtgSwitch/Android.mk: line 5:
Code:
LOCAL_PRIVATE_PLATFORM_APIS := true
Changes in bold
Berni-0815 said:
I'm sorry; I should have tell you about that... :angel:
I changed a lot of things to compile it successfully. Here are my changes (I hope this list is complete):
.bashrc:
Code:
export CPU_SSE42=false
to avoid crashes in hiddenapi and profman
device/sony/kitakami-common/SonyOtgSwitch/Android.mk:
Code:
LOCAL_SDK_VERSION := current
kernel/sony/msm8994/include/uapi/linux/rmnet_data.h; insert lines 226 to 236 (line 226 changed [a comma at the end of line]):
Code:
RMNET_NETLINK_DEL_VND_TC_FLOW,
/*
* RMNET_NETLINK_NEW_VND_WITH_NAME - Creates a new virtual network
* device node with the specified
* device name
* Args: int32_t node number
* char[] vnd_name - Use as name
* Returns: status code
*/
RMNET_NETLINK_NEW_VND_WITH_NAME
bionic/libc/include/bits/fortify/fcntl.h; insert lines 33 to 36:
Code:
#ifndef __O_TMPFILE
#define __O_TMPFILE 020000000
#endif
#define O_TMPFILE (__O_TMPFILE | O_DIRECTORY)
hardware/qcom/audio-caf/msm8994/hal/audio_hw.c; line 2457:
Code:
ALOGE("%s: error [B]%ld[/B] - %s", __func__, ret, pcm_get_error(out->pcm));
hardware/qcom/audio-caf/msm8994/hal/audio_extn/audio_extn.c; lines 523 and 524:
Code:
void audio_extn_set_parameters(struct audio_device *adev [B]__unused[/B],
struct str_parms *parms [B]__unused[/B])
and line 67:
Code:
static struct audio_extn_module aextnmod [B]__unused[/B] = {
hardware/qcom/display-caf/msm8994/libqdutils/idle_invalidator.cpp; line 127:
Code:
ALOGD_IF(II_DEBUG, "IdleInvalidator::%s Idle Timeout fired len [B]%ld[/B]",
hardware/qcom/display-caf/msm8994/libhdmi/hdmi.cpp: line 196:
Code:
ALOGD("%s: Scan Info string: %s length = [B]%ld[/B]",
and line 320:
Code:
ALOGD_IF(DEBUG, "%s: EDID string: %s length = [B]%ld[/B]",
device/sony/kitakami-common/SonyOtgSwitch/Android.mk: line 5:
Code:
LOCAL_PRIVATE_PLATFORM_APIS := true
Changes in bold
Click to expand...
Click to collapse
Yup I made those changes except for
Code:
export CPU_SSE42=false
I did not get any issues building but the device does bootloop. I'm gonna see if we can try and pull any sort of logs to see what's causing the issue.
Joel16 said:
Yup I made those changes except for
Code:
export CPU_SSE42=false
I did not get any issues building
Click to expand...
Click to collapse
That seems to be a problem with my cpu. The mentioned line is a cpu instruction. While trying to build this rom on my pc I ran into errors.
but the device does bootloop. I'm gonna see if we can try and pull any sort of logs to see what's causing the issue.
Click to expand...
Click to collapse
Maybe it's possible to backup the system onto a sd-card with an actual twrp and analyse these files?
Berni-0815 said:
That seems to be a problem with my cpu. The mentioned line is a cpu instruction. While trying to build this rom on my pc I ran into errors.
Maybe it's possible to backup the system onto a sd-card with an actual twrp and analyse these files?
Click to expand...
Click to collapse
I'm not entirely sure how it works, but I have heard people talking about pulling logs form bootloops. I mean there has to be a way to debug a bootloop, I highly doubt people just blindly fix them. Perhaps we can access last kernel message or logcat, someway. I'm going to try this weekend and see what I can come up with.
You can do It!!!
Joel16 said:
I'm not entirely sure how it works, but I have heard people talking about pulling logs form bootloops. I mean there has to be a way to debug a bootloop, I highly doubt people just blindly fix them. Perhaps we can access last kernel message or logcat, someway. I'm going to try this weekend and see what I can come up with.
Click to expand...
Click to collapse
Berni-0815 said:
That seems to be a problem with my cpu. The mentioned line is a cpu instruction. While trying to build this rom on my pc I ran into errors.
Maybe it's possible to backup the system onto a sd-card with an actual twrp and analyse these files?
Click to expand...
Click to collapse
What is about adbd, see here:
https://forum.xda-developers.com/showpost.php?p=67386761&postcount=13
The z5c is based on Qualcomm Snapdragon 810 MSM8994, like:
SONY XPERIA Z5 PREMIUM | MOTOROLA DROID TURBO | MICROSOFT LUMIA 950 XL | NUBIA Z9 MAX
Is there any source of a pie build availible where we can get some hints how get a pie build to run?
Here are some kernel sources from the Nubia Z9 Max (nx510j):
https://github.com/nubia-development/android_kernel_nubia_msm8994
I_did_it_just_tmrrow said:
What is about adbd, see here:
https://forum.xda-developers.com/showpost.php?p=67386761&postcount=13
Click to expand...
Click to collapse
I'll have a look at this. :good:
Joel16 said:
Have you tried looking at any sort of logs, kernel logs? (I'm not sure if there would be one in the first place) It would be better to try by increments (PIE first with https://github.com/joel16/android_kernel_sony_msm8994). I might give it a try this weekend just for the sake of it.
Click to expand...
Click to collapse
For my self I try slowly become deeper into that topic: building a rom.
So I did a little bit of research in github and gitlab and I found some interesting repos from this user:
https://github.com/Cyborg2017?tab=repositories
I ask him if he could help us a little bit and the first result is this.
@Joel16 & @Berni-0815 Perhaps this is useful:
https://github.com/Cyborg2017/android_kernel_sony_msm8994/tree/sony_msm8994_p-upstream
I hope it help us to come closer to an LineageOS 17 for suzuran.
I_did_it_just_tmrrow said:
I ask him if he could help us a little bit and the first result is this.
Click to expand...
Click to collapse
Error 404
A little time later: I think, you're talking about this kernel?
---------- Post added at 16:22 ---------- Previous post was at 16:03 ----------
I_did_it_just_tmrrow said:
What is about adbd, see here:
https://forum.xda-developers.com/showpost.php?p=67386761&postcount=13
Click to expand...
Click to collapse
Tried the mentioned tip in the 2nd post of this that thread without any success. I'm so sorry.
How can I include adbd into my build? I'll give it a try...
Berni-0815 said:
Error 404
A little time later: I think, you're talking about this kernel?
---------- Post added at 16:22 ---------- Previous post was at 16:03 ----------
Tried the mentioned tip in the 2nd post of this that thread without any success. I'm so sorry.
How can I include adbd into my build? I'll give it a try...
Click to expand...
Click to collapse
Yep, just try his source. He told that it could be useful to test this kernel with building twrp first.
To the logging problem. I understand that right that you have nothing in:
Code:
/proc/last_kmsg
Nor in:
Code:
/sys/fs/pstore/console-ramoops
and you check this with the twrp terminal?
You should take a look at this:
https://android.stackexchange.com/questions/213336/how-can-i-enable-last-kmsg
I_did_it_just_tmrrow said:
Yep, just try his source.
Click to expand...
Click to collapse
I'm actually building a rom with that kernel. I'll see later if it's working.
To the logging problem. I understand that right that you have nothing in:
Code:
/proc/last_kmsg
Nor in:
Code:
/sys/fs/pstore/console-ramoops
and you check this with the twrp terminal?
Click to expand...
Click to collapse
Right
You should take a look at this:
https://android.stackexchange.com/questions/213336/how-can-i-enable-last-kmsg
Click to expand...
Click to collapse
Ah! Nice. I'll try it later. Thank you very much! :good:
Berni-0815 said:
I'm actually building a rom with that kernel. I'll see later if it's working.
Right
Ah! Nice. I'll try it later. Thank you very much! :good:
Click to expand...
Click to collapse
Let me know how it goes, I'm more than certain kernel is what's preventing us from getting Pie/Q to boot up.
So I'm trying to get halium working for tab 2 (we can get ubuntu touch and maybe even plasma mobile with help of it) and I get this error
Code:
arch/arm/boot/compressed/atags_to_fdt.o: In function `merge_fdt_bootargs':
atags_to_fdt.c:(.text+0x20c): undefined reference to `__stack_chk_fail'
atags_to_fdt.c:(.text+0x210): undefined reference to `__stack_chk_guard'
It seems to be a toolchain error any help?
"It would appear that the -mstack-protector-guard option is only for backwards compatibility with how the stack protector worked in the past. In the past the canary was in a global variable. Later it was switched to TLS. It would appear that the operating system / libc you use either removed or never had support for the global variable canary, so only TLS works.
Don't touch the -mstack-protector-guard option and everything should work. The default should be fine when you use -fstack-protector-all."
"Provide __stack_chk_guard with a random value in c file, avoid using regular values like all zero's or FF's because the stack can easily get these values during any memory operation. Wiki on providing magic number implementation. This __stack_chk_guard will be placed at the top and bottom of the stack, which will be checked during every stack access. Any change in the value implies a corrupted stack and returns with error providing the stack protection.
unsigned long __stack_chk_guard;
void __stack_chk_guard_setup(void)
{
__stack_chk_guard = 0xBAAAAAAD;//provide some magic numbers
}
void __stack_chk_fail(void)
{
/* Error message */
}// will be called when guard variable is corrupted "
"There are two ways to remove this error: 1. From the compiler option disable(comment out) the "stack guard".
Define __stack_chk_guard in you c file.
When you define __stack_chk_guard make sure you provide random value to it. For providing random value you need to pass as an argument to the random function.
For any further detail you can refer to the compiler manual."
"For those that get this error in bare metal software development with a custom linker script, make sure to pass the option -nostdlib option:
gcc -nostdlib
since Ubuntu 16.04 for example enables the stack protection by default on the compiler. man gcc says:
NOTE: In Ubuntu 14.10 and later versions, -fstack-protector-strong is enabled by default for C, C++, ObjC, ObjC++, if none of -fno-stack-protector, -nostdlib, nor -ffreestanding are found.
-fno-stack-protector also solved it for me, but you should likely tell your poor compiler that you are doing baremetal stuff to prevent other such problems.
I'm guessing this is because the feature relies on symbols which are normally defined if a linker script is not given? But TODO I found no mention of those symbols by dumping the default linker script with:
aarch64-linux-gnu-gcc -Wl,-verbose main.c
so I'm not sure.
I grepped GCC 6.4.0 source code and it suggests that the symbol comes from libgcc2.c at gcc/doc/tm.texi:
The default version of this hook creates a variable called @samp{__stack_chk_guard}, which is normally defined in @file{libgcc2.c}."
Click to expand...
Click to collapse
source: https://stackoverflow.com/questions/27290086/gcc-canaries-undefined-reference-to-stack-chk-guard
i cant wait to use this and your other project (sailfishos)!
wizzer48 said:
i cant wait to use this and your other project (sailfishos)!
Click to expand...
Click to collapse
Yes even I can't wait for both as there is no latest development for our tab !!!
Arc android said:
Yes even I can't wait for both as there is no latest development for our tab !!!
Click to expand...
Click to collapse
Halium doesnt seem to work i tried but to no avail
Mithil17 said:
Halium doesnt seem to work i tried but to no avail
Click to expand...
Click to collapse
Its OK at least you tried to build it !!
Hey I have a great idea Mithil17, can you try to build MIUI 7 for galaxy tab 2? There was an attempt to build it earlier but it wasn't successful.
Arc android said:
Hey I have a great idea Mithil17, can you try to build MIUI 7 for galaxy tab 2? There was an attempt to build it earlier but it wasn't successful.
Click to expand...
Click to collapse
MIUI ??? Why do you wanna china bloadware sooo badly?? what's wrong with LOS or any other bloadware free ROMs?
Plus it's gonna be laggy as h3ll... done and forgotten.
drnightshadow said:
MIUI ??? Why do you wanna china bloadware sooo badly?? what's wrong with LOS or any other bloadware free ROMs?
Plus it's gonna be laggy as h3ll... done and forgotten.
Click to expand...
Click to collapse
Yeah I know it's Chinese but it looks beautiful. You'll know it if you have tried mini 5 for tab 2.
Arc android said:
Yeah I know it's Chinese but it looks beautiful. You'll know it if you have tried mini 5 for tab 2.haha
Click to expand...
Click to collapse
Haha, no thank you! I'm happy with LOS and RR ROMS. I own redmi note 5 pro but never used MIUI [email protected], I unlocked bootloader and installed LOS asap. I like to have privacy in my hand and I hate when OS wanna rape my privacy. My privacy isn't on sale.
drnightshadow said:
Haha, no thank you! I'm happy with LOS and RR ROMS. I own redmi note 5 pro but never used MIUI [email protected], I unlocked bootloader and installed LOS asap. I like to have privacy in my hand and I hate when OS wanna rape my privacy. My privacy isn't on sale.
Click to expand...
Click to collapse
If you actually want this much privacy, here's something for you : https://androidfilehost.com/?fid=17248734326145705104
An unofficial /e/os build for your device. Just trying to help you in case you didn't know this. That's all !
Arc android said:
If you actually want this much privacy, here's something for you : https://androidfilehost.com/?fid=17248734326145705104
An unofficial /e/os build for your device. Just trying to help you in case you didn't know this. That's all !
Click to expand...
Click to collapse
whyred = Redmi Note 5. Not SGT2
Are you sure? It can brick device
levider said:
whyred = Redmi Note 5. Not SGT2Are you sure? It can brick device
Click to expand...
Click to collapse
Note 5/pro = whyred that's what Google says.
Also in the above link, it is made for redmi note 5 pro
Official /e/ forum link : https://www.google.com/url?sa=t&sou...FjACegQIBBAC&usg=AOvVaw1iyAyl2Ur__Xid-tw1cRCz
I hope I am not doing anything wrong
Arc android said:
Note 5/pro = whyred that's what Google says.
Also in the above link, it is made for redmi note 5 pro
Click to expand...
Click to collapse
Dude, this is not Redmi Note 5 thread.
Update: It boots now, Sources are in https://github.com/Halium/projectmanagement/issues/238 no ui still
Mithil17 said:
Update: It boots now, Sources are in https://github.com/Halium/projectmanagement/issues/238 no ui still
Click to expand...
Click to collapse
So we can install it now ???? !!!!!
Arc android said:
So we can install it now ???? !!!!!
Click to expand...
Click to collapse
Well you can just install it, it just boots, no ui/display
Mithil17 said:
Well you can just install it, it just boots, no ui/display
Click to expand...
Click to collapse
So it means even if I install it, it can't be operated. Why some things are way too difficult for tab 2 ?? I mean miui7, sfos, treble, Oreo and now haloum are ported to other devices too that are mostly similar to ours but running them on tab 2 is a bit more difficult.