Android 6.0 Error: only position independent executables (PIE) are supported? - Nexus 5 Q&A, Help & Troubleshooting

Any fix for Android 6.0 Error: only position independent executables (PIE) are supported???

That error is what you get if you try to run an old binary that was built for Kitkat or earlier. It's not PIE that needs a fix, but the binary you tried to run.
What were you trying to do when you got that error?

Up

Related

cURL : error : only position independent executables (PIE) are supported.

Hello guys ,
Please help me to fix this error : error: only position independent executables (PIE) are supported.
I am using DOOGEE X5S Rooted android 5.1 I have this problem when I was following this guide :
android.stackexchange.com/a/55701/171994 ( I can't post outside links yet , sorry about that ).
Anyway , I already installed the cURL on my android phone , but I'm receiving this error on Terminal emulator error : position independence executables (PIE) are supported. Please guys help me to fix this error , Thank you guys for your help and your time

android emulate failed using AOSP source

Hi, I downloaded android full sources 5.1, 6.0, 7.0 and i built them.
I tried to check operating using the android emulator in sdk, but it failed except 5.1.
I replaced original image file( system.img, ramdisk.img, userdata.img) to new built files. And then I run. But I can't see android logo and it didn't progress.
I chose mini-emulator-arm-debug and original emulator image same to version and AOSP.
I didn't know why android 5.1 is operated but android 6.0 and 7.0 didn't do it. Has the method of execution changed?
So please help me.
1. The source build is succeeded.
2.Emulator screen showed only black. I tried to connect using adb shell but failed.

[WIP] Linux on Dex for Galaxy S8

One of my favorite features of the S8 is the Dex feature, that lets me use the phone as a basic computer. I was very disappointed when I saw that the Linux on Dex (LoD) beta is only available for the Note 9 and Tab S4.
This is a stupid software limitation, I don't see any other reason why the S8 - even with Android Pie - wouldn't run LoD. It was even used for the first demos (around one year ago)!
The aim of this thread is to try to remove this limitation and run Linux on Dex on our Galaxy S8.
We already managed to remove the limitation for the need of the Dex dock, hope this will also be a success!
As I'm not an experienced Java developer, I won't be able to solve this thing alone. Hope that other developers will also join this project!
Ok, here are my first steps:
- Downloaded, installed and ran the latest APK (1.0.49): https://forum.xda-developers.com/showpost.php?p=78734115&postcount=226
Error message: Your device is not supported. Please visit www.linuxondex.com for more details.
- Modified the model in build.prop to SM-N960
Error message: Linux on DeX requires your device to have the latest software to support some features.
So there is a change, but not enough.
Now, I decompiled the APK with apktool. The source is in smali bytecode format, but it can be transformed to java.
The device detection code is in the file smali/com/samsung/android/lxd/a/i.smali. It checks the device name for TABS4, CROWN (Note9), STAR2 (S9+*), WINNER (Fold), BEYOND (S10). Can someone add the DREAMLTE/DREAM2LTE and recompile?
* Why only the S9+ (star2) and not the S9 (star)? This is just stupid.
I am using customs rom, with Android PIE
I can load into the apps and while i click the "create" button to build .img file, it just shows me "please wait" and no response.
alan9820 said:
I am using customs rom, with Android PIE
I can load into the apps and while i click the "create" button to build .img file, it just shows me "please wait" and no response.
Click to expand...
Click to collapse
What custom ROM and LoD version are you using?
BTW, you can find prebuilt IMG files in the Note9 LinuxOnDex thread.
kbarni said:
Ok, here are my first steps:
- Downloaded, installed and ran the latest APK (1.0.49): https://forum.xda-developers.com/showpost.php?p=78734115&postcount=226
Error message: Your device is not supported. Please visit www.linuxondex.com for more details.
- Modified the model in build.prop to SM-N960
Error message: Linux on DeX requires your device to have the latest software to support some features.
So there is a change, but not enough.
Now, I decompiled the APK with apktool. The source is in smali bytecode format, but it can be transformed to java.
The device detection code is in the file smali/com/samsung/android/lxd/a/i.smali. It checks the device name for TABS4, CROWN (Note9), STAR2 (S9+*), WINNER (Fold), BEYOND (S10). Can someone add the DREAMLTE/DREAM2LTE and recompile?
* Why only the S9+ (star2) and not the S9 (star)? This is just stupid.
Click to expand...
Click to collapse
I've tried to modify i.smali to return "STAR2" (for any device) but it fails on another check and returns:
Error message: Linux on DeX requires your device to have the latest software to support some features.
3mpty said:
I've tried to modify i.smali to return "STAR2" (for any device) but it fails on another check and returns:
Error message: Linux on DeX requires your device to have the latest software to support some features.
Click to expand...
Click to collapse
Yep...it seems that there are other limitations too. This "latest software" is just stupid; for example the S8 Pie has newer software than the Note9 had when the first LoD beta was released (1.0.38, in last November), still it complains for old software. I wonder if it will work when devs will integrate S10 APKs in S8 rom...
kbarni said:
Yep...it seems that there are other limitations too. This "latest software" is just stupid; for example the S8 Pie has newer software than the Note9 had when the first LoD beta was released (1.0.38, in last November), still it complains for old software. I wonder if it will work when devs will integrate S10 APKs in S8 rom...
Click to expand...
Click to collapse
This 'latest software' may be caused by other issue - SELinux. After running self build & signed version my logcat is full of such entries:
Code:
2019-02-27 13:19:32.590 5156-5156/? E/audit: type=1400 audit(1551269972.589:3628): avc: denied { read } for pid=6318 comm="ung.android.lxd" name="u:object_r:lxd_prop:s0" dev="tmpfs" ino=3505 scontext=u:r:untrusted_app:s0:c168,c258,c512,c768 tcontext=u:object_r:lxd_prop:s0 tclass=file permissive=0 SEPF_SM-G950F_9_0001 audit_filtered
2019-02-27 13:19:32.590 5156-5156/? E/audit: type=1300 audit(1551269972.589:3628): arch=c00000b7 syscall=56 success=no exit=-13 a0=ffffff9c a1=7fe33851f8 a2=88000 a3=0 items=0 ppid=5167 pid=6318 auid=4294967295 uid=10680 gid=10680 euid=10680 suid=10680 fsuid=10680 egid=10680 sgid=10680 fsgid=10680 tty=(none) ses=4294967295 comm="ung.android.lxd" exe="/system/bin/app_process64" subj=u:r:untrusted_app:s0:c168,c258,c512,c768 key=(null)
2019-02-27 13:19:32.590 5156-5156/? E/audit: type=1327 audit(1551269972.589:3628): proctitle="com.samsung.android.lxd"
2019-02-27 13:19:32.591 6318-6318/? E/libc: Access denied finding property "lxd.vmdebugmode"
And because those properties cannot be read it fallbacks to default values.
Unfortunately I'm using official Pie rom for S8 without root etc.
3mpty said:
This 'latest software' may be caused by other issue - SELinux. After running self build & signed version my logcat is full of such entries:
Unfortunately I'm using official Pie rom for S8 without root etc.
Click to expand...
Click to collapse
I'm not sure it's SELinux. It should run on stock rom. In the message you posted, it complains also for untrusted app.
I tried LoD 1.0.38, which also stops with "Update your software", and didn't find anything similar in Logcat.
Can you share your modded LoD APK, so I can test it? I have rooted S8 with Pie and Alexis 7.4 rom.
kbarni said:
I'm not sure it's SELinux. It should run on stock rom. In the message you posted, it complains also for untrusted app.
I tried LoD 1.0.38, which also stops with "Update your software", and didn't find anything similar in Logcat.
Can you share your modded LoD APK, so I can test it? I have rooted S8 with Pie and Alexis 7.4 rom.
Click to expand...
Click to collapse
I'm also not sure if it was SELinux but orginal apk doesn't throw such logs into logcat. Checkout attached apk.
3mpty said:
I'm also not sure if it was SELinux but orginal apk doesn't throw such logs into logcat. Checkout attached apk.
Click to expand...
Click to collapse
Thanks!
I checked it, I don't have the untrusted app message, I have several of these:
Code:
libc [E] Access denied finding property "lxd_vmdebugmode"
However I find this part of the logcat more interesting:
Code:
LxD_o [I] isSupportedBinary: binary version: 1, required version: 4
LxDEntryActivity [E] NonSupportedBinary:
Taking a look at o.smali, the "binary version" is given by the function: com.samsung.android.lxd.processor.utils.Utils.getNstVersion ( );
This points to Utils.smali where it returns android.os.SemSystemProperties .getInt ( "linux_on_dex_version",1); if I understand correctly.
And that leads us to the kernel, probably related to /include/linux/linux_on_dex.h
Can you check this? Do you agree?
I'll investigate the kernel part. I suspect that the kernel has LoD support, but it reports LoD version 1, and the beta won't start unless this number is higher or equal to 4. I don't know if there are other kernel differences, have to dig myself in the Note9 kernel too.
Can you check what happens if you modify the o.smali file, to compare the result of getNstVersion with 1 (set v2 to 0x01 in .line 634)? If you can do this, rebuild the APK, repost it and report back please!
I feel we are getting closer to soething!
I've changed `getNstVersion` default result to 4 instead 1 and it will allow to continue. This method is called later in o.smali:
Code:
/**
* This method checks if device supports LoD, it compares linux_on_dex_version system var with
* 5 (tablet) and 4 (phone). If linux_on_dex_version value is smaller than 5 or 4 this device
* will not support LoD.
*
* @return true if device is supported
*/
public static boolean isSupportedBinary() {
boolean isAlreadyAuthorized = g();
boolean isSupportedBinary = true;
if (isAlreadyAuthorized) {
return true;
} else {
int deviceNstVersion = Utils.getNstVersion();
byte requiredNst;
if (isTablet()) {
requiredNst = 5;
} else {
requiredNst = 4;
}
String var4 = a;
StringBuilder var5 = new StringBuilder();
var5.append("isSupportedBinary: binary version: ");
var5.append(deviceNstVersion);
var5.append(", required version: ");
var5.append(requiredNst);
Log.i(var4, var5.toString());
if (deviceNstVersion < requiredNst) {
isSupportedBinary = false;
}
return isSupportedBinary;
}
}
Unfortunately is not enough. App crashes in few moments when it tries to modify system properties:
Code:
Caused by: java.lang.RuntimeException: failed to set system property
at android.os.SystemProperties.native_set(Native Method)
at android.os.SystemProperties.set(SystemProperties.java:183)
at android.os.SemSystemProperties.set(SemSystemProperties.java:111)
at com.samsung.android.lxd.EntryActivity.R(EntryActivity.java:294)
at com.samsung.android.lxd.EntryActivity.P(EntryActivity.java:183)
at com.samsung.android.lxd.EntryActivity.S(EntryActivity.java:329)
at com.samsung.android.lxd.EntryActivity.onCreate(EntryActivity.java:150)
at android.app.Activity.performCreate(Activity.java:7327)
at android.app.Activity.performCreate(Activity.java:7318)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3088)
Looks like it's the same issue that doesn't allow to read those properties first (at least it's my guess). I've attached apk after 2nd modification.
3mpty said:
Looks like it's the same issue that doesn't allow to read those properties first (at least it's my guess). I've attached apk after 2nd modification.
Click to expand...
Click to collapse
I confirm, I have the same error.
I think it wants to set a system property in file EntryActivity.smali (linux_on_dex.LoD_image and linux_on_dex.LoD_image_P_initial) that's not implemented (maybe in kernel?).
BTW, I'm really curious about reports of LoD working on S8/Note8 etc; @alan9820 and others: what ROM/kernel/LoD version are you using?
Hey guys! I made some interesting progress!
Installing the NX 22.1 kernel allowed me to start the (modified) app! After the welcome page, I could get to the "Create container" page, but when I select the .IMG file, it stays blocked at the "Please wait..." screen. So I guess I'm stuck in the same position as alan9820 (post #3 in the topic).
If I restart the creation of the container, it gives "Unexpected error: Something went wrong. Please close Linux on Dex and try again".
The only LoD related error messages from logcat are:
Code:
LxD_NstControlChannelV1 [E] Failed to connect to server!
LxD_NstControlChannelV1 [E] ControlThread: com.samsung.lxd.processor.LxdEception: Failed to connect to server!, socket status: false
kbarni said:
BTW, I'm really curious about reports of LoD working on S8/Note8 etc; @alan9820 and others: what ROM/kernel/LoD version are you using?
Click to expand...
Click to collapse
I used S8 exynos version G950F
With android customs rom of Hades PIE ROM v3.0
I just google linux on dex apk from apkmirror and download
Repeat that i am able to open the app and choose image
But i am failed to create image just giving me "please wait" msg.
---------- Post added at 07:10 AM ---------- Previous post was at 07:08 AM ----------
kbarni said:
What custom ROM and LoD version are you using?
BTW, you can find prebuilt IMG files in the Note9 LinuxOnDex thread.
Click to expand...
Click to collapse
I alrrady flashed back to Oreo rom, PIE rom is not as smooth as 8.0 currently ... haha
Some more progress: There is a switch in the kernel parameters cooncerning LinuxOnDex: CONFIG_LOD_SEC. I enabled it and recompiled the NX kernel.
Unfortunately it's the same error, the container cannot be built, it gives only an unspecified error. Nothing in Logcat.
I checked the Note9 kernels, but there is no important difference (especially in LoD part).
The unpatched APK files still give the Unsupported software error.
I wonder if the error occurs because of insufficient RAM for building the container??? The main difference between the S9+, Note9, Tab S4 vs. S8 and S9 is that the first group has 6GB of RAM.
[edit] Tried to increase the memory size by 2GB by adding swap, still doesn't work.
kbarni said:
Some more progress: There is a switch in the kernel parameters cooncerning LinuxOnDex: CONFIG_LOD_SEC. I enabled it and recompiled the NX kernel.
Unfortunately it's the same error, the container cannot be built, it gives only an unspecified error. Nothing in Logcat.
I checked the Note9 kernels, but there is no important difference (especially in LoD part).
The unpatched APK files still give the Unsupported software error.
I wonder if the error occurs because of insufficient RAM for building the container??? The main difference between the S9+, Note9, Tab S4 vs. S8 and S9 is that the first group has 6GB of RAM.
[edit] Tried to increase the memory size by 2GB by adding swap, still doesn't work.
Click to expand...
Click to collapse
I have a S8+ Korean version (with 6gb ram) willing to test your modified version to see if it works.
brick5492 said:
I have a S8+ Korean version (with 6gb ram) willing to test your modified version to see if it works.
Click to expand...
Click to collapse
You can install the kernel below (modified NX 22.1) and the apk from 3mpty's post (the modified_v2).
The app should start, the question is if you can create the container or if it gives an unspecified error.
Thanks for testing and please report back your results!
kbarni said:
You can install the kernel below (modified NX 22.1) and the apk from 3mpty's post (the modified_v2).
The app should start, the question is if you can create the container or if it gives an unspecified error.
Thanks for testing and please report back your results!
Click to expand...
Click to collapse
I'm really sorry, but my S8+ is not rooted and on the factory image (still Oreo, didnt recieve Pie yet) and I wish to leave it stock since it's my primary (work) device. I guess I can't install that kernel with the locked bootloader on Oreo right? And I do need the kernel for that modified Dex to work?
I did install the apk and after it granting permissions, it just force closes. I'm on the October security patch.
brick5492 said:
I'm really sorry, but my S8+ is not rooted and on the factory image (still Oreo, didnt recieve Pie yet) and I wish to leave it stock since it's my primary (work) device. I guess I can't install that kernel with the locked bootloader on Oreo right? And I do need the kernel for that modified Dex to work?
I did install the apk and after it granting permissions, it just force closes. I'm on the October security patch.
Click to expand...
Click to collapse
LoD related changes were introduced in Pie kernel, so this won't work on Oreo.

Installing a package by TWRP fails: ERROR 1

Hello! I am trying to install Kali Nethunter on my Moto G3 2015 (from here), but no matter what I do, I get the same error: Updater process ended with ERROR: 1. I tried both the 1.1 and 1.2 versions on their respective supported systems (1.1 on cyanogenmod 14.1 and 1.2 on LineageOS 15.1). TWRP log says this before aborting the update: /tmp/updater[129]: .: env.sh: No such file or directory. My phone has Magisk installed.
The reason for this ERROR 1 issue is due to a corrupt package: file env.sh is missing therein.
An env.sh file is present inside the package. If you don't believe me, download it for yourself.

Building Lineage OS 18 using an older device tree gives me errors

I am trying to build Lineage OS 18, using the Device Tree and Kernel for Lineage OS 17. When I try to run brunch avicii I get:
error: vendor/qcom/opensource/interfaces/capabilityconfigstore/1.0/Android.bp:3:1: failed to find variation "linux_glibc" for module "[email protected]" needed by "[email protected]" error: vendor/qcom/opensource/interfaces/capabilityconfigstore/1.0/Android.bp:3:1: failed to find variation "windows" for module "[email protected]" needed by "[email protected]" 14:32:43 soong bootstrap failed with: exit status 1
I also tried build Lineage OS 17 for the device, got the same error. I also tried building Lineage OS 18 for the Google Pixel 5, but the device was built without any errors, any ideas?

Categories

Resources