yashsingh1/xdaforums huggingface dataset:
[One (M7) Q&A, Help & Troubleshooting] skriatokxda:
(bootloader) version: 0.5

(bootloader) version-bootloader: 1.61.0000

(bootloader) version-baseband: 4T.35.3218.16

(bootloader) version-cpld: None

(bootloader) version-microp: None

(bootloader) version-main: 7.19.401.22

(bootloader) version-misc: PVT SHIP S-ON

Unlocked, S-ON

cwr6.0.4.8-m7

Unexperienced (with m7 ) did root, wanted to stay as close to stock as poss.

Installed exposed instaler(didnt run it)

flashed for S-ON exposed img

NOW: stucked on white logo htc one

in panic did erase sdcard(and backup, dont laugh yes I did) tryied to flash boot img of this M7_7.19.401.22.zip (assumed fix from desire S as its last experience of flashing and messing with phone lol )

I would like to stay root and have good rom running (stable, functional,gladly close to stock) but I run out of options where to start even in this state. (im familiar with push comands, im runing fstboot/adb under slackware linux)

back to xda after years thanks for help
[One (M7) Q&A, Help & Troubleshooting] skriatokxda:
[solved]

in recovery

adb sideload superSU.zip

adb push M7...tralalala.zip /data/media/0

(i found apropriate M7 stock zip flushing bootloader info through google)

than i was able to flash it and restore the phone...

(i had troubles, sideload or push either) adb push tralala.zip(M7 stock) /sdcard , than install zip in crw didnt find zip

sideload was unable to handle the zip (*cannot read tlalala zip*) eror

was confusing

IF ANYONE KNOWS WHAT WAS HAPPENING CAN CLEAR IT OR MODERATORS CAN DELETE THIS IF INAPROPRIATE
[MeMO Pad 7 Q&A, Help & Troubleshooting] tuxic001:
Hi,

Platform/Software

Asus MemoPad 7 ME176CX

Adroid Lollipop 5.0 most recent (second Lollipop firmware)

and thanks to cyandro and Mis012, who had helped a lot: The device is happily rooted.

Also:

A Gentoo Linux PC, updated daily

***NO WIFI*** (due to the vendor, who prints on the box "linux driver available" and "Linux compatibel" and

the offered driver is for kernel 2.6.x. Thank you vendor for supporting linux! :(

Many things I did by connecting my tablet via USB and MTP-stuff to my Gentoo Box.

But with Lnux deploy, which was mentioned positively elsewhere on this forum, I failed.

For good reasons, the Linux Deploy apk is an Linux Installer, which fetches the "real thing"

(the linux distro) via Wifi from the internet...and BANG! I am out of luck.

I definetly want a Linux on my tablet and I dont want to destroy Android. Dual boot

would be fine, chroot may be ok (but then, the unmodified Android kernel will run.).

Is there any trick, to convince Linux Deploy to access the SDCard for fetching the

distro or circumvent the need of a working WiFi connection aomehow?

Or is there any other way to install/dual boot a Linux from SDcard?

(I have some experience with Linux and Linux setup...but not on

a tablet, which is build to run a (in comparison) locked Android).

Thank you very much for any Linux on my tablet in advance! :)

Best regards,

tuxic
[MeMO Pad 7 Q&A, Help & Troubleshooting] Mis012:
I have my tablet back and I am working on it :)

For the chroot, I recommend Complete Linux Installer (linuxonandroid project) and x86 ubuntu from their site.
[MeMO Pad 7 Q&A, Help & Troubleshooting] tuxic001:
Hi Mis012,

in the meanwhile I got a chrooted Linux (ARCH Linux) running via Linux Deploy. I checked Linux complete installer, but it does not work for me.

This is the result of buying a new USB WIFI dongle, which this time is proofen to run with drivers, which already are included

in the Linux kernel -- by the company, which build the chipset.

For those who haveing the same problem I had:

I used a USB WIFI dongle with Atheros chipset:

lsusb -v said:

idVendor 0x0cf3 Atheros Communications, Inc.

idProduct 0x9271 AR9271 802.11n

Beside the normal Wifi stuff you need in the kernel, these drivers are

needed for that chipset (excerpt of lsmods output):

ath9k_htc, ath9k_common, ath9k_hw, ath

The only drawback of this setup is, that it only runs via VNC (Juice VNC).

I tired the framebuffer and X11 automatic setup of Linux deploy but did not receive anything more

than a black screen.

It would be nice to have a real X11 running, so the delays, which come with VNC are no longer there.

Best regards,

tuxic
[MeMO Pad 7 Q&A, Help & Troubleshooting] Mis012:
Don't worry, tutorial is coming :)

I succesfully loaded rEFInd without powered hub, so some config editing and maybe sdcard linux?

As for complete linux installer, it is important to not download image in the app, but download one of these http://sourceforge.net/projects/linuxonandroid/files/Ubuntu/13.10/x86/
[MeMO Pad 7 Q&A, Help & Troubleshooting] tuxic001:
Hi Mis012,

oh wait wait...!!! :)

You are WAY TOO FAST for me! ;)

Did I understand that correctly:

After I googled for rEFInd, which seems to be a EFI bootloader and reading your words a second++ time, it /sounds/ to me, that you have found

a way around the locked bootloader of our beloved ME176CX? ... or does my brain need just another cold boot ? ;)

I bougth an OTG enabled powered hub from Amazon, with which I could enter the UEFI of the tablet with some luck. Since in a previous posting in another thread

one reports, that this alone had bricked his tablet on a very low level I left UEFI as soon I had entered it.

What I don't understand: If one enters the bootloader screen (adb reboot-bootloader) "secure boot: YES" is displayed. From another posting I think to remember

that in UEFI itsself "secure boot: NO" is displayed.

And as far as I know, the bootloader is locked until now, which means nothing else can be booted than a signed kernel/image. That's why things like Cyanogenmod are

diamonds we simply have to say "Fair well, good bye" to? Or is there any silver lining on the horizon?

As a anti depressive medicine I to pills of took X-Posed forte yesterday, which gave me a bootloop whith a certain module. But I could fix that.

X-Posed seem to be half Lollipop ready. The main reason (X-Privacy) was a disappointment, since it (and other firewall/privacy modules I tested) does not work on Lollipop yet.

I really don't like a man in the middle, even it is the biggest search engine ever.

Which brings me back to Ubuntu. According to this

http://ubuntuforums.org/showthread.php?t=2141952

https://micahflee.com/2014/04/ubuntu-is-finally-taking-privacy-seriously/

and the need for this to exist

https://fixubuntu.com/

makes me feel not THAT comfortable when it comes to UBUNTU.

Will be there a way to install something else Linuxish with your recipe, Mis012, without

leaving the glorious path of you enlightened mind ? 8) <very big smiley here!>

I am totally curious about what you have found in the Deep Web of the ME176CX ... ;)

Best regards,

tuxic
[MeMO Pad 7 Q&A, Help & Troubleshooting] Mis012:
It is boot manager, not bootloader. Sorry :(

But, I (or you using my tutorial) can try grub2 or so :)

Theoreticaly, you only need to take some linux, install it on your PC, delete things you do not need, install the VNC server linuxonandroid uses (ThightVNC or something like that) and copy the init.sh from their image, and slightly edit it, then move it to the same location they had it in. Then use dd command to make a .img of this linux system, and try it in the app. You can try kali linux and post the working result to me :)

Look at first part of my tutorial: http://xdaforums.com/memo-pad-7/help/how-to-dual-boot-me176cx-part-1-t3183437
[MeMO Pad 7 Q&A, Help & Troubleshooting] tuxic001:
Oh...uuuh...sorry...I confused that...

Is that correct:

CPUs "mini loader in CPU ROM" loads UEFI

UEFI loads Android bootloader

Android bootloader loads Android Linux kernel

Kernel starts init and here we go...

WIth rEFInd you will do:

CPUs "mini loader in CPU ROM" loads UEFI

UEFI loads rEFIind

(user choose from which source to boot)

rEFInd loads either

Android bootloader or Ubunto kernel (or ? Or is a grub layer needed here?)

(and in case the user has choosen Android:)

Android bootloader loads Android Linux kernel

Kernel starts init and here we go...

Correct? I am sure, I confused another detail...
[MeMO Pad 7 Q&A, Help & Troubleshooting] Mis012:
Yes, that's it. The grub layer is not needed as linux kernel acts as bootloader from some version. But, maybe you can use another bootloader to load android kernel (grub2 ?) and then hire someone to make the cyanogenmod.
[MeMO Pad 7 Q&A, Help & Troubleshooting] tuxic001:
Why not to load Cyanogenmod (supposing one would exist) with rEFINd. Why do we need grub here?
[MeMO Pad 7 Q&A, Help & Troubleshooting] Mis012:
Becouse rEFInd is not a bootloader. You need bootloader. But, maybe when we will obtain kernel source code, we can convert it to efi binary and then run it with refind?
[MeMO Pad 7 Q&A, Help & Troubleshooting] tuxic001:
...I thoughr the Linux kernel contains its own bootloader...does Google removed that stuff?

...I am still confused....

<scratching my head>
[MeMO Pad 7 Q&A, Help & Troubleshooting] Mis012:
It doesn't contain it, it can be converted to efi binary so it will work like bootloader (i think)

maybe this is what I meaned https://www.kernel.org/doc/Documentation/efi-stub.txt

---------- Post added at 12:42 PM ---------- Previous post was at 12:37 PM ----------

http://kroah.com/log/blog/2013/09/02/booting-a-self-signed-linux-kernel/

This is what I wanted to say. Do this with our kernel, and we have won the game :cool:
[MeMO Pad 7 Q&A, Help & Troubleshooting] tuxic001:
Hi Mis012,

VERY interesting links! Thanks a lot!

...but for now I fear this stuff is far from what I am capable to do...

Yesterday XPosed and a fixed bootloop and today the boot of an self signed kernel

from a locked bootloader ? I think, THIS learning curve is a little TOO steep for me in

the moment.

One would need tools or scripts to automate that process and a way to recover from

even the worst blocks/bricks/hangs...

But if I understood you correctly from you previous posting, with rEFInd we have

a "loader in the middle" (I know, it is not a bootloader) to get other things booted than

linux?
[MeMO Pad 7 Q&A, Help & Troubleshooting] Mis012:
Yes, it is supposed to run .efi binaries. My problem is, that even in ugly text mode, I can select with volume buttons, but I can NOT confirm the selection with power button. Maybe you could fix it in the source (there should be something like menu.c) so the power button would make selections. Even with powered hub (which I do not have) I would like to select the OS to boot just with device buttons.

http://sourceforge.net/projects/refind/files/0.9.0/refind-src-0.9.0.zip/download

---------- Post added at 03:30 PM ---------- Previous post was at 03:15 PM ----------

// react to key press
switch (key.ScanCode) {
case SCAN_UP:
UpdateScroll(&State, SCROLL_LINE_UP);
break;
case SCAN_LEFT:
UpdateScroll(&State, SCROLL_LINE_LEFT);
break;
case SCAN_DOWN:
UpdateScroll(&State, SCROLL_LINE_DOWN);
break;
case SCAN_RIGHT:
UpdateScroll(&State, SCROLL_LINE_RIGHT);
break;
case SCAN_HOME:
UpdateScroll(&State, SCROLL_FIRST);
break;
case SCAN_END:
UpdateScroll(&State, SCROLL_LAST);
break;
case SCAN_PAGE_UP:
UpdateScroll(&State, SCROLL_PAGE_UP);
break;
case SCAN_PAGE_DOWN:
UpdateScroll(&State, SCROLL_PAGE_DOWN);
break;
case SCAN_ESC:
MenuExit = MENU_EXIT_ESCAPE;
break;
case SCAN_INSERT:
case SCAN_F2:
MenuExit = MENU_EXIT_DETAILS;
break;
case SCAN_F10:
egScreenShot();
break;
case 0x0016: // F12
if (EjectMedia())
MenuExit = MENU_EXIT_ESCAPE;
break;
}

This appears to be the part of code we need to change. But question is, when volume keys act as arrows up/down (how is this possible?), as what key does act the power button?

---------- Post added at 04:11 PM ---------- Previous post was at 03:30 PM ----------

Maybe we can set volume up to confirm, so you can only scroll down?

Or set the timeout to not disappear but to select the option selected at the point when it goes to zero?

Maybe just delete this:

if (HaveTimeout) {
// the user pressed a key, cancel the timeout
StyleFunc(Screen, &State, MENU_FUNCTION_PAINT_TIMEOUT, L"");
HaveTimeout = FALSE;
if (GlobalConfig.ScreensaverTime == -1) { // cancel start-with-blank-screen coding
GlobalConfig.ScreensaverTime = 0;
if (!GlobalConfig.TextOnly)
BltClearScreen(TRUE);
}
[MeMO Pad 7 Q&A, Help & Troubleshooting] lambdadroid:
If you've a powered hub, there nothing is preventing you from booting Linux directly on your tablet. For example if you put an Ubuntu ISO (like Lubuntu or Xubuntu, normal Ubuntu might be too heavy) on a USB stick, then plug in your powered hub and go to the boot order you can select to boot from the USB stick and it should boot without any problems. I made myself a custom Arch Linux installation which is now able to boot on the ME176C directly when I plug it in with the USB stick. Haven't tested with the SD card yet, not sure if UEFI can boot from it.

No worries, I've been in there several times and my tablet is still fine. :) As long you only touch the boot order in the boot menu you shouldn't get any problems.

I don't know exactly but I can definitely confirm that we can boot even unsigned UEFI installations on our tablet, Secure Boot is definitely turned off in UEFI. The Android bootloader is locked though so you can't simply boot an Android installation without replacing the bootloader too. If someone manages to compile/get an alternative bootloader running on our device that is easily unlockable then CyanogenMod will be definitely possible. So tl;dr it's possible but not that easy to accomplish (for me at least, not experienced enough in this field). I think UEFI's Secure Boot is not the same as the bootloader's Secure Boot here, they just happen to have the same name.
[MeMO Pad 7 Q&A, Help & Troubleshooting] Mis012:
As you have powered usb hub, you can try to boot android with GRUB2, or compile the kernel as efi binary so you can run it directly.
[MeMO Pad 7 Q&A, Help & Troubleshooting] tuxic001:
Hi cyandro,

iiieee... I am not feeling very comfortable with the fiddling in the UEFI...

On the other hand:

As far as I don't know: Reaching the UEFI cannot be block by any setting, which can be made

in the UEFI, or? Otherwise UEFI would make itsself needless.

Or is this a wish of a wannabe hacker?

;)

Best regards,

tuxic
[MeMO Pad 7 Q&A, Help & Troubleshooting] lambdadroid:
It's much like going into the BIOS settings or UEFI settings on an usual PC, the setup is very similar to one you would also find on normal PCs. There is not much you can break as long you don't stop fiddling around with the minor settings and use it only for the boot order. I guess you could set a password for UEFI access (but why?), if you forget it you will at least have a major problem to get in there again, but otherwise as long you actually read and know what you're changing you can't do much wrong.
[MeMO Pad 7 Q&A, Help & Troubleshooting] Mis012:
Not reaching UEFI at all, but the simple way (pressing f2 on keyboard) will only work if the timeout is set to something other then 0. This can be edited with efibootmgr so it is not a big problem ;) On our tablet it is set to 1 by default so you can set it to 0 to speed up booting by one sec, but if anything goes wrong then you would have a serious problem.
[Android Q&A, Help & Troubleshooting] davidgro:
I am attempting to replace the data an app* stores in an XML resource, and I can't figure out how to make it work. I followed the tutorial, but it only covers things like "drawable" (and the simple types like string and integer)

I have tried various combinations of compiled or textual XML, with the file in res/xml or res/raw, and so far have not found anything that had any effect on the app, while my module never reports any errors! (at least not in any log I've found)

*The app is Swype, I'm attempting to replace one of the English keyboard layouts (qwerty, azerty, or qwertz) with a completely new one I saw that's actually good for the sliding entry method instead of a slide left on the top row being at least 14 different possible words (Seriously, I made a list) including some very commonly needed ones like it, or, out, and our. The layouts are** stored in xml files such as res/xml/kbd_azerty_panlatin.xml but even attempting a single letter swap hasn't done anything yet.

So, what do I need to do to make a line like

resParam.res.setReplacement(resParam.packageName, "xml", "kbd_azerty_panlatin", xrf);

actually work? (xrf is from

XResForwarder xrf = modRes.fwd(R.raw.kbd_azerty_panlatin);

as of my last attempt. modRes is as per the tutorial) and that file is in the last attempt compiled by creating a new Swype apk with the modification via apktool then just grabbing it from there.)

**Note that actually attempting to run recompiled Swype APKs -- modded or not -- fails with a crash when the keyboard would appear, so I can't actually confirm that I'm right about the location of the layouts I need to change, but it seems to be reasonable that they are where I think. I also have No idea how to link them to the language options, so I can't see a way to create a new one instead of replacing an existing.
[Android Q&A, Help & Troubleshooting] ssojyeti2:
bump, I'm curious too

edit: if you scroll down on the tutroial page, it covers modifying xml layouts :D
[Android Q&A, Help & Troubleshooting] davidgro:
It doesn't give much detail and since layouts are a separate type, it might not apply anyway.

I really hope it's not right about me needing to include All the xml files in the app just to make one work. I suppose I should try it anyway.
[Android Q&A, Help & Troubleshooting] ssojyeti2:
ok i was able to successfully replace an xml file in snapchat using xposed, although it caused snapchat to fc, but i think thats on the app itself. i basically copied the code on the tutorial word for word lol

package com.joss.geofilter;

import android.content.res.XModuleResources;
import de.robv.android.xposed.IXposedHookInitPackageResources;
import de.robv.android.xposed.IXposedHookZygoteInit;
import de.robv.android.xposed.callbacks.XC_InitPackageResources.InitPackageResourcesParam;

public class GeoResize implements IXposedHookZygoteInit, IXposedHookInitPackageResources {
private static String MODULE_PATH = null;

@Override
public void initZygote(StartupParam startupParam) throws Throwable {
MODULE_PATH = startupParam.modulePath;
}

@Override
public void handleInitPackageResources(InitPackageResourcesParam resparam) throws Throwable {
if (!resparam.packageName.equals("com.snapchat.android"))
return;

XModuleResources modRes = XModuleResources.createInstance(MODULE_PATH, resparam.res);
resparam.res.setReplacement("com.snapchat.android", "layout", "battery_view", modRes.fwd(R.raw.battery_view));
}
}

because i put it in /raw, i had to compile the xml first using apktool and swap it into the xposed module using 7zip afterwards
[Android Q&A, Help & Troubleshooting] robertogl:
I'm late, but i think you've misunderstand some things. For example, you can't mod Swype, not like you do here.

I give you an example. I've this xml file:

<resources>
<color name="white">#ff000000</color>
<color name="common_signin_btn_default_background">#ff000000</color>
</resources>

(taken from Twitter app)

I want to change that values. You can't replace the entire xml, but you can create an xml, name it like you want (xda.xml will work) and put in it:

<resources>
<color name="white">THE COLOR YOU WANT</color>
<color name="common_signin_btn_default_background">THE OTHER COLOR YOU WANT</color>
</resources>

and you put that file into res/values of your Xposed app. You've not to write all entries, you write only those you want to change. Now, you have to write the code that does the magic:

import android.content.res.XModuleResources;
import de.robv.android.xposed.IXposedHookInitPackageResources;
import de.robv.android.xposed.IXposedHookZygoteInit;
import de.robv.android.xposed.callbacks.XC_InitPackageResources.InitPackageResourcesParam;

public class Main implements IXposedHookZygoteInit, IXposedHookInitPackageResources {
private static String MODULE_PATH = null;

@Override
public void initZygote(StartupParam startupParam) throws Throwable {
MODULE_PATH = startupParam.modulePath;
}

@Override
public void handleInitPackageResources(InitPackageResourcesParam resparam) throws Throwable {
if (!resparam.packageName.equals("com.twitter.android"))
return;

XModuleResources modRes = XModuleResources.createInstance(MODULE_PATH, resparam.res);
resparam.res.setReplacement("com.twitter.android", "color", "white", modRes.fwd(R.color.white));
resparam.res.setReplacement("com.twitter.android", "color", "faint_transparent_white", modRes.fwd(R.color.faint_transparent_white));

}

}

So, into 'resparam.res.setReplacement' you don't put the xml name, but you put the resource name. In this case, the color's name. So, if in your xml you have:

<resources>
<color name="forum">THE COLOR YOU WANT</color>
</resources>

you will use:

resparam.res.setReplacement("com.twitter.android", "color", "white", modRes.fwd(R.color.forum));

And that changes the color 'white' of Twitter app, into the color 'forum', that you've defined into your xlm xda.xml ('THE COLOR YOU WANT' here).

For layout, that is a bit different...
[Android Q&A, Help & Troubleshooting] robertogl:
Ok sorry, my last post here is not totally correct. The way used in the first post should work, but it doesn't. Has someone find a solution?

P.S. The example of snapchat is a bit different, probably, because it uses 'layout'.

P.S.2 This thread should be moved in the 'Xposed' section...
[Android Q&A, Help & Troubleshooting] devzeus_ke:
what about editing strings? in an apps xml?
[Android Q&A, Help & Troubleshooting] robertogl:
Too many years have passed to remember that :)
[Android Q&A, Help & Troubleshooting] devzeus_ke:
Oww. I am actually getting started with android development and i am also learning how the system itself works. However i haven't found an example to edit a string resource in an app. I only find examples on how to edit systemui resources. Any help with finding that?
[Android Q&A, Help & Troubleshooting] robertogl:
Note that this 'replacement' only works with the Xposed framework.
[Android Q&A, Help & Troubleshooting] devzeus_ke:
actually i meant over writing. Like changing string values