yashsingh1/xdaforums huggingface dataset:
[Android Studio] milvus212:
Goodmorning ,

I was dabbling with the parser of a web page through Android Studio, the problem is that the code I implemented can't take what i want, I'll explain:

on a website is a web page with the following html:

</style>
</head>
<body>
<h1>TITLE PAGE</h1>
<h2><em></em></h2>
<h2>La data prossimae è:</h2>
<p><br />Lunedi 10/10/2016<br />Orario 13.00 - 18.00</p><input type="button" name="chiudi" value="Chiudi" onclick="javascript: self.close();" />
</body>
</html>

With the class JSOUP I'd like to take just the date which is enclosed within <p>, that is, "10/10/2016", is it possible? for now I could only print the page title or the entire text of the page.

here is the class code:

package inducesmile.com.androidjsouphtmlparser;

import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

import java.io.File;
import java.io.IOException;

public class MainActivity extends ActionBarActivity {

private Document htmlDocument;
private String htmlPageUrl = "website";
private TextView parsedHtmlNode;
private String htmlContentInStringFormat;

[MENTION=439709]override[/MENTION]
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_livepage);

parsedHtmlNode = (TextView)findViewById(R.id.html_content);
Button htmlTitleButton = (Button)findViewById(R.id.button);
htmlTitleButton.setOnClickListener(new View.OnClickListener() {
[MENTION=439709]override[/MENTION]
public void onClick(View v) {
JsoupAsyncTask jsoupAsyncTask = new JsoupAsyncTask();
jsoupAsyncTask.execute();
}
});
}
[MENTION=439709]override[/MENTION]
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_livepage, menu);
return true;
}

[MENTION=439709]override[/MENTION]
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();

//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}

private class JsoupAsyncTask extends AsyncTask<Void, Void, Void> {

[MENTION=439709]override[/MENTION]
protected void onPreExecute() {
super.onPreExecute();
}

[MENTION=439709]override[/MENTION]
protected Void doInBackground(Void... params) {
try {
htmlDocument = Jsoup.connect(htmlPageUrl).get();
htmlContentInStringFormat = htmlDocument.text();

// htmlDocument.title();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}

[MENTION=439709]override[/MENTION]
protected void onPostExecute(Void result) {
parsedHtmlNode.setText(htmlContentInStringFormat);
}

}
}

Thanks to everyone for help!
[Galaxy S6 Q&A, Help & Troubleshooting] Dayd:
Hello

I bought a phone SM-G920F (written on the back of the phone) and the firmware says it is for SM-G920V which is with a locked bootloader, is there a possibility to put a firmware for SM G920F?

Sorry for my bad english...
[Galaxy S6 Q&A, Help & Troubleshooting] softkun123:
You can't put firmware of different model. Though it could be different baseband but same model.
[Huawei P8 Questions & Answers] vinfrix:
Guys, i received OTA update yesterday

I want to update my phone with that release

But i remember i am now running TWRP

Recovery. If i will conduct an update through

TWRP, maybe it will not work. So my plan today

Is to bring back the old stock recovery of EMUI 4.0

Marshmallow to be able to install that update.

Guys please help me finding the stock recovery for

EMUI 4.0
[Huawei P8 Questions & Answers] 0967894983:
Hi,I also encountered the same problem and I found this one and successfully used . Run run.bat select 2

https://mega.nz/#!DIdRSChT
[Sony Xperia X Compact Guides, News, & Discussion] PuffDaddy_d:
I paid most attention to the speaker and camera sections. They both seem to accurately reflect Sony's performance for the entire Z and X lines. Over-all, Sony appears to be making baby-step improvements in the camera, but still can't keep up with Samsung and Apple in the point and shoot category.

Enjoy the read:

http://www.gsmarena.com/sony_xperia_x_compact-review-1495.php
[Upgrading, Modifying and Unlocking] mcolys:
how can i change from quest profile to an administrator profile on my htc p3300. Also how can i get in the registry of the phone is there a control panel?
[Samsung Galaxy S7 Questions and Answers] asCreator:
I want to have fb messenger in ultra power saving mode (UPSM). for that i need to use the UPSM Manager app which requires root. I really do not like to root, because more and more apps are blocking rooted devices (Barclays banking, android pay, pokemon go). So I am asking if there exists some methods for gaining temp root (e.g. with adb). so i can install and use upsm-m once and then reboot and root is gone. It is important that the flag is not flipping.

Thank you for all your help

Shiro
[Samsung Galaxy S7 Questions and Answers] *Detection*:
Nope, and even if you could, the app would fail as soon as root was removed
[Samsung Galaxy S7 Questions and Answers] asCreator:
I expected that, on my old htcs there were temp roots available.

But the failing of the app after removing root, is not a problem. The app is just a configfile creator. Since the config file has changed, the app is not needed anymore.
[General Questions and Answers] blankit:
Is this possible? I cast my device to my cars display which is also touch screen using Chromecast.
[Huawei P9 Lite Questions & Answers] delca85:
Hi! Please somebody can upload for me the clock apk official for Huawei stock marshmallow firmware? I have uninstalled it and I am not able to use the alarm anymore even if I have installed another app. Thanks a lot!
[Huawei P9 Lite Questions & Answers] delca85:
I am sorry to bother all of you of again, but I am facing with the alarm problem again.

Please, could someone upload the Huawei clock apk from Marshmallow firmware?

Thanks a lot!
[Huawei P9 Lite Questions & Answers] Iona.bartishvili:
Do you still want it ?
[Huawei P9 Lite Questions & Answers] delca85:
Yes please, it would help me!
[Huawei P9 Lite Questions & Answers] snapdesign:
here

at least press thanks...
[Huawei P9 Lite Questions & Answers] delca85:
Thanks a lot!

I would have pressed thanks even if you hadn't asked me to do that!
[Huawei P9 Lite Questions & Answers] SirBabe:
Did not work for me :/ Error when i tried to install it: App not installed. The package appears to be corrupt.

Any solutions??

(Huawei Mate 8 with emui 5.0 and rooted)
[Huawei P9 Lite Questions & Answers] wizardgsz:
Is it possible to use the awesome Huawei App "suite" on other vendor phones like Samsung?

I'd like to install clock and calendar on J3 device...
[Verizon Samsung Galaxy Note II] emeryalan:
I have internetted to the best of my ability and tried many, many different things, but I cannot get my Note 2 to root. Odin keeps failing on NAND or on restore.img or any other step. I have tried every usb port and every cable in my house. I tried this once before (maybe a year or two ago) and managed to get a verizon "unauthroized software" message. From this, I was able to get it back to stock, and I have left it alone since.

Now this is no longer my main phone, and I WILL root it, but I need some help.

It is deactivated (my service phone is now an old Fascinate).

It is SCH-I605, on 4.4.2, baseband is I605VRUFND7, kernel is 3.0.31, build is KOT49H.I605VRUFND7.

The phone is in developer mode, USB debugging is enabled, verify apps is disabled, and I don't have an option to "unlock OEM". I (currently) have Odin 3.10 and 3.12 on my desktop. I've got a thing called "CF-Auto-Root-t0ltevzw-t0ltevzw-schi605" which I believe it some kind of "patch" for the kernel that will grant root access.

I can boot the phone to recovery/download mode. I can start Odin, I can connect the phone, I can see it in Odin (usually on COM5). In NONE of the versions of Odin I have seen, do I ever see this "PDA" button, but I do have a AP button. Depending on the version of Odin, usually AP is the only button that is enabled. One of the tutorials talks about PDA button but the screenshot shows the AP button, so I have been trying this exclusively.

I can click start, and things will work pretty good for a little while, but then I will get some error. Usually it is on recovery.img, sometimes it is on NAND rewrite (I think ... I can't get back there). Always just "FAIL!". I cannot find a log to tell me why, and the message is completely useless. Sometimes it will just hang on SetupConnection, and once it hung on recovery.img for over 10 minutes.

The last time I did this (and recovered) I was on Win 7, now I'm on Win 10.

Can somebody please offer some advice? I can provide screenshots, chat on Skype, whatever is needed. Thanks!!

Emery
[Verizon Samsung Galaxy Note II] emeryalan:
I also want to mention that I tried ghetto root but I am getting errors in it as well. The main error is that there is an unexpected newline (but I do not know which file), and then I am told that root fails, and Super SU does not appear on the phone.
[Verizon Samsung Galaxy Note II] Jaws4God:
i used Saferoot and it seems to work each time...

Forum

http://xdaforums.com/showthread.php?t=2565758

SafeRoot Link:

http://xdaforums.com/attachment.php?attachmentid=2760984&d=1400951117
[Verizon Samsung Galaxy Note II] emeryalan:
Thanks! I will try it right now!
[Verizon Samsung Galaxy Note II] emeryalan:
Ok. So saferoot failed with "Your kernel is patched! This device is not supported."

I think it also said something about a locked bootloader, so I went looking for more information and found

http://xdaforums.com/showthread.php?t=2118348

I tried "no you verizon" version first, which said that it failed (I took a copy of the log).

Then I tried the earlier "Back Atcha Verizon", and now I am back to "system software not authorized by verizon ..... blah blah go to the nearest verizon store for help".

Lol, now I have to remember how to undo this ... I think I had to restore the stock image with Odin or something.

In any case, what the heck is possibly going on? How is this the most locked-down phone on the planet? This is incredible and ridiculous and I don't even know!
[Verizon Samsung Galaxy Note II] Jaws4God:
weird.. yeah i used saferoot on my device a few times and haven't had an issue.. it shouldn't matter if your bootloader is locked.. that would only keep you from flashing a customer recovery...

I know mine is running 4.1.2 (MC3) so I should be able to unlock my bootloader but can't got get CASUAL to work... just fails at different points or loops trying to install CAD or something... so not sure what i need to do.

I did try to use Flashify to put a custom recovery on.. i got the "system software not authorized... " blah blah.. knew I did have to use ODIN to restore the factory firmware.. but it wasn't reading my phone.. finally after switching USB ports, it worked and I was able to put it back to stock and get it to boot and root again..

so if anyone has any ideas on how to get CASUAL to work, please let me know. :eek:
[Verizon Samsung Galaxy Note II] LordBaronMarshall:
Galaxy Note 2 lessons from Verizon

There is still no root or bootloader unlock for Verizon Galaxy Note2 (Model SCH-I605). Ours quit working, by shutting down/locking up often. From what I've found out, this behavior is caused by Verizon's own software, not the hardware, forcing us to get a new phone. I STRONGLY recommend anyone on Verizon to drop the service immediately, before this becomes the standard. What we will see is, having to purchase a new phone product every two years, requiring us to turn in the old phone, then being sold a repackaged refurbished model at new phone prices.

Verizon is pushing the boundaries, and they are preventing a piece of equipment that you own from functioning in order to force you to buy another of their products. If allowed, this business model WILL spread to all their competitors. It will stunt the growth of future technologies since innovation will not be the motivation to buy a new product, the only motivation being the continual failure of a sabatoged product.

So again, please drop Verizon if you have them, and if you don't have them don't get them.
[Verizon Samsung Galaxy Note II] Jaws4God:
update.. i was able to get CASUAL to work.. had to download another program to reset the CAD Driver.. then it worked like a charm.. so have an unlocked bootloader and rooted. Right now i'm trying out Alliance ROM..
[Verizon Samsung Galaxy Note II] Jaws4God:
yep, i got this error too after I had tried Alliance 4.4 ROM... so I guess that saferoot only works for 4.3 and older..
[Verizon Samsung Galaxy Note II] mi7chy:
Even though my device is bootloader unlocked for testing CM releases I always go back to stock ND7 for stability minus bootloader then Ghettoroot and it's been working solid for years. And, unlimited data for $60 is hard to beat. Absolutely nothing wrong with the phone and software and not yet with the service as long as I can avoid the $20 unlimited data increase when contract expires in 2017.
[Verizon Samsung Galaxy Note II] Jaws4God:
what version is ND7 ? thank you.
[Verizon Samsung Galaxy Note II] mi7chy:
ND7 is Kit Kat 4.4.2.
[Verizon Samsung Galaxy Note II] Jaws4God:
oh got ya. i haven't read much about that version.. wonder if it has possibility of unlocked bootloader or root.
[Verizon Samsung Galaxy Note II] mi7chy:
It's the last official release. If you're already bootloader unlocked you can use Mobile Odin Pro to flash it minus the bootloader then use Ghettoroot. Only thing is Mobile Odin Pro only works with Lollipop such as CM12.1 or older. So, if you try CM13 and decide to go back to stock ND7 you have to first flash CM12.1 then use Mobile Odin Pro to flash stock ND7.

https://play.google.com/store/apps/details?id=eu.chainfire.mobileodin.pro
[Verizon Samsung Galaxy Note II] Jaws4God:
oh interesting.. so right now i'm on a ND7 port.. should I bother flashing the ND7 without bootloader or is not really needed?

Thanks!
[Moto Z Guides, News, & Discussion] KryptosXLayer2:
http://www.bestbuy.com/site/motorol...-phone-unlocked-black/5601502.p?skuId=5601502

Now available in black only at BBY. Fingers crossed this thing comes out before the Note7's come back in stock for new customers and can be bootloader unlocked! Will need to wait for confirmation before buying either one, but once I know what the plan is, I'd rather have a rooted Moto Z over a locked down Note7.... especially if that means I get to stay with ATT and not have to jump ship over to Verizon!

Just wish this was the Force and not the regular one, stupid VzW for carrier exclusives.....
[LeEco Le Max 2 Questions & Answers] Hakim Farouk:
Hi,

Anybody here can help me get the original stock recovery img? I can't find it anywhere.

Thanks
[LeEco Le Max 2 Questions & Answers] Hakim Farouk:
Nvm, Found it.
[LeEco Le Max 2 Questions & Answers] nikeshcfri:
where is stock recovery img ..
[LeEco Le Max 2 Questions & Answers] N-Gage4ever:
If you found it plz share it with us too!..
[Xiaomi Redmi Note 3 Questions & Answers] paraponzi:
Hello, various posts say kenzo roms could be used on kate, but without modem files. Many users already tried flashing manually modified roms, bricking or having issues. Is there a full tutorial to how effectively:

- unlock bootloader (only unofficial way for what i understand...)

- root the phone (only flashing supersu via TWRP? what version of TWRP?)

- possibly modify existent kenzo roms to use them on kate (not only CM.... there are so many roms with various kernels too...are they working without problems on kate?)

so far i've been scouring the net for any possible guide, but there are really few to none specific for kate, and none answering clearly the previous questions....and i am sure i'm not alone as more and more people are buying right now the international version, and keep asking the same questions. Could somebody shed a light? thanks.
[Xiaomi Redmi Note 3 Questions & Answers] bialabs:
Following this thread. I bought international version and can't wait to flash CM

Inviato dal mio MI 2S utilizzando Tapatalk
[Xiaomi Redmi Note 3 Questions & Answers] DPyro:
You need to unlock bootloader and then flash TWRP. Once that's done all you need to do is flash CM13, CM13Firmware, Opengapps ARM64 and modem file for Kate (NON-HLOS from fastboot of MIUI8 Kate). Also can flash latest SuperSU for root.

To flash modem once CM13 is installed boot fastboot and then enter:

fastboot flash modem NON-HLOS.bin

Full guide
[Xiaomi Redmi Note 3 Questions & Answers] paraponzi:
Is it possible to just install twrp and supersu and use miui roms?
[Xiaomi Redmi Note 3 Questions & Answers] rattensuppe:
http://xdaforums.com/redmi-note-3/how-to/zcx-twrp-install-twrp-flash-supersu-t3462448

I wish there was a TWRP specifically for "kate" though. Because TWRP will think "kate" is "kenzo" for now.
[Xiaomi Redmi Note 3 Questions & Answers] dadonali:
is its possible to unlock the Kate version on the official way? Because in the Guide from Xiaomi ist the Point "You must on China Dev Firmware" but this versions isnt available for the kate version?
[Xiaomi Redmi Note 3 Questions & Answers] Kotzbroxken:
Until today, no one confirmed to have had success with official unlock. Even though it should be possible to unlock with the Mi Flash Unlock tool on every ROM, it is very likely that it can only reliable unlock when using a Chinese Developer ROM, which doesn't exist for Kate.

Most people are getting an error message in the above utility, saying that the MI account in the phone and the one used in the utility don't match, even if they do.
[Xiaomi Redmi Note 3 Questions & Answers] Pumpino:
You found my guide. :)
[Xiaomi Redmi Note 3 Questions & Answers] BigBlarg:
Is there any good reason to wait for a reliable way to officially unlock the bootloader? Or any downside to go with the unofficial unlock method?

I got my phone yesterday and just found out today I actually had the Kate version. I don't really plan on going back to MIUI and from what I understand, the official unlock method would only make it easier to switch back to MIUI. Is that right?

(It's not my first time playing with custom ROMs, I have flashed multiple roms / kernels in the past but I always owned Nexus phones and it was quit dummy proof on these phones.)
[Xiaomi Redmi Note 3 Questions & Answers] Pumpino:
That's my understanding, yes. Interestingly, when I had a Kenzo and unlocked it officially, the bootloader got relocked whenever I flashed something like CM. With Kate (unofficially unlocked), the bootloader wasn't relocked after flashing CM. In that sense, unlocking it via unofficial means may be advantageous. :)
[Xiaomi Redmi Note 3 Questions & Answers] BigBlarg:
Thanks Pumpino!

I just followed your guide and successfully flashed CM 13 stable release without any issue.

It's only been a few minutes but everything seems to be working (much better than MIUI) so far.
[Xiaomi Redmi Note 3 Questions & Answers] Pumpino:
You're welcome. I'm glad it went smoothly.

I've just edited my previous post, as "was" should have said "wasn't". ie. "With Kate (unofficially unlocked), the bootloader wasn't relocked after flashing CM."
[Xiaomi Redmi Note 3 Questions & Answers] BobSlob:
Followed the guide and can't get the bootloader to unlock. Any ideas?

Downloaded the updated/modified emmc_appsboot.mbn, put it into the rom folder and flashed fine. Won't unlock.
[Xiaomi Redmi Note 3 Questions & Answers] BigBlarg:
I made a mistake at this part and it wouldn't allow me to unlock the bootloader. The guide to unlock the bootloader doesn't explicitly mention one important detail. In the screen where you have to allow USB debugging, you must also enable the option saying "Allow OEM unlock" or something like that. I didn't enable that option at first and in fastboot it would tell me I was not allowed to unlock the bootloader. So I had to reboot the phone normally, go through all the MIUI setup and finally re-enable USB Debugging and enable "Allow OEM unlock".
[Xiaomi Redmi Note 3 Questions & Answers] BobSlob:
You sir are my hero! That was the issue. Many thanks.

One other question, when flashing the rom is it safe to put it on the SD card, or does it need to be on internal?
[Xiaomi Redmi Note 3 Questions & Answers] Pumpino:
Good point, although on mine, "Allow OEM Unlocking" was enabled by default. I used the developer ROM. Is it possible that it's not enabled by default on the stable ROM?
[Xiaomi Redmi Note 3 Questions & Answers] BigBlarg:
Yes, totally safe. That's how I did it and that's also how I flashed multiple other Android devices using TWRP. Never had any issue putting the ROMs on the SD card.

I did use the stable ROM, so that could explain it.
[Xiaomi Redmi Note 3 Questions & Answers] BobSlob:
Alright, another problem. TWRP (tried a few versions) is unable to mount and wipe any partitions... any ideas? =P

Edit "Cofface TWRP Fix" as linked in the guide boot loops me
[Xiaomi Redmi Note 3 Questions & Answers] balario:
Did you try flashing first the Safe TWRP?
[Xiaomi Redmi Note 3 Questions & Answers] BobSlob:
Seems the standard TWRP worked fine, disaster avoided :)
[Android Software/Hacking General [Developers Only]] xdvs23:
Disclaimer

Whatever you do, it's your decision and you do it on your own risk!
I am not responsible for bricks, any kind of damages, data loss or any other unwanted result!
Everything you do is done on YOUR OWN RESPONSIBILITY!
And I am also not responsible if you lose the chat with your crush.

You might want to transfer your internal storage such as /sdcard to your computer directly and compressed as fast as possible.

So here is how you do it (on linux using bash):

Reboot your phone into TWRP, connect your device to your computer, and run the following command:

adb shell mkfifo /bk.pipe && adb exec-out 'tar -cvap data/media/0 2>/bk.pipe' | dd of=sdcard.tar & adb shell cat /bk.pipe &

In this example your data (in this case /data/media/0) will be backed up to your computer into the file sdcard.tar.

Compression is done automatically and you will get a nice output on your terminal on which file is being backed up currently.

When everything is finished you should get a message similar to this on your terminal:

79692237+2 records in
79692238+0 records out
40802425856 bytes (41 GB, 38 GiB) copied, 3550,38 s, 11,5 MB/s

(On the result of this you can see that the speed is around 12 MB/s, means that 1 GB backups in less than 1 minute)

When you get that, it means that your backup has finished and you can safely remove the usb cable.

Note that you can do this with any directory on your device, so if you desire to back up /data, just write data instead of data/media/0.

Example of the resulting sdcard.tar file (opened on my computer):

[IMG="Example result"]http://xdevs23.bplaced.com/upload/img/Selection_088.png[/IMG]

Decompressing your data directly to your device might get a little trickier:

adb shell mkfifo /rst.pipe && adb push sdcard.tar /rst.pipe & adb shell 'cd /; cat /rst.pipe | tar -xv'

If that does not work, you can just extract the content of the tar file normally onto your computer and then copy the files over using adb push or copy the tar file to your phone and extract it using the following command:

adb push sdcard.tar /sdcard/sdcard.tar
adb shell 'cd /; tar -xvf /sdcard/sdcard.tar'

And that should do the job as well.

---

See also:

tar to pipe but keep -v verbose output separate from STDERR

Transferring binary data over ADB shell (ie fast file transfer using tar)

Compose and pipe a gzipped tar archive in one go

Bash tar and output to log file

GNU Tar

Encrypting and Compressing

How encrypt data/text stream instead of a file?

Post on my blog:

How to backup compressed data from your android device to your computer